简体   繁体   中英

Create array of IplImage ponters (IplImage**) from EmguCV using C#


I want create array of IplImage pointers from C#. I know way to create IplImage pointer.

IntPtr imgPointer = Marshal.AllocHGlobal(StructSize.MIplImage);

But I want to create array of it. I tried something like this.

IntPtr[] imgArrayPointers = new IntPtr[100];

But in I need the size of array not be initialized at the beginning. Like this in OpenCV.

IplImage ** ArrayOfPonters = 0;

Can anyone help me to solve this problem.

Thanks,
Sachira

To keep an array un-allocated you just have to declare it like that:

IntPtr[] imgArrayPointers = null;

And then, when you need space, you eventually do:

imgArrayPointers = new IntPtr[100];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM