lk_homogrraphy.py sample leaks memory (Bug #3457)
Description
the lk_homography.py sample leaks memory with both camera stream or video input.
I commented out all visualisation and did not start tracking and it still leaks.
That leads me to believe that the leak occurs either in goodFeaturesToTrack or reading from VideoCapture.
I only tried with the current git version.
Associated revisions
Merge pull request #3457 from burun:patch-1
History
Updated by Dominique M. about 11 years ago
I tried to narrow down the issue and I think the leak occurs in cvtColor:
this does not run out of memory (at least not that fast):
while(True): p = cv2.goodFeaturesToTrack(gray, maxCorners=2000, minDistance=8, blockSize=19, qualityLevel=0.01)
but this does (even faster without goodFeaturesToTrack):
while(True): gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) p = cv2.goodFeaturesToTrack(gray, maxCorners=2000, minDistance=8, blockSize=19, qualityLevel=0.01)
Updated by Dominique M. about 11 years ago
The leak does not occur in 2.4.7
Updated by Anna Kogan about 11 years ago
Hello Dominique,
Thank you for reporting the problem. If you could work on a solution on your, a contribution to the OpenCV repo(see How_to_contribute) would be very appreciated!
- Status changed from New to Open
Updated by Alexander Smorkalov about 11 years ago
- Category set to python bindings
- Target version set to 3.0-alpha
- Difficulty set to Medium
Updated by Maksim Shabunin almost 10 years ago
- Target version changed from 3.0-alpha to 3.0
Updated by Maksim Shabunin almost 10 years ago
Dominique M. wrote:
I tried to narrow down the issue and I think the leak occurs in cvtColor:
this does not run out of memory (at least not that fast):
[...]but this does (even faster without goodFeaturesToTrack):
[...]
I've tried to reproduce this issue with the latest 3.0-rc1 release, and it does not leak with this minimal example.
Can you, please, try to reproduce it with 3.0-rc1 version?
- Status changed from Open to Incomplete
- Assignee set to Maksim Shabunin
Updated by Maksim Shabunin over 9 years ago
Issue has been transferred to GitHub: https://github.com/Itseez/opencv/issues/4670