Question

I was using one of the opencv laplacian blend technic to merge 2 images by following this code

http://www.morethantechnical.com/2011/11/13/just-a-simple-laplacian-pyramid-blender-using-opencv-wcode/

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

Was it helpful?

Solution

Check this code snippet,

Mat_<Vec3f> blend;//fill it 
Mat dst = Mat(blend);

Fore more info read here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top