Skip to main content

Module test_utils

Module test_utils 

Source
Expand description

Utilities for testing and synthetic data generation.

Structs§

TestImageParams
Parameters for generating test images with photometric variations.

Functions§

apply_brightness_contrast
Apply brightness and contrast to an image. brightness: -255 to +255 contrast: 0.0 to 127.0 (1.0 = no change)
compute_corner_error
Compute mean Euclidean distance between detected and ground truth corners. Handles 4 rotations to find the minimum error.
compute_rmse
Compute RMSE corner error between detected and ground truth corners.
count_black_pixels
Count black pixels in binary data.
generate_checkered
Generates a checkered pattern image for benchmarking.
generate_synthetic_test_image
Generate a synthetic image containing a single AprilTag or ArUco tag.
generate_test_image_with_params
Generate a test image based on the provided parameters. Includes tag generation, placement, and photometric adjustments.
measure_border_integrity
Check if the tag’s outer black border is correctly binarized. Returns the ratio of correctly black pixels in the 1-cell-wide border (0.0 to 1.0).