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() {
mGray.release();
mRgba.release();
}
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.