def test_create_several_aruco_pdf(): aruco = ArucoMarkers() fig = aruco.create_arucos_pdf(nx=5, ny=5, resolution=150, path=im_folder + 'temp/') fig.show()
def test_create_aruco_marker(): aruco = ArucoMarkers() aruco_array = aruco.create_aruco_marker(id=12, resolution=100, show=True, save=True, path=im_folder + 'temp/') print(aruco_array)
def test_aruco_class(): aruco = ArucoMarkers(sensor="dummy") assert aruco.kinect == "dummy" aruco.search_aruco(dict_position={ 1: [10, 20], 2: [100, 200] }, depth_frame=frame) print(aruco.markers_in_frame)
def test_update_arucos(): aruco = ArucoMarkers(sensor=sensor) markers_in_frame = aruco.search_aruco(color) print(markers_in_frame) aruco.update_marker_dict() print(aruco.aruco_markers) aruco.transform_to_box_coordinates() print(aruco.aruco_markers) assert len(aruco.aruco_markers) == 2
def test_create_coordinate_map(): aruco = ArucoMarkers(sensor=sensor) map = aruco.create_CoordinateMap() print(map)
def test_find_markers_IR(): """Carefull. Most of the times doesn't work cause is stuck in infinite loop. If want to try, change the None with the number of arucos to detect""" aruco = ArucoMarkers(sensor=sensor) ir = aruco.find_markers_ir(amount=None) print(ir)
def test_find_markers_projector(): aruco = ArucoMarkers() projector_markers, corner_middle = aruco.find_markers_projector( color=color, amount=2) print(corner_middle, projector_markers)
def test_find_markers_rgb(): aruco = ArucoMarkers() rgb_markers = aruco.find_markers_rgb(color=color, amount=2) print(rgb_markers)
def test_get_location_marker(): aruco = ArucoMarkers() corners, _, _ = aruco.aruco_detect(color) x, y = aruco.get_location_marker(corners[0]) print(x, y)
def test_aruco_detect(): aruco = ArucoMarkers() corners, ids, rejected = aruco.aruco_detect(color) print(corners, ids, rejected)