Merge pull request #25343 from asmorkalov:as/HAL_bilaterialFilter

HAL interface for bilaterialFilter
pull/25396/head
Alexander Smorkalov 10 months ago committed by GitHub
commit 2c5b296ab2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      modules/imgproc/src/bilateral_filter.dispatch.cpp
  2. 23
      modules/imgproc/src/hal_replacement.hpp

@ -415,6 +415,9 @@ void bilateralFilter( InputArray _src, OutputArray _dst, int d,
Mat src = _src.getMat(), dst = _dst.getMat();
CALL_HAL(bilateralFilter, cv_hal_bilateralFilter, src.data, src.step, dst.data, dst.step, src.cols, src.rows, src.depth(),
src.channels(), d, sigmaColor, sigmaSpace, borderType);
CV_IPP_RUN_FAST(ipp_bilateralFilter(src, dst, d, sigmaColor, sigmaSpace, borderType));
if( src.depth() == CV_8U )

@ -763,6 +763,29 @@ inline int hal_ni_medianBlur(const uchar* src_data, size_t src_step, uchar* dst_
#define cv_hal_medianBlur hal_ni_medianBlur
//! @endcond
/**
@brief Calculate bilateral filter. See https://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/MANDUCHI1/Bilateral_Filtering.html
@param src_data Source image data
@param src_step Source image step
@param dst_data Destination image data
@param dst_step Destination image step
@param width Source image width
@param height Source image height
@param depth Depths of source and destination image. Should support CV_8U and CV_32F
@param cn Number of channels
@param d Diameter of each pixel neighborhood that is used during filtering. If it is non-positive, it is computed from sigmaSpace
@param sigma_color Filter sigma in the color space
@param sigma_space Filter sigma in the coordinate space. When d>0, it specifies the neighborhood size regardless of sigmaSpace. Otherwise, d is proportional to sigmaSpace
@param border_type border mode used to extrapolate pixels outside of the image
*/
inline int hal_ni_bilateralFilter(const uchar* src_data, size_t src_step, uchar* dst_data, size_t dst_step,
int width, int height, int depth, int cn, int d, double sigma_color, double sigma_space, int border_type)
{ return CV_HAL_ERROR_NOT_IMPLEMENTED; }
//! @cond IGNORED
#define cv_hal_bilateralFilter hal_ni_bilateralFilter
//! @endcond
/**
@brief Calculates adaptive threshold
@param src_data Source image data

Loading…
Cancel
Save