Ejemplo n.º 1
0
def test_detect_at_minimum_size(marker_type: MarkerType) -> None:
    marker_camera = MarkerCamera(
        0,
        marker_size=marker_type.min_marker_image_size,
        marker_type=marker_type,
        border_size=MarkerCamera.MIN_BORDER_SIZE,
    )
    frame = marker_camera.capture_frame()
    assert frame.shape == marker_camera.get_resolution()

    marker = next(marker_camera.process_frame(frame=frame))
    assert marker.id == 0
Ejemplo n.º 2
0
def test_captures_frame_at_correct_resolution(resolution):
    marker_camera = MarkerCamera(25,
                                 marker_dict=MarkerDict.DICT_6X6_50,
                                 marker_size=resolution)
    frame = marker_camera.capture_frame()
    assert frame.shape == marker_camera.get_resolution()
Ejemplo n.º 3
0
def test_captures_frame_at_correct_resolution(
    marker_size: int, marker_type: MarkerType
) -> None:
    marker_camera = MarkerCamera(25, marker_size=marker_size, marker_type=marker_type)
    frame = marker_camera.capture_frame()
    assert frame.shape == marker_camera.get_resolution()