问题
I am trying to learn about simple shape detection for a project I'm working on.
I have an image that is made of only black and white pixels and I need to detect shapes within the image, such as squares and ellipses. I also need to find the bounding boxes of the shapes.
I have been searching online and reading articles but I can't find any good explanations of where to start.
I am also looking for some partial/complete code examples preferably in Java or C++.
Thanks!
回答1:
There's a few different ways of doing edge detection, one of the ways is called Canny Edge Detection
. Check out this website which has a Java implementation of the algorithm that has been released to the public domain.
回答2:
I'm not aware of a library or toolkit that makes this kind of operation trivial but if you really want to understand how this kind of logic works, start here http://opencv.willowgarage.com/wiki/
来源:https://stackoverflow.com/questions/8059831/simple-shape-detection-in-a-1bpp-image