Apply the given convolutions, and take squared sum for the edges
By applying a Gaussian filter first, the edges are "denoised", since the noise is washed away when adding more noise.
Trying angles between [-3, 3], -3 worked the best. Looking at the histograme, we want to align a peak.
Here are a few hard images that I ran the algorithm on
This one aligned with gravity and vertical, and is hard due to the branches. The feathers do give it away though, so it's rotated by 1 degree
As a failure, it's top down, so our heuristic of vertical and horizontal lines no longer works. The histogram doesn't have peaks.
So the rotation doesn't really make sense
For a well aligned image, there is no difference to align, and so no rotation is applied
This is the result of sharpening the blurry Taj image. I simply added the high frequency component of the image once in the second panel and twice in the third panel.
Here's a cool image of sharpening this image. The left glasses is sharpened a lot, as well as the light patterns
Blurring then sharpening the bird
A lot of the background information from the bird is lost when blurred then sharpened.
As a failure, if the images are not aligned properly, then the disalignment is very apparent. However on a small scale, it can't be noticed too much, so I consider it a success
Otherwise, PP (Potato Pieter) looks great! Close up and far away, it's much easier to focus on the Potato vs Pieter's eyes.
Here are the stacks for Part 2.4's image.
Here's the oraple
I tried, however the blending doesn't seem to be so good when the mask is not very good. So that's a failure case I guess