18 #ifndef PIC_FILTERING_FILTER_SAMPLER_3D_HPP 19 #define PIC_FILTERING_FILTER_SAMPLER_3D_HPP 21 #include "../filtering/filter.hpp" 22 #include "../image_samplers/image_sampler.hpp" 60 width = int(imgIn[0]->widthf *
scale);
61 height = int(imgIn[0]->heightf *
scale);
62 frames = int(imgIn[0]->framesf *
scale);
63 channels = imgIn[0]->channels;
89 Image *source = src[0];
91 for(
int p = box->
z0; p < box->z1; p++) {
92 float t = float(p) / float(box->
frames - 1);
94 for(
int j = box->
y0; j < box->y1; j++) {
95 float y = float(j) / float(box->
height - 1);
97 for(
int i = box->
x0; i < box->x1; i++) {
98 float x = float(i) / float(box->
width - 1);
void OutputSize(ImageVec imgIn, int &width, int &height, int &channels, int &frames)
OutputSize.
Definition: filter_sampler_3d.hpp:58
The BBox class manages the creation of bounding boxes for images.
Definition: bbox.hpp:29
float * data
data is the main buffer where pixel values are stored.
Definition: image.hpp:91
std::vector< Image * > ImageVec
ImageVec an std::vector of pic::Image.
Definition: image_vec.hpp:29
int x0
Definition: bbox.hpp:32
The ImageSampler class.
Definition: image_sampler.hpp:29
The Filter class.
Definition: filter.hpp:50
ImageSampler * isb
Definition: filter_sampler_3d.hpp:32
virtual Image * Process(ImageVec imgIn, Image *imgOut)
Process.
Definition: filter.hpp:390
float scale
Definition: filter_radial_basis_function.hpp:53
void ProcessBBox(Image *dst, ImageVec src, BBox *box)
ProcessBBox.
Definition: filter_sampler_3d.hpp:87
static Image * execute(Image *in, ImageSampler *isb, float scale)
execute
Definition: filter_sampler_3d.hpp:73
int y0
Definition: bbox.hpp:32
int xstride
Definition: image.hpp:82
#define PIC_INLINE
Definition: base.hpp:33
The Image class stores an image as buffer of float.
Definition: image.hpp:60
FilterSampler3D(float scale, ImageSampler *isb)
FilterSampler3D.
Definition: filter_sampler_3d.hpp:81
int ystride
Definition: image.hpp:82
PIC_INLINE ImageVec Single(Image *img)
Single creates an std::vector which contains img; this is for filters input.
Definition: image_vec.hpp:36
Definition: bilateral_separation.hpp:25
virtual void SampleImage(Image *img, float x, float y, float *vOut)
SampleImage samples an image in uniform coordiantes.
Definition: image_sampler.hpp:57
int tstride
Definition: image.hpp:82
int width
Definition: bbox.hpp:33
int height
Definition: bbox.hpp:33
int frames
Definition: bbox.hpp:33
int z0
Definition: bbox.hpp:32
The FilterSampler3D class.
Definition: filter_sampler_3d.hpp:29