mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 14:36:36 +08:00
Use github pat to get data for in python tests (files from code.opencv.org are received truncated sometimes)
This commit is contained in:
parent
7ff04a65f1
commit
19313923cc
@ -69,7 +69,7 @@ class OpenCVTests(unittest.TestCase):
|
||||
|
||||
def get_sample(self, filename, iscolor = cv.CV_LOAD_IMAGE_COLOR):
|
||||
if not filename in self.image_cache:
|
||||
filedata = urllib.urlopen("http://code.opencv.org/projects/opencv/repository/revisions/master/raw/" + filename).read()
|
||||
filedata = urllib.urlopen("https://raw.github.com/Itseez/opencv/master/" + filename).read()
|
||||
imagefiledata = cv.CreateMatHeader(1, len(filedata), cv.CV_8UC1)
|
||||
cv.SetData(imagefiledata, filedata, len(filedata))
|
||||
self.image_cache[filename] = cv.DecodeImageM(imagefiledata, iscolor)
|
||||
|
Loading…
Reference in New Issue
Block a user