mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 07:13:02 +04:00
Merge pull request #20555 from TolyaTalamanov:at/fix-compileStreaming-bug
[G-API] Extend compileStreaming to support different overloads * Make different overloads * Order python compileStreaming overloads * Fix compileStreaming bug * Replace gin -> descr_of * Set error message * Fix review comments * Use macros for pyopencv_to GMetaArgs * Use GAPI_PROP_RW * Not split Prims python stuff
This commit is contained in:
committed by
GitHub
parent
fdaa6ff9e3
commit
5ad6ff239b
@@ -261,6 +261,7 @@ try:
|
||||
if curr_frame_number == max_num_frames:
|
||||
break
|
||||
|
||||
|
||||
def test_desync(self):
|
||||
path = self.find_file('cv/video/768x576.avi', [os.environ['OPENCV_TEST_DATA_PATH']])
|
||||
|
||||
@@ -307,6 +308,49 @@ try:
|
||||
self.assertLess(0, none_counter)
|
||||
|
||||
|
||||
def test_compile_streaming_empty(self):
|
||||
g_in = cv.GMat()
|
||||
comp = cv.GComputation(g_in, cv.gapi.medianBlur(g_in, 3))
|
||||
comp.compileStreaming()
|
||||
|
||||
|
||||
def test_compile_streaming_args(self):
|
||||
g_in = cv.GMat()
|
||||
comp = cv.GComputation(g_in, cv.gapi.medianBlur(g_in, 3))
|
||||
comp.compileStreaming(cv.gapi.compile_args(cv.gapi.streaming.queue_capacity(1)))
|
||||
|
||||
|
||||
def test_compile_streaming_descr_of(self):
|
||||
g_in = cv.GMat()
|
||||
comp = cv.GComputation(g_in, cv.gapi.medianBlur(g_in, 3))
|
||||
img = np.zeros((3,300,300), dtype=np.float32)
|
||||
comp.compileStreaming(cv.gapi.descr_of(img))
|
||||
|
||||
|
||||
def test_compile_streaming_descr_of_and_args(self):
|
||||
g_in = cv.GMat()
|
||||
comp = cv.GComputation(g_in, cv.gapi.medianBlur(g_in, 3))
|
||||
img = np.zeros((3,300,300), dtype=np.float32)
|
||||
comp.compileStreaming(cv.gapi.descr_of(img),
|
||||
cv.gapi.compile_args(cv.gapi.streaming.queue_capacity(1)))
|
||||
|
||||
|
||||
def test_compile_streaming_meta(self):
|
||||
g_in = cv.GMat()
|
||||
comp = cv.GComputation(g_in, cv.gapi.medianBlur(g_in, 3))
|
||||
img = np.zeros((3,300,300), dtype=np.float32)
|
||||
comp.compileStreaming([cv.GMatDesc(cv.CV_8U, 3, (300, 300))])
|
||||
|
||||
|
||||
def test_compile_streaming_meta_and_args(self):
|
||||
g_in = cv.GMat()
|
||||
comp = cv.GComputation(g_in, cv.gapi.medianBlur(g_in, 3))
|
||||
img = np.zeros((3,300,300), dtype=np.float32)
|
||||
comp.compileStreaming([cv.GMatDesc(cv.CV_8U, 3, (300, 300))],
|
||||
cv.gapi.compile_args(cv.gapi.streaming.queue_capacity(1)))
|
||||
|
||||
|
||||
|
||||
except unittest.SkipTest as e:
|
||||
|
||||
message = str(e)
|
||||
|
||||
Reference in New Issue
Block a user