mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 15:23:05 +04:00
samples: use findFile() in "python"
This commit is contained in:
committed by
Alexander Alekhin
parent
9ea8c775f8
commit
c371df4aa2
@@ -26,10 +26,10 @@ def thresh_callback(val):
|
||||
|
||||
# Load source image
|
||||
parser = argparse.ArgumentParser(description='Code for Finding contours in your image tutorial.')
|
||||
parser.add_argument('--input', help='Path to input image.', default='../data/HappyFish.jpg')
|
||||
parser.add_argument('--input', help='Path to input image.', default='HappyFish.jpg')
|
||||
args = parser.parse_args()
|
||||
|
||||
src = cv.imread(args.input)
|
||||
src = cv.imread(cv.samples.findFile(args.input))
|
||||
if src is None:
|
||||
print('Could not open or find the image:', args.input)
|
||||
exit(0)
|
||||
|
||||
Reference in New Issue
Block a user