• 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
..
android Loading commit data...
cpp Loading commit data...
data Loading commit data...
directx Loading commit data...
dnn Loading commit data...
gpu Loading commit data...
hal Loading commit data...
java Loading commit data...
opencl Loading commit data...
opengl Loading commit data...
openvx Loading commit data...
python Loading commit data...
tapi Loading commit data...
va_intel Loading commit data...
winrt Loading commit data...
winrt_universal Loading commit data...
wp8 Loading commit data...
CMakeLists.example.in Loading commit data...
CMakeLists.txt Loading commit data...
_winpack_build_sample.cmd Loading commit data...
_winpack_run_python_sample.cmd Loading commit data...
samples_utils.cmake Loading commit data...