how to detect shapes in an image?

前端 未结 2 383
眼角桃花
眼角桃花 2021-01-04 21:49

I want to detect a circle, rectangle shaped object in an image and read the information from that object. Is there any api in java which will be helpful to me?

Ex: D

相关标签:
2条回答
  • 2021-01-04 21:49

    Circles are perfect targets for the Hough transform. Check this out Detect circles with HT and OpenCV

    Rectangles are a bit harder since the Hough Transform is not rotation invariant. You can go into edge detection and fast fitting (Fast line and rectangle detection by clustering and grouping)

    0 讨论(0)
  • 2021-01-04 22:09

    Here's an answer to a similar question for C++.

    For Java, you can use the OpenCV wrappers. However, once you understand the essence of the approach you should be able to solve your problem using whichever framework is available.

    0 讨论(0)
提交回复
热议问题