Python + OpenCV Memory Leak

asked 2013-06-15 18:47:15 -0500

Kenzo gravatar image

Hi Iam in a robotics proyect in wich I have to make a robot play air hockey

I have practically finished the code but it consumes all my ram in matter of seconds

I have cornered the code so i can know where the memory leak comes from Memory leak appears as I get moments from the image

moments = cv.Moments(cv.GetMat(thresholded_img, 0)) where img is just in opencv image from cv.QueryFrame

I have read about this king of error in another languages like c++ and their solutions But sadly my project has to run in python, and since i can't manage memory and don't know how to fix this

Does anyone know how to fix this?

Thanks !

edit retag flag offensive close merge delete