OpenCV, Python: How to stitch two images of different sizes and transparent backgrounds

孤人 提交于 2019-11-29 05:19:24

I think Flann is probably not what you want to use for matching here. First, indeed, since you're converting to grayscale, the black spots, the edges of the images, etc will likely be included in your feature set, which you do not want. Secondly, Flann uses methods to build specific descriptors for fast searching through an image database; it is used for CBIR, not for homography estimation.

Instead, just take a normal approach with SIFT or SURF or ORB or BRISK. Note that all of those allow to add a mask for their keypoint detection step, so that you can create a mask from the alpha channel to ignore keypoints in. See the OpenCV docs for SIFT and SURF and for ORB and BRISK for more.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!