A recently conceived algorithm for processing image data acquired by a Shack-Hartmann (SH) wavefront sensor is not subject to the restriction, previously applicable in SH wavefront sensing, that the image be formed from a distant star or other equivalent of a point light source. That is to say, the image could be of an extended scene. (One still has the option of using a point source.) The algorithm can be implemented in commercially available software on ordinary computers.
The steps of the algorithm are the following:
- Suppose that the image comprises M sub-images. Determine the x,y Cartesian coordinates of the centers of these sub-images and store them in a 2×M matrix.
- Within each sub-image, choose an N×N-pixel cell centered at the coordinates determined in step 1. For the ith sub-image, let this cell be denoted as si(x,y). Let the cell of another sub-image (preferably near the center of the whole extended-scene image) be designated a reference cell, denoted r(x,y).
- Calculate the fast Fourier transforms of the sub-sub-images in the central N'×N' portions (where N' < N and both are preferably powers of 2) of r(x,y) and si(x,y).
- Multiply the two transforms to obtain a cross-correlation function Ci(u,ν), in the Fourier domain. Then let the phase of Ci(u,ν) constitute a phase function, Φ(u,ν).
- Fit u and ν slopes to Φ(u,ν) over a small u,ν subdomain.
- Compute the fast Fourier transform, Si(u,ν) of the full N×N cell si(x,y). Multiply this transform by the u and ν phase slopes obtained in step 4. Then compute the inverse fast Fourier transform of the product.
- Repeat steps 4 through 6 in an iteration loop, cumulating the u and ν slopes, until a maximum iteration number is reached or the change in image shift becomes smaller than a predetermined tolerance.
- Repeat steps 4 through 7 for the cells of all other sub-images.
This work was done by Erkin Sidick, Joseph Green, Catherine Ohara, and David Redding of Caltech for NASA's Jet Propulsion Laboratory.
The software used in this innovation is available for commercial licensing. Please contact Karina Edmonds of the California Institute of Technology at (626) 395-2322. Refer to NPO-44770.
This Brief includes a Technical Support Package (TSP).

Algorithm for Wavefront Sensing Using an Extended Scene
(reference NPO-44770) is currently available for download from the TSP library.
Don't have an account?
Overview
The document outlines NASA's Technical Support Package NPO-44770, which presents an innovative algorithm for Shack-Hartmann wavefront sensing (SH-WFS) that utilizes extended scenes instead of the conventional point-source requirement, such as stars. This advancement is significant for applications in aerospace and optical systems, as it allows for more versatile wavefront sensing capabilities.
The algorithm addresses the limitations of existing SH-WFS software, which was primarily designed for point-source spot images. By enabling the use of extended scenes, the algorithm enhances the ability to conduct wavefront sensing in various environments, making it applicable to a broader range of scenarios.
The process begins with determining the centers of sub-images from the extended scene and storing their x- and y-positions in a matrix. A specific sub-aperture, referred to as a cell, is then chosen around these positions. The algorithm selects a reference cell, ideally located near the center of the extended scene, and computes the Fast Fourier Transform (FFT) of its central pixel portion. This is followed by a series of steps that involve calculating a cross-correlation function in the Fourier domain, obtaining a phase function, and fitting slopes to this phase function.
The algorithm iteratively refines the wavefront sensing by repeating the correlation and slope fitting processes, cumulating the results until a maximum iteration count is reached or the changes in image shift fall below a predetermined tolerance. This iterative approach ensures that the algorithm converges on accurate wavefront measurements.
The document also includes references to publications that detail the development and experimental validation of the adaptive cross-correlation algorithm for extended scene SH-WFS. These publications highlight the collaborative efforts of researchers involved in this project, showcasing its acceptance in reputable journals and conferences.
Overall, the algorithm represents a significant step forward in wavefront sensing technology, providing a robust tool for researchers and engineers in the field of optics and aerospace. By facilitating the use of extended scenes, it opens new avenues for research and practical applications, enhancing the capabilities of optical systems in various settings.

