Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

My solution(opencv 3.0+):

inline void upload(const vector<cv::Point2f>& vec, cv::cuda::GpuMat& d_mat)
{
    cv::Mat mat(1, vec.size(), CV_32FC2, (void*)&vec[0]);
    d_mat.upload(mat);
}

Hope this helps.