Ask Your Question

Revision history [back]

Python + OpenCV Memory Leak

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 !