Crate libstacker

Source
Expand description

This library contains multi-threaded image stacking functions, based on OpenCV https://crates.io/crates/opencv and Rayon https://crates.io/crates/rayon.

Copyright (c) 2021 Eadf lacklustr@protonmail.com. License: MIT/Apache 2.0

The is a port of code written by Mathias Sundholm. Copyright (c) 2021 https://github.com/maitek/image_stacking License: MIT

Read more about image alignment with OpenCV here: https://learnopencv.com/image-alignment-ecc-in-opencv-c-python

Re-exports§

pub use opencv;

Structs§

EccMatchParameters
Structure containing the opencv parameters needed to calculate ecc_match()
KeyPointMatchParameters
Structure containing the opencv parameters needed to calculate keypoint_match()

Enums§

MotionType
StackerError

Traits§

SetMValue
Trait for setting value in a 2d Mat Todo:There must be a better way to do this

Functions§

collect_image_files
Returns paths to all jpg,jpeg,tif and png files in a single directory (non-recursive)
ecc_match
Stacks images using the OpenCV ECC alignment method. https://learnopencv.com/image-alignment-ecc-in-opencv-c-python All files will be aligned and stacked together. The result is returned as a Mat<f32>. All images will be position-matched against the first image, so the first image should, preferably, be the one with best focus.
keypoint_match
Stacks images using the OpenCV keypoint match alignment method. All files will be aligned and stacked together. The result is returned as a Mat<f32>. All images will be position-matched against the first image, so the first image should, preferably, be the one with best focus.
sharpness_modified_laplacian
Detect sharpness of an image https://stackoverflow.com/a/7768918 OpenCV port of ‘LAPM’ algorithm (Nayar89)
sharpness_normalized_gray_level_variance
Detect sharpness of an image https://stackoverflow.com/a/7768918 OpenCV port of ‘GLVN’ algorithm (Santos97)
sharpness_tenengrad
Detect sharpness of an image https://stackoverflow.com/a/7768918 OpenCV port of ‘TENG’ algorithm (Krotkov86) TODO: This function does not, yet, work as intended
sharpness_variance_of_laplacian
Detect sharpness of an image https://stackoverflow.com/a/7768918 OpenCV port of ‘LAPV’ algorithm (Pech2000)