我的主要动机是从简单的RGB图像(来自我的网络摄像头的图像)中检测手部 . 我找到了一个示例代码find_hand_point
function [result, depth] = find_hand_point(depth_frame)
% function result = find_hand_point(depth_frame)
%
% returns the coordinate of a pixel that we expect to belong to the hand.
% very simple implementation, we assume that the hand is the closest object
% to the sensor.
max_value = max(depth_frame(:));
current2 = depth_frame;
current2(depth_frame == 0) = max_value;
blurred = imfilter(current2, ones(5, 5)/25, 'symmetric', 'same');
minimum = min(blurred(:));
[is, js] = find(blurred == minimum);
result = [is(1), js(1)];
depth = minimum;
结果变量是最接近相机(手)的坐标 .
来自kinect设备的深度图像被传递给此函数,结果如下:
http://img839.imageshack.us/img839/5562/testcs.jpg
绿色矩形显示最接近相机(手)的东西 .
PROBLEM:
-
笔记本电脑相机拍摄的图像不是深度图像,而是简单的RGB图像 .
-
有没有办法将我的RGB图像转换为那些深度图像?
-
Is there a simple alternative technique to detect hand ?
3 回答
Kinect使用额外的传感器来检索深度数据 . 单个网络摄像头图像中没有足够的信息来重建3D图像 . 但是有可能根据一系列图像做出深远的估计 . 这是XTR-3D和类似解决方案背后的原则 .
一个更简单的方法可以在http://www.andol.info/hci/830.htm中找到
在那里,作者将rgb图像转换为hsv,并且他只保留H,S和V值的特定范围,他认为这些是手状颜色 .
在Matlab中:
hand=...
将为您提供一个矩阵,其像素位于10 <= H <20且30 <= S <150且80 <= V <255
我发现通过肤色检测手部的更好技术:)
http://www.edaboard.com/thread200673.html