Jump to content

Imaq Dispose and memory management


Recommended Posts

Hi everybody, i'm new to this forum!

 

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 takes 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.

 

I tried to implement a state machine but it doesn't work.. After a 5 mins of execution, i see from task manager that the occupied memory is growing until crash.

 

Can anybody help me?? I attached 3 versions of .vi and in some of them i don't generate new images but i use every time the same image and the problem is still present. Are also attached the source code .cpp and the .dll. If you want to run, just erase the section of data output (i need to move some mirrors in order to track the image).

 

Thanks for the help.

 

Best.test.zip

Link to comment
  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.