The purpose of this algorithm is to fill gaps inside features appearing in a score image along their
orientations given by a vector image. The structural information contained in the feature image is
propagated through a voting field.
The voting field used assumes that the best connection between two points with one orientation
imposes a circular arc that decays with the radius according to a Gaussian function.
The voting field size (that is, the maximum length of gaps to fill) is defined by a scale parameter.
This voting field can be illustrated on the unit sphere:
Figure 1. Example of a stick voting field
Different outputs can be computed by this filter and can be enabled or not by a selection parameter.
Only the outputs necessary to the application have to be selected in order to minimize memory
and computation time usage.
This filter can provide a spectral image output where each channel represents a tensor component
set in the following order Ixx, Ixy, Iyy.
The saliency, ballness, and orientation vector images can be extracted from this tensor image.
These metrics are defined as follows:
Saliency=λ1−λ2. It can be interpreted as a measure of the orientation
certainty or of the feature anisotropy.
Ballness=λ2. It can be interpreted as a measure of the orientation uncertainty
or of the feature isotropy.
Orientation=e1. It represents the main orientation of the output tensor.
Where:
λ1 (resp. λ2) is the largest (resp. smallest) eigenvalue.
e1 is the eigenvector corresponding to the λ1 eigenvalue.
This method is referenced by Franken and van Almsick publication:
E.Franken, M.van Almsick, P.Rongen, L.Florack, B.ter Haar Romeny. "An efficient method for tensor voting
using steerable filters". Computer Vision - ECCV 2006, Springer, pp. 228-240, 2006.
// Output structure of the tensorVoting2d function.structTensorVoting2dOutput{/// The tensor output corresponding to the strengthened image.
std::shared_ptr< iolink::ImageView> outputTensorImage;/// The orientation vector output image, defining the main orientation of the output tensor.
std::shared_ptr< iolink::ImageView> outputVectorImage;/// The saliency output image representing the anisotropy of the structures.
std::shared_ptr< iolink::ImageView> outputSaliencyImage;/// The ballness output image representing the isotropy of the structures.
std::shared_ptr< iolink::ImageView> outputBallnessImage;};// Function prototype TensorVoting2dOutput
tensorVoting2d( std::shared_ptr< iolink::ImageView> inputFeatureImage,
std::shared_ptr< iolink::ImageView> inputVectorImage,double scale,int32_t outputSelection,
std::shared_ptr< iolink::ImageView> outputTensorImage = NULL,
std::shared_ptr< iolink::ImageView> outputVectorImage = NULL,
std::shared_ptr< iolink::ImageView> outputSaliencyImage = NULL,
std::shared_ptr< iolink::ImageView> outputBallnessImage = NULL );
/// Output structure of the TensorVoting2d function.publicstructTensorVoting2dOutput{/// The tensor output corresponding to the strengthened image.publicIOLink.ImageView outputTensorImage;/// /// The orientation vector output image, defining the main orientation of the output tensor./// publicIOLink.ImageView outputVectorImage;/// The saliency output image representing the anisotropy of the structures.publicIOLink.ImageView outputSaliencyImage;/// The ballness output image representing the isotropy of the structures.publicIOLink.ImageView outputBallnessImage;};// Function prototype.publicstaticTensorVoting2dOutputTensorVoting2d(IOLink.ImageView inputFeatureImage,IOLink.ImageView inputVectorImage,double scale =5,Int32 outputSelection =4,IOLink.ImageView outputTensorImage =null,IOLink.ImageView outputVectorImage =null,IOLink.ImageView outputSaliencyImage =null,IOLink.ImageView outputBallnessImage =null);
Class Syntax
// Command constructor.TensorVoting2d();/// Gets the inputFeatureImage parameter./// The feature input image. It can be produced by the EigenvaluesToStructureness2d algorithm.
std::shared_ptr< iolink::ImageView> inputFeatureImage()const;/// Sets the inputFeatureImage parameter./// The feature input image. It can be produced by the EigenvaluesToStructureness2d algorithm.void setInputFeatureImage( std::shared_ptr< iolink::ImageView> inputFeatureImage );/// Gets the inputVectorImage parameter./// The vector input image indicating the orientation of the feature to strengthen. It can be produced by the EigenDecomposition2d algorithm. When used with an edge detector such as an Hessian matrix, the second eigenvector has to be selected since the first eigenvector is orthogonal to the structures.
std::shared_ptr< iolink::ImageView> inputVectorImage()const;/// Sets the inputVectorImage parameter./// The vector input image indicating the orientation of the feature to strengthen. It can be produced by the EigenDecomposition2d algorithm. When used with an edge detector such as an Hessian matrix, the second eigenvector has to be selected since the first eigenvector is orthogonal to the structures.void setInputVectorImage( std::shared_ptr< iolink::ImageView> inputVectorImage );/// Gets the scale parameter./// The scale parameter acting on the gap length filled by the tensor voting algorithm. It is expressed in pixels.double scale()const;/// Sets the scale parameter./// The scale parameter acting on the gap length filled by the tensor voting algorithm. It is expressed in pixels.void setScale(constdouble& scale );/// Gets the outputSelection parameter./// The output images to be computed.int32_t outputSelection()const;/// Sets the outputSelection parameter./// The output images to be computed.void setOutputSelection(constint32_t& outputSelection );/// Gets the outputTensorImage parameter./// The tensor output corresponding to the strengthened image.
std::shared_ptr< iolink::ImageView> outputTensorImage()const;/// Sets the outputTensorImage parameter./// The tensor output corresponding to the strengthened image.void setOutputTensorImage( std::shared_ptr< iolink::ImageView> outputTensorImage );/// Gets the outputVectorImage parameter./// The orientation vector output image, defining the main orientation of the output tensor.
std::shared_ptr< iolink::ImageView> outputVectorImage()const;/// Sets the outputVectorImage parameter./// The orientation vector output image, defining the main orientation of the output tensor.void setOutputVectorImage( std::shared_ptr< iolink::ImageView> outputVectorImage );/// Gets the outputSaliencyImage parameter./// The saliency output image representing the anisotropy of the structures.
std::shared_ptr< iolink::ImageView> outputSaliencyImage()const;/// Sets the outputSaliencyImage parameter./// The saliency output image representing the anisotropy of the structures.void setOutputSaliencyImage( std::shared_ptr< iolink::ImageView> outputSaliencyImage );/// Gets the outputBallnessImage parameter./// The ballness output image representing the isotropy of the structures.
std::shared_ptr< iolink::ImageView> outputBallnessImage()const;/// Sets the outputBallnessImage parameter./// The ballness output image representing the isotropy of the structures.void setOutputBallnessImage( std::shared_ptr< iolink::ImageView> outputBallnessImage );// Method to launch the command.void execute();
# Property of the inputFeatureImage parameter.TensorVoting2d.input_feature_image
# Property of the inputVectorImage parameter.TensorVoting2d.input_vector_image
# Property of the scale parameter.TensorVoting2d.scale
# Property of the outputSelection parameter.TensorVoting2d.output_selection
# Property of the outputTensorImage parameter.TensorVoting2d.output_tensor_image
# Property of the outputVectorImage parameter.TensorVoting2d.output_vector_image
# Property of the outputSaliencyImage parameter.TensorVoting2d.output_saliency_image
# Property of the outputBallnessImage parameter.TensorVoting2d.output_ballness_image
// Method to launch the command.
execute()
// Command constructor.TensorVoting2d()// Property of the inputFeatureImage parameter.TensorVoting2d.inputFeatureImage
// Property of the inputVectorImage parameter.TensorVoting2d.inputVectorImage
// Property of the scale parameter.TensorVoting2d.scale
// Property of the outputSelection parameter.TensorVoting2d.outputSelection
// Property of the outputTensorImage parameter.TensorVoting2d.outputTensorImage
// Property of the outputVectorImage parameter.TensorVoting2d.outputVectorImage
// Property of the outputSaliencyImage parameter.TensorVoting2d.outputSaliencyImage
// Property of the outputBallnessImage parameter.TensorVoting2d.outputBallnessImage
// Method to launch the command.Execute()
Parameters
Parameter Name
Description
Type
Supported Values
Default Value
inputFeatureImage
The feature input image. It can be produced by the EigenvaluesToStructureness2d algorithm.
This image must have only one spectral channel.
Image
Binary, Label or Grayscale
nullptr
inputVectorImage
The vector input image indicating the orientation of the feature to strengthen. It can be produced by the EigenDecomposition2d algorithm. When used with an edge detector such as an Hessian matrix, the second eigenvector has to be selected since the first eigenvector is orthogonal to the structures.
This image must have the same size as the feature input image and 2 spectral channels. Each vector is used
to define an orientation and its norm is ignored.
Image
Binary, Label, Grayscale or Multispectral
nullptr
scale
The scale parameter acting on the gap length filled by the tensor voting algorithm. It is expressed in pixels.
Float64
>0
5
outputSelection
The output images to be computed.
TENSOR
Enable the computation of the tensor output image. Associated value = 1.
ORIENTATION_VECTOR
Enable the computation of the orientation vector output image. Associated value = 2.
SALIENCY
Enable the computation of the saliency output image. Associated value = 4.
BALLNESS
Enable the computation of the ballness output image. Associated value = 8.
MultipleChoice
SALIENCY
outputTensorImage
The tensor output corresponding to the strengthened image.
The spatial dimensions, calibration and interpretation of the output image are forced to the
same values as the feature input. Type is forced to float.
Image
nullptr
outputVectorImage
The orientation vector output image, defining the main orientation of the output tensor.
The spatial dimensions, calibration, and interpretation of the output image are forced to the
same values as the feature input. The size of the spectral serie component is forced to 2.
Each vector defines the main orientation of the output tensor and its norm is equal to the saliency.
Type is forced to float.
Image
nullptr
outputSaliencyImage
The saliency output image representing the anisotropy of the structures.
The spatial dimensions, calibration, and interpretation of the output image are forced to the same values
as the feature input. Type is forced to float.
Image
nullptr
outputBallnessImage
The ballness output image representing the isotropy of the structures.
The spatial dimensions, calibration, and interpretation of the output image are forced to the same values
as the feature input. Type is forced to float.
Image
nullptr
Parameter Name
Description
Type
Supported Values
Default Value
input_feature_image
The feature input image. It can be produced by the EigenvaluesToStructureness2d algorithm.
This image must have only one spectral channel.
image
Binary, Label or Grayscale
None
input_vector_image
The vector input image indicating the orientation of the feature to strengthen. It can be produced by the EigenDecomposition2d algorithm. When used with an edge detector such as an Hessian matrix, the second eigenvector has to be selected since the first eigenvector is orthogonal to the structures.
This image must have the same size as the feature input image and 2 spectral channels. Each vector is used
to define an orientation and its norm is ignored.
image
Binary, Label, Grayscale or Multispectral
None
scale
The scale parameter acting on the gap length filled by the tensor voting algorithm. It is expressed in pixels.
float64
>0
5
output_selection
The output images to be computed.
TENSOR
Enable the computation of the tensor output image. Associated value = 1.
ORIENTATION_VECTOR
Enable the computation of the orientation vector output image. Associated value = 2.
SALIENCY
Enable the computation of the saliency output image. Associated value = 4.
BALLNESS
Enable the computation of the ballness output image. Associated value = 8.
multiple_choice
SALIENCY
output_tensor_image
The tensor output corresponding to the strengthened image.
The spatial dimensions, calibration and interpretation of the output image are forced to the
same values as the feature input. Type is forced to float.
image
None
output_vector_image
The orientation vector output image, defining the main orientation of the output tensor.
The spatial dimensions, calibration, and interpretation of the output image are forced to the
same values as the feature input. The size of the spectral serie component is forced to 2.
Each vector defines the main orientation of the output tensor and its norm is equal to the saliency.
Type is forced to float.
image
None
output_saliency_image
The saliency output image representing the anisotropy of the structures.
The spatial dimensions, calibration, and interpretation of the output image are forced to the same values
as the feature input. Type is forced to float.
image
None
output_ballness_image
The ballness output image representing the isotropy of the structures.
The spatial dimensions, calibration, and interpretation of the output image are forced to the same values
as the feature input. Type is forced to float.
image
None
Parameter Name
Description
Type
Supported Values
Default Value
inputFeatureImage
The feature input image. It can be produced by the EigenvaluesToStructureness2d algorithm.
This image must have only one spectral channel.
Image
Binary, Label or Grayscale
null
inputVectorImage
The vector input image indicating the orientation of the feature to strengthen. It can be produced by the EigenDecomposition2d algorithm. When used with an edge detector such as an Hessian matrix, the second eigenvector has to be selected since the first eigenvector is orthogonal to the structures.
This image must have the same size as the feature input image and 2 spectral channels. Each vector is used
to define an orientation and its norm is ignored.
Image
Binary, Label, Grayscale or Multispectral
null
scale
The scale parameter acting on the gap length filled by the tensor voting algorithm. It is expressed in pixels.
Float64
>0
5
outputSelection
The output images to be computed.
TENSOR
Enable the computation of the tensor output image. Associated value = 1.
ORIENTATION_VECTOR
Enable the computation of the orientation vector output image. Associated value = 2.
SALIENCY
Enable the computation of the saliency output image. Associated value = 4.
BALLNESS
Enable the computation of the ballness output image. Associated value = 8.
MultipleChoice
SALIENCY
outputTensorImage
The tensor output corresponding to the strengthened image.
The spatial dimensions, calibration and interpretation of the output image are forced to the
same values as the feature input. Type is forced to float.
Image
null
outputVectorImage
The orientation vector output image, defining the main orientation of the output tensor.
The spatial dimensions, calibration, and interpretation of the output image are forced to the
same values as the feature input. The size of the spectral serie component is forced to 2.
Each vector defines the main orientation of the output tensor and its norm is equal to the saliency.
Type is forced to float.
Image
null
outputSaliencyImage
The saliency output image representing the anisotropy of the structures.
The spatial dimensions, calibration, and interpretation of the output image are forced to the same values
as the feature input. Type is forced to float.
Image
null
outputBallnessImage
The ballness output image representing the isotropy of the structures.
The spatial dimensions, calibration, and interpretation of the output image are forced to the same values
as the feature input. Type is forced to float.