03-07-2010 10:03 AM
Hi everyone,
My labview applications is running out of memory.
I need some tips on how to minimize memory usage when editing images. Upon every iteration of my code I take the background jpg image and add various lines/circles and subimages (smaller jpgs which I insert into the pixel array of the original image).
I have used shift registers on alot of the numerically data to allow updates to replace previous data, rather than making copies. BUT can this been done with images? reuse their memory space.. which I could just load in the base image every time?
I would like to post some code, but I am not to proud of its looks at the moment!
I am also wary that I am passing around the image out data of the read jpeg VI.
Maybe I will post some code, if someone is willing to take a look..
It would be a big favor if someone can spot what is causing this,
James
03-07-2010 02:07 PM
Hillman wrote:Hi everyone,
My labview applications is running out of memory.
I need some tips on how to minimize memory usage This KB is a great place to start!
I have used shift registers on alot of the numerically data to allow updates to replace previous data, rather than making copies. Are you using the inplace functions to operate on the data set?
I would like to post some code, but I am not to proud of its looks at the moment!(I bet we've seen worse. if its commented at all we can probably follow it. Please post something with comments on where you are bogging down. Or we can't do more than Point you to the KB and the Inplace functions. see below
I am also wary that I am passing around the image out data of the read jpeg VI. (Looking through the KB I linked. Could you operate on "Chunks" of the image?)
Maybe I will post some code, if someone is willing to take a look.. (ok i'm someone )
It would be a big favor if someone can spot what is causing this, (Of course, I'd need something to spot it in)
James
Comments inside the quote.
James- I hope this starts to help. Post back when you've reviewed the KB article (it really is a great KB )
03-08-2010 02:42 AM
Hi,
if you have a picture indicator on the front panel that represents the jpeg and with every operation on it the application refresh the indicator I also noticed an increase in memory usage. If this is the case make a test by changing the indicator to hidden and look at memory status.
If you noticed that there is no memory issues, revert the indicator and test the application with the proc manager example from http://forums.ni.com/ni/board/message?board.id=170&message.id=478314#M478314
maybe this will help you
cosmin