23 #include <fvfilters/hipass.h> 24 #include <core/exception.h> 28 #elif defined(HAVE_OPENCV) 29 # if CV_MAJOR_VERSION < 2 || (CV_MAJOR_VERSION == 2 && CV_MINOR_VERSION < 4) 30 # include <opencv/cv.h> 32 # include <opencv/cv.hpp> 34 # error "Neither IPP nor OpenCV available" 66 size, ippMskSize3x3 );
68 if ( status != ippStsNoErr ) {
72 #elif defined(HAVE_OPENCV) 73 cv::Mat srcm(src_roi[0]->height, src_roi[0]->width, CV_8UC1,
75 (src_roi[0]->start.y * src_roi[0]->line_step) +
76 (src_roi[0]->start.x * src_roi[0]->pixel_step),
77 src_roi[0]->line_step);
87 cv::Mat kernel(3, 3, CV_32F);
88 float *kernel_f = (
float *)kernel.ptr();
89 kernel_f[0] = -1; kernel_f[1] = -1; kernel_f[2] = -1;
90 kernel_f[3] = -1; kernel_f[4] = 8; kernel_f[5] = -1;
91 kernel_f[6] = -1; kernel_f[7] = -1; kernel_f[8] = -1;
93 cv::Point kanchor(1, 1);
95 cv::filter2D(srcm, dstm, -1, kernel, kanchor);
virtual void apply()
Apply the filter.
fawkes::upoint_t start
ROI start.
unsigned int y
y coordinate
unsigned int x
x coordinate
unsigned int width
ROI width.
unsigned char ** src
Source buffers, dynamically allocated by Filter ctor.
Base class for exceptions in Fawkes.
ROI ** src_roi
Source ROIs, dynamically allocated by Filter ctor.
unsigned int height
ROI height.
unsigned int line_step
line step
FilterHipass()
Constructor.
unsigned char * dst
Destination buffer.
unsigned int pixel_step
pixel step
ROI * dst_roi
Destination ROI.