c++ - Program does not proceed - OpenCV related -


I got OpenCV to work at the end, but I had to face a problem where my program does not grow ( No results). The result of the program should be an image in a new window. Snippet: #include & lt; Opencv2 / core / core.hpp & gt; #include & lt; Opencv2 / highgui / highgui.hpp & gt; # Include & lt; Iostream & gt; Using namespace cv; using namespace std; Int main (int argc, char ** argv) {if (argc! = 2) {cout & lt; & Lt; "Usage: display_image imageToLoadAndDisplay" & lt; & Lt; Endl; Return -1; } Mat image; Image = imed (RGR [1], IMRADADOLOR); // Read the file (! Image.data) // Check for invalid input {cout & lt; & Lt; "Image could not be opened or found" & lt; & Lt; Std :: endl; Return -1; } Named window ("display window", WINDOW_AUTOSIZE); // Create a window for display imshow ("display window", image); // Show our image inside waitKey (0); // Wait for a keystroke in window return 0; }

Point is a program that successfully creates, but when I debug it, nothing happens. I tried to get started without debugging (ctrl + F5, I'm using MSVisual2012) and that has been raised: Enter image details here

How can I fix this? Is it linked to a bad library?

Output "Usage: Display_Image ImageTolled Endspeplay", which means the file does not get the name of the program Can:

  1. image = imread ("C: \ myfile.jpg", IMREAD_COLOR); (and delete the previous lines)

  2. Open the terminal, cd in the executable dior and yourprogram to run Exe myfile.jpg



Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -