You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 6, 2023. It is now read-only.
% take an image file and return the recognized gestures
function [gesture, location] = recognizeGesture(fileName) % fileName: the image file
img = imread(fileName); % read in the file, must be in the same directory
gestureImg = im2bw(imresize(img, 4160/size(img, 2)*0.1), 0.5); % reduce to binary, "4160" part just make sure that the video can also be reduced properly (not too small).
[trimedGestureImg, t, b, l, r] = imtrim(gestureImg); % call imtrim to get the trimmed gesture, and centroid
fingerCount = countFinger(trimedGestureImg); % now count the number of fingers