This repository holds beesbook utilities.
pip install git+https://github.com/BioroboticsLab/bb_utils.git
The submodule bb_utils.fiducial
holds helper functions to generate simple fiducial markers carrying one bit of information
as well as functions to find such markers in images.
Usage example:
# Load an arbitrary image that contains four fiducial markers in the corners.
# The approximate marker size must be known.
image = "/mnt/storage/david/data/beesbook/tagdetect/2018ld01.jpg"
markersize = 22
image = scipy.ndimage.imread(image)
# Find four markers in the image's corners (20% of the image's width/height).
# We are using the default markers here.
markers = bb_utils.fiducial.locate_markers_in_corners(image, markersize, corner_ratio=0.20)
# Match the recognized points against the homography of 2018.
H = bb_utils.fiducial.match_homography_points(markers)
# Display everything.
bb_utils.fiducial.display_markers(image, markers, H, dsize=(410, 300))