开发者

Create an array of IPlImage in OpenCV?

开发者 https://www.devze.com 2023-03-15 21:34 出处:网络
I am very new to OpenCV and I have the following question: I understand t开发者_StackOverflowhat I can create an image using:

I am very new to OpenCV and I have the following question:

I understand t开发者_StackOverflowhat I can create an image using:

IplImage  *img

What i want is making a database of images. For example:

img[0]: will have image 1,
img[1]: will have image 2,
img[2]: will have image 3,
 etc...

How can i do such a thing ?


One IplImage is use for one image. So you can create a IplImage *img = NULL then allocate or fill it with different sources of images with for example:

img[0] = cvLoadImage(...);

Do not forget to release your images:

cvReleaseImage(img[0] );

You can see the documenation here and some example here

0

精彩评论

暂无评论...
验证码 换一张
取 消