O'Reilly logo

Learning OpenCV 3 Application Development by Samyak Datta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix A. Command-line Arguments in C++

When we started running our code on datasets of images, as opposed to a single image (or a handful of them), you learnt a neat trick. We could read the image names (image paths) off a file and then, once the image path is available to us, we could proceed with our usual image processing steps. So, the only thing that was left was to include the name of the file into our code and then pass it to the open() function of the ifstream class. And how did we do that (pass the filename to the code)? In some of the examples in this chapter, you would have come across something called command-line arguments that we used for this purpose. They are nothing but effective techniques used by all the programming languages ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required