How can i create a pointer for more than one array?

1 次查看(过去 30 天)
Hello,
i want to call a function from my DLL which includes a pointer to an array. In my case the array size is 1920x1080, an image.
When i execute the DLL function, it transfers the array (image data) to the hardware memory.
pic = imread('Test.png');
pic = rgb2gray(pic);
pic = fliplr(pic)';
imwrite(pic,'pic.png');
UserArray = uint8(pic);
UserArrayPtr = libpointer('voidPtr',UserArray); % Pointer
[STATUS_ALP_SEQ_PUT, ~] = calllib('alp4395','AlpSeqPut', ALP_ID, SequenceID, PicOffset, PicLoad, UserArrayPtr);
This is working fine!
But how can i create a pointer which contains more than one image?
I tried:
  • Execute "calllib" in loop (didnt work)
  • Create a n x m cell fur UserArray (didnt work)
I'm really helpness right now and i dont know how to solve this problem. I hope someone can help me!

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Call C from MATLAB 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by