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

[important] Fixed memory leak on Fuzzy-based algorithms

2 algorithms: FuzzyChoquetIntegral, FuzzySugenoIntegral
parent 5ab4e955
No related branches found
No related tags found
No related merge requests found
...@@ -152,6 +152,10 @@ void FuzzyChoquetIntegral::process(const cv::Mat &img_input, cv::Mat &img_output ...@@ -152,6 +152,10 @@ void FuzzyChoquetIntegral::process(const cv::Mat &img_input, cv::Mat &img_output
cv::Mat img_updated_background_f3 = cv::cvarrToMat(updated_background_f3); cv::Mat img_updated_background_f3 = cv::cvarrToMat(updated_background_f3);
img_updated_background_f3.copyTo(img_background_f3); img_updated_background_f3.copyTo(img_background_f3);
cvReleaseImage(&input_f3);
cvReleaseImage(&input_f1);
cvReleaseImage(&background_f3);
cvReleaseImage(&background_f1);
cvReleaseImage(&lbp_input_f1); cvReleaseImage(&lbp_input_f1);
cvReleaseImage(&lbp_background_f1); cvReleaseImage(&lbp_background_f1);
cvReleaseImage(&sim_texture_f1); cvReleaseImage(&sim_texture_f1);
......
...@@ -151,6 +151,10 @@ void FuzzySugenoIntegral::process(const cv::Mat &img_input, cv::Mat &img_output, ...@@ -151,6 +151,10 @@ void FuzzySugenoIntegral::process(const cv::Mat &img_input, cv::Mat &img_output,
cv::Mat img_updated_background_f3 = cv::cvarrToMat(updated_background_f3); cv::Mat img_updated_background_f3 = cv::cvarrToMat(updated_background_f3);
img_updated_background_f3.copyTo(img_background_f3); img_updated_background_f3.copyTo(img_background_f3);
cvReleaseImage(&input_f3);
cvReleaseImage(&input_f1);
cvReleaseImage(&background_f3);
cvReleaseImage(&background_f1);
cvReleaseImage(&lbp_input_f1); cvReleaseImage(&lbp_input_f1);
cvReleaseImage(&lbp_background_f1); cvReleaseImage(&lbp_background_f1);
cvReleaseImage(&sim_texture_f1); cvReleaseImage(&sim_texture_f1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment