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§
- EccMatch
Parameters - Structure containing the opencv parameters needed to calculate
ecc_match()
- KeyPoint
Match Parameters - Structure containing the opencv parameters needed to calculate
keypoint_match()
Enums§
Traits§
- SetM
Value - 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 aMat<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 aMat<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)