We are accessing a .NET object from matlab. It’s some image capture software, and we’re wanting to copy the image data into matlab.
We have two options for getting at this data. First is to create an image object which has in it’s constructor an argument of type unsigned char * which when you look at the “limitations of .net” web page here:
http://www.mathworks.com/help/techdoc/matlab_external/brpb5k6-1.html#brpb58f-1
seems to indicate that you cannot pass a pointer to a .NET library in that fashion. (EVen though we can create an appropriate pointer using the libpointer matlab function.
Second thought is that if we use a default constructor in this library, which under the hood manages the memory, and creates the buffer, the buffer is accessible via a System.Reflection.Pointer object. But, how do we grab the data from that pointer, and get it copied into a matlab array?
Cannot figure that out. Any thoughts would be appreciated. Speed for this step is not critical, so slow works for us.
thanks
This looks to be impossible to do, based upon out of band conversations with mathworks, and others.