how to get IntPtr data from byte[]

Ask question on using Emgu CV with C#
Post Reply
alex17swim
Posts: 4
Joined: Thu Jun 26, 2014 10:35 pm

how to get IntPtr data from byte[]

Post by alex17swim » Mon Jul 07, 2014 10:00 pm

there are already image data in byte[] arr, 3 channels of bmp file, and also a MIplImage raw reated for it. how to get raw.imageData from arr?
using CvInvoke.cvSetData() failed, as 2 parameters both need IntPtr type;
using Marshal.StructureToPtr() passed compile, but crush when runs, indicates "Specify the structure must be able to directly copied to the unit structure, or has the layout information"
so, how can I get the imagedata of byte[] into IntPtr for MIplImage?
life is swimming.

Post Reply