This algorithm independently applies, on each axis, an approximation of:
a Gaussian filter
the derivative of a Gaussian filter
the second derivative of a Gaussian filter
The Gaussian filter is based on the recursive filtering method proposed by R.Deriche which is
defined for one dimension by:
f(x)=b(α|x|+1)e−α|x|whereb=α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.
// Function prototype.publicstaticIOLink.ImageViewGaussianDerivative2d(IOLink.ImageView inputImage,int[] orderDerivative =null,double[] standardDeviation =null,IOLink.ImageView outputImage =null);
Class Syntax
// Command constructor.GaussianDerivative2d();/// Gets the inputImage parameter./// The input image.
std::shared_ptr< iolink::ImageView> inputImage()const;/// Sets the inputImage parameter./// The input image.void setInputImage( std::shared_ptr< iolink::ImageView> inputImage );/// Gets the orderDerivative parameter./// The derivation order for each direction X and Y. Each value must be 0, 1 or 2.
iolink::Vector2i32 orderDerivative()const;/// Sets the orderDerivative parameter./// The derivation order for each direction X and Y. Each value must be 0, 1 or 2.void setOrderDerivative(const iolink::Vector2i32& orderDerivative );/// Gets the standardDeviation parameter./// The sigma value of the Gaussian filter for each direction X and Y. Each value must be greater than or equal to 0.1.
iolink::Vector2d standardDeviation()const;/// Sets the standardDeviation parameter./// The sigma value of the Gaussian filter for each direction X and Y. Each value must be greater than or equal to 0.1.void setStandardDeviation(const iolink::Vector2d& standardDeviation );/// Gets the outputImage parameter./// The output image. Its dimensions, calibration and interpretation are forced to the same values as the input image. Its type is forced to float.
std::shared_ptr< iolink::ImageView> outputImage()const;/// Sets the outputImage parameter./// The output image. Its dimensions, calibration and interpretation are forced to the same values as the input image. Its type is forced to float.void setOutputImage( std::shared_ptr< iolink::ImageView> outputImage );// Method to launch the command.void execute();
# Property of the inputImage parameter.GaussianDerivative2d.input_image
# Property of the orderDerivative parameter.GaussianDerivative2d.order_derivative
# Property of the standardDeviation parameter.GaussianDerivative2d.standard_deviation
# Property of the outputImage parameter.GaussianDerivative2d.output_image
// Method to launch the command.
execute()
// Command constructor.GaussianDerivative2d()// Property of the inputImage parameter.GaussianDerivative2d.inputImage
// Property of the orderDerivative parameter.GaussianDerivative2d.orderDerivative
// Property of the standardDeviation parameter.GaussianDerivative2d.standardDeviation
// Property of the outputImage parameter.GaussianDerivative2d.outputImage
// Method to launch the command.Execute()
Parameters
Parameter Name
Description
Type
Supported Values
Default Value
inputImage
The input image.
Image
Binary, Label, Grayscale or Multispectral
nullptr
standardDeviation
The sigma value of the Gaussian filter for each direction X and Y. Each value must be greater than or equal to 0.1.
Vector2d
>=0.1
{1.f, 1.f}
orderDerivative
The derivation order for each direction X and Y. Each value must be 0, 1 or 2.
Vector2i32
[0, 2]
{0, 0}
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
Parameter Name
Description
Type
Supported Values
Default Value
input_image
The input image.
image
Binary, Label, Grayscale or Multispectral
None
standard_deviation
The sigma value of the Gaussian filter for each direction X and Y. Each value must be greater than or equal to 0.1.
vector2d
>=0.1
[1, 1]
order_derivative
The derivation order for each direction X and Y. Each value must be 0, 1 or 2.
vector2i32
[0, 2]
[0, 0]
output_image
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
None
Parameter Name
Description
Type
Supported Values
Default Value
inputImage
The input image.
Image
Binary, Label, Grayscale or Multispectral
null
standardDeviation
The sigma value of the Gaussian filter for each direction X and Y. Each value must be greater than or equal to 0.1.
Vector2d
>=0.1
{1f, 1f}
orderDerivative
The derivation order for each direction X and Y. Each value must be 0, 1 or 2.
Vector2i32
[0, 2]
{0, 0}
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.
polystyrene = ioformat.read_image(imagedev_data.get_image_path("polystyrene.tif"))
result = imagedev.gaussian_derivative_2d( polystyrene,[0,0],[1.0,1.0])print("output_image:", str( result ))
ImageView polystyrene =ViewIO.ReadImage(@"Data/images/polystyrene.tif");IOLink.ImageView result =Processing.GaussianDerivative2d( polystyrene,newint[]{0,0},newdouble[]{1.0,1.0});Console.WriteLine("outputImage:"+ result.ToString());