diff --git a/scripts/unittest/script/00-rgb_to_lab.py b/scripts/unittest/script/00-rgb_to_lab.py index aa014b04d..33b203a43 100644 --- a/scripts/unittest/script/00-rgb_to_lab.py +++ b/scripts/unittest/script/00-rgb_to_lab.py @@ -1,4 +1,4 @@ def unittest(data_path, temp_path): import image lab = image.rgb_to_lab((120, 200, 120)) - return (lab[0] == 76 and lab[1] == -44 and lab[2] == 34) + return (lab[0] == 74 and lab[1] == -38 and lab[2] == 30) diff --git a/scripts/unittest/script/01-lab_to_rgb.py b/scripts/unittest/script/01-lab_to_rgb.py index edd2a5c18..fbdf271ea 100644 --- a/scripts/unittest/script/01-lab_to_rgb.py +++ b/scripts/unittest/script/01-lab_to_rgb.py @@ -1,4 +1,4 @@ def unittest(data_path, temp_path): import image - rgb = image.lab_to_rgb((76, -44, 34)) - return (rgb[0] == 118 and rgb[1] == 207 and rgb[2] == 122) + rgb = image.lab_to_rgb((74, -38, 30)) + return (rgb[0] == 123 and rgb[1] == 198 and rgb[2] == 123) diff --git a/scripts/unittest/script/02-rgb_to_grayscale.py b/scripts/unittest/script/02-rgb_to_grayscale.py index 2547fc396..244ceefbf 100644 --- a/scripts/unittest/script/02-rgb_to_grayscale.py +++ b/scripts/unittest/script/02-rgb_to_grayscale.py @@ -1,4 +1,4 @@ def unittest(data_path, temp_path): import image gs = image.rgb_to_grayscale((120, 200, 120)) - return (gs == 182) + return (gs == 167) diff --git a/scripts/unittest/script/03-grayscale_to_rgb.py b/scripts/unittest/script/03-grayscale_to_rgb.py index 693f9b22e..27b8cb5b7 100644 --- a/scripts/unittest/script/03-grayscale_to_rgb.py +++ b/scripts/unittest/script/03-grayscale_to_rgb.py @@ -1,4 +1,4 @@ def unittest(data_path, temp_path): import image rgb = image.grayscale_to_rgb(182) - return (rgb[0] == 182 and rgb[1] == 182 and rgb[2] == 182) + return (rgb[0] == 181 and rgb[1] == 182 and rgb[2] == 181) diff --git a/scripts/unittest/script/09-find_blobs.py b/scripts/unittest/script/09-find_blobs.py index bb6edd29d..9fe86bc46 100644 --- a/scripts/unittest/script/09-find_blobs.py +++ b/scripts/unittest/script/09-find_blobs.py @@ -7,6 +7,6 @@ def unittest(data_path, temp_path): img = image.Image("unittest/data/blobs.ppm", copy_to_fb=True) blobs = img.find_blobs(thresholds, pixels_threshold=2000, area_threshold=200) - return blobs[0][0:-3] == (122, 41, 96, 81, 6228, 168, 82) and\ - blobs[1][0:-3] == (44, 40, 77, 89, 5113, 80, 84) and\ - blobs[2][0:-3] == (210, 40, 71, 82, 3890, 249, 76) + return [int(x) for x in blobs[0][0:-5]] == [122, 41, 97, 82, 6228, 168, 82] and\ + [int(x) for x in blobs[1][0:-5]] == [44, 40, 78, 90, 5113, 80, 84] and\ + [int(x) for x in blobs[2][0:-5]] == [210, 40, 72, 83, 3890, 249, 76]