xFile Posted March 31, 2014 Report Share Posted March 31, 2014 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 Quote Link to comment
xFile Posted April 16, 2014 Author Report Share Posted April 16, 2014 It was an openCV code problem, creating the images in that way causes a memory leak. I needed to create first every images and point them to NULL. Now it is working great. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.