Why CCLib::ICPRegistrationTools::RegisterClouds Return ERROR
Posted: Mon Nov 17, 2014 8:09 am
Hello!
This is the second time to ask for help.There are my codes below:
CCLib::SimpleCloud model;
CCLib::SimpleCloud part;
model.reserve(model_cop.width()*model_cop.height());
part.reserve(part_cop.width()*part_cop.height());
CCVector3 ccvt3;
for (int i = 0; i < model_cop.height(); i++)
{
for (int j = 0; j < model_cop.width(); j++)
{
ccvt3.x = model_cop[j].x();
ccvt3.y = model_cop[j].y();
ccvt3.z = model_cop[j].z();
model.addPoint(ccvt3);
}
}
for (int i = 0; i < part_cop.height(); i++)
{
for (int j = 0; j < part_cop.width(); j++)
{
ccvt3.x = part_cop[j].x();
ccvt3.y = part_cop[j].y();
ccvt3.z = part_cop[j].z();
part.addPoint(ccvt3);
}
}
double finalerror = 0;
CCLib::ICPRegistrationTools icprt;
int result = icprt.RegisterClouds(&model, &part, totalTrans, CCLib::ICPRegistrationTools::MAX_ERROR_CONVERGENCE, 0.01, 5000, finalerror);
Why the result is always return ICP_ERROR_DIST_COMPUTATION=102 ??? Is there something wrong to use the CCLIB ? Please help me,thanks a lot.
This is the second time to ask for help.There are my codes below:
CCLib::SimpleCloud model;
CCLib::SimpleCloud part;
model.reserve(model_cop.width()*model_cop.height());
part.reserve(part_cop.width()*part_cop.height());
CCVector3 ccvt3;
for (int i = 0; i < model_cop.height(); i++)
{
for (int j = 0; j < model_cop.width(); j++)
{
ccvt3.x = model_cop[j].x();
ccvt3.y = model_cop[j].y();
ccvt3.z = model_cop[j].z();
model.addPoint(ccvt3);
}
}
for (int i = 0; i < part_cop.height(); i++)
{
for (int j = 0; j < part_cop.width(); j++)
{
ccvt3.x = part_cop[j].x();
ccvt3.y = part_cop[j].y();
ccvt3.z = part_cop[j].z();
part.addPoint(ccvt3);
}
}
double finalerror = 0;
CCLib::ICPRegistrationTools icprt;
int result = icprt.RegisterClouds(&model, &part, totalTrans, CCLib::ICPRegistrationTools::MAX_ERROR_CONVERGENCE, 0.01, 5000, finalerror);
Why the result is always return ICP_ERROR_DIST_COMPUTATION=102 ??? Is there something wrong to use the CCLIB ? Please help me,thanks a lot.