문제

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

도움이 되었습니까?

해결책

Check this code snippet,

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

Fore more info read here

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top