diff --git a/modules/python/test/test_calibration.py b/modules/python/test/test_calibration.py index 665521862c..bb54cacdc4 100644 --- a/modules/python/test/test_calibration.py +++ b/modules/python/test/test_calibration.py @@ -21,9 +21,9 @@ class calibration_test(NewOpenCVTests): img_names = [] for i in range(1, 15): if i < 10: - img_names.append('samples/data/left0{}.jpg'.format(str(i))) + img_names.append('samples/cpp/left0{}.jpg'.format(str(i))) elif i != 10: - img_names.append('samples/data/left{}.jpg'.format(str(i))) + img_names.append('samples/cpp/left{}.jpg'.format(str(i))) square_size = 1.0 pattern_size = (9, 6) diff --git a/modules/python/test/test_camshift.py b/modules/python/test/test_camshift.py index a824320eff..6c7c189344 100644 --- a/modules/python/test/test_camshift.py +++ b/modules/python/test/test_camshift.py @@ -39,7 +39,7 @@ class camshift_test(NewOpenCVTests): def prepareRender(self): - self.render = TestSceneRender(self.get_sample('samples/data/pca_test1.jpg'), deformation = True) + self.render = TestSceneRender(self.get_sample('samples/python2/data/pca_test1.jpg'), deformation = True) def runTracker(self): diff --git a/modules/python/test/test_dft.py b/modules/python/test/test_dft.py index f796939970..9019a6a63c 100644 --- a/modules/python/test/test_dft.py +++ b/modules/python/test/test_dft.py @@ -16,7 +16,7 @@ from tests_common import NewOpenCVTests class dft_test(NewOpenCVTests): def test_dft(self): - img = self.get_sample('samples/data/rubberwhale1.png', 0) + img = self.get_sample('samples/gpu/rubberwhale1.png', 0) eps = 0.001 #test direct transform diff --git a/modules/python/test/test_digits.py b/modules/python/test/test_digits.py index 587c355e37..e30361e0eb 100644 --- a/modules/python/test/test_digits.py +++ b/modules/python/test/test_digits.py @@ -36,7 +36,7 @@ from numpy.linalg import norm SZ = 20 # size of each digit is SZ x SZ CLASS_N = 10 -DIGITS_FN = 'samples/data/digits.png' +DIGITS_FN = 'samples/python2/data/digits.png' def split2d(img, cell_size, flatten=True): h, w = img.shape[:2] diff --git a/modules/python/test/test_facedetect.py b/modules/python/test/test_facedetect.py index 8d64fde10f..094659712e 100644 --- a/modules/python/test/test_facedetect.py +++ b/modules/python/test/test_facedetect.py @@ -31,7 +31,7 @@ class facedetect_test(NewOpenCVTests): cascade = cv2.CascadeClassifier(cascade_fn) nested = cv2.CascadeClassifier(nested_fn) - samples = ['samples/data/lena.jpg', 'cv/cascadeandhog/images/mona-lisa.png'] + samples = ['samples/c/lena.jpg', 'cv/cascadeandhog/images/mona-lisa.png'] faces = [] eyes = [] diff --git a/modules/python/test/test_feature_homography.py b/modules/python/test/test_feature_homography.py index f417033883..a895be6f6a 100644 --- a/modules/python/test/test_feature_homography.py +++ b/modules/python/test/test_feature_homography.py @@ -42,8 +42,8 @@ class feature_homography_test(NewOpenCVTests): def test_feature_homography(self): - self.render = TestSceneRender(self.get_sample('samples/data/graf1.png'), - self.get_sample('samples/data/box.png'), noise = 0.4, speed = 0.5) + self.render = TestSceneRender(self.get_sample('samples/python2/data/graf1.png'), + self.get_sample('samples/c/box.png'), noise = 0.4, speed = 0.5) self.frame = self.render.getNextFrame() self.tracker = PlaneTracker() self.tracker.clear() diff --git a/modules/python/test/test_houghcircles.py b/modules/python/test/test_houghcircles.py index 6cf7d74ebb..32b474fc85 100644 --- a/modules/python/test/test_houghcircles.py +++ b/modules/python/test/test_houghcircles.py @@ -39,7 +39,7 @@ class houghcircles_test(NewOpenCVTests): def test_houghcircles(self): - fn = "samples/data/board.jpg" + fn = "samples/cpp/board.jpg" src = self.get_sample(fn, 1) img = cv2.cvtColor(src, cv2.COLOR_BGR2GRAY) diff --git a/modules/python/test/test_houghlines.py b/modules/python/test/test_houghlines.py index 081c84984d..993c113436 100644 --- a/modules/python/test/test_houghlines.py +++ b/modules/python/test/test_houghlines.py @@ -26,7 +26,7 @@ class houghlines_test(NewOpenCVTests): def test_houghlines(self): - fn = "/samples/data/pic1.png" + fn = "/samples/cpp/pic1.png" src = self.get_sample(fn) dst = cv2.Canny(src, 50, 200) diff --git a/modules/python/test/test_letter_recog.py b/modules/python/test/test_letter_recog.py index 05f879978e..d64d8e0993 100644 --- a/modules/python/test/test_letter_recog.py +++ b/modules/python/test/test_letter_recog.py @@ -150,7 +150,7 @@ class letter_recog_test(NewOpenCVTests): Model = models[model] classifier = Model() - samples, responses = load_base(self.repoPath + '/samples/data/letter-recognition.data') + samples, responses = load_base(self.repoPath + '/samples/cpp/letter-recognition.data') train_n = int(len(samples)*classifier.train_ratio) classifier.train(samples[:train_n], responses[:train_n]) diff --git a/modules/python/test/test_lk_homography.py b/modules/python/test/test_lk_homography.py index 8e526d0de7..b1d6285a9d 100644 --- a/modules/python/test/test_lk_homography.py +++ b/modules/python/test/test_lk_homography.py @@ -44,8 +44,8 @@ class lk_homography_test(NewOpenCVTests): numFeaturesInRectOnStart = 0 def test_lk_homography(self): - self.render = TestSceneRender(self.get_sample('samples/data/graf1.png'), - self.get_sample('samples/data/box.png'), noise = 0.1, speed = 1.0) + self.render = TestSceneRender(self.get_sample('samples/python2/data/graf1.png'), + self.get_sample('samples/c/box.png'), noise = 0.1, speed = 1.0) frame = self.render.getNextFrame() frame_gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) diff --git a/modules/python/test/test_lk_track.py b/modules/python/test/test_lk_track.py index ccc67a5128..920351c5f2 100644 --- a/modules/python/test/test_lk_track.py +++ b/modules/python/test/test_lk_track.py @@ -50,7 +50,7 @@ class lk_track_test(NewOpenCVTests): def test_lk_track(self): - self.render = TestSceneRender(self.get_sample('samples/data/graf1.png'), self.get_sample('samples/data/box.png')) + self.render = TestSceneRender(self.get_sample('samples/python2/data/graf1.png'), self.get_sample('samples/c/box.png')) self.runTracker() def runTracker(self): diff --git a/modules/python/test/test_morphology.py b/modules/python/test/test_morphology.py index 309c80cfd2..1062801eac 100644 --- a/modules/python/test/test_morphology.py +++ b/modules/python/test/test_morphology.py @@ -18,7 +18,7 @@ class morphology_test(NewOpenCVTests): def test_morphology(self): - fn = 'samples/data/rubberwhale1.png' + fn = 'samples/gpu/rubberwhale1.png' img = self.get_sample(fn) modes = ['erode/dilate', 'open/close', 'blackhat/tophat', 'gradient'] diff --git a/modules/python/test/test_peopledetect.py b/modules/python/test/test_peopledetect.py index fb0a9e9cae..efb477d426 100644 --- a/modules/python/test/test_peopledetect.py +++ b/modules/python/test/test_peopledetect.py @@ -24,7 +24,7 @@ class peopledetect_test(NewOpenCVTests): hog = cv2.HOGDescriptor() hog.setSVMDetector( cv2.HOGDescriptor_getDefaultPeopleDetector() ) - dirPath = 'samples/data/' + dirPath = 'samples/gpu/' samples = ['basketball1.png', 'basketball2.png'] testPeople = [ diff --git a/modules/python/test/test_squares.py b/modules/python/test/test_squares.py index 3b3fbb6d9d..c933b358f4 100644 --- a/modules/python/test/test_squares.py +++ b/modules/python/test/test_squares.py @@ -61,7 +61,7 @@ class squares_test(NewOpenCVTests): def test_squares(self): - img = self.get_sample('samples/data/pic1.png') + img = self.get_sample('samples/cpp/pic1.png') squares = find_squares(img) testSquares = [ diff --git a/modules/python/test/test_texture_flow.py b/modules/python/test/test_texture_flow.py index 7dc3b07040..8dae6fabd4 100644 --- a/modules/python/test/test_texture_flow.py +++ b/modules/python/test/test_texture_flow.py @@ -21,7 +21,7 @@ class texture_flow_test(NewOpenCVTests): def test_texture_flow(self): - img = self.get_sample('samples/data/pic6.png') + img = self.get_sample('samples/cpp/pic6.png') gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) h, w = img.shape[:2] diff --git a/modules/python/test/tst_scene_render.py b/modules/python/test/tst_scene_render.py index 49cde80d25..68e03acbad 100644 --- a/modules/python/test/tst_scene_render.py +++ b/modules/python/test/tst_scene_render.py @@ -100,20 +100,3 @@ class TestSceneRender(): def resetTime(self): self.time = 0.0 - - -if __name__ == '__main__': - - backGr = cv2.imread('../../../samples/data/lena.jpg') - - render = TestSceneRender(backGr, noise = 0.5) - - while True: - - img = render.getNextFrame() - cv2.imshow('img', img) - - ch = 0xFF & cv2.waitKey(3) - if ch == 27: - break - cv2.destroyAllWindows() \ No newline at end of file diff --git a/samples/python2/data/graf1.png b/samples/python2/data/graf1.png new file mode 100644 index 0000000000..67e3473186 Binary files /dev/null and b/samples/python2/data/graf1.png differ diff --git a/samples/python2/data/pca_test1.jpg b/samples/python2/data/pca_test1.jpg new file mode 100644 index 0000000000..688f82f34c Binary files /dev/null and b/samples/python2/data/pca_test1.jpg differ