LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ Border size Error

Solved!
Go to solution

Hello,

I am currently working on an application, which is able to automatically find Gold Particles in electron microscopy- images.

To archieve that, I have built an image recognition Algorithm using NI Vision Assistant 2015 SP1 and integrated it into a UI based on LabView 2015.0f2 (x32).

 

The Algorithm works great for small testimages (ca 10400x6200px). But when it comes to working with the actual images (ca 18900 x 15500 px), the Algorithm quits with an Error.

The Error Occurs in IMAQ Border Size and has the ID -1074396159.

 

I'm using the german Version of LV, so I'll translate the Error description freely:

"IMAQ Vision: (Hex 0xBFF60401) There is not enough memory available for this task."

 

I checked it in the Taskmanager and when the error occurs, there are still like 40% of my RAM (8GB in total) free. So I assume the problem here is, that because the RAM is fragmented, there's not enough available RAM in one connected block to store the image array.

 

Any suggestions on what I can do? Splitting the Image in multiple parts works, but it's not a satisfying solution, as it definitely reduces the usability of my program. Also, slicing the image makes it hard for the Algorithm to find the Gold Particles close to the borders of these sliced images.

 

Is there a way to assign more Memory to LABView, for example as a Swap file?

I don't have a PC with more than 8GB RAM, but if I had one, do you think it would work then, or is there some kind of upper Limit to the Image size?

 

Also, as stated above I'm using the x32 Version of LABView, as I'm not sure whether the targeted system will be able to execute x64 applications or not.

 

I attached a Version of my Image recognition Algorithm to this post.

This is my first post here, so if anything is missing, please let me know it.

 

With best regards

 

Seine_Dudeheit

0 Kudos
Message 1 of 5
(3,590 Views)

Hello,

 

 

A simple math will show how much would you need to work with this image.

18900 * 15500 = 292950000 pixels

 

In LabVIEW , the RGB type is considered to use 32 bits per pixel. Therefore, for your image you will have 18900 * 15500 * 4 (bytes) = 1171800000 bytes = 1.17 GB.

 

You may suffer to work with those images in a 8 GB RAM computer.

 

I don't know how your detect points vi is working, but I noticed you have a few double 2d arrays coming out  of this VI. Just be aware that for every array a copy of the data is done.

 

I have never worked with images this big.

 

 

Guilherme Correa
0 Kudos
Message 2 of 5
(3,557 Views)
Solution
Accepted by Seine_Dudeheit

Those are, indeed, gigantic images, and memory space is likely to be a problem.  Here are some suggestions:

  • Do an "experiment" to divide each dimension by N (i.e. half-size, third-size, quarter-size), and see what the largest "fractional Image" you can process.  Let's assume you can work with half-size images.  To solve the "edge" problem, instead of working with 4 half-size images (upper left, upper right, lower left, lower right), work with nine, creating (for example) an upper middle that overlaps upper left and upper right.  You'll cover the "internal edges" with the overlap image, and should be able to "remove the duplicates" easily.
  • Alternatively, there is LabVIEW 64-bit that is specifically designed for problems that need a lot more memory.  I'm not certain, however, if there is a 64-bit version of LabVIEW Vision.  [Aha, a Web search finds that both LabVIEW Vision and IMAQdx/IMAQ have LabVIEW 64 versions.  It also reminds me that LabVIEW 32 on Windows 64 can only directly address 4GB of memory ...].

Bob Schor

0 Kudos
Message 3 of 5
(3,551 Views)

Even though these are fairly large images, they're well within the size that 32-bit LV can handle on an 8GB machine, especially as they look to be 8-bit images.  However you do need to be careful how you use memory, and probably need to rewrite the code exported from Vision Assistant which tends not to think about using memory efficiently.

 

The VI you attached doesn't have the image processing subVIs that it uses, so it's not possible to see what you're doing inside those that would require a lot of memory.  But the very first action inside the VI you posted is to make a copy of your image.  Is that necessary?

0 Kudos
Message 4 of 5
(3,538 Views)

Hello,

 

thank you very much for your quick replies!

The problem really was the fact, that I was running my Vi in a 32 Bits environment. After hours of struggling to download and install all the required LabVIEW x64 files, the Vi works perfectly now, even with the biggest image I have available.

I should have really come up with that by myself, shame on me Smiley Very Happy

 

Also, I am going to consider the other answers and try to optimize my Algorithm. Indeed, the algorithm produces way too much output, filling up my free space that way.

 

And GregS is right, too. Copying the image at the beginning of the Vi isn't necessary at all and actually it's a pretty dumb thing to do in that case Smiley Very Happy

 

So thanks again for your help and have a nice day!

0 Kudos
Message 5 of 5
(3,501 Views)