halcon 1维测量

1维测量主要是测量沿着直线和圆弧的距离和角度。

2维测量主要是测量物体的大小和方向。

3维测量主要是测量物体在3维世界里的世界坐标。

Chapter 1

开关销的测量,因为它可以用一条直线测量,因此采用一维测量。

gen_measure_rectangle2 (Row, Column, Phi, Length1, Length2, Width, Height, Interpolation, MeasureHandle)创建一个垂直于边缘的矩形

@Row, Column, Phi, Length1, Length2:生成的测量矩阵的中心点坐标,偏转角度,以及矩阵的长宽。

@Width, Height待测量图像的宽高,主要是为了防止越界。 

@Interpolation插值方式,测量中的灰度值由什么方式得到

@MeasureHandle测量句柄,是一种数据结构。

measure_pairs (Image, MeasureHandle, Sigma, Threshold, Transition, Select, RowEdgeFirst, ColumnEdgeFirst, AmplitudeFirst,RowEdgeSecond, ColumnEdgeSecond,AmplitudeSecond, IntraDistance, InterDistance)真正的测量操作,提取垂直于矩形或环形弧的直边对

@Image测量的图像。

@MeasureHandle上面准备好的测量句柄

@Sigma高斯平滑的系数,目的是为了去除噪声的干扰。

@Threshold边缘的变化的最低阈值,选取的时候不能太高,还要考虑边缘应该是连续的。

@Transition矩形主轴上灰度值变化顺序,亮到暗还是。。。

@Select选择返回的是所有测量出来的坐标还是第一个还是最后一个。

@RowEdgeFirst, ColumnEdgeFirst,AmplitudeFirst:即当Transition = 'positive'时选择在矩形主轴方向上具有从暗到光转换的边缘点。如果Transition = 'all',则第一个检测到的边缘也放在里面。还有一个是灰度值。

@RowEdgeSecond, ColumnEdgeSecond:即当Transition = 'negative'时选择在矩形主轴方向上具有从亮到暗转换的边缘点,最后一个是灰度值。

@IntraDistance返回每个边缘对之间的距离

@InterDistance返回连续边缘队之间的距离。

Chapter 2 测量对象的基础

测量对象背后的主要思想是提取与测量线或弧近似垂直的边缘。

2.1 1维边缘提取处理

1、垂直于边缘(直线或者圆弧)的等距离的投影线准备好,宽度人为设定。

2、计算每条投影线的平均灰度值。这些平均值的序列称为轮廓。如果这些灰度值不是水平或者垂直,那么必须用差值的方法。投影线的长度就是ROI的宽度。

沿着测量矩阵主轴方向投影的平均灰度值变化。出现是平均灰度值,细线是变化曲线的导数。

从c、d可以看出,ROI宽一点,则噪声影响小一点。如果测量矩阵I近似垂直于边缘,那么ROI应该尽量宽一点。如果测量矩阵不垂直于边缘,则ROI的宽度应该选的尽可能小一点。

可以从c、d的光滑程度上看出来,其实噪声影响还是蛮大的,因此使用gaussian平滑一下profile。sigma作为高斯平滑的标准差。然后计算profile的一阶导数。导数的振幅是缩放因子√2π·σ。一阶导数的所有局部极值的亚像素精确位置都是候选边缘。这些候选边由从导数各自位置(细线)指向平滑灰度值轮廓线(粗线)的向量表示。只有一阶导数的绝对值大于阈值才考虑作为边缘。

表示一阶导数的极值作为边缘点。且一阶导数的极值应当大于阈值。

返回的是垂直于刚测测量矩阵的方向(11个边缘),显示的宽度和ROI的宽度是一样的。

一维和二维寻找轮廓线的方法有很大的不同。一维边缘提取的情况下,只确定轮廓线与边缘交点的位置,而二维边缘提取将完整的边缘作为轮廓返回。

如果边缘是直的,那么返回的是与测量矩阵垂直的。那一维测量和二维测量的结果是一致的。一旦边缘不是直的,那一维测量和二维测量的差异就会很大。

