Unwanted autocrop in video feed
Hi guys,
I'm using a specialized camera which runs from the uEye Cockpit. The feed looks like follows:
The top is the original feed, and the one below is the feed from OpenCV (I'm using v3.0.0).
Can this be rectified? I want the feed to be similar to the top.
I'm using just a simple camera feed code as follows:
#include <opencv2\highgui.hpp>
#include <opencv2\videoio.hpp>
#include <opencv2\imgcodecs.hpp>
#include "opencv2/imgproc/imgproc.hpp"
#include <opencv2/opencv.hpp>
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <math.h>
//#include <stdafx.h>
//ADD this to disable OpenCL explicitly
#include <opencv2\core\ocl.hpp>
// make sure you use the OpenCV namespace
using namespace cv;
using namespace std;
int main()
{
// Disable OpenCL explicitly here
cout << CV_VERSION ;
ocl::setUseOpenCL(false);
VideoCapture capture(0);
Mat current_frame;
capture >> current_frame;
while (1) {
capture >> current_frame;
if (current_frame.empty()) break;
imshow("Normal", current_frame);
int key = waitKey(33) && 0xFF;
if (key == 27) break;
}
return 0;
}
please update it to latest 3.4.7 or 4.1.1, even. a lot has changed with the VideoCapture code in the last 3 years (!)
after that, try again with
OPENCV_VIDEOIO_DEBUG=1
set in your environment (so you see, wat backends are available / used on your machine), and try various flags forVideoCapture capture(0, CAP_XXXX);
(i.e. DSHOW might have better driver support for your hw, than MSMF or such)Thanks berak. Will update soon.