how to get IntPtr data from byte[] [closed]
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?
Maybe convert it to
Mat
, then useMat::convertTo(...)
to change it?ppl here can help you with opencv issues, not so much with specific emgu/c# problems.
mind asking here : http://www.emgu.com/forum ?
@thdrksdfthmn MIplImage inherits from Mat, both of them have the IntPtr data, so I guess Mat will not help.... @berak I already asked on emgu.com at the same time, but also no answers ... http://www.emgu.com/forum/viewtopic.php?f=7&t=4868&p=10040#p10040
Try it, and post the minimal code, maybe more help will come...