DIPlib Documentation - ©1995-2014 Quantitative Imaging Group, Delft University of Technology.

SubpixelMinima

Gets coordinates of local minima with sub-pixel precision

SYNOPSIS

#include "dip_analysis.h"

dip_Error dip_SubpixelMinima ( in, mask, out_coord, out_val, method )

DATA TYPES

integer, float

FUNCTION

Detects local minima in the image, and returns their coordinates, with sub-pixel precision, in the output image out_coord. Only pixels where mask is on will be examined. Local minima are detected using Minima, then their position is determined accurately using SubpixelLocation. out_coord will have ndims pixels along the first dimension (ndims being the number of dimensions in in), and as many pixels along the second dimension as there are local minima in in. Thus, each row of the image out_coord contains the coordinates of one local minimum. out_coord is always dip_float. out_val, when not 0, will contain the interpolated values of the image at the local minima. out_val will have the same size and type as out_coord, except only one pixel along the first dimension.

A local minimum can not touch the edge of the image. That is, its integer location must be one pixel away from the edge.

See SubpixelLocation for the definition of the method parameter.

ARGUMENTS

Data typeNameDescription
dip_ImageinInput grayscale image
dip_ImagemaskBinary mask for ROI processing
dip_Imageout_coordOutput coordinates, image will be N_dims x N_minima
dip_Imageout_valOutput values, image will be 1 x N_minima
dipf_SubpixelExtremumMethodmethodSub-pixel detection method

SEE ALSO

SubpixelMaxima, SubpixelLocation, Minima