测量对象的设计是为了测量与轮廓线近似垂直的直线边缘的位置。如果是凸形状的边缘,测量位置通常不会与灰度值边缘与测量矩阵的交点重合。

测量矩阵与测量对象个灰度变化的交点不一定是边缘。宽度减小,那么错误就会小一点。

2.2 创建一个测量对象

gen_measure_rectangle2 (Row, Column, Phi, Length1, Length2, Width, Height, Interpolation, MeasureHandle)
 

gen_measure_arc (CenterRow, CenterCol, Radius, AngleStart, AngleExtent,AnnulusRadius, Width, Height, Interpolation, MeasureHandle)

@CenterRow, CenterCol圆弧中心坐标

@Radius圆弧半径

@AngleStart圆弧开始的角度(弧度为单位)

@AngleExtent圆弧角度的范围(弧度为单位)

@AnnulusRadius环空半径(半宽度)。

@Width, Height待测量图像的宽高,主要是为了防止越界。 

@Interpolation插值方式,测量中的灰度值由什么方式得到

@MeasureHandle测量句柄,是一种数据结构。

 

chapter 3 使用测量对象

3.1 边的位置

measure_pos (Image, MeasureHandle, Sigma, Threshold, Transition, Select, RowEdge, ColumnEdge, Amplitude, Distance)
@Distance返回的是距离

@Sigma用于平滑投影后的轮廓线

@Threshold应用于轮廓线一阶导数的阈值。

@Transition用于选择特定方向的边缘,negative亮到暗,positive暗到亮,all只要是边缘都找出来。

@Select选择边缘点,第一个还是最后一个还是所有的。

@RowEdge, ColumnEdge, Amplitude找出来的边缘点以及振幅。

disp_line (WindowHandle, RowEdge, ColumnEdge - Length2, RowEdge, ColumnEdge + Length2)


3.2边缘对的位置

measure_pairs (Image, MeasureHandle, Sigma, Threshold, Transition, Select, RowEdgeFirst, ColumnEdgeFirst, AmplitudeFirst, RowEdgeSecond, ColumnEdgeSecond, AmplitudeSecond, IntraDistance, InterDistance)
@Transition如果是negative返回包含暗区的边缘对,如果是positive返回包含亮区的边缘对。如果是all则返回light-dark-light和dark-light-dark所有的边缘对。

如果找到多个具有相同转换的连续边,则只将第一个边用作对元素。

(a) Transition = ’negative’, (b) Transition =
’negative_strongest’.

@RowEdgeFirst, ColumnEdgeFirst,AmplitudeFirst:即当Transition = 'positive'时选择在矩形主轴方向上具有从暗到光转换的边缘点。如果Transition = 'all',则第一个检测到的边缘也放在里面。还有一个是灰度值。

@RowEdgeSecond, ColumnEdgeSecond:即当Transition = 'negative'时选择在矩形主轴方向上具有从亮到暗转换的边缘点,最后一个是灰度值。

确定检测对的中心

RowPairCenter := (RowEdgeFirst + RowEdgeSecond) / 2.0
ColumnPairCenter := (ColumnEdgeFirst + ColumnEdgeSecond) / 2.0

@IntraDistance返回每个边缘对之间的距离

@InterDistance返回连续边缘队之间的距离。

3.3具有特定灰度值点的位置。

一维测量measure_thresh

二维测量threshold_sub_pix

这些必须要求亮度恒定

3.4灰度投影

measure_projection直接获取profile轮廓曲线。GrayValues作为输出元组。

1、创建测量对象

gen_measure_rectangle2 (Row, Column, Phi, Length1, Length2, Width, Height, 'bilinear', MeasureHandle)

2、返回轮廓线profile,并存储在GrayValues中。measure_projection (Image, MeasureHandle, GrayValues)

3、降低噪声,用高斯进行平滑

