OpenCV '3.0.0-dev' with Python : Memory leak in While Loop cv2.imread() and cv2.VideoCapture.read() function -
OpenCV '3.0.0-dev' with Python : Memory leak in While Loop cv2.imread() and cv2.VideoCapture.read() function -
i have updated opencv 2.4.9 3.0.0-dev utilize new function in python interface used on opencv python tutorial in offcial site.
i utilize pre-built install http://sourceforge.net/projects/opencvlibrary/files/opencv-win/3.0-ocl-tech-preview/tp1/
but had issue photographic camera capturing , image read in while loop. example
import cv2 cap = cv2.videocapture(0) num = 0 while true: ret,frame = cap.read() cv2.imshow('video',frame) k = cv2.waitkey(1) if k == ord('q'): break elif k == ord('c'): cv2.imwrite('photo'+str(num)+'.jpg',frame) num += 1 cap.release() cv2.destroyallwindows()
and if alter cap.read() cv2.imread()
import cv2 num = 0 while true: frame = cv2.imread('d:/boat/work/hga_counter/test_photo/photo0.jpg') cv2.imshow('video',frame) k = cv2.waitkey(0) if k == ord('q'): break elif k == ord('c'): cv2.imwrite('photo'+str(num)+'.jpg',frame) num += 1 cv2.destroyallwindows()
memory used python.exe increasing on time until it's full.
is opencv installer outdated , have compile opencv updated source? or there other solution?
python opencv memory-leaks
Comments
Post a Comment