LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Max. image size NI Vision?

I'm working with very large images and processing them with Labview 8.2.1 and NI Vision 8.2.1 VIs. Some of these images may be as large 1 gbyte (binary images). Has anyone incountered any "insufficient memory for operation" issues? I am running a dual core Windows XP machine with 2 gbytes of physical memory.
 
Thanks,
Ron
 
Ps - I'm using search, blob analysis, erosion/dialation, image display and overlay functions
0 Kudos
Message 1 of 25
(5,089 Views)
Ron,

It sounds like the problem may be that the memory that is available on your machine is not contiguous.  Please check out this KnowledgeBase article:
KB 4DAAILSG: IMAQ Vision Not Enough Memory Error

Let me know if this helps.  It will also be helpful if you can decrease the image size, if this is possible in your application.


Regards,
Brandon M.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 25
(5,070 Views)

Brandon,

Thanks for the reply. I will look into it. Unfortunately, reducing the image size is not possible. Breaking it into pieces may be, but that would be painful.

Regards,

Ron

0 Kudos
Message 3 of 25
(5,069 Views)
I am having the same problem. I cannot even detect the error and recover gracefully; Labview crashes if I try to continue. Rebooting the machine in the event of an application crash is not really an option. Are there any utilities for Windows XP Pro 64 (the operating system I'm running under, 16GB RAM) to defragment memory in the fashion suggested by the knowledge base article?
Thanks,
- Davi
0 Kudos
Message 4 of 25
(5,030 Views)
Hi Davi,

I did some searching for third party programs, and the ones I found were all for 32 bit.  You could possibly look into an open source solution, and compile it for native 64 bit execution.  Does this crash occur when you first start the computer?  Do you have many programs running and allocating memory?

Regards,
Maclean G.
Applications Engineering
National Instruments
0 Kudos
Message 5 of 25
(5,002 Views)
I'm also checking to find solutions to open a 16-bit RGB, 500Mb image.  I think NI needs to do some homework and come up with a solution.  Image file sizes are only going to get larger and we (LV programmers) will need to have the resources to deal with them.  It is not a solution to say (1) reduce the file size or (2) use third party software.
0 Kudos
Message 6 of 25
(4,942 Views)
Hi SJT,

Are you also getting errors?  What does your application do that causes these errors?  Can you track them down to a single VI?

Thanks,
Maclean G.
Applications Engineering
National Instruments
0 Kudos
Message 7 of 25
(4,920 Views)
Hi, Thanks for the responses to this issue.

My speculation is that Labview implements IMAQ Image buffers using Win32 GDI buffers, which exhibit exactly the sort of size limited behavior we're running into.  It's not a hard limit, and it can vary somewhat, but the result is that Windows throws an error when the client application requests a buffer whose dimensions exceed ~15k x 15k pixels (for an 8 bit image).

In terms of reproducing this problem, it should be very easy for someone at National Instruments: create an 8 bit image using IMAQ Create, then use IMAQ SetImageSize to set the dimensions of the image to some large value, say 30k x 30k pixels (which is actually much smaller than the images I'm routinely acquiring these days).

If the above speculation is correct, the way for NI to deal with the problem is for IMAQ Image buffers *not* to use GDI buffers as the backing store for pixel data, but to allocate memory on their own.  This would let us have images up to 3GB in size (the 32bit Windows per-process memory limit), rather than the current ~225MB.
Message 8 of 25
(4,912 Views)
Hi Davi,

Thank you very much for the feedback!  I reproduced the error just as you said.  I will bring this up with R&D and look into a fix.

Regards,
Maclean G.
Applications Engineering
National Instruments
Message 9 of 25
(4,902 Views)
I created a 16-bit RGB image (in photoshop) that was 320Mb when saved as a tiff.  LabVIEW could not open this image.  The VI is attached.
0 Kudos
Message 10 of 25
(4,897 Views)