Here is my code which overlays an image ( replace1.jpg) on live camera feed. how can I play a video ( say .avi ) file in the specified area ? or what if I would like to play a sound ?
Mat repImage = imread("replace1.jpg"); vector<point2f> imagePoints = { Point2f(0, 0), Point2f(repImage.cols, 0), Point2f(repImage.cols, repImage.rows), Point2f(0, repImage.rows), };
Mat transmix = getPerspectiveTransform(imagePoints, newLEDPoints);
warpPerspective(repImage, cameraFeed, transmix, cameraFeed.size(), cv::INTER_LINEAR, cv::BORDER_TRANSPARENT);