C++ Place an image on top of another image in a certain location -
i'm looking way place on image on top of image @ set location.
i have been able place images on top of each other using cv::addweighted
when searched particular problem, there wasn't posts find relating c++
.
quick example:
200x200
red square & 100x100
blue square
&
blue square on red square @ 70x70
(from top left corner pixel of blue square)
you can create mat points rectangular region of original image , copy blue image that:
mat bigimage = imread("redsquare.png", -1); mat lilimage = imread("bluesquare.png", -1); mat insetimage(bigimage, rect(70, 70, 100, 100)); lilimage.copyto(insetimage); imshow("overlay image", bigimage);
Comments
Post a Comment