Skip to content

Commit 92be112

Browse files
committed
Merge pull request opencv#10107 from ElenaGvozdeva:medianBlur_HAL
2 parents a83c12c + 5d0a8d2 commit 92be112

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

modules/imgproc/src/hal_replacement.hpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,21 @@ inline int hal_ni_integral(int depth, int sdepth, int sqdepth, const uchar * src
615615
#define cv_hal_integral hal_ni_integral
616616
//! @endcond
617617

618+
/**
619+
@brief Calculate medianBlur filter
620+
@param src_data,src_step Source image
621+
@param dst_data,dst_step Destination image
622+
@param width,height Source image dimensions
623+
@param depth Depths of source and destination image
624+
@param cn Number of channels
625+
@param ksize Size of kernel
626+
*/
627+
inline int hal_ni_medianBlur(const uchar* src_data, size_t src_step, uchar* dst_data, size_t dst_step, int width, int height, int depth, int cn, int ksize) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
628+
629+
//! @cond IGNORED
630+
#define cv_hal_medianBlur hal_ni_medianBlur
631+
//! @endcond
632+
618633
//! @}
619634

620635
#if defined __GNUC__

modules/imgproc/src/smooth.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3123,6 +3123,9 @@ void cv::medianBlur( InputArray _src0, OutputArray _dst, int ksize )
31233123
_dst.create( src0.size(), src0.type() );
31243124
Mat dst = _dst.getMat();
31253125

3126+
CALL_HAL(medianBlur, cv_hal_medianBlur, src0.data, src0.step, dst.data, dst.step, src0.cols, src0.rows, src0.depth(),
3127+
src0.channels(), ksize);
3128+
31263129
CV_OVX_RUN(true,
31273130
openvx_medianFilter(_src0, _dst, ksize))
31283131

@@ -3162,7 +3165,7 @@ void cv::medianBlur( InputArray _src0, OutputArray _dst, int ksize )
31623165
}
31633166
else
31643167
{
3165-
cv::copyMakeBorder( src0, src, 0, 0, ksize/2, ksize/2, BORDER_REPLICATE );
3168+
cv::copyMakeBorder( src0, src, 0, 0, ksize/2, ksize/2, BORDER_REPLICATE|BORDER_ISOLATED);
31663169

31673170
int cn = src0.channels();
31683171
CV_Assert( src.depth() == CV_8U && (cn == 1 || cn == 3 || cn == 4) );

0 commit comments

Comments
 (0)