how to detect shapes in an image?

前端 未结 2 384
眼角桃花
眼角桃花 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)

提交回复
热议问题