You need to pass in the correct arguments, to find these in the python interpreter you can type
help(cv2.cuda.resize)
or if you are in a jupyter notebook you can get these by using shift+tab, I have included the output from this for for cv2.cuda.resize
function below
Docstring:
resize(src, dsize[, dst[, fx[, fy[, interpolation[, stream]]]]]) -> dst
. @brief Resizes an image.
.
. @Param src Source image.
. @Param dst Destination image with the same type as src . The size is dsize (when it is non-zero)
. or the size is computed from src.size() , fx , and fy .
. @Param dsize Destination image size. If it is zero, it is computed as:
. \f[\texttt{dsize = Size(round(fx*src.cols), round(fy*src.rows))}\f]
. Either dsize or both fx and fy must be non-zero.
. @Param fx Scale factor along the horizontal axis. If it is zero, it is computed as:
. \f[\texttt{(double)dsize.width/src.cols}\f]
. @Param fy Scale factor along the vertical axis. If it is zero, it is computed as:
. \f[\texttt{(double)dsize.height/src.rows}\f]
. @Param interpolation Interpolation method. INTER_NEAREST , INTER_LINEAR and INTER_CUBIC are
. supported for now.
. @Param stream Stream for the asynchronous version.
.
. @sa resize
Type: builtin_function_or_method
You should therefore be able to resize with the following
cv2.cuda.resize(lumGPU0,(imgHDX,imgHDY),lumGPU,interpolation=cv2.INTER_CUBIC)
if you pre-initialize lumGPU
, e.g.
lumGPU = cv2.cuda_GpuMat(imgHDY,imgHDX,lumGPU0.type())
otherwise you will need lumGPU
to be the return value
lumGPU = cv2.cuda.resize(lumGPU0,(imgHDX,imgHDY),interpolation=cv2.INTER_CUBIC)