#![allow(missing_docs)]
mod artifacts;
mod detect;
mod recipe;
pub use artifacts::{ArtifactError, write_target_artifacts};
pub use detect::{
BatchOutcome, DetectRunError, build_detector, decoded_count, detect_file, detect_image,
image_files_in_dir, load_target, run_batch,
};
pub use recipe::{
CodingRecipe, FiducialMode, FiducialsRecipe, Format, LatticeRecipe, MarkerRecipe, RecipeError,
RenderRecipe, TargetRecipe,
};
pub const EXAMPLE_RECIPES: &[(&str, &str)] = &[
(
"hex_coded",
include_str!("../../examples/targets/hex_coded.toml"),
),
(
"rect_coded",
include_str!("../../examples/targets/rect_coded.toml"),
),
(
"hex_plain_dots",
include_str!("../../examples/targets/hex_plain_dots.toml"),
),
(
"hex_plain_nodots",
include_str!("../../examples/targets/hex_plain_nodots.toml"),
),
(
"rect_plain_dots",
include_str!("../../examples/targets/rect_plain_dots.toml"),
),
(
"rect_plain_nodots",
include_str!("../../examples/targets/rect_plain_nodots.toml"),
),
];
pub fn example_recipe(name: &str) -> Option<&'static str> {
EXAMPLE_RECIPES
.iter()
.find(|(n, _)| *n == name)
.map(|(_, text)| *text)
}