opencv/samples/cpp
float13 1accf3b3f4 Tutorial - Make required input args positional.
I think it would help to change all 3 of the the input file arguments to be "positional" for consistency with the other tutorials. This also simplifies the command line input to run this tutorial by reducing typing, and helpfully prints the "usage" info if any of the 3 required inputs are missing.

I'm new to OpenCV and working through the tutorials. I kept getting runtime errors with this one until I realized that the arguments weren't positional, and I was missing the "--input1", "--input2, "--input3" flags preceding the filenames. All of the previous tutorials had required filenames as positional arguments and didn't require this.

The original code would require each input to be specified like this:
./compareHist_Demo --input1 filename1 --input2 filename2 --input3 filename3 

But with this change, the above command is simplified to:
./compareHist_Demo  filename1 filename2 filename3

This avoids a confusing runtime error to make things simpler for newcomers like me :)
2019-10-23 13:07:52 +03:00
..
example_cmake cmake(samples): use LINK_PRIVATE in target_link_libraries 2019-05-15 18:38:00 +03:00
tutorial_code Tutorial - Make required input args positional. 2019-10-23 13:07:52 +03:00
3calibration.cpp Implementation of bit-exact resize. Internal calls to linear resize updated to use bit-exact version. (#9468) 2017-12-13 15:00:38 +03:00
application_trace.cpp Update Samples 2019-09-05 01:10:51 +03:00
bgfg_segm.cpp samples: use findFile() in "cpp" 2018-11-16 18:08:22 +00:00
calibration.cpp samples: use findFile() in "cpp" 2018-11-16 18:08:22 +00:00
camshiftdemo.cpp Added comments to clarify sample code 2016-08-09 18:08:58 +03:00
cloning_demo.cpp samples: use findFile() in "cpp" 2018-11-16 18:08:22 +00:00
cloning_gui.cpp samples: use findFile() in "cpp" 2018-11-16 18:08:22 +00:00
CMakeLists.txt core: support SIMD intrinsics in user code 2019-07-19 20:33:32 +00:00
connected_components.cpp samples: use findFile() in "cpp" 2018-11-16 18:08:22 +00:00
contours2.cpp update cpp samples and tutorials 2016-06-26 20:55:00 +03:00
convexhull.cpp update samples: waitKey() usage 2016-12-15 15:39:47 +03:00
cout_mat.cpp Misc. ./samples typos 2018-02-08 05:52:08 -05:00
create_mask.cpp samples: use findFile() in "cpp" 2018-11-16 18:08:22 +00:00
dbt_face_detection.cpp samples: use findFile() in "cpp" 2018-11-16 18:08:22 +00:00
delaunay2.cpp Misc. ./samples typos 2018-02-08 05:52:08 -05:00
demhist.cpp Update Samples 2019-09-05 01:10:51 +03:00
detect_blob.cpp samples: use findFile() in "cpp" 2018-11-16 18:08:22 +00:00
detect_mser.cpp Merge pull request #14122 from Sheel-Patel:patch-1 2019-04-24 01:45:27 +03:00
dft.cpp Update Samples 2019-09-05 01:10:51 +03:00
digits.cpp Added C++ version of digits.py. 2019-04-13 22:29:30 -07:00
distrans.cpp samples: use findFile() in "cpp" 2018-11-16 18:08:22 +00:00
drawing.cpp some improvements on tutorials 2017-07-29 20:08:19 +03:00
edge.cpp samples: use findFile() in "cpp" 2018-11-16 18:08:22 +00:00
em.cpp Updated ml module interfaces and documentation 2015-02-17 11:46:14 +03:00
facedetect.cpp Update Samples 2019-09-05 01:10:51 +03:00
facial_features.cpp samples: use findFile() in "cpp" 2018-11-16 18:08:22 +00:00
falsecolor.cpp Update Samples 2019-09-05 01:10:51 +03:00
fback.cpp update cpp samples and tutorials 2016-06-26 20:55:00 +03:00
ffilldemo.cpp samples: use findFile() in "cpp" 2018-11-16 18:08:22 +00:00
filestorage.cpp samples: use findFile() in "cpp" 2018-11-16 18:08:22 +00:00
fitellipse.cpp samples: use findFile() in "cpp" 2018-11-16 18:08:22 +00:00
grabcut.cpp samples: use findFile() in "cpp" 2018-11-16 18:08:22 +00:00
image_alignment.cpp samples: use findFile() in "cpp" 2018-11-16 18:08:22 +00:00
image.cpp samples: use findFile() in "cpp" 2018-11-16 18:08:22 +00:00
imagelist_creator.cpp update cpp samples and tutorials 2016-06-26 20:55:00 +03:00
imagelist_reader.cpp Merge pull request #13188 from alalek:samples_rename 2018-11-17 00:35:05 +03:00
inpaint.cpp Update Samples 2019-09-05 01:10:51 +03:00
intersectExample.cpp Add documentation and example program for intersectConvexConvex 2019-10-19 22:08:07 -07:00
kalman.cpp update cpp samples and tutorials 2016-06-26 20:55:00 +03:00
kmeans.cpp Merge pull request #10258 from savuor:fix/kmeans_channels 2017-12-15 21:48:48 +03:00
laplace.cpp samples: use findFile() in "cpp" 2018-11-16 18:08:22 +00:00
letter_recog.cpp samples: use findFile() in "cpp" 2018-11-16 18:08:22 +00:00
lkdemo.cpp Merge pull request #9618 from vipinanand4:goodFeaturesToTrack_added_gradiantSize 2017-09-22 14:04:43 +00:00
logistic_regression.cpp samples: use findFile() in "cpp" 2018-11-16 18:08:22 +00:00
mask_tmpl.cpp samples: use findFile() in "cpp" 2018-11-16 18:08:22 +00:00
matchmethod_orb_akaze_brisk.cpp docs: fix links 2019-04-04 18:57:22 +03:00
minarea.cpp samples: use findFile() in "cpp" 2018-11-16 18:08:22 +00:00
morphology2.cpp samples: use findFile() in "cpp" 2018-11-16 18:08:22 +00:00
neural_network.cpp Issue 6780 2016-07-07 09:29:41 +02:00
npr_demo.cpp samples: use findFile() in "cpp" 2018-11-16 18:08:22 +00:00
opencv_version.cpp Minor refactoring in several C++ samples: 2018-03-06 14:23:20 +03:00
pca.cpp refactoring catching all exceptions as const ref 2018-11-08 19:59:47 +03:00
peopledetect.cpp Update Samples 2019-09-05 01:10:51 +03:00
phase_corr.cpp update samples: waitKey() usage 2016-12-15 15:39:47 +03:00
points_classifier.cpp samples: use findFile() in "cpp" 2018-11-16 18:08:22 +00:00
polar_transforms.cpp Update Samples 2019-09-05 01:10:51 +03:00
qrcode.cpp Update Samples 2019-09-05 01:10:51 +03:00
segment_objects.cpp samples: use findFile() in "cpp" 2018-11-16 18:08:22 +00:00
select3dobj.cpp samples: use findFile() in "cpp" 2018-11-16 18:08:22 +00:00
shape_example.cpp Misc. ./samples typos 2018-02-08 05:52:08 -05:00
simd_basic.cpp core: support SIMD intrinsics in user code 2019-07-19 20:33:32 +00:00
smiledetect.cpp Update Samples 2019-09-05 01:10:51 +03:00
squares.cpp Update Samples 2019-09-05 01:10:51 +03:00
stereo_calib.cpp samples: use findFile() in "cpp" 2018-11-16 18:08:22 +00:00
stereo_match.cpp samples: use findFile() in "cpp" 2018-11-16 18:08:22 +00:00
stitching_detailed.cpp stitching_detailed: use correct match_conf default 2019-10-22 08:03:46 -04:00
stitching.cpp samples: use findFile() in "cpp" 2018-11-16 18:08:22 +00:00
train_HOG.cpp Update Samples 2019-09-05 01:10:51 +03:00
train_svmsgd.cpp samples: avoid using of legacy C-like API 2018-03-26 13:42:35 +03:00
travelsalesman.cpp Fixed compilation warnings in samples: 2018-02-12 18:42:36 +03:00
tree_engine.cpp update cpp samples and tutorials 2016-06-26 20:55:00 +03:00
tvl1_optical_flow.cpp samples: use findFile() in "cpp" 2018-11-16 18:08:22 +00:00
videocapture_basic.cpp samples: don't call twice of VideoCapture::open() 2018-06-11 23:17:49 +00:00
videocapture_camera.cpp samples: videocapture_camera use VideoCapture with 0 index 2018-07-03 15:44:53 +03:00
videocapture_gphoto2_autofocus.cpp FIx misc. source and comment typos 2019-08-15 13:09:52 +03:00
videocapture_gstreamer_pipeline.cpp samples: skip findFile() in encoding mode 2019-06-06 20:42:55 +00:00
videocapture_image_sequence.cpp Merge pull request #13188 from alalek:samples_rename 2018-11-17 00:35:05 +03:00
videocapture_intelperc.cpp Merge pull request #13188 from alalek:samples_rename 2018-11-17 00:35:05 +03:00
videocapture_openni.cpp Fix some typos 2019-06-05 12:24:13 +02:00
videocapture_starter.cpp Large update of videoio doc and samples following mshabunin comments 2016-09-09 18:46:11 +02:00
videostab.cpp samples: apply CV_OVERRIDE/CV_FINAL 2018-03-28 18:43:28 +03:00
videowriter_basic.cpp samples: avoid using of legacy C-like API 2018-03-26 13:42:35 +03:00
warpPerspective_demo.cpp Update Samples 2019-09-05 01:10:51 +03:00
watershed.cpp Update Samples 2019-09-05 01:10:51 +03:00