18 #ifndef PIC_IMAGE_SAMPLERS_IMAGE_SAMPLER_NEAREST_HPP 19 #define PIC_IMAGE_SAMPLERS_IMAGE_SAMPLER_NEAREST_HPP 21 #include "../image_samplers/image_sampler.hpp" 71 for(
int i = 0; i < img->
channels; i++) {
72 vOut[i] = img->
data[ind + i];
103 for(
int i = 0; i < img->
channels; i++) {
104 vOut[i] = img->
data[ind + i];
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 t, float *vOut)
SampleImage samples an image in uniform coordiantes.
Definition: image_sampler_nearest.hpp:84
void SampleImageUC(Image *img, float x, float y, float *vOut)
SampleImageUC samples an image in unnormalized coordinates [0,width-1]x[0,height-1].
Definition: image_sampler_nearest.hpp:62
void SampleImage(Image *img, float x, float y, float *vOut)
SampleImage samples an image in uniform coordiantes.
Definition: image_sampler_nearest.hpp:43
int xstride
Definition: image.hpp:82
float height1f
Definition: image.hpp:84
The Image class stores an image as buffer of float.
Definition: image.hpp:60
int ystride
Definition: image.hpp:82
#define CLAMPi(x, a, b)
Definition: math.hpp:81
Definition: bilateral_separation.hpp:25
int tstride
Definition: image.hpp:82
#define CLAMP(x, a)
Definition: math.hpp:77
ImageSamplerNearest()
ImageSamplerNearest.
Definition: image_sampler_nearest.hpp:34
int width
Definition: image.hpp:80
int height
Definition: image.hpp:80
The ImageSamplerNearest class.
Definition: image_sampler_nearest.hpp:28
float frames1f
Definition: image.hpp:84
float width1f
Definition: image.hpp:84