在OpenCV中,填充一个矩形的代码:

        cvRectangle(iplImage,
             cvPoint(pElement->rect.left, pElement->rect.top),
             cvPoint(pElement->rect.left+pElement->rect.width, pElement->rect.top+pElement->rect.height),
             color,
             CV_FILLED,
             8, 0);

  有人问啦,如果吾不想填充,只画边怎么办?把CV_FILLED(-1)换成其他值(比如说2),就可以了。