In this opencv program we will extract frames (images from the video file or camera and show it in a continuous loop. https://www.snaptubeapp.com/ capture the sound from a video file or a microphone. //Uncomment the following line if you are compiling this code in Visual Studio #include "stdafx.h" #include <opencv2/opencv.hpp> #include <iostream> using namespace cv; using namespace std; int main(int argc, char* argv[]) { //open the video file for readings VideoCapture cap("C:/Users/GitHub/ /Sample1/HellowWorldAPP/ /Archive/01Video_PlayVideoFromCamera/20151105150422.mp4"); // if not success, exit program if (cap.isOpened() == false) { cout << "Cannot open the video file" << endl; cin.get(); //wait for any key press return -1; } //Uncomment the following line if you want to start the video in the middle //cap.set(CAP_PROP_POS_MSEC, 300); //get the frames rate of the video double fps =...
Comments
Post a Comment