Sigma := 0.3
create_funct_1d_array (GrayValues, Function)
smooth_funct_1d_gauss (Function, Sigma, SmoothedFunction)
4、求轮廓profile的一阶导数,然后计算一阶导数消失的点,即计算函数的过零点。

derivate_funct_1d (SmoothedFunction, 'first', FirstDerivative)
zero_crossings_funct_1d (FirstDerivative, ZeroCrossings)

在两个峰值之间的部分是因为噪声的影响。可以通过观察二阶导数的大小来选择想要的过零点。深色背景上的亮线二阶导数为负,而深色背景上的暗线二阶导数为正。

derivate_funct_1d中的Mode设置成'second'就是二阶导数

derivate_funct_1d (SmoothedFunction, 'second', SecondDerivative)
a是一阶导数,b是二阶导数

5、get_y_value_funct_1d返回函数在任意位置的值。

MinimumMagnitudeOfSecondDerivative := 8
PositionOfSalientLine := []
for i := 0 to |ZeroCrossings| - 1 by 1
    get_y_value_funct_1d (SecondDerivative, ZeroCrossings[i], 'constant', Y)
    if (Y > MinimumMagnitudeOfSecondDerivative)
        PositionOfSalientLine := [PositionOfSalientLine,ZeroCrossings[i]]
    endif
endfor

6、轮廓线的位置必须转换为像素坐标,因为measure_projection只返回沿轮廓线的灰度值轮廓线。

RowStart =[Row + 0.5] + [Length1] · sin(Phi)
ColStart = [Column + 0.5] - [Length] · cos(Phi)
RowStart := floor(Row + 0.5) + floor(Length1) * sin(Phi)
ColStart := floor(Column + 0.5) - floor(Length1) * cos(Phi)

轮廓上突出线位置的像素坐标可以确定为:

RowLine = RowStart - PositionOfSalientLine · sin(Phi)
ColLine = ColStart + PositionOfSalientLine · cos(Phi)
RowLine := RowStart - PositionOfSalientLine * sin(Phi)
ColLine := ColStart + PositionOfSalientLine * cos(Phi)
7、转换成世界坐标

如果是圆测量对象的话,使用gen_measure_arc。

RowPoint = [CenterRow + 0.5] - Radius · sin(AngleStart + Position)
ColPoint = [CenterColumn + 0.5] + Radius · cos(AngleStart + Position)


3.5 世界坐标的测量

首先对图像进行校正,并将测量结果应用到变换后的图像中,作为先决条件,相机必须进行校准。

image_points_to_world_plane (CamParam, WorldPose, RowLine, ColLine, 'mm', X, Y)
@CamParam相机参数

@WorldPose进行测量的世界平面的位置和方向

都可以通过相机矫正得到

Num := |X|
distance_pp (X[0:Num - 2], Y[0:Num - 2], X[1:Num - 1], Y[1:Num - 1], Distance)

3.6 补偿径向畸变

3.7 改变测量对象的 位置和方向

主要是图像对齐。translate_measure用于测量ROI的变化。

3.8提示和技巧

3.8.1圆形ROI的距离

弧长、线条距离、角度距离

solution_guide\1d_measuring\measure_ring.hdev

1、创建测量对象

gen_measure_arc (CenterRow, CenterCol, Radius, AngleStart, AngleExtent, AnnulusRadius, Width, Height, Interpolation, MeasureHandle)

2、开始测量

measure_pairs (Image, MeasureHandle, Sigma, Threshold, Transition, Select, RowEdgeFirst, ColumnEdgeFirst, AmplitudeFirst, RowEdgeSecond, ColumnEdgeSecond, AmplitudeSecond, IntraDistance, InterDistance)

3、边的坐标可以用来计算线条之间的距离

distance_pp (RowEdgeFirst, ColumnEdgeFirst, RowEdgeSecond, ColumnEdgeSecond, LinearDistance)
4、计算角度距离

AngularDistance := deg(IntraDistance / Radius)
3.8.2 位于图像外部的ROIs
3.8.3精度和速度

3.8.4图像类型

3.9销毁测量对象

close_measure (MeasureHandle)

