Loading [MathJax]/jax/output/CommonHTML/jax.js
ImageDev

RegionalExtrema3d

Computes the regional maxima or minima of a three-dimensional grayscale image and marks them in a binary image.

Access to parameter description

For an introduction: This algorithm computes the regional (or relative) maxima or minima of a grayscale image I and creates a binary image O containing these extrema.

A regional maximum (resp. minimum) C is a set of connected pixels such that:

<b> Figure 1.</b> One-dimensional example of a regional maxima detection
Figure 1. One-dimensional example of a regional maxima detection


<b> Figure 2.</b> One-dimensional example of a regional minima detection
Figure 2. One-dimensional example of a regional minima detection


This algorithm uses a recursive method combined with a geodesic propagation.
To avoid getting too many regions in the output image, the input should be smoothed first with a low-pass filter or with the numerical reconstruction algorithm.

Reference:
P. Soille, Morphological Image Analysis. Principles and Applications, Second Edition, Springer-Verlag, Berlin, pp.201-203, 2003.

See also

Function Syntax

This function returns outputBinaryImage.
// Function prototype
std::shared_ptr< iolink::ImageView > regionalExtrema3d( std::shared_ptr< iolink::ImageView > inputImage, RegionalExtrema3d::ExtremaType extremaType, RegionalExtrema3d::Neighborhood neighborhood, std::shared_ptr< iolink::ImageView > outputBinaryImage = nullptr );

Class Syntax

Parameters

Parameter Name Description Type Supported Values Default Value
input
inputImage
The input grayscale image. Image Grayscale nullptr
input
extremaType
The type of extrema to detect.
MAXIMA The regional maxima are extracted from the input image.
MINIMA The regional minima are extracted from the input image.
Enumeration MAXIMA
input
neighborhood
The 3D neighborhood configuration.
CONNECTIVITY_6 The neighborhood configuration is composed of voxels with a common face with the voxel of interest.
CONNECTIVITY_18 The neighborhood configuration is composed of voxels with at least one common edge.
CONNECTIVITY_26 The neighborhood configuration is a full cube.
Enumeration CONNECTIVITY_26
output
outputBinaryImage
The output binary image. Its dimensions are forced to the same values as the input. Image nullptr

Object Examples

auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" );

RegionalExtrema3d regionalExtrema3dAlgo;
regionalExtrema3dAlgo.setInputImage( foam );
regionalExtrema3dAlgo.setExtremaType( RegionalExtrema3d::ExtremaType::MAXIMA );
regionalExtrema3dAlgo.setNeighborhood( RegionalExtrema3d::Neighborhood::CONNECTIVITY_26 );
regionalExtrema3dAlgo.execute();

std::cout << "outputBinaryImage:" << regionalExtrema3dAlgo.outputBinaryImage()->toString();

Function Examples

auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" );

auto result = regionalExtrema3d( foam, RegionalExtrema3d::ExtremaType::MAXIMA, RegionalExtrema3d::Neighborhood::CONNECTIVITY_26 );

std::cout << "outputBinaryImage:" << result->toString();