开发者

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

开发者 https://www.devze.com 2023-03-11 03:31 出处:网络
I want create array of IplImage pointers from C#. I know way to create IplImage pointer. IntPtr imgPointer = Marshal.AllocHGlobal(StructSize.MIplImage);

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];

0

精彩评论

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