ClassesClasses | | Operators

vector_field_lengthvector_field_lengthVectorFieldLengthVectorFieldLength (Operator)

Name

vector_field_lengthvector_field_lengthVectorFieldLengthVectorFieldLength — Compute the length of the vectors of a vector field.

Signature

vector_field_length(VectorField : Length : Mode : )

Herror vector_field_length(const Hobject VectorField, Hobject* Length, const char* Mode)

Herror T_vector_field_length(const Hobject VectorField, Hobject* Length, const Htuple Mode)

void VectorFieldLength(const HObject& VectorField, HObject* Length, const HTuple& Mode)

HImage HImage::VectorFieldLength(const HString& Mode) const

HImage HImage::VectorFieldLength(const char* Mode) const

static void HOperatorSet.VectorFieldLength(HObject vectorField, out HObject length, HTuple mode)

HImage HImage.VectorFieldLength(string mode)

Description

vector_field_lengthvector_field_lengthVectorFieldLengthVectorFieldLengthVectorFieldLength compute the length of the vectors of the vector field VectorFieldVectorFieldVectorFieldVectorFieldvectorField and returns them in LengthLengthLengthLengthlength. vector_field_lengthvector_field_lengthVectorFieldLengthVectorFieldLengthVectorFieldLength only accepts vector fields of the semantic type 'vector_field_relative'. The parameter ModeModeModeModemode can be used to specify how the lengths are computed. For ModeModeModeModemode = 'length'"length""length""length""length", the Euclidean length of the vectors is computed. For ModeModeModeModemode = 'squared_length'"squared_length""squared_length""squared_length""squared_length", the square of the length of the vectors is computed. This avoids having to compute a square root internally, which is a costly operation on many processors, and hence saves runtime on these processors. Note that the VectorFieldVectorFieldVectorFieldVectorFieldvectorField must be in relative coordinates as returned by optical_flow_mgoptical_flow_mgOpticalFlowMgOpticalFlowMgOpticalFlowMg.

Execution Information

Parameters

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

Input vector field

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

Length of the vectors of the vector field.

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

Mode for computing the length of the vectors.

Default value: 'length' "length" "length" "length" "length"

List of values: 'length'"length""length""length""length", 'squared_length'"squared_length""squared_length""squared_length""squared_length"

Result

If the parameter values are correct, the operator vector_field_lengthvector_field_lengthVectorFieldLengthVectorFieldLengthVectorFieldLength returns the value 2 (H_MSG_TRUE). If the input is empty (no input images are available) the behavior can be set via 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

Possible Successors

thresholdthresholdThresholdThresholdThreshold

Module

Foundation


ClassesClasses | | Operators