trougnouf / nind-denoise

Image denoising using the Natural Image Noise Dataset
GNU General Public License v3.0
27 stars 6 forks source link

Image alignment #6

Open hqhoang opened 1 year ago

hqhoang commented 1 year ago

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.

https://github.com/trougnouf/nind-denoise/compare/master...hqhoang:nind-denoise:align-images

trougnouf commented 1 year ago

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).

hqhoang commented 1 year ago

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/