I want to build up hand gestures detection and recognition algorithm, I need help with my code and sadly it doesn't work
2 views (last 30 days)
%vid to intialize a variable to save incoming video %videoinput to get video from webcam, video format, adopter number
vid = videoinput('winvideo', 1);
%Frames per trigger specifies the number of frames acquired, inf used %to state that frames will be acquired till an error occurs or stopped
%Returned color space is rgb as we are using this format
%extract images every 5 milli-second
%start acquiring video
while(vid.FramesAvailable <= 20)
% Get a snapshot of the current frame
data = getsnapshot(vid);
%Skin Color Extraction
% Here we do the image blob analysis.
% We get a set of properties for each labeled region.
stats = regionprops(roi, 'BoundingBox', 'Centroid');
%This is a loop to bound the skin colour in a rectangular box.
for object = 1:length(stats)
bb = stats(object).BoundingBox;
bc = stats(object).Centroid;
Image Analyst on 10 Jul 2016
It looks like your skin detection is all messed up. Whoever told you to use graythresh() for finding skin tone colored blobs in your image is mistaken. You need to customize your threshold to use fairly fixed thresholds. graythresh() tries to automatically find a threshold based on what's there and it can get confused if there is not enough skin tone, or too much, or the presence of other colors. Try the Color Thresholder app on the Apps tab of the tool ribbon to home in on the threshold you should use.