18 #ifndef PIC_IMAGE_SAMPLERS_IMAGE_SAMPLER_BSPLINES_HPP 19 #define PIC_IMAGE_SAMPLERS_IMAGE_SAMPLER_BSPLINES_HPP 21 #include "../image_samplers/image_sampler.hpp" 66 for(
int k = 0; k < img->
channels; k++) {
73 for(
int j = -1; j < 3; j++) {
74 ry =
Rx(
float(j) - dy);
77 for(
int i = -1; i < 3; i++) {
78 rx =
Rx(
float(i) - dx) * ry;
82 for(
int k = 0; k < img->channels; k++) {
83 vOut[k] += img->
data[ind + k] * rx;
float * data
data is the main buffer where pixel values are stored.
Definition: image.hpp:91
int channels
Definition: image.hpp:80
The ImageSampler class.
Definition: image_sampler.hpp:29
void SampleImage(Image *img, float x, float y, float *vOut)
SampleImage samples an image in uniform coordiantes.
Definition: image_sampler_bsplines.hpp:42
float Rx(float x)
Rx evaluates B-spline (cubic).
Definition: image_sampler.hpp:80
The ImageSamplerBSplines class.
Definition: image_sampler_bsplines.hpp:28
float height1f
Definition: image.hpp:84
The Image class stores an image as buffer of float.
Definition: image.hpp:60
Definition: bilateral_separation.hpp:25
#define CLAMP(x, a)
Definition: math.hpp:77
ImageSamplerBSplines()
Definition: image_sampler_bsplines.hpp:31
int width
Definition: image.hpp:80
int height
Definition: image.hpp:80
float width1f
Definition: image.hpp:84