1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +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
+3 -3
View File
@@ -5,7 +5,7 @@ This example illustrates how to use cv.HoughCircles() function.
Usage:
houghcircles.py [<image_name>]
image argument defaults to ../data/board.jpg
image argument defaults to board.jpg
'''
# Python 2/3 compatibility
@@ -21,9 +21,9 @@ if __name__ == '__main__':
try:
fn = sys.argv[1]
except IndexError:
fn = "../data/board.jpg"
fn = 'board.jpg'
src = cv.imread(fn, 1)
src = cv.imread(cv.samples.findFile(fn))
img = cv.cvtColor(src, cv.COLOR_BGR2GRAY)
img = cv.medianBlur(img, 5)
cimg = src.copy() # numpy function