Hi forum,
I am having a problem trying to show multiple videos using openmp. Below is the code
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include "opencv2/imgproc/imgproc.hpp"
#include "omp.h"
#include <iostream>
using namespace cv;
using namespace std;
string Camera[2] = { "camA.avi", "camB.avi" };
int main(int argc, const char * argv[])
{
omp_set_num_threads(2);
Mat frame;
#pragma omp parallel private (frame)
{
VideoCapture capture;
int Thread = omp_get_thread_num();
capture.open(Camera[Thread]);
while (1){
capture.read(frame);
namedWindow(Camera[Thread], CV_WINDOW_NORMAL);
imshow(Camera[Thread], frame);
waitKey(1);
}
}
}
I just wanna be able to display both videos at the same time. Hope I can get some help. Thanks