Ask Your Question
0

cv::Mat_ vs std::vector

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

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
0

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

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

Question Tools

1 follower

Stats

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

Seen: 315 times

Last updated: Aug 11 '17