graph-based-image-segmentation 0.1.0

An implementation of graph-based image segmentation algorithms based on superpixels.
docs.rs failed to build graph-based-image-segmentation-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: graph-based-image-segmentation-0.2.1

Efficient Graph-Based Image Segmentation

This repository contains a Rust implementation of the graph-based image segmentation algorithms described in [1] (available here) focussing on generating oversegmentations, also referred to as superpixels.

[1] P. F. Felzenswalb and D. P. Huttenlocher.
    Efficient Graph-Based Image Segmentation.
    International Journal of Computer Vision, volume 59, number 2, 2004.

The implementation is based on this work by David Stutz, which in turn was used in [2] for evaluation.

[2] D. Stutz, A. Hermans, B. Leibe.
    Superpixels: An Evaluation of the State-of-the-Art.
    Computer Vision and Image Understanding, 2018.

Example use

fn main() {
    let mut image = imread("data/tree.jpg", IMREAD_COLOR).unwrap();

    let threshold = 10f32;
    let segment_size = 10;
    let mut segmenter = Segmentation::new(
        EuclideanRGB::default(),
        MagicThreshold::new(threshold),
        segment_size,
    );

    // NOTE: The image should be blurred before use; this is left out here for brevity.
    let labels = segmenter.segment_image(&image);
}