Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Exodus to OpenCV 4 issues

Hi guys,

I have managed to initialize my OpenCV 4 using VS2019 pretty ok. Got a blank Mat to show for it.

When I was just trying to import my old code from OpenCV 3, the issue is unclear to me where I should be looking into.

Here's a simple code in OpenCV 3 which has always worked fine for me (and I included ALL the debug libraries in the additional dependencies):

int main()
{
    // Disable OpenCL explicitly here
    cout << CV_VERSION;

    //ocl::setUseOpenCL(false);
    cv::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;

}

And I got this error.

Severity Code Description Project File Line Suppression State Warning C26495 Variable 'cvflann::lsh::LshStats::bucket_size_max_' is uninitialized. Always initialize a member variable (type.6). OpenCV Test C:\OpenCV\OpenCV build\install\include\opencv2\flann\lsh_table.h 94

I'd appreciate it if someone can point me in the right direction here. Perhaps I'm using old API?

Thanks. Vizier87