【发布时间】:2012-09-30 03:13:03
【问题描述】:
我有一个关于 OpenCV 的分割方法的问题,即pyramid segmentation(在opencv2/imgproc/imgproc_c.h 中找到)
我不知道如何访问分段区域中的点。
我目前正在做的是:
cvPyrSegmentation(image, image_seg, storage, &comp, level, threshold1, threshold2);
for (unsigned int cur_seg = 0; cur_seg < total_segments; ++cur_seg) {
CvConnectedComp* cc = (CvConnectedComp*) cvGetSeqElem(comp, cur_seg);
// Missing part to access points from this segment
}
我找不到太多关于如何从每个 cc 元素访问点的信息。建议将不胜感激。
谢谢。
附:由于某些原因,C++ 版本的金字塔分割在 OpenCV(>2.3)的更高版本中不支持,因此需要 C 实现。
【问题讨论】: