Anuphong Preedayen
Anuphong Preedayen

Reputation: 11

C++ Need Help about code from OpenCV Tutorials

So, I just tried to run the code from this tutorial http://docs.opencv.org/master/d1/dc5/tutorial_background_subtraction.html#gsc.tab=0 on my machine but when I run the command prompt show up and terminate itself immediately and the problem I think is coming from this:

if (argc != 3) {
    cerr << "Incorret input list" << endl;
    cerr << "exiting..." << endl;
    return EXIT_FAILURE;
}`

and in output window it shows this message

***** VIDEOINPUT LIBRARY - 0.1995 - TFW07 *****

The program '[26932] ConsoleApplication7.exe' has exited with code 1 (0x1).

Can anyone tell me how can I fix it? I'm using visual studio 2013 and OpenCV 3.0.

Upvotes: 0

Views: 618

Answers (1)

Wajih
Wajih

Reputation: 791

This means the code is telling you to pass three arguments to your program. Read the documentation, where it clealry is giving an example... "./bs -vid video.avi"

In visual studio, you need to pass three arguments to the command line Visual Studio 2013, right-click the project, choose properties, go to the Debugging section and you will fine there is a box for command line arguments.

Upvotes: 1

Related Questions