set_fuzzy_measure_norm_pairT_set_fuzzy_measure_norm_pairSetFuzzyMeasureNormPairSetFuzzyMeasureNormPairset_fuzzy_measure_norm_pair (Operator)

Name

set_fuzzy_measure_norm_pairT_set_fuzzy_measure_norm_pairSetFuzzyMeasureNormPairSetFuzzyMeasureNormPairset_fuzzy_measure_norm_pair — Specify a normalized fuzzy function for edge pairs.

Signature

set_fuzzy_measure_norm_pair( : : MeasureHandle, PairSize, SetType, Function : )

Herror T_set_fuzzy_measure_norm_pair(const Htuple MeasureHandle, const Htuple PairSize, const Htuple SetType, const Htuple Function)

void SetFuzzyMeasureNormPair(const HTuple& MeasureHandle, const HTuple& PairSize, const HTuple& SetType, const HTuple& Function)

void HMeasure::SetFuzzyMeasureNormPair(const HTuple& PairSize, const HString& SetType, const HFunction1D& Function) const

void HMeasure::SetFuzzyMeasureNormPair(double PairSize, const HString& SetType, const HFunction1D& Function) const

void HMeasure::SetFuzzyMeasureNormPair(double PairSize, const char* SetType, const HFunction1D& Function) const

void HMeasure::SetFuzzyMeasureNormPair(double PairSize, const wchar_t* SetType, const HFunction1D& Function) const   (Windows only)

static void HOperatorSet.SetFuzzyMeasureNormPair(HTuple measureHandle, HTuple pairSize, HTuple setType, HTuple function)

void HMeasure.SetFuzzyMeasureNormPair(HTuple pairSize, string setType, HFunction1D function)

void HMeasure.SetFuzzyMeasureNormPair(double pairSize, string setType, HFunction1D function)

def set_fuzzy_measure_norm_pair(measure_handle: HHandle, pair_size: Union[float, int], set_type: str, function: Sequence[Union[float, int]]) -> None

Description

set_fuzzy_measure_norm_pairset_fuzzy_measure_norm_pairSetFuzzyMeasureNormPairSetFuzzyMeasureNormPairSetFuzzyMeasureNormPairset_fuzzy_measure_norm_pair specifies a normalized fuzzy function passed in FunctionFunctionFunctionFunctionfunctionfunction. The specified fuzzy functions enables fuzzy_measure_posfuzzy_measure_posFuzzyMeasurePosFuzzyMeasurePosFuzzyMeasurePosfuzzy_measure_pos, fuzzy_measure_pairsfuzzy_measure_pairsFuzzyMeasurePairsFuzzyMeasurePairsFuzzyMeasurePairsfuzzy_measure_pairs and fuzzy_measure_pairingfuzzy_measure_pairingFuzzyMeasurePairingFuzzyMeasurePairingFuzzyMeasurePairingfuzzy_measure_pairing to evaluate and select the detected candidates of edges and edge pairs. For this purpose, weighting characteristics for different edge features can be defined by one function each. Such a specified feature is called fuzzy set. Specifying no function for a fuzzy set means not to use this feature for the final edge evaluation. Setting a second fuzzy function to a fuzzy set means to discard the first defined function and replace it by the second one. In difference to set_fuzzy_measureset_fuzzy_measureSetFuzzyMeasureSetFuzzyMeasureSetFuzzyMeasureset_fuzzy_measure, the abscissa x of these functions must be defined relative to the desired size s of the edge pairs (passed in PairSizePairSizePairSizePairSizepairSizepair_size). This enables a generalized usage of the defined functions. A previously defined normalized fuzzy function can be discarded completely by reset_fuzzy_measurereset_fuzzy_measureResetFuzzyMeasureResetFuzzyMeasureResetFuzzyMeasurereset_fuzzy_measure.

For an explanation of the concept of 1D measuring see the introduction of chapter 1D Measuring.

Functions for three different fuzzy set types selected by the SetTypeSetTypeSetTypeSetTypesetTypeset_type parameter can be defined, the sub types of a set being mutual exclusive:

A normalized fuzzy function is defined as a piecewise linear function by at least two pairs of values, sorted in an ascending order by their x value. The y values of the fuzzy function represent the weight of the corresponding feature value and must satisfy the range of 0.0 <= y <= 1.0. Outside of the function's interval, defined by the smallest and the greatest x value, the y values of the interval borders are continued constantly. Such Fuzzy functions can be generated by create_funct_1d_pairscreate_funct_1d_pairsCreateFunct1dPairsCreateFunct1dPairsCreateFunct1dPairscreate_funct_1d_pairs.

