void GaussianBlur::gaussBlur(IntensityMap &input, IntensityMap &result, double radius, bool tileable) {
    std::vector<double> boxes = boxesForGauss(radius, 3);

    boxBlur(input, result, ((boxes.at(0) - 1) / 2), tileable);
    boxBlur(result, input, ((boxes.at(1) - 1) / 2), tileable);
    boxBlur(input, result, ((boxes.at(2) - 1) / 2), tileable);
}
Example #2
0
File: blurr.cpp Project: stll/STLL
void gaussBlur (uint8_t * s, int pitch, int w, int h, double r, int sx, int sy)
{
  auto a = boxesForGauss(r/2);
  auto d = std::make_unique<uint8_t[]>(w*h);
  boxBlurT_4(s, pitch, d.get(), w, w, h, sy*(a[0]-1)/2);
  boxBlurH_4(d.get(), w, s, pitch, w, h, sx*(a[0]-1)/2);
  boxBlurT_4(s, pitch, d.get(), w, w, h, sy*(a[1]-1)/2);
  boxBlurH_4(d.get(), w, s, pitch, w, h, sx*(a[1]-1)/2);
  boxBlurT_4(s, pitch, d.get(), w, w, h, sy*(a[2]-1)/2);
  boxBlurH_4(d.get(), w, s, pitch, w, h, sx*(a[2]-1)/2);
}
Example #3
0
File: blurr.cpp Project: stll/STLL
int gaussBlurrDist(double r)
{
  auto a = boxesForGauss(r/2);

  return /*(a[0]-1)/2 + (a[1]-1)/2 +*/ a[2];
}