cloudy-raytracer/post_processing/bloom.h

25 lines
503 B
C++

#ifndef CG1_TRACER_BLOOM_H
#define CG1_TRACER_BLOOM_H
#include "common/texture.h"
#include "common/vector3d.h"
class Bloom {
public:
Bloom(CImg<float>& image, float threshold, Texture& thresholdImg);
CImg<float> bloom(int kernelSize, float sigma, float intensity);
private:
CImg<float> convolution(CImg<float> &img, CImg<float> &kernel);
CImg<float> computeGaussianKernel(int kernelSize, float sigma);
CImg<float> image;
float threshold;
};
#endif //CG1_TRACER_BLOOM_H