函數的調用形式
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