From 4e3a6328ba06ab1069d07e3f785fe9b340d996d3 Mon Sep 17 00:00:00 2001 From: Vladislav Sovrasov Date: Thu, 4 Feb 2016 17:38:05 +0300 Subject: [PATCH] Fixes in calibration and camshift tests --- modules/python/test/test_calibration.py | 2 +- modules/python/test/test_camshift.py | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/modules/python/test/test_calibration.py b/modules/python/test/test_calibration.py index 48b53ff9b2..665521862c 100644 --- a/modules/python/test/test_calibration.py +++ b/modules/python/test/test_calibration.py @@ -57,7 +57,7 @@ class calibration_test(NewOpenCVTests): eps = 0.01 normCamEps = 10.0 - normDistEps = 0.01 + normDistEps = 0.001 cameraMatrixTest = [[ 532.80992189, 0., 342.4952186 ], [ 0., 532.93346422, 233.8879292 ], diff --git a/modules/python/test/test_camshift.py b/modules/python/test/test_camshift.py index 11164f9f03..064206edb1 100644 --- a/modules/python/test/test_camshift.py +++ b/modules/python/test/test_camshift.py @@ -49,7 +49,6 @@ class camshift_test(NewOpenCVTests): def prepareRender(self): - cv2.namedWindow('camshift') self.render = TestSceneRender(self.get_sample('samples/data/pca_test1.jpg')) def runTracker(self): @@ -95,13 +94,10 @@ class camshift_test(NewOpenCVTests): if self.show_backproj: vis[:] = prob[...,np.newaxis] - cv2.rectangle(vis, (self.track_window[0], self.track_window[1]), (self.track_window[0] + self.track_window[2], self.track_window[1] + self.track_window[3]), (0, 255, 0), 2) - trackingRect = np.array(self.track_window) trackingRect[2] += trackingRect[0] trackingRect[3] += trackingRect[1] - print(intersectionRate((self.render.getCurrentRect()), trackingRect)) self.assertGreater(intersectionRate((self.render.getCurrentRect()), trackingRect), 0.5) if framesCounter > 300: