A Dynamic Time Warping-Based Approach for 2D Affine Image Alignment

Researcher(s)

  • Lindsey Wang, Electrical Engineering, University of Delaware

Faculty Mentor(s)

  • Jason Gleghorn, Biomedical Engineering, University of Delaware

Abstract

Dynamic Time Warping (DTW) is a well-known algorithm for measuring similarity and finding an optimal match between two sequences. Its properties make it useful for aligning images, which is a crucial step in the anatomical reconstruction of microscopy data. Current pipelines in our lab have made progress towards high-throughput anatomically 3D reconstruction but struggle with 2D image alignment with complex vasculature. Here, we present a framework to correct for z-stack misalignment – due to minor displacements / rotations of the tissue under the microscope when manually imaging different sections of the organ – using DTW and affine transformations. The proof of concept for our theoretical framework centers on solving the following inverse problem: given affine transform of horizontal and vertical translations u and v and rotation θ, we aim to estimate this (u,v,θ) transformation. First, a vector field is calculated using DTW to summarize the pixel-level mappings between images; each vector starts at the original image pixel location and points to the pixel it maps to in the synthetically misaligned image. Next, we derive a system of three nonlinear equations to mathematically describe the latent transformation, involving u, v, θ, image centroid coordinates α and β, and three randomly-selected input-output coordinate pairs (xk,yk)(xk’,yk’). Finally, we estimate the transformation for a particular iteration through a multidimensional root-finder to solve the nonlinear system, and images are iteratively aligned through a multi-shot analysis in the case of imperfect, noisy real data. Based on this theoretical framework, real-world lymph node images were used to demonstrate that the latent rotation and displacement transformations can be uncovered by the proposed framework using a DTW-based vector field extracted from the images.