主要内容

mergeDetections

将检测合并为集群检测

描述

例子

clusteredDetections= mergeDetections (检测clusterIndex合并共享相同集群标签的检测。默认情况下,该函数使用高斯混合合并算法合并同一集群中的检测。该函数假设同一集群中的所有检测共享相同的信息时间SensorIndexObjectClassIDMeasurementParameters,ObjectAttributes属性或字段。

clusteredDetections= mergeDetections (___MergingFcn =mergeFcn指定用于合并检测和前面语法中的输入参数的函数。

例子

全部折叠

生成两个带有两个错误警报的检测簇。

rng (2021)%用于可重复的结果x1 = [5;5;0] + randn(3、4);群集1中有四个检测x2 = [5;5;0] + randn(3、4);群集二中有四个检测xFalse = 30 * randn (3 2);%两次误报x = [x1 x2 xFalse];

将这些检测格式化为单元格数组objectDetection对象。

检测= repmat ({objectDetection (0, 0;0;0)}, 10日1);I = 1:10检测{I}。测量= x(:,我);结束

根据前面定义的场景定义集群索引。通常可以通过在检测上应用聚类算法来获得聚类索引。

clusterIndex = [1;1;1;1;2;2;2;2;3;4);

使用mergeDetections命令功能合并检测。

clusteredDetections = mergeDetections(检测、clusterIndex);

在戏剧情节中想象结果。

创建一个theaterPlot对象。tp = theaterPlot;%创建两个检测绘图器,一个用于非聚集检测,一个用于%集群检测。detPlotterUn = detectionPlotter (tp, DisplayName =“未聚集的检测”...MarkerFaceColor =“b”MarkerEdgeColor =“b”);detPlotterC = detectionPlotter (tp, DisplayName =“集群检测”...MarkerFaceColor =“r”MarkerEdgeColor =“r”);%连接测量和协方差的非聚集检测detArray =(检测{:});荀= horzcat (detArray.Measurement)”;双关语=猫(3、detArray.MeasurementNoise);为聚集检测连接测量和协方差clusteredDetArray = [clusteredDetections {}):;xC = horzcat (clusteredDetArray.Measurement)”;电脑=猫(3、clusteredDetArray.MeasurementNoise);%绘制所有未聚类和聚类检测plotDetection (detPlotterUn荀,双关);plotDetection (detPlotterC xC、PC);

输入参数

全部折叠

对象检测,指定为N元组objectDetection对象,N-element cell数组objectDetection对象,或一个N属性的属性名相同的结构的数组objectDetection对象。N为检测次数。您可以创建检测直接,或者你可以获取检测从传感器对象的输出,如fusionRadarSensorirSensor,sonarSensor

群集索引,指定为N-元素正整数向量,其中N检测次数是否在检测输入。中的每个元素都是相应检测的聚类索引检测输入。例如,如果clusterIndex (i) = k,那么检测输入属于集群k

用于合并检测的函数,指定为函数句柄。函数必须使用如下语法:

detectionOut = mergeFcn (detectionsIn)
地点:

  • detectionsIn的单元格数组指定为objectDetection对象(在同一集群中)。

  • detectionOut作为objectDetection对象。

例子:@mergeFcn

输出参数

全部折叠

聚集检测,返回为-element cell数组objectDetection对象,中是否指定了唯一簇索引的数量clusterIndex输入。

另请参阅

介绍了R2021b