arjun.a
commit
b24351f
raw
history blame
7.26 kB
The question of function(clusteringDBscan_findNeighbors2Fixed) parameters
Hello,TI's engineers.I use ti's IWR1642BOOST and want to develop SRR radar, so i read the demo of short_range_radar(SRR).When i read the clusteringDBscanRun, and see the function of clusteringDBscan_findNeighbors2Fixed(this function is first time appear in clusteringDBscan.c file, line 124),one parameter is confused me. neighCount = clusteringDBscan_findNeighbors2Fixed( detObj2D, point, neighLast, numPoints, epsilon2fixed, epsilonfixed, weight, vFactorfixed,inst->scope, &newCount, inst->dBScanNeighbourLim); The third parameter of neighLast whether the correct?I think this parameter should be neighCurrent.I don't know whether my understanding is wrong, so askcompany engineers can you help me to answer? Can you give me some clusteringDBscan data to better learn. Thanks a lot!!!
Hi, For this question we need to check with algorithm developer. We should be able to get a response by early next week thank you Cesar
HI, neighCurrent is a pointer pointing to the beginning of the neighbor list for the current scan. And neightLast is a pointer pointing to the end of neighbor list for the current scan. So, neighCurrent is not moving and neightLast is kept moving. And the delta is used to calculate the length of the neighbors founded for the current scan. Hope it helps, Zigang
Hi,ti’ engineer!the function of clusteringDBscan_findNeighbors2Fixed is appear twice,first is find original point’s neighbor, the second is find neighbor’ s neighbor.When we find the neighbor’s neighbor, According to code comments we should compared neighbor’s neighbor’s speed with original point’s speed.If less than vfactor, so we think they are the same class.However, in srr code,your code still use original point’s speed compared with its neighbor’s speed,this compared is finished in the first function of clusteringDBscan_findNeighbors2Fixed, According to your code, the neighbors' neighbors will must be in the same class,This should not be the intent of your code itself.Can you check the function of clusteringDBscanRun,I think there is a logical problem with this function
Hi, I have talked with algorithm developer. We have reviewed the code but we did not see any bug. Could you please provide more information with the code lines you are analyzing? Please provide the code lines you have question about. This will help us understand if there is a bug thank you Cesar
Hello,Cesar! I think my previous question was not clearly stated.and i think the function of clusteringDBscanRun has some problem not clusteringDBscan_findNeighbors2Fixed .In clusteringDBscanRun.c file and the 167~175 lines,you find the original obj's neibor,then you should find original obj's neibor's neibor.if find it,we should take the original obj's neibor's neibor's speed compare with the original obj's speed,but the demo code still use the obj's neibor's speed compare with the original obj's speed.So the neighbors' neighbors and original obj's will must be in the same class.Please check it again. the code is in clusteringDBscanRun.c file and the 167~175 lines: if(neighCount >= inst->minPointsInCluster) { int32_t speed = (int32_t) detObj2D[point].speed; /* Check if the new point's velocity is the same velocity as the * clusterOriginator. */ if (_abs(detObj2D[member].speed - speed) < vFactorfixed) { for (ind = 0; ind < newCount; ind ++) { member = neighLast[ind]; inst->scope[member] = POINT_VISITED; } neighLast += newCount; /* Member is a core point, and its neighborhood is added to the cluster */ } } Thanks a lot!
HI, Within the while loop, we will find all the neighbor's neighbor, neighbor's neighbor's neighbor and etc. Every time, when the function clusteringDBscan_findNeighbors2Fixed is called inside the "while Loop", the neighLast will grow longer and the new neighbor's neighbor will become member to be checked. Therefore, the if condition you mentioned below if (_abs(detObj2D[member].speed - speed) < vFactorfixed) will check all the neighbor, neighbor's neighbor and neighbor's neighbor's neighbor with the clusterOriginator. Best, Zigang
hi,Zigang! The demo code's purpose is compare neighbor's neighbor's speed with the clusterOriginator's speed,and if in the vFactorfixed then think it is in the same clusterId.And your code comment is also point that:"/* Check if the new point's velocity is the same velocity as the clusterOriginator. */" However, in code the member is still the clusterOriginator's neighbor's index, i think it should be clusterOriginator's neighbor's neighbor's index.So the clusterOriginator's neighbor's neighbor must be in the same clusterId,even thought Within the while loop we will find all the neighbor's neighbor, neighbor's neighbor's neighbor and etc as you said.Please check it again.Thanks!
HI, In this following if condition: if (_abs(detObj2D[member].speed - speed) < vFactorfixed) speed is the speed of the clusterOriginator. detObj2D[member].speed is the speed of new points, including: the neighbor, neighbor's neighbor and neighbor's neighbor's neighbor and etc. Therefore, we are checking the new points's velocity with the velocity of the clusterOrginator. Please let me know where did I misunderstand. Best, Zigang
Hello,zigang Yang! In function of clusteringDBscanRun,you call the function of clusteringDBscan_findNeighbors2Fixed twice.First time you want to find the clusterOrginator's neibor,and the second time you want to find clusterOrginator's neibor's neibor and clusterOrginator's neighbor's neighbor's neighbor and etc.And you will put the neibor in the inst->neighbors in turn.We look the code behind: while (neighCurrent != neighLast) // neigh shall be at least minPoints in front of neighborhood pointer { // Explore the neighborhood member = *neighCurrent++; // Take point from the neighborhood output->IndexArray[member] = clusterId; // All points from the neighborhood also belong to this cluster inst->visited[member] = POINT_VISITED; neighCount = clusteringDBscan_findNeighbors2Fixed( detObj2D, member, neighLast, numPoints, epsilon2fixed, epsilonfixed, weight, vFactorfixed, inst->scope, &newCount, inst->dBScanNeighbourLim); if(neighCount >= inst->minPointsInCluster) { int32_t speed = (int32_t) detObj2D[point].speed; /* Check if the new point's velocity is the same velocity as the * clusterOriginator. */ if (_abs(detObj2D[member].speed - speed) < vFactorfixed) { for (ind = 0; ind < newCount; ind ++) { member = neighLast[ind]; inst->scope[member] = POINT_VISITED; } neighLast += newCount; /* Member is a core point, and its neighborhood is added to the cluster */ } } } The member is clusterOrginator's neibor,and then you take it compare with the clusterOriginator's speed,this is compared in the first call the function of clusteringDBscan_findNeighbors2Fixed,so the condition: if (_abs(detObj2D[member].speed - speed) < vFactorfixed) will must established, and then you take the new points(clusterOrginator's neibor's neibor) add in the inst->neighbors. I think the member in if condition(if (_abs(detObj2D[member].speed - speed) < vFactorfixed)) should be the clusterOrginator's neibor's neibor, not the clusterOrginator's neibor. Please check it again. Thanks a lot!