import numpy as np
import skimage as sk
import skimage.io as skio
import scipy
from matplotlib import pyplot as plt
The start of the project followed the skeleton provided in the colorized_skel.py file. We separate the channels just as the skeleton shows.
Crop helper function that find first corner value that is no longer either entirely black or white. We use a rudimentary method of checking the corners until we find a value that starkly contrasts the rest of the photo.
I utilize Normalize Cross-Correlation to find alignment
There is commented code for edges that was attempted that creates similar images for the jpgs, but fails to run in a timely manner for tifs.
For aligning, I used ncc to score positions within the images that shared the highest score values.
As exhaustive search is inefficient and too slow for larger sized images, we use an image pyramid to align the larger images
Attempt to create canny edge detector image mask to use edges to score images instead of pixel color
Sample Canny Edge Result
Some of the result images especially ones where there are more artifacts as a result of the cropping for channels, do not have the greatest alignment but can be remedied by proper edge scoring. I was not able to try a variety of edge options, however I saw many sublisted on the wikipedia page for Canny Edge Detecting and I am sure that one of them would be viable and more efficient.