1 | initial version |
Yes it is possible! You simply have to paste your overlay into the image, with the bounding rectangle as a region of interest. An example on how to do so can be seen here, where they use this to build snapchat filters.
2 | No.2 Revision |
Yes it is possible! You simply have to paste your overlay into the image, with the bounding rectangle as a region of interest.
A quick code example
Mat original_image;
Mat overlay;
Rect ROI; // your bounding box of the detection
resize(overlay, overlay, Size(ROI.height, ROI.width));
overlay.copyTo( original_image(ROI) );
An example on how to do so can be seen here, where they use this to build snapchat filters.