提交 95550c25 编写于 作者: M Mike Maraya

test.py: Check if camera_calibration.tar.gz file exists before downloading it, opencv bug #3782

上级 1138fbb9
......@@ -1646,7 +1646,8 @@ class AreaTests(OpenCVTests):
cv.SetData(imagefiledata, filedata, len(filedata))
return cv.DecodeImageM(imagefiledata)
urllib.urlretrieve("http://docs.opencv.org/data/camera_calibration.tar.gz", "camera_calibration.tar.gz")
if (not os.path.isfile("camera_calibration.tar.gz")):
urllib.urlretrieve("http://docs.opencv.org/data/camera_calibration.tar.gz", "camera_calibration.tar.gz")
tf = tarfile.open("camera_calibration.tar.gz")
num_x_ints = 8
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册