mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-20 12:55:15 +08:00

Migrate G-API module from main repo to opencv_contrib #3827 Related to https://github.com/opencv/opencv/pull/26469 Required https://github.com/opencv/opencv/pull/26527 CI: https://github.com/opencv/ci-gha-workflow/pull/201 TODO: - [x] Python types generator fix - [x] CI update ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [ ] The PR is proposed to the proper branch - [ ] There is a reference to the original bug report and related work - [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [ ] The feature is well documented and sample code can be built with the project CMake
49 lines
1.2 KiB
Python
49 lines
1.2 KiB
Python
#!/usr/bin/env python
|
|
|
|
import numpy as np
|
|
import cv2 as cv
|
|
import os
|
|
import sys
|
|
import unittest
|
|
|
|
from tests_common import NewOpenCVTests
|
|
|
|
|
|
try:
|
|
|
|
if sys.version_info[:2] < (3, 0):
|
|
raise unittest.SkipTest('Python 2.x is not supported')
|
|
|
|
class gapi_kernels_test(NewOpenCVTests):
|
|
|
|
def test_fluid_core_package(self):
|
|
fluid_core = cv.gapi.core.fluid.kernels()
|
|
self.assertLess(0, fluid_core.size())
|
|
|
|
def test_fluid_imgproc_package(self):
|
|
fluid_imgproc = cv.gapi.imgproc.fluid.kernels()
|
|
self.assertLess(0, fluid_imgproc.size())
|
|
|
|
def test_combine(self):
|
|
fluid_core = cv.gapi.core.fluid.kernels()
|
|
fluid_imgproc = cv.gapi.imgproc.fluid.kernels()
|
|
fluid = cv.gapi.combine(fluid_core, fluid_imgproc)
|
|
self.assertEqual(fluid_core.size() + fluid_imgproc.size(), fluid.size())
|
|
|
|
except unittest.SkipTest as e:
|
|
|
|
message = str(e)
|
|
|
|
class TestSkip(unittest.TestCase):
|
|
def setUp(self):
|
|
self.skipTest('Skip tests: ' + message)
|
|
|
|
def test_skip():
|
|
pass
|
|
|
|
pass
|
|
|
|
|
|
if __name__ == '__main__':
|
|
NewOpenCVTests.bootstrap()
|