The camera manufacturer supplied this MATLAB code that does what I need to do in Mathematica.
disp('Color image format')
myCam.SetParam(xiApi.NET.PRM.BUFFER_POLICY , xiApi.NET.BUFF_POLICY.UNSAFE);
bmap=GetImage(myCam,1000);
BytesPerPixel=bmap.Format.BitsPerPixel/8;
NetArray=NET.createArray('System.Byte',W*H*BytesPerPixel);
img_data=zeros(H,W,3,'uint8');
for id=1:numOfFrames
bmap=GetImage(myCam,1000);
bmap.CopyPixels(NetArray,BytesPerPixel*W,0);
img=uint8(NetArray);
img_data(:,:,1)=transpose(reshape(img(3:BytesPerPixel:end),W,H));
img_data(:,:,2)=transpose(reshape(img(2:BytesPerPixel:end),W,H));
img_data(:,:,3)=transpose(reshape(img(1:BytesPerPixel:end),W,H));
imshow(img_data);
drawnow;
end
I can get the image height, width, and bytes per pixel with the code below.
bytesPerPixel = myImage@Format@BitsPerPixel/8;
myCam@GetParam["height", imageHeight];
myCam@GetParam["width", imageWidth];
Still looking for how to read the image from memory.