How can I detect basic 2D geometric shapes (e.g. square, triangle, circle) on a JPEG image?

前端 未结 2 880
暗喜
暗喜 2021-02-06 03:19

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 in

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-06 04:09

    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.

提交回复
热议问题