Skip to content
Snippets Groups Projects
Commit 6c2b57a0 authored by Holger Friedrich's avatar Holger Friedrich
Browse files

rollback accidental changes

parent 236d66c2
Branches
Tags
No related merge requests found
...@@ -597,9 +597,7 @@ void MotionDetection::DetectMotionsHU(MEImage& image) ...@@ -597,9 +597,7 @@ void MotionDetection::DetectMotionsHU(MEImage& image)
void MotionDetection::UpdateModelHU(MEImage& image, MEPixelDataType*** model) void MotionDetection::UpdateModelHU(MEImage& image, MEPixelDataType*** model)
{ {
float *CurrentHistogram, *CurrentHistogram2; float CurrentHistogram[HUHistogramBins], CurrentHistogram2[HUHistogramBins];
CurrentHistogram = new float[HUHistogramBins];
CurrentHistogram2 = new float[HUHistogramBins];
unsigned char *ImgData = image.GetImageData(); unsigned char *ImgData = image.GetImageData();
int RowWidth = image.GetRowWidth(); int RowWidth = image.GetRowWidth();
int RowStart = (HUImageHeight-1)*RowWidth; int RowStart = (HUImageHeight-1)*RowWidth;
...@@ -789,8 +787,6 @@ void MotionDetection::UpdateModelHU(MEImage& image, MEPixelDataType*** model) ...@@ -789,8 +787,6 @@ void MotionDetection::UpdateModelHU(MEImage& image, MEPixelDataType*** model)
} }
} }
delete[] CurrentHistogram;
delete[] CurrentHistogram2;
} }
...@@ -799,7 +795,7 @@ void MotionDetection::UpdateHUPixelData(MEPixelDataType* PixelData, const float ...@@ -799,7 +795,7 @@ void MotionDetection::UpdateHUPixelData(MEPixelDataType* PixelData, const float
int MaxIndex = 0; int MaxIndex = 0;
float MaxValue = -1; float MaxValue = -1;
bool Replace = true; bool Replace = true;
float *IntersectionResults = new float[HUHistogramsPerPixel]; float IntersectionResults[HUHistogramsPerPixel];
PixelData->LifeCycle++; PixelData->LifeCycle++;
PixelData->BackgroundRate = 0.0; PixelData->BackgroundRate = 0.0;
...@@ -860,7 +856,6 @@ void MotionDetection::UpdateHUPixelData(MEPixelDataType* PixelData, const float ...@@ -860,7 +856,6 @@ void MotionDetection::UpdateHUPixelData(MEPixelDataType* PixelData, const float
for (int i1 = HUHistogramsPerPixel-1; i1 >= 0; --i1) for (int i1 = HUHistogramsPerPixel-1; i1 >= 0; --i1)
PixelData->Weights[i1] = PixelData->Weights[i1] / sum; PixelData->Weights[i1] = PixelData->Weights[i1] / sum;
delete[] IntersectionResults;
return; return;
} }
...@@ -933,7 +928,6 @@ void MotionDetection::UpdateHUPixelData(MEPixelDataType* PixelData, const float ...@@ -933,7 +928,6 @@ void MotionDetection::UpdateHUPixelData(MEPixelDataType* PixelData, const float
{ {
PixelData->BackgroundHistogram[(int)Weights[i1][0]] = false; PixelData->BackgroundHistogram[(int)Weights[i1][0]] = false;
} }
delete[] IntersectionResults;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment