VideoCapture cap(pipe);
if(!cap.isOpened()){
cout << "Error opening video stream or file" << endl;
return -1;
}
while(1){
Mat frame;
cap >> frame;
if (frame.empty())
break;
cout << frame.channels()<<endl;
//resize(frame,frame,Size(320,200));
imshow( "Frame", frame );
char c=(char)waitKey(25);
if(c==27)
break;
}
cap.release();
destroyAllWindows();
As a result I get frame with 1 channel, but it works. How do I get colored image, as it appears in input stream ? (If I put EGL sink in the end, I see color videostream).
Advice from your second link doesn’t work unfortunately, because it refers to nvvidconv, which is not found. Also tried flip-method=2, and it also doesn’t help.