# `mix bb_estimator_aruco.gen.markers`
[🔗](https://github.com/beam-bots/bb_estimator_aruco/blob/main/lib/mix/tasks/bb_estimator_aruco.gen.markers.ex#L5)

Writes ArUco markers as PNG images, ready to print or show on a screen, from
the same dictionaries `BB.Estimator.ArUco` detects.

A marker is only detected by an estimator configured with the dictionary it
was generated from, so generate them with the `dictionary:` you give the
estimator.

## Usage

    mix bb_estimator_aruco.gen.markers [OPTIONS]

## Examples

Markers 0 to 3 from the default dictionary, in the current directory:

    mix bb_estimator_aruco.gen.markers

Markers 0, 1, 7 and 10 to 12 from `:dict_6x6_250`, 600 pixels across, into
`markers/`, plus a sheet of all of them for printing:

    mix bb_estimator_aruco.gen.markers -d dict_6x6_250 --ids 0,1,7,10..12 \
      --size 600 --output markers --sheet

## Options

  * `--dictionary`, `-d` - the dictionary, named as `BB.Estimator.ArUco`'s
    `:dictionary` option names it, without the colon. Defaults to the
    estimator's default, `dict_4x4_50`.
  * `--ids`, `-i` - the marker IDs: a comma-separated list of IDs and
    inclusive ranges, such as `0..3` or `0,1,7,10..12`. Defaults to `0..3`.
    Each must be less than the number of markers in the dictionary.
  * `--size`, `-s` - the marker's side in pixels, not counting the border.
    Defaults to 400.
  * `--border`, `-b` - the width in pixels of the white border around each
    marker. Defaults to one of the marker's cells, which is the least the
    detector needs. A narrower border only works if the marker is printed
    onto a white surface that supplies the rest.
  * `--output`, `-o` - the directory to write to, created if missing.
    Defaults to the current directory.
  * `--sheet` - also write every marker tiled onto a single image.

## Output

Each marker is written to `<dictionary>_<id>.png`, such as
`dict_4x4_50_7.png`, so markers from different dictionaries can't be
confused. The sheet, if asked for, is `<dictionary>_sheet.png`, with its
markers in ascending ID order, left to right and top to bottom.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
