An image alignment tool is described for adjusting the alignment of a grid
with an image. An initial grid aligner determines an initial,
approximately aligned, position of the grid. An intensity scorer
determines, for each of a plurality of test grid elements of the
plurality of grid elements, a set of intensity scores. Each member of the
set is based, at least in part, on intensities of pixels of one or more
image features within the test grid element in one of the initial or
additional positions. A combined-rank-score generator combines, for each
of the initial and additional grid positions, members of sets of rank
scores corresponding to the grid position in order to generate a combined
rank score for the grid position. A grid alignment adjuster adjusts the
alignment of the grid based on a comparison among the combined rank
scores.