12-10-2016 11:29 AM
Hi,
I am trying to load large images using the LabVIEW Vision Development Module. Specifically, I am using the IMAQ ReadFile.vi to load an image that is 22108x17615 pixels (389,432,420 total pixels) and has a pixel depth of 32 bits. When I try to load this image I get the error -1074396159 (not enough memory). Doing some rough math, I should need approximately 1.6 GB of RAM to load the image (not including any overhead).
I am running this code on a Win 10 64 bit computer with 16 GB of RAM. I should be able to allocate up to 4 GB for a 32 bit application on Win 10 64 bit. I understand that for images, this must be a contiguous block of memory and this is likely the problem.
Subsequently, I tried to load this image using GIMP and it loaded successfully. I looked at the windows task manager and GIMP was using almost 4GB of memory.
I am assuming that GIMP requests a block of continuous memory to load the image. I am also assuming that the OS has to rearrange memory to accommodate this request. Again, these are assumptions because I don’t know what’s going on under the hood.
Here’s my question: Is there a way to make a similar request through the Vision Development Module or LabVIEW? Ultimately, I just need to be able to load this large image in LabVIEW.
Thanks in advance for your help.
Brooks
12-10-2016 11:49 AM
You are, with this single data structure, perilously close to the 4GB memory space for a 32-bit program (I'm assuming you are running LabVIEW 32-bit). This may be a situation where you want to run LabVIEW 64-bit, which seems to support the Vision Development Toolkit.
Bob Schor
12-16-2016 02:53 PM
Thanks for your recommendation Bob. I am upgrading the source code to LabVIEW 2016 64-bit. However, I would still like to know if anyone knows how to request the OS to give a contiguous block of memory large enough to load these large images.
Thanks in advance,
Brooks
12-19-2016 08:54 AM
Hi Brooks_LV
I'm not all that familiar with the issue you are running into, but I did some research to see if I could find documentation - I think that this white paper may help out:
Managing Large Data Sets in LabVIEW
Regards,
George B.
Application Engineering
National Instruments