04-08-2025 09:24 AM
I am using a high-resolution ASI camera to capture images and using the IMAQ ArrayToImage function to create an image. The image is a U16 9576x6388. I have verified that the image is correctly generated and when I probe the wire, I see the image. However, when I try to write it to a tiff file using the IMAQ Write File 2 function block, I get an image file in the correct location with no content. I tried reducing it down to a U8 image, and that also did not work. I would like to keep the image at U16; the higher resolution is important in my application. I am getting no errors from the function call for IMAQ Write File 2, and I only get an error when a later function I call sees an empty space where an image should be and throws an error. Any help is greatly appreciated.
Solved! Go to Solution.
04-08-2025 10:15 AM
I did some more digging and I am getting error 1074396159. I am not sure why this is happening though, as I create a U16 with IMAQ create, then passing that into the ArrayToImage function, then into the Write File 2 function... so I think there should be space allotted for the image.
04-08-2025 02:38 PM - edited 04-08-2025 02:42 PM
@xyz12309 wrote:
I did some more digging and I am getting error 1074396159. I am not sure why this is happening though, as I create a U16 with IMAQ create, then passing that into the ArrayToImage function, then into the Write File 2 function... so I think there should be space allotted for the image.
It is "Out of memory" — ERR_OUT_OF_MEMORY -1074396159 // Not enough memory for requested operation.
Technically, this simple code requires around 578 MB of memory (and works):
So, it looks like you have another code that has already occupied memory. This could easily happen when working with large sizes and arrays, and you don't have 500 MB of free memory available to save the image.
Consider avoiding arrays (ideally, use only IMAQ functions, as converting to/from arrays is an "expensive" operation); switch to 64-bit LabVIEW if you can and ensure that your PC has enough RAM installed. What OS and LabVIEW are you using?
04-08-2025 03:07 PM
I have since solved the problem. I don't understand why it is fixed, but it seems that passing large images in and out of sub VIs was my problem, as I put it all on the same level and I not longer run into this issue.