I am trying to pass a set of iplimage from OpenCV to another program (.net) that does not use iplimage but uses
list of byte[]
instead through c++/cli.
Any idea how to add/convert iplimage to the
list of byte[] ?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you want to copy exact pixels from iplimage.imageData, you can use Marshal.Copy
to copy data from an
IntPtr(imageData) to a managed array (byte[]).But since imageData is uncompressed, you might want to use
imencodeorcvEncodeImageto compress it to a intermediate buffer and then copy that to abyte[]with above code.