[Image-SIG] Locate The Center of WhiteDot from a Image
narendra at narendrasisodiya.com
Fri Jan 7 19:14:31 CET 2011
the given image has only two level. Pixel are either black or white.
See this image - http://www.flickr.com/photos/nsisodiya/5333747510/
Now, I want to locate the center of whitedot.
This can be done by locating the bounding box of white dot.
I have used following algorithm
This Code Look for bounding box which I am calculating by scanning each row
and column one by one. If I am finding any white pixel, I am including it
into my bounding box.
After this, I can calculating mid of box.
Now, Here is the problem with the code.
1) there may a change that 2 or more WhiteDOT may present. One is Big
whiedot and other are very smaller whitedot(just 2-3 pixel) near to this Big
So, I am getting bigger bounding box.
I want to get center based on density of whitepixel. basically center where
white pixel density is very high. Also, I am applying this algorithm on
every frame taken from camera at 2fps. So I want a high speed algorithm. PIL
must be having some function or trick to do it.
│ Narendra Sisodiya
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Image-SIG