title: Convert CvSeq to vector<cv::Point>?
body: <p>I am new to openCV. i am working for the image processing application. i need to convert the <code>CvSeq</code> to <code>vector&lt;cv::Point&gt;</code>. </p>
  
  <pre><code>void find_squares( IplImage* img , cv::vector&lt;cv::vector&lt;cv::Point&gt;&gt;&amp;squares){
      IplImage* newimg = cvCreateImage(cvGetSize(img), IPL_DEPTH_8U, 1);
      IplImage* cannyimg = cvCreateImage(cvGetSize(img), IPL_DEPTH_8U, 1);
      IplImage* greyimg = cvCreateImage(cvGetSize(img), IPL_DEPTH_8U, 1);
      IplImage* testimg = cvCreateImage(cvGetSize(img), IPL_DEPTH_8U, 1);
  
      // convert the loaded image to a canny image
      cvCvtColor(img, greyimg, CV_BGR2GRAY);
      cvCanny(greyimg, cannyimg, 50, 150, 3);
  
      // necessary to convert loaded image to an image with channel depth of 1
      cvConvertImage(cannyimg, newimg);
      cvConvertImage(img, testimg);
  
      // allocate necessary memory to store the contours
      CvMemStorage* storage = cvCreateMemStorage(0);
      CvMemStorage* canny_storage = cvCreateMemStorage(0);
  
      // find the contours in both the loaded image and the canny filtered image
      cvFindContours(testimg, storage, &amp;contours, sizeof(CvContour),
                     CV_RETR_EXTERNAL, CV_CHAIN_CODE);
      cvFindContours(newimg, canny_storage, &amp;canny_contours, sizeof(CvContour),
                     CV_RETR_EXTERNAL, CV_CHAIN_CODE);
  
      // draw the contours on both the loaded image and the canny filtered image
      cvDrawContours(testimg, contours, cvScalar(255,255,255), cvScalarAll(255), 100);
  
       cvDrawContours( newimg, canny_contours, cvScalar(255,255,255), cvScalarAll(255),100);
  
  }
  </code></pre>
  
  <p>I want to convert the <code>contours</code> to <code>cv::vector&lt;cv::vector&lt;cv::Point&gt;&gt;</code>. i don't know want to do next.</p>
  
  <p>Please give me any idea.</p>