How to initialize std::vector<std::vector<cv::Point> > contours to save data

Hello there!
Can you please advise how to initialize How to initialize std::vector<std::vector<cv::Point> > with data.
I have some contours in following view
[37, 3]

I just need to save it like std::vector<std::vector<cv::Point> > = {37,3};
Please advise

sorry, but like it is now, it’s unclear, what you have or what you need,
can you try again, please ?

what’s that ? looks like a single point to me
how did you acquire that ?

string path2 = "woman.png";
   Mat img2 = imread(path2);
   Mat matrix2, imgWarp2;
   float w2 = 100, h2 = 60;


   Point2f src2[4] = { {1168.5, 147.5}, {1177.5, 147.5},  {1168.5, 160.5  }, {1177.5, 160.5} };

   Point2f dst2[4] = { {0.0f,0.0f},{w,0.0f},{0.0f,h},{w2,h2} };

   matrix2 = getPerspectiveTransform(src2, dst2);
   warpPerspective(img2, imgWarp2, matrix2, Point(w2, h2));

Basically I need to assign data below to vector of vectors, to use it

34 3
11 4
11 4
12 4
12 4
12 4
12 4
12 4
12 4
12 4
12 4
12 4
12 4
12 4
12 4
12 4
12 4
12 4
25 4
25 4
25 4
25 5

you can use initializer lists, like you used in your Points[4] code above:

std::vector<std::vector<cv::Point> > contours3 {{{1,2},{3,4},{5,6}}};

tempContours = { {1165, 158}, {1168, 158}, {1165, 160 }, {1168, 160} } is there a way to assign it like this?

second question: how can i compare items from vector below?
std::vector<std::vectorcv::Point > contours3 {{{1,2},{3,4},{5,6}}};

I need to compa1 to 3 or 4 to 6..
Big Thanks in Advance

no, that is only a single contour

I can only output pair [1165, 158]… I need to get one item from lets say 1165.
How can i do it?

related: opencv - std::vector<std::vectоr<cv::Point> > сontоurs {{ {39 , 35} }} hоw to get itеm - Stack Overflow

up
I can only output pair [1165, 158]… I need to get one item from vector of cv:Points
How can i do it?