template <typename T>
bool operator()(const T* input_pointA, const T* input_pointB, const T* input_pointC, T* residual) const {
Eigen::Map<const Eigen::Matrix<T, 3, 1> > pointA(input_pointA);
Eigen::Map<const Eigen::Matrix<T, 3, 1> > pointB(input_pointB);
Eigen::Map<const Eigen::Matrix<T, 3, 1> > pointC(input_pointC);
Eigen::Matrix<T, 3, 1> N = (pointA.cross(pointB)).normalize() ;
residual[0] = pointA.dot(pointB);
residual[1] = N.dot(pointC);
return true ;
}
template <typename T>
void testFunction(const Eigen::Matrix<T, 3, 1> &A,
const Eigen::Matrix<T, 3, 1> &B,
const Eigen::Matrix<T, 3, 1> &C
Eigen::Matrix<T, 2, 1>& resids)
{
Eigen::Matrix<T, 3, 1> N = (A.cross(B)).normalize() ;
resids(0) = A.dot(B);
resids(1) = N.dot(C);
}
template <typename T>
bool operator()(const T* input_pointA, const T* input_pointB, const T* input_pointC, T* residual) const {
Eigen::Map<const Eigen::Matrix<T, 3, 1> > pointA(input_pointA);
Eigen::Map<const Eigen::Matrix<T, 3, 1> > pointB(input_pointB);
Eigen::Map<const Eigen::Matrix<T, 3, 1> > pointC(input_pointC);
Eigen::Matrix<T, 2, 1> resids ;
testFunction(pointA, pointB, pointC, resids)
residual[0] = resids(0) ;
residual[1] = resids(1);
return true ;
}--
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/7283826c-4112-43e5-8a6e-0121d8221729%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/CABqdRUAUiEM1OxTnLdOm_jxVO2XvgAPwEte%3Dhc9bNfHNvfemEQ%40mail.gmail.com.