I am using vision.CascadeObjectDetector to count no. of faces in an image, however it is not counting all the faces. Any help would be appreciated .
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
So, below is my code to count number of faces using vision.CascadeObjectDetector but it isn't counting all the faces in the image. Kindly help.
a=imread ('images.jpg');
imshow (a)
size (a)
face_detector= vision.CascadeObjectDetector();
bbox= step(face_detector, a);
b= insertObjectAnnotation( a,'rectangle', bbox, 'face');
imshow(b), title( 'detected faces' );
n= size(bbox,1);
str_n= num2str(n);
str= strcat( 'Number of faces are ', str_n);
display(str);
0 Commenti
Risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!