ImageDev

RidgeDetection

Provides the local maxima of an image.

Access to parameter description

For an introduction: This algorithm provides the local maxima using an edge tracking process. On a two-dimensional image, it keeps the configuration of those kind of 3x3 neighborhoods: $$ \begin{array}{ccc} x & b & x\\ x & a & x\\ x & c & x\end{array} \qquad \begin{array}{ccc} x & x & x\\ b & a & c\\ x & x & x\end{array} \qquad \begin{array}{ccc} b & x & x\\ x & a & x\\ x & x & c\end{array} \qquad \begin{array}{ccc} x & x & b\\ x & a & x\\ c & x & x\end{array} \qquad where ~ b < a ~ and ~ c < a $$
See also

Function Syntax

This function returns the outputBinaryImage output parameter.
// Function prototype.
std::shared_ptr< iolink::ImageView >
ridgeDetection( std::shared_ptr< iolink::ImageView > inputImage,
                RidgeDetection::Neighborhood neighborhood,
                std::shared_ptr< iolink::ImageView > outputBinaryImage = NULL );
This function returns the outputBinaryImage output parameter.
// Function prototype.
ridge_detection( input_image, neighborhood = RidgeDetection.Neighborhood.CONNECTIVITY_26, output_binary_image = None )
This function returns the outputBinaryImage output parameter.
// Function prototype.
public static IOLink.ImageView
RidgeDetection( IOLink.ImageView inputImage,
                RidgeDetection.Neighborhood neighborhood = ImageDev.RidgeDetection.Neighborhood.CONNECTIVITY_26,
                IOLink.ImageView outputBinaryImage = null );

Class Syntax

Parameters

Class Name RidgeDetection

Parameter Name Description Type Supported Values Default Value
input
inputImage
The input image. Image Binary, Label, Grayscale or Multispectral nullptr
input
neighborhood
The 3D neighborhood configuration. This parameter is ignored with a 2D input image.
CONNECTIVITY_6 The structuring element is composed of voxels with a common face with the voxel of interest.
CONNECTIVITY_18 The structuring element is composed of voxels with at least one common edge.
CONNECTIVITY_26 The structuring element is a full cube.
Enumeration CONNECTIVITY_26
output
outputBinaryImage
The binary output image. Image nullptr

Object Examples

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

RidgeDetection ridgeDetectionAlgo;
ridgeDetectionAlgo.setInputImage( foam );
ridgeDetectionAlgo.setNeighborhood( RidgeDetection::Neighborhood::CONNECTIVITY_26 );
ridgeDetectionAlgo.execute();

std::cout << "outputBinaryImage:" << ridgeDetectionAlgo.outputBinaryImage()->toString();
foam = imagedev.read_vip_image(imagedev_data.get_image_path("foam.vip"))

ridge_detection_algo = imagedev.RidgeDetection()
ridge_detection_algo.input_image = foam
ridge_detection_algo.neighborhood = imagedev.RidgeDetection.CONNECTIVITY_26
ridge_detection_algo.execute()

print( "output_binary_image:", str( ridge_detection_algo.output_binary_image ) )
ImageView foam = Data.ReadVipImage( @"Data/images/foam.vip" );

RidgeDetection ridgeDetectionAlgo = new RidgeDetection
{
    inputImage = foam,
    neighborhood = RidgeDetection.Neighborhood.CONNECTIVITY_26
};
ridgeDetectionAlgo.Execute();

Console.WriteLine( "outputBinaryImage:" + ridgeDetectionAlgo.outputBinaryImage.ToString() );

Function Examples

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

auto result = ridgeDetection( foam, RidgeDetection::Neighborhood::CONNECTIVITY_26 );

std::cout << "outputBinaryImage:" << result->toString();
foam = imagedev.read_vip_image(imagedev_data.get_image_path("foam.vip"))

result = imagedev.ridge_detection( foam, imagedev.RidgeDetection.CONNECTIVITY_26 )

print( "output_binary_image:", str( result ) )
ImageView foam = Data.ReadVipImage( @"Data/images/foam.vip" );

IOLink.ImageView result = Processing.RidgeDetection( foam, RidgeDetection.Neighborhood.CONNECTIVITY_26 );

Console.WriteLine( "outputBinaryImage:" + result.ToString() );