You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am trying to write some glue code for a third-party library.
In the code, I need to return a data of type cv2.UMat.
Now I can use cv2.Mat(descs) to get a Mat, but I can't find a way to convert cv2.Mat to cv2.UMat.
I tried umat = cv.UMat(mat), mat.copyTo(umat), umat = cv.UMat(descs.shape[0], descs.shape[1], descs.dtype, cv.USAGE_DEFAULT), but none of them worked.
I found on the Internet that there seems to be such a method in C to convert Mat to UMat, but I can't seem to find it in Python.
Can you give some suggestions?
The text was updated successfully, but these errors were encountered:
Hello, I am trying to write some glue code for a third-party library.
In the code, I need to return a data of type
cv2.UMat
.Now I can use
cv2.Mat(descs)
to get aMat
, but I can't find a way to convertcv2.Mat
tocv2.UMat
.I tried
umat = cv.UMat(mat)
,mat.copyTo(umat)
,umat = cv.UMat(descs.shape[0], descs.shape[1], descs.dtype, cv.USAGE_DEFAULT)
, but none of them worked.I found on the Internet that there seems to be such a method in C to convert
Mat
toUMat
, but I can't seem to find it in Python.Can you give some suggestions?
The text was updated successfully, but these errors were encountered: