trougnouf/nind-denoise

Image alignment

Opened this issue · 2 comments

Added an initial version of ECC alignment algorithm. Not sure how you're planning on feeding the images for training so I'm not putting too much thought into its parameters yet. The default termination epsilon of 0.01 and 50 iterations seem to work fine. OpenEXR is still a pain due to security issues around it.

master...hqhoang:nind-denoise:align-images

Thank you! :) That looks much more useful than my current x-y-shift only alignment.

Not sure how you're planning on feeding the images for training

At first I was using the raw images as-is but it was excruciatingly slow, so I pre-cropped them and I am just saving them on disk as a 2048*2048 numpy arrays with some overlap then crop from there at load time. (I pre-compute the alignment between each image and its ground-truths and apply that at load time. Since there are multiple ground-truths I can't pre-align the crops). I use 16-bit OpenEXR files as the ground-truth images (down from 32-bit to save a lot of disk space).

Just an FYI, the focus-stack project also uses findTransformECC, but it's a lot faster as it's written in C++. It has the "--align-only" option:
https://github.com/PetteriAimonen/focus-stack/