vector_field_lengthvector_field_lengthVectorFieldLengthVectorFieldLengthvector_field_length (Operator)

Name

vector_field_lengthvector_field_lengthVectorFieldLengthVectorFieldLengthvector_field_length — 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

HImage HImage::VectorFieldLength(const wchar_t* Mode) const   (Windows only)

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

HImage HImage.VectorFieldLength(string mode)

def vector_field_length(vector_field: HObject, mode: str) -> HObject

Description

vector_field_lengthvector_field_lengthVectorFieldLengthVectorFieldLengthVectorFieldLengthvector_field_length compute the length of the vectors of the vector field VectorFieldVectorFieldVectorFieldVectorFieldvectorFieldvector_field and returns them in LengthLengthLengthLengthlengthlength. vector_field_lengthvector_field_lengthVectorFieldLengthVectorFieldLengthVectorFieldLengthvector_field_length only accepts vector fields of the semantic type vector_field_relative. The parameter ModeModeModeModemodemode can be used to specify how the lengths are computed. For ModeModeModeModemodemode = 'length'"length""length""length""length""length", the Euclidean length of the vectors is computed. For ModeModeModeModemodemode = 'squared_length'"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 VectorFieldVectorFieldVectorFieldVectorFieldvectorFieldvector_field must be in relative coordinates as returned by optical_flow_mgoptical_flow_mgOpticalFlowMgOpticalFlowMgOpticalFlowMgoptical_flow_mg.

Execution Information

Parameters

VectorFieldVectorFieldVectorFieldVectorFieldvectorFieldvector_field (input_object)  singlechannelimage(-array) objectHImageHObjectHImageHobject (vector_field)

Input vector field

LengthLengthLengthLengthlengthlength (output_object)  singlechannelimage(-array) objectHImageHObjectHImageHobject * (real)

Length of the vectors of the vector field.

ModeModeModeModemodemode (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Mode for computing the length of the vectors.

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

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

Result

If the parameter values are correct, the operator vector_field_lengthvector_field_lengthVectorFieldLengthVectorFieldLengthVectorFieldLengthvector_field_length 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>)set_system("no_object_result",<Result>). If necessary, an exception is raised.

Possible Predecessors

optical_flow_mgoptical_flow_mgOpticalFlowMgOpticalFlowMgOpticalFlowMgoptical_flow_mg

Possible Successors

thresholdthresholdThresholdThresholdThresholdthreshold

Module

Foundation