ImageDev

GaussianDerivative3d

Approximates the convolution of a three-dimensional image with a Gaussian kernel or its derivative.

Access to parameter description

This algorithm independently applies, on each axis, an approximation of: The Gaussian filter is based on the recursive filtering method proposed by R.Deriche which is defined for one dimension by: $$ f(x)=b(\alpha|x|+1)e^{-\alpha|x|}~~where~~b=\frac{\alpha}{4} $$ Note that this filter has an infinite impulse response and takes advantage of the separability of the Gaussian kernel.
Using this mode, the computation time is independent of the standard deviation.

Reference
R.Deriche. "Fast algorithms for low-level vision". IEEE Transactions on Pattern Analysis and Machine Intelligence, vol.12, no 1, pp. 78-87, Jan. 1990.

See also

Function Syntax

This function returns the outputImage output parameter.
// Function prototype.
std::shared_ptr< iolink::ImageView >
gaussianDerivative3d( std::shared_ptr< iolink::ImageView > inputImage,
                      iolink::Vector3i32 orderDerivative,
                      iolink::Vector3d standardDeviation,
                      std::shared_ptr< iolink::ImageView > outputImage = NULL );
This function returns the outputImage output parameter.
// Function prototype.
gaussian_derivative_3d( input_image,
                        order_derivative = [0, 0, 0],
                        standard_deviation = [1, 1, 1],
                        output_image = None )
This function returns the outputImage output parameter.
// Function prototype.
public static IOLink.ImageView
GaussianDerivative3d( IOLink.ImageView inputImage,
                      int[] orderDerivative = null,
                      double[] standardDeviation = null,
                      IOLink.ImageView outputImage = null );

Class Syntax

Parameters

Class Name GaussianDerivative3d

Parameter Name Description Type Supported Values Default Value
input
inputImage
The input image. Image Binary, Label, Grayscale or Multispectral nullptr
input
standardDeviation
The sigma value of the Gaussian filter for each direction X, Y, and Z. Each value must be greater than or equal to 0.1. Vector3d >=0.1 {1.f, 1.f, 1.f}
input
orderDerivative
The derivation order for each direction X, Y, and Z. Each value must be 0, 1 or 2. Vector3i32 [0, 2] {0, 0, 0}
output
outputImage
The output image. Its dimensions, calibration and interpretation are forced to the same values as the input image. Its type is forced to float. Image nullptr

Object Examples

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

GaussianDerivative3d gaussianDerivative3dAlgo;
gaussianDerivative3dAlgo.setInputImage( foam );
gaussianDerivative3dAlgo.setOrderDerivative( {0, 0, 0} );
gaussianDerivative3dAlgo.setStandardDeviation( {1.0, 1.0, 1.0} );
gaussianDerivative3dAlgo.execute();

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

gaussian_derivative_3d_algo = imagedev.GaussianDerivative3d()
gaussian_derivative_3d_algo.input_image = foam
gaussian_derivative_3d_algo.order_derivative = [0, 0, 0]
gaussian_derivative_3d_algo.standard_deviation = [1.0, 1.0, 1.0]
gaussian_derivative_3d_algo.execute()

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

GaussianDerivative3d gaussianDerivative3dAlgo = new GaussianDerivative3d
{
    inputImage = foam,
    orderDerivative = new int[]{0, 0, 0},
    standardDeviation = new double[]{1.0, 1.0, 1.0}
};
gaussianDerivative3dAlgo.Execute();

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

Function Examples

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

auto result = gaussianDerivative3d( foam, {0, 0, 0}, {1.0, 1.0, 1.0} );

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

result = imagedev.gaussian_derivative_3d( foam, [0, 0, 0], [1.0, 1.0, 1.0] )

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

IOLink.ImageView result = Processing.GaussianDerivative3d( foam, new int[]{0, 0, 0}, new double[]{1.0, 1.0, 1.0} );

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