ClassesClasses | | Operators

derivate_vector_fieldderivate_vector_fieldDerivateVectorFieldDerivateVectorField (Operator)

Name

derivate_vector_fieldderivate_vector_fieldDerivateVectorFieldDerivateVectorField — Convolve a vector field with derivatives of the Gaussian.

Signature

derivate_vector_field(VectorField : Result : Sigma, Component : )

Herror derivate_vector_field(const Hobject VectorField, Hobject* Result, double Sigma, const char* Component)

Herror T_derivate_vector_field(const Hobject VectorField, Hobject* Result, const Htuple Sigma, const Htuple Component)

void DerivateVectorField(const HObject& VectorField, HObject* Result, const HTuple& Sigma, const HTuple& Component)

HImage HImage::DerivateVectorField(const HTuple& Sigma, const HString& Component) const

HImage HImage::DerivateVectorField(double Sigma, const HString& Component) const

HImage HImage::DerivateVectorField(double Sigma, const char* Component) const

static void HOperatorSet.DerivateVectorField(HObject vectorField, out HObject result, HTuple sigma, HTuple component)

HImage HImage.DerivateVectorField(HTuple sigma, string component)

HImage HImage.DerivateVectorField(double sigma, string component)

Description

derivate_vector_fieldderivate_vector_fieldDerivateVectorFieldDerivateVectorFieldDerivateVectorField convolves the components of a vector field with the derivatives of a Gaussian and calculates various features derived therefrom. derivate_vector_fieldderivate_vector_fieldDerivateVectorFieldDerivateVectorFieldDerivateVectorField only accepts vector fields of the semantic type 'vector_field_relative'. The VectorFieldVectorFieldVectorFieldVectorFieldvectorField F(r,c)=(u(r,c),v(r,c)) is defined as in optical_flow_mgoptical_flow_mgOpticalFlowMgOpticalFlowMgOpticalFlowMg. SigmaSigmaSigmaSigmasigma is the parameter of the Gaussian (i.e., the amount of smoothing). If a single value is passed in SigmaSigmaSigmaSigmasigma, the amount of smoothing in the column and row direction is identical. If two values are passed in SigmaSigmaSigmaSigmasigma, the first value specifies the amount of smoothing in the column direction, while the second value specifies the amount of smoothing in the row direction. The possible values for ComponentComponentComponentComponentcomponent are:

'curl'"curl""curl""curl""curl":

The curl of the vector field. One application of using 'curl' is to analyse optical flow fields. Metaphorically speaking, the curl is how much a small boat would rotate if the vector field was a fluid.

'divergence'"divergence""divergence""divergence""divergence":

The divergence of the vector field. One application of using 'divergence' is to analyze optical flow fields. Metaphorically speaking, the divergence is where the source and sink would be if the vector field was a fluid.

When used in context of photometric stereo, the operator derivate_vector_fieldderivate_vector_fieldDerivateVectorFieldDerivateVectorFieldDerivateVectorField offers two more parameters, which are especially designed to process the gradient field that is returned by photometric_stereophotometric_stereoPhotometricStereoPhotometricStereoPhotometricStereo. In this case, we interpret the input vector field as gradient of the underlying surface.

In the following formulas, the input vector field is therefore noted as

where the first and second component of the input is the gradient field of the surface f(r,c). In the formulas below f_rc denotes the first derivative in column direction of the first component of the gradient field.

'mean_curvature'"mean_curvature""mean_curvature""mean_curvature""mean_curvature":

Mean curvature H of the underlying surface when the input vector field VectorFieldVectorFieldVectorFieldVectorFieldvectorField is interpreted as gradient field. One application of using 'mean_curvature' is to process the vector field that is returned by photometric_stereophotometric_stereoPhotometricStereoPhotometricStereoPhotometricStereo. After filtering the vector field, even tiny scratches or bumps can be segmented.

'gauss_curvature'"gauss_curvature""gauss_curvature""gauss_curvature""gauss_curvature":

Gaussian curvature K of the underlying surface when the input vector field VectorFieldVectorFieldVectorFieldVectorFieldvectorField is interpreted as gradient field. One application of using 'gauss_curvature' is to process the vector field that is returned by photometric_stereophotometric_stereoPhotometricStereoPhotometricStereoPhotometricStereo. After filtering the vector field, even tiny scratches or bumps can be segmented. If the underlying surface of the vector field is developable, the Gaussian curvature is zero.

Execution Information

Parameters

VectorFieldVectorFieldVectorFieldVectorFieldvectorField (input_object)  singlechannelimage(-array) objectHImageHImageHobject (vector_field)

Input vector field.

ResultResultResultResultresult (output_object)  singlechannelimage(-array) objectHImageHImageHobject * (real)

Filtered result images.

SigmaSigmaSigmaSigmasigma (input_control)  real(-array) HTupleHTupleHtuple (real) (double) (double) (double)

Sigma of the Gaussian.

Default value: 1.0

Suggested values: 0.7, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0

Typical range of values: 0.2 ≤ Sigma Sigma Sigma Sigma sigma ≤ 50.0

Restriction: 0.01 <= Sigma <= 50.0

ComponentComponentComponentComponentcomponent (input_control)  string HTupleHTupleHtuple (string) (string) (HString) (char*)

Component to be calculated.

Default value: 'mean_curvature' "mean_curvature" "mean_curvature" "mean_curvature" "mean_curvature"

List of values: 'curl'"curl""curl""curl""curl", 'divergence'"divergence""divergence""divergence""divergence", 'gauss_curvature'"gauss_curvature""gauss_curvature""gauss_curvature""gauss_curvature", 'mean_curvature'"mean_curvature""mean_curvature""mean_curvature""mean_curvature"

Result

If the parameters are valid, the operator derivate_vector_fieldderivate_vector_fieldDerivateVectorFieldDerivateVectorFieldDerivateVectorField returns the value 2 (H_MSG_TRUE). The behavior in case of empty input (no input images available) is set via the operator set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>). If necessary, an exception is raised.

Possible Predecessors

optical_flow_mgoptical_flow_mgOpticalFlowMgOpticalFlowMgOpticalFlowMg, photometric_stereophotometric_stereoPhotometricStereoPhotometricStereoPhotometricStereo

Possible Successors

thresholdthresholdThresholdThresholdThreshold

Module

Foundation


ClassesClasses | | Operators