logo资料库

meshgrid 在VS/C++中的实现.docx

第1页 / 共1页
资料共1页,全文预览结束
void meshgrid(const Range &xgv, const Range &ygv, Mat &X, Mat &Y, int Unit) { } std::vector t_x, t_y; for (int i = xgv.start; i <= xgv.end; i = i + Unit) t_x.push_back(i); for (int j = ygv.start; j <= ygv.end; j = j + Unit) t_y.push_back(j); cv::repeat(cv::Mat(t_x).t(), t_y.size(), 1, X); cv::repeat(cv::Mat(t_y), 1, t_x.size(), Y);
分享到:
收藏