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
@@ -11,10 +11,10 @@ def main(argv):
* [ESC] -> Close program
""")
## [load]
filename = argv[0] if len(argv) > 0 else "../data/chicky_512.png"
filename = argv[0] if len(argv) > 0 else 'chicky_512.png'
# Load the image
src = cv.imread(filename)
src = cv.imread(cv.samples.findFile(filename))
# Check if image is loaded fine
if src is None: