Opencv cuda python remap error cv.cuda.remap(raw, mapx, mapy, cv.INTER_CUBIC, borderMode=cv.COLOR_RGB2GRAY)
I have installed opencv '4.2.0 dev' ,an already built package from https://jamesbowley.co.uk/accelerate-... (https://jamesbowley.co.uk/downloads/)... trying to use cv2.cuda.remap but it's throwing error as below:
cv.cuda.remap(raw, mapx, mapy, cv.INTER_CUBIC, borderMode=cv.COLOR_RGB2GRAY)
TypeError: Expected Ptr<cv::umat> for argument 'src' my code:
import numpy
import cv2 as cv
import numpy as np
npTmp = np.random.random((1024, 1024)).astype(np.float32)
npMat1 = np.stack([npTmp,npTmp],axis=2)
raw= cv.cuda_GpuMat()
raw.upload(npMat1)
a=np.array()
mapx = numpy.ndarray(shape=(640, 480, 1),
dtype='float32')
mapy = numpy.ndarray(shape=(640, 480, 1),
dtype='float32')
cv.cuda.remap(raw,a, mapx, mapy, cv.INTER_CUBIC, borderMode=cv.COLOR_RGB2GRAY)