BorderKill
Removes the objects connected to the borders of a segmented image.
Access to parameter description
This command is deprecated, it will be removed in ImageDev 2024.2.
You can use KillBorder instead.
For an introduction:
Objects connected to the image borders are identified using a numerical reconstruction from markers made of pixels of the image frame.
Figure 1. Illustration of the BorderKill algorithm
See also
See related examples
Access to parameter description
This command is deprecated, it will be removed in ImageDev 2024.2.
You can use KillBorder instead.
For an introduction:
- section Mathematical Morphology
- section Reconstruction From Markers
Objects connected to the image borders are identified using a numerical reconstruction from markers made of pixels of the image frame.
Figure 1. Illustration of the BorderKill algorithm
See also
See related examples
Function Syntax
This function returns outputObjectImage.
// Function prototype
std::shared_ptr< iolink::ImageView > borderKill( std::shared_ptr< iolink::ImageView > inputObjectImage, BorderKill::Neighborhood neighborhood, std::shared_ptr< iolink::ImageView > outputObjectImage = NULL );
This function returns outputObjectImage.
// Function prototype. border_kill( input_object_image, neighborhood = BorderKill.Neighborhood.CONNECTIVITY_26, output_object_image = None )
This function returns outputObjectImage.
// Function prototype. public static IOLink.ImageView BorderKill( IOLink.ImageView inputObjectImage, BorderKill.Neighborhood neighborhood = ImageDev.BorderKill.Neighborhood.CONNECTIVITY_26, IOLink.ImageView outputObjectImage = null );
Class Syntax
Parameters
Parameter Name | Description | Type | Supported Values | Default Value | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
inputObjectImage |
The input binary or label image. | Image | Binary or Label | nullptr | |||||||
neighborhood |
The 3D neighborhood configuration. This parameter is ignored with a 2D input image.
|
Enumeration | CONNECTIVITY_26 | ||||||||
outputObjectImage |
The output binary or label image. Its dimensions and type are forced to the same values as the input. | Image | nullptr |
Parameter Name | Description | Type | Supported Values | Default Value | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
input_object_image |
The input binary or label image. | image | Binary or Label | None | |||||||
neighborhood |
The 3D neighborhood configuration. This parameter is ignored with a 2D input image.
|
enumeration | CONNECTIVITY_26 | ||||||||
output_object_image |
The output binary or label image. Its dimensions and type are forced to the same values as the input. | image | None |
Parameter Name | Description | Type | Supported Values | Default Value | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
inputObjectImage |
The input binary or label image. | Image | Binary or Label | null | |||||||
neighborhood |
The 3D neighborhood configuration. This parameter is ignored with a 2D input image.
|
Enumeration | CONNECTIVITY_26 | ||||||||
outputObjectImage |
The output binary or label image. Its dimensions and type are forced to the same values as the input. | Image | null |
Object Examples
auto foam_sep = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam_sep.vip" ); BorderKill borderKillAlgo; borderKillAlgo.setInputObjectImage( foam_sep ); borderKillAlgo.setNeighborhood( BorderKill::Neighborhood::CONNECTIVITY_26 ); borderKillAlgo.execute(); std::cout << "outputObjectImage:" << borderKillAlgo.outputObjectImage()->toString();
foam_sep = imagedev.read_vip_image(imagedev_data.get_image_path("foam_sep.vip")) border_kill_algo = imagedev.BorderKill() border_kill_algo.input_object_image = foam_sep border_kill_algo.neighborhood = imagedev.BorderKill.CONNECTIVITY_26 border_kill_algo.execute() print( "output_object_image:", str( border_kill_algo.output_object_image ) )
ImageView foam_sep = Data.ReadVipImage( @"Data/images/foam_sep.vip" ); BorderKill borderKillAlgo = new BorderKill { inputObjectImage = foam_sep, neighborhood = BorderKill.Neighborhood.CONNECTIVITY_26 }; borderKillAlgo.Execute(); Console.WriteLine( "outputObjectImage:" + borderKillAlgo.outputObjectImage.ToString() );
Function Examples
auto foam_sep = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam_sep.vip" ); auto result = borderKill( foam_sep, BorderKill::Neighborhood::CONNECTIVITY_26 ); std::cout << "outputObjectImage:" << result->toString();
foam_sep = imagedev.read_vip_image(imagedev_data.get_image_path("foam_sep.vip")) result = imagedev.border_kill( foam_sep, imagedev.BorderKill.CONNECTIVITY_26 ) print( "output_object_image:", str( result ) )
ImageView foam_sep = Data.ReadVipImage( @"Data/images/foam_sep.vip" ); IOLink.ImageView result = Processing.BorderKill( foam_sep, BorderKill.Neighborhood.CONNECTIVITY_26 ); Console.WriteLine( "outputObjectImage:" + result.ToString() );