Effacer les filtres
Effacer les filtres

How to apply viola-john algorithm after extraction of skin region from original image?

1 vue (au cours des 30 derniers jours)
Usman
Usman le 21 Août 2015
I have completed extraction of skin region, but unable to apply exact viola-john algorithm on it to achieve the face detection part. code is stated below: I=imread('k001.jpg'); figure,imshow(I);
%%%skin region in rgb image%% if(size(I, 3) > 1) final_image = zeros(size(I,1), size(I,2)); for i = 1:size(I,1) for j = 1:size(I,2) R = I(i,j,1); G = I(i,j,2); B = I(i,j,3);
if(R > 95 && G > 40 && B > 20) v = [R,G,B]; if((max(v) - min(v)) > 15) if(abs(R-G) > 15 && R > G && R > B)
%it is a skin final_image(i,j) = 1; end end end end end end %%% added figure, imshow(final_image); disp('before'); BW=final_image; %else % BW=im2bw(I); % figure, imshow(BW); %end L=bwlabel(BW,4); BB=regionprops(L,'BoundingBox'); BB1=struct2cell(BB); BB2=cell2mat(BB1); [s1,s2]=size(BB2); facedetect=vision.CascadeObjectDetector; after this part unable to apply viola john algorithm for face detection on extracted skin region. extracted skin region result is attached. Kindly help in completing it. thankyou

Réponses (0)

Catégories

En savoir plus sur Feature Detection and Extraction dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by