Ask Your Question

ask for an explaining for the code below

asked 2014-03-01 05:07:16 -0500

York gravatar image

vector<vector<point> > contours_poly( contours.size() );

i want to know details of this code;double vect<> and ( contours.size() more clear will be better,im new to that,thanks in advance!

edit retag flag offensive close merge delete


you can try to imagine vector<point> is a vector so vector<vector<point> is the vector of the vector,so it is a 2d matrix.

wuling gravatar imagewuling ( 2014-03-02 10:47:10 -0500 )edit

good explaining! IM a shandong guy, nice to come cross U my fellow bro!

York gravatar imageYork ( 2014-03-03 07:14:57 -0500 )edit

1 answer

Sort by » oldest newest most voted

answered 2014-03-01 10:42:46 -0500

Siegfried gravatar image

Hi, the code in the frist line creates a std::vector contours_poly containing vectors of points. The vector contours_poly is created with a size of contours.size(). More information about the constructors of std::vector can you see here.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools


Asked: 2014-03-01 05:07:16 -0500

Seen: 88 times

Last updated: Mar 01 '14