A system capable of determining wavefront characteristics, such as air
induced wavefront aberrations, includes a field programmable gate array
(FPGA) device executing a phase diversity algorithm. The FPGA device can
be a stand-alone device or comprise multiple FPGAs. The device receives
an "in-focus" and an "out-of-focus" image having a known optical
difference from that of the "in-focus" image. The device then performs as
many phase diversity algorithm iterations as desired to reach an
expression for the wavefront aberrations induced on the collected image
data. The resulting wavefront data may be used to produce an enhanced
image of the original image data. Example applications include remote
sensors and targeting systems, and both passive imaging and active
projection systems that compensate for wavefront anomalies.