How to rotate 2d image stored in the Eigen matrix in a clockwise direction by 90 degrees?
My code:
Eigen::Matrix<int, n, n> m;
Eigen::Rotation2D rot(90);
auto m1 = m * rot.derived();
But I receive an error:
error: static_assert failed due to requirement 'ProductIsValid || SameSizes' "INVALID_MATRIX_PRODUCT"