Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Changing brightness and contrast cv2.cuda python

Hi all, I'm trying to modify brightness and contrast of an Image but it returns the error

cv2.error: OpenCV(4.2.0-dev) F:\Dev\Repos\opencv_fork_1\modules\core\src\matrix_wrap.cpp:359: error: (-213:The function/feature is not implemented) getGpuMat is available only for cuda::GpuMat and cuda::HostMem in function 'cv::_InputArray::getGpuMat'

my code,

import time, traceback
import numpy
import cv2 as cv
import numpy as np
img= cv.imread('test.jpeg')
raw= cv.cuda_GpuMat()
raw.upload(img)
b=raw.convertTo(cv.CV_8U,50,45)
img = b.download()
cv.imshow("Corrected",img)

Changing brightness and contrast cv2.cuda python

Hi all, I'm trying to modify brightness and contrast of an Image but it returns the error

cv2.error: OpenCV(4.2.0-dev) F:\Dev\Repos\opencv_fork_1\modules\core\src\matrix_wrap.cpp:359: error: (-213:The function/feature is not implemented) getGpuMat is available only for cuda::GpuMat and cuda::HostMem in function 'cv::_InputArray::getGpuMat'

my code,

import time, traceback
import numpy
import cv2 as cv
import numpy as np
img= img = cv.imread('test.jpeg')
raw= raw = cv.cuda_GpuMat()
raw.upload(img)
b=raw.convertTo(cv.CV_8U,50,45)
alpha = 50
beta = 45
b = raw.convertTo(cv.CV_8U,alpha,beta)
img = b.download()
cv.imshow("Corrected",img)