libstacker 0.0.2

Image stacker functions based on OpenCV
docs.rs failed to build libstacker-0.0.2
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: libstacker-0.0.8

crates.io Documentation Workflow dependency status license

libstacker

A multi-threaded port of the python code found here: github.com/maitek/image_stacking

Usage:

Download the test images:

git clone https://github.com/maitek/image_stacking image_stacking_py

Build the code:

Opencv-rust can be little tricky to install. Follow the instructions from rust opencv

cargo build --release

Run the example:

cargo run --example main --release

and then wait a few seconds. The result should be two windows showing the stacked images.

API

let keypoint_match_img:opencv::Mat = keypoint_match(
   // a Vec<PathBuf> containing paths to image files
   collect_image_files(&PathBuf::from("image_stacking_py/images"))?,
   KeyPointMatchParameters {
      method: opencv::calib3d::RANSAC,
      ransac_reproj_threshold: 5.0,
   },
)?;

Depending on the parameters the ecc_match() is much slower, but also more accurate.

let ecc_match_img:opencv::Mat = ecc_match(
   // a Vec<PathBuf> containing paths to image files
   collect_image_files(&PathBuf::from("image_stacking_py/images"))?,
   EccMatchParameters {
      max_count: Some(5000),
      epsilon: Some(1e-5),
      gauss_filt_size: 5,
   },
)?;

Todo

  • Figure out what to do with .reshape() in keypoint_match()
  • Figure out some opencv parameters responsibility sneakily shifted to end user.
  • Command line options in the example

License

Licensed under either of

at your option.