18 #ifndef PIC_FILTERING_FILTER_LOCAL_EXTREMA_HPP 19 #define PIC_FILTERING_FILTER_LOCAL_EXTREMA_HPP 21 #include "../filtering/filter.hpp" 44 for(
int j = box->
y0; j < box->y1; j++) {
45 for(
int i = box->
x0; i < box->x1; i++) {
46 float *dst_data = (*dst)(i, j);
48 float *img_data = (*img)(i, j);
52 for(
int c = 0; c < channels; c++) {
56 int counter_higher = 0;
57 int counter_lower = 0;
64 float *img_data_lk = (*img)(i + l, j + k);
68 for(
int c = 0; c < channels; c++) {
69 val_lk += img_data_lk[c];
126 width = imgIn[0]->width;
127 height = imgIn[0]->height;
129 frames = imgIn[0]->frames;
int kernelSize
Definition: filter_local_extrema.hpp:95
The BBox class manages the creation of bounding boxes for images.
Definition: bbox.hpp:29
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
void ProcessBBox(Image *dst, ImageVec src, BBox *box)
ProcessBBox.
Definition: filter_local_extrema.hpp:38
virtual Image * Process(ImageVec imgIn, Image *imgOut)
Process.
Definition: filter.hpp:390
The FilterLocalExtrema class.
Definition: filter_local_extrema.hpp:28
int y0
Definition: bbox.hpp:32
int halfKernelSize
Definition: filter_local_extrema.hpp:95
static Image * execute(Image *img, Image *imgOut, int kernelSize=3)
execute
Definition: filter_local_extrema.hpp:139
The Image class stores an image as buffer of float.
Definition: image.hpp:60
void OutputSize(ImageVec imgIn, int &width, int &height, int &channels, int &frames)
OutputSize.
Definition: filter_local_extrema.hpp:124
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
FilterLocalExtrema(int kernelSize=3)
FilterLocalExtrema.
Definition: filter_local_extrema.hpp:102