samples: use findFile() in "python"
This commit is contained in:
committed by
Alexander Alekhin
parent
9ea8c775f8
commit
c371df4aa2
@@ -5,11 +5,11 @@ import numpy as np
|
||||
|
||||
def main(argv):
|
||||
## [load]
|
||||
default_file = "../../../../data/smarties.png"
|
||||
default_file = 'smarties.png'
|
||||
filename = argv[0] if len(argv) > 0 else default_file
|
||||
|
||||
# Loads an image
|
||||
src = cv.imread(filename, cv.IMREAD_COLOR)
|
||||
src = cv.imread(cv.samples.findFile(filename), cv.IMREAD_COLOR)
|
||||
|
||||
# Check if image is loaded fine
|
||||
if src is None:
|
||||
|
||||
Reference in New Issue
Block a user