moonbit-feature-forge

    Pure MoonBit 2D local features, binary matching, geometric registration, and diagnostics

    feature-detection
    fast
    orb
    ransac
    computer-vision
    Download zip
    Author
    Version
    0.2.1
    License
    Apache-2.0
    Last updated
    2 months ago
    Downloads
    35

    No dependencies

    #MoonBit Feature Forge

    CI License

    MoonBit Feature Forge is a pure-MoonBit 2D local-feature toolkit for grayscale image analysis, descriptor matching, geometric registration, and deterministic diagnostics. It is designed as a small, composable building block for image alignment, tracking, inspection, and research prototypes without a native C/C++ dependency.

    #Project positioning

    The library covers the part of a vision workflow between a grayscale image buffer and a verified geometric correspondence. It keeps image storage explicit, makes border and degenerate-input behavior deterministic, and exposes both the core pipeline and the measurements needed to inspect a run.

    #Core capabilities

    • Safe GrayImage construction, sampling, cropping, resizing, translation, rotation, histograms, integral statistics, morphology, connected components, and texture summaries.
    • Box, triangle, Gaussian-like, rank, Sobel, Laplacian, contrast, adaptive-threshold, and pyramid preprocessing.
    • Configurable FAST keypoint detection, non-maximum suppression, orientation-aware ORB/BRIEF descriptors, and multiscale coordinate mapping.
    • Hamming matching with KNN, ratio filtering, mutual matching, unique-train constraints, and an exact descriptor index.
    • Affine and homography estimation, reprojection diagnostics, deterministic RANSAC, residual analysis, and model comparison.
    • Image warping, translation and patch search, keypoint-grid indexing, frame-to-frame association, feature tracks, and quality dashboards.
    • A runnable CLI demo and benchmark with machine-readable key=value output.

    The package intentionally does not include codecs, GUI bindings, networking, or platform-specific native code. Applications can connect their own image decoder or camera layer to GrayImage.

    #Quick start

    Install the current stable MoonBit toolchain, then run the repository checks:

    moon version --all moon update moon fmt moon check --deny-warn moon test --deny-warn moon run cmd/main

    Use the library from another MoonBit package:

    import {
    "Myytsjj/moonbit-feature-forge" @forge,
    }

    fn register(reference : @forge.GrayImage, moving : @forge.GrayImage) -> Unit {
    let result = @forge.run_pipeline(
    reference,
    moving,
    @forge.FeatureConfig::default(),
    )
    println(@forge.format_pipeline_summary(result))
    }

    Invalid dimensions produce an empty image, out-of-range writes are ignored, and sampling always follows the selected BorderMode.

    #CLI

    The default command builds a deterministic synthetic translation scene and runs the complete pipeline:

    moon run cmd/main

    Measured demo output on the local toolchain:

    MoonBit Feature Forge pipeline=demo size=120x120 features1=26 features2=25 matches=23 affine_inliers=23 homography_inliers=23 affine_ratio=1 homography_rms=0 features1=26 features2=25 matches=23 distance_mean=0 affine_inliers=23 homography_inliers=23

    Run the benchmark workload with:

    moon run cmd/main -- benchmark

    The CLI prints dimensions, iteration count, feature counts, match count, inlier ratio, total wall-clock time, target, and seed. See benchmarks/README.md for the recorded run and reproduction details.

    #Architecture

    GrayImage │ ├── sampling / filters / integral analysis / pyramid │ ├── FAST ──► keypoints ──► ORB/BRIEF descriptors │ │ │ ├── KNN / ratio / mutual / index matching │ │ │ └── affine + homography RANSAC │ │ └── warping / tracking / quality reports ◄┘

    The public root package owns the data types and algorithms. The cmd/main package is a thin executable that constructs synthetic input and calls the public API. Analysis modules consume the same GrayImage, Keypoint, Descriptor, Match, and model types, so diagnostics do not require a second representation.

    #API areas

    AreaRepresentative entry points
    Image dataGrayImage::new, sample, sample_bilinear, crop, resize_nearest
    Preprocessingbox_blur, sobel_gradients, ImagePyramid::build, adaptive_threshold
    FeaturesFastConfig, detect_fast_with_config, OrbConfig, compute_orb_descriptors_with_config
    MatchingMatchPolicy, match_with_policy, mutual_match, DescriptorIndex::query
    Geometryestimate_homography, Homography::project, reprojection_stats, ransac_homography
    PipelineFeatureConfig, run_pipeline, analyze_pipeline, build_quality_dashboard
    TrackingKeypointGridIndex, associate_keypoints, FeatureTrack, update_tracks

    #Benchmarks

    The checked-in benchmark uses a 160×160 synthetic scene, three complete pipeline iterations, default FAST/ORB and matching configuration, and seed 42. A local run on 2026-08-18 with MoonBit 0.1.20260814, moonc v0.10.8+8606a5800, Windows x64 produced:

    WorkloadSizeIterationsFeaturesMatchesHomography inlier ratioTotal
    Synthetic translation160×160332 / 31291.026 ms

    total_ms is wall-clock time for all iterations and will vary with machine load. Feature, match, ratio, dimensions, and seed fields are the reproducibility signals; the full raw output is in benchmarks/README.md.

    #Tests

    Run the complete test suite with:

    moon test --deny-warn

    The suite includes 73 tests covering empty and invalid images, all border modes, clipped windows, filtering and morphology boundaries, deterministic keypoint ordering, descriptor length mismatches, empty indexes, stable ties, invalid match indices, collinear geometry, RANSAC outliers, pipeline determinism, warping, tracking, quality reports, and benchmark aggregation.

    #CI

    GitHub Actions runs the project on Linux, macOS, and Windows. Each job installs the stable MoonBit toolchain, updates dependencies, verifies formatting and generated interfaces, checks all targets, runs all tests, and executes the CLI demo. The workflow is .github/workflows/ci.yml.

    Package publication is kept in a separate manually triggered workflow at .github/workflows/publish.yml; it expects a repository secret named MOONCAKES_TOKEN and never stores credentials in the repository.

    #License

    MoonBit Feature Forge is distributed under the Apache License 2.0.

    AffineDecomposition

    pub(all) struct AffineDecomposition {
    scale_x : Double
    scale_y : Double
    rotation : Double
    shear : Double
    translation_x : Double
    translation_y : Double
    reflected : Bool
    }

    AffineFitResult

    pub(all) struct AffineFitResult {
    transform : AffineTransform
    residuals : Array[Double]
    mean_error : Double
    maximum_error : Double
    condition : Double
    valid : Bool
    }

    AffineTransform

    pub(all) struct AffineTransform {
    a : Double
    b : Double
    tx : Double
    c : Double
    d : Double
    ty : Double
    }

    AffineTransform::apply

    fn AffineTransform::apply(self : AffineTransform, x : Double, y : Double) -> (Double, Double)

    AffineTransform::identity

    BenchmarkAggregate

    pub(all) struct BenchmarkAggregate {
    count : Int
    total_iterations : Int
    total_features1 : Int
    total_features2 : Int
    total_matches : Int
    mean_features1 : Double
    mean_features2 : Double
    mean_matches : Double
    mean_inlier_ratio : Double
    minimum_ms : Double
    maximum_ms : Double
    mean_ms : Double
    }

    BenchmarkResult

    pub(all) struct BenchmarkResult {
    width : Int
    height : Int
    iterations : Int
    features1 : Int
    features2 : Int
    matches : Int
    inlier_ratio : Double
    total_ms : Double
    }

    BenchmarkResult::new

    fn BenchmarkResult::new(width : Int, height : Int, iterations : Int, features1 : Int, features2 : Int, matches : Int, inlier_ratio : Double, total_ms : Double) -> BenchmarkResult

    BorderMode

    pub(all) enum BorderMode {
    Constant(Int)
    Clamp
    Reflect
    }

    Descriptor

    pub(all) struct Descriptor {
    data : Array[Byte]
    }

    Descriptor::new

    fn Descriptor::new(size : Int) -> Descriptor

    DescriptorBucketStats

    pub(all) struct DescriptorBucketStats {
    bucket_count : Int
    non_empty_buckets : Int
    maximum_bucket : Int
    mean_bucket : Double
    }

    DescriptorIndex

    pub(all) struct DescriptorIndex {
    descriptors : Array[Descriptor]
    buckets : Array[Array[Int]]
    }

    DescriptorIndex::build

    fn DescriptorIndex::build(descriptors : Array[Descriptor]) -> DescriptorIndex

    DescriptorIndex::query

    fn DescriptorIndex::query(self : DescriptorIndex, query : Descriptor, k : Int) -> Array[Match]

    DescriptorQualityReport

    pub(all) struct DescriptorQualityReport {
    count : Int
    bytes : Int
    unique : Int
    duplicate_fraction : Double
    bit_balance : Double
    mean_nearest_distance : Double
    }

    DescriptorSearchReport

    pub(all) struct DescriptorSearchReport {
    queries : Int
    candidates : Int
    comparisons : Int
    mean_best_distance : Double
    exact : Bool
    }

    DescriptorSignature

    pub(all) struct DescriptorSignature {
    bytes : Int
    checksum : Int
    popcount : Int
    zero_bytes : Int
    nonzero_bytes : Int
    }

    DescriptorStats

    pub(all) struct DescriptorStats {
    count : Int
    bytes : Int
    mean_popcount : Double
    minimum_popcount : Int
    maximum_popcount : Int
    bit_balance : Double
    }

    FastConfig

    pub(all) struct FastConfig {
    threshold : Int
    contiguous : Int
    use_nms : Bool
    max_keypoints : Int
    border : Int
    min_response : Double
    }

    FastConfig::default

    fn FastConfig::default() -> FastConfig

    FastConfig::new

    fn FastConfig::new(threshold : Int, contiguous : Int, use_nms : Bool, max_keypoints : Int, border : Int, min_response : Double) -> FastConfig

    FeatureAssociation

    pub(all) struct FeatureAssociation {
    query_idx : Int
    train_idx : Int
    descriptor_distance : Int
    spatial_distance : Double
    }

    FeatureConfig

    pub(all) struct FeatureConfig {
    fast : FastConfig
    orb : OrbConfig
    pyramid_levels : Int
    match_k : Int
    ratio : Double
    use_ratio : Bool
    enforce_unique : Bool
    ransac_iters : Int
    ransac_threshold : Double
    seed : Int
    }

    FeatureConfig::default

    fn FeatureConfig::default() -> FeatureConfig

    FeatureQualityReport

    pub(all) struct FeatureQualityReport {
    count : Int
    density : Double
    response_mean : Double
    response_variance : Double
    spatial_coverage : Double
    border_safe : Int
    }

    FeatureSnapshot

    pub(all) struct FeatureSnapshot {
    keypoints : Int
    descriptors : Int
    descriptor_bytes : Int
    mean_response : Double
    bounds : Rect
    fingerprint : Int
    }

    FeatureTrack

    pub(all) struct FeatureTrack {
    id : Int
    keypoints : Array[Keypoint]
    descriptors : Array[Descriptor]
    age : Int
    missed : Int
    active : Bool
    }

    FeatureTrack::append

    fn FeatureTrack::append(self : FeatureTrack, keypoint : Keypoint, descriptor : Descriptor) -> FeatureTrack

    FeatureTrack::last_descriptor

    fn FeatureTrack::last_descriptor(self : FeatureTrack) -> Descriptor?

    FeatureTrack::last_keypoint

    fn FeatureTrack::last_keypoint(self : FeatureTrack) -> Keypoint?

    FeatureTrack::mark_missed

    fn FeatureTrack::mark_missed(self : FeatureTrack, maximum_missed : Int) -> FeatureTrack

    FeatureTrack::mean_response

    fn FeatureTrack::mean_response(self : FeatureTrack) -> Double

    FeatureTrack::new

    fn FeatureTrack::new(id : Int, keypoint : Keypoint, descriptor : Descriptor) -> FeatureTrack

    FeatureTrack::path_length

    fn FeatureTrack::path_length(self : FeatureTrack) -> Double

    FeatureTrack::stability

    fn FeatureTrack::stability(self : FeatureTrack) -> Double

    FloatPoint2

    pub(all) struct FloatPoint2 {
    x : Double
    y : Double
    }

    FloatPoint2::new

    fn FloatPoint2::new(x : Double, y : Double) -> FloatPoint2

    GeometryQuality

    pub(all) struct GeometryQuality {
    count : Int
    mean_error : Double
    rms_error : Double
    maximum_error : Double
    passed : Bool
    }

    GradientField

    pub(all) struct GradientField {
    width : Int
    height : Int
    gx : Array[Double]
    gy : Array[Double]
    }

    GrayImage

    pub(all) struct GrayImage {
    width : Int
    height : Int
    data : Array[Int]
    }

    GrayImage::clone

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

    GrayImage::crop

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

    GrayImage::fill

    fn GrayImage::fill(self : GrayImage, value : Int) -> Unit

    GrayImage::get

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

    GrayImage::histogram

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

    GrayImage::new

    fn GrayImage::new(width : Int, height : Int) -> GrayImage

    GrayImage::normalize

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

    GrayImage::resize_nearest

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

    GrayImage::rotate_about

    fn GrayImage::rotate_about(self : GrayImage, angle : Double, center : FloatPoint2, border : BorderMode) -> GrayImage

    GrayImage::sample

    fn GrayImage::sample(self : GrayImage, x : Int, y : Int, border : BorderMode) -> Int

    GrayImage::sample_bilinear

    fn GrayImage::sample_bilinear(self : GrayImage, x : Double, y : Double, border : BorderMode) -> Double

    GrayImage::set

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

    GrayImage::translate

    fn GrayImage::translate(self : GrayImage, dx : Int, dy : Int, border : BorderMode) -> GrayImage

    Homography

    pub(all) struct Homography {
    h00 : Double
    h01 : Double
    h02 : Double
    h10 : Double
    h11 : Double
    h12 : Double
    h20 : Double
    h21 : Double
    h22 : Double
    }

    Homography::identity

    fn Homography::identity() -> Homography

    Homography::inverse

    fn Homography::inverse(self : Homography) -> Homography?

    Homography::project

    fn Homography::project(self : Homography, point : FloatPoint2) -> FloatPoint2?

    HomographyRansacResult

    pub(all) struct HomographyRansacResult {
    model : Homography
    inliers : Array[Match]
    inlier_ratio : Double
    stats : ReprojectionStats
    iterations : Int
    seed : Int
    }

    ImagePyramid

    pub(all) struct ImagePyramid {
    levels : Array[GrayImage]
    scales : Array[Double]
    }

    ImagePyramid::build

    fn ImagePyramid::build(img : GrayImage, level_count : Int) -> ImagePyramid

    ImagePyramid::level

    fn ImagePyramid::level(self : ImagePyramid, index : Int) -> GrayImage

    ImagePyramid::level_count

    fn ImagePyramid::level_count(self : ImagePyramid) -> Int

    ImagePyramid::scale

    fn ImagePyramid::scale(self : ImagePyramid, index : Int) -> Double

    ImagePyramid::to_level

    fn ImagePyramid::to_level(self : ImagePyramid, point : FloatPoint2, level : Int) -> FloatPoint2

    ImagePyramid::to_original

    fn ImagePyramid::to_original(self : ImagePyramid, point : FloatPoint2, level : Int) -> FloatPoint2

    IntegralImage

    pub(all) struct IntegralImage {
    width : Int
    height : Int
    sums : Array[Double]
    squares : Array[Double]
    }

    IntegralImage::build

    IntegralImage::count

    fn IntegralImage::count(self : IntegralImage, rect : Rect) -> Int

    IntegralImage::mean

    fn IntegralImage::mean(self : IntegralImage, rect : Rect) -> Double

    IntegralImage::square_sum

    fn IntegralImage::square_sum(self : IntegralImage, rect : Rect) -> Double

    IntegralImage::sum

    fn IntegralImage::sum(self : IntegralImage, rect : Rect) -> Double

    IntegralImage::variance

    fn IntegralImage::variance(self : IntegralImage, rect : Rect) -> Double

    IntegralImage::window

    fn IntegralImage::window(self : IntegralImage, x : Int, y : Int, radius : Int) -> Rect

    Kernel1D

    pub(all) struct Kernel1D {
    radius : Int
    weights : Array[Double]
    normalizer : Double
    }

    Kernel1D::box

    fn Kernel1D::box(radius : Int) -> Kernel1D

    Kernel1D::gaussian_like

    fn Kernel1D::gaussian_like(radius : Int, sigma : Double) -> Kernel1D

    Kernel1D::normalized

    fn Kernel1D::normalized(self : Kernel1D) -> Kernel1D

    Kernel1D::triangle

    fn Kernel1D::triangle(radius : Int) -> Kernel1D

    Keypoint

    pub(all) struct Keypoint {
    x : Int
    y : Int
    response : Double
    angle : Double
    octave : Int
    size : Int
    }

    Keypoint::new

    fn Keypoint::new(x : Int, y : Int, response : Double, angle : Double) -> Keypoint

    KeypointGridIndex

    pub(all) struct KeypointGridIndex {
    width : Int
    height : Int
    grid_width : Int
    grid_height : Int
    keypoints : Array[Keypoint]
    buckets : Array[Array[Int]]
    }

    KeypointGridIndex::build

    fn KeypointGridIndex::build(keypoints : Array[Keypoint], width : Int, height : Int, grid_width : Int, grid_height : Int) -> KeypointGridIndex

    KeypointGridIndex::maximum_occupancy

    fn KeypointGridIndex::maximum_occupancy(self : KeypointGridIndex) -> Int

    KeypointGridIndex::nearest

    fn KeypointGridIndex::nearest(self : KeypointGridIndex, center : FloatPoint2, radius : Double) -> Int?

    KeypointGridIndex::occupancy

    fn KeypointGridIndex::occupancy(self : KeypointGridIndex) -> Array[Int]

    KeypointGridIndex::query_radius

    fn KeypointGridIndex::query_radius(self : KeypointGridIndex, center : FloatPoint2, radius : Double) -> Array[Int]

    KeypointStats

    pub(all) struct KeypointStats {
    count : Int
    mean_response : Double
    minimum_response : Double
    maximum_response : Double
    centroid : FloatPoint2
    bounds : Rect
    }

    Match

    pub(all) struct Match {
    query_idx : Int
    train_idx : Int
    distance : Int
    }

    Match::new

    fn Match::new(query_idx : Int, train_idx : Int, distance : Int) -> Match

    MatchGraphStats

    pub(all) struct MatchGraphStats {
    match_count : Int
    query_nodes : Int
    train_nodes : Int
    unique_queries : Int
    unique_trains : Int
    duplicate_queries : Int
    duplicate_trains : Int
    mean_distance : Double
    maximum_distance : Int
    }

    MatchPolicy

    pub(all) struct MatchPolicy {
    k : Int
    ratio : Double
    use_ratio : Bool
    enforce_unique : Bool
    }

    MatchPolicy::default

    fn MatchPolicy::default() -> MatchPolicy

    MatchPolicy::new

    fn MatchPolicy::new(k : Int, ratio : Double, use_ratio : Bool, enforce_unique : Bool) -> MatchPolicy

    MatchQuality

    pub(all) struct MatchQuality {
    count : Int
    inliers : Int
    ratio : Double
    mean_residual : Double
    maximum_residual : Double
    }

    MatchStats

    pub(all) struct MatchStats {
    count : Int
    minimum : Int
    maximum : Int
    mean : Double
    }

    ModelComparison

    pub(all) struct ModelComparison {
    affine_score : Double
    homography_score : Double
    preferred : String
    affine_inliers : Int
    homography_inliers : Int
    }

    OrbConfig

    pub(all) struct OrbConfig {
    patch_radius : Int
    descriptor_bits : Int
    use_orientation : Bool
    }

    OrbConfig::default

    fn OrbConfig::default() -> OrbConfig

    OrbConfig::new

    fn OrbConfig::new(patch_radius : Int, descriptor_bits : Int, use_orientation : Bool) -> OrbConfig

    PatchSearchResult

    pub(all) struct PatchSearchResult {
    x : Int
    y : Int
    score : Double
    evaluated : Int
    }

    PatchStats

    pub(all) struct PatchStats {
    count : Int
    mean : Double
    variance : Double
    minimum : Int
    maximum : Int
    energy : Double
    }

    PhotometricComparison

    pub(all) struct PhotometricComparison {
    overlap_width : Int
    overlap_height : Int
    mse : Double
    mean_difference : Double
    foreground_iou : Double
    }

    PhotometricReport

    pub(all) struct PhotometricReport {
    width : Int
    height : Int
    mean : Double
    variance : Double
    minimum : Int
    maximum : Int
    nonzero : Int
    contrast : Double
    }

    PipelineQualityGate

    pub(all) struct PipelineQualityGate {
    passed : Bool
    inlier_ratio : Double
    inlier_count : Int
    match_count : Int
    maximum_error : Double
    score : Double
    }

    PipelineReport

    pub(all) struct PipelineReport {
    features1 : KeypointStats
    features2 : KeypointStats
    descriptors1 : DescriptorStats
    descriptors2 : DescriptorStats
    matches : MatchGraphStats
    affine_quality : MatchQuality
    homography_quality : MatchQuality
    gate : PipelineQualityGate
    }

    PipelineResult

    pub(all) struct PipelineResult {
    keypoints1 : Array[Keypoint]
    keypoints2 : Array[Keypoint]
    descriptors1 : Array[Descriptor]
    descriptors2 : Array[Descriptor]
    matches : Array[Match]
    match_stats : MatchStats
    affine : RansacResult
    homography : HomographyRansacResult
    }

    Point2

    pub(all) struct Point2 {
    x : Int
    y : Int
    }

    Point2::new

    fn Point2::new(x : Int, y : Int) -> Point2

    PyramidSummary

    pub(all) struct PyramidSummary {
    levels : Int
    original_width : Int
    original_height : Int
    final_width : Int
    final_height : Int
    final_scale : Double
    }

    QualityDashboard

    pub(all) struct QualityDashboard {
    image1 : PhotometricReport
    image2 : PhotometricReport
    features1 : FeatureQualityReport
    features2 : FeatureQualityReport
    descriptors1 : DescriptorQualityReport
    descriptors2 : DescriptorQualityReport
    match_graph : MatchGraphStats
    gate : PipelineQualityGate
    fingerprint : Int
    }

    RansacResult

    pub(all) struct RansacResult {
    transform : AffineTransform
    inliers : Array[Match]
    inlier_ratio : Double
    }

    Rect

    pub(all) struct Rect {
    x0 : Int
    y0 : Int
    x1 : Int
    y1 : Int
    }

    Rect::new

    fn Rect::new(x0 : Int, y0 : Int, x1 : Int, y1 : Int) -> Rect

    RegionStats

    pub(all) struct RegionStats {
    label : Int
    area : Int
    bounds : Rect
    centroid : FloatPoint2
    mean : Double
    minimum : Int
    maximum : Int
    }

    ReprojectionStats

    pub(all) struct ReprojectionStats {
    count : Int
    mean : Double
    rms : Double
    maximum : Double
    }

    ResidualSummary

    pub(all) struct ResidualSummary {
    count : Int
    mean : Double
    median : Double
    rms : Double
    maximum : Double
    inliers : Int
    ratio : Double
    }

    SnapshotDelta

    pub(all) struct SnapshotDelta {
    keypoints : Int
    descriptors : Int
    descriptor_bytes : Int
    response_delta : Double
    same_shape : Bool
    }

    ThresholdSummary

    pub(all) struct ThresholdSummary {
    threshold : Int
    foreground : Int
    background : Int
    mean_foreground : Double
    mean_background : Double
    }

    ThresholdTrial

    pub(all) struct ThresholdTrial {
    threshold : Int
    keypoints : Int
    descriptors : Int
    mean_response : Double
    score : Double
    }

    TrackSummary

    pub(all) struct TrackSummary {
    count : Int
    active : Int
    total_age : Int
    mean_age : Double
    mean_path_length : Double
    mean_stability : Double
    }

    TranslationSearchResult

    pub(all) struct TranslationSearchResult {
    dx : Int
    dy : Int
    score : Double
    evaluated : Int
    }

    WarpOptions

    pub(all) struct WarpOptions {
    border : BorderMode
    bilinear : Bool
    }

    WarpOptions::default

    fn WarpOptions::default() -> WarpOptions

    active_tracks

    fn active_tracks(tracks : Array[FeatureTrack]) -> Array[FeatureTrack]

    adaptive_threshold

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

    affine_bounds

    fn affine_bounds(transform : AffineTransform, width : Int, height : Int) -> Rect

    affine_model_residual_summary

    fn affine_model_residual_summary(model : AffineTransform, source : Array[FloatPoint2], target : Array[FloatPoint2], threshold : Double) -> ResidualSummary

    affine_quality

    fn affine_quality(result : RansacResult) -> Double

    affine_residual_profile

    fn affine_residual_profile(transform : AffineTransform, source : Array[FloatPoint2], target : Array[FloatPoint2]) -> Array[Double]

    affine_transform_points

    fn affine_transform_points(transform : AffineTransform, points : Array[FloatPoint2]) -> Array[FloatPoint2]

    aggregate_benchmarks

    fn aggregate_benchmarks(samples : Array[BenchmarkResult]) -> BenchmarkAggregate

    analyze_pipeline

    fn analyze_pipeline(result : PipelineResult) -> PipelineReport

    apply_kernel_horizontal

    fn apply_kernel_horizontal(img : GrayImage, kernel : Kernel1D) -> GrayImage

    apply_kernel_vertical

    fn apply_kernel_vertical(img : GrayImage, kernel : Kernel1D) -> GrayImage

    apply_match_mask

    fn apply_match_mask(matches : Array[Match], mask : Array[Bool]) -> Array[Match]

    apply_separable_kernel

    fn apply_separable_kernel(img : GrayImage, kernel : Kernel1D) -> GrayImage

    apply_translation

    fn apply_translation(img : GrayImage, dx : Double, dy : Double) -> GrayImage

    associate_keypoints

    fn associate_keypoints(query_keypoints : Array[Keypoint], query_descriptors : Array[Descriptor], train_keypoints : Array[Keypoint], train_descriptors : Array[Descriptor], maximum_descriptor_distance : Int, maximum_spatial_distance : Double) -> Array[FeatureAssociation]

    association_mean_distance

    fn association_mean_distance(associations : Array[FeatureAssociation]) -> Double

    association_quality

    fn association_quality(associations : Array[FeatureAssociation], maximum_descriptor_distance : Int, maximum_spatial_distance : Double) -> Double

    association_spatial_histogram

    fn association_spatial_histogram(associations : Array[FeatureAssociation], bins : Int, maximum : Double) -> Array[Int]

    associations_to_matches

    fn associations_to_matches(associations : Array[FeatureAssociation]) -> Array[Match]

    average_descriptor

    fn average_descriptor(descriptors : Array[Descriptor]) -> Descriptor

    benchmark_average_latency

    fn benchmark_average_latency(aggregate : BenchmarkAggregate) -> Double

    benchmark_feature_rate

    fn benchmark_feature_rate(result : BenchmarkResult) -> Double

    benchmark_match_rate

    fn benchmark_match_rate(result : BenchmarkResult) -> Double

    benchmark_relative_latency

    fn benchmark_relative_latency(left : BenchmarkResult, right : BenchmarkResult) -> Double

    benchmark_results_are_comparable

    fn benchmark_results_are_comparable(left : BenchmarkResult, right : BenchmarkResult) -> Bool

    benchmark_speedup

    fn benchmark_speedup(baseline : BenchmarkAggregate, candidate : BenchmarkAggregate) -> Double

    benchmark_throughput

    fn benchmark_throughput(aggregate : BenchmarkAggregate) -> Double

    best_threshold_trial

    fn best_threshold_trial(trials : Array[ThresholdTrial]) -> ThresholdTrial?

    binary_boundary

    fn binary_boundary(img : GrayImage, radius : Int) -> GrayImage

    binary_close

    fn binary_close(img : GrayImage, radius : Int) -> GrayImage

    binary_dilate

    fn binary_dilate(img : GrayImage, radius : Int) -> GrayImage

    binary_erode

    fn binary_erode(img : GrayImage, radius : Int) -> GrayImage

    binary_iou

    fn binary_iou(left : GrayImage, right : GrayImage) -> Double

    binary_open

    fn binary_open(img : GrayImage, radius : Int) -> GrayImage

    binary_threshold

    fn binary_threshold(img : GrayImage, threshold : Int) -> GrayImage

    blend_registered

    fn blend_registered(reference : GrayImage, moving : GrayImage, model : Homography, weight : Double) -> GrayImage

    block_texture_histogram

    fn block_texture_histogram(img : GrayImage, rect : Rect) -> Array[Int]

    bounds_are_ordered

    fn bounds_are_ordered(rect : Rect) -> Bool

    box_blur

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

    brightness_normalize

    fn brightness_normalize(img : GrayImage, target_mean : Double) -> GrayImage

    build_quality_dashboard

    fn build_quality_dashboard(image1 : GrayImage, image2 : GrayImage, result : PipelineResult) -> QualityDashboard

    choose_fast_threshold

    fn choose_fast_threshold(trials : Array[ThresholdTrial], minimum_keypoints : Int) -> Int?

    clamp_quality

    fn clamp_quality(value : Double) -> Double

    column_projection

    fn column_projection(img : GrayImage) -> Array[Int]

    compare_models

    fn compare_models(affine : RansacResult, homography : HomographyRansacResult, affine_residual : Double, homography_residual : Double) -> ModelComparison

    compare_photometric

    fn compare_photometric(left : GrayImage, right : GrayImage) -> PhotometricComparison

    compare_snapshots

    fn compare_snapshots(left : FeatureSnapshot, right : FeatureSnapshot) -> SnapshotDelta

    compose_homographies

    fn compose_homographies(left : Homography, right : Homography) -> Homography

    compute_orb_descriptors

    fn compute_orb_descriptors(img : GrayImage, kps : Array[Keypoint]) -> (Array[Keypoint], Array[Descriptor])

    compute_orb_descriptors_with_config

    fn compute_orb_descriptors_with_config(img : GrayImage, kps : Array[Keypoint], config : OrbConfig) -> (Array[Keypoint], Array[Descriptor])

    compute_orientation

    fn compute_orientation(img : GrayImage, kp : Keypoint) -> Double

    consensus_velocity

    fn consensus_velocity(tracks : Array[FeatureTrack]) -> FloatPoint2

    consistent_match_subset

    fn consistent_match_subset(matches : Array[Match], keypoints1 : Array[Keypoint], keypoints2 : Array[Keypoint], tolerance : Double) -> Array[Match]

    contrast_stretch

    fn contrast_stretch(img : GrayImage, low : Int, high : Int) -> GrayImage

    convex_hull

    fn convex_hull(points : Array[FloatPoint2]) -> Array[FloatPoint2]

    counts_are_nonnegative

    fn counts_are_nonnegative(values : Array[Int]) -> Bool

    crop_registered_pair

    fn crop_registered_pair(reference : GrayImage, moving : GrayImage, rect : Rect) -> (GrayImage, GrayImage)

    cross_check

    fn cross_check(matches_12 : Array[Match], matches_21 : Array[Match]) -> Array[Match]

    dashboard_descriptor_balance

    fn dashboard_descriptor_balance(dashboard : QualityDashboard) -> Double

    dashboard_is_valid

    fn dashboard_is_valid(dashboard : QualityDashboard) -> Bool

    dashboard_match_density

    fn dashboard_match_density(dashboard : QualityDashboard) -> Double

    dashboard_pass_rate

    fn dashboard_pass_rate(dashboards : Array[QualityDashboard]) -> Double

    dashboard_score

    fn dashboard_score(dashboard : QualityDashboard) -> Double

    decompose_affine

    fn decompose_affine(transform : AffineTransform) -> AffineDecomposition

    describe_patch

    fn describe_patch(img : GrayImage, keypoint : Keypoint, radius : Int) -> PatchStats

    descriptor_batch_hamming

    fn descriptor_batch_hamming(query : Descriptor, descriptors : Array[Descriptor]) -> Array[Int]

    descriptor_batch_search_report

    fn descriptor_batch_search_report(index : DescriptorIndex, queries : Array[Descriptor], k : Int) -> DescriptorSearchReport

    descriptor_bit_fraction

    fn descriptor_bit_fraction(descriptor : Descriptor) -> Double

    descriptor_bit_histogram

    fn descriptor_bit_histogram(descriptors : Array[Descriptor]) -> Array[Int]

    descriptor_bit_slice

    fn descriptor_bit_slice(descriptor : Descriptor, start_bit : Int, length : Int) -> Descriptor

    descriptor_byte_histogram

    fn descriptor_byte_histogram(descriptors : Array[Descriptor]) -> Array[Int]

    descriptor_checksum

    fn descriptor_checksum(descriptor : Descriptor) -> Int

    descriptor_concat

    fn descriptor_concat(left : Descriptor, right : Descriptor) -> Descriptor

    descriptor_copy

    fn descriptor_copy(descriptor : Descriptor) -> Descriptor

    descriptor_count_difference

    fn descriptor_count_difference(left : Array[Descriptor], right : Array[Descriptor]) -> Int

    descriptor_distance_matrix

    fn descriptor_distance_matrix(query : Array[Descriptor], train : Array[Descriptor]) -> Array[Array[Int]]

    descriptor_distance_profile

    fn descriptor_distance_profile(descriptors : Array[Descriptor]) -> Array[Double]

    descriptor_distance_quantiles

    fn descriptor_distance_quantiles(query : Descriptor, candidates : Array[Descriptor]) -> (Int, Int, Int)

    descriptor_duplicate_fraction

    fn descriptor_duplicate_fraction(descriptors : Array[Descriptor]) -> Double

    descriptor_hamming_histogram

    fn descriptor_hamming_histogram(query : Array[Descriptor], train : Array[Descriptor], bins : Int) -> Array[Int]

    descriptor_hamming_similarity

    fn descriptor_hamming_similarity(left : Descriptor, right : Descriptor) -> Double

    descriptor_index_batch_query

    fn descriptor_index_batch_query(index : DescriptorIndex, queries : Array[Descriptor], k : Int) -> Array[Array[Match]]

    descriptor_index_stats

    fn descriptor_index_stats(index : DescriptorIndex) -> DescriptorBucketStats

    descriptor_interpolate

    fn descriptor_interpolate(left : Descriptor, right : Descriptor, weight : Double) -> Descriptor

    descriptor_mask

    fn descriptor_mask(descriptor : Descriptor, mask : Descriptor) -> Descriptor

    descriptor_mean_profile

    fn descriptor_mean_profile(descriptors : Array[Descriptor]) -> Array[Double]

    descriptor_nonzero_fraction

    fn descriptor_nonzero_fraction(descriptor : Descriptor) -> Double

    descriptor_or

    fn descriptor_or(left : Descriptor, right : Descriptor) -> Descriptor

    descriptor_pack_bits

    fn descriptor_pack_bits(bits : Array[Bool]) -> Descriptor

    descriptor_popcount

    fn descriptor_popcount(descriptor : Descriptor) -> Int

    descriptor_precision_at_k

    fn descriptor_precision_at_k(rows : Array[Array[Match]], truth : Array[Int], k : Int) -> Double

    descriptor_prefix

    fn descriptor_prefix(descriptor : Descriptor, bytes : Int) -> Descriptor

    descriptor_quality_report

    fn descriptor_quality_report(descriptors : Array[Descriptor]) -> DescriptorQualityReport

    descriptor_recall_at_k

    fn descriptor_recall_at_k(rows : Array[Array[Match]], truth : Array[Int], k : Int) -> Double

    descriptor_reverse_bits

    fn descriptor_reverse_bits(descriptor : Descriptor) -> Descriptor

    descriptor_rotate_bits

    fn descriptor_rotate_bits(descriptor : Descriptor, shift : Int) -> Descriptor

    descriptor_set_checksum

    fn descriptor_set_checksum(descriptors : Array[Descriptor]) -> Int

    descriptor_signature

    fn descriptor_signature(descriptor : Descriptor) -> DescriptorSignature

    descriptor_suffix

    fn descriptor_suffix(descriptor : Descriptor, start : Int) -> Descriptor

    descriptor_top_k_vote

    fn descriptor_top_k_vote(rows : Array[Array[Match]], train_count : Int) -> Array[Int]

    descriptor_unique_count

    fn descriptor_unique_count(descriptors : Array[Descriptor]) -> Int

    descriptor_unpack_bits

    fn descriptor_unpack_bits(descriptor : Descriptor, bit_count : Int) -> Array[Bool]

    descriptor_variance_profile

    fn descriptor_variance_profile(descriptors : Array[Descriptor]) -> Array[Double]

    descriptor_vote

    fn descriptor_vote(descriptors : Array[Descriptor]) -> Descriptor

    descriptor_xor

    fn descriptor_xor(left : Descriptor, right : Descriptor) -> Descriptor

    descriptor_zero

    fn descriptor_zero(bytes : Int) -> Descriptor

    descriptors_equal

    fn descriptors_equal(left : Descriptor, right : Descriptor) -> Bool

    detect_fast

    fn detect_fast(img : GrayImage, threshold : Int, use_nms : Bool) -> Array[Keypoint]

    detect_fast_with_config

    fn detect_fast_with_config(img : GrayImage, config : FastConfig) -> Array[Keypoint]

    displacement_residuals

    fn displacement_residuals(matches : Array[Match], keypoints1 : Array[Keypoint], keypoints2 : Array[Keypoint]) -> Array[Double]

    distance_to_line

    fn distance_to_line(point : FloatPoint2, first : FloatPoint2, second : FloatPoint2) -> Double

    edge_density

    fn edge_density(img : GrayImage, threshold : Int) -> Double

    edge_strength

    fn edge_strength(img : GrayImage) -> GrayImage

    edge_threshold

    fn edge_threshold(img : GrayImage, threshold : Int) -> GrayImage

    enforce_unique_train_matches

    fn enforce_unique_train_matches(matches : Array[Match]) -> Array[Match]

    estimate_affine_from_points

    fn estimate_affine_from_points(source : Array[FloatPoint2], target : Array[FloatPoint2]) -> AffineTransform?

    estimate_homography

    fn estimate_homography(source : Array[FloatPoint2], target : Array[FloatPoint2]) -> Homography?

    evaluate_affine_matches

    fn evaluate_affine_matches(transform : AffineTransform, matches : Array[Match], keypoints1 : Array[Keypoint], keypoints2 : Array[Keypoint], threshold : Double) -> MatchQuality

    evaluate_fast_thresholds

    fn evaluate_fast_thresholds(img : GrayImage, thresholds : Array[Int]) -> Array[ThresholdTrial]

    evaluate_homography_matches

    fn evaluate_homography_matches(model : Homography, matches : Array[Match], keypoints1 : Array[Keypoint], keypoints2 : Array[Keypoint], threshold : Double) -> MatchQuality

    extract_features

    fn extract_features(img : GrayImage, fast_threshold : Int) -> (Array[Keypoint], Array[Descriptor])

    extract_multiscale_features

    fn extract_multiscale_features(img : GrayImage, fast_config : FastConfig, orb_config : OrbConfig, level_count : Int) -> (Array[Keypoint], Array[Descriptor])

    feature_count_difference

    fn feature_count_difference(left : Array[Keypoint], right : Array[Keypoint]) -> Int

    feature_density

    fn feature_density(keypoints : Array[Keypoint], width : Int, height : Int) -> Double

    feature_quality_report

    fn feature_quality_report(keypoints : Array[Keypoint], width : Int, height : Int, border : Int) -> FeatureQualityReport

    feature_response_curve

    fn feature_response_curve(img : GrayImage, thresholds : Array[Int]) -> Array[Double]

    filter_matches_by_affine

    fn filter_matches_by_affine(transform : AffineTransform, matches : Array[Match], keypoints1 : Array[Keypoint], keypoints2 : Array[Keypoint], threshold : Double) -> Array[Match]

    filter_matches_by_displacement

    fn filter_matches_by_displacement(matches : Array[Match], keypoints1 : Array[Keypoint], keypoints2 : Array[Keypoint], tolerance : Double) -> Array[Match]

    filter_matches_by_homography

    fn filter_matches_by_homography(model : Homography, matches : Array[Match], keypoints1 : Array[Keypoint], keypoints2 : Array[Keypoint], threshold : Double) -> Array[Match]

    filter_regions

    fn filter_regions(regions : Array[RegionStats], minimum_area : Int, maximum_area : Int) -> Array[RegionStats]

    filter_tracks_by_velocity

    fn filter_tracks_by_velocity(tracks : Array[FeatureTrack], consensus : FloatPoint2, tolerance : Double) -> Array[FeatureTrack]

    fit_affine_matches

    fn fit_affine_matches(matches : Array[Match], keypoints1 : Array[Keypoint], keypoints2 : Array[Keypoint]) -> AffineFitResult

    fit_affine_points

    fn fit_affine_points(source : Array[FloatPoint2], target : Array[FloatPoint2]) -> AffineFitResult

    format_benchmark_aggregate

    fn format_benchmark_aggregate(aggregate : BenchmarkAggregate) -> String

    format_benchmark_summary

    fn format_benchmark_summary(result : BenchmarkResult) -> String

    format_feature_snapshot

    fn format_feature_snapshot(snapshot : FeatureSnapshot) -> String

    format_keypoint

    fn format_keypoint(keypoint : Keypoint) -> String

    format_pipeline_report

    fn format_pipeline_report(report : PipelineReport) -> String

    format_pipeline_summary

    fn format_pipeline_summary(result : PipelineResult) -> String

    format_point

    fn format_point(point : FloatPoint2) -> String

    format_quality_dashboard

    fn format_quality_dashboard(dashboard : QualityDashboard) -> String

    format_quality_gate

    fn format_quality_gate(gate : PipelineQualityGate) -> String

    format_rect

    fn format_rect(rect : Rect) -> String

    format_snapshot_delta

    fn format_snapshot_delta(delta : SnapshotDelta) -> String

    full_feature_pipeline

    fn full_feature_pipeline(img1 : GrayImage, img2 : GrayImage, fast_threshold : Int, ratio : Double, ransac_threshold : Double) -> RansacResult

    gaussian_blur

    fn gaussian_blur(img : GrayImage, radius : Int) -> GrayImage

    geometry_quality_score

    fn geometry_quality_score(quality : GeometryQuality, tolerance : Double) -> Double

    gradient_energy

    fn gradient_energy(img : GrayImage, rect : Rect) -> Double

    gradient_magnitude

    fn gradient_magnitude(field : GradientField) -> GrayImage

    gradient_orientation

    fn gradient_orientation(field : GradientField) -> Array[Double]

    hamming_distance

    fn hamming_distance(d1 : Descriptor, d2 : Descriptor) -> Int

    homography_corners

    fn homography_corners(model : Homography, width : Int, height : Int) -> Array[FloatPoint2]

    homography_from_affine

    fn homography_from_affine(transform : AffineTransform) -> Homography

    homography_is_orientation_preserving

    fn homography_is_orientation_preserving(model : Homography, width : Int, height : Int) -> Bool

    homography_quality

    fn homography_quality(result : HomographyRansacResult) -> Double

    homography_quality_report

    fn homography_quality_report(model : Homography, source : Array[FloatPoint2], target : Array[FloatPoint2]) -> GeometryQuality

    homography_residual_profile

    fn homography_residual_profile(model : Homography, source : Array[FloatPoint2], target : Array[FloatPoint2]) -> Array[Double]

    image_add

    fn image_add(left : GrayImage, right : GrayImage) -> GrayImage

    image_area

    fn image_area(img : GrayImage) -> Int

    image_blend

    fn image_blend(left : GrayImage, right : GrayImage, weight : Double) -> GrayImage

    image_difference

    fn image_difference(left : GrayImage, right : GrayImage) -> GrayImage

    image_has_pixels

    fn image_has_pixels(img : GrayImage) -> Bool

    image_mean

    fn image_mean(img : GrayImage) -> Double

    image_moments

    fn image_moments(img : GrayImage) -> (Double, Double, Int, Int)

    image_mse

    fn image_mse(left : GrayImage, right : GrayImage) -> Double

    image_overlap_mask

    fn image_overlap_mask(left : GrayImage, right : GrayImage) -> GrayImage

    image_similarity

    fn image_similarity(left : GrayImage, right : GrayImage) -> Double

    image_subtract

    fn image_subtract(left : GrayImage, right : GrayImage) -> GrayImage

    image_variance

    fn image_variance(img : GrayImage) -> Double

    initialize_tracks

    fn initialize_tracks(keypoints : Array[Keypoint], descriptors : Array[Descriptor], start_id : Int) -> Array[FeatureTrack]

    inlier_centroid

    fn inlier_centroid(matches : Array[Match], keypoints : Array[Keypoint]) -> FloatPoint2

    inlier_mask

    fn inlier_mask(residuals : Array[Double], threshold : Double) -> Array[Bool]

    inlier_ratio_percent

    fn inlier_ratio_percent(ratio : Double) -> Double

    is_degenerate_polygon

    fn is_degenerate_polygon(points : Array[FloatPoint2], tolerance : Double) -> Bool

    is_degenerate_triangle

    fn is_degenerate_triangle(first : FloatPoint2, second : FloatPoint2, third : FloatPoint2, tolerance : Double) -> Bool

    keypoint_bounds

    fn keypoint_bounds(keypoints : Array[Keypoint]) -> Rect

    keypoint_centroid

    fn keypoint_centroid(keypoints : Array[Keypoint]) -> FloatPoint2

    keypoint_grid_counts

    fn keypoint_grid_counts(keypoints : Array[Keypoint], width : Int, height : Int, grid_width : Int, grid_height : Int) -> Array[Int]

    keypoint_octave_histogram

    fn keypoint_octave_histogram(keypoints : Array[Keypoint], bins : Int) -> Array[Int]

    keypoint_orientation_histogram

    fn keypoint_orientation_histogram(keypoints : Array[Keypoint], bins : Int) -> Array[Int]

    keypoint_patch_statistics

    fn keypoint_patch_statistics(img : GrayImage, keypoints : Array[Keypoint], radius : Int) -> Array[PatchStats]

    keypoint_response_histogram

    fn keypoint_response_histogram(keypoints : Array[Keypoint], bins : Int, minimum : Double, maximum : Double) -> Array[Int]

    keypoint_response_sum

    fn keypoint_response_sum(keypoints : Array[Keypoint]) -> Double

    keypoint_response_variance

    fn keypoint_response_variance(keypoints : Array[Keypoint]) -> Double

    keypoint_scale_histogram

    fn keypoint_scale_histogram(keypoints : Array[Keypoint], bins : Int) -> Array[Int]

    keypoints_in_rect

    fn keypoints_in_rect(keypoints : Array[Keypoint], rect : Rect) -> Array[Keypoint]

    knn_match

    fn knn_match(query : Array[Descriptor], train : Array[Descriptor], k : Int) -> Array[Array[Match]]

    label_components

    fn label_components(binary : GrayImage) -> Array[RegionStats]

    laplacian_response

    fn laplacian_response(img : GrayImage) -> GrayImage

    largest_region

    fn largest_region(regions : Array[RegionStats]) -> RegionStats?

    line_intersection

    fn line_intersection(first : FloatPoint2, second : FloatPoint2, third : FloatPoint2, fourth : FloatPoint2) -> FloatPoint2?

    local_binary_pattern

    fn local_binary_pattern(img : GrayImage, radius : Int) -> GrayImage

    local_contrast

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

    local_mean

    fn local_mean(img : GrayImage, radius : Int) -> GrayImage

    local_variance

    fn local_variance(img : GrayImage, radius : Int) -> Array[Double]

    match_and_filter

    fn match_and_filter(desc1 : Array[Descriptor], desc2 : Array[Descriptor], ratio : Double) -> Array[Match]

    match_coverage

    fn match_coverage(matches : Array[Match], query_count : Int, train_count : Int) -> Double

    match_descriptors

    fn match_descriptors(query : Array[Descriptor], train : Array[Descriptor]) -> Array[Match]

    match_distance_histogram

    fn match_distance_histogram(matches : Array[Match], bins : Int, maximum_distance : Int) -> Array[Int]

    match_distance_mean

    fn match_distance_mean(matches : Array[Match]) -> Double

    match_distance_percentile

    fn match_distance_percentile(matches : Array[Match], percentile : Double) -> Int

    match_distance_variance

    fn match_distance_variance(matches : Array[Match]) -> Double

    match_pair_consistency

    fn match_pair_consistency(left : Match, right : Match, keypoints1 : Array[Keypoint], keypoints2 : Array[Keypoint], tolerance : Double) -> Bool

    match_quality_curve

    fn match_quality_curve(matches : Array[Match], thresholds : Array[Int]) -> Array[Double]

    match_reciprocal_rank

    fn match_reciprocal_rank(matches : Array[Match], query_idx : Int, train_idx : Int) -> Double

    match_stats

    fn match_stats(matches : Array[Match]) -> MatchStats

    match_with_policy

    fn match_with_policy(query : Array[Descriptor], train : Array[Descriptor], policy : MatchPolicy) -> Array[Match]

    median_filter

    fn median_filter(img : GrayImage, radius : Int) -> GrayImage

    median_match_displacement

    fn median_match_displacement(matches : Array[Match], keypoints1 : Array[Keypoint], keypoints2 : Array[Keypoint]) -> FloatPoint2

    merge_match_sets

    fn merge_match_sets(left : Array[Match], right : Array[Match]) -> Array[Match]

    model_residual_summary

    fn model_residual_summary(model : Homography, source : Array[FloatPoint2], target : Array[FloatPoint2], threshold : Double) -> ResidualSummary

    motion_histogram

    fn motion_histogram(tracks : Array[FeatureTrack], bins : Int, maximum_speed : Double) -> Array[Int]

    mutual_match

    fn mutual_match(query : Array[Descriptor], train : Array[Descriptor], policy : MatchPolicy) -> Array[Match]

    non_maximum_response

    fn non_maximum_response(response : GrayImage, radius : Int) -> GrayImage

    normalized_correlation

    fn normalized_correlation(left : GrayImage, right : GrayImage) -> Double

    otsu_summary

    fn otsu_summary(img : GrayImage) -> ThresholdSummary

    otsu_threshold

    fn otsu_threshold(img : GrayImage) -> Int

    pad_image

    fn pad_image(img : GrayImage, border : Int, value : Int) -> GrayImage

    percentile_filter

    fn percentile_filter(img : GrayImage, radius : Int, percentile : Double) -> GrayImage

    photometric_report

    fn photometric_report(img : GrayImage) -> PhotometricReport

    pipeline_descriptor_balance

    fn pipeline_descriptor_balance(result : PipelineResult) -> Double

    pipeline_feature_balance

    fn pipeline_feature_balance(result : PipelineResult) -> Double

    pipeline_fingerprint

    fn pipeline_fingerprint(result : PipelineResult) -> Int

    pipeline_inlier_distance

    fn pipeline_inlier_distance(result : PipelineResult) -> Double

    pipeline_invariant_report

    fn pipeline_invariant_report(result : PipelineResult) -> Array[String]

    pipeline_is_usable

    fn pipeline_is_usable(result : PipelineResult) -> Bool

    pipeline_quality_from_result

    fn pipeline_quality_from_result(result : PipelineResult) -> PipelineQualityGate

    pipeline_quality_gate

    fn pipeline_quality_gate(inlier_ratio : Double, inlier_count : Int, match_count : Int, maximum_error : Double) -> PipelineQualityGate

    pipeline_summary_lines

    fn pipeline_summary_lines(result : PipelineResult) -> Array[String]

    point_bounds

    fn point_bounds(points : Array[FloatPoint2]) -> Rect

    point_cloud_centroid

    fn point_cloud_centroid(points : Array[FloatPoint2]) -> FloatPoint2

    point_distance

    fn point_distance(left : FloatPoint2, right : FloatPoint2) -> Double

    point_in_polygon

    fn point_in_polygon(point : FloatPoint2, polygon : Array[FloatPoint2]) -> Bool

    point_spread

    fn point_spread(points : Array[FloatPoint2]) -> Double

    polygon_area

    fn polygon_area(points : Array[FloatPoint2]) -> Double

    polygon_centroid

    fn polygon_centroid(points : Array[FloatPoint2]) -> FloatPoint2

    polygon_is_convex

    fn polygon_is_convex(points : Array[FloatPoint2]) -> Bool

    polyline_length

    fn polyline_length(points : Array[FloatPoint2]) -> Double

    project_to_segment

    fn project_to_segment(point : FloatPoint2, first : FloatPoint2, second : FloatPoint2) -> FloatPoint2

    projection_peaks

    fn projection_peaks(values : Array[Int], minimum : Int) -> Array[Int]

    pyramid_pixel_capacity

    fn pyramid_pixel_capacity(pyramid : ImagePyramid) -> Int

    fn pyramid_translation_search(reference : GrayImage, moving : GrayImage, levels : Int, radius : Int) -> TranslationSearchResult

    quadrilateral_area

    fn quadrilateral_area(width : Int, height : Int) -> Double

    quadrilateral_condition

    fn quadrilateral_condition(points : Array[FloatPoint2]) -> Double

    quality_dashboard_is_reproducible

    fn quality_dashboard_is_reproducible(first : QualityDashboard, second : QualityDashboard) -> Bool

    quality_gate_score

    fn quality_gate_score(result : PipelineResult) -> Double

    quality_score_from_counts

    fn quality_score_from_counts(true_positive : Int, false_positive : Int, false_negative : Int) -> Double

    quality_weighted_match_score

    fn quality_weighted_match_score(matches : Array[Match], maximum_distance : Int) -> Double

    quantize_image

    fn quantize_image(img : GrayImage, levels : Int) -> GrayImage

    query_match_support

    fn query_match_support(matches : Array[Match], query_idx : Int) -> Int

    rank_filter

    fn rank_filter(img : GrayImage, radius : Int, rank : Int) -> GrayImage

    ransac_affine

    fn ransac_affine(matches : Array[Match], kps1 : Array[Keypoint], kps2 : Array[Keypoint], max_iters : Int, threshold : Double) -> RansacResult

    ransac_homography

    fn ransac_homography(matches : Array[Match], kps1 : Array[Keypoint], kps2 : Array[Keypoint], max_iters : Int, threshold : Double, seed : Int) -> HomographyRansacResult

    ransac_required_iterations

    fn ransac_required_iterations(confidence : Double, inlier_ratio : Double, sample_size : Int, maximum : Int) -> Int

    ransac_success_probability

    fn ransac_success_probability(iterations : Int, inlier_ratio : Double, sample_size : Int) -> Double

    ratio_difference

    fn ratio_difference(left : Double, right : Double) -> Double

    ratio_test

    fn ratio_test(knn_matches : Array[Array[Match]], ratio : Double) -> Array[Match]

    rect_area

    fn rect_area(rect : Rect) -> Int

    rect_contains

    fn rect_contains(rect : Rect, point : Point2) -> Bool

    rect_expand

    fn rect_expand(rect : Rect, margin : Int) -> Rect

    rect_intersection

    fn rect_intersection(left : Rect, right : Rect) -> Rect

    rect_iou

    fn rect_iou(left : Rect, right : Rect) -> Double

    rect_union

    fn rect_union(left : Rect, right : Rect) -> Rect

    region_mask

    fn region_mask(binary : GrayImage, label : Int) -> GrayImage

    regions_total_area

    fn regions_total_area(regions : Array[RegionStats]) -> Int

    registration_error

    fn registration_error(reference : GrayImage, moving : GrayImage) -> Double

    registration_score

    fn registration_score(reference : GrayImage, moving : GrayImage) -> Double

    report_is_empty

    fn report_is_empty(report : PipelineReport) -> Bool

    reprojection_error

    fn reprojection_error(model : Homography, source : FloatPoint2, target : FloatPoint2) -> Double

    reprojection_stats

    fn reprojection_stats(model : Homography, source : Array[FloatPoint2], target : Array[FloatPoint2]) -> ReprojectionStats

    residual_maximum

    fn residual_maximum(values : Array[Double]) -> Double

    residual_mean

    fn residual_mean(values : Array[Double]) -> Double

    residual_rms

    fn residual_rms(values : Array[Double]) -> Double

    residuals_for_affine

    fn residuals_for_affine(transform : AffineTransform, matches : Array[Match], keypoints1 : Array[Keypoint], keypoints2 : Array[Keypoint]) -> Array[Double]

    residuals_for_homography

    fn residuals_for_homography(model : Homography, matches : Array[Match], keypoints1 : Array[Keypoint], keypoints2 : Array[Keypoint]) -> Array[Double]

    result_delta_summary

    fn result_delta_summary(left : PipelineResult, right : PipelineResult) -> String

    result_fingerprint

    fn result_fingerprint(result : PipelineResult) -> Int

    results_have_same_shape

    fn results_have_same_shape(left : PipelineResult, right : PipelineResult) -> Bool

    row_projection

    fn row_projection(img : GrayImage) -> Array[Int]

    run_pipeline

    fn run_pipeline(img1 : GrayImage, img2 : GrayImage, config : FeatureConfig) -> PipelineResult

    safe_inlier_ratio

    fn safe_inlier_ratio(inliers : Int, matches : Int) -> Double

    safe_match_ratio

    fn safe_match_ratio(matches : Array[Match], query_count : Int) -> Double

    search_patch

    fn search_patch(image : GrayImage, patch : GrayImage, origin_x : Int, origin_y : Int, radius : Int) -> PatchSearchResult

    search_translation

    fn search_translation(reference : GrayImage, moving : GrayImage, maximum_dx : Int, maximum_dy : Int) -> TranslationSearchResult

    select_keypoints_grid

    fn select_keypoints_grid(keypoints : Array[Keypoint], width : Int, height : Int, grid_width : Int, grid_height : Int, per_cell : Int) -> Array[Keypoint]

    simplify_polyline

    fn simplify_polyline(points : Array[FloatPoint2], tolerance : Double) -> Array[FloatPoint2]

    smooth_gaussian_like

    fn smooth_gaussian_like(img : GrayImage, radius : Int, sigma : Double) -> GrayImage

    smooth_triangle

    fn smooth_triangle(img : GrayImage, radius : Int) -> GrayImage

    snapshot_features

    fn snapshot_features(keypoints : Array[Keypoint], descriptors : Array[Descriptor]) -> FeatureSnapshot

    sobel_gradients

    fn sobel_gradients(img : GrayImage) -> GradientField

    stable_descriptor_bytes

    fn stable_descriptor_bytes(descriptors : Array[Descriptor]) -> Int

    stable_tracks

    fn stable_tracks(tracks : Array[FeatureTrack], minimum_age : Int, minimum_stability : Double) -> Array[FeatureTrack]

    summarize_descriptors

    fn summarize_descriptors(descriptors : Array[Descriptor]) -> DescriptorStats

    summarize_keypoints

    fn summarize_keypoints(keypoints : Array[Keypoint]) -> KeypointStats

    summarize_match_graph

    fn summarize_match_graph(matches : Array[Match], query_count : Int, train_count : Int) -> MatchGraphStats

    summarize_pyramid

    fn summarize_pyramid(pyramid : ImagePyramid) -> PyramidSummary

    summarize_residuals

    fn summarize_residuals(values : Array[Double], threshold : Double) -> ResidualSummary

    summarize_tracks

    fn summarize_tracks(tracks : Array[FeatureTrack]) -> TrackSummary

    texture_histogram

    fn texture_histogram(img : GrayImage) -> Array[Int]

    threshold_difference

    fn threshold_difference(left : GrayImage, right : GrayImage, threshold : Int) -> GrayImage

    threshold_otsu

    fn threshold_otsu(img : GrayImage) -> GrayImage

    threshold_sauvola

    fn threshold_sauvola(img : GrayImage, radius : Int, sensitivity : Double, bias : Double) -> GrayImage

    threshold_trial_area

    fn threshold_trial_area(trials : Array[ThresholdTrial]) -> Double

    track_bounds

    fn track_bounds(tracks : Array[FeatureTrack]) -> Rect

    track_coverage

    fn track_coverage(tracks : Array[FeatureTrack], width : Int, height : Int) -> Double

    track_descriptor_consistency

    fn track_descriptor_consistency(track : FeatureTrack) -> Double

    track_descriptor_vote

    fn track_descriptor_vote(track : FeatureTrack) -> Descriptor

    track_displacement

    fn track_displacement(track : FeatureTrack) -> FloatPoint2

    track_path

    fn track_path(points : Array[Keypoint]) -> Array[FloatPoint2]

    track_quality

    fn track_quality(track : FeatureTrack) -> Double

    track_quality_histogram

    fn track_quality_histogram(tracks : Array[FeatureTrack], bins : Int) -> Array[Int]

    track_velocity

    fn track_velocity(track : FeatureTrack) -> FloatPoint2

    tracks_in_rect

    fn tracks_in_rect(tracks : Array[FeatureTrack], rect : Rect) -> Array[FeatureTrack]

    train_match_support

    fn train_match_support(matches : Array[Match], train_idx : Int) -> Int

    transform_points

    fn transform_points(model : Homography, points : Array[FloatPoint2]) -> Array[FloatPoint2]

    transform_rect_corners

    fn transform_rect_corners(model : Homography, rect : Rect) -> Array[FloatPoint2]

    translation_from_matches

    fn translation_from_matches(matches : Array[Match], keypoints1 : Array[Keypoint], keypoints2 : Array[Keypoint]) -> FloatPoint2

    triangle_area

    fn triangle_area(first : FloatPoint2, second : FloatPoint2, third : FloatPoint2) -> Double

    unsharp_mask

    fn unsharp_mask(img : GrayImage, radius : Int, amount : Double) -> GrayImage

    update_tracks

    fn update_tracks(tracks : Array[FeatureTrack], keypoints : Array[Keypoint], descriptors : Array[Descriptor], maximum_descriptor_distance : Int, maximum_spatial_distance : Double, maximum_missed : Int) -> Array[FeatureTrack]

    validate_descriptor_lengths

    fn validate_descriptor_lengths(descriptors : Array[Descriptor]) -> Bool

    validate_descriptor_set

    fn validate_descriptor_set(descriptors : Array[Descriptor], expected_bytes : Int) -> Bool

    validate_image_bytes

    fn validate_image_bytes(img : GrayImage) -> Bool

    validate_image_shape

    fn validate_image_shape(img : GrayImage) -> Bool

    validate_keypoints

    fn validate_keypoints(keypoints : Array[Keypoint], width : Int, height : Int) -> Bool

    validate_match_indices

    fn validate_match_indices(matches : Array[Match], query_count : Int, train_count : Int) -> Bool

    validate_pipeline_result

    fn validate_pipeline_result(result : PipelineResult) -> Bool

    validate_regions

    fn validate_regions(regions : Array[RegionStats], width : Int, height : Int) -> Bool

    validate_tracks

    fn validate_tracks(tracks : Array[FeatureTrack]) -> Bool

    warp_affine_image

    fn warp_affine_image(img : GrayImage, transform : AffineTransform, width : Int, height : Int, options : WarpOptions) -> GrayImage

    warp_homography_image

    fn warp_homography_image(img : GrayImage, model : Homography, width : Int, height : Int, options : WarpOptions) -> GrayImage

    warp_valid_mask

    fn warp_valid_mask(model : Homography, source_width : Int, source_height : Int, width : Int, height : Int) -> GrayImage