ClassesClassesClassesClasses | | | | Operators

derivate_vector_fieldderivate_vector_fieldDerivateVectorFieldderivate_vector_fieldDerivateVectorFieldDerivateVectorField (Operator)

Name

derivate_vector_fieldderivate_vector_fieldDerivateVectorFieldderivate_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)

Herror derivate_vector_field(Hobject VectorField, Hobject* Result, const HTuple& Sigma, const HTuple& Component)

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

HImageArray HImageArray::DerivateVectorField(const HTuple& Sigma, const HTuple& Component) const

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

void HOperatorSetX.DerivateVectorField(
[in] IHUntypedObjectX* VectorField, [out] IHUntypedObjectX*Result, [in] VARIANT Sigma, [in] VARIANT Component)

IHImageX* HImageX.DerivateVectorField(
[in] VARIANT Sigma, [in] BSTR Component)

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_fieldDerivateVectorFieldderivate_vector_fieldDerivateVectorFieldDerivateVectorField convolves the components of a vector field with the derivatives of a Gaussian and calculates various features derived therefrom. derivate_vector_fieldderivate_vector_fieldDerivateVectorFieldderivate_vector_fieldDerivateVectorFieldDerivateVectorField only accepts vector fields of the semantic type 'vector_field_relative'. The VectorFieldVectorFieldVectorFieldVectorFieldVectorFieldvectorField F(r,c)=(u(r,c),v(r,c)) is defined as in optical_flow_mgoptical_flow_mgOpticalFlowMgoptical_flow_mgOpticalFlowMgOpticalFlowMg. SigmaSigmaSigmaSigmaSigmasigma is the parameter of the Gaussian (i.e., the amount of smoothing). If a single value is passed in SigmaSigmaSigmaSigmaSigmasigma, the amount of smoothing in the column and row direction is identical. If two values are passed in SigmaSigmaSigmaSigmaSigmasigma, 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 ComponentComponentComponentComponentComponentcomponent are:

'curl'"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.

curl(F) = u_c - v_r 

'divergence'"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.

div = u_r + v_c

When used in context of photometric stereo, the operator derivate_vector_fieldderivate_vector_fieldDerivateVectorFieldderivate_vector_fieldDerivateVectorFieldDerivateVectorField offers two more parameters, which are especially designed to process the gradient field that is returned by photometric_stereophotometric_stereoPhotometricStereophotometric_stereoPhotometricStereoPhotometricStereo. 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 G(r,c) = grad(f) = (f_r, f_c) 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":

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

A = (1 + f_r * f_r) * f_cc
B = f_r * f_c * ( f_rc + f_cr )
C = (1 + f_c * f_c) * f_rr
D = (1 + f_r * f_r + f_c * f_c) ** (3/2)
H = (A - B + C) / D

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

Gaussian curvature K of the underlying surface when the input vector field VectorFieldVectorFieldVectorFieldVectorFieldVectorFieldvectorField is interpreted as gradient field. One application of using 'gauss_curvature' is to process the vector field that is returned by photometric_stereophotometric_stereoPhotometricStereophotometric_stereoPhotometricStereoPhotometricStereo. 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.

K = (f_rr * f_cc - f_rc * f_cr) / (1 + f_r * f_r + f_c * f_c) ** 2

Parallelization

Parameters

VectorFieldVectorFieldVectorFieldVectorFieldVectorFieldvectorField (input_object)  singlechannelimage(-array) objectHImageHImageHImageHImageXHobject (vector_field)

Input vector field.

ResultResultResultResultResultresult (output_object)  singlechannelimage(-array) objectHImageHImageHImageHImageXHobject * (real)

Filtered result images.

SigmaSigmaSigmaSigmaSigmasigma (input_control)  real(-array) HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (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 sigma ≤ 50.0

Minimum increment: 0.01

Recommended increment: 0.1

Restriction: Sigma > 0.0

ComponentComponentComponentComponentComponentcomponent (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Component to be calculated.

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

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

Result

If the parameters are valid, the operator derivate_vector_fieldderivate_vector_fieldDerivateVectorFieldderivate_vector_fieldDerivateVectorFieldDerivateVectorField 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>)set_system("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_mgOpticalFlowMgoptical_flow_mgOpticalFlowMgOpticalFlowMg, photometric_stereophotometric_stereoPhotometricStereophotometric_stereoPhotometricStereoPhotometricStereo

Possible Successors

thresholdthresholdThresholdthresholdThresholdThreshold

Module

Foundation


ClassesClassesClassesClasses | | | | Operators