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 outputImage.
// 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 = nullptr );
This function returns outputImage.
// Function prototype. closing_line_minimum(input_image: idt.ImageType, kernel_radius: int = 3, direction_number: int = 4, output_image: idt.ImageType = None) -> idt.ImageType
This function returns outputImage.
// Function prototype. public static IOLink.ImageView ClosingLineMinimum( IOLink.ImageView inputImage, Int32 kernelRadius = 3, Int32 directionNumber = 4, IOLink.ImageView outputImage = null );
Class Syntax
Parameters
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 |
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
input_image |
The input image. | image | Binary, Label, Grayscale or Multispectral | None | |
kernel_radius |
The length of the linear structuring element in pixels. | int32 | >=1 | 3 | |
direction_number |
The number of directions for linear linear closing. | int32 | >=1 | 4 | |
output_image |
The output image. Its dimensions and type are forced to the same values as the input image. | image | None |
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
inputImage |
The input image. | Image | Binary, Label, Grayscale or Multispectral | null | |
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 | null |
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() );