Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

What are the five arguments in the 'How to build applications with OpenCV inside the Microsoft Visual Studio' sample code?

I'm following the instructions in How to build applications with OpenCV inside the Microsoft Visual Studio but I'm confused by the sample code.

When the author calls his built sample he or she uses the single argument exampleImage.jpg either supplied on the command line or set in the Property Pages, as I have done here

Setting Command Arguments in the property pages screenshot

But the first few lines of main in the sample code are:

help();
if (argc != 5)
{
    cout << "Not enough parameters" << endl;
    return -1;
}

i.e. the application requires five arguments. If the function requires five arguments then what are they and why is only one supplied? If the function only requires one argument what is this checking code for?

What are the five arguments in the 'How to build applications with OpenCV inside the Microsoft Visual Studio' sample code?

I'm following the instructions in How to build applications with OpenCV inside the Microsoft Visual Studio but I'm confused by the sample code.

When the author calls his built sample he or she uses the single argument exampleImage.jpg either supplied on the command line or set in the Property Pages, as I have done here

Setting Command Arguments in the property pages screenshot

But the first few lines of main in the sample code are:

help();
if (argc != 5)
{
    cout << "Not enough parameters" << endl;
    return -1;
}

i.e. the application requires five arguments. If the function requires five arguments then what are they and why is only one supplied? If the function only requires one argument then what is this checking code for?

click to hide/show revision 3
retagged

updated 2013-10-10 05:49:06 -0600

berak gravatar image

What are the five arguments in the 'How to build applications with OpenCV inside the Microsoft Visual Studio' sample code?

I'm following the instructions in How to build applications with OpenCV inside the Microsoft Visual Studio but I'm confused by the sample code.

When the author calls his built sample he or she uses the single argument exampleImage.jpg either supplied on the command line or set in the Property Pages, as I have done here

Setting Command Arguments in the property pages screenshot

But the first few lines of main in the sample code are:

help();
if (argc != 5)
{
    cout << "Not enough parameters" << endl;
    return -1;
}

i.e. the application requires five arguments. If the function requires five arguments then what are they and why is only one supplied? If the function only requires one argument then what is this checking code for?

What are the five arguments in the 'How to build applications with OpenCV inside the Microsoft Visual Studio' sample code?

I'm following the instructions in How to build applications with OpenCV inside the Microsoft Visual Studio but I'm confused by the sample code.

When the author calls his built sample he or she uses the single argument exampleImage.jpg either supplied on the command line or set in the Property Pages, as I have done here

Setting Command Arguments in the property pages screenshot

But the first few lines of main in the sample code are:

help();
if (argc != 5)
{
    cout << "Not enough parameters" << endl;
    return -1;
}

i.e. the application requires five arguments. If the function requires five arguments then what are they and why is only one supplied? If the function only requires one argument then what is this checking code for?

========== EDIT ==========

Actually the more I look at it the more confused I am by the sample code. The tutorial sample code purports to be about loading and displaying an image, but looking at the code listing it is all about videos and Gaussian functions. This tutorial is supposed to be the introduction to getting started with Visual Studio, linked to from the primary OpenCV Quick Start page, I cannot be the first person to try the code. Why is it so different from what it purports to be?

What are the five arguments in the 'How to build applications with OpenCV inside the Microsoft Visual Studio' sample code?

I'm following the instructions in How to build applications with OpenCV inside the Microsoft Visual Studio but I'm confused by the sample code.

When the author calls his built sample he or she uses the single argument exampleImage.jpg either supplied on the command line or set in the Property Pages, as I have done here

Setting Command Arguments in the property pages screenshot

But the first few lines of main in the sample code are:

help();
if (argc != 5)
{
    cout << "Not enough parameters" << endl;
    return -1;
}

i.e. the application requires five arguments. If the function requires five arguments then what are they and why is only one supplied? If the function only requires one argument then what is this checking code for?

========== EDIT 1 ==========

Actually the more I look at it the more confused I am by the sample code. The tutorial sample code purports to be about loading and displaying an image, but looking at the code listing it is all about videos and Gaussian functions. This tutorial is supposed to be the introduction to getting started with Visual Studio, linked to from the primary OpenCV Quick Start page, I cannot be the first person to try the code. Why is it so different from what it purports to be?

========== EDIT 2 ==========

I've submitted this as a documentation bug.

What are the five arguments in the 'How to build applications with OpenCV inside the Microsoft Visual Studio' sample code?

I'm following the instructions in How to build applications with OpenCV inside the Microsoft Visual Studio but I'm confused by the sample code.

When the author calls his the built sample he or she uses the single argument exampleImage.jpg either supplied on the command line or set in the Property Pages, as I have done here

Setting Command Arguments in the property pages screenshot

But the first few lines of main in the sample code are:

help();
if (argc != 5)
{
    cout << "Not enough parameters" << endl;
    return -1;
}

i.e. the application requires five arguments. If the function requires five arguments then what are they and why is only one supplied? If the function only requires one argument then what is this checking code for?

========== EDIT 1 ==========

Actually the more I look at it the more confused I am by the sample code. The tutorial sample code purports to be about loading and displaying an image, but looking at the code listing it is all about videos and Gaussian functions. This tutorial is supposed to be the introduction to getting started with Visual Studio, linked to from the primary OpenCV Quick Start page, I cannot be the first person to try the code. Why is it so different from what it purports to be?

========== EDIT 2 ==========

I've submitted this as a documentation bug.