Skip to content

Commit

Permalink
Merge pull request opencv#3211 from cudawarped:fix_cuda_minmax_python…
Browse files Browse the repository at this point in the history
…_bindings
  • Loading branch information
alalek committed Mar 24, 2022
2 parents 508c8db + ea450e6 commit 172a044
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/cudaarithm/include/opencv2/cudaarithm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ The function does not work with CV_64F images on GPUs with the compute capabilit
@sa minMaxLoc
*/
CV_EXPORTS_W void minMax(InputArray src, double* minVal, double* maxVal, InputArray mask = noArray());
CV_EXPORTS_W void minMax(InputArray src, CV_OUT double* minVal, CV_OUT double* maxVal, InputArray mask = noArray());
/** @overload */
CV_EXPORTS_W void findMinMax(InputArray src, OutputArray dst, InputArray mask = noArray(), Stream& stream = Stream::Null());

Expand All @@ -637,7 +637,7 @@ The function does not work with CV_64F images on GPU with the compute capability
@sa minMaxLoc
*/
CV_EXPORTS_W void minMaxLoc(InputArray src, double* minVal, double* maxVal, Point* minLoc, Point* maxLoc,
CV_EXPORTS_W void minMaxLoc(InputArray src, CV_OUT double* minVal, CV_OUT double* maxVal, CV_OUT Point* minLoc, CV_OUT Point* maxLoc,
InputArray mask = noArray());
/** @overload */
CV_EXPORTS_W void findMinMaxLoc(InputArray src, OutputArray minMaxVals, OutputArray loc,
Expand Down
3 changes: 3 additions & 0 deletions modules/cudaarithm/misc/python/test/test_cudaarithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ def test_logical(self):
cv.cuda.max(cuMat1, cuMat2, cuMatDst)
self.assertTrue(np.allclose(cuMatDst.download(),cv.max(npMat1, npMat2)))

self.assertTrue(cv.cuda.minMax(cuMat1),cv.minMaxLoc(npMat1)[:2])
self.assertTrue(cv.cuda.minMaxLoc(cuMat1),cv.minMaxLoc(npMat1))

def test_convolution(self):
npMat = (np.random.random((128, 128)) * 255).astype(np.float32)
npDims = np.array(npMat.shape)
Expand Down

0 comments on commit 172a044

Please sign in to comment.