Ask Your Question

cv::Mat_ vs std::vector

asked 2017-08-10 23:35:33 -0500

Jack jack jacky gravatar image

Which is better, cv::Mat_<cv::point2f> or std::vector<cv::point2f>?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2017-08-11 07:31:43 -0500

Tetragramm gravatar image

cv::Mat_<> is a two dimensional structure. std::vector<> is a one dimensional structure.

If you have a 2D shape, then go ahead and use Mat_. If you have a 1D shape, you can use either, unless you want it to change size (push_back, pop_back), in which case, use vector.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-08-10 23:35:33 -0500

Seen: 54 times

Last updated: Aug 11