Ask Your Question

Revision history [back]

I did try that solution, but it does not work for me. I tried with the last git version of OpenCV (3.0.0 I think). Does anybody have some ideas how to solve it?

This is my memory and cpu/thread usage after few:

[videoCamera stop];
[videoCamera start];

image description image description

I did try that solution, but it does not work for me. I tried with the last git version of OpenCV (3.0.0 I think). - dev). Does anybody have some ideas how to solve it?

This Anyway, I discovered "pause" method in the CvAbstractCamera - which is my memory inherited by CvVideoCamera, and cpu/thread usage after few:it does exactly the same what I wanted from "stop" method. To use it I made the class which inherits from CvVideoCamera and wrote that in the MyCvVideoCamera.h:

[videoCamera stop];
[videoCamera start];
@interface MyCvVideoCamera : CvVideoCamera
- (void) pause;

image description image description

I did try that solution, but it does not work for me. I tried with the last git version of OpenCV (3.0.0 - dev). Does anybody have some ideas how to solve it?

Anyway, I discovered "pause" method (which is 100% safe to memory) in the CvAbstractCamera - which is inherited by CvVideoCamera, and it does exactly the same what I wanted from "stop" method. To use it I made the class which inherits from CvVideoCamera and wrote that in the MyCvVideoCamera.h:

@interface MyCvVideoCamera : CvVideoCamera
- (void) pause;

I did try that solution, but it does not work for me. I tried with the last git version of OpenCV (3.0.0 - dev). Does anybody have some ideas how to solve it?

Anyway, I discovered "pause" method (which is 100% safe to memory) in the CvAbstractCamera - which is inherited by CvVideoCamera, and it does exactly the same what I wanted from "stop" method. To use it I made the class which inherits from CvVideoCamera and wrote that in the MyCvVideoCamera.h:

@interface MyCvVideoCamera : CvVideoCamera
- (void) pause;

EDIT:

unfortunately it does not help me at all, I need stop function but it leaks memory like crazy, solution mentioned by bskrt does not work to me