开发者

Opencv CvSeq * add integer value to all points in sequence

After usuing cvFindContours( g_gray, g_storage, &contours ) I need to add to all points in sequence CvSeq * contours the integ开发者_如何学运维er value. How to do it?


I assume you mean adding a constant offset point to each point of the obtained contour. Check out the full function prototype at http://opencv.willowgarage.com/documentation/c/imgproc_structural_analysis_and_shape_descriptors.html#cvFindContours:

int cvFindContours(CvArr* image, CvMemStorage* storage, CvSeq** first_contour, int header_size=sizeof(CvContour), int mode=CV_RETR_LIST, int method=CV_CHAIN_APPROX_SIMPLE, CvPoint offset=cvPoint(0, 0))

Just pass it a requisite value of offset, that should do the trick.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