ImageDev

RecursiveExponentialFilter3d

Smoothes a three-dimensional image with a recursive algorithm implementing an exponential filter.

Access to parameter description

This algorithm performs a 3D smoothing filter whose impulse response is an exponential function. The smoothing is achieved by a separable exponential decreasing filter with a variable scale factor. Where: The lower the $\alpha$ value, the smoother the result. Practically, this filter response is mostly visible in the [0.3, 5.3] range.
For convenience, the scale factor is controlled by a spread value in order to convert it between 0 et 100. A value of 0 applies a very limited smoothing, while 100 induces a strong smoothing: $$ SpreadValue=\frac{(5.3-\alpha)}{5}\times 100 $$ This filter is very close to a Gaussian filter. The main difference is the alpha coefficient, which has an inverse behavior compared to a Gaussian standard deviation.

This implementation is based on an Infinite Impulse Response (IIR) algorithm. It computes the sum of one causal and one anti-causal filter where previous results are used to compute the next result. Using this mode, the computation time is independent of the spread parameter.

See also

Function Syntax

This function returns the outputImage output parameter.
// Function prototype.
std::shared_ptr< iolink::ImageView >
recursiveExponentialFilter3d( std::shared_ptr< iolink::ImageView > inputImage,
                              int32_t spreadValue,
                              std::shared_ptr< iolink::ImageView > outputImage = NULL );
This function returns the outputImage output parameter.
// Function prototype.
recursive_exponential_filter_3d( input_image, spread_value = 60, output_image = None )
This function returns the outputImage output parameter.
// Function prototype.
public static IOLink.ImageView
RecursiveExponentialFilter3d( IOLink.ImageView inputImage,
                              Int32 spreadValue = 60,
                              IOLink.ImageView outputImage = null );

Class Syntax

Parameters

Class Name RecursiveExponentialFilter3d

Parameter Name Description Type Supported Values Default Value
input
inputImage
The input image. Image Binary, Label, Grayscale or Multispectral nullptr
input
spreadValue
The spread value between 0 and 100. The larger the value, the more intensive the smoothing. Int32 [0, 100] 60
output
outputImage
The output image. Its dimensions are forced to the same values as the input. Its data type is promoted. Image nullptr

Object Examples

auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" );

RecursiveExponentialFilter3d recursiveExponentialFilter3dAlgo;
recursiveExponentialFilter3dAlgo.setInputImage( foam );
recursiveExponentialFilter3dAlgo.setSpreadValue( 60 );
recursiveExponentialFilter3dAlgo.execute();

std::cout << "outputImage:" << recursiveExponentialFilter3dAlgo.outputImage()->toString();
foam = imagedev.read_vip_image(imagedev_data.get_image_path("foam.vip"))

recursive_exponential_filter_3d_algo = imagedev.RecursiveExponentialFilter3d()
recursive_exponential_filter_3d_algo.input_image = foam
recursive_exponential_filter_3d_algo.spread_value = 60
recursive_exponential_filter_3d_algo.execute()

print( "output_image:", str( recursive_exponential_filter_3d_algo.output_image ) );
ImageView foam = Data.ReadVipImage( @"Data/images/foam.vip" );

RecursiveExponentialFilter3d recursiveExponentialFilter3dAlgo = new RecursiveExponentialFilter3d
{
    inputImage = foam,
    spreadValue = 60
};
recursiveExponentialFilter3dAlgo.Execute();

Console.WriteLine( "outputImage:" + recursiveExponentialFilter3dAlgo.outputImage.ToString() );

Function Examples

auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" );

auto result = recursiveExponentialFilter3d( foam, 60 );

std::cout << "outputImage:" << result->toString();
foam = imagedev.read_vip_image(imagedev_data.get_image_path("foam.vip"))

result = imagedev.recursive_exponential_filter_3d( foam, 60 )

print( "output_image:", str( result ) );
ImageView foam = Data.ReadVipImage( @"Data/images/foam.vip" );

IOLink.ImageView result = Processing.RecursiveExponentialFilter3d( foam, 60 );

Console.WriteLine( "outputImage:" + result.ToString() );