[英]Create array of IplImage ponters (IplImage**) from EmguCV using C#
I want create array of IplImage pointers from C#.我想从 C# 创建 IplImage 指针数组。 I know way to create IplImage pointer.我知道创建 IplImage 指针的方法。
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.就像在 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];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.