Optical microscopy poses many challenges for digital image analysis. One particular challenge includes correction of image artifacts due to respiratory motion from specimens imaged in vivo. We describe a non-rigid registration method using B-splines to correct these motion artifacts. Current attempts at non-rigid medical image registration have typically involved only a single pair of images. Extending these techniques to an entire series of images, possibly comprising hundreds of images, is presented in this paper. Our method involves creating a uniform grid of control points across each image in a stack. Each control point is manipulated by optimizing a cost function consisting of two parts: a term to determine image similarity, and a term to evaluate deformation grid smoothness. This process is repeated for all images in the stack. Analysis is evaluated using block motion estimation and other visualization techniques.