ClosingLineMinimum
Performs a minimal linear closing.
Access to parameter description
For an introduction:
It is very useful for filtering circular shapes, because it fills holes in all directions (the circular ones first).
Like a classical closing transform, combining this algorithm with a subtraction to the original image and an appropriate threshold performs a Top Hat well adapted to circular dark object detection.
In the 2D case, directions are regularly sampled around the unit circle (starting with an horizontal right oriented direction). In the 3D case, a unit sphere is regularly sampled (starting with a vertical upper oriented direction).
See also
Access to parameter description
For an introduction:
- section Mathematical Morphology
- section Introduction To Closing
It is very useful for filtering circular shapes, because it fills holes in all directions (the circular ones first).
Like a classical closing transform, combining this algorithm with a subtraction to the original image and an appropriate threshold performs a Top Hat well adapted to circular dark object detection.
In the 2D case, directions are regularly sampled around the unit circle (starting with an horizontal right oriented direction). In the 3D case, a unit sphere is regularly sampled (starting with a vertical upper oriented direction).
See also
Function Syntax
This function returns the outputImage output parameter.
// Function prototype. std::shared_ptr< iolink::ImageView > closingLineMinimum( std::shared_ptr< iolink::ImageView > inputImage, int32_t kernelRadius, int32_t directionNumber, std::shared_ptr< iolink::ImageView > outputImage = NULL );
This function returns the outputImage output parameter.
// Function prototype. closing_line_minimum( input_image, kernel_radius = 3, direction_number = 4, output_image = None )
This function returns the outputImage output parameter.
// Function prototype. public static IOLink.ImageView ClosingLineMinimum( IOLink.ImageView inputImage, Int32 kernelRadius = 3, Int32 directionNumber = 4, IOLink.ImageView outputImage = null );
Class Syntax
Parameters
Class Name | ClosingLineMinimum |
---|
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
inputImage |
The input image. | Image | Binary, Label, Grayscale or Multispectral | nullptr | |
kernelRadius |
The length of the linear structuring element in pixels. | Int32 | >=1 | 3 | |
directionNumber |
The number of directions for linear linear closing. | Int32 | >=1 | 4 | |
outputImage |
The output image. Its dimensions and type are forced to the same values as the input image. | Image | nullptr |
Object Examples
auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" ); ClosingLineMinimum closingLineMinimumAlgo; closingLineMinimumAlgo.setInputImage( foam ); closingLineMinimumAlgo.setKernelRadius( 3 ); closingLineMinimumAlgo.setDirectionNumber( 4 ); closingLineMinimumAlgo.execute(); std::cout << "outputImage:" << closingLineMinimumAlgo.outputImage()->toString();
foam = imagedev.read_vip_image(imagedev_data.get_image_path("foam.vip")) closing_line_minimum_algo = imagedev.ClosingLineMinimum() closing_line_minimum_algo.input_image = foam closing_line_minimum_algo.kernel_radius = 3 closing_line_minimum_algo.direction_number = 4 closing_line_minimum_algo.execute() print( "output_image:", str( closing_line_minimum_algo.output_image ) )
ImageView foam = Data.ReadVipImage( @"Data/images/foam.vip" ); ClosingLineMinimum closingLineMinimumAlgo = new ClosingLineMinimum { inputImage = foam, kernelRadius = 3, directionNumber = 4 }; closingLineMinimumAlgo.Execute(); Console.WriteLine( "outputImage:" + closingLineMinimumAlgo.outputImage.ToString() );
Function Examples
auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" ); auto result = closingLineMinimum( foam, 3, 4 ); std::cout << "outputImage:" << result->toString();
foam = imagedev.read_vip_image(imagedev_data.get_image_path("foam.vip")) result = imagedev.closing_line_minimum( foam, 3, 4 ) print( "output_image:", str( result ) )
ImageView foam = Data.ReadVipImage( @"Data/images/foam.vip" ); IOLink.ImageView result = Processing.ClosingLineMinimum( foam, 3, 4 ); Console.WriteLine( "outputImage:" + result.ToString() );