I would like to overlay 2 images on top of each other for registration matching, but
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);
精彩评论