1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

Merge pull request #25970 from savuor:rv/hal_pyrdown

pyrDown: offset HAL added, IPP removed #25970

Resolves #25976

### Changes
* HAL added for offset support so that border pixels can be fetched from outside of the image ROI (see `BORDER_ISOLATED` parameter)
* IPP removed since there is `pyrUp` instead of `pyrDown` and there's no easy way to fix this other than rewriting it from scratch
* replaced old C call by modern `cv::pyrDown`

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
Rostislav Vasilikhin
2024-08-06 14:04:53 +02:00
committed by GitHub
parent 49459d46e2
commit 1acf722e24
3 changed files with 41 additions and 73 deletions
+27
View File
@@ -1247,6 +1247,33 @@ inline int hal_ni_pyrdown(const uchar* src_data, size_t src_step, int src_width,
#define cv_hal_pyrdown hal_ni_pyrdown
//! @endcond
/**
@brief Perform Gaussian Blur and downsampling for input tile with optional margins for submatrix
@param src_data Source image data
@param src_step Source image step
@param src_width Source image width
@param src_height Source image height
@param dst_data Destination image data
@param dst_step Destination image step
@param dst_width Destination image width
@param dst_height Destination image height
@param depth Depths of source and destination image
@param cn Number of channels
@param margin_left Left margins for source image
@param margin_top Top margins for source image
@param margin_right Right margins for source image
@param margin_bottom Bottom margins for source image
@param border_type Border type
*/
inline int hal_ni_pyrdown_offset(const uchar* src_data, size_t src_step, int src_width, int src_height,
uchar* dst_data, size_t dst_step, int dst_width, int dst_height,
int depth, int cn, int margin_left, int margin_top, int margin_right, int margin_bottom, int border_type)
{ return CV_HAL_ERROR_NOT_IMPLEMENTED; }
//! @cond IGNORED
#define cv_hal_pyrdown_offset hal_ni_pyrdown_offset
//! @endcond
/**
@brief Canny edge detector
@param src_data Source image data