# Revision history [back]

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.

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.