Counting people by face detection
3 次查看(过去 30 天)
显示 更早的评论
Hello,
So far I have detected the faces with a bounding box around people faces. I was looking for a way to count the number of boxes appeared in the video as to return the number of people. Is there anyway to do this? Thank you.
2 个评论
Assylbek Kossov
2018-4-10
Hi, Were you succesfull if so could send the code please? I am a beginner who is stuck with this task
Harshveer Singh
2020-4-29
编辑:Walter Roberson
2020-4-29
After insering annotations, use a string to count the number of faces. This can be done as follows-
n= size (bbox,1); %bbox is the bounding box & 1 represents the no. of rows in bounding box
str_n= num2str(n);
str= strcat( 'number of faces are ', str_n);
display(str);
采纳的回答
Image Analyst
2016-1-29
编辑:Image Analyst
2016-1-29
How did you do it? If you did it with bwlabel or beconncomp, you can get it from the return argument(s). If you used the Computer Vision System Toolbox example, I'm sure it's one of the returned properties.
see Brett's blog: http://blogs.mathworks.com/pick/2014/03/14/detecting-faces-in-images/?s_tid=answers_rc2
Also see this by Dima Lisin, the developer of the toolbox: http://blogs.mathworks.com/pick/2015/09/11/detect-and-track-multiple-faces/?s_tid=answers_rc2
0 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!