@@ -42,18 +42,22 @@ def pytest_collection_modifyitems(config, items):
4242 item .add_marker (pytest .mark .skip (reason = "Not for selected params" ))
4343
4444
45- def bsp_capture_image (image_path ):
45+ def bsp_capture_image (image_path , board ):
4646 # Return video from the first webcam on your computer.
4747 cap = cv2 .VideoCapture (0 )
4848 # Set FullHD resolution (1920x1080)
4949 cap .set (cv2 .CAP_PROP_FRAME_WIDTH , 1920 )
5050 cap .set (cv2 .CAP_PROP_FRAME_HEIGHT , 1080 )
51+
52+ # TODO: Camera calibration
53+
5154 # reads frames from a camera
5255 # ret checks return at each frame
5356 ret , frame = cap .read ()
5457 if ret :
58+ # TODO: Camera calibration / Perspective transform
5559 # TODO: Change size image
56- # TODO: Crop image
60+ # TODO: Crop image for {board}
5761
5862 # Save image
5963 cv2 .imwrite (image_path , frame )
@@ -67,7 +71,7 @@ def bsp_capture_image(image_path):
6771
6872def bsp_test_image (board , example , expectation ):
6973 image_file = f"snapshot_{ board } _{ example } .jpg"
70- bsp_capture_image (image_file )
74+ bsp_capture_image (image_file , board )
7175
7276
7377@pytest .fixture (autouse = True )
0 commit comments