4、Chapter高级测量,模糊测量对象


可以根据边缘点的灰度值、位置和尺寸来限制边缘。

4.1 第一个例子

solution_guide\1d_measuring\fuzzy_measure_switch.hdev
a是标准的测量,b是模糊测量

模糊隶属度函数是由运算符创建

create_funct_1d_pairs ([7,9,11], [0.0,1.0,0.0], SizeFunction)

对尺寸进行约束

SetType := 'size'
set_fuzzy_measure (MeasureHandle, SetType, SizeFunction)

所得到的模糊度量对象可用于提取大约9个像素宽的边缘对,“近似”一词由模糊隶属函数定义。然后利用模糊测度对象提取所需的边缘对:

Sigma := 0.9
AmpThresh := 12
FuzzyThresh := 0.5
Transition := 'negative'
Select := 'all'
fuzzy_measure_pairs (Image, MeasureHandle, Sigma, AmpThresh, FuzzyThresh,Transition, RowEdgeFirst, ColumnEdgeFirst, AmplitudeFirst, RowEdgeSecond, ColumnEdgeSecond, AmplitudeSecond, RowEdgeCenter, ColumnEdgeCenter, FuzzyScore, IntraDistance, InterDistance)

在内部,使用指定的模糊隶属函数对所有可能的边缘对进行加权。确定每个可能的边缘对的宽度,并将其转换为模糊值。如果这个模糊值位于用户定义的阈值FuzzyThresh之上,则接受边缘对,否则拒绝。

4.2 控制边缘和边缘对的选择

 

4.2.1可以用于控制边缘和边缘对选择的特征

边缘对的选择是由近似已知的对大小来控制的,还可以根据其他特性选择边缘或边缘对。这些特性被分组为所谓的set类型(set_fuzzy_measure和set_fuzzy_measure re_norm_pair操作符的参数SetType)。

描述位置或大小的集合类型可以使用模糊隶属函数指定,模糊隶属函数直接描述特征值上的约束。第一种方法使用操作符set_fuzzy_measure指定模糊隶属函数。第二种方法使用操作符set_fuzzy_measure re_norm_pair,它支持对模糊隶属度函数的广义使用,因为对大小的设置独立于模糊隶属度函数。

引用边缘对特征的集合类型只有在确定边缘对时才会生效,即,如使用了操作符fuzzy_measure_pair或fuzzy_measure_pairing。

注意,在提取边缘对时,所有可能的边缘对都根据指定的模糊隶属函数进行内部分析。如果仅用模糊隶属函数指定待确定边缘对的部分知识,则可能导致不直观的结果。例如,如果边缘对指定的位置,但不是他们的大小,一些小的边缘对可能会被忽略,因为一双大的边缘,由第一对边第一个小边和第二边的小边对成员的值等于或高于小边。因此,所有提取的边缘对的知识都应该用模糊隶属函数来指定。在上面的例子中,还可以通过指定边缘对的大小来更清楚地定义所需的边缘对。

4.2.2 定义模糊隶属函数特征值的约束

defuzzyfication去模糊化

4.2.2.1 模糊隶属函数

也就是处理在完全真和完全假之间的值。模糊集合是满足隶属度成员的集合。模糊逻辑为受不确定性影响或只能模糊描述的知识的表示提供了一个框架。

边缘强度在50以下的不是强边缘模糊集的一部分,100以上的,是完全的强边缘,[50,100]是模糊集的部分成员

一般被分段定义

create_funct_1d_pairs (XValues, YValues, FuzzyMembershipFunction)
create_funct_1d_pairs ([50,100], [0,1], FuzzyMembershipFunction1)
Length := 80
create_funct_1d_pairs ([Length / 8.0,Length / 2.0], [1,0], FuzzyMembershipFunction2)


4.2.2.2去模糊化

set_fuzzy_measure or set_fuzzy_measure_norm_pair
fuzzy_measure_pos, fuzzy_measure_pairs, or fuzzy_measure_pairing.
 

