How to destroy frames every minute after processing : OpenCV4Android

asked 2014-09-06 00:29:18 -0500

Punith K gravatar image

updated 2014-09-06 00:31:04 -0500

I'm working on OpenCV project using android, where the yawning detection is done in,

public Mat onCameraFrame(CvCameraViewFrame inputFrame){

        //Yawning detection done here using detectMultiScale() method
        //code is working fine

As the detection continues application starts slowing down, because it is storing the frames in the application ( After installation application size is 2 Mb, after few minutes of detection size grows to 30 Mb and growing). The frames are released using,

public void onCameraViewStopped() {


But I want my app to run for long time without any lagging, Actually it is Real-time app to detect yawning.

I wanted to release the each frame mRgba or mGray every minute instead of releasing them once camera stopped.

Is there any possible solution that enables us to destroy frames every minute.

Can I release frames just after processing them.

Please do help me, please do not close this question.

edit retag flag offensive close merge delete


What exactly are you doing with mGray and mRgba? You can release them when you finish with them.

itay gravatar imageitay ( 2014-09-30 05:44:12 -0500 )edit