将Mat转化为IplImage

void ConnectedComponents(Mat &mask_process, int poly1_hull0, float perimScale, int number = 0,
                         Rect &bounding_box = Rect(), Point &contour_centers = Point(-1, -1))
{
    /*下面4句代码是为了兼容原函数接口,即内部使用的是c风格,但是其接口是c++风格的*/
    IplImage *mask = &mask_process.operator IplImage();
    int *num = &number;
    CvRect *bbs = &bounding_box.operator CvRect();
    CvPoint *centers = &contour_centers.operator CvPoint();
}
posted @ 2015-01-10 08:11  龙泽一狼  阅读(412)  评论(0编辑  收藏  举报