Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Unwanted autocrop in video feed

Hi guys,

I'm using a specialized camera which runs from the uEye Cockpit. The feed looks like follows:

alt text

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;

}