mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 15:23:05 +04:00
Merge branch 4.x
This commit is contained in:
@@ -26,6 +26,15 @@ class cuda_test(NewOpenCVTests):
|
||||
|
||||
self.assertTrue(np.allclose(cuMat.download(), npMat))
|
||||
|
||||
def test_cuda_upload_download_stream(self):
|
||||
stream = cv.cuda_Stream()
|
||||
npMat = (np.random.random((128, 128, 3)) * 255).astype(np.uint8)
|
||||
cuMat = cv.cuda_GpuMat(128,128, cv.CV_8UC3)
|
||||
cuMat.upload(npMat, stream)
|
||||
npMat2 = cuMat.download(stream=stream)
|
||||
stream.waitForCompletion()
|
||||
self.assertTrue(np.allclose(npMat2, npMat))
|
||||
|
||||
def test_cuda_interop(self):
|
||||
npMat = (np.random.random((128, 128, 3)) * 255).astype(np.uint8)
|
||||
cuMat = cv.cuda_GpuMat()
|
||||
|
||||
Reference in New Issue
Block a user