This content has been marked as final. Show 5 replies
There are several posible approaches. It gets trickier depending on how ambiguous the image is likely to be.
One I've used recently is to scan a 4 x 4 box over the image classifying each box into states like "top left corner", "left vertical side", "edge crossing" etc. and hooking them up into polygons accordingly. Or you could have a small window actually follow an edge arround the picture.
Inevitably though you're going to wind up with polygons or paths which you will then probably have to further classify.
for finding circles/ elipses you may want to consider performing a Circle Hough transform (either
in the real or frequency domain). This is a very robust algorithm that can handle partial occlusions.
Its a bit slow though. (Basically it can be implemented as a convolution). Better performance is
often obtained if yourun an edge enchancement filter (a high pass filter) over your image before
performing the circle hough transform.
The result of the Hough transform is an image in which the largest values correspond to the
centre points of circles that match your template/pattern and their mangatude is proportional to
the size of the circle that was matched.
I've been working on cleaning up the image before looking for the circles and testing it against an applet (mark someone's... it's easy enough to find in a google).
It's great for what I want, but now I'd like to move past this stage which means I need code to incorporate into my own app. I don't really want to use the code from the applet - it doesn't start with a buffered image, it uses a mediatracker which requires a component and as I understand it that means I can't use it in a console app... etc and basically his code is too bloated for me to understand and slim down.
Can you (anyone) offer me a simple implementation of a circle Hough transform starting with a BufferedImage? I'm really after something that's specifically just the HT so I can get my head around the basic concepts before I start optimising it.
Very grateful for any help, thanks!