18 #ifndef PIC_FILTERING_FILTER_MIN_HPP 19 #define PIC_FILTERING_FILTER_MIN_HPP 21 #include "../filtering/filter.hpp" 42 float *minVal =
new float[channels];
44 for(
int j = box->
y0; j < box->y1; j++) {
45 for(
int i = box->
x0; i < box->x1; i++) {
47 float *dst_data = (*dst)(i, j);
48 float *src_data = (*src[0])(i, j);
50 for(
int k = 0; k < channels; k++) {
51 minVal[k] = src_data[k];
57 src_data = (*src[0])(i + l, j + k);
59 for(
int ch = 0; ch < channels; ch++) {
60 minVal[ch] = minVal[ch] < src_data[ch] ?
61 minVal[ch] : src_data[ch];
66 for(
int k = 0; k < channels; k++) {
67 dst_data[k] = minVal[k];
static Image * execute(Image *imgIn, Image *imgOut, int size)
execute
Definition: filter_min.hpp:93
The BBox class manages the creation of bounding boxes for images.
Definition: bbox.hpp:29
int checkHalfSize(int size)
checkHalfSize
Definition: filter_radial_basis_function.hpp:168
int channels
Definition: image.hpp:80
std::vector< Image * > ImageVec
ImageVec an std::vector of pic::Image.
Definition: image_vec.hpp:29
int x0
Definition: bbox.hpp:32
The Filter class.
Definition: filter.hpp:50
FilterMin(int size)
FilterMin.
Definition: filter_min.hpp:81
virtual Image * Process(ImageVec imgIn, Image *imgOut)
Process.
Definition: filter.hpp:390
int y0
Definition: bbox.hpp:32
The FilterMin class.
Definition: filter_min.hpp:28
void ProcessBBox(Image *dst, ImageVec src, BBox *box)
ProcessBBox.
Definition: filter_min.hpp:39
The Image class stores an image as buffer of float.
Definition: image.hpp:60
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
int halfSize
Definition: filter_min.hpp:31