gpt4 book ai didi

c++ - Opencv CvSeq * 将整数值添加到序列中的所有点

转载 作者:行者123 更新时间:2023-11-28 08:19:45 25 4
gpt4 key购买 nike

在使用 cv FindContours( g_gray, g storage, & contours ) 之后,我需要将整数值添加到序列 CvSeq * contours 中的所有点。怎么做?

最佳答案

我假设您的意思是向获得的轮廓的每个点添加一个常量偏移点。在 http://opencv.willowgarage.com/documentation/c/imgproc_structural_analysis_and_shape_descriptors.html#cvFindContours 查看完整的功能原型(prototype):

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 偏移量=cvPoint(0, 0))

只要给它传递一个必要的偏移值,就可以了。

关于c++ - Opencv CvSeq * 将整数值添加到序列中的所有点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6291468/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com