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

Merge pull request #19322 from TolyaTalamanov:at/python-callbacks

[G-API] Introduce cv.gin/cv.descr_of for python

* Implement cv.gin/cv.descr_of

* Fix macos build

* Fix gcomputation tests

* Add test

* Add using to a void exceeded length for windows build

* Add using to a void exceeded length for windows build

* Fix comments to review

* Fix comments to review

* Update from latest master

* Avoid graph compilation to obtain in/out info

* Fix indentation

* Fix comments to review

* Avoid using default in switches

* Post output meta for giebackend
This commit is contained in:
Anatoliy Talamanov
2021-03-01 18:52:11 +03:00
committed by GitHub
parent 7bcb51eded
commit eb82ba36a3
26 changed files with 825 additions and 220 deletions
@@ -19,7 +19,7 @@ class test_gapi_streaming(NewOpenCVTests):
g_in = cv.GMat()
g_out = cv.gapi.medianBlur(g_in, 3)
c = cv.GComputation(g_in, g_out)
ccomp = c.compileStreaming(cv.descr_of(cv.gin(in_mat)))
ccomp = c.compileStreaming(cv.descr_of(in_mat))
ccomp.setSource(cv.gin(in_mat))
ccomp.start()
@@ -191,7 +191,9 @@ class test_gapi_streaming(NewOpenCVTests):
# NB: OpenCV & G-API have different output shapes:
# OpenCV - (num_points, 1, 2)
# G-API - (num_points, 2)
self.assertEqual(0.0, cv.norm(e.flatten(), a.flatten(), cv.NORM_INF))
self.assertEqual(0.0, cv.norm(e.flatten(),
np.array(a, np.float32).flatten(),
cv.NORM_INF))
proc_num_frames += 1
if proc_num_frames == max_num_frames: