OpenCV 輪廓填充drawContours函數解析


函數的調用形式

void drawContours(InputOutputArray image, InputArrayOfArrays contours, int contourIdx, const Scalar& color, 
            int thickness=1, int lineType=8, InputArray hierarchy=noArray(), int maxLevel=INT_MAX, Point offset=Point())

函數參數詳解:

其中第一個參數image表示目標圖像,

第二個參數contours表示輸入的輪廓組,每一組輪廓由點vector構成,

第三個參數contourIdx指明畫第幾個輪廓,如果該參數為負值,則畫全部輪廓,

第四個參數color為輪廓的顏色,

第五個參數thickness為輪廓的線寬,如果為負值或CV_FILLED表示填充輪廓內部,

第六個參數lineType為線型,

第七個參數為輪廓結構信息,

第八個參數為maxLevel


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM