First time here? Check out the FAQ!
answered 2018-07-23 04:16:13 -0600
Use copyTo :
overlappedIm = im1.clone(); im2.copyTo(im1,mask);
updated 2018-07-23 04:52:24 -0600
overlappedIm = im1.clone(); im2.copyTo(im1,mask); im2.copyTo(overlappedIm ,mask);