junxnone / aiwiki

AI Wiki
https://junxnone.github.io/aiwiki
18 stars 2 forks source link

OpenCV TAPI #436

Open junxnone opened 1 year ago

junxnone commented 1 year ago

TAPI - Transparent API

Mat <-> UMat

C++

mat.copyTo(umat);
UMat umat = mat.getUMat( flag );

flag: ACCESS_READ/ACCESS_WRITE/ACCESS_RW/ACCESS_FAST

mat = umat.getMat( flag )

Python

umat = cv2.UMat(mat)
mat = cv2.UMat.get(umat)

Reference