开发者

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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