diff --git a/scripts/unittest/script/00-rgb_to_lab.py b/scripts/unittest/script/00-rgb_to_lab.py index 2bed4506a..1c7adfe02 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] == 75 and lab[1] == -40 and lab[2] == 32) + return (lab[0] == 75 and lab[1] == -40 and lab[2] == 34) diff --git a/scripts/unittest/script/09-find_blobs.py b/scripts/unittest/script/09-find_blobs.py index 73493caca..2472356d8 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 [int(x) for x in blobs[0][0:-5]] == [122, 41, 97, 82, 6266, 168, 82] and\ - [int(x) for x in blobs[1][0:-5]] == [44, 42, 78, 88, 5162, 80, 84] and\ - [int(x) for x in blobs[2][0:-5]] == [210, 40, 72, 83, 3930, 249, 76] + return [int(x) for x in blobs[0][0:-5]] == [122, 41, 98, 82, 6260, 168, 82] and\ + [int(x) for x in blobs[1][0:-5]] == [44, 42, 78, 88, 5158, 80, 84] and\ + [int(x) for x in blobs[2][0:-5]] == [210, 40, 72, 82, 3986, 248, 77] diff --git a/scripts/unittest/script/11-find_lines.py b/scripts/unittest/script/11-find_lines.py index a95d6b619..166f1e796 100644 --- a/scripts/unittest/script/11-find_lines.py +++ b/scripts/unittest/script/11-find_lines.py @@ -1,9 +1,9 @@ def unittest(data_path, temp_path): import image img = image.Image("unittest/data/shapes.ppm", copy_to_fb=True) - lines = img.find_lines(threshold = 10000, theta_margin = 25, rho_margin = 25) + lines = img.find_lines(threshold = 5000, theta_margin = 25, rho_margin = 25) return len(lines) == 4 and\ - lines[0][0:] == (22, 0, 22, 119, 119, 17340, 0, 22) and\ - lines[1][0:] == (0, 39, 159, 39, 159, 17340, 90, 39) and\ - lines[2][0:] == (57, 0, 57, 119, 119, 17340, 0, 57) and\ - lines[3][0:] == (0, 75, 159, 75, 159, 21420, 90, 75) + lines[0][0:] == (22, 0, 22, 119, 119, 8670, 0, 22) and\ + lines[1][0:] == (0, 39, 159, 39, 159, 8670, 90, 39) and\ + lines[2][0:] == (57, 0, 57, 119, 119, 8670, 0, 57) and\ + lines[3][0:] == (0, 75, 159, 75, 159, 10710, 90, 75)