1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-21 19:33:03 +04:00

Merge pull request #26932 from shyama7004:deprecationFix

replace tostring() with tobytes()
This commit is contained in:
Alexander Smorkalov
2025-02-18 13:22:04 +03:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
@@ -17,7 +17,7 @@ class TestGoodFeaturesToTrack_test(NewOpenCVTests):
results = dict([(t, cv.goodFeaturesToTrack(arr, numPoints, t, 2, useHarrisDetector=True)) for t in threshes])
# Check that GoodFeaturesToTrack has not modified input image
self.assertTrue(arr.tostring() == original.tostring())
self.assertTrue(arr.tobytes() == original.tobytes())
# Check for repeatability
for i in range(1):
results2 = dict([(t, cv.goodFeaturesToTrack(arr, numPoints, t, 2, useHarrisDetector=True)) for t in threshes])
+1 -1
View File
@@ -58,7 +58,7 @@ class NewOpenCVTests(unittest.TestCase):
def hashimg(self, im):
""" Compute a hash for an image, useful for image comparisons """
return hashlib.md5(im.tostring()).hexdigest()
return hashlib.md5(im.tobytes()).hexdigest()
if sys.version_info[:2] == (2, 6):
def assertLess(self, a, b, msg=None):