RadialBackgroundImage2d
Computes a radial background image from a grayscale image.
Access to parameter description
This algorithm:
If the a binary mask is set, the radial profile will be computed only with masked pixels.
To create the output image, the algorithm uses either an average radial profile or a polynomial estimation of the average radial profile.
Thus, all pixels of the output image located at a same distance from the defined center have the same intensity.
See also
Access to parameter description
This algorithm:
- Computes the average radial profile: profile of intensities around concentric circles as a function of distance from a point in the image.
- Creates an image from the average radial profile.
If the a binary mask is set, the radial profile will be computed only with masked pixels.
To create the output image, the algorithm uses either an average radial profile or a polynomial estimation of the average radial profile.
Thus, all pixels of the output image located at a same distance from the defined center have the same intensity.
See also
Function Syntax
This function returns outputImage.
// Function prototype
std::shared_ptr< iolink::ImageView > radialBackgroundImage2d( std::shared_ptr< iolink::ImageView > inputImage, std::shared_ptr< iolink::ImageView > inputMaskImage, RadialBackgroundImage2d::BackgroundModel backgroundModel, RadialBackgroundImage2d::CenterMode centerMode, iolink::Vector2i32 centerPoint, std::shared_ptr< iolink::ImageView > outputImage = NULL );
This function returns outputImage.
// Function prototype. radial_background_image_2d( input_image, input_mask_image, background_model = RadialBackgroundImage2d.BackgroundModel.AVERAGE, center_mode = RadialBackgroundImage2d.CenterMode.IMAGE_CENTER, center_point = [1, 1], output_image = None )
This function returns outputImage.
// Function prototype. public static IOLink.ImageView RadialBackgroundImage2d( IOLink.ImageView inputImage, IOLink.ImageView inputMaskImage, RadialBackgroundImage2d.BackgroundModel backgroundModel = ImageDev.RadialBackgroundImage2d.BackgroundModel.AVERAGE, RadialBackgroundImage2d.CenterMode centerMode = ImageDev.RadialBackgroundImage2d.CenterMode.IMAGE_CENTER, int[] centerPoint = null, IOLink.ImageView outputImage = null );
Class Syntax
Parameters
Parameter Name | Description | Type | Supported Values | Default Value | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
inputImage |
The input image. | Image | Grayscale or Multispectral | nullptr | ||||||||||||||
![]() |
inputMaskImage |
The binary mask image for the polynomial interpolation. If it equals null, the background is computed from all pixels of the input image. This image must have same dimensions as the input image. | Image | Binary | nullptr | ||||||||||||||
![]() |
backgroundModel |
The way to estimate the background model of the Fourier transform module.
|
Enumeration | AVERAGE | |||||||||||||||
![]() |
centerMode |
The way to define the center of the radial profiles.
|
Enumeration | IMAGE_CENTER | |||||||||||||||
![]() |
centerPoint |
The X and Y coordinates used as center if the center mode parameter is set to OTHER. This parameter is ignored in IMAGE_CENTER mode. | Vector2i32 | Any value | {1, 1} | ||||||||||||||
![]() |
outputImage |
The output 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_image |
The input image. | image | Grayscale or Multispectral | None | ||||||||||||||
![]() |
input_mask_image |
The binary mask image for the polynomial interpolation. If it equals null, the background is computed from all pixels of the input image. This image must have same dimensions as the input image. | image | Binary | None | ||||||||||||||
![]() |
background_model |
The way to estimate the background model of the Fourier transform module.
|
enumeration | AVERAGE | |||||||||||||||
![]() |
center_mode |
The way to define the center of the radial profiles.
|
enumeration | IMAGE_CENTER | |||||||||||||||
![]() |
center_point |
The X and Y coordinates used as center if the center mode parameter is set to OTHER. This parameter is ignored in IMAGE_CENTER mode. | vector2i32 | Any value | [1, 1] | ||||||||||||||
![]() |
output_image |
The output image. Its dimensions and type are forced to the same values as the input. | image | None |
Parameter Name | Description | Type | Supported Values | Default Value | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
inputImage |
The input image. | Image | Grayscale or Multispectral | null | ||||||||||||||
![]() |
inputMaskImage |
The binary mask image for the polynomial interpolation. If it equals null, the background is computed from all pixels of the input image. This image must have same dimensions as the input image. | Image | Binary | null | ||||||||||||||
![]() |
backgroundModel |
The way to estimate the background model of the Fourier transform module.
|
Enumeration | AVERAGE | |||||||||||||||
![]() |
centerMode |
The way to define the center of the radial profiles.
|
Enumeration | IMAGE_CENTER | |||||||||||||||
![]() |
centerPoint |
The X and Y coordinates used as center if the center mode parameter is set to OTHER. This parameter is ignored in IMAGE_CENTER mode. | Vector2i32 | Any value | {1, 1} | ||||||||||||||
![]() |
outputImage |
The output image. Its dimensions and type are forced to the same values as the input. | Image | null |
Object Examples
std::shared_ptr< iolink::ImageView > polystyrene = ioformat::readImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene.tif" ); auto polystyrene_sep = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene_sep.vip" ); RadialBackgroundImage2d radialBackgroundImage2dAlgo; radialBackgroundImage2dAlgo.setInputImage( polystyrene ); radialBackgroundImage2dAlgo.setInputMaskImage( polystyrene_sep ); radialBackgroundImage2dAlgo.setBackgroundModel( RadialBackgroundImage2d::BackgroundModel::AVERAGE ); radialBackgroundImage2dAlgo.setCenterMode( RadialBackgroundImage2d::CenterMode::IMAGE_CENTER ); radialBackgroundImage2dAlgo.setCenterPoint( {1, 1} ); radialBackgroundImage2dAlgo.execute(); std::cout << "outputImage:" << radialBackgroundImage2dAlgo.outputImage()->toString();
polystyrene = ioformat.read_image(imagedev_data.get_image_path("polystyrene.tif")) polystyrene_sep = imagedev.read_vip_image(imagedev_data.get_image_path("polystyrene_sep.vip")) radial_background_image_2d_algo = imagedev.RadialBackgroundImage2d() radial_background_image_2d_algo.input_image = polystyrene radial_background_image_2d_algo.input_mask_image = polystyrene_sep radial_background_image_2d_algo.background_model = imagedev.RadialBackgroundImage2d.AVERAGE radial_background_image_2d_algo.center_mode = imagedev.RadialBackgroundImage2d.IMAGE_CENTER radial_background_image_2d_algo.center_point = [1, 1] radial_background_image_2d_algo.execute() print( "output_image:", str( radial_background_image_2d_algo.output_image ) )
ImageView polystyrene = ViewIO.ReadImage( @"Data/images/polystyrene.tif" ); ImageView polystyrene_sep = Data.ReadVipImage( @"Data/images/polystyrene_sep.vip" ); RadialBackgroundImage2d radialBackgroundImage2dAlgo = new RadialBackgroundImage2d { inputImage = polystyrene, inputMaskImage = polystyrene_sep, backgroundModel = RadialBackgroundImage2d.BackgroundModel.AVERAGE, centerMode = RadialBackgroundImage2d.CenterMode.IMAGE_CENTER, centerPoint = new int[]{1, 1} }; radialBackgroundImage2dAlgo.Execute(); Console.WriteLine( "outputImage:" + radialBackgroundImage2dAlgo.outputImage.ToString() );
Function Examples
std::shared_ptr< iolink::ImageView > polystyrene = ioformat::readImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene.tif" ); auto polystyrene_sep = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene_sep.vip" ); auto result = radialBackgroundImage2d( polystyrene, polystyrene_sep, RadialBackgroundImage2d::BackgroundModel::AVERAGE, RadialBackgroundImage2d::CenterMode::IMAGE_CENTER, {1, 1} ); std::cout << "outputImage:" << result->toString();
polystyrene = ioformat.read_image(imagedev_data.get_image_path("polystyrene.tif")) polystyrene_sep = imagedev.read_vip_image(imagedev_data.get_image_path("polystyrene_sep.vip")) result = imagedev.radial_background_image_2d( polystyrene, polystyrene_sep, imagedev.RadialBackgroundImage2d.AVERAGE, imagedev.RadialBackgroundImage2d.IMAGE_CENTER, [1, 1] ) print( "output_image:", str( result ) )
ImageView polystyrene = ViewIO.ReadImage( @"Data/images/polystyrene.tif" ); ImageView polystyrene_sep = Data.ReadVipImage( @"Data/images/polystyrene_sep.vip" ); IOLink.ImageView result = Processing.RadialBackgroundImage2d( polystyrene, polystyrene_sep, RadialBackgroundImage2d.BackgroundModel.AVERAGE, RadialBackgroundImage2d.CenterMode.IMAGE_CENTER, new int[]{1, 1} ); Console.WriteLine( "outputImage:" + result.ToString() );