18 #ifndef PIC_FILTERING_FILTER_GRADIENT_HARRIS_OPT_HPP 19 #define PIC_FILTERING_FILTER_GRADIENT_HARRIS_OPT_HPP 21 #include "../filtering/filter.hpp" 65 width = imgIn[0]->width;
66 height = imgIn[0]->height;
68 frames = imgIn[0]->frames;
87 this->colorChannel = 0;
105 for(
int j = box->
y0; j < box->y1; j++) {
106 for(
int i = box->
x0; i < box->x1; i++) {
107 float I_x = (*img)(i + 1, j)[channel] - (*img)(i - 1, j)[channel];
108 float I_y = (*img)(i, j + 1)[channel] - (*img)(i, j - 1)[channel];
110 float *dst_data = (*dst)(i, j);
112 dst_data[0] = I_x * I_x;
113 dst_data[1] = I_y * I_y;
114 dst_data[2] = I_x * I_y;
The BBox class manages the creation of bounding boxes for images.
Definition: bbox.hpp:29
int colorChannel
Definition: filter_gradient_harris_opt.hpp:31
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
static Image * execute(Image *imgIn, Image *imgOut=NULL, int colorChannel=0)
execute
Definition: filter_gradient_harris_opt.hpp:78
The Filter class.
Definition: filter.hpp:50
virtual Image * Process(ImageVec imgIn, Image *imgOut)
Process.
Definition: filter.hpp:390
void OutputSize(ImageVec imgIn, int &width, int &height, int &channels, int &frames)
OutputSize.
Definition: filter_gradient_harris_opt.hpp:63
void update(int colorChannel)
update
Definition: filter_gradient_harris_opt.hpp:91
The FilterGradientHarrisOPT class.
Definition: filter_gradient_harris_opt.hpp:28
int y0
Definition: bbox.hpp:32
#define PIC_INLINE
Definition: base.hpp:33
The Image class stores an image as buffer of float.
Definition: image.hpp:60
FilterGradientHarrisOPT(int colorChannel)
FilterGradientHarrisOPT.
Definition: filter_gradient_harris_opt.hpp:85
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
void ProcessBBox(Image *dst, ImageVec src, BBox *box)
ProcessBBox.
Definition: filter_gradient_harris_opt.hpp:98