Skip to content

Commit 172a044

Browse files
committed
Merge pull request #3211 from cudawarped:fix_cuda_minmax_python_bindings
2 parents 508c8db + ea450e6 commit 172a044

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

modules/cudaarithm/include/opencv2/cudaarithm.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ The function does not work with CV_64F images on GPUs with the compute capabilit
620620
621621
@sa minMaxLoc
622622
*/
623-
CV_EXPORTS_W void minMax(InputArray src, double* minVal, double* maxVal, InputArray mask = noArray());
623+
CV_EXPORTS_W void minMax(InputArray src, CV_OUT double* minVal, CV_OUT double* maxVal, InputArray mask = noArray());
624624
/** @overload */
625625
CV_EXPORTS_W void findMinMax(InputArray src, OutputArray dst, InputArray mask = noArray(), Stream& stream = Stream::Null());
626626

@@ -637,7 +637,7 @@ The function does not work with CV_64F images on GPU with the compute capability
637637
638638
@sa minMaxLoc
639639
*/
640-
CV_EXPORTS_W void minMaxLoc(InputArray src, double* minVal, double* maxVal, Point* minLoc, Point* maxLoc,
640+
CV_EXPORTS_W void minMaxLoc(InputArray src, CV_OUT double* minVal, CV_OUT double* maxVal, CV_OUT Point* minLoc, CV_OUT Point* maxLoc,
641641
InputArray mask = noArray());
642642
/** @overload */
643643
CV_EXPORTS_W void findMinMaxLoc(InputArray src, OutputArray minMaxVals, OutputArray loc,

modules/cudaarithm/misc/python/test/test_cudaarithm.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ def test_logical(self):
154154
cv.cuda.max(cuMat1, cuMat2, cuMatDst)
155155
self.assertTrue(np.allclose(cuMatDst.download(),cv.max(npMat1, npMat2)))
156156

157+
self.assertTrue(cv.cuda.minMax(cuMat1),cv.minMaxLoc(npMat1)[:2])
158+
self.assertTrue(cv.cuda.minMaxLoc(cuMat1),cv.minMaxLoc(npMat1))
159+
157160
def test_convolution(self):
158161
npMat = (np.random.random((128, 128)) * 255).astype(np.float32)
159162
npDims = np.array(npMat.shape)

0 commit comments

Comments
 (0)