Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version
//C++/JNI
//vector_Point2f

void Mat_to_vector_Point2f(Mat& mat, vector<Point2f>& v_point)
{
    v_point.clear();
    CHECK_MAT(mat.type()==CV_32FC2 && mat.cols==1);
    v_point = (vector<Point2f>) mat;
}

void vector_Point2f_to_Mat(vector<Point2f>& v_point, Mat& mat)
{
    mat = Mat(v_point, true);
}