03-14-2014 03:44 PM
Hi everybody, i'm trying to develop a system which can compute how the images are shifted among them.
Initially i started working in frequency domain, it works very well but it take a lot of time to have the pixel shift amount. Since i need a real time application i choose to work in time domain and doing a simple correlation between portion of the images.
I've written the code in OpenCV and with a DLL i execute this code through labview. The problem is that in order to feed the DLL with the previous frame i need to generate new images. I tried to free the memory calling the image with the same name using Imaq create and then link it to Imaq Dispose but it doesn't work.
I need to free the memory after the DLL compute everything and i cannot use sequence structure because i've noticed that with that structure i'm not able anymore to have the previous frame with the shift registers.
Can anybody help me?? I attached the .vi and the source code .cpp and the .dll
Thank you!
03-18-2014 11:42 AM
Hi xFile,
I don't understand what do you mean with "to free memory". What kind of problem are you experiencing? What kind of memory allocation do you have?
Did you try to build a state machine instead of using flat sequence? You can create an ending case in which you deallocate preallocated memory, by clearing every open image references.
Hoping this will help you,
best regards.
Cla_CUP
03-18-2014 11:50 AM
I'm experiencing this: if you run the .vi for more than 10 minutes it crashes because if you check from task manager the application, it is occupying all the memory.
What kind of blocks allows me to build a state machine?
Thank you.
03-18-2014 12:00 PM
No blocks,
you need to build a software architecture.
You can look @ this community example. In addition to this you can refer to LabVIEW template project, looking for Simple State Machine template project.
Best Regards.
Cla_CUP
03-18-2014 02:01 PM
I finished to realize the software with state machine but nothing changes. Actually i'm thinking that disposing the image by name reference doesn't work at all.
I attach the .vi.
thank you for the help.
03-31-2014 03:48 PM
Is there somebody who can solve this problem? I can't figure out what is the solution..