Dear All, 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 https://gist.github.com/769847 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 whitedot. 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 │ http://narendrasisodiya.com └─────────────────────────┘
_______________________________________________ Image-SIG maillist - Image-SIG@python.org http://mail.python.org/mailman/listinfo/image-sig