Sign in

    moonbit-synthetic-vision

    Deterministic synthetic vision fixtures, annotations, and benchmarks for MoonBit.

    vision
    synthetic-data
    testing
    calibration
    image
    benchmark
    Download zip
    Author
    Version
    0.3.0
    License
    Apache-2.0
    Last updated
    last month
    Downloads
    17

    #moonbit-synthetic-vision

    Deterministic synthetic vision fixtures for MoonBit.

    The library generates small, reviewable image assets and ground-truth annotations for computer-vision algorithms, image pipelines, calibration examples, tutorials, and continuous-integration regression tests. It is deliberately focused on reproducible fixtures rather than a general-purpose image-processing framework.

    #Core capabilities

    • Gray and RGB image buffers with safe access, cropping, padding, tiling, resizing, rotation, channel conversion, and PGM/PPM export.
    • Procedural calibration boards, checkerboards, dot grids, gradients, target scenes, and deterministic noise/blur/occlusion effects.
    • Drawing primitives, thresholding, morphology, Sobel edge maps, contrast transforms, and integer translation.
    • Bounding boxes, labels, keypoints, masks, optical-flow vectors, YOLO text, and scene-level annotation summaries.
    • Dataset manifests, tag filtering, deterministic train/validation/holdout splitting, and a runnable suite renderer.
    • Image statistics and comparison metrics including MAE, MSE, PSNR, histogram, dynamic range, and constant-image checks.
    • Integer camera projection, radial distortion, calibration point sampling, optical-flow warping/composition, and flow quality summaries.
    • COCO-style image/category/annotation JSON records, mask run-length encoding, deterministic augmentation pipelines, sampling strategies, and precision/ recall/IoU evaluation metrics.
    • Connected components, hole filling, boundary extraction, image pyramids, bilinear resampling, template matching, polygon geometry, convex hulls, and integer affine/projective transforms.
    • Gradient fields, corner features, patch descriptors, calibration residuals, multi-object IoU tracking, batch evaluation reports, RGB overlays, synthetic variants, workload counters, reproducibility audits, and cross-validation dataset plans.

    #Quick start

    moon check --target wasm-gc --deny-warn moon test --target wasm-gc moon run --target wasm-gc cmd/main

    The preview command prints a JSON manifest and an ASCII rendering. The benchmark command exercises the complete default suite:

    moon run --target native cmd/bench

    #CLI

    cmd/main is a human-readable preview for smoke testing. cmd/bench renders the eight default scene recipes at 160×120 and prints deterministic workload counters and a pixel checksum. These commands do not require external image libraries or network access.

    #API example

    ///|
    test "build a checkerboard fixture" {
    let image = checkerboard(Size::new(width=8, height=8), 2)
    inspect(image.width, content="8")
    inspect(image.get(0, 0).value, content="0")
    inspect(image.get(2, 0).value, content="255")
    }

    #Architecture

    The root package is intentionally dependency-light and split by responsibility:

    FileResponsibility
    types.mbtgeometry, colors, sizes, and numeric helpers
    image.mbt / export.mbtimage buffers and text exporters
    draw.mbt / patterns.mbtdrawing and procedural scenes
    effects.mbt / transform.mbtnoise, blur, morphology, and transforms
    filters.mbtkernels, border modes, convolution, median and adaptive filters
    annotation.mbt / geometry_extra.mbtannotations, masks, boxes, and flow
    manifest.mbt / dataset_ops.mbtmanifests, splits, and dataset operations
    formats.mbt / camera.mbtCOCO-style records, mask RLE, projection, distortion
    flow_ops.mbt / sampling.mbtflow fields, warps, seeded sampling and fixtures
    augmentation.mbt / evaluation.mbtreproducible augmentation and quality metrics
    components.mbt / resampling.mbtconnected components, holes, pyramids, matching
    geometry_ops.mbt / calibration.mbtpolygons, affine/projective maps, calibration
    features.mbt / pipeline.mbtgradients, corners, descriptors, vision pipelines
    tracking.mbt / flow_analysis.mbtIoU tracking and optical-flow diagnostics
    color_ops.mbt / rendering.mbtRGB/HSV helpers and annotation overlays
    synthetic_variants.mbt / evaluation_reports.mbtvariant pairs and batch reports
    dataset_index.mbt / integrity.mbt / benchmarking.mbtindexing, audits, workloads
    dataset_splits.mbtcross-validation, temporal splits, set operations
    analytics.mbtimage statistics and comparison metrics
    suite.mbtreusable recipes and rendering
    cmd/main / cmd/benchpreview and benchmark executables

    #Benchmarks

    Run the benchmark on the same toolchain and machine when comparing changes:

    suite=8 pixels=149987 boxes=5 checksum=22085168 mean=127

    The counters and checksum are deterministic correctness signals. Wall-clock time is environment-dependent; record it separately when publishing results.

    #Testing and CI

    Local validation:

    moon fmt --check moon check --target wasm-gc --deny-warn moon check --target native --deny-warn moon test --target wasm-gc --deny-warn moon test --target native --deny-warn moon info git diff --exit-code

    GitHub Actions runs formatting, warning denial, interface regeneration, tests and coverage on the supported WebAssembly and native targets. Generated pkg.generated.mbti files are checked so public API drift is visible in code review.

    #Development

    See CONTRIBUTING.md for formatting, testing, package boundaries, and pull-request expectations. CHANGELOG.md records user-visible changes and ROADMAP.md tracks future fixture formats and integrations.

    #License

    Apache-2.0. See LICENSE.

    #moonbit-synthetic-vision

    Deterministic synthetic vision fixtures for MoonBit.

    This dependency-light library generates reproducible image assets and ground-truth annotations for computer-vision algorithms, calibration demos, tutorials, and continuous-integration regression tests. It focuses on small, reviewable fixtures that run without external image libraries or network access.

    #Core capabilities

    • Gray/RGB image buffers, safe access, cropping, padding, tiling, resizing, rotation, channel conversion, and PGM/PPM export.
    • Checkerboards, calibration boards, dot grids, gradients, target scenes, deterministic noise, blur, occlusion, and seeded augmentation.
    • Drawing, thresholding, morphology, Sobel edges, convolution, adaptive filters, masks, bounding boxes, keypoints, optical flow, YOLO, and COCO JSON.
    • Dataset manifests, tag filtering, deterministic train/validation/holdout splitting, cross-validation, temporal holdouts, indexing, and set operations.
    • Connected components, hole filling, image pyramids, template matching, polygon geometry, convex hulls, affine/projective transforms, and camera calibration helpers.
    • Gradients, corners, patch descriptors, IoU tracking, batch evaluation, RGB overlays, synthetic variants, workload counters, and reproducibility audits.

    #Quick start

    moon check --target wasm-gc --deny-warn moon test --target wasm-gc moon run --target wasm-gc cmd/main moon run --target native cmd/bench

    cmd/main prints a human-readable preview. cmd/bench renders the complete default suite and reports deterministic workload counters:

    suite=8 pixels=149987 boxes=5 checksum=22085168 mean=127

    #Architecture

    AreaModules
    Primitives and exporttypes.mbt, image.mbt, export.mbt
    Patterns and transformspatterns.mbt, draw.mbt, effects.mbt, transform.mbt
    Annotations and formatsannotation.mbt, formats.mbt, manifest.mbt
    Filters and statisticsfilters.mbt, analytics.mbt, advanced_stats.mbt
    Camera and flowcamera.mbt, calibration.mbt, flow_ops.mbt, flow_analysis.mbt
    Geometry and featuresgeometry_extra.mbt, geometry_ops.mbt, features.mbt
    Dataset operationsdataset_ops.mbt, dataset_index.mbt, dataset_splits.mbt
    Pipelines and evaluationpipeline.mbt, evaluation.mbt, evaluation_reports.mbt, tracking.mbt
    Rendering and variantsrendering.mbt, color_ops.mbt, augmentation.mbt, synthetic_variants.mbt
    Integrity and workloadvalidation.mbt, integrity.mbt, benchmarking.mbt

    #Testing and CI

    The test suite covers degenerate dimensions, clipping, seeded reproducibility, filters, annotations, camera projection, flow, sampling, augmentation, components, geometry, pipelines, tracking, evaluation, variants, and dataset splits. Supported targets are WebAssembly GC and native.

    GitHub Actions checks formatting, denies warnings, runs both targets with coverage, regenerates public interfaces, validates package contents, and runs the preview and benchmark commands. The workflow also rejects a MoonBit compiler older than moonc v0.10.9.

    #Development

    Run moon info && moon fmt after public API changes. See CONTRIBUTING.md for package boundaries and review expectations. User-visible changes are recorded in CHANGELOG.md.

    #License

    Apache-2.0. See LICENSE.

    Affine2D

    pub struct Affine2D {
    a : Int
    b : Int
    c : Int
    d : Int
    tx : Int
    ty : Int
    scale : Int
    } derive(Eq,
    Debug
    )

    Affine2D::apply

    fn Affine2D::apply(self : Affine2D, point : Point) -> Point

    Affine2D::compose

    fn Affine2D::compose(self : Affine2D, next : Affine2D) -> Affine2D

    Affine2D::identity

    fn Affine2D::identity() -> Affine2D

    Affine2D::inverse_apply

    fn Affine2D::inverse_apply(self : Affine2D, point : Point) -> Point

    Affine2D::new

    fn Affine2D::new(a~ : Int, b~ : Int, c~ : Int, d~ : Int, tx~ : Int, ty~ : Int, scale? : Int) -> Affine2D

    AnnotationSummary

    pub struct AnnotationSummary {
    boxes : Int
    visible_keypoints : Int
    mask_pixels : Int
    flow_vectors : Int
    } derive(Eq,
    Debug
    )

    AnnotationSummary::total

    fn AnnotationSummary::total(self : AnnotationSummary) -> Int

    Asset

    pub struct Asset {
    name : String
    image_path : String
    annotation_path : String
    seed : UInt
    tags : Array[String]
    } derive(Eq,
    Debug
    )

    Asset::new

    fn Asset::new(name~ : String, image_path~ : String, annotation_path? : String, seed? : UInt, tags? : Array[String]) -> Asset

    Asset::to_json

    fn Asset::to_json(self : Asset) -> String

    AssetIndex

    pub struct AssetIndex {
    manifest_name : String
    entries : Array[AssetIndexEntry]
    shard_count : Int
    } derive(Eq,
    Debug
    )

    AssetIndex::checksum

    fn AssetIndex::checksum(self : AssetIndex) -> UInt

    AssetIndex::count

    fn AssetIndex::count(self : AssetIndex) -> Int

    AssetIndex::find_prefix

    fn AssetIndex::find_prefix(self : AssetIndex, prefix : String) -> Array[Asset]

    AssetIndex::from_manifest

    fn AssetIndex::from_manifest(manifest : DatasetManifest, shard_count? : Int) -> AssetIndex

    AssetIndex::page

    fn AssetIndex::page(self : AssetIndex, offset : Int, limit : Int) -> Array[Asset]

    AssetIndex::shard

    fn AssetIndex::shard(self : AssetIndex, shard_id : Int) -> Array[Asset]

    AssetIndex::tag_histogram

    fn AssetIndex::tag_histogram(self : AssetIndex) -> Array[String]

    AssetIndex::with_tag

    fn AssetIndex::with_tag(self : AssetIndex, tag : String) -> Array[Asset]

    AssetIndexEntry

    pub struct AssetIndexEntry {
    ordinal : Int
    asset : Asset
    tag_count : Int
    shard : Int
    } derive(Eq,
    Debug
    )

    AssetKind

    pub enum AssetKind {
    Checkerboard
    Calibration
    DotGrid
    Detection
    Segmentation
    Noise
    MotionBlur
    Occlusion
    } derive(Eq,
    Debug
    )

    AugmentationConfig

    pub struct AugmentationConfig {
    brightness : Int
    contrast_numerator : Int
    contrast_denominator : Int
    noise_seed : UInt
    noise_magnitude : Int
    blur_radius : Int
    rotate_quarter_turns : Int
    flip_horizontal : Bool
    } derive(Eq,
    Debug
    )

    AugmentationConfig::identity

    AugmentationConfig::with_contrast

    fn AugmentationConfig::with_contrast(self : AugmentationConfig, numerator : Int, denominator : Int) -> AugmentationConfig

    AugmentationConfig::with_seed

    fn AugmentationConfig::with_seed(seed : UInt, brightness? : Int, noise_magnitude? : Int, blur_radius? : Int, rotate_quarter_turns? : Int, flip_horizontal? : Bool) -> AugmentationConfig

    BatchPipelineResult

    pub struct BatchPipelineResult {
    results : Array[PipelineResult]
    total_pixels : Int
    total_components : Int
    } derive(Eq,
    Debug
    )

    BatchPipelineResult::count

    fn BatchPipelineResult::count(self : BatchPipelineResult) -> Int

    BatchPipelineResult::to_json

    fn BatchPipelineResult::to_json(self : BatchPipelineResult) -> String

    BenchmarkSnapshot

    pub struct BenchmarkSnapshot {
    name : String
    counters : WorkloadCounters
    stable : Bool
    } derive(Eq,
    Debug
    )

    BenchmarkSnapshot::capture

    fn BenchmarkSnapshot::capture(name~ : String, plans : Array[ScenePlan]) -> BenchmarkSnapshot

    BenchmarkSnapshot::to_json

    fn BenchmarkSnapshot::to_json(self : BenchmarkSnapshot) -> String

    BinaryMetrics

    pub struct BinaryMetrics {
    true_positive : Int
    false_positive : Int
    false_negative : Int
    true_negative : Int
    } derive(Eq,
    Debug
    )

    BinaryMetrics::f1

    fn BinaryMetrics::f1(self : BinaryMetrics) -> Int

    BinaryMetrics::new

    fn BinaryMetrics::new(true_positive~ : Int, false_positive~ : Int, false_negative~ : Int, true_negative~ : Int) -> BinaryMetrics

    BinaryMetrics::precision

    fn BinaryMetrics::precision(self : BinaryMetrics) -> Int

    BinaryMetrics::recall

    fn BinaryMetrics::recall(self : BinaryMetrics) -> Int

    BinaryMetrics::specificity

    fn BinaryMetrics::specificity(self : BinaryMetrics) -> Int

    BorderMode

    pub enum BorderMode {
    Clamp
    Reflect
    Constant(Gray)
    } derive(Eq,
    Debug
    )

    Box2D

    pub struct Box2D {
    label : Label
    rect : Rect
    occluded : Bool
    } derive(Eq,
    Debug
    )

    Box2D::area

    fn Box2D::area(self : Box2D) -> Int

    Box2D::center

    fn Box2D::center(self : Box2D) -> Point

    Box2D::clip

    fn Box2D::clip(self : Box2D, size : Size) -> Box2D

    Box2D::iou

    fn Box2D::iou(self : Box2D, other : Box2D) -> Int

    Box2D::is_valid

    fn Box2D::is_valid(self : Box2D) -> Bool

    Box2D::new

    fn Box2D::new(label~ : Label, rect~ : Rect, occluded? : Bool) -> Box2D

    Box2D::to_yolo

    fn Box2D::to_yolo(self : Box2D, size : Size) -> String

    CalibrationEstimate

    pub struct CalibrationEstimate {
    transform : Affine2D
    observations : Int
    error_x1000 : Int
    valid : Bool
    } derive(Eq,
    Debug
    )

    CalibrationEstimate::new

    fn CalibrationEstimate::new(transform~ : Affine2D, observations~ : Int, error_x1000~ : Int, valid~ : Bool) -> CalibrationEstimate

    CalibrationObservation

    pub struct CalibrationObservation {
    object : Point
    image : Point
    weight : Int
    } derive(Eq,
    Debug
    )

    CalibrationObservation::new

    fn CalibrationObservation::new(object~ : Point, image~ : Point, weight? : Int) -> CalibrationObservation

    CalibrationSet

    pub struct CalibrationSet {
    name : String
    observations : Array[CalibrationObservation]
    } derive(Eq,
    Debug
    )

    CalibrationSet::add

    fn CalibrationSet::add(self : CalibrationSet, observation : CalibrationObservation) -> Unit

    CalibrationSet::count

    fn CalibrationSet::count(self : CalibrationSet) -> Int

    CalibrationSet::image_bounds

    fn CalibrationSet::image_bounds(self : CalibrationSet) -> Rect

    CalibrationSet::new

    fn CalibrationSet::new(name~ : String) -> CalibrationSet

    CalibrationSet::object_bounds

    fn CalibrationSet::object_bounds(self : CalibrationSet) -> Rect

    CameraModel

    pub struct CameraModel {
    fx : Int
    fy : Int
    cx : Int
    cy : Int
    scale : Int
    } derive(Eq,
    Debug
    )

    CameraModel::new

    fn CameraModel::new(fx~ : Int, fy~ : Int, cx~ : Int, cy~ : Int, scale? : Int) -> CameraModel

    CameraModel::project

    fn CameraModel::project(self : CameraModel, point : Point, depth : Int) -> Point

    CameraModel::scale_to

    fn CameraModel::scale_to(self : CameraModel, size : Size) -> CameraModel

    CameraModel::unproject

    fn CameraModel::unproject(self : CameraModel, pixel : Point, depth : Int) -> Point

    ChecksumEntry

    pub struct ChecksumEntry {
    name : String
    checksum : UInt
    pixels : Int
    annotations : Int
    } derive(Eq,
    Debug
    )

    ChecksumEntry::from_scene

    fn ChecksumEntry::from_scene(scene : SceneOutput) -> ChecksumEntry

    ClassMetrics

    pub struct ClassMetrics {
    class_id : Int
    expected : Int
    actual : Int
    matched : Int
    mean_iou_per_1000 : Int
    } derive(Eq,
    Debug
    )

    ClassMetrics::f1

    fn ClassMetrics::f1(self : ClassMetrics) -> Int

    ClassMetrics::new

    fn ClassMetrics::new(class_id~ : Int) -> ClassMetrics

    ClassMetrics::precision

    fn ClassMetrics::precision(self : ClassMetrics) -> Int

    ClassMetrics::recall

    fn ClassMetrics::recall(self : ClassMetrics) -> Int

    CocoAnnotationRecord

    pub struct CocoAnnotationRecord {
    id : Int
    image_id : Int
    category_id : Int
    bbox : Rect
    area : Int
    iscrowd : Int
    } derive(Eq,
    Debug
    )

    CocoAnnotationRecord::from_box

    fn CocoAnnotationRecord::from_box(id~ : Int, image_id~ : Int, box : Box2D) -> CocoAnnotationRecord

    CocoAnnotationRecord::to_json

    fn CocoAnnotationRecord::to_json(self : CocoAnnotationRecord) -> String

    CocoCategory

    pub struct CocoCategory {
    id : Int
    name : String
    } derive(Eq,
    Debug
    )

    CocoCategory::new

    fn CocoCategory::new(id~ : Int, name~ : String) -> CocoCategory

    CocoDataset

    pub struct CocoDataset {
    description : String
    images : Array[CocoImageRecord]
    annotations : Array[CocoAnnotationRecord]
    categories : Array[CocoCategory]
    } derive(Eq,
    Debug
    )

    CocoDataset::add_annotation

    fn CocoDataset::add_annotation(self : CocoDataset, annotation : CocoAnnotationRecord) -> Unit

    CocoDataset::add_category

    fn CocoDataset::add_category(self : CocoDataset, category : CocoCategory) -> Unit

    CocoDataset::add_image

    fn CocoDataset::add_image(self : CocoDataset, image : CocoImageRecord) -> Unit

    CocoDataset::new

    fn CocoDataset::new(description~ : String) -> CocoDataset

    CocoDataset::to_json

    fn CocoDataset::to_json(self : CocoDataset) -> String

    CocoImageRecord

    pub struct CocoImageRecord {
    id : Int
    file_name : String
    width : Int
    height : Int
    } derive(Eq,
    Debug
    )

    CocoImageRecord::new

    fn CocoImageRecord::new(id~ : Int, file_name~ : String, width~ : Int, height~ : Int) -> CocoImageRecord

    CocoImageRecord::to_json

    fn CocoImageRecord::to_json(self : CocoImageRecord) -> String

    Component

    pub struct Component {
    id : Int
    area : Int
    bounds : Rect
    pixels : Array[Point]
    } derive(Eq,
    Debug
    )

    Component::centroid_x1000

    fn Component::centroid_x1000(self : Component) -> Point

    Component::contains

    fn Component::contains(self : Component, point : Point) -> Bool

    Component::new

    fn Component::new(id~ : Int, pixels~ : Array[Point]) -> Component

    Component::perimeter

    fn Component::perimeter(self : Component, connectivity? : Connectivity) -> Int

    Component::to_mask

    fn Component::to_mask(self : Component, size : Size) -> Mask

    Connectivity

    pub enum Connectivity {
    Four
    Eight
    } derive(Eq,
    Debug
    )

    CornerFeature

    pub struct CornerFeature {
    point : Point
    score : Int
    response : Int
    } derive(Eq,
    Debug
    )

    CornerFeature::new

    fn CornerFeature::new(point~ : Point, score~ : Int, response~ : Int) -> CornerFeature

    CrossValidationPlan

    pub struct CrossValidationPlan {
    folds : Int
    assignments : Array[FoldAssignment]
    } derive(Eq,
    Debug
    )

    CrossValidationPlan::add

    fn CrossValidationPlan::add(self : CrossValidationPlan, assignment : FoldAssignment) -> Unit

    CrossValidationPlan::fold

    fn CrossValidationPlan::fold(self : CrossValidationPlan, fold : Int) -> Array[String]

    CrossValidationPlan::new

    fn CrossValidationPlan::new(folds~ : Int) -> CrossValidationPlan

    CrossValidationPlan::to_json

    fn CrossValidationPlan::to_json(self : CrossValidationPlan) -> String

    CrossValidationPlan::training_fold

    fn CrossValidationPlan::training_fold(self : CrossValidationPlan, fold : Int) -> Array[String]

    CrossValidationPlan::valid

    fn CrossValidationPlan::valid(self : CrossValidationPlan) -> Bool

    DatasetManifest

    pub struct DatasetManifest {
    name : String
    version : String
    assets : Array[Asset]
    } derive(Eq,
    Debug
    )

    DatasetManifest::add

    fn DatasetManifest::add(self : DatasetManifest, asset : Asset) -> Unit

    DatasetManifest::assets_with_seed

    fn DatasetManifest::assets_with_seed(self : DatasetManifest, seed : UInt) -> Array[Asset]

    DatasetManifest::filter_tag

    fn DatasetManifest::filter_tag(self : DatasetManifest, tag : String) -> DatasetManifest

    DatasetManifest::has_unique_names

    fn DatasetManifest::has_unique_names(self : DatasetManifest) -> Bool

    DatasetManifest::index

    fn DatasetManifest::index(self : DatasetManifest, shard_count : Int) -> AssetIndex

    DatasetManifest::new

    fn DatasetManifest::new(name~ : String, version? : String) -> DatasetManifest

    DatasetManifest::seeds

    fn DatasetManifest::seeds(self : DatasetManifest) -> Array[UInt]

    DatasetManifest::to_json

    fn DatasetManifest::to_json(self : DatasetManifest) -> String

    DatasetManifest::total_tags

    fn DatasetManifest::total_tags(self : DatasetManifest) -> Int

    DatasetSplit

    pub struct DatasetSplit {
    train : Array[Asset]
    validation : Array[Asset]
    holdout : Array[Asset]
    } derive(Eq,
    Debug
    )

    DatasetSplit::to_manifest

    fn DatasetSplit::to_manifest(self : DatasetSplit, name : String, version : String) -> DatasetManifest

    DatasetSplit::total

    fn DatasetSplit::total(self : DatasetSplit) -> Int

    DetectionMatch

    pub struct DetectionMatch {
    expected_id : Int
    actual_id : Int
    iou_per_1000 : Int
    } derive(Eq,
    Debug
    )

    DetectionMatch::new

    fn DetectionMatch::new(expected_id~ : Int, actual_id~ : Int, iou_per_1000~ : Int) -> DetectionMatch

    DetectionMetrics

    pub struct DetectionMetrics {
    matches : Int
    expected : Int
    actual : Int
    mean_iou_per_1000 : Int
    } derive(Eq,
    Debug
    )

    DetectionMetrics::precision

    fn DetectionMetrics::precision(self : DetectionMetrics) -> Int

    DetectionMetrics::recall

    fn DetectionMetrics::recall(self : DetectionMetrics) -> Int

    DetectionMetrics::to_json

    fn DetectionMetrics::to_json(self : DetectionMetrics) -> String

    EvaluationReport

    pub struct EvaluationReport {
    images : Int
    classes : Array[ClassMetrics]
    mask : BinaryMetrics
    mean_image_iou_per_1000 : Int
    } derive(Eq,
    Debug
    )

    EvaluationReport::add_detection_image

    fn EvaluationReport::add_detection_image(self : EvaluationReport, expected : Array[Box2D], actual : Array[Box2D], threshold_per_1000 : Int) -> Unit

    EvaluationReport::add_mask_image

    fn EvaluationReport::add_mask_image(self : EvaluationReport, expected : Mask, actual : Mask, positive : Int) -> Unit

    EvaluationReport::macro_f1

    fn EvaluationReport::macro_f1(self : EvaluationReport) -> Int

    EvaluationReport::macro_precision

    fn EvaluationReport::macro_precision(self : EvaluationReport) -> Int

    EvaluationReport::macro_recall

    fn EvaluationReport::macro_recall(self : EvaluationReport) -> Int

    EvaluationReport::new

    EvaluationReport::to_json

    fn EvaluationReport::to_json(self : EvaluationReport) -> String

    FlowField

    pub struct FlowField {
    width : Int
    height : Int
    vectors : Array[FlowVector]
    } derive(Eq,
    Debug
    )

    FlowField::at

    fn FlowField::at(self : FlowField, x : Int, y : Int) -> FlowVector

    FlowField::constant

    fn FlowField::constant(size : Size, dx : Int, dy : Int) -> FlowField

    FlowField::direction_image

    fn FlowField::direction_image(self : FlowField) -> GrayImage

    FlowField::from_vectors

    fn FlowField::from_vectors(size : Size, vectors : Array[FlowVector]) -> FlowField

    FlowField::magnitude_image

    fn FlowField::magnitude_image(self : FlowField) -> GrayImage

    FlowField::mean

    fn FlowField::mean(self : FlowField) -> Point

    FlowField::new

    fn FlowField::new(width~ : Int, height~ : Int) -> FlowField

    FlowField::size

    fn FlowField::size(self : FlowField) -> Size

    FlowField::to_json

    fn FlowField::to_json(self : FlowField) -> String

    FlowStats

    pub struct FlowStats {
    count : Int
    mean_dx : Int
    mean_dy : Int
    mean_magnitude : Int
    max_magnitude : Int
    out_of_bounds : Int
    } derive(Eq,
    Debug
    )

    FlowStats::from_flow

    fn FlowStats::from_flow(flow : Array[FlowVector], size : Size) -> FlowStats

    FlowVector

    pub struct FlowVector {
    x : Int
    y : Int
    dx : Int
    dy : Int
    } derive(Eq,
    Debug
    )

    FlowVector::new

    fn FlowVector::new(x~ : Int, y~ : Int, dx~ : Int, dy~ : Int) -> FlowVector

    FoldAssignment

    pub struct FoldAssignment {
    asset_name : String
    fold : Int
    role : String
    } derive(Eq,
    Debug
    )

    FoldAssignment::new

    fn FoldAssignment::new(asset_name~ : String, fold~ : Int, role~ : String) -> FoldAssignment

    GradientField

    pub struct GradientField {
    width : Int
    height : Int
    pixels : Array[GradientPixel]
    } derive(Eq,
    Debug
    )

    GradientField::direction_code

    fn GradientField::direction_code(self : GradientField, x : Int, y : Int) -> Int

    GradientField::from_image

    fn GradientField::from_image(image : GrayImage) -> GradientField

    GradientField::get

    fn GradientField::get(self : GradientField, x : Int, y : Int) -> GradientPixel

    GradientField::in_bounds

    fn GradientField::in_bounds(self : GradientField, x : Int, y : Int) -> Bool

    GradientField::index

    fn GradientField::index(self : GradientField, x : Int, y : Int) -> Int

    GradientField::magnitude_image

    fn GradientField::magnitude_image(self : GradientField) -> GrayImage

    GradientField::mean_magnitude

    fn GradientField::mean_magnitude(self : GradientField) -> Int

    GradientPixel

    pub struct GradientPixel {
    point : Point
    gx : Int
    gy : Int
    magnitude : Int
    } derive(Eq,
    Debug
    )

    GradientPixel::new

    fn GradientPixel::new(point~ : Point, gx~ : Int, gy~ : Int) -> GradientPixel

    Gray

    pub struct Gray {
    value : Int
    } derive(Eq,
    Debug
    )

    Gray::black

    fn Gray::black() -> Gray

    Gray::blend

    fn Gray::blend(a : Gray, b : Gray, alpha_255 : Int) -> Gray

    Gray::new

    fn Gray::new(value : Int) -> Gray

    Gray::white

    fn Gray::white() -> Gray

    GrayImage

    pub struct GrayImage {
    width : Int
    height : Int
    pixels : Array[Int]
    } derive(Eq,
    Debug
    )

    GrayImage::adaptive_threshold

    fn GrayImage::adaptive_threshold(self : GrayImage, radius : Int, offset : Int) -> GrayImage

    GrayImage::add_brightness

    fn GrayImage::add_brightness(self : GrayImage, delta : Int) -> GrayImage

    GrayImage::apply_radial_distortion

    fn GrayImage::apply_radial_distortion(self : GrayImage, distortion : RadialDistortion) -> GrayImage

    GrayImage::blend_weighted

    fn GrayImage::blend_weighted(self : GrayImage, other : GrayImage, weight_per_1000 : Int) -> GrayImage

    GrayImage::bounds

    fn GrayImage::bounds(self : GrayImage) -> Rect

    GrayImage::close

    fn GrayImage::close(self : GrayImage, radius : Int) -> GrayImage

    GrayImage::constant_mean_filter

    fn GrayImage::constant_mean_filter(self : GrayImage, width : Int, height : Int, fill : Gray) -> GrayImage

    GrayImage::convolve

    fn GrayImage::convolve(self : GrayImage, kernel : Kernel, border? : BorderMode) -> GrayImage

    GrayImage::copy

    fn GrayImage::copy(self : GrayImage) -> GrayImage

    GrayImage::count_in_range

    fn GrayImage::count_in_range(self : GrayImage, low : Int, high : Int) -> Int

    GrayImage::count_value

    fn GrayImage::count_value(self : GrayImage, value : Int) -> Int

    GrayImage::crop

    fn GrayImage::crop(self : GrayImage, rect : Rect) -> GrayImage

    GrayImage::crop_padded

    fn GrayImage::crop_padded(self : GrayImage, region : Rect, fill? : Gray) -> GrayImage

    GrayImage::difference

    fn GrayImage::difference(self : GrayImage, other : GrayImage) -> GrayImage

    GrayImage::dilate

    fn GrayImage::dilate(self : GrayImage, radius : Int) -> GrayImage

    GrayImage::downsample

    fn GrayImage::downsample(self : GrayImage, levels : Int) -> GrayImage

    GrayImage::draw_circle

    fn GrayImage::draw_circle(self : GrayImage, center : Point, radius : Int, gray : Gray) -> Unit

    GrayImage::draw_line

    fn GrayImage::draw_line(self : GrayImage, a : Point, b : Point, gray : Gray) -> Unit

    GrayImage::draw_rect

    fn GrayImage::draw_rect(self : GrayImage, rect : Rect, gray : Gray) -> Unit

    GrayImage::edge_map

    fn GrayImage::edge_map(self : GrayImage, threshold : Int) -> GrayImage

    GrayImage::equalize_histogram

    fn GrayImage::equalize_histogram(self : GrayImage) -> GrayImage

    GrayImage::erode

    fn GrayImage::erode(self : GrayImage, radius : Int) -> GrayImage

    GrayImage::fill_circle

    fn GrayImage::fill_circle(self : GrayImage, center : Point, radius : Int, gray : Gray) -> Unit

    GrayImage::fill_rect

    fn GrayImage::fill_rect(self : GrayImage, rect : Rect, gray : Gray) -> Unit

    GrayImage::flip_horizontal

    fn GrayImage::flip_horizontal(self : GrayImage) -> GrayImage

    GrayImage::flip_vertical

    fn GrayImage::flip_vertical(self : GrayImage) -> GrayImage

    GrayImage::from_size

    fn GrayImage::from_size(size : Size, fill? : Gray) -> GrayImage

    GrayImage::get

    fn GrayImage::get(self : GrayImage, x : Int, y : Int) -> Gray

    GrayImage::histogram

    fn GrayImage::histogram(self : GrayImage, bins : Int) -> Array[Int]

    GrayImage::histogram_summary

    fn GrayImage::histogram_summary(self : GrayImage, bin_count? : Int) -> HistogramSummary

    GrayImage::in_bounds

    fn GrayImage::in_bounds(self : GrayImage, x : Int, y : Int) -> Bool

    GrayImage::index

    fn GrayImage::index(self : GrayImage, x : Int, y : Int) -> Int

    GrayImage::invert

    fn GrayImage::invert(self : GrayImage) -> GrayImage

    GrayImage::local_contrast

    fn GrayImage::local_contrast(self : GrayImage, radius : Int) -> GrayImage

    GrayImage::map

    fn GrayImage::map(self : GrayImage, f : (Int) -> Int) -> GrayImage

    GrayImage::match_template

    fn GrayImage::match_template(self : GrayImage, template : GrayImage, stride : Int) -> Point

    GrayImage::mean

    fn GrayImage::mean(self : GrayImage) -> Int

    GrayImage::mean_abs_error

    fn GrayImage::mean_abs_error(self : GrayImage, other : GrayImage) -> Int

    GrayImage::mean_filter

    fn GrayImage::mean_filter(self : GrayImage, width : Int, height : Int, border? : BorderMode) -> GrayImage

    GrayImage::median_filter

    fn GrayImage::median_filter(self : GrayImage, radius : Int, border? : BorderMode) -> GrayImage

    GrayImage::mse_x1000

    fn GrayImage::mse_x1000(self : GrayImage, other : GrayImage) -> Int

    GrayImage::multiply_contrast

    fn GrayImage::multiply_contrast(self : GrayImage, numerator : Int, denominator : Int) -> GrayImage

    GrayImage::new

    fn GrayImage::new(width~ : Int, height~ : Int, fill? : Gray) -> GrayImage

    GrayImage::normalized_convolve

    fn GrayImage::normalized_convolve(self : GrayImage, kernel : Kernel, border? : BorderMode) -> GrayImage

    GrayImage::open

    fn GrayImage::open(self : GrayImage, radius : Int) -> GrayImage

    GrayImage::otsu_threshold

    fn GrayImage::otsu_threshold(self : GrayImage) -> Int

    GrayImage::pad

    fn GrayImage::pad(self : GrayImage, border : Int, fill : Gray) -> GrayImage

    GrayImage::pad_with

    fn GrayImage::pad_with(self : GrayImage, border : Int, fill? : Gray) -> GrayImage

    GrayImage::percentile

    fn GrayImage::percentile(self : GrayImage, percentile_per_1000 : Int) -> Int

    GrayImage::posterize

    fn GrayImage::posterize(self : GrayImage, levels : Int) -> GrayImage

    GrayImage::psnr_x1000

    fn GrayImage::psnr_x1000(self : GrayImage, other : GrayImage) -> Int

    GrayImage::pyramid

    fn GrayImage::pyramid(self : GrayImage, levels : Int) -> Array[GrayImage]

    GrayImage::quantize

    fn GrayImage::quantize(self : GrayImage, levels : Int) -> GrayImage

    GrayImage::reflect_mean_filter

    fn GrayImage::reflect_mean_filter(self : GrayImage, width : Int, height : Int) -> GrayImage

    GrayImage::resize

    fn GrayImage::resize(self : GrayImage, size : Size, config? : ResampleConfig) -> GrayImage

    GrayImage::resize_bilinear

    fn GrayImage::resize_bilinear(self : GrayImage, size : Size) -> GrayImage

    GrayImage::resize_nearest

    fn GrayImage::resize_nearest(self : GrayImage, size : Size) -> GrayImage

    GrayImage::resize_nearest_resampled

    fn GrayImage::resize_nearest_resampled(self : GrayImage, size : Size) -> GrayImage

    GrayImage::rotate

    fn GrayImage::rotate(self : GrayImage, turns : Int) -> GrayImage

    GrayImage::rotate180

    fn GrayImage::rotate180(self : GrayImage) -> GrayImage

    GrayImage::rotate90_ccw

    fn GrayImage::rotate90_ccw(self : GrayImage) -> GrayImage

    GrayImage::rotate90_cw

    fn GrayImage::rotate90_cw(self : GrayImage) -> GrayImage

    GrayImage::set

    fn GrayImage::set(self : GrayImage, x : Int, y : Int, gray : Gray) -> Unit

    GrayImage::size

    fn GrayImage::size(self : GrayImage) -> Size

    GrayImage::sobel_x

    fn GrayImage::sobel_x(self : GrayImage) -> GrayImage

    GrayImage::sobel_y

    fn GrayImage::sobel_y(self : GrayImage) -> GrayImage

    GrayImage::stats

    fn GrayImage::stats(self : GrayImage) -> ImageStats

    GrayImage::sum

    fn GrayImage::sum(self : GrayImage) -> Int

    GrayImage::threshold

    fn GrayImage::threshold(self : GrayImage, cutoff : Int) -> GrayImage

    GrayImage::tile

    fn GrayImage::tile(self : GrayImage, tile_size : Size) -> Array[GrayImage]

    GrayImage::to_ascii_art

    fn GrayImage::to_ascii_art(self : GrayImage) -> String

    GrayImage::to_pgm

    fn GrayImage::to_pgm(self : GrayImage) -> String

    GrayImage::translate

    fn GrayImage::translate(self : GrayImage, dx : Int, dy : Int, fill : Gray) -> GrayImage

    GrayImage::unsharp_mask

    fn GrayImage::unsharp_mask(self : GrayImage, radius : Int, amount_per_100 : Int) -> GrayImage

    GrayImage::warp_affine_integer

    fn GrayImage::warp_affine_integer(self : GrayImage, offset : Point, fill : Gray) -> GrayImage

    GrayImage::warp_projective

    fn GrayImage::warp_projective(self : GrayImage, transform : Projective2D, fill? : Gray) -> GrayImage

    HistogramSummary

    pub struct HistogramSummary {
    bins : Array[Int]
    total : Int
    min : Int
    max : Int
    } derive(Eq,
    Debug
    )

    HistogramSummary::count_at

    fn HistogramSummary::count_at(self : HistogramSummary, bin : Int) -> Int

    HistogramSummary::cumulative_at

    fn HistogramSummary::cumulative_at(self : HistogramSummary, bin : Int) -> Int

    HistogramSummary::entropy_x1000

    fn HistogramSummary::entropy_x1000(self : HistogramSummary) -> Int

    HistogramSummary::from_image

    fn HistogramSummary::from_image(image : GrayImage, bin_count? : Int) -> HistogramSummary

    HistogramSummary::percentile

    fn HistogramSummary::percentile(self : HistogramSummary, percentile_per_1000 : Int) -> Int

    HsvPixel

    pub struct HsvPixel {
    hue : Int
    saturation : Int
    value : Int
    } derive(Eq,
    Debug
    )

    HsvPixel::new

    fn HsvPixel::new(hue~ : Int, saturation~ : Int, value~ : Int) -> HsvPixel

    ImageStats

    pub struct ImageStats {
    min : Int
    max : Int
    mean_x1000 : Int
    variance_x1000 : Int
    nonzero : Int
    count : Int
    } derive(Eq,
    Debug
    )

    ImageStats::dynamic_range

    fn ImageStats::dynamic_range(self : ImageStats) -> Int

    ImageStats::from_gray

    fn ImageStats::from_gray(image : GrayImage) -> ImageStats

    ImageStats::is_constant

    fn ImageStats::is_constant(self : ImageStats) -> Bool

    InstanceAnnotation

    pub struct InstanceAnnotation {
    id : Int
    label : Label
    bbox : Box2D
    keypoints : Array[Keypoint]
    } derive(Eq,
    Debug
    )

    InstanceAnnotation::new

    fn InstanceAnnotation::new(id~ : Int, label~ : Label, bbox~ : Box2D, keypoints? : Array[Keypoint]) -> InstanceAnnotation

    IntegrityReport

    pub struct IntegrityReport {
    checked : Int
    stable : Int
    unstable : Int
    duplicate_checksums : Int
    errors : Array[String]
    } derive(Eq,
    Debug
    )

    IntegrityReport::from_records

    IntegrityReport::to_json

    fn IntegrityReport::to_json(self : IntegrityReport) -> String

    IntegrityReport::valid

    fn IntegrityReport::valid(self : IntegrityReport) -> Bool

    Kernel

    pub struct Kernel {
    width : Int
    height : Int
    values : Array[Int]
    } derive(Eq,
    Debug
    )

    Kernel::at

    fn Kernel::at(self : Kernel, x : Int, y : Int) -> Int

    Kernel::box_filter

    fn Kernel::box_filter(width : Int, height : Int) -> Kernel

    Kernel::new

    fn Kernel::new(width~ : Int, height~ : Int, values~ : Array[Int]) -> Kernel

    Kernel::scale

    fn Kernel::scale(self : Kernel, numerator : Int, denominator : Int) -> Kernel

    Kernel::sharpen

    fn Kernel::sharpen() -> Kernel

    Kernel::sobel_x

    fn Kernel::sobel_x() -> Kernel

    Kernel::sobel_y

    fn Kernel::sobel_y() -> Kernel

    Kernel::sum

    fn Kernel::sum(self : Kernel) -> Int

    Keypoint

    pub struct Keypoint {
    label : String
    point : Point
    visible : Bool
    } derive(Eq,
    Debug
    )

    Keypoint::new

    fn Keypoint::new(label~ : String, point~ : Point, visible? : Bool) -> Keypoint

    Label

    pub struct Label {
    id : Int
    name : String
    } derive(Eq,
    Debug
    )

    Label::new

    fn Label::new(id~ : Int, name~ : String) -> Label

    LineSegment

    pub struct LineSegment {
    start : Point
    end : Point
    } derive(Eq,
    Debug
    )

    LineSegment::bounds

    fn LineSegment::bounds(self : LineSegment) -> Rect

    LineSegment::length_l1

    fn LineSegment::length_l1(self : LineSegment) -> Int

    LineSegment::new

    fn LineSegment::new(start~ : Point, end~ : Point) -> LineSegment

    LineSegment::sample

    fn LineSegment::sample(self : LineSegment, count : Int) -> Array[Point]

    Mask

    pub struct Mask {
    width : Int
    height : Int
    values : Array[Int]
    } derive(Eq,
    Debug
    )

    Mask::bounding_box

    fn Mask::bounding_box(self : Mask, id : Int) -> Rect

    Mask::count

    fn Mask::count(self : Mask, id : Int) -> Int

    Mask::fill_rect

    fn Mask::fill_rect(self : Mask, rect : Rect, id : Int) -> Unit

    Mask::in_bounds

    fn Mask::in_bounds(self : Mask, x : Int, y : Int) -> Bool

    Mask::index

    fn Mask::index(self : Mask, x : Int, y : Int) -> Int

    Mask::new

    fn Mask::new(width~ : Int, height~ : Int) -> Mask

    Mask::set

    fn Mask::set(self : Mask, x : Int, y : Int, id : Int) -> Unit

    Mask::to_pgm

    fn Mask::to_pgm(self : Mask) -> String

    Mask::to_rle

    fn Mask::to_rle(self : Mask) -> MaskRle

    MaskRle

    pub struct MaskRle {
    width : Int
    height : Int
    runs : Array[MaskRun]
    } derive(Eq,
    Debug
    )

    MaskRle::from_mask

    fn MaskRle::from_mask(mask : Mask) -> MaskRle

    MaskRle::pixel_count

    fn MaskRle::pixel_count(self : MaskRle, value : Int) -> Int

    MaskRle::to_json

    fn MaskRle::to_json(self : MaskRle) -> String

    MaskRun

    pub struct MaskRun {
    value : Int
    length : Int
    } derive(Eq,
    Debug
    )

    MaskRun::new

    fn MaskRun::new(value~ : Int, length~ : Int) -> MaskRun

    OverlayStyle

    pub struct OverlayStyle {
    box_color : Rgb
    mask_color : Rgb
    keypoint_color : Rgb
    line_width : Int
    mask_alpha_per_1000 : Int
    } derive(Eq,
    Debug
    )

    OverlayStyle::default

    fn OverlayStyle::default() -> OverlayStyle

    OverlayStyle::new

    fn OverlayStyle::new(box_color? : Rgb, mask_color? : Rgb, keypoint_color? : Rgb, line_width? : Int, mask_alpha_per_1000? : Int) -> OverlayStyle

    PatchDescriptor

    pub struct PatchDescriptor {
    center : Point
    radius : Int
    values : Array[Int]
    } derive(Eq,
    Debug
    )

    PatchDescriptor::distance

    fn PatchDescriptor::distance(self : PatchDescriptor, other : PatchDescriptor) -> Int

    PatchDescriptor::from_image

    fn PatchDescriptor::from_image(image : GrayImage, center : Point, radius : Int) -> PatchDescriptor

    PipelineConfig

    pub struct PipelineConfig {
    threshold : Int
    radius : Int
    minimum_component_area : Int
    stages : Array[PipelineStage]
    } derive(Eq,
    Debug
    )

    PipelineConfig::add

    fn PipelineConfig::add(self : PipelineConfig, stage : PipelineStage) -> Unit

    PipelineConfig::new

    fn PipelineConfig::new(threshold? : Int, radius? : Int, minimum_component_area? : Int) -> PipelineConfig

    PipelineConfig::with_default_stages

    fn PipelineConfig::with_default_stages() -> PipelineConfig

    PipelineResult

    pub struct PipelineResult {
    image : GrayImage
    traces : Array[PipelineTrace]
    components : Array[Component]
    valid : Bool
    } derive(Eq,
    Debug
    )

    PipelineResult::component_count

    fn PipelineResult::component_count(self : PipelineResult) -> Int

    PipelineResult::new

    fn PipelineResult::new(image~ : GrayImage, traces~ : Array[PipelineTrace], components~ : Array[Component]) -> PipelineResult

    PipelineResult::stage_count

    fn PipelineResult::stage_count(self : PipelineResult) -> Int

    PipelineResult::to_json

    fn PipelineResult::to_json(self : PipelineResult) -> String

    PipelineResult::trace

    fn PipelineResult::trace(self : PipelineResult, index : Int) -> PipelineTrace?

    PipelineStage

    pub enum PipelineStage {
    Normalize
    Denoise
    AdaptiveThreshold
    Morphology
    Edges
    ConnectedComponents
    Equalize
    } derive(Eq,
    Debug
    )

    PipelineTrace

    pub struct PipelineTrace {
    stage : PipelineStage
    width : Int
    height : Int
    checksum : UInt
    mean : Int
    } derive(Eq,
    Debug
    )

    PipelineTrace::from_image

    fn PipelineTrace::from_image(stage : PipelineStage, image : GrayImage) -> PipelineTrace

    Point

    pub struct Point {
    x : Int
    y : Int
    } derive(Eq,
    Debug
    )

    Point::distance_l1

    fn Point::distance_l1(self : Point, other : Point) -> Int

    Point::distance_linf

    fn Point::distance_linf(self : Point, other : Point) -> Int

    Point::new

    fn Point::new(x~ : Int, y~ : Int) -> Point

    Point::translate

    fn Point::translate(self : Point, dx : Int, dy : Int) -> Point

    Polygon

    pub struct Polygon {
    points : Array[Point]
    } derive(Eq,
    Debug
    )

    Polygon::area

    fn Polygon::area(self : Polygon) -> Int

    Polygon::bounds

    fn Polygon::bounds(self : Polygon) -> Rect

    Polygon::centroid

    fn Polygon::centroid(self : Polygon) -> Point

    Polygon::contains

    fn Polygon::contains(self : Polygon, point : Point) -> Bool

    Polygon::empty

    fn Polygon::empty() -> Polygon

    Polygon::new

    fn Polygon::new(points : Array[Point]) -> Polygon

    Polygon::point_count

    fn Polygon::point_count(self : Polygon) -> Int

    Polygon::scale

    fn Polygon::scale(self : Polygon, numerator : Int, denominator : Int) -> Polygon

    Polygon::signed_area_x2

    fn Polygon::signed_area_x2(self : Polygon) -> Int

    Polygon::translate

    fn Polygon::translate(self : Polygon, dx : Int, dy : Int) -> Polygon

    Projective2D

    pub struct Projective2D {
    h11 : Int
    h12 : Int
    h13 : Int
    h21 : Int
    h22 : Int
    h23 : Int
    h31 : Int
    h32 : Int
    denominator : Int
    } derive(Eq,
    Debug
    )

    Projective2D::apply

    fn Projective2D::apply(self : Projective2D, point : Point) -> Point

    Projective2D::identity

    fn Projective2D::identity() -> Projective2D

    Projective2D::inverse_approx

    fn Projective2D::inverse_approx(self : Projective2D, point : Point) -> Point

    Projective2D::new

    fn Projective2D::new(h11~ : Int, h12~ : Int, h13~ : Int, h21~ : Int, h22~ : Int, h23~ : Int, h31~ : Int, h32~ : Int, denominator? : Int) -> Projective2D

    RadialDistortion

    pub struct RadialDistortion {
    k1_per_100k : Int
    k2_per_100k : Int
    center : Point
    radius : Int
    } derive(Eq,
    Debug
    )

    RadialDistortion::distort

    fn RadialDistortion::distort(self : RadialDistortion, point : Point) -> Point

    RadialDistortion::new

    fn RadialDistortion::new(k1_per_100k~ : Int, k2_per_100k~ : Int, center~ : Point, radius~ : Int) -> RadialDistortion

    RadialDistortion::undistort

    fn RadialDistortion::undistort(self : RadialDistortion, point : Point) -> Point

    Rect

    pub struct Rect {
    x : Int
    y : Int
    width : Int
    height : Int
    } derive(Eq,
    Debug
    )

    Rect::area

    fn Rect::area(self : Rect) -> Int

    Rect::bottom

    fn Rect::bottom(self : Rect) -> Int

    Rect::center

    fn Rect::center(self : Rect) -> Point

    Rect::contains

    fn Rect::contains(self : Rect, p : Point) -> Bool

    Rect::inflate

    fn Rect::inflate(self : Rect, amount : Int) -> Rect

    Rect::intersection

    fn Rect::intersection(self : Rect, other : Rect) -> Rect

    Rect::iou

    fn Rect::iou(self : Rect, other : Rect) -> Int

    Rect::is_empty

    fn Rect::is_empty(self : Rect) -> Bool

    Rect::new

    fn Rect::new(x~ : Int, y~ : Int, width~ : Int, height~ : Int) -> Rect

    Rect::right

    fn Rect::right(self : Rect) -> Int

    Rect::split_horizontal

    fn Rect::split_horizontal(self : Rect, parts : Int) -> Array[Rect]

    Rect::split_vertical

    fn Rect::split_vertical(self : Rect, parts : Int) -> Array[Rect]

    Rect::to_mask

    fn Rect::to_mask(self : Rect, size : Size, id : Int) -> Mask

    Rect::translate

    fn Rect::translate(self : Rect, dx : Int, dy : Int) -> Rect

    Rect::union

    fn Rect::union(self : Rect, other : Rect) -> Rect

    RegionSummary

    pub struct RegionSummary {
    rect : Rect
    count : Int
    min : Int
    max : Int
    mean_x1000 : Int
    } derive(Eq,
    Debug
    )

    RegionSummary::contrast

    fn RegionSummary::contrast(self : RegionSummary) -> Int

    ReproducibilityRecord

    pub struct ReproducibilityRecord {
    name : String
    first_checksum : UInt
    second_checksum : UInt
    stable : Bool
    annotation_stable : Bool
    } derive(Eq,
    Debug
    )

    ResampleConfig

    pub struct ResampleConfig {
    filter : ResampleFilter
    fill : Gray
    } derive(Eq,
    Debug
    )

    ResampleConfig::new

    fn ResampleConfig::new(filter? : ResampleFilter, fill? : Gray) -> ResampleConfig

    ResampleFilter

    pub enum ResampleFilter {
    Nearest
    Bilinear
    Area
    } derive(Eq,
    Debug
    )

    Rgb

    pub struct Rgb {
    r : Int
    g : Int
    b : Int
    } derive(Eq,
    Debug
    )

    Rgb::from_gray

    fn Rgb::from_gray(gray : Gray) -> Rgb

    Rgb::luminance

    fn Rgb::luminance(self : Rgb) -> Int

    Rgb::max_channel

    fn Rgb::max_channel(self : Rgb) -> Int

    Rgb::min_channel

    fn Rgb::min_channel(self : Rgb) -> Int

    Rgb::new

    fn Rgb::new(r~ : Int, g~ : Int, b~ : Int) -> Rgb

    Rgb::to_hsv

    fn Rgb::to_hsv(self : Rgb) -> HsvPixel

    RgbImage

    pub struct RgbImage {
    width : Int
    height : Int
    pixels : Array[Rgb]
    } derive(Eq,
    Debug
    )

    RgbImage::blend

    fn RgbImage::blend(self : RgbImage, other : RgbImage, alpha_per_1000 : Int) -> RgbImage

    RgbImage::channel

    fn RgbImage::channel(self : RgbImage, index : Int) -> GrayImage

    RgbImage::channel_histogram

    fn RgbImage::channel_histogram(self : RgbImage, channel : Int, bins : Int) -> Array[Int]

    RgbImage::copy

    fn RgbImage::copy(self : RgbImage) -> RgbImage

    RgbImage::crop

    fn RgbImage::crop(self : RgbImage, region : Rect) -> RgbImage

    RgbImage::from_gray

    fn RgbImage::from_gray(src : GrayImage) -> RgbImage

    RgbImage::get

    fn RgbImage::get(self : RgbImage, x : Int, y : Int) -> Rgb

    RgbImage::grayscale

    fn RgbImage::grayscale(self : RgbImage) -> GrayImage

    RgbImage::in_bounds

    fn RgbImage::in_bounds(self : RgbImage, x : Int, y : Int) -> Bool

    RgbImage::index

    fn RgbImage::index(self : RgbImage, x : Int, y : Int) -> Int

    RgbImage::invert

    fn RgbImage::invert(self : RgbImage) -> RgbImage

    RgbImage::luminance

    fn RgbImage::luminance(self : RgbImage) -> GrayImage

    RgbImage::map

    fn RgbImage::map(self : RgbImage, f : (Rgb) -> Rgb) -> RgbImage

    RgbImage::map_channels

    fn RgbImage::map_channels(self : RgbImage, red_delta : Int, green_delta : Int, blue_delta : Int) -> RgbImage

    RgbImage::mean_luminance

    fn RgbImage::mean_luminance(self : RgbImage) -> Int

    RgbImage::new

    fn RgbImage::new(width~ : Int, height~ : Int, fill? : Rgb) -> RgbImage

    RgbImage::replace_channel

    fn RgbImage::replace_channel(self : RgbImage, channel : Int, value : Int) -> RgbImage

    RgbImage::replace_color_range

    fn RgbImage::replace_color_range(self : RgbImage, low : Gray, high : Gray, replacement : Rgb) -> RgbImage

    RgbImage::resize_nearest

    fn RgbImage::resize_nearest(self : RgbImage, size : Size) -> RgbImage

    RgbImage::set

    fn RgbImage::set(self : RgbImage, x : Int, y : Int, rgb : Rgb) -> Unit

    RgbImage::size

    fn RgbImage::size(self : RgbImage) -> Size

    RgbImage::to_ppm

    fn RgbImage::to_ppm(self : RgbImage) -> String

    Rng

    pub struct Rng {
    state : UInt
    } derive(
    Debug
    )

    Rng::chance

    fn Rng::chance(self : Rng, numerator~ : Int, denominator~ : Int) -> Bool

    Rng::new

    fn Rng::new(seed : UInt) -> Rng

    Rng::next_int

    fn Rng::next_int(self : Rng, upper : Int) -> Int

    Rng::next_u32

    fn Rng::next_u32(self : Rng) -> UInt

    Rng::range

    fn Rng::range(self : Rng, low~ : Int, high~ : Int) -> Int

    Rng::signed

    fn Rng::signed(self : Rng, magnitude : Int) -> Int

    SamplingConfig

    pub struct SamplingConfig {
    count : Int
    seed : UInt
    strategy : SamplingStrategy
    margin : Int
    } derive(Eq,
    Debug
    )

    SamplingConfig::jittered

    fn SamplingConfig::jittered(count : Int, seed : UInt, margin : Int) -> SamplingConfig

    SamplingConfig::new

    fn SamplingConfig::new(count~ : Int, seed~ : UInt, strategy? : SamplingStrategy, margin? : Int) -> SamplingConfig

    SamplingStrategy

    pub enum SamplingStrategy {
    Uniform
    Grid
    Jittered
    } derive(Eq,
    Debug
    )

    SceneOutput

    pub struct SceneOutput {
    plan : ScenePlan
    image : GrayImage
    mask : Mask
    boxes : Array[Box2D]
    flow : Array[FlowVector]
    } derive(Eq,
    Debug
    )

    SceneOutput::annotation_summary

    fn SceneOutput::annotation_summary(self : SceneOutput) -> AnnotationSummary

    SceneOutput::new

    fn SceneOutput::new(plan~ : ScenePlan, image~ : GrayImage, mask? : Mask, boxes? : Array[Box2D], flow? : Array[FlowVector]) -> SceneOutput

    SceneOutput::to_coco_json

    fn SceneOutput::to_coco_json(self : SceneOutput) -> String

    ScenePlan

    pub struct ScenePlan {
    name : String
    kind : AssetKind
    size : Size
    seed : UInt
    } derive(Eq,
    Debug
    )

    ScenePlan::new

    fn ScenePlan::new(name~ : String, kind~ : AssetKind, size~ : Size, seed? : UInt) -> ScenePlan

    Size

    pub struct Size {
    width : Int
    height : Int
    } derive(Eq,
    Debug
    )

    Size::area

    fn Size::area(self : Size) -> Int

    Size::is_valid

    fn Size::is_valid(self : Size) -> Bool

    Size::new

    fn Size::new(width~ : Int, height~ : Int) -> Size

    SplitSummary

    pub struct SplitSummary {
    training : Int
    validation : Int
    holdout : Int
    unique_assets : Int
    } derive(Eq,
    Debug
    )

    SplitSummary::from_manifest

    fn SplitSummary::from_manifest(split : DatasetSplit) -> SplitSummary

    SplitSummary::is_disjoint

    fn SplitSummary::is_disjoint(self : SplitSummary) -> Bool

    SplitSummary::total

    fn SplitSummary::total(self : SplitSummary) -> Int

    SyntheticPair

    pub struct SyntheticPair {
    plan : VariantPlan
    reference : GrayImage
    variant : GrayImage
    flow : Array[FlowVector]
    } derive(Eq,
    Debug
    )

    SyntheticPair::new

    fn SyntheticPair::new(plan~ : VariantPlan, reference~ : GrayImage, variant~ : GrayImage, flow? : Array[FlowVector]) -> SyntheticPair

    ThresholdPoint

    pub struct ThresholdPoint {
    threshold : Int
    precision : Int
    recall : Int
    f1 : Int
    } derive(Eq,
    Debug
    )

    Track

    pub struct Track {
    id : Int
    label : Label
    state : TrackState
    observations : Array[TrackObservation]
    missed_frames : Int
    } derive(Eq,
    Debug
    )

    Track::add

    fn Track::add(self : Track, observation : TrackObservation, confirmation_frames : Int) -> Unit

    Track::age

    fn Track::age(self : Track) -> Int

    Track::center

    fn Track::center(self : Track) -> Point

    Track::last

    fn Track::last(self : Track) -> TrackObservation?

    Track::mark_missed

    fn Track::mark_missed(self : Track, max_missed : Int) -> Unit

    Track::new

    fn Track::new(id~ : Int, observation : TrackObservation) -> Track

    Track::velocity

    fn Track::velocity(self : Track) -> Point

    TrackObservation

    pub struct TrackObservation {
    frame : Int
    detection : Box2D
    score_per_1000 : Int
    } derive(Eq,
    Debug
    )

    TrackObservation::new

    fn TrackObservation::new(frame~ : Int, detection~ : Box2D, score_per_1000? : Int) -> TrackObservation

    TrackState

    pub enum TrackState {
    Tentative
    Confirmed
    Lost
    Finished
    } derive(Eq,
    Debug
    )

    TrackSummary

    pub struct TrackSummary {
    id : Int
    label_id : Int
    age : Int
    state : TrackState
    center : Point
    velocity : Point
    } derive(Eq,
    Debug
    )

    TrackSummary::from_track

    fn TrackSummary::from_track(track : Track) -> TrackSummary

    Tracker

    pub struct Tracker {
    config : TrackerConfig
    next_id : Int
    tracks : Array[Track]
    } derive(Eq,
    Debug
    )

    Tracker::active

    fn Tracker::active(self : Tracker) -> Array[Track]

    Tracker::finished

    fn Tracker::finished(self : Tracker) -> Array[Track]

    Tracker::new

    fn Tracker::new(config? : TrackerConfig) -> Tracker

    Tracker::update

    fn Tracker::update(self : Tracker, frame : Int, detections : Array[Box2D]) -> Array[Track]

    TrackerConfig

    pub struct TrackerConfig {
    iou_threshold_per_1000 : Int
    max_missed_frames : Int
    confirmation_frames : Int
    } derive(Eq,
    Debug
    )

    TrackerConfig::new

    fn TrackerConfig::new(iou_threshold_per_1000? : Int, max_missed_frames? : Int, confirmation_frames? : Int) -> TrackerConfig

    ValidationReport

    pub struct ValidationReport {
    valid : Bool
    errors : Array[String]
    warnings : Array[String]
    } derive(Eq,
    Debug
    )

    ValidationReport::message_count

    fn ValidationReport::message_count(self : ValidationReport) -> Int

    ValidationReport::new

    ValidationReport::to_json

    fn ValidationReport::to_json(self : ValidationReport) -> String

    VariantKind

    pub enum VariantKind {
    Clean
    LowLight
    HighContrast
    Defocused
    SaltPepper
    Shifted
    Perspective
    } derive(Eq,
    Debug
    )

    VariantPlan

    pub struct VariantPlan {
    name : String
    kind : VariantKind
    seed : UInt
    amount : Int
    } derive(Eq,
    Debug
    )

    VariantPlan::new

    fn VariantPlan::new(name~ : String, kind~ : VariantKind, seed~ : UInt, amount? : Int) -> VariantPlan

    VariantQuality

    pub struct VariantQuality {
    name : String
    kind : VariantKind
    mae : Int
    mse : Int
    flow_error : Int
    } derive(Eq,
    Debug
    )

    VariantQuality::from_pair

    WorkloadCounters

    pub struct WorkloadCounters {
    scenes : Int
    pixels : Int
    boxes : Int
    mask_pixels : Int
    flow_vectors : Int
    image_checksum : UInt
    annotation_checksum : UInt
    } derive(Eq,
    Debug
    )

    WorkloadCounters::add

    fn WorkloadCounters::add(self : WorkloadCounters, other : WorkloadCounters) -> Unit

    WorkloadCounters::add_scene

    fn WorkloadCounters::add_scene(self : WorkloadCounters, scene : SceneOutput) -> Unit

    WorkloadCounters::annotation_density_per_1000

    fn WorkloadCounters::annotation_density_per_1000(self : WorkloadCounters) -> Int

    WorkloadCounters::empty

    WorkloadCounters::mean_pixels

    fn WorkloadCounters::mean_pixels(self : WorkloadCounters) -> Int

    WorkloadCounters::to_json

    fn WorkloadCounters::to_json(self : WorkloadCounters) -> String

    abs_i

    fn abs_i(value : Int) -> Int

    add_salt_pepper

    fn add_salt_pepper(src : GrayImage, seed~ : UInt, amount_per_1000~ : Int) -> GrayImage

    add_uniform_noise

    fn add_uniform_noise(src : GrayImage, seed~ : UInt, magnitude~ : Int) -> GrayImage

    asset_kind_name

    fn asset_kind_name(kind : AssetKind) -> String

    assets_to_jsonl

    fn assets_to_jsonl(assets : Array[Asset]) -> String

    asymmetric_circle_points

    fn asymmetric_circle_points(cols : Int, rows : Int, spacing : Int, origin : Point) -> Array[Point]

    audit_default_suite

    fn audit_default_suite(size : Size) -> IntegrityReport

    augment_boxes

    fn augment_boxes(boxes : Array[Box2D], source : Size, config : AugmentationConfig) -> Array[Box2D]

    augment_image

    fn augment_image(image : GrayImage, config : AugmentationConfig) -> GrayImage

    augment_rect

    fn augment_rect(rect : Rect, source : Size, config : AugmentationConfig) -> Rect

    augment_scene

    fn augment_scene(scene : SceneOutput, config : AugmentationConfig) -> SceneOutput

    augmentation_grid

    fn augmentation_grid(seeds : Array[UInt], brightness_values : Array[Int]) -> Array[AugmentationConfig]

    balanced_split

    fn balanced_split(manifest : DatasetManifest, train_per_1000 : Int, validation_per_1000 : Int) -> DatasetSplit

    benchmark_checksum

    fn benchmark_checksum(plans : Array[ScenePlan]) -> UInt

    best_detection_threshold

    fn best_detection_threshold(expected : Array[Box2D], actual : Array[Box2D]) -> Int

    binary_fill_holes

    fn binary_fill_holes(mask : Mask, foreground : Int) -> Mask

    board_coverage

    fn board_coverage(points : Array[Point], size : Size) -> Int

    box_blur

    fn box_blur(src : GrayImage, radius : Int) -> GrayImage

    boxes_from_rects

    fn boxes_from_rects(rects : Array[Rect], label : Label, occluded? : Bool) -> Array[Box2D]

    calibration_board

    fn calibration_board(cols~ : Int, rows~ : Int, cell~ : Int, margin? : Int) -> GrayImage

    calibration_points

    fn calibration_points(cols : Int, rows : Int, spacing : Int, origin : Point) -> Array[Point]

    calibration_quality

    fn calibration_quality(set : CalibrationSet, transform : Affine2D) -> String

    calibration_residuals

    fn calibration_residuals(set : CalibrationSet, transform : Affine2D) -> Array[Point]

    check_plan_reproducibility

    fn check_plan_reproducibility(plan : ScenePlan) -> ReproducibilityRecord

    check_suite_reproducibility

    fn check_suite_reproducibility(plans : Array[ScenePlan]) -> Array[ReproducibilityRecord]

    checkerboard

    fn checkerboard(size : Size, square : Int, dark? : Gray, light? : Gray) -> GrayImage

    checksum_table

    fn checksum_table(scenes : Array[SceneOutput]) -> Array[ChecksumEntry]

    checksum_table_json

    fn checksum_table_json(scenes : Array[SceneOutput]) -> String

    clamp

    fn clamp(value : Int, low~ : Int, high~ : Int) -> Int

    clamp_rect

    fn clamp_rect(rect : Rect, size : Size) -> Rect

    clamp_u8

    fn clamp_u8(value : Int) -> Int

    color_distance

    fn color_distance(a : Rgb, b : Rgb) -> Int

    colorize_gray

    fn colorize_gray(image : GrayImage, low : Rgb, high : Rgb) -> RgbImage

    compare_regions

    fn compare_regions(image : GrayImage, expected : Rect, actual : Rect) -> Int

    compare_scene_outputs

    fn compare_scene_outputs(first : SceneOutput, second : SceneOutput) -> String

    compare_workloads

    fn compare_workloads(before : WorkloadCounters, after : WorkloadCounters) -> String

    component_labels

    fn component_labels(mask : Mask, foreground : Int) -> Mask

    compose_flow

    fn compose_flow(first : FlowField, second : FlowField) -> FlowField

    connected_components

    fn connected_components(mask : Mask, foreground : Int, connectivity? : Connectivity) -> Array[Component]

    constant_flow

    fn constant_flow(size : Size, step : Int, dx~ : Int, dy~ : Int) -> Array[FlowVector]

    convex_hull

    fn convex_hull(points : Array[Point]) -> Polygon

    corner_response

    fn corner_response(field : GradientField, x : Int, y : Int, radius : Int) -> Int

    cross_validation

    fn cross_validation(manifest : DatasetManifest, folds : Int, seed : UInt) -> CrossValidationPlan

    dataset_difference

    fn dataset_difference(left : DatasetManifest, right : DatasetManifest) -> Array[Asset]

    dataset_intersection

    fn dataset_intersection(left : DatasetManifest, right : DatasetManifest) -> Array[Asset]

    default_suite

    fn default_suite(size? : Size) -> Array[ScenePlan]

    default_variant_plans

    fn default_variant_plans(seed : UInt) -> Array[VariantPlan]

    describe_keypoints

    fn describe_keypoints(image : GrayImage, points : Array[Point], radius : Int) -> Array[PatchDescriptor]

    detect_bright_regions

    fn detect_bright_regions(image : GrayImage, cutoff : Int, minimum_area : Int) -> Array[Box2D]

    detect_corners

    fn detect_corners(image : GrayImage, threshold : Int, radius? : Int, border? : Int) -> Array[CornerFeature]

    detection_threshold_curve

    fn detection_threshold_curve(expected : Array[Box2D], actual : Array[Box2D]) -> Array[ThresholdPoint]

    dot_grid

    fn dot_grid(size : Size, spacing : Int, radius : Int) -> GrayImage

    draw_rgb_line

    fn draw_rgb_line(image : RgbImage, segment : LineSegment, color : Rgb) -> Unit

    escape_json

    fn escape_json(text : String) -> String

    estimate_affine_translation

    fn estimate_affine_translation(set : CalibrationSet) -> CalibrationEstimate

    evaluate_detections

    fn evaluate_detections(expected : Array[Box2D], actual : Array[Box2D], threshold_per_1000 : Int) -> DetectionMetrics

    evaluate_mask

    fn evaluate_mask(expected : Mask, actual : Mask, positive : Int) -> BinaryMetrics

    evaluate_scene_batch

    fn evaluate_scene_batch(expected : Array[SceneOutput], actual : Array[SceneOutput]) -> EvaluationReport

    evaluate_scene_pair

    fn evaluate_scene_pair(expected : SceneOutput, actual : SceneOutput) -> EvaluationReport

    find_runs

    fn find_runs(values : Array[Int], threshold : Int) -> Array[Rect]

    flow_angular_error_x1000

    fn flow_angular_error_x1000(expected : Array[FlowVector], actual : Array[FlowVector]) -> Int

    flow_confidence

    fn flow_confidence(flow : Array[FlowVector], size : Size, max_length : Int) -> GrayImage

    flow_consistency

    fn flow_consistency(expected : Array[FlowVector], actual : Array[FlowVector], tolerance : Int) -> Int

    flow_coverage

    fn flow_coverage(field : FlowField) -> Int

    flow_curl

    fn flow_curl(flow : Array[FlowVector], size : Size) -> Int

    flow_direction_image

    fn flow_direction_image(flow : Array[FlowVector], size : Size) -> GrayImage

    flow_divergence

    fn flow_divergence(flow : Array[FlowVector], size : Size) -> Int

    flow_endpoint

    fn flow_endpoint(flow : FlowVector) -> Point

    flow_endpoint_error

    fn flow_endpoint_error(expected : Array[FlowVector], actual : Array[FlowVector]) -> Int

    flow_endpoint_error_l1

    fn flow_endpoint_error_l1(expected : Array[FlowVector], actual : Array[FlowVector]) -> Int

    flow_magnitude_image

    fn flow_magnitude_image(flow : Array[FlowVector], size : Size, scale : Int) -> GrayImage

    flow_magnitude_l1

    fn flow_magnitude_l1(flow : FlowVector) -> Int

    flow_mean

    fn flow_mean(flow : Array[FlowVector]) -> Point

    flow_to_json_summary

    fn flow_to_json_summary(flow : Array[FlowVector], size : Size) -> String

    flow_to_rgb

    fn flow_to_rgb(flow : Array[FlowVector], size : Size, scale : Int) -> RgbImage

    gradient

    fn gradient(size : Size, horizontal? : Bool) -> GrayImage

    heatmap

    fn heatmap(image : GrayImage) -> RgbImage

    hsv_to_rgb

    fn hsv_to_rgb(hsv : HsvPixel) -> Rgb

    image_checksum

    fn image_checksum(image : GrayImage) -> UInt

    image_edge_density

    fn image_edge_density(image : GrayImage, threshold : Int) -> Int

    image_mae

    fn image_mae(a : GrayImage, b : GrayImage) -> Int

    image_mse

    fn image_mse(a : GrayImage, b : GrayImage) -> Int

    image_psnr_x1000

    fn image_psnr_x1000(a : GrayImage, b : GrayImage) -> Int

    image_quality_report

    fn image_quality_report(expected : GrayImage, actual : GrayImage) -> String

    inverse_warp_by_flow

    fn inverse_warp_by_flow(source : GrayImage, field : FlowField, fill : Gray) -> GrayImage

    jitter_boxes

    fn jitter_boxes(boxes : Array[Box2D], seed : UInt, amount : Int, size : Size) -> Array[Box2D]

    jitter_rect

    fn jitter_rect(rect : Rect, rng : Rng, amount : Int, size : Size) -> Rect

    keep_largest_component

    fn keep_largest_component(mask : Mask, foreground : Int, connectivity? : Connectivity) -> Mask

    keypoints_to_annotations

    fn keypoints_to_annotations(points : Array[Point], label : Label, radius : Int) -> Array[InstanceAnnotation]

    keypoints_visible

    fn keypoints_visible(points : Array[Keypoint]) -> Int

    labels_in_scene

    fn labels_in_scene(scene : SceneOutput) -> Array[Label]

    line_raster

    fn line_raster(start : Point, end : Point) -> Array[Point]

    manifest_checksum

    fn manifest_checksum(manifest : DatasetManifest) -> UInt

    manifest_shards

    fn manifest_shards(manifest : DatasetManifest, shard_count : Int) -> Array[DatasetManifest]

    mask_boundary

    fn mask_boundary(mask : Mask, foreground : Int) -> Mask

    mask_checksum

    fn mask_checksum(mask : Mask) -> UInt

    mask_iou

    fn mask_iou(a : Mask, b : Mask, positive : Int) -> Int

    match_detections

    fn match_detections(expected : Array[Box2D], actual : Array[Box2D], threshold_per_1000 : Int) -> Array[DetectionMatch]

    max_i

    fn max_i(a : Int, b : Int) -> Int

    mean_reprojection_error

    fn mean_reprojection_error(set : CalibrationSet, transform : Affine2D) -> Int

    measure_plan_workload

    fn measure_plan_workload(plans : Array[ScenePlan]) -> WorkloadCounters

    measure_workload

    fn measure_workload(scenes : Array[SceneOutput]) -> WorkloadCounters

    merge_manifests

    fn merge_manifests(manifests : Array[DatasetManifest], name : String) -> DatasetManifest

    min_i

    fn min_i(a : Int, b : Int) -> Int

    motion_blur_x

    fn motion_blur_x(src : GrayImage, radius : Int) -> GrayImage

    occlude

    fn occlude(src : GrayImage, rect : Rect, gray? : Gray) -> GrayImage

    overlay_box

    fn overlay_box(base : RgbImage, box : Box2D, style : OverlayStyle) -> RgbImage

    overlay_boxes

    fn overlay_boxes(base : RgbImage, boxes : Array[Box2D], style : OverlayStyle) -> RgbImage

    overlay_flow

    fn overlay_flow(base : RgbImage, flow : Array[FlowVector], scale : Int, color : Rgb) -> RgbImage

    overlay_keypoint

    fn overlay_keypoint(base : RgbImage, point : Point, radius : Int, style : OverlayStyle) -> RgbImage

    overlay_keypoints

    fn overlay_keypoints(base : RgbImage, points : Array[Point], radius : Int, style : OverlayStyle) -> RgbImage

    overlay_mask

    fn overlay_mask(base : RgbImage, mask : Mask, id : Int, style : OverlayStyle) -> RgbImage

    pad3

    fn pad3(value : Int) -> String

    pair_checksum

    fn pair_checksum(pair : SyntheticPair) -> UInt

    pipeline_checksum

    fn pipeline_checksum(result : PipelineResult) -> UInt

    pipeline_stage_name

    fn pipeline_stage_name(stage : PipelineStage) -> String

    polygon_to_mask

    fn polygon_to_mask(polygon : Polygon, size : Size, id : Int) -> Mask

    predict_box

    fn predict_box(track : Track, frames : Int) -> Box2D?

    project_boxes

    fn project_boxes(camera : CameraModel, boxes : Array[Box2D], depth : Int, size : Size) -> Array[Box2D]

    project_points

    fn project_points(camera : CameraModel, points : Array[Point], depth : Int) -> Array[Point]

    project_rect

    fn project_rect(camera : CameraModel, rect : Rect, depth : Int) -> Rect

    projection_profile

    fn projection_profile(image : GrayImage, horizontal : Bool, cutoff : Int) -> Array[Int]

    rect_grid

    fn rect_grid(size : Size, cell : Size) -> Array[Rect]

    region_summary

    fn region_summary(image : GrayImage, rect : Rect) -> RegionSummary

    remove_small_components

    fn remove_small_components(mask : Mask, foreground : Int, minimum_area : Int, connectivity? : Connectivity) -> Mask

    render_and_summarize

    fn render_and_summarize(plans : Array[ScenePlan]) -> Array[AnnotationSummary]

    render_detection_scene

    fn render_detection_scene(plan : ScenePlan) -> SceneOutput

    render_detections

    fn render_detections(image : GrayImage, boxes : Array[Box2D], style? : OverlayStyle) -> RgbImage

    render_feature_map

    fn render_feature_map(image : GrayImage, threshold : Int) -> RgbImage

    render_histogram

    fn render_histogram(image : GrayImage, width : Int, height : Int) -> GrayImage

    render_pipeline_result

    fn render_pipeline_result(result : PipelineResult) -> RgbImage

    render_plan

    fn render_plan(plan : ScenePlan) -> SceneOutput

    render_sampled_detection_scene

    fn render_sampled_detection_scene(size : Size, config : SamplingConfig) -> SceneOutput

    render_scene_overlay

    fn render_scene_overlay(scene : SceneOutput, style? : OverlayStyle) -> RgbImage

    render_segmentation_scene

    fn render_segmentation_scene(plan : ScenePlan) -> SceneOutput

    render_suite

    fn render_suite(plans : Array[ScenePlan]) -> Array[SceneOutput]

    render_variant

    fn render_variant(plan : VariantPlan, reference : GrayImage) -> SyntheticPair

    render_variants

    fn render_variants(reference : GrayImage, plans : Array[VariantPlan]) -> Array[SyntheticPair]

    reproducibility_summary

    fn reproducibility_summary(plans : Array[ScenePlan]) -> String

    rgb_checksum

    fn rgb_checksum(image : RgbImage) -> UInt

    run_pipeline

    fn run_pipeline(image : GrayImage, config : PipelineConfig) -> PipelineResult

    run_pipeline_batch

    fn run_pipeline_batch(images : Array[GrayImage], config : PipelineConfig) -> BatchPipelineResult

    sample_points

    fn sample_points(size : Size, config : SamplingConfig) -> Array[Point]

    sample_rects

    fn sample_rects(size : Size, config : SamplingConfig, min_size : Size, max_size : Size) -> Array[Rect]

    sampling_manifest

    fn sampling_manifest(size : Size, configs : Array[SamplingConfig], prefix : String) -> DatasetManifest

    scale_flow

    fn scale_flow(field : FlowField, numerator : Int, denominator : Int) -> FlowField

    scene_checksum

    fn scene_checksum(scene : SceneOutput) -> UInt

    scene_mask_rle

    fn scene_mask_rle(scene : SceneOutput) -> String

    scene_pipeline

    fn scene_pipeline(scene : SceneOutput, config : PipelineConfig) -> PipelineResult

    scene_to_yolo

    fn scene_to_yolo(scene : SceneOutput) -> String

    scene_with_camera

    fn scene_with_camera(scene : SceneOutput, camera : CameraModel, depth : Int) -> SceneOutput

    scene_with_flow

    fn scene_with_flow(scene : SceneOutput, field : FlowField) -> SceneOutput

    scenes_manifest

    fn scenes_manifest(scenes : Array[SceneOutput], prefix : String) -> DatasetManifest

    split_checksum

    fn split_checksum(split : DatasetSplit) -> UInt

    split_manifest

    fn split_manifest(manifest : DatasetManifest, train_per_1000 : Int, validation_per_1000 : Int) -> DatasetSplit

    split_summary_json

    fn split_summary_json(split : DatasetSplit) -> String

    suite_benchmark_json

    fn suite_benchmark_json(plans : Array[ScenePlan], name : String) -> String

    suite_manifest

    fn suite_manifest(plans : Array[ScenePlan], prefix? : String) -> DatasetManifest

    summarize_scene

    fn summarize_scene(scene : SceneOutput) -> AnnotationSummary

    target_scene

    fn target_scene(size : Size, seed? : UInt) -> GrayImage

    temporal_split

    fn temporal_split(manifest : DatasetManifest, holdout_count : Int) -> DatasetSplit

    track_state_name

    fn track_state_name(state : TrackState) -> String

    tracker_summaries

    fn tracker_summaries(tracker : Tracker) -> Array[TrackSummary]

    tracker_to_json

    fn tracker_to_json(tracker : Tracker) -> String

    tracks_to_boxes

    fn tracks_to_boxes(tracks : Array[Track]) -> Array[Box2D]

    transform_box_projective

    fn transform_box_projective(transform : Projective2D, box : Box2D, size : Size) -> Box2D

    transform_boxes

    fn transform_boxes(boxes : Array[Box2D], offset : Point, size : Size) -> Array[Box2D]

    transform_points

    fn transform_points(transform : Affine2D, points : Array[Point]) -> Array[Point]

    transform_polygon

    fn transform_polygon(transform : Affine2D, polygon : Polygon) -> Polygon

    translate_flow

    fn translate_flow(size : Size, dx : Int, dy : Int, step : Int) -> FlowField

    validate_box

    fn validate_box(box : Box2D, size : Size) -> ValidationReport

    validate_calibration_grid

    fn validate_calibration_grid(points : Array[Point], cols : Int, rows : Int, minimum_spacing : Int) -> ValidationReport

    validate_evaluation_report

    fn validate_evaluation_report(report : EvaluationReport) -> ValidationReport

    validate_flow

    fn validate_flow(flow : Array[FlowVector], size : Size) -> ValidationReport

    validate_image

    fn validate_image(image : GrayImage, name : String) -> ValidationReport

    validate_index

    fn validate_index(index : AssetIndex) -> ValidationReport

    validate_manifest

    fn validate_manifest(manifest : DatasetManifest) -> ValidationReport

    validate_mask

    fn validate_mask(mask : Mask, name : String) -> ValidationReport

    validate_pipeline_config

    fn validate_pipeline_config(config : PipelineConfig) -> ValidationReport

    validate_scene

    fn validate_scene(scene : SceneOutput) -> ValidationReport

    validate_scene_annotations

    fn validate_scene_annotations(scene : SceneOutput) -> ValidationReport

    validate_size

    fn validate_size(size : Size, name : String) -> ValidationReport

    validate_split

    fn validate_split(split : DatasetSplit) -> ValidationReport

    validate_suite

    fn validate_suite(plans : Array[ScenePlan]) -> ValidationReport

    validate_tracker_config

    fn validate_tracker_config(config : TrackerConfig) -> ValidationReport

    validate_variant_pair

    fn validate_variant_pair(pair : SyntheticPair) -> ValidationReport

    validate_workload

    fn validate_workload(counters : WorkloadCounters) -> ValidationReport

    variant_kind_name

    fn variant_kind_name(kind : VariantKind) -> String

    variant_manifest

    fn variant_manifest(reference : GrayImage, plans : Array[VariantPlan], prefix : String) -> DatasetManifest

    variant_quality_report

    fn variant_quality_report(pairs : Array[SyntheticPair]) -> String

    warp_by_flow

    fn warp_by_flow(source : GrayImage, field : FlowField, fill : Gray) -> GrayImage