title: Pyramid Segmentation OpenCV
body: <p>I have a question about a segmentation method from OpenCV, namely <a href="http://opencv.willowgarage.com/documentation/c/imgproc_miscellaneous_image_transformations.html#pyrsegmentation" rel="nofollow">pyramid segmentation</a> (found in <code>opencv2/imgproc/imgproc_c.h</code>)</p>
  
  <p>I don't know how to access the points from the segmented regions. </p>
  
  <p>What I'm currently doing is:</p>
  
  <pre><code>cvPyrSegmentation(image, image_seg, storage, &amp;comp, level, threshold1, threshold2);
  
  for (unsigned int cur_seg = 0; cur_seg &lt; total_segments; ++cur_seg) {
        CvConnectedComp* cc = (CvConnectedComp*) cvGetSeqElem(comp, cur_seg);
        // Missing part to access points from this segment 
  }
  </code></pre>
  
  <p>I couldn't find much information on how to access the points from each <code>cc</code> element. Suggestions would be greatly appreciated. </p>
  
  <p>Thank you. </p>
  
  <p>P.S. For some reason the C++ version of pyramid segmentation is not supported in the later versions of OpenCV (>2.3), so a C implementation is needed.</p>