delta.utilities.driftcorr

delta.utilities.driftcorr(img, template=None, box=None, drift=None)

Compute drift between current frame and the reference, and return corrected image

Parameters
img2D or 3D numpy array of uint8/uint16/floats

The frames to correct drfit for.

templateNone or 2D numpy array of uint8/uint16/floats, optional

The template for drift correction (see getDriftTemplate()). default is None.

boxNone or dictionary, optional

A cropping box to extract the part of the frame to compute drift correction over (see cropbox()). default is None.

driftNone or tuple of 2 numpy arrays, optional

Pre-computed drift to apply to the img stack. If this is None, you must provide a template and box. default it None.

Returns
2D/3D numpy array, tuple of len 2

Drift-corrected image and drift.