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_lengthVectorFieldLengthVectorFieldLengthvector_field_length compute the length of the vectors of the vector field VectorFieldVectorFieldVectorFieldvectorFieldvector_field and returns them in LengthLengthLengthlengthlength. vector_field_lengthvector_field_lengthVectorFieldLengthVectorFieldLengthvector_field_length 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 VectorFieldVectorFieldVectorFieldvectorFieldvector_field must be in relative coordinates as returned by optical_flow_mgoptical_flow_mgOpticalFlowMgOpticalFlowMgoptical_flow_mg.

Execution Information

Parameters

VectorFieldVectorFieldVectorFieldvectorFieldvector_field (input_object)  singlechannelimage(-array) objectHImageHObjectHObjectHobject (vector_field)

Input vector field

LengthLengthLengthlengthlength (output_object)  singlechannelimage(-array) objectHImageHObjectHObjectHobject * (real)

Length of the vectors of the vector field.

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

Mode for computing the length of the vectors.

Default: '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_lengthVectorFieldLengthVectorFieldLengthvector_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>)set_system("no_object_result",<Result>). If necessary, an exception is raised.

Possible Predecessors

optical_flow_mgoptical_flow_mgOpticalFlowMgOpticalFlowMgoptical_flow_mg

Possible Successors

thresholdthresholdThresholdThresholdthreshold

Module

Foundation