If more than one set is defined, fuzzy_measure_posfuzzy_measure_posFuzzyMeasurePosFuzzyMeasurePosFuzzyMeasurePosfuzzy_measure_pos / fuzzy_measure_pairsfuzzy_measure_pairsFuzzyMeasurePairsFuzzyMeasurePairsFuzzyMeasurePairsfuzzy_measure_pairs / fuzzy_measure_pairingfuzzy_measure_pairingFuzzyMeasurePairingFuzzyMeasurePairingFuzzyMeasurePairingfuzzy_measure_pairing yield the overall fuzzy weighting by the geometric mean of the weights of each set.

Execution Information

This operator modifies the state of the following input parameter:

During execution of this operator, access to the value of this parameter must be synchronized if it is used across multiple threads.

Parameters

MeasureHandleMeasureHandleMeasureHandleMeasureHandlemeasureHandlemeasure_handle (input_control, state is modified)  measure HMeasure, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Measure object handle.

PairSizePairSizePairSizePairSizepairSizepair_size (input_control)  number HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Favored width of edge pairs.

Default value: 10.0

Suggested values: 4.0, 6.0, 8.0, 10.0, 15.0, 20.0, 30.0

Typical range of values: 0.0 ≤ PairSize PairSize PairSize PairSize pairSize pair_size

Minimum increment: 0.1

Recommended increment: 1.0

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

Selection of the fuzzy set.

Default value: 'size_abs_diff' "size_abs_diff" "size_abs_diff" "size_abs_diff" "size_abs_diff" "size_abs_diff"

List of values: 'position'"position""position""position""position""position", 'position_center'"position_center""position_center""position_center""position_center""position_center", 'position_end'"position_end""position_end""position_end""position_end""position_end", 'position_first_edge'"position_first_edge""position_first_edge""position_first_edge""position_first_edge""position_first_edge", 'position_first_pair'"position_first_pair""position_first_pair""position_first_pair""position_first_pair""position_first_pair", 'position_last_edge'"position_last_edge""position_last_edge""position_last_edge""position_last_edge""position_last_edge", 'position_last_pair'"position_last_pair""position_last_pair""position_last_pair""position_last_pair""position_last_pair", 'position_pair_center'"position_pair_center""position_pair_center""position_pair_center""position_pair_center""position_pair_center", 'position_pair_end'"position_pair_end""position_pair_end""position_pair_end""position_pair_end""position_pair_end", 'size'"size""size""size""size""size", 'size_abs_diff'"size_abs_diff""size_abs_diff""size_abs_diff""size_abs_diff""size_abs_diff", 'size_diff'"size_diff""size_diff""size_diff""size_diff""size_diff"

FunctionFunctionFunctionFunctionfunctionfunction (input_control)  function_1d HFunction1D, HTupleSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Fuzzy function.

Example (HDevelop)

* how to use a fuzzy function
* ...
gen_measure_rectangle2 (50, 100, 0, 200, 100, 512, 512, 'nearest_neighbor', \
                        MeasureHandle)
* create a generalized fuzzy function to evaluate edge pairs
* * (30% uncertainty).
create_funct_1d_pairs ([0.7,1.0,1.3], [0.0,1.0,0.0], SizeFunction)
* and set it for an expected pair size of 13.45 pixels
set_fuzzy_measure_norm_pair (MeasureHandle, 13.45, 'size', SizeFunction)

fuzzy_measure_pairs (Image, MeasureHandle, 1, 30, 0.5, 'all', RowEdgeFirst, \
                     ColumnEdgeFirst, AmplitudeFirst, RowEdgeSecond, \
                     ColumnEdgeSecond, AmplitudeSecond, RowEdgeCenter, \
                     ColumnEdgeCenter, FuzzyScore, IntraDistance, \
                     InterDistance)

Possible Predecessors

gen_measure_arcgen_measure_arcGenMeasureArcGenMeasureArcGenMeasureArcgen_measure_arc, gen_measure_rectangle2gen_measure_rectangle2GenMeasureRectangle2GenMeasureRectangle2GenMeasureRectangle2gen_measure_rectangle2, create_funct_1d_pairscreate_funct_1d_pairsCreateFunct1dPairsCreateFunct1dPairsCreateFunct1dPairscreate_funct_1d_pairs

Possible Successors

fuzzy_measure_pairsfuzzy_measure_pairsFuzzyMeasurePairsFuzzyMeasurePairsFuzzyMeasurePairsfuzzy_measure_pairs, fuzzy_measure_pairingfuzzy_measure_pairingFuzzyMeasurePairingFuzzyMeasurePairingFuzzyMeasurePairingfuzzy_measure_pairing

Alternatives

transform_funct_1dtransform_funct_1dTransformFunct1dTransformFunct1dTransformFunct1dtransform_funct_1d, set_fuzzy_measureset_fuzzy_measureSetFuzzyMeasureSetFuzzyMeasureSetFuzzyMeasureset_fuzzy_measure

See also

reset_fuzzy_measurereset_fuzzy_measureResetFuzzyMeasureResetFuzzyMeasureResetFuzzyMeasurereset_fuzzy_measure

Module

1D Metrology