LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

imaq image display memory usage

Solved!
Go to solution

Hi,

 

I wonder how much memory is used when updating an imaq image display.

I need to display images (512x512 in size) acquired by a camera in real time. But I don't necessarily need to display every single one of them if that can save me some memory. The camera is running at 50fps and I can live with 5fps display rate.

Right now my image display is update the buffer (updated at 50fps) continuously (snapshot mode disabled). I guess I have 3 options:

1. Use snapshot mode and explicitly tell the display to update. Every time the display is updated, a copy of the image is created. But I assume the previous copy is destroyed at the next update. So this method cost one extra copy of the image in memory.

2. Create an extra copy of image which is only updated at 5fps and connect it to the image display (snapshot mode disabled). I think this is equivalent to method 1 in terms of memory usage.

3. As is. No extra copy of image is in memory. But the display is updated at 50fps.

 

Which is more costly, updating the display 10 times faster or holding an extra copy of the same size image in memory?

 

Thanks!

0 Kudos
Message 1 of 5
(2,530 Views)
Solution
Accepted by topic author jy_mcts

It is not really a memory issue: You have one Image Display indicator. Displaying an image requires some additional resources but there will be no continous memory allocation! Once the resources are allocated, the memory usage of your application will remain stable. (If not, something goes wrong and need to be identified and fixed.)

0 Kudos
Message 2 of 5
(2,526 Views)

Thanks! That makes sense.

One of the issue I have now is that sometimes I don't have enough time to process each image before the next one becomes available. So as far as my RAM can handle the extra copy of the image, which is certainly true, I can update the display less to gain some processing time?

0 Kudos
Message 3 of 5
(2,524 Views)

Good idea. If your code is late (= there is more than 1 image avaiable for analysis) you could skip the write to the Image Display indicator. Not updating the Image Display usually gives you additional CPU resources and your analysis should catch up.

0 Kudos
Message 4 of 5
(2,520 Views)

Thanks!

0 Kudos
Message 5 of 5
(2,516 Views)