MCPcopy Create free account
hub / github.com/PJLab-ADG/Livox-Mapping / EncodeFeatures

Method EncodeFeatures

LIO-Livox/src/segment/segment.cpp:251–279  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249}
250
251int PCSeg::EncodeFeatures(float *pFeas)
252{
253 int nLen=1+256+256+256*4;
254 // pFeas:(1+256*6)*3
255 // 0 3 ~ 3+356*3 = 257*3 275*3 ~ 257*3+256*3 3+256*6 ~ 3+256*6 + 256*4*3+12+1
256 // number center 每个障碍物的点数、类别、zmax OBB 12个点
257 // clusterNum
258 pFeas[0]=this->clusterNum;
259
260 memcpy(pFeas+3,this->pCenters,sizeof(float)*3*256);//重心
261
262 for(int ii=0;ii<256;ii++)//最大容纳256个障碍物
263 {
264 pFeas[257*3+ii*3]=this->pnum[ii];
265 pFeas[257*3+ii*3+1]=this->objClass[ii];
266 pFeas[257*3+ii*3+2]=this->zs[ii];
267 }
268
269 for(int ii=0;ii<256;ii++)
270 {
271 for(int jj=0;jj<4;jj++)
272 {
273 pFeas[257*3+256*3+(ii*4+jj)*3]=this->pOBBs[ii*8+jj*2];
274 pFeas[257*3+256*3+(ii*4+jj)*3+1]=this->pOBBs[ii*8+jj*2+1];
275 }
276 }
277
278
279}
280int FilterGndForPos(float* outPoints,float*inPoints,int inNum)
281{
282 int outNum=0;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected