Merge pull request #10348 from ElenaGvozdeva:Canny_HAL

pull/10357/head
Alexander Alekhin 7 years ago
commit badc3bd312
  1. 6
      modules/imgproc/src/canny.cpp
  2. 16
      modules/imgproc/src/hal_replacement.hpp

@ -956,7 +956,11 @@ void Canny( InputArray _src, OutputArray _dst,
CV_OCL_RUN(_dst.isUMat() && (_src.channels() == 1 || _src.channels() == 3), CV_OCL_RUN(_dst.isUMat() && (_src.channels() == 1 || _src.channels() == 3),
ocl_Canny<false>(_src, UMat(), UMat(), _dst, (float)low_thresh, (float)high_thresh, aperture_size, L2gradient, _src.channels(), size)) ocl_Canny<false>(_src, UMat(), UMat(), _dst, (float)low_thresh, (float)high_thresh, aperture_size, L2gradient, _src.channels(), size))
Mat src = _src.getMat(), dst = _dst.getMat(); Mat src0 = _src.getMat(), dst = _dst.getMat();
Mat src(src0.size(), src0.type(), src0.data, src0.step);
CALL_HAL(canny, cv_hal_canny, src.data, src.step, dst.data, dst.step, src.cols, src.rows, src.channels(),
low_thresh, high_thresh, aperture_size, L2gradient);
CV_OVX_RUN( CV_OVX_RUN(
false && /* disabling due to accuracy issues */ false && /* disabling due to accuracy issues */

@ -756,6 +756,22 @@ inline int hal_ni_pyrdown(const uchar* src_data, size_t src_step, int src_width,
#define cv_hal_pyrdown hal_ni_pyrdown #define cv_hal_pyrdown hal_ni_pyrdown
//! @endcond //! @endcond
/**
@brief Canny edge detector
@param src_data,src_step Source image
@param dst_data,dst_step Destination image
@param width,height Source image dimensions
@param cn Number of channels
@param lowThreshold, highThreshold Thresholds value
@param ksize Kernel size for Sobel operator.
@param L2gradient Flag, indicating use L2 or L1 norma.
*/
inline int hal_ni_canny(const uchar* src_data, size_t src_step, uchar* dst_data, size_t dst_step, int width, int height, int cn, double lowThreshold, double highThreshold, int ksize, bool L2gradient) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
//! @cond IGNORED
#define cv_hal_canny hal_ni_canny
//! @endcond
//! @} //! @}
#if defined __GNUC__ #if defined __GNUC__

Loading…
Cancel
Save