STORM-IRIT/OpenGR

[bug] small question about on scale different point clouds using s4pcs

chunibyo-wly opened this issue · 0 comments

/*!
\return Pairs< PointId, PrimitiveId>
*/
template <class DummyPrimitive, class Point, int dim, typename Scalar>
template <class PrimitiveContainer,
class PointContainer,
class ProcessingFunctor>
void
BruteForceFunctor<DummyPrimitive, Point, dim, Scalar>::process(
const PrimitiveContainer & M, //!< Input point set \in [0:1]^d
const PointContainer & Q, //!< Input point set \in [0:1]^d
Scalar &epsilon, //!< Intersection accuracy, refined
unsigned int /*minNodeSize*/, //!< Min number of points in nodes
ProcessingFunctor& functor
)
{
const unsigned int sizeM = M.size();
const unsigned int sizeQ = Q.size();
for (unsigned int j = 0; j != sizeQ; ++j){
functor.beginPrimitiveCollect(j);
for (unsigned int i = 0; i != sizeM; ++i){
if( M[i].intersectPoint(Q[j], epsilon ))
functor.process(i,j);
}
functor.endPrimitiveCollect(j);
}
}

according to this, I found you set a specific radius when searching in second point cloud.
But when you want to align two point cloud with different scale, I think maybe we can't find a right radius.
So I tried 4pcs and sp4cs with same data.
Here are the results(Tested on hippo model, and resize the second one to 1.2).

s4pcs

/apps/Super4PCS/Super4PCS -i ../assets/hippo1.obj ../assets/hippo2.obj -o 0.7 -d 0.01 -t 1000 -n 200 -r super4pcs_fast.obj -m mat_super4pcs_fast.txt

image

4pcs

/apps/Super4PCS/Super4PCS -i ../assets/hippo1.obj ../assets/hippo2.obj -o 0.7 -d 0.01 -t 1000 -n 200 -r super4pcs_fast.obj -m mat_super4pcs_fast.txt -x

image