开发者

OpenCV - How to detect marker with alpha channel

I want to detect custom forms like crosses. I tried to use matchTemplate, but the background color of the marker is not always the same. If I use a alpha channel in a marker png, I don't get a good result. Maybe I have to set up a ROI? What is a good way to de开发者_如何学Ctect this forms?


Have you considered using another color space where foreground and background are better separated?

  • use grayscale version if your markers are typically brighter than background
  • convert to HSV space and then only use Saturation and Value, e.g. if you have white markers on colored background

matchTemplate() does not work with a mask ("foreground-only" template).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