Merge pull request #3211 from cudawarped:fix_cuda_minmax_python_bindings

pull/3215/head
Alexander Alekhin 3 years ago
commit 172a0446cd
  1. 4
      modules/cudaarithm/include/opencv2/cudaarithm.hpp
  2. 3
      modules/cudaarithm/misc/python/test/test_cudaarithm.py

@ -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());
@ -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,

@ -154,6 +154,9 @@ class cudaarithm_test(NewOpenCVTests):
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)

Loading…
Cancel
Save