1 | initial version |
You need to pass in the correct arguments, if you use a jupyter notebook you can get these by using shift tab, I have copied the help for resize in case you are not using jupyter
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 per-initialize lumGPU
, e.g.
lumGPU = cv2.cuda_GpuMat(imgHDY,imgHDX,cv.CV_8UC1)
otherwise you will need lumGPU
to be the return value
lumGPU = cv2.cuda.resize(lumGPU0,(imgHDX,imgHDY),interpolation=cv2.INTER_CUBIC)
2 | No.2 Revision |
You need to pass in the correct arguments, if you use a jupyter notebook you can get these by using shift tab, I have copied the help for resize in case you are not using jupyter
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 per-initialize lumGPU
, e.g.
lumGPU = cv2.cuda_GpuMat(imgHDY,imgHDX,cv.CV_8UC1)
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)
3 | No.3 Revision |
You need to pass in the correct arguments, if you use a jupyter notebook you can get these by using shift tab, I have copied the help for resize in case you are not using jupyter
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 per-initialize 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)
4 | No.4 Revision |
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 use are in a jupyter notebook you can get these by using shift tab, shift+tab, I have copied the help included the output from this for resize in case you are not using jupyterfor 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)