ewoksndreg.evaluation.eval_metrics.peak_eval#

ewoksndreg.evaluation.eval_metrics.peak_eval(stack, reference_image)[source]#

Calculate a measure of how reliable a stack of images is to determine the transformations between the images.

The measure is based on phase cross correlation which generates an image with the peak with coordinates corresponding to the shift. This eval calculates how distinguished this peak is by comparing it to the mean of the phase correlation image.

Parameters:
  • stack (ndarray) – the aligned or unaligned stack

  • reference_image (int) – reference image for phase cross correlation

Return type:

float

Returns:

reliablility measure (smaller value means more reliable)