1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-18 00:01:17 +08:00

Fix cuda::minMax and cuda::minMaxLoc python bindings to correctly output the results.

Added test case.
This commit is contained in:
cudawarped
2022-03-22 18:41:53 +00:00
parent 508c8db05e
commit ea450e6378
2 changed files with 5 additions and 2 deletions

View File

@@ -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)