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.
精彩评论