# Revision history [back]

### covert from vector to Mat

I have

vector<cv::Point> pts


and I want to use it with FLANN I tried

cv::flann::Index tree= cv::flann::Index(cv::Mat(pts),cv::flann::KDTreeIndexParams(1));


but it doesn't work.I think I must convert pts to Mat.

How I can do this?

### covert convert from vector to Mat

I have

vector<cv::Point> pts


and I want to use it with FLANN I tried

cv::flann::Index tree= cv::flann::Index(cv::Mat(pts),cv::flann::KDTreeIndexParams(1));


but it doesn't work.I think I must convert pts to Mat.

How I can do this?

 3 retagged sturkmen 5891 ●3 ●41 ●68 https://github.com/stu...

### convert from vector to Mat

I have

vector<cv::Point> pts


and I want to use it with FLANN I tried

cv::flann::Index tree= cv::flann::Index(cv::Mat(pts),cv::flann::KDTreeIndexParams(1));


but it doesn't work.I think I must convert pts to Mat.

How I can do this?