this module is an implementation of Johannes Hanika, Lorenzo Tessari, and Carsten Dachsbacher, Fast temporal reprojection without motion vectors, Journal of Computer Graphics Techniques, 2021. it can be useful to align consecutive frames in real-time renders, as well as to stack hand-held short exposure photography for low-light or hdr.
please note that it only aligns images of same exposure, since it directly compares pixel values by difference. in particular it cannot be used to merge exposure bracketing stacks at this point. take several underexposed images at the same exposure level instead.
alignsrc
a feature map of the to-be-aligned imagealigndst
a feature map to be aligned to (these will stay static)input
the input image pixels which will be warpedoutput
the warped output imagemask
the error mask (output)visn
a debug visualisation of the motion vectors for displaymv
the 2d motion vectors (as input to other modules)
plus debug channels
the parameters are as described in the paper.
merge_k
increase this to give the error mask more weight (i.e. reduce potential misalignment artifacts)merge_n
increase this to instruct the error mask that small errors are likely noise and can be ignoredblur0
these blur parameters control the size of the feature detection context (patch size) on different scales. 0 is the finest and 3 the coarsest.blur1
blur2
blur3
sub
if the image is not raw, determines the subsampling block size side length. bayer will always use 2x2 and xtrans 3x3.
noisy input vs. aligned and denoised:
denoise pre-demosaic without alignment:
denoise post-demosaic without alignment:
align and denoise post-demosaic:
denoise individual inputs and align then:
denoise individual inputs and align then vs. single-image pre-demosaic denoise:
align and denoise post-demosaic vs. single-image post-demosaic denoise: