Is there an OpenCV function to draw an image over another image?
I have one big image of Mat
type.
And I have a small image of Mat
type (5x7<
Create a Region Of Interest within the big image and then copy the small image to that region:
cv::Rect roi( cv::Point( originX, originY ), cv::Size( width, height ));
cv::Mat destinationROI = bigImage( roi );
smallImage.copyTo( destinationROI );
If you are certain the small image fits into the big image then you could simply do:
cv::Rect roi( cv::Point( originX, originY ), smallImage.size() );
smallImage.copyTo( bigImage( roi ) );