I am trying to apply the Canny operator in a certain location of an image with the following code:
//region of interest from my RGB image Mat devilROI = img(
Easy. You do not have the same number of channels in the 2 images to merge.
cvtColor(devilROI, canny, CV_RGB2GRAY);
Is taking your 3 channel image and turning it into a 1 channel greyscale image. You need the same number of channels to use addWeighted