23 #include <core/exception.h>
24 #include <fvfilters/median.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"
37 namespace firevision {
49 this->mask_size = mask_size;
60 IppiSize mask = {mask_size, mask_size};
61 IppiPoint anchor = {(mask_size + 1) / 2, (mask_size + 1) / 2};
66 status = ippiFilterMedian_8u_C1R(
77 if (status != ippStsNoErr) {
80 #elif defined(HAVE_OPENCV)
81 cv::Mat srcm(
src_roi[0]->height,
100 cv::medianBlur(srcm, dstm, mask_size);