Facing errors while converting Eigen::MatrixXd to cv::Mat

good, that you checked that !
it now looks, like your eigen Mats are float64, while opencv’s getPerspectiveTransform() expects float32 (only!)

(also see this overload which explicitly wants Point2f[])