Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
After I get an int value for the amount of circles in an image detected; how would I go about cropping the image based on a density values for a certain area of higher circle concentration then others on the image.

example passport image, the highest density of circles would be around the word passport, how would I crop that piece of the image and resize if needed?

any article or snippets would help, Thanks in advance.
Posted
Comments
Sergey Alexandrovich Kryukov 18-Aug-14 1:26am    
Puzzled, I took a passport and examined it. Believe or not, I did not find a single circle on the image printed in it, moreover, even though there is a word "passport" in it, there was nothing like that on an image. :-)
It's hard to understand what are you talking about.
—SA
@SkyHigh34 18-Aug-14 16:18pm    
Using an edge detector to preprocess an image for OCR, when I apply the edge detector method, whit-in the processed image there are circles identifying the edges of characters. I am trying to crop the image where the highest density of the circle within the image.

Thanks
Sergey Alexandrovich Kryukov 18-Aug-14 16:28pm    
So, you mean not a circle, but an area which is only topologically circular. But it may be the case, as the image is rarely contrast enough. More typically, it would be incomplete circle, which would make the problem much harder. If the image is contrast enough (you can perform some contrast transformations), the blob analysis could work for you. You should understand one things: "contours" perceived by a human are usually partially imaginary, they do not exist in real image, the brain gust "suggests" drawing them, which is driven be an imprinted conception of the object (is it a human head, a photograph?)
Also, you may be better of starting from recognition of eyes.
This way or another, the problem is tricky.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900