Check this code snippet,
Mat_<Vec3f> blend;//fill it
Mat dst = Mat(blend);
Fore more info read here
Question
I was using one of the opencv laplacian blend technic to merge 2 images by following this code
The code uses Mat_< Vec3f> to store the resultant image. My question is how to convert back this resultant image into normal 8UC3 BGR image
I tried
blend.convertTo(blend, blend, CV_8U)
but that gives an error of assertion failed
I also tried creating a new color image of same size and then
blend.copyTo(newImage)
but that image has some parts colored, other parts gray
Solution