EmguCV 如何从数组中创建出IntPtr

需要添加引用:System.Runtime.InteropServices

举例如下:

  float[] priors={1,10};
  IntPtr intPtrSet = new IntPtr();
  intPtrSet=Marshal.AllocCoTaskMem(Marshal.SizeOf(priors[0]*priors.Length));
  Marshal.Copy(priors, 0, intPtrSet, priors.Length);

posted @ 2014-01-05 21:39  胡炜  阅读(464)  评论(0编辑  收藏  举报