Finds ArUco fiducial markers in camera frames, using OpenCV's detector
through evision.
Nest it inside a camera sensor, and it receives each frame the camera captures:
sensor :camera, {BB.Camera.V4L, device: "/dev/video0", width: 640, height: 480} do
estimator :markers, {BB.Estimator.ArUco, dictionary: :dict_4x4_50}
endFor every frame it publishes a BB.Message.Vision.Fiducials at its own path
[:sensor, ..., :camera, :markers]above - including a frame in which it found nothing, whose message has an emptymarkerslist. The message carries the frame'sframe_idand capture time.
Frames
It reads {:raw, :I420} frames, which every bb_camera driver produces.
Detection works on greyscale, and the first width * height bytes of an
I420 frame - its Y plane - are exactly that, so it detects on those bytes
directly and converts nothing.
A frame in any other format is ignored: nothing is published for it. A camera's format is fixed for its stream, so in practice that means a driver this estimator can't read, and nothing it publishes would ever be different.
Pace
Detection runs in the estimator's own process, on one of the VM's dirty CPU schedulers. The camera hands it the newest frame each time it finishes the last, so a detector slower than the camera skips frames rather than falling behind.
Dictionaries
A marker's ID only means something within the dictionary it was generated
from, and a marker from another dictionary is not detected at all. Print
markers from the dictionary you configure, with
mix bb_estimator_aruco.gen.markers.
Summary
Functions
The dictionaries :dictionary accepts.
The OpenCV dictionary a :dictionary option names, for generating markers
the estimator will detect
Functions
@spec dictionaries() :: [atom()]
The dictionaries :dictionary accepts.
@spec dictionary(atom()) :: Evision.ArUco.Dictionary.t()
The OpenCV dictionary a :dictionary option names, for generating markers
the estimator will detect:
dictionary = BB.Estimator.ArUco.dictionary(:dict_4x4_50)
image = Evision.ArUco.generateImageMarker(dictionary, 7, 200)