4.3 创建模糊测量对象

 

一个模糊度量对象的不同集合类型指定多个模糊隶属函数。

4.3.1 指定一个模糊隶属函数

使用set_fuzzy_measure将标准测量对象转化为模糊隶属函数。

create_funct_1d_pairs ([5,10,15], [0,1,0], FuzzyMembershipFunctionPairSize10)
set_fuzzy_measure (MeasureHandle, 'size', FuzzyMembershipFunctionPairSize10)

4.3.2 指定归一化模糊隶属函数

create_funct_1d_pairs ([0.5,1,1.5], [0,1,0], FuzzyMembershipFunctionPairSizeNormalized)
PairSize := 10
set_fuzzy_measure_norm_pair (MeasureHandle, PairSize, 'size', FuzzyMembershipFunctionPairSizeNormalized)

其实就是都乘以PairSize 。

归一化模糊隶属函数可以很容易的地适应被测量对象的不同大小。

PairSize := 20
set_fuzzy_measure_norm_pair (MeasureHandle, PairSize, 'size', FuzzyMembershipFunctionPairSizeNormalized)

create_funct_1d_pairs ([10,20,30], [0,1,0], FuzzyMembershipFunctionPairSize20)
set_fuzzy_measure (MeasureHandle, 'size', FuzzyMembershipFunctionPairSize20)
设置类别子类别功能类别简述
直接归一化
contrastcontrast'.-边缘的振幅
positionposition..计算边缘到模糊度量对象参考点的符号距离。
position_center..例如“位置”,参考点位于轮廓线的中心
position_end..例如“位置”,参考点位于轮廓线的末尾
position_first_edge..例如“位置”,参考点位于第一个边缘
position_last_edge..比如“位置”,参考点位于最后一条边
position_pairposition_pair..计算边缘对到模糊度量对象参考点的符号距离。边对的位置定义为两条边的中心
position_pair_center’..profile_pair的中心
position_pair_end..profile_pair的末尾
position_first_pair..参考点位于第一对边的位置
position_last_pair..参考点位于最后一对边的位置
sizesize..计算边缘对的大小
size_diff-.计算所需对大小与边缘对的实际大小之间的带符号差异。
size_abs_diff-.计算所需对大小与边缘对的实际大小之间的绝对差值
graygray.-计算边缘对的两条边之间的平均灰度值

4.3.3 指定多个模糊隶属函数

set_fuzzy_measure (MeasureHandle, 'contrast', FuzzyMembershipFunction1)
set_fuzzy_measure (MeasureHandle, 'position', FuzzyMembershipFunction2)

4.3.4 改变和重设模糊测量对象

SetType := 'contrast'
reset_fuzzy_measure (MeasureHandle, SetType)

4.4使用标准的测量对象

measure_projection, measure_thresh, translate_measure, and close_measure

 

 

 

附录A

斜边

如果测量矩阵和边缘是垂直的,那么矩阵应该是尽量的宽才对,这样可以减少噪声干扰。

如果测量矩阵和边缘是不垂直的,那么矩阵的宽度应该小才对。该情况下,测量的profile里面会包含很多的噪声。因此边缘也不会被准确的测量。而且测量出来的距离并不是垂直边缘的距离。

如果边缘和测量对象有夹角

perpendicular distance = cos(δ) · Distance
0°倾斜

15°倾斜

30°倾斜

 

附录B

模糊隶属函数的例子

给出了模糊隶属函数和一个模糊隶属函数的x值的典型范围。用PairSize定义归一化 隶属成员函数

B.1 对比度

B.1.1 contrast

SetType := 'contrast'
create_funct_1d_pairs ([50,100,150], [0,1,0], FuzzyMembershipFunction)
set_fuzzy_measure (MeasureHandle, SetType, FuzzyMembershipFunction)

B.2 position

B.2.1 position

0.0 ≤ x ≤ length of the ROI
SetType = ’position’, PairSize = 10

SetType := 'position'
create_funct_1d_pairs ([50,130], [1,0], FuzzyMembershipFunction)
set_fuzzy_measure (MeasureHandle, SetType, FuzzyMembershipFunction)
SetType := 'position'
PairSize := 10
create_funct_1d_pairs ([5,13], [1,0], NormalizedFuzzyMembershipFunction)
set_fuzzy_measure_norm_pair (MeasureHandle, PairSize, SetType,NormalizedFuzzyMembershipFunction)

B.2.2 position_center
SetType = ’position_center’, PairSize = 10
 

SetType := 'position_center'
create_funct_1d_pairs ([-70,-20,20,70], [0,1,1,0], FuzzyMembershipFunction)
set_fuzzy_measure (MeasureHandle, SetType, FuzzyMembershipFunction)

SetType := 'position_center'
PairSize := 10
create_funct_1d_pairs ([-7,-2,2,7], [0,1,1,0], NormalizedFuzzyMembershipFunction)
set_fuzzy_measure_norm_pair (MeasureHandle, PairSize, SetType, NormalizedFuzzyMembershipFunction)

B.2.3 position_end

SetType = ’position_end’, PairSize = 10

SetType := 'position_end'
create_funct_1d_pairs ([-250,0], [0,1], FuzzyMembershipFunction)
set_fuzzy_measure (MeasureHandle, SetType, FuzzyMembershipFunction)
SetType := 'position_end'
PairSize := 10
create_funct_1d_pairs ([-25,0], [0,1], NormalizedFuzzyMembershipFunction)
set_fuzzy_measure_norm_pair (MeasureHandle, PairSize, SetType, NormalizedFuzzyMembershipFunction)

B.2.4 position_first_edge

SetType := 'position_first_edge'
create_funct_1d_pairs ([50,130], [1,0], FuzzyMembershipFunction)
set_fuzzy_measure (MeasureHandle, SetType, FuzzyMembershipFunction)

SetType = ’position_first_edge’, PairSize = 10

SetType := 'position_first_edge'
PairSize := 10
create_funct_1d_pairs ([5,13], [1,0], NormalizedFuzzyMembershipFunction)
set_fuzzy_measure_norm_pair (MeasureHandle, PairSize, SetType, NormalizedFuzzyMembershipFunction)

B.2.5 position_last_edge 

SetType = ’position_last_edge’, PairSize = 10

SetType := 'position_last_edge'
create_funct_1d_pairs ([-250,0], [0,1], FuzzyMembershipFunction)
set_fuzzy_measure (MeasureHandle, SetType, FuzzyMembershipFunction)
SetType := 'position_last_edge'
PairSize := 10
create_funct_1d_pairs ([-25,0], [0,1], NormalizedFuzzyMembershipFunction)
set_fuzzy_measure_norm_pair (MeasureHandle, PairSize, SetType, NormalizedFuzzyMembershipFunction)

B.3 position_pair

B.3.1 position_pair

SetType = ’position_pair’, PairSize = 10
 

SetType := 'position_pair'
create_funct_1d_pairs ([0,50,250,300], [0,1,1,0], FuzzyMembershipFunction)
set_fuzzy_measure (MeasureHandle, SetType, FuzzyMembershipFunction)
SetType := 'position_pair'
PairSize := 10
create_funct_1d_pairs ([0,5,25,30], [0,1,1,0], NormalizedFuzzyMembershipFunction)
set_fuzzy_measure_norm_pair (MeasureHandle, PairSize, SetType, NormalizedFuzzyMembershipFunction)

B.3.2 position_pair_center

SetType = ’position_pair_center’, PairSize = 10

SetType := 'position_pair_center
create_funct_1d_pairs ([-25,0,25], [0,1,0], FuzzyMembershipFunction)
set_fuzzy_measure (MeasureHandle, SetType, FuzzyMembershipFunction)
SetType := 'position_pair_center'
PairSize := 10
create_funct_1d_pairs ([-2.5,0,2.5], [0,1,0], NormalizedFuzzyMembershipFunction)
set_fuzzy_measure_norm_pair (MeasureHandle, PairSize, SetType, NormalizedFuzzyMembershipFunction)

B.3.3 position_pair_end

SetType = ’position_pair_end’, PairSize = 10

SetType := 'position_pair_end'
PairSize := 10
create_funct_1d_pairs ([-30,-20,0], [0,0.9,1], NormalizedFuzzyMembershipFunction)
set_fuzzy_measure_norm_pair (MeasureHandle, PairSize, SetType, NormalizedFuzzyMembershipFunction)

B.3.4  ’position_first_pair’


 

SetType := 'position_first_pair'
create_funct_1d_pairs ([0,50,250,300], [0,1,1,0], FuzzyMembershipFunction)
set_fuzzy_measure (MeasureHandle, SetType, FuzzyMembershipFunction)
SetType := 'position_first_pair
PairSize := 10
create_funct_1d_pairs ([0,5,25,30], [0,1,1,0], NormalizedFuzzyMembershipFunction)
set_fuzzy_measure_norm_pair (MeasureHandle, PairSize, SetType, NormalizedFuzzyMembershipFunction)

B.3.5 position_last_pair’


SetType = ’position_last_pair’, PairSize = 10

SetType := 'position_last_pair'
create_funct_1d_pairs ([-300,-200,0], [0,0.9,1], FuzzyMembershipFunction)
set_fuzzy_measure (MeasureHandle, SetType, FuzzyMembershipFunction)
SetType := 'position_last_pair'
PairSize := 10
create_funct_1d_pairs ([-30,-20,0], [0,0.9,1], NormalizedFuzzyMembershipFunction)
set_fuzzy_measure_norm_pair (MeasureHandle, PairSize, SetType, NormalizedFuzzyMembershipFunction)

B.4 Set Type size


B.4.1 Subtype ’size’

SetType = ’size’, PairSize = 50
 

SetType := 'size'
create_funct_1d_pairs ([20,50,80], [0,1,0], FuzzyMembershipFunction)
set_fuzzy_measure (MeasureHandle, SetType, FuzzyMembershipFunction)
SetType := 'size'
PairSize := 50
create_funct_1d_pairs ([0.4,1,1.6], [0,1,0], NormalizedFuzzyMembershipFunction)
set_fuzzy_measure_norm_pair (MeasureHandle, PairSize, SetType, NormalizedFuzzyMembershipFunction)

B.4.2 Subtype ’size_diff’

SetType := 'size_diff'
PairSize := 15
create_funct_1d_pairs ([-0.01,0,0.5], [0,1,0], NormalizedFuzzyMembershipFunction)
set_fuzzy_measure_norm_pair (MeasureHandle, PairSize, SetType, NormalizedFuzzyMembershipFunction)

B.4.3 Subtype ’size_abs_diff

SetType = ’size_abs_diff’, PairSize = 15

SetType := 'size_abs_diff'
PairSize := 15
create_funct_1d_pairs ([0,0.5], [1,0], NormalizedFuzzyMembershipFunction)
set_fuzzy_measure_norm_pair (MeasureHandle, PairSize, SetType, NormalizedFuzzyMembershipFunction)

B.5 Set Type gray


B.5.1 Subtype gray

SetType := 'gray'
create_funct_1d_pairs ([20,40,60,80,120,140,160,180], [0,1,1,0,0,1,1,0], FuzzyMembershipFunction)
set_fuzzy_measure (MeasureHandle, SetType, FuzzyMembershipFunction)

B.6 Set Type position_pair combined with size

create_funct_1d_pairs ([0,50,250,300], [0,1,1,0], FuzzyMembershipFunctionPositionPair)
create_funct_1d_pairs ([0,50], [1,0.5], FuzzyMembershipFunctionSize)
set_fuzzy_measure (MeasureHandle, 'position_pair', FuzzyMembershipFunctionPositionPair)
set_fuzzy_measure (MeasureHandle, 'size', FuzzyMembershipFunctionSize)

 

 

附录C

几何平均值

  • 5
    点赞
  • 39
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值