1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! Median threshold bitmap alignment for handheld HDR exposures.
//!
//! Ward (2003). Thresholding each exposure at its own median gives a bitmap that
//! survives any monotonic change of exposure, so frames can be registered before
//! the camera response is solved. Integer translation only.
//!
//! ```
//! use mtb_align::{Gray, Options, Shift, shift};
//!
//! let scene = |x: i64, y: i64| (((x / 16) * 61) ^ ((y / 16) * 37)) as u8;
//! let read = |dx: i64, dy: i64| {
//! let samples = (0..256 * 256).map(|i| scene(i % 256 + dx, i / 256 + dy)).collect();
//! Gray::from_vec(samples, 256, 256)
//! };
//! let options = Options { bits: 4, ..Options::default() };
//!
//! assert_eq!(shift(&read(0, 0), &read(5, -3), &options), Ok(Shift::new(5, -3)));
//! ```
//!
//! [`align_stack`] does a whole bracket, [`common_crop`] the region left over.
pub use ;
pub use Bitmap;
pub use disagreement;
pub use Error;
pub use ;
pub use Gray;
pub use ;
pub use ;