Answer the question
In order to leave comments, you need to log in
Why is opencv splitting an image into parts?
then opencv, when capturing an image from a webcam, divides it into 2 parts, and it turns out that the lower part of the image is on top and the upper one is on the bottom?
#include <opencv2/opencv.hpp>
#include <iostream>
using namespace std;
using namespace cv;
int main(){
VideoCapture vcap(0);
if(!vcap.isOpened()){
cout << "Error opening video stream" << endl;
return -1;
}
namedWindow("Frame",cv::WINDOW_NORMAL);
for(;;){
Mat frame;
vcap.read(frame);
imshow( "Frame", frame );
char c = (char)waitKey(33);
if( c == 27 ) break;
}
return 0;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question