Click here to Skip to main content
15,891,895 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
%Detect objects using Viola-Jones Algorithm

%To detect Face
FDetect = vision.CascadeObjectDetector;

%Read the input image
I = imread('HarryPotter.jpg');

%Returns Bounding Box values based on number of objects
BB = step(FDetect,I);

figure,
imshow(I); hold on
for i = 1:size(BB,1)
rectangle('Position',BB(i,:),'LineWidth',5,'LineStyle','-','EdgeColor','r');
end
title('Face Detection');
hold off;
Posted
Comments
Albert Holguin 29-Jan-15 17:05pm    
What's the question?

1 solution

This is too much for a quick answer forum. Instead, check this out: Face Detection using MATLAB Part I[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900