diff --git a/examples/Demo2.cpp b/examples/Demo2.cpp
index 2c4b8ad9db427a0599f16f31be9bc4af06996da4..197d4e073658591f7f576c88197c31f788ed9e8c 100644
--- a/examples/Demo2.cpp
+++ b/examples/Demo2.cpp
@@ -22,7 +22,7 @@ int main(int argc, char **argv)
   /* Background Subtraction Methods */
   auto algorithmsName = BGS_Factory::Instance()->GetRegisteredAlgorithmsName();
   
-  std::cout << "List of available algorithms:" << std::endl;
+  std::cout << "List of available algorithms (" << algorithmsName.size() << "):" << std::endl;
   std::copy(algorithmsName.begin(), algorithmsName.end(), std::ostream_iterator<std::string>(std::cout, "\n"));
   
   for (const std::string& algorithmName : algorithmsName)
@@ -40,7 +40,7 @@ int main(int argc, char **argv)
       std::stringstream ss;
       ss << frame_counter;
       auto fileName = baseDir + "/" + ss.str() + ".png";
-      std::cout << "reading " << fileName << std::endl;
+      // std::cout << "reading " << fileName << std::endl;
 
       auto img_input = cv::imread(fileName, CV_LOAD_IMAGE_COLOR);
 
diff --git a/src/algorithms/DPAdaptiveMedian.cpp b/src/algorithms/DPAdaptiveMedian.cpp
index e6fd808d823ba3cbbd8dd885558020cf1cd6a241..5c34d3f538d2ba81c20634b7dc5a27c7da8b1c80 100644
--- a/src/algorithms/DPAdaptiveMedian.cpp
+++ b/src/algorithms/DPAdaptiveMedian.cpp
@@ -22,7 +22,7 @@ void DPAdaptiveMedian::process(const cv::Mat &img_input, cv::Mat &img_output, cv
   init(img_input, img_output, img_bgmodel);
 
   IplImage _frame = cvIplImage(img_input);
-  frame_data = cvCloneImage(&(IplImage)_frame);
+  frame_data = cvCloneImage(&_frame);
 
   if (firstTime) {
     int width = img_input.size().width;
diff --git a/src/algorithms/DPEigenbackground.cpp b/src/algorithms/DPEigenbackground.cpp
index 2627cdc1deffc6632f58323a557463cd38b4b1e1..9ddc1b92245f3c0c6a1582ce8f70009cd8f0f232 100644
--- a/src/algorithms/DPEigenbackground.cpp
+++ b/src/algorithms/DPEigenbackground.cpp
@@ -22,7 +22,7 @@ void DPEigenbackground::process(const cv::Mat &img_input, cv::Mat &img_output, c
   init(img_input, img_output, img_bgmodel);
 
   IplImage _frame = cvIplImage(img_input);
-  frame_data = cvCloneImage(&(IplImage)_frame);
+  frame_data = cvCloneImage(&_frame);
 
   if (firstTime) {
     int width = img_input.size().width;
diff --git a/src/algorithms/DPGrimsonGMM.cpp b/src/algorithms/DPGrimsonGMM.cpp
index 3febe641c6aaa25c17e69d502ded562e789f856d..d9d8e4c5adb8f41112beae664cba54498f9e9a1b 100644
--- a/src/algorithms/DPGrimsonGMM.cpp
+++ b/src/algorithms/DPGrimsonGMM.cpp
@@ -22,7 +22,7 @@ void DPGrimsonGMM::process(const cv::Mat &img_input, cv::Mat &img_output, cv::Ma
   init(img_input, img_output, img_bgmodel);
 
   IplImage _frame = cvIplImage(img_input);
-  frame_data = cvCloneImage(&(IplImage)_frame);
+  frame_data = cvCloneImage(&_frame);
 
   if (firstTime) {
     int width = img_input.size().width;
diff --git a/src/algorithms/DPMean.cpp b/src/algorithms/DPMean.cpp
index 673e9df39e67032b0f7caccd2890f4d5707829de..cc106faa6c0e2d36e1f1520b991c1e0385153f4b 100644
--- a/src/algorithms/DPMean.cpp
+++ b/src/algorithms/DPMean.cpp
@@ -22,7 +22,7 @@ void DPMean::process(const cv::Mat &img_input, cv::Mat &img_output, cv::Mat &img
   init(img_input, img_output, img_bgmodel);
 
   IplImage _frame = cvIplImage(img_input);
-  frame_data = cvCloneImage(&(IplImage)_frame);
+  frame_data = cvCloneImage(&_frame);
 
   if (firstTime) {
     int width = img_input.size().width;
diff --git a/src/algorithms/DPPratiMediod.cpp b/src/algorithms/DPPratiMediod.cpp
index 12ea039865ff52d43e5a8de25ee8ab70e72c71cc..17c9f98505be4c88c4b2dd01c902e0c8c4e3796e 100644
--- a/src/algorithms/DPPratiMediod.cpp
+++ b/src/algorithms/DPPratiMediod.cpp
@@ -22,7 +22,7 @@ void DPPratiMediod::process(const cv::Mat &img_input, cv::Mat &img_output, cv::M
   init(img_input, img_output, img_bgmodel);
 
   IplImage _frame = cvIplImage(img_input);
-  frame_data = cvCloneImage(&(IplImage)_frame);
+  frame_data = cvCloneImage(&_frame);
 
   if (firstTime) {
     int width = img_input.size().width;
diff --git a/src/algorithms/DPTexture.cpp b/src/algorithms/DPTexture.cpp
index 0959339bf7df1907683ae18f2d25bb86f3398b2e..ec5dd3e8b3d170b0024cd132001034deb6a4ca9a 100644
--- a/src/algorithms/DPTexture.cpp
+++ b/src/algorithms/DPTexture.cpp
@@ -30,7 +30,7 @@ void DPTexture::process(const cv::Mat &img_input, cv::Mat &img_output, cv::Mat &
   init(img_input, img_output, img_bgmodel);
 
   IplImage _frame = cvIplImage(img_input);
-  frame = cvCloneImage(&(IplImage)_frame);
+  frame = cvCloneImage(&_frame);
 
   if (firstTime) {
     width = img_input.size().width;
diff --git a/src/algorithms/DPWrenGA.cpp b/src/algorithms/DPWrenGA.cpp
index 971e4d4db931978c04e828187c1748a33a383b4e..05b35a6803d527d53701bdcd95c59d485e88cfb5 100644
--- a/src/algorithms/DPWrenGA.cpp
+++ b/src/algorithms/DPWrenGA.cpp
@@ -22,7 +22,7 @@ void DPWrenGA::process(const cv::Mat &img_input, cv::Mat &img_output, cv::Mat &i
   init(img_input, img_output, img_bgmodel);
 
   IplImage _frame = cvIplImage(img_input);
-  frame_data = cvCloneImage(&(IplImage)_frame);
+  frame_data = cvCloneImage(&_frame);
 
   if (firstTime) {
     int width = img_input.size().width;
diff --git a/src/algorithms/DPZivkovicAGMM.cpp b/src/algorithms/DPZivkovicAGMM.cpp
index 1d2efbe9105a610b158aec1974ea3f2504b8599b..a087b4fbe7483f6ecc82a92290b23ea1910bac81 100644
--- a/src/algorithms/DPZivkovicAGMM.cpp
+++ b/src/algorithms/DPZivkovicAGMM.cpp
@@ -22,7 +22,7 @@ void DPZivkovicAGMM::process(const cv::Mat &img_input, cv::Mat &img_output, cv::
   init(img_input, img_output, img_bgmodel);
 
   IplImage _frame = cvIplImage(img_input);
-  frame_data = cvCloneImage(&(IplImage)_frame);
+  frame_data = cvCloneImage(&_frame);
 
   if (firstTime) {
     int width = img_input.size().width;
diff --git a/src/algorithms/FuzzyChoquetIntegral.cpp b/src/algorithms/FuzzyChoquetIntegral.cpp
index 808c87460d54d93e51acf21d44e550018bfcb886..96fa890b6ecc182cd6aac2b65da597ed773d40a3 100644
--- a/src/algorithms/FuzzyChoquetIntegral.cpp
+++ b/src/algorithms/FuzzyChoquetIntegral.cpp
@@ -74,16 +74,16 @@ void FuzzyChoquetIntegral::process(const cv::Mat &img_input, cv::Mat &img_output
     cv::cvtColor(img_background_f3, img_background_f1, CV_BGR2GRAY);
 
     IplImage _input_f3 = cvIplImage(img_input_f3);
-    IplImage* input_f3 = cvCloneImage(&(IplImage)_input_f3);
+    IplImage* input_f3 = cvCloneImage(&_input_f3);
 
     IplImage _input_f1 = cvIplImage(img_input_f1);
-    IplImage* input_f1 = cvCloneImage(&(IplImage)_input_f1);
+    IplImage* input_f1 = cvCloneImage(&_input_f1);
 
     IplImage _background_f3 = cvIplImage(img_background_f3);
-    IplImage* background_f3 = cvCloneImage(&(IplImage)_background_f3);
+    IplImage* background_f3 = cvCloneImage(&_background_f3);
 
     IplImage _background_f1 = cvIplImage(img_background_f1);
-    IplImage* background_f1 = cvCloneImage(&(IplImage)_background_f1);
+    IplImage* background_f1 = cvCloneImage(&_background_f1);
 
     IplImage* lbp_input_f1 = cvCreateImage(cvSize(input_f1->width, input_f1->height), IPL_DEPTH_32F, 1);
     cvSetZero(lbp_input_f1);
diff --git a/src/algorithms/FuzzySugenoIntegral.cpp b/src/algorithms/FuzzySugenoIntegral.cpp
index 6043d985ddfb4aab7a954746b6c068aec127f195..a43dfbaf16b01bc344c1d3c9e3439d089a02d566 100644
--- a/src/algorithms/FuzzySugenoIntegral.cpp
+++ b/src/algorithms/FuzzySugenoIntegral.cpp
@@ -73,16 +73,16 @@ void FuzzySugenoIntegral::process(const cv::Mat &img_input, cv::Mat &img_output,
     cv::cvtColor(img_background_f3, img_background_f1, CV_BGR2GRAY);
 
     IplImage _input_f3 = cvIplImage(img_input_f3);
-    IplImage* input_f3 = cvCloneImage(&(IplImage)_input_f3);
+    IplImage* input_f3 = cvCloneImage(&_input_f3);
 
     IplImage _input_f1 = cvIplImage(img_input_f1);
-    IplImage* input_f1 = cvCloneImage(&(IplImage)_input_f1);
+    IplImage* input_f1 = cvCloneImage(&_input_f1);
 
     IplImage _background_f3 = cvIplImage(img_background_f3);
-    IplImage* background_f3 = cvCloneImage(&(IplImage)_background_f3);
+    IplImage* background_f3 = cvCloneImage(&_background_f3);
 
     IplImage _background_f1 = cvIplImage(img_background_f1);
-    IplImage* background_f1 = cvCloneImage(&(IplImage)_background_f1);
+    IplImage* background_f1 = cvCloneImage(&_background_f1);
 
     IplImage* lbp_input_f1 = cvCreateImage(cvSize(input_f1->width, input_f1->height), IPL_DEPTH_32F, 1);
     cvSetZero(lbp_input_f1);
diff --git a/src/algorithms/LBAdaptiveSOM.cpp b/src/algorithms/LBAdaptiveSOM.cpp
index 76efbc1343f884d1b5e16cebf2120c29d6950a63..afc0292a8ad0c5c6907657a9e9558d37445d8be1 100644
--- a/src/algorithms/LBAdaptiveSOM.cpp
+++ b/src/algorithms/LBAdaptiveSOM.cpp
@@ -24,7 +24,7 @@ void LBAdaptiveSOM::process(const cv::Mat &img_input, cv::Mat &img_output, cv::M
   init(img_input, img_output, img_bgmodel);
 
   IplImage _frame = cvIplImage(img_input);
-  IplImage* frame = cvCloneImage(&(IplImage)_frame);
+  IplImage* frame = cvCloneImage(&_frame);
 
   if (firstTime) {
     int w = img_input.size().width;
diff --git a/src/algorithms/LBFuzzyAdaptiveSOM.cpp b/src/algorithms/LBFuzzyAdaptiveSOM.cpp
index 8fb0ccb81e1bceebc566b4b6ecfd325d669d56ee..00047af7484ad2605c8c25a63293f04c1a202a2f 100644
--- a/src/algorithms/LBFuzzyAdaptiveSOM.cpp
+++ b/src/algorithms/LBFuzzyAdaptiveSOM.cpp
@@ -23,7 +23,7 @@ void LBFuzzyAdaptiveSOM::process(const cv::Mat &img_input, cv::Mat &img_output,
   init(img_input, img_output, img_bgmodel);
 
   IplImage _frame = cvIplImage(img_input);
-  IplImage* frame = cvCloneImage(&(IplImage)_frame);
+  IplImage* frame = cvCloneImage(&_frame);
 
   if (firstTime) {
     int w = img_input.size().width;
diff --git a/src/algorithms/LBFuzzyGaussian.cpp b/src/algorithms/LBFuzzyGaussian.cpp
index e175d590d0410b12babc18f8f969952c93b93856..00f3fef527185cb58a15d6ff9c7a656e13e88d89 100644
--- a/src/algorithms/LBFuzzyGaussian.cpp
+++ b/src/algorithms/LBFuzzyGaussian.cpp
@@ -23,7 +23,7 @@ void LBFuzzyGaussian::process(const cv::Mat &img_input, cv::Mat &img_output, cv:
   init(img_input, img_output, img_bgmodel);
 
   IplImage _frame = cvIplImage(img_input);
-  IplImage* frame = cvCloneImage(&(IplImage)_frame);
+  IplImage* frame = cvCloneImage(&_frame);
 
   if (firstTime) {
     int w = img_input.size().width;
diff --git a/src/algorithms/LBMixtureOfGaussians.cpp b/src/algorithms/LBMixtureOfGaussians.cpp
index d949adb5dd633a668800d8b80a793f0c73e9c87b..82d9f1ebfa645a7233997f32d7f0888d263cc540 100644
--- a/src/algorithms/LBMixtureOfGaussians.cpp
+++ b/src/algorithms/LBMixtureOfGaussians.cpp
@@ -23,7 +23,7 @@ void LBMixtureOfGaussians::process(const cv::Mat &img_input, cv::Mat &img_output
   init(img_input, img_output, img_bgmodel);
 
   IplImage _frame = cvIplImage(img_input);
-  IplImage* frame = cvCloneImage(&(IplImage)_frame);
+  IplImage* frame = cvCloneImage(&_frame);
 
   if (firstTime) {
     int w = img_input.size().width;
diff --git a/src/algorithms/LBSimpleGaussian.cpp b/src/algorithms/LBSimpleGaussian.cpp
index 67641198de2c341877da30c3dfccecfb5cb98c75..5df2c8127ebe10d9fabaf45f3f84b60a47399222 100644
--- a/src/algorithms/LBSimpleGaussian.cpp
+++ b/src/algorithms/LBSimpleGaussian.cpp
@@ -22,7 +22,7 @@ void LBSimpleGaussian::process(const cv::Mat &img_input, cv::Mat &img_output, cv
   init(img_input, img_output, img_bgmodel);
 
   IplImage _frame = cvIplImage(img_input);
-  IplImage* frame = cvCloneImage(&(IplImage)_frame);
+  IplImage* frame = cvCloneImage(&_frame);
 
   if (firstTime) {
     int w = img_input.size().width;
diff --git a/src/algorithms/MultiCue.cpp b/src/algorithms/MultiCue.cpp
index 8f7e0acd6bdb9c328213e4430d5a0544ec50b4a6..54cedb7ba7c4aea1ad16ef32ddf91c718b094e69 100644
--- a/src/algorithms/MultiCue.cpp
+++ b/src/algorithms/MultiCue.cpp
@@ -75,7 +75,7 @@ void MultiCue::process(const cv::Mat &img_input, cv::Mat &img_output, cv::Mat &i
 
   // Step 1: Background Modeling
   IplImage _frame = cvIplImage(img_input);
-  IplImage* frame = cvCloneImage(&(IplImage)_frame);
+  IplImage* frame = cvCloneImage(&_frame);
 
   int width = img_input.size().width;
   int height = img_input.size().height;
@@ -540,7 +540,7 @@ void MultiCue::GaussianFiltering(IplImage* frame, uchar*** aFilteredFrame) {
 
     //Store results into aFilteredFrame[][][]
     IplImage _img = cvIplImage(temp_img);
-    IplImage* img = cvCloneImage(&(IplImage)_img);
+    IplImage* img = cvCloneImage(&_img);
 
     //int iWidthStep = img->widthStep;
 
diff --git a/src/algorithms/MultiLayer.cpp b/src/algorithms/MultiLayer.cpp
index de972f1c2e3357db0df20f77a907efb7918e2662..397b85181f0e67420623a401258e5e56dda0850f 100644
--- a/src/algorithms/MultiLayer.cpp
+++ b/src/algorithms/MultiLayer.cpp
@@ -59,7 +59,7 @@ void MultiLayer::process(const cv::Mat &img_input, cv::Mat &img_output, cv::Mat
       std::cout << algorithmName + " in DETECT mode" << std::endl;
     
     IplImage _frame = cvIplImage(img_input);
-    org_img = cvCloneImage(&(IplImage)_frame);
+    org_img = cvCloneImage(&_frame);
 
     fg_img = cvCreateImage(img_size, org_img->depth, org_img->nChannels);
     bg_img = cvCreateImage(img_size, org_img->depth, org_img->nChannels);
@@ -182,7 +182,7 @@ void MultiLayer::process(const cv::Mat &img_input, cv::Mat &img_output, cv::Mat
   }
 
   IplImage _frame = cvIplImage(img_input);
-  IplImage* img = cvCloneImage(&(IplImage)_frame);
+  IplImage* img = cvCloneImage(&_frame);
 
   BGS->SetRGBInputImage(img);
   BGS->Process();
diff --git a/src/algorithms/T2FGMM_UM.cpp b/src/algorithms/T2FGMM_UM.cpp
index a3bff750f7902dc7207031c1a38bf4ec335f9891..c04282fe6e1e6209eb6a6fab940cc3d84eac5297 100644
--- a/src/algorithms/T2FGMM_UM.cpp
+++ b/src/algorithms/T2FGMM_UM.cpp
@@ -22,7 +22,7 @@ void T2FGMM_UM::process(const cv::Mat &img_input, cv::Mat &img_output, cv::Mat &
   init(img_input, img_output, img_bgmodel);
 
   IplImage _frame = cvIplImage(img_input);
-  frame_data = cvCloneImage(&(IplImage)_frame);
+  frame_data = cvCloneImage(&_frame);
 
   if (firstTime) {
     int width = img_input.size().width;
diff --git a/src/algorithms/T2FGMM_UV.cpp b/src/algorithms/T2FGMM_UV.cpp
index c366f42cb4b3011e34a37af57ea6bd47d1b94c7f..c27baccf67d92a16a0d44344d5eb2b724aba7973 100644
--- a/src/algorithms/T2FGMM_UV.cpp
+++ b/src/algorithms/T2FGMM_UV.cpp
@@ -22,7 +22,7 @@ void T2FGMM_UV::process(const cv::Mat &img_input, cv::Mat &img_output, cv::Mat &
   init(img_input, img_output, img_bgmodel);
 
   IplImage _frame = cvIplImage(img_input);
-  frame_data = cvCloneImage(&(IplImage)_frame);
+  frame_data = cvCloneImage(&_frame);
 
   if (firstTime) {
     int width = img_input.size().width;
diff --git a/src/algorithms/T2FMRF_UM.cpp b/src/algorithms/T2FMRF_UM.cpp
index 207ceab46491b7f6c5a577d83cb0df40d8f5fa8e..062e312028c750b671c34a3147105013e12eebd1 100644
--- a/src/algorithms/T2FMRF_UM.cpp
+++ b/src/algorithms/T2FMRF_UM.cpp
@@ -22,7 +22,7 @@ void T2FMRF_UM::process(const cv::Mat &img_input, cv::Mat &img_output, cv::Mat &
   init(img_input, img_output, img_bgmodel);
 
   IplImage _frame = cvIplImage(img_input);
-  frame_data = cvCloneImage(&(IplImage)_frame);
+  frame_data = cvCloneImage(&_frame);
 
   if (firstTime) {
     int width = img_input.size().width;
diff --git a/src/algorithms/T2FMRF_UV.cpp b/src/algorithms/T2FMRF_UV.cpp
index ddfb9d75d4e38c86a4e8a4c4fd2d5eb667c4d2a1..c5f90f8ff5c3b8d72f15cdab09f1abdb5b32ea98 100644
--- a/src/algorithms/T2FMRF_UV.cpp
+++ b/src/algorithms/T2FMRF_UV.cpp
@@ -22,7 +22,7 @@ void T2FMRF_UV::process(const cv::Mat &img_input, cv::Mat &img_output, cv::Mat &
   init(img_input, img_output, img_bgmodel);
 
   IplImage _frame = cvIplImage(img_input);
-  frame_data = cvCloneImage(&(IplImage)_frame);
+  frame_data = cvCloneImage(&_frame);
 
   if (firstTime) {
     int width = img_input.size().width;
diff --git a/src/algorithms/VuMeter.cpp b/src/algorithms/VuMeter.cpp
index bd84edf501f7c9e95267c1343f860034c8843e56..b0d48992886a39bc52892d45748335f2684293c1 100644
--- a/src/algorithms/VuMeter.cpp
+++ b/src/algorithms/VuMeter.cpp
@@ -25,7 +25,7 @@ void VuMeter::process(const cv::Mat &img_input, cv::Mat &img_output, cv::Mat &im
   init(img_input, img_output, img_bgmodel);
 
   IplImage _frame = cvIplImage(img_input);
-  frame = cvCloneImage(&(IplImage)_frame);
+  frame = cvCloneImage(&_frame);
 
   if (firstTime) {
     int w = img_input.size().width;