Skip to content

Detecting bCodes

Tim edited this page Jan 1, 2022 · 24 revisions

Lets begin by downloading an example image that shows a lot of bees with a bCode attached to their thorax. The bCodes in this image are fairly small and are therefore difficult to detect. To improve the detection rate, we will use the scaling.factor parameter to magnify the image and the sharpening.sigma and sharpening.amount parameters to sharpen it. To detect bCodes in the magnified and sharpened image at 8 equally spaced intensity thresholds between 40 and 110, and to only report a detected bCode if at least 85% of its template (excluding the border) are preserved, run

java -jar bcode_detector.jar scaling.factor=1.2 sharpening.sigma=1.6 \
sharpening.amount=0.9 min.intensity.threshold=40 max.intensity.threshold=110 \
intensity.step.size=10 min.template.conservation=0.85 conserve.margin=0 \
input.file=2013-07-18-13-57-25-600.jpg

This will result in a file named 2013-07-18-13-57-25-600.txt that contains raw bCode detection results in the format described here.

Hints: When processing videos, the frame rate of the video must be specified with the frame.rate parameter. To process more than one image or video file, create a plain text file that lists one image or video file on each line and use this file as the input.file.

Before examining bCode detection results or processing them with another program, you should probably convert them to a more convenient format (not required for this tutorial):

java -jar converter.jar raw.bCode.file=2013-07-18-13-57-25-600.txt \
human.readable.file=converted_bcode_detections.txt

This will produce a file named converted_bcode_detections.txt in the format described here.

Getting started

Making things

Identifying individuals

Detecting behavior

Miscellaneous

Clone this wiki locally