Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

play video within video

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);

play video within video

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> 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);

play video within video

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);

If I would like to play replace1.avi instead of displaying replace1.jpg how can it be possible?

play video within video

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);

If I would like to play replace1.avi instead of displaying replace1.jpg how can it be possible?image description