I have a very small simple function using opencv libraries which takes a source image and stamps it to a location on a destination image.
No matter why I try I am getting nowhere trying to update it to a c++ format. Here is the original.
void coriolus::stamp(IplImage * src, IplImage *dst, CvRect r)
{
IplImage * mask = cvCloneImage(src);
cvNot(mask,mask);
cvSetImageROI(dst, r);
cvCopy(src,dst,mask);
cvResetImageROI(dst);
cvReleaseImage(&mask);
}
I actually thought it would be something simple like
void stamp(Mat src, Mat dst, Rect r) { Mat mask = src.clone(); bitwise_not(mask,mask); dst.adjustROI( Rect(r) ); src.copyTo(dst,mask); }
what am I missing?