This commit is contained in:
toni
2018-01-17 10:26:16 +01:00
67 changed files with 16100 additions and 2117 deletions

View File

@@ -3,6 +3,7 @@
#include <cmath>
#include <vector>
#include "Image2D.h"
#include "BoxSizes.h"
template <class T>
@@ -28,7 +29,7 @@ struct BoxGaus
{
BoxSizes<T> bsX(sigmaX, nFilt);
BoxSizes<T> bsY(sigmaY, nFilt);
std::vector<T> buffer(input.size());
std::vector<T> buffer(input.size());
assertMsg((2 * bsX.wl + 1 < w) && (2 * bsX.wl + 1 < h), "Box-Filter size in X direction is too big");
assertMsg((2 * bsX.wu + 1 < w) && (2 * bsX.wu + 1 < h), "Box-Filter size in X direction is too big");
@@ -89,7 +90,7 @@ private:
for (size_t j = 0; j <= r; j++)
{
val += src[ri] - fv;
dst[j + i*w] = val * iarr;
dst[i + j*w] = val * iarr;
ri += w;
ti += w;
@@ -99,7 +100,7 @@ private:
for (size_t j = r + 1; j < h - r; j++)
{
val += src[ri] - src[li];
dst[j + i*w] = val * iarr;
dst[i + j*w] = val * iarr;
li += w;
ri += w;
@@ -110,12 +111,14 @@ private:
for (size_t j = h - r; j < h; j++)
{
val += lv - src[li];
dst[j + i*w] = val * iarr;
dst[i + j*w] = val * iarr;
li += w;
ti += w;
}
}
int test = 0;
}
};