I have tried all the solutions provided in the previous answers like reinstalling Visual studio, unchecking and checking the C++ tools but none of them helped to eliminate these errors.
My code is
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
using namespace cv;
using namespace std;
int main(int argc, char** argv)
{
if (argc != 2)
{
cout << " Usage: display_image ImageToLoadAndDisplay" << endl;
return -1;
}
Mat image;
image = imread(argv[1], CV_LOAD_IMAGE_COLOR); // Read the file
if (!image.data) // Check for invalid input
{
cout << "Could not open or find the image" << std::endl;
return -1;
}
namedWindow("Display window", WINDOW_AUTOSIZE);// Create a window for display.
imshow("Display window", image); // Show our image inside it.
waitKey(0); // Wait for a keystroke in the window
return 0;
}
These are the errors.
'OPENCVTest.exe' (Win32): Unloaded 'C:\Users\JOHN\Documents\Visual Studio 2015\Projects\OPENCVTest\x64\Debug\ucrtbased.dll'
'OPENCVTest.exe' (Win32): Unloaded 'C:\Users\JOHN\Documents\Visual Studio 2015\Projects\OPENCVTest\x64\Debug\ucrtbased.dll'
'OPENCVTest.exe' (Win32): Unloaded 'C:\Windows\System32\winmmbase.dll'
The thread 0x28d8 has exited with code -1 (0xffffffff).
The thread 0x3de4 has exited with code -1 (0xffffffff).
The thread 0x26fc has exited with code -1 (0xffffffff).
The thread 0x30f8 has exited with code -1 (0xffffffff).
The program '[4188] OPENCVTest.exe' has exited with code -1 (0xffffffff).
User contributions licensed under CC BY-SA 3.0