OpeningLineMaximum
Performs a maximal linear opening.
Access to parameter description
For an introduction:
It is very useful for filtering circular shapes, because it removes blobs in all directions (the circular ones first).
Like a classical opening transform, combining this algorithm with a subtraction to the original image and an appropriate threshold performs a Top Hat well adapted to circular bright object detection.
In the 2D case, directions are regularly sampled around the unit circle (starting with a 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 Opening
It is very useful for filtering circular shapes, because it removes blobs in all directions (the circular ones first).
Like a classical opening transform, combining this algorithm with a subtraction to the original image and an appropriate threshold performs a Top Hat well adapted to circular bright object detection.
In the 2D case, directions are regularly sampled around the unit circle (starting with a 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 > openingLineMaximum( std::shared_ptr< iolink::ImageView > inputImage, int32_t kernelRadius, int32_t directionNumber, std::shared_ptr< iolink::ImageView > outputImage = NULL );
This function returns outputImage.
// Function prototype.
opening_line_maximum( input_image,
kernel_radius = 3,
direction_number = 4,
output_image = None )
This function returns outputImage.
// Function prototype.
public static IOLink.ImageView
OpeningLineMaximum( 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 opening. | 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 opening. | 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 opening. | 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" ); OpeningLineMaximum openingLineMaximumAlgo; openingLineMaximumAlgo.setInputImage( foam ); openingLineMaximumAlgo.setKernelRadius( 3 ); openingLineMaximumAlgo.setDirectionNumber( 4 ); openingLineMaximumAlgo.execute(); std::cout << "outputImage:" << openingLineMaximumAlgo.outputImage()->toString();
foam = imagedev.read_vip_image(imagedev_data.get_image_path("foam.vip"))
opening_line_maximum_algo = imagedev.OpeningLineMaximum()
opening_line_maximum_algo.input_image = foam
opening_line_maximum_algo.kernel_radius = 3
opening_line_maximum_algo.direction_number = 4
opening_line_maximum_algo.execute()
print( "output_image:", str( opening_line_maximum_algo.output_image ) )
ImageView foam = Data.ReadVipImage( @"Data/images/foam.vip" );
OpeningLineMaximum openingLineMaximumAlgo = new OpeningLineMaximum
{
inputImage = foam,
kernelRadius = 3,
directionNumber = 4
};
openingLineMaximumAlgo.Execute();
Console.WriteLine( "outputImage:" + openingLineMaximumAlgo.outputImage.ToString() );
Function Examples
auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" ); auto result = openingLineMaximum( foam, 3, 4 ); std::cout << "outputImage:" << result->toString();
foam = imagedev.read_vip_image(imagedev_data.get_image_path("foam.vip"))
result = imagedev.opening_line_maximum( foam, 3, 4 )
print( "output_image:", str( result ) )
ImageView foam = Data.ReadVipImage( @"Data/images/foam.vip" ); IOLink.ImageView result = Processing.OpeningLineMaximum( foam, 3, 4 ); Console.WriteLine( "outputImage:" + result.ToString() );

