NVIDIA-AI-IOT / cuPCL

A project demonstrating how to use the libs of cuPCL.
MIT License
573 stars 93 forks source link

cuFilter apply constraints on all 3 axes at one time. #47

Open anandkoirala1 opened 1 year ago

anandkoirala1 commented 1 year ago

how to apply filter constraints on all x,y,z at same time? the following code only applies filter to the most recent axis..

FilterParam_t setPx, setPy, setPz; // filter parameters for each axis

FilterType_t type = PASSTHROUGH; // only passthrough filter implemented in cuCL library for now

// this filter contraints is being applied for only one axis....
setPx.type = type;
setPx.dim = 0; // 0   // it will be 0,1,2 for x,y,z axes  
setPx.upFilterLimits = 1.5; 
setPx.downFilterLimits = -1.5; 
setPx.limitsNegative = false;   
filterTest.set(setPx);

setPy.type = type;
setPy.dim = 1; // 0   // it will be 0,1,2 for x,y,z axes  
setPy.upFilterLimits = 1.5; 
setPy.downFilterLimits = -1.5; 
setPy.limitsNegative = false;
filterTest.set(setPy);

setPz.type = type;
setPz.dim = 2; // 0   // it will be 0,1,2 for x,y,z axes  
setPz.upFilterLimits = 2.0; 
setPz.downFilterLimits = 0.0; 
setPz.limitsNegative = false;
filterTest.set(setPz);

filterTest.filter(output, &countLeft, input, nCount);

MagicalBrain commented 1 year ago

emm... The passthrough filter only apply constranints on the one axis. Maybe you can try the pcl::ConditionRemoval, but the cuPCL doesn't support it now.