Script vpdetector.py implements the method.
vpdetector.py takes up to 5 parameters (format: --parameterName value) and compulsory image path If a parameter is not submitted, default value is used.
python vpdetector.py -h
Detect vanishing points in jpg image.
positional arguments:
img Image jpg file
optional arguments:
-h, --help show this help message and exit
--cannyMin [CANNYMIN]
Canny edge detector: lower threshold [0, inf], default
100
--cannyMax [CANNYMAX]
Canny edge detector: upper threshold [0, inf], default
300
--houghTreshold [HOUGHTRESHOLD]
Hough t. threshold [0, inf], default 100
--houghMinLineLen [HOUGHMINLINELEN]
Hough t. min. line length [0, inf], default 50
--scoreThreshold [SCORETHRESHOLD]
Score threshold [0, 1], default 0.8
Example calls:
python vpdetector.py img "C:\Users\10250153\stack\vpoints\demo\5D4L1L1D_L.jpg" --cannyMin 80 --cannyMax 200 --houghTreshold 50 --houghMinLineLen 30 --scoreThreshold 0.8
python vpdetector.py img "C:\Users\10250153\stack\vpoints\demo\5D4L1L1D_L.jpg" --cannyMin 80 --houghTreshold 50 --houghMinLineLen 30 --scoreThreshold 0.75
All default parameter values
python vpdetector.py img "C:\Users\10250153\stack\vpoints\demo\5D4L1L1D_L.jpg"