MCPcopy Create free account
hub / github.com/TheMariday/marimapper / main

Function main

marimapper/scripts/check_camera_cli.py:17–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15
16
17def main():
18
19 parser = argparse.ArgumentParser(
20 description="Tests your webcam and LED detection algorithms",
21 formatter_class=argparse.ArgumentDefaultsHelpFormatter,
22 usage=argparse.SUPPRESS,
23 )
24
25 add_common_args(parser)
26 add_camera_args(parser)
27
28 args = parser.parse_args()
29
30 parse_common_args(args, logger)
31
32 cam = Camera(args.device)
33
34 set_cam_dark(cam, args.exposure)
35
36 logger.info(
37 "Camera connected! Hold an LED up to the camera to check LED identification"
38 )
39
40 while True:
41 find_led(cam, args.threshold)
42
43
44if __name__ == "__main__":

Callers 1

Calls 6

add_common_argsFunction · 0.90
add_camera_argsFunction · 0.90
parse_common_argsFunction · 0.90
CameraClass · 0.90
set_cam_darkFunction · 0.90
find_ledFunction · 0.90

Tested by

no test coverage detected