RegionalExtrema2d
Computes the regional extrema in a grayscale 2D image and marks them in a binary image.
Access to parameter description
For an introduction:
Access to parameter description
For an introduction:
- section Mathematical Morphology
- section Geodesic Transformations
Function Syntax
This function returns outputBinaryImage.
// Function prototype
std::shared_ptr< iolink::ImageView > regionalExtrema2d( std::shared_ptr< iolink::ImageView > inputImage, RegionalExtrema2d::ExtremaType extremaType, RegionalExtrema2d::Neighborhood neighborhood, std::shared_ptr< iolink::ImageView > outputBinaryImage = NULL );
This function returns outputBinaryImage.
// Function prototype. regional_extrema_2d( input_image, extrema_type = RegionalExtrema2d.ExtremaType.MAXIMA, neighborhood = RegionalExtrema2d.Neighborhood.CONNECTIVITY_8, output_binary_image = None )
This function returns outputBinaryImage.
// Function prototype. public static IOLink.ImageView RegionalExtrema2d( IOLink.ImageView inputImage, RegionalExtrema2d.ExtremaType extremaType = ImageDev.RegionalExtrema2d.ExtremaType.MAXIMA, RegionalExtrema2d.Neighborhood neighborhood = ImageDev.RegionalExtrema2d.Neighborhood.CONNECTIVITY_8, IOLink.ImageView outputBinaryImage = null );
Class Syntax
Parameters
Parameter Name | Description | Type | Supported Values | Default Value | |||||
---|---|---|---|---|---|---|---|---|---|
inputImage |
The input grayscale image. | Image | Grayscale | nullptr | |||||
extremaType |
The type of extrema to detect.
|
Enumeration | MAXIMA | ||||||
neighborhood |
The 2D neighborhood configuration.
|
Enumeration | CONNECTIVITY_8 | ||||||
outputBinaryImage |
The output binary. Its dimensions is forced to the same values as the input. | Image | nullptr |
Parameter Name | Description | Type | Supported Values | Default Value | |||||
---|---|---|---|---|---|---|---|---|---|
input_image |
The input grayscale image. | image | Grayscale | None | |||||
extrema_type |
The type of extrema to detect.
|
enumeration | MAXIMA | ||||||
neighborhood |
The 2D neighborhood configuration.
|
enumeration | CONNECTIVITY_8 | ||||||
output_binary_image |
The output binary. Its dimensions is forced to the same values as the input. | image | None |
Parameter Name | Description | Type | Supported Values | Default Value | |||||
---|---|---|---|---|---|---|---|---|---|
inputImage |
The input grayscale image. | Image | Grayscale | null | |||||
extremaType |
The type of extrema to detect.
|
Enumeration | MAXIMA | ||||||
neighborhood |
The 2D neighborhood configuration.
|
Enumeration | CONNECTIVITY_8 | ||||||
outputBinaryImage |
The output binary. Its dimensions is forced to the same values as the input. | Image | null |
Object Examples
std::shared_ptr< iolink::ImageView > polystyrene = ioformat::readImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene.tif" ); RegionalExtrema2d regionalExtrema2dAlgo; regionalExtrema2dAlgo.setInputImage( polystyrene ); regionalExtrema2dAlgo.setExtremaType( RegionalExtrema2d::ExtremaType::MAXIMA ); regionalExtrema2dAlgo.setNeighborhood( RegionalExtrema2d::Neighborhood::CONNECTIVITY_8 ); regionalExtrema2dAlgo.execute(); std::cout << "outputBinaryImage:" << regionalExtrema2dAlgo.outputBinaryImage()->toString();
polystyrene = ioformat.read_image(imagedev_data.get_image_path("polystyrene.tif")) regional_extrema_2d_algo = imagedev.RegionalExtrema2d() regional_extrema_2d_algo.input_image = polystyrene regional_extrema_2d_algo.extrema_type = imagedev.RegionalExtrema2d.MAXIMA regional_extrema_2d_algo.neighborhood = imagedev.RegionalExtrema2d.CONNECTIVITY_8 regional_extrema_2d_algo.execute() print( "output_binary_image:", str( regional_extrema_2d_algo.output_binary_image ) )
ImageView polystyrene = ViewIO.ReadImage( @"Data/images/polystyrene.tif" ); RegionalExtrema2d regionalExtrema2dAlgo = new RegionalExtrema2d { inputImage = polystyrene, extremaType = RegionalExtrema2d.ExtremaType.MAXIMA, neighborhood = RegionalExtrema2d.Neighborhood.CONNECTIVITY_8 }; regionalExtrema2dAlgo.Execute(); Console.WriteLine( "outputBinaryImage:" + regionalExtrema2dAlgo.outputBinaryImage.ToString() );
Function Examples
std::shared_ptr< iolink::ImageView > polystyrene = ioformat::readImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene.tif" ); auto result = regionalExtrema2d( polystyrene, RegionalExtrema2d::ExtremaType::MAXIMA, RegionalExtrema2d::Neighborhood::CONNECTIVITY_8 ); std::cout << "outputBinaryImage:" << result->toString();
polystyrene = ioformat.read_image(imagedev_data.get_image_path("polystyrene.tif")) result = imagedev.regional_extrema_2d( polystyrene, imagedev.RegionalExtrema2d.MAXIMA, imagedev.RegionalExtrema2d.CONNECTIVITY_8 ) print( "output_binary_image:", str( result ) )
ImageView polystyrene = ViewIO.ReadImage( @"Data/images/polystyrene.tif" ); IOLink.ImageView result = Processing.RegionalExtrema2d( polystyrene, RegionalExtrema2d.ExtremaType.MAXIMA, RegionalExtrema2d.Neighborhood.CONNECTIVITY_8 ); Console.WriteLine( "outputBinaryImage:" + result.ToString() );