18 #ifndef PIC_FILTERING_FILTER_DOWN_PP_HPP 19 #define PIC_FILTERING_FILTER_DOWN_PP_HPP 21 #include "../util/array.hpp" 23 #include "../filtering/filter.hpp" 41 int channels = src[0]->channels;
43 for(
int i2 = box->
y0; i2 < box->y1; i2++) {
46 for(
int j2 = box->
x0; j2 < box->x1; j2++) {
50 tmp[0] = (*src[0])(j , i);
51 tmp[1] = (*src[0])(j + 1, i);
52 tmp[2] = (*src[0])(j , i + 1);
53 tmp[3] = (*src[0])(j + 1, i + 1);
56 float *out = (*dst)(j2, i2);
60 for(
int k = 0; k < 4; k++) {
64 for(
int l = 0; l < channels; l++) {
71 float counter_f = float(counter);
108 printf(
"ERROR in FilterDownPP");
124 if(imgIn.size() == 1) {
125 width = imgIn[0]->width >> 1;
126 height = imgIn[0]->height >> 1;
128 width = imgIn[1]->width;
129 height = imgIn[1]->height;
133 channels = imgIn[0]->channels;
134 frames = imgIn[0]->frames;
The BBox class manages the creation of bounding boxes for images.
Definition: bbox.hpp:29
~FilterDownPP()
Definition: filter_down_pp.hpp:94
float threshold
Definition: filter_down_pp.hpp:80
std::vector< Image * > ImageVec
ImageVec an std::vector of pic::Image.
Definition: image_vec.hpp:29
int x0
Definition: bbox.hpp:32
void OutputSize(ImageVec imgIn, int &width, int &height, int &channels, int &frames)
OutputSize.
Definition: filter_down_pp.hpp:122
The Filter class.
Definition: filter.hpp:50
FilterDownPP(float *value, float threshold)
FilterDownPP.
Definition: filter_down_pp.hpp:89
float * value
Definition: filter_down_pp.hpp:80
static T distanceSq(T *data0, T *data1, int n)
distanceSq
Definition: array.hpp:195
int y0
Definition: bbox.hpp:32
void update(float *value, float threshold)
update
Definition: filter_down_pp.hpp:103
The FilterDownPP class.
Definition: filter_down_pp.hpp:30
void ProcessBBox(Image *dst, ImageVec src, BBox *box)
ProcessBBox.
Definition: filter_down_pp.hpp:39
The Image class stores an image as buffer of float.
Definition: image.hpp:60
static void div(T *data, int size, T value)
div
Definition: array.hpp:353
virtual void f(FilterFData *data)
f
Definition: filter_radial_basis_function.hpp:69
Definition: bilateral_separation.hpp:25
static T * assign(T *data, int size, T *ret)
assign
Definition: array.hpp:464