1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-19 11:21:39 +08:00

Merge pull request #3211 from cudawarped:fix_cuda_minmax_python_bindings

This commit is contained in:
Alexander Alekhin
2022-03-24 09:27:26 +00:00
2 changed files with 5 additions and 2 deletions

View File

@@ -620,7 +620,7 @@ The function does not work with CV_64F images on GPUs with the compute capabilit
@sa minMaxLoc @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 */ /** @overload */
CV_EXPORTS_W void findMinMax(InputArray src, OutputArray dst, InputArray mask = noArray(), Stream& stream = Stream::Null()); 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 @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()); InputArray mask = noArray());
/** @overload */ /** @overload */
CV_EXPORTS_W void findMinMaxLoc(InputArray src, OutputArray minMaxVals, OutputArray loc, CV_EXPORTS_W void findMinMaxLoc(InputArray src, OutputArray minMaxVals, OutputArray loc,

View File

@@ -154,6 +154,9 @@ class cudaarithm_test(NewOpenCVTests):
cv.cuda.max(cuMat1, cuMat2, cuMatDst) cv.cuda.max(cuMat1, cuMat2, cuMatDst)
self.assertTrue(np.allclose(cuMatDst.download(),cv.max(npMat1, npMat2))) 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): def test_convolution(self):
npMat = (np.random.random((128, 128)) * 255).astype(np.float32) npMat = (np.random.random((128, 128)) * 255).astype(np.float32)
npDims = np.array(npMat.shape) npDims = np.array(npMat.shape)