diff --git a/samples/cpp/image.cpp b/samples/cpp/image.cpp index 0e9702297f..677e1bca8f 100644 --- a/samples/cpp/image.cpp +++ b/samples/cpp/image.cpp @@ -9,11 +9,22 @@ using namespace cv; // all the new API is put into "cv" namespace. Export its co using namespace std; using namespace cv::flann; +void help() +{ + cout << + "\nThis program shows how to use cv::Mat and IplImages converting back and forth.\n" + "It shows reading of images, converting to planes and merging back, color conversion\n" + "and also iterating through pixels.\n" + "Call:\n" + "./image [image-name Default: lena.jpg]\n" << endl; +} + // enable/disable use of mixed API in the code below. #define DEMO_MIXED_API_USE 1 int main( int argc, char** argv ) { + help(); const char* imagename = argc > 1 ? argv[1] : "lena.jpg"; #if DEMO_MIXED_API_USE Ptr iplimg = cvLoadImage(imagename); // Ptr is safe ref-conting pointer class