This algorithm computes the local Hessian matrix
(IxxIxyIxyIyy)
by convolving the input image with the second order derivatives of a Gaussian kernel.
Each element of the Hessian matrix represents a second order partial derivative.
For instance, Ixx=∂2I∂x2, Ixy=∂2I∂x∂y.
The matrix elements are computed as explained in the GaussianDerivative2d documentation.
This filter provides a spectral image output where each channel represents a matrix element;
for instance, a second order derivative set in the following order Ixx, Ixy, Iyy.
To extract the eigenvalues or vectors of the Hessian image
the EigenDecomposition2d can be applied on this output image.
// Function prototype.publicstaticIOLink.ImageViewGaussianHessianMatrix2d(IOLink.ImageView inputImage,double[] standardDeviation =null,IOLink.ImageView outputTensorImage =null);
Class Syntax
// Command constructor.GaussianHessianMatrix2d();/// 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 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 outputTensorImage parameter./// The output image. Its spatial 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> outputTensorImage()const;/// Sets the outputTensorImage parameter./// The output image. Its spatial dimensions, calibration and interpretation are forced to the same values as the input image. Its type is forced to float.void setOutputTensorImage( std::shared_ptr< iolink::ImageView> outputTensorImage );// Method to launch the command.void execute();
# Property of the inputImage parameter.GaussianHessianMatrix2d.input_image
# Property of the standardDeviation parameter.GaussianHessianMatrix2d.standard_deviation
# Property of the outputTensorImage parameter.GaussianHessianMatrix2d.output_tensor_image
// Method to launch the command.
execute()
// Command constructor.GaussianHessianMatrix2d()// Property of the inputImage parameter.GaussianHessianMatrix2d.inputImage
// Property of the standardDeviation parameter.GaussianHessianMatrix2d.standardDeviation
// Property of the outputTensorImage parameter.GaussianHessianMatrix2d.outputTensorImage
// Method to launch the command.Execute()
Parameters
Parameter Name
Description
Type
Supported Values
Default Value
inputImage
The input image.
Image
Binary, Label or Grayscale
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}
outputTensorImage
The output image. Its spatial 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 or Grayscale
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]
output_tensor_image
The output image. Its spatial 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 or Grayscale
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}
outputTensorImage
The output image. Its spatial 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_hessian_matrix_2d( polystyrene,[1.0,1.0])print("output_tensor_image:", str( result ))
ImageView polystyrene =ViewIO.ReadImage(@"Data/images/polystyrene.tif");IOLink.ImageView result =Processing.GaussianHessianMatrix2d( polystyrene,newdouble[]{1.0,1.0});Console.WriteLine("outputTensorImage:"+ result.ToString());