Skip to content
Snippets Groups Projects
Commit be92256a authored by Andrews Cordolino Sobral's avatar Andrews Cordolino Sobral
Browse files

[important] Fixed memory leak on LB* algorithms

5 algorithms: LBAdaptiveSOM, LBFuzzyAdaptiveSOM, LBFuzzyGaussian, LBMixtureOfGaussians,LBSimpleGaussian
parent 5579b0be
Branches
Tags
No related merge requests found
......@@ -54,6 +54,7 @@ void LBAdaptiveSOM::process(const cv::Mat &img_input, cv::Mat &img_output, cv::M
img_foreground.copyTo(img_output);
img_background.copyTo(img_bgmodel);
cvReleaseImage(&frame);
firstTime = false;
}
......
......@@ -53,6 +53,7 @@ void LBFuzzyAdaptiveSOM::process(const cv::Mat &img_input, cv::Mat &img_output,
img_foreground.copyTo(img_output);
img_background.copyTo(img_bgmodel);
cvReleaseImage(&frame);
firstTime = false;
}
......
......@@ -52,6 +52,7 @@ void LBFuzzyGaussian::process(const cv::Mat &img_input, cv::Mat &img_output, cv:
img_foreground.copyTo(img_output);
img_background.copyTo(img_bgmodel);
cvReleaseImage(&frame);
firstTime = false;
}
......
......@@ -52,6 +52,7 @@ void LBMixtureOfGaussians::process(const cv::Mat &img_input, cv::Mat &img_output
img_foreground.copyTo(img_output);
img_background.copyTo(img_bgmodel);
cvReleaseImage(&frame);
firstTime = false;
}
......
......@@ -50,6 +50,7 @@ void LBSimpleGaussian::process(const cv::Mat &img_input, cv::Mat &img_output, cv
img_foreground.copyTo(img_output);
img_background.copyTo(img_bgmodel);
cvReleaseImage(&frame);
firstTime = false;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment