OpenCV template matching and transparency

前端 未结 7 1230
春和景丽
春和景丽 2020-11-29 00:23

What\'s the way OpenCV handles transparency in image during template matching?

The problem is that the template image needs to have transparent parts, because in the

7条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-29 00:49

    I think you're trying to do what in OpenCV is called template matching with a mask. I think you could try setting a ROI (region of interest) on the template. This SO question shows how to do it. (note that in that question the ROI is set on the target image, not the template, but the procedure is the same).

提交回复
热议问题