Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

How to count the number of heads in a group?

Asked by Sivakumaran Chandrasekaran on 24 Dec 2012

My input image consists of 100 mens standing straight. I have slightly aerial view of the image. Whats the method to count the number of heads?

Sivakumaran Chandrasekaran

Tags

3 Answers

Answer by Image Analyst on 24 Dec 2012

You know from your prior postings that it's always best to upload an image when asking advice on image processing. It only makes sense.

Lacking that about the only thing I can guess is to just do your basic image processing routine, which is

  1. Process image to get to an image that you can threshold
  2. threshold
  3. label
  4. regionprops

a process which I know you've done before. If the heads merge together you can try this algorithm by Steve to split some heads: http://blogs.mathworks.com/steve/2006/06/02/cell-segmentation/

0 Comments

Image Analyst
Answer by Sivakumaran Chandrasekaran on 25 Dec 2012

Thanks Image Analyst and Thanks Walter. Sorry for that Image Analyst. Initially i thought to upload image. Herewith I have mentioned the link for the image. Please check it.

http://tinypic.com/r/2njaur8/6

0 Comments

Sivakumaran Chandrasekaran
Answer by Image Analyst on 25 Dec 2012

I'd first try to find the faces by finding color that is face color. Then filter based on shape - get rid of long skinny things (the arms). It won't be perfect but you should be able to get most of them. See my image segmentation demo and my color segmentation demos if you need to know how to find colors or filter out objects based on their properties.

0 Comments

Image Analyst

Contact us