开发者

I would like to overlay 2 images on top of each other for registration matching, but

开发者 https://www.devze.com 2023-04-02 13:28 出处:网络
the part that gets complic开发者_如何学Goated for me, is that i want one to be RGB and the other in grayscale. I\'ve seen on this website that it can be done with OpenCV and the AddWeighted function.

the part that gets complic开发者_如何学Goated for me, is that i want one to be RGB and the other in grayscale. I've seen on this website that it can be done with OpenCV and the AddWeighted function. The problem is that it only works for 2 images of the same kind, and i would like to mix (color and grayscale). Any help will be greatly appreciated.


Convert your RGB image to grey, then do the matching:

Mat rgb_image, rgb_now_grey;
Mat grey_image;
grey_image = imgread("grey.png");
rgb_image = imread("colour.png");
cvtColor(rgb_image, rgb_now_grey, CV_RGB2GRAY);

// register_images(rgb_now_grey, grey_image);
0

精彩评论

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