1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 07:13:02 +04:00

Merge pull request #22494 from TolyaTalamanov:at/expose-all-core-to-python

G-API Expose all core operations to python

* Expose all G-API core operations to python

* Fix typo in python gapi types test
This commit is contained in:
Anatoliy Talamanov
2022-11-08 11:43:38 +00:00
committed by GitHub
parent 8a90948a1c
commit 2aad039b4f
11 changed files with 149 additions and 86 deletions
@@ -76,6 +76,10 @@ class GOpaque():
def __new__(self):
return cv.GOpaqueT(cv.gapi.CV_POINT2F)
class Point3f():
def __new__(self):
return cv.GOpaqueT(cv.gapi.CV_POINT3F)
class Size():
def __new__(self):
return cv.GOpaqueT(cv.gapi.CV_SIZE)
@@ -127,6 +131,10 @@ class GArray():
def __new__(self):
return cv.GArrayT(cv.gapi.CV_POINT2F)
class Point3f():
def __new__(self):
return cv.GArrayT(cv.gapi.CV_POINT3F)
class Size():
def __new__(self):
return cv.GArrayT(cv.gapi.CV_SIZE)
@@ -167,6 +175,7 @@ def op(op_id, in_types, out_types):
cv.GArray.String: cv.gapi.CV_STRING,
cv.GArray.Point: cv.gapi.CV_POINT,
cv.GArray.Point2f: cv.gapi.CV_POINT2F,
cv.GArray.Point3f: cv.gapi.CV_POINT3F,
cv.GArray.Size: cv.gapi.CV_SIZE,
cv.GArray.Rect: cv.gapi.CV_RECT,
cv.GArray.Scalar: cv.gapi.CV_SCALAR,
@@ -186,6 +195,7 @@ def op(op_id, in_types, out_types):
cv.GOpaque.String: cv.gapi.CV_STRING,
cv.GOpaque.Point: cv.gapi.CV_POINT,
cv.GOpaque.Point2f: cv.gapi.CV_POINT2F,
cv.GOpaque.Point3f: cv.gapi.CV_POINT3F,
cv.GOpaque.Size: cv.gapi.CV_SIZE,
cv.GOpaque.Rect: cv.gapi.CV_RECT,
cv.GOpaque.Prim: cv.gapi.CV_DRAW_PRIM,
@@ -200,6 +210,7 @@ def op(op_id, in_types, out_types):
cv.gapi.CV_STRING: 'cv.gapi.CV_STRING' ,
cv.gapi.CV_POINT: 'cv.gapi.CV_POINT' ,
cv.gapi.CV_POINT2F: 'cv.gapi.CV_POINT2F' ,
cv.gapi.CV_POINT3F: 'cv.gapi.CV_POINT3F' ,
cv.gapi.CV_SIZE: 'cv.gapi.CV_SIZE',
cv.gapi.CV_RECT: 'cv.gapi.CV_RECT',
cv.gapi.CV_SCALAR: 'cv.gapi.CV_SCALAR',