Matrix multiplication of homogeneous row vectors is not implemented
Describe the feature you would like to be implemented.
The following code does not compile.
Eigen::Matrix3f lsq_matrix(const Eigen::Matrix<float, 4, 3>& points,
const Eigen::Vector3f& center) {
auto pts = points.rowwise() - center.transpose();
auto pts_xy1 = pts.template leftCols<2>().rowwise().homogeneous();
return pts_xy1.transpose() * pts_xy1;
}
error: incomplete type 'Eigen::internal::generic_product_impl<Eigen::Transpose<Eigen::Homogeneous<Eigen::Block<Eigen::CwiseBinaryOp<Eigen::internal::scalar_difference_op<float, float>, const Eigen::Matrix<float, 4, 3>, const Eigen::Replicate<Eigen::Transpose<const Eigen::Matrix<float, 3, 1> >, 4, 1> >, 4, 2, true>, 1> >, Eigen::Homogeneous<Eigen::Block<Eigen::CwiseBinaryOp<Eigen::internal::scalar_difference_op<float, float>, const Eigen::Matrix<float, 4, 3>, const Eigen::Replicate<Eigen::Transpose<const Eigen::Matrix<float, 3, 1> >, 4, 1> >, 4, 2, true>, 1>, Eigen::DenseShape, Eigen::HomogeneousShape, 3>' used in nested name specifier generic_product_impl<Lhs, Rhs>::evalTo(dst, src.lhs(), src.rhs());
However, changing .homogeneous() to .homogeneous().eval() solves the problem. This is just a problem with the evaluators.
Would such a feature be useful for other users? Why?
This example of code shows up frequently when building matrices for Least Squared problems.
Any hints on how to implement the requested feature?
I am not sure which component is failing, but my guess is this is an issue with the homogeneous operator as it only works on vectors.