Skip to content

Commit 489df18

Browse files
authored
Merge pull request opencv#26313 from FantasqueX:ipp-warp-affine-border-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
1 parent d20c456 commit 489df18

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/imgproc/src/imgwarp.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2599,7 +2599,7 @@ class ipp_warpAffineParallel: public ParallelLoopBody
25992599

26002600
#endif
26012601

2602-
static bool ipp_warpAffine( InputArray _src, OutputArray _dst, int interpolation, int borderType, InputArray _M, int flags )
2602+
static bool ipp_warpAffine( InputArray _src, OutputArray _dst, int interpolation, int borderType, const Scalar & borderValue, InputArray _M, int flags )
26032603
{
26042604
#ifdef HAVE_IPP_IW
26052605
CV_INSTRUMENT_REGION_IPP();
@@ -2618,7 +2618,7 @@ static bool ipp_warpAffine( InputArray _src, OutputArray _dst, int interpolation
26182618
Mat dst = _dst.getMat();
26192619
::ipp::IwiImage iwSrc = ippiGetImage(src);
26202620
::ipp::IwiImage iwDst = ippiGetImage(dst);
2621-
::ipp::IwiBorderType ippBorder(ippiGetBorderType(borderType));
2621+
::ipp::IwiBorderType ippBorder(ippiGetBorderType(borderType), ippiGetValue(borderValue));
26222622
IwTransDirection iwTransDirection;
26232623
if(!ippBorder)
26242624
return false;
@@ -2661,7 +2661,7 @@ static bool ipp_warpAffine( InputArray _src, OutputArray _dst, int interpolation
26612661
return true;
26622662
#else
26632663
CV_UNUSED(_src); CV_UNUSED(_dst); CV_UNUSED(interpolation);
2664-
CV_UNUSED(borderType); CV_UNUSED(_M); CV_UNUSED(flags);
2664+
CV_UNUSED(borderType); CV_UNUSED(borderValue); CV_UNUSED(_M); CV_UNUSED(flags);
26652665
return false;
26662666
#endif
26672667
}
@@ -2828,7 +2828,7 @@ void cv::warpAffine( InputArray _src, OutputArray _dst,
28282828
CV_Assert( (M0.type() == CV_32F || M0.type() == CV_64F) && M0.rows == 2 && M0.cols == 3 );
28292829
M0.convertTo(matM, matM.type());
28302830

2831-
CV_IPP_RUN_FAST(ipp_warpAffine(src, dst, interpolation, borderType, matM, flags));
2831+
CV_IPP_RUN_FAST(ipp_warpAffine(src, dst, interpolation, borderType, borderValue, matM, flags));
28322832

28332833
if( !(flags & WARP_INVERSE_MAP) )
28342834
{

0 commit comments

Comments
 (0)