Skip to content

Commit

Permalink
Merge pull request opencv#26313 from FantasqueX:ipp-warp-affine-borde…
Browse files Browse the repository at this point in the history
…r-value

Use border value in ipp version of warp affine opencv#26313

### 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
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
  • Loading branch information
FantasqueX authored Oct 17, 2024
1 parent d20c456 commit 489df18
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/imgproc/src/imgwarp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2599,7 +2599,7 @@ class ipp_warpAffineParallel: public ParallelLoopBody

#endif

static bool ipp_warpAffine( InputArray _src, OutputArray _dst, int interpolation, int borderType, InputArray _M, int flags )
static bool ipp_warpAffine( InputArray _src, OutputArray _dst, int interpolation, int borderType, const Scalar & borderValue, InputArray _M, int flags )
{
#ifdef HAVE_IPP_IW
CV_INSTRUMENT_REGION_IPP();
Expand All @@ -2618,7 +2618,7 @@ static bool ipp_warpAffine( InputArray _src, OutputArray _dst, int interpolation
Mat dst = _dst.getMat();
::ipp::IwiImage iwSrc = ippiGetImage(src);
::ipp::IwiImage iwDst = ippiGetImage(dst);
::ipp::IwiBorderType ippBorder(ippiGetBorderType(borderType));
::ipp::IwiBorderType ippBorder(ippiGetBorderType(borderType), ippiGetValue(borderValue));
IwTransDirection iwTransDirection;
if(!ippBorder)
return false;
Expand Down Expand Up @@ -2661,7 +2661,7 @@ static bool ipp_warpAffine( InputArray _src, OutputArray _dst, int interpolation
return true;
#else
CV_UNUSED(_src); CV_UNUSED(_dst); CV_UNUSED(interpolation);
CV_UNUSED(borderType); CV_UNUSED(_M); CV_UNUSED(flags);
CV_UNUSED(borderType); CV_UNUSED(borderValue); CV_UNUSED(_M); CV_UNUSED(flags);
return false;
#endif
}
Expand Down Expand Up @@ -2828,7 +2828,7 @@ void cv::warpAffine( InputArray _src, OutputArray _dst,
CV_Assert( (M0.type() == CV_32F || M0.type() == CV_64F) && M0.rows == 2 && M0.cols == 3 );
M0.convertTo(matM, matM.type());

CV_IPP_RUN_FAST(ipp_warpAffine(src, dst, interpolation, borderType, matM, flags));
CV_IPP_RUN_FAST(ipp_warpAffine(src, dst, interpolation, borderType, borderValue, matM, flags));

if( !(flags & WARP_INVERSE_MAP) )
{
Expand Down

0 comments on commit 489df18

Please sign in to comment.