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

This commit is contained in:
Mike Maraya 2014-06-30 22:17:52 -04:00
parent 1138fbb940
commit 95550c2582

View File

@ -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