Finding shapes in an image using opencv

后端 未结 2 1730
夕颜
夕颜 2020-12-15 01:27

I\'m trying to look for shapes in an image using OpenCV. I know the shapes I want to match (there are some shapes I don\'t know about, but I don\'t need to find them) and t

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-15 02:02

    Have you try Chamfer Matching or contour matching (correspondence) using CCH as descriptor.

    Chamfer matching is using distance transform of target image and template contour. not exactly scale invariant but fast.

    The latter is rather slow, as the complexity is at least quadratic for bipartite matching problem. on the other hand, this method is invariant to scale, rotation, and probably local distortion (for approximate matching, which IMHO is good for the bad example above).

提交回复
热议问题