1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

samples: use findFile() in "python"

This commit is contained in:
Alexander Alekhin
2018-11-14 18:56:21 +03:00
committed by Alexander Alekhin
parent 9ea8c775f8
commit c371df4aa2
69 changed files with 179 additions and 173 deletions
@@ -31,10 +31,10 @@ def morphology_operations(val):
cv.imshow(title_window, dst)
parser = argparse.ArgumentParser(description='Code for More Morphology Transformations tutorial.')
parser.add_argument('--input', help='Path to input image.', default='../data/LinuxLogo.jpg')
parser.add_argument('--input', help='Path to input image.', default='LinuxLogo.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)