How can I detect basic 2D geometric shapes (e.g. s

2019-03-15 19:20发布

After taking a picture, I'm trying to detect the shape of the object that is shot. What I'm looking for is similar to face detection, except I want the app to detect shapes instead of faces. I'm creating an Android app using Java and the android SDK. Any Ideas on what libraries or resources I can access to do this sort of thing?

2条回答
戒情不戒烟
2楼-- · 2019-03-15 19:33

I'd use the edge detection filter in marvin processing. http://marvinproject.sourceforge.net/en/plugins/edgeDetector.html

Then go through the pixels, seach for dark pixels in the vicinity and store the lines you have found. Then you can check for intersections in the lines. Group intersecting lines together and check the angles of intersection. That should at least give you a starting point for polygons.

查看更多
啃猪蹄的小仙女
3楼-- · 2019-03-15 20:00

You might want to check out processing.org, also make your question a little less "Do this for me". http://www.processing.org has several facilities to do this. Even better is http://marvinproject.sourceforge.com which can do it in real time for video!

查看更多
登录 后发表回答