阅读背景:

const T* const指向Eigen矩阵。

来源:互联网 
struct AscendReprojectionError {
    AscendReprojectionError(double observed_x, double observed_y)
        : observed_x(observed_x), observed_y(observed_y) {}

    template <typename T>
    bool operator()(const T* const camera,
        const T* const point,
        T* residuals) const {       

        Eigen::Matrix<T, 3, 3, Eigen::RowMajor> rot = Eigen::Map <Eigen::Matrix< T, 3, 3, Eigen::RowMajor> >(camera);

        return true;
    }

    // Factory to hide the construction of the CostFunction object from
    // the client code.
    static ceres::CostFunction* Create(const double observed_x,
        const double observed_y) {
        return (new ceres::AutoDiffCostFunction<AscendReprojectionError, 2, 9, 3>(
            new AscendReprojectionError(observed_x, observed_y)));
    }

    double observed_x;
    double observed_y;
};
struct AscendReprojectionError {
    AscendRepr



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: