OpenCV's fitEllipse() sometimes returns completely wrong ellipses

后端 未结 4 1027
轮回少年
轮回少年 2020-12-25 14:54

My goal is to recognize all the shapes present in an image. The idea is:

  1. Extract contours
  2. Fit each contour with different shapes
  3. The correct
4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-25 15:48

    It may be a better idea to get a pixel-by-pixel comparison i.e. what percentage is the overlap between the contour and the "fitted" ellipse.

    Another, simpler idea is to also compare the centroids of the contour and its ellipse fit.

提交回复
热议问题