• float13's avatar
    Tutorial - Make required input args positional. · 1accf3b3
    float13 authored
    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 :)
    1accf3b3
Name
Last commit
Last update
..
HighGUI Loading commit data...
Histograms_Matching Loading commit data...
ImgProc Loading commit data...
ImgTrans Loading commit data...
ShapeDescriptors Loading commit data...
TrackingMotion Loading commit data...
calib3d Loading commit data...
core Loading commit data...
features2D Loading commit data...
gpu Loading commit data...
imgcodecs/GDAL_IO Loading commit data...
introduction Loading commit data...
ml Loading commit data...
objectDetection Loading commit data...
photo Loading commit data...
snippets Loading commit data...
video Loading commit data...
videoio Loading commit data...
viz Loading commit data...
xfeatures2D Loading commit data...