【发布时间】:2011-09-02 23:47:59
【问题描述】:
我有以下功能。我想将一些数据从Mat 复制回
IplImage * 键入并将其返回给主控件。
这很愚蠢,但我找不到合适的方法来做到这一点!骗子
表没有说任何关于Mat->IplImage * 数据转换
复制(因为我在函数之外需要它)。
任何想法或指针表示赞赏。 最好的 --阿里
int test(IplImage **srcImage, int num_images)
{
vector<Mat> images(num_images);
for (int i = 0; i < num_images; ++i)
{
images[i] = Mat(srcImage[i]); // I guess should be correct!
....
// some manipulations on images[i]
}
// this should be wrong!
for (int i = 0; i < num_images; ++i)
{
cvReleaseImage(&srcImage[i]);
srcImage[i] = new IplImage(images[i]);
images[i].clear();
}
return 0;
}
【问题讨论】:
标签: opencv iplimage opencv-mat