Image Cross-Correlation and Interlacing¶
A module that provides algorithm for creating sub-pixel cross-correlation images and computing displacements.
Author: | Mihai Cara (for help, contact HST Help Desk) |
---|---|
License: | LICENSE |
-
subpixal.cc.
find_displacement
(ref_image, image00, image10, image01, image11)[source]¶ Find subpixel displacements between one reference cutout and a set of four “dithered” cutouts. This is achieved by finding peak position in a “supersampled” cross-correlation image obtained by interlacing cross-correlation maps of reference cutout with each dithered cutout.
Parameters: - ref_image : numpy.ndarray
Image of a reference cutout.
- image00 : numpy.ndarray
Image whose displacement relative to reference image needs to be computed. It must have same shape as
ref_image
.- image10 : numpy.ndarray
“Same” image as
image00
but sampled at a 1/2 pixel displacement along the X-axis. It must have same shape asref_image
.- image01 : numpy.ndarray
“Same” image as
image00
but sampled at a 1/2 pixel displacement along the Y-axis. It must have same shape asref_image
.- image11 : numpy.ndarray
“Same” image as
image00
but sampled at a 1/2 pixel displacement along both X-axis and Y-axis. It must have same shape asref_image
.
Returns: - dx : float
Displacement of
image00
with regard toref_image
along the X-axis (columns).- dy : float
Displacement of
image00
with regard toref_image
along the Y-axis (rows).