Skip to content

Commit bb937cc

Browse files
author
Felix Darvas
committed
test saturation on the undistorted image to be independent of cv2 , print from saturation test removed
1 parent 70eb8a2 commit bb937cc

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

tests/test_panel.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,15 @@ def test_raw_panel_saturatedl(panel_image_name):
8787

8888
#saturate 2500 pixels in the raw image - note that on the undistorted image this
8989
#will result in 2329 saturated pixels
90-
i0 = img.raw()
90+
i0 = img.undistorted(img.raw())
9191
i0[500:550,700:750]=4095*16+1
92-
img.set_raw(i0)
92+
img.set_undistorted(i0)
9393

9494
mean, std, num, sat = pan.raw()
95-
print(mean,std,num,sat)
9695
assert mean == pytest.approx(47245, rel=0.01)
9796
assert std == pytest.approx(5846.1, rel=0.05)
9897
assert num == pytest.approx(26005, rel=0.001)
99-
assert sat == pytest.approx(2329, abs=0)
98+
assert sat == pytest.approx(2500, abs=0)
10099

101100
def test_raw_panel(panel_image_name):
102101
img = image.Image(panel_image_name)

0 commit comments

Comments
 (0)