skin_detect.m
function [out bin] = generate_skinmap(filename)if nargin > 1 | nargin < 1
error('usage: generate_skinmap(filename)');
end;
img_orig = imread(filename);
height = size(img_orig,1);
width = size(img_orig,2);
out = img_orig;
bin = zeros(height,width);
img = grayworld(img_orig);
img_ycbcr = rgb2ycbcr(img);
Cb = img_ycbcr(:,:,2);
Cr = img_ycbcr(:,:,3);
[r,c,v] = find(Cb>=77 & Cb<=127 & Cr>=133 & Cr<=173);
numind = size(r,1);
for i=1:numind
out(r(i),c(i),:) = [0 0 255];
bin(r(i),c(i)) = 1;
end
imshow(img_orig);
figure; imshow(out);
figure; imshow(bin);
end
run.m
clc;
skin_detect('sample.jpg');
Fantastic blog! I'm so glad to find your page.I really appreciated the concept that you have posted here. Thanks for sharing !
ReplyDeleteNice, thanks for sharing
ReplyDeletesir can you plz send me the code for real time hand gesture recoginition
ReplyDeletewhat function is grayworld?
ReplyDeleteThis comment has been removed by a blog administrator.
Deleteplease send the gesture recognition code to sudhakartime@gmail.com
ReplyDeletei try to implement this project in neural network but i can not
ReplyDeleteplease help me
Casino City | Visit Missouri Casino Hotel
ReplyDeleteCasino City is 전라남도 출장마사지 a destination hotel and casino in Lawrenceburg, MO. It is an entertainment baoji titanium destination located close to 전라남도 출장샵 Kansas 원주 출장안마 Speedway and 통영 출장안마 Kansas Speedway Opened: January 23, 2005