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 .
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!