Commit Graph

133 Commits

Author SHA1 Message Date
Maxim Pashchenkov
277f0d270f
Merge pull request #16745 from Volskig:mp/ocv-gapi-standalone-size
G-API: Unification of own:: structures with cv:: (Size, Point, Rect)

* deowned Size Rect Point

* Deownded Size Rect Point

* With Scalar
2020-04-02 18:19:45 +00:00
Maxim Pashchenkov
557ac3dbaf
Merge pull request #16805 from Volskig:mp/ocv-gapi-standalone-scalar
G-API: Unification of own:: Scalar with cv:: Scalar

* cvdefs.hpp

* Small changes

* Deowned Scalar. Does't work

* Something

* Removed to_ocv for Scalar

* Clear code

* Deleted whitespaces

* Added include<..own/scalar.hpp in cvdefs.hpp.

* Long string split on two now

* Comment about scalar

* Comment about crutch

* Removed second varible in scalar_wrapper

* Changed wrapper for scalar, alignment

* Alignment

* Whitespaces

* Removed scalar_wrapper
2020-04-01 18:40:38 +00:00
Anatoliy Talamanov
c303aaa94d
Merge pull request #16841 from TolyaTalamanov:at/warp-perspective
G-API: Implement WarpPerspective

* Implement WarpPerspective kernel

* Fix comment to review
2020-03-25 11:23:32 +00:00
Anatoliy Talamanov
4d3d6230c5
Merge pull request #16803 from TolyaTalamanov:at/yuv-to-gray
* Implement NV12toGray

* Snapshot

* Implement NV12toGray as compound kernel

* Update gapi_imgproc_tests_inl.hpp

* Remove YUV2Gray from public API
2020-03-24 10:51:18 +00:00
Anton Potapov
31d624f9a8 G-API utils - fix compilation error in variant::operator= 2020-03-20 14:46:13 +03:00
Anatoliy Talamanov
8fe9674301
Merge pull request #16768 from TolyaTalamanov:at/add-warp-affine
G-API: Implement WarpAffine

* Add WarpAffine

* Ban BORDER_TRANSPARENT

* Fix doc
2020-03-19 12:12:09 +00:00
Anton Potapov
3af63fe052 GAPI - KW fixes
- avoid overflow in own::Mat::total() and according tests, part 2
2020-03-13 12:46:18 +03:00
Anton Potapov
d3b68b059b GAPI - KW fixes
- avoid overflow in own::Mat::total() and according tests
2020-03-12 13:29:54 +03:00
Maxim Pashchenkov
3befdb4ae8
Merge pull request #16604 from Volskig:mp/ocv-gapi-zero-height-mat
G-API: Zero-height mat is cause of crash

* Added check for zero-height Mat case

* Refactoring, added validate_input_arg func

* No bool function now
2020-03-10 14:44:16 +03:00
Maxim Pashchenkov
bce9837604 Added assert for create Mat with negative dims, added tets for this case 2020-03-05 11:52:10 +03:00
Anton Potapov
8ed89bae84 KW: G-API tests - fixes for uninitialized variables 2020-03-03 11:37:40 +03:00
Alexander Alekhin
e93c51762b gapi(test): fix check 2020-02-27 19:43:06 +00:00
Alexander Alekhin
f2d3edec80 gapi(test): ban and get rid of countNonZero() checks 2020-02-26 14:19:19 +03:00
Anatoliy Talamanov
a6ef9b4584
Merge pull request #16213 from TolyaTalamanov:at/lambdas-for-kernels
G-API: Using functors as kernel implementation

* Implement ability to create kernel impls from functors

* Clean up

* Replace make_ocv_functor to ocv_kernel

* Clean up

* Replace GCPUFunctor -> GOCVFunctor
* Move GOCVFunctor to cv::gapi::cpu namespace

* Implement override for rvalue and lvalue cases

* Fix comments to review

* Remove GAPI_EXPORT for template functions

* Fix indentation
2020-02-17 23:29:55 +03:00
Alexey Smirnov
0d456f9111
Merge pull request #16118 from smirnov-alexey:as/gopaque
G-API: GOpaque implementation

* Stub initial copypasted solution

* Fix mov test and add a couple of others

* Fix warnings

* More code coverage and tests

* fix macos warning

* address review comments

* Address review comments and fix indentation

* Fix build on armv7
2020-01-30 21:08:11 +03:00
Alexander Alekhin
4b2363de5c gapi(test): update test tolerance for DIV operation on ARM 2020-01-24 17:07:24 +03:00
Anatoliy Talamanov
55f2370f36 Merge pull request #16221 from TolyaTalamanov:at/fix-g_typed_kernel_m
G-API: Fix G_TYPED_KERNEL_M macro

* Fix G_TYPED_KERNEL_M macro

* Fixes

* Fix windows build
* Fix doxygen

* Added several macros

* Add overloads for G_TYPED_KERNEL
2020-01-13 14:54:10 +03:00
Brian Wignall
659ffaddb4 Fix spelling typos 2019-12-26 06:45:03 -05:00
Maksim Shabunin
b379969c63 Test: avoid duplicated test cases 2019-12-19 14:38:59 +03:00
Alexander Alekhin
fd4fac946a gapi(test): avoid using of unstable random floating-point input 2019-12-17 13:48:40 +03:00
atalaman
4a4ff6749b Merge pull request #16080 from TolyaTalamanov:at/fix-mosaic-primitive
G-API: Mosaic handle corner cases

* Handle corner cases

* Fix mosaic algo

* Fix bug with empty rects
2019-12-12 19:10:14 +03:00
Alexander Alekhin
8b9982a0a5 Merge pull request #16086 from alalek:gapi_test_bitwise_not_exclude_32f 2019-12-11 14:00:59 +00:00
Dmitry Matveev
9a18330f3a Merge pull request #16081 from dmatveev:dm/ocv42_gapi_bugfixes
G-API: Fix various issues for 4.2 release

* G-API: Fix issues reported by Coverity

- Fixed: passing values by value instead of passing by reference

* G-API: Fix redundant std::move()'s in return statements

Fixes #15903

* G-API: Added a smarter handling of Stop messages in the pipeline

- This should fix the "expected 100, got 99 frames" problem
- Fixes #15882

* G-API: Pass enum instead of GKernelPackage in Streaming test parameters

- Likely fixes #15836

* G-API: Address review issues in new bugfix comments
2019-12-10 13:31:42 +03:00
Alexander Alekhin
c0503718cd gapi(test): exclude 32F from bitwise_not case 2019-12-06 18:12:45 +03:00
Dmitry Matveev
ccf415c341 G-API: Added an arbitrary-argument version of cv::gapi::combine
- Now user doesn't need to do `combine(x, combine(y, combine(z, zz)))` but
  just `combine(x, y, z, zz)`
2019-12-06 10:47:50 +03:00
Alexander Alekhin
529a241a26 Merge pull request #15972 from TolyaTalamanov:at/ftext-primitive 2019-12-03 20:09:21 +00:00
Pinaev Danil
5e3a7ac8a7 Merge pull request #16031 from aDanPin:dm/streaming_auto_meta
G-API-NG/Streaming: don't require explicit metadata in compileStreaming()

* First probably working version
Hardcode gose to setSource() :)

* Pre final version of move metadata declaration from compileStreaming() to setSource().

* G-API-NG/Streaming: recovered the existing Streaming functionality

- The auto-meta test is disabling since it crashes.
- Restored .gitignore

* G-API-NG/Streaming: Made the meta-less compileStreaming() work

- Works fine even with OpenCV backend;
- Fluid doesn't support such kind of compilation so far - to be fixed

* G-API-NG/Streaming: Fix Fluid to support meta-less compilation

- Introduced a notion of metadata-sensitive passes and slightly
  refactored GCompiler and GFluidBackend to support that
- Fixed a TwoVideoSourcesFail test on streaming

* Add three smoke streaming tests to gapi_streaming_tests.
All three teste run pipeline with two different input sets
1) SmokeTest_Two_Const_Mats test run pipeline with two const Mats
2) SmokeTest_One_Video_One_Const_Scalar test run pipleline with Mat(video source) and const Scalar
3) SmokeTest_One_Video_One_Const_Vector test run pipeline with Mat(video source) and const Vector
 # Please enter the commit message for your changes. Lines starting

* style fix

* Some review stuff

* Some review stuff
2019-12-03 19:14:13 +03:00
Talamanov, Anatoliy
63b154396a Implement cv::gapi::wip::draw::FText 2019-12-03 13:13:06 +03:00
atalaman
a7acb8805f Merge pull request #15869 from TolyaTalamanov:at/plaidml-backend
G-API: Implement PlaidML2 backend

* PlaidML backend init version

* Add test

* Support multiply inputs/outputs in PlaidML2 backend

* Fix comment to review

* Add HAVE_PLAIDML macros

* Move plaidml tests to separate file

* Fix comment to review

* Fix cmake warning

* Fix comments to review

* Fix typos

overload -> overflow

* Fix comments to review

* Clean up

* Remove spaces from cmake scripts
* Disable tests with bitwise operations

* Use plaidml::exec::Binder
2019-11-27 18:21:00 +03:00
Brian Wignall
9276f1910b Fix some typos 2019-11-25 19:55:07 -05:00
Ruslan Garnov
1261559305 Fixed own::Mat::empty() for non md case 2019-11-18 16:38:33 +03:00
Alexander Alekhin
d1c4e4b5a5 Merge pull request #15906 from anton-potapov:gapi_fluid_i420_support 2019-11-14 14:07:05 +00:00
Anton Potapov
b5426a8679 G-API (Fluid) core support for I420
- Extended NV12 support in Fluid Core engine to cover I420
2019-11-14 11:16:17 +03:00
Anna Khakimova
363976694e GAPI Fluid: The run_sepfilter() has logic error into handler for 5x5 and larger kernels 2019-11-12 14:47:42 +03:00
atalaman
ea64bb58a5 Merge pull request #15751 from TolyaTalamanov:at/refactor-render-tests
* Refactor render tests

* Fix comment to review

* Move ocv render tests stuff to specific file

* Add OCV prefix for render tests

* Fix comments to review
2019-10-30 13:33:39 +03:00
Dmitry Matveev
2477103707 Merge pull request #15216 from dmatveev:dm/ng-0010-g-api-streaming-api
* G-API-NG/Streaming: Introduced a Streaming API

Now a GComputation can be compiled in a special "streaming" way
and then "played" on a video stream.

Currently only VideoCapture is supported as an input source.

* G-API-NG/Streaming: added threading & real streaming

* G-API-NG/Streaming: Added tests & docs on Copy kernel

- Added very simple pipeline tests, not all data types are covered yet
  (in fact, only GMat is tested now);
- Started testing non-OCV backends in the streaming mode;
- Added required fixes to Fluid backend, likely it works OK now;
- Added required fixes to OCL backend, and now it is likely broken
- Also added a UMat-based (OCL) version of Copy kernel

* G-API-NG/Streaming: Added own concurrent queue class

- Used only if TBB is not available

* G-API-NG/Streaming: Fixing various issues

- Added missing header to CMakeLists.txt
- Fixed various CI issues and warnings

* G-API-NG/Streaming: Fixed a compile-time GScalar queue deadlock

- GStreamingExecutor blindly created island's input queues for
  compile-time (value-initialized) GScalars which didn't have any
  producers, making island actor threads wait there forever

* G-API-NG/Streaming: Dropped own version of Copy kernel

One was added into master already

* G-API-NG/Streaming: Addressed GArray<T> review comments

- Added tests on mov()
- Removed unnecessary changes in garray.hpp

* G-API-NG/Streaming: Added Doxygen comments to new public APIs

Also fixed some other comments in the code

* G-API-NG/Streaming: Removed debug info, added some comments & renamed vars

* G-API-NG/Streaming: Fixed own-vs-cv abstraction leak

- Now every island is triggered with own:: (instead of cv::)
  data objects as inputs;
- Changes in Fluid backend required to support cv::Mat/Scalar were
  reverted;

* G-API-NG/Streaming: use holds_alternative<> instead of index/index_of test

- Also fixed regression test comments
- Also added metadata check comments for GStreamingCompiled

* G-API-NG/Streaming: Made start()/stop() more robust

- Fixed various possible deadlocks
- Unified the shutdown code
- Added more tests covering different corner cases on start/stop

* G-API-NG/Streaming: Finally fixed Windows crashes

In fact the problem hasn't been Windows-only.
Island thread popped data from queues without preserving the Cmd
objects and without taking the ownership over data acquired so when
islands started to process the data, this data may be already freed.

Linux version worked only by occasion.

* G-API-NG/Streaming: Fixed (I hope so) Windows warnings

* G-API-NG/Streaming: fixed typos in internal comments

- Also added some more explanation on Streaming/OpenCL status

* G-API-NG/Streaming: Added more unit tests on streaming

- Various start()/stop()/setSource() call flow combinations

* G-API-NG/Streaming: Added tests on own concurrent bounded queue

* G-API-NG/Streaming: Added more tests on various data types, + more

- Vector/Scalar passed as input;
- Vector/Scalar passed in-between islands;
- Some more assertions;
- Also fixed a deadlock problem when inputs are mixed (1 constant, 1 stream)

* G-API-NG/Streaming: Added tests on output data types handling

- Vector
- Scalar

* G-API-NG/Streaming: Fixed test issues with IE + Windows warnings

* G-API-NG/Streaming: Decoupled G-API from videoio

- Now the core G-API doesn't use a cv::VideoCapture directly,
  it comes in via an abstract interface;
- Polished a little bit the setSource()/start()/stop() semantics,
  now setSource() is mandatory before ANY call to start().

* G-API-NG/Streaming: Fix STANDALONE build (errors brought by render)
2019-10-18 19:29:58 +03:00
atalaman
2ff12c4981 Merge pull request #15699 from TolyaTalamanov:at/graph-ocv-render-backend-skeleton
G-API: Implement OpenCV render backend

* Implement render opencv backend

* Fix comment to review

* Add comment

* Add wrappers for kernels

* Fix comments to review

* Fix comment to review
2019-10-17 21:04:03 +03:00
Alexander Alekhin
2f30c3fd4f Merge pull request #15681 from mshabunin:fix-gapi-ie-test 2019-10-11 13:12:45 +00:00
Maksim Shabunin
230e44b01d G-API: removed deprecated IE call from test 2019-10-10 12:58:59 +03:00
Alexander Alekhin
9efafc3e33 Merge pull request #15673 from TolyaTalamanov:at/fix-valgrind-issue 2019-10-09 22:48:24 +00:00
Talamanov, Anatoliy
40215f99d7 Define operator<< for cv::gapi::wip::draw::Prim 2019-10-09 13:41:36 +03:00
Pinaev Danil
9ab5e52f04 Merge pull request #15632 from aDanPin:dp/any_ref_tests
* Add a few more tests on `any`

Added tests:
- get_ref_to_val_from_any
- update_val_via_ref

* Style fix
2019-10-08 12:42:49 +03:00
AsyaPronina
4429352125 OpenCV G-API test for Filter2d has changed:
> Size parameter is changed from int to cv::Size type to allow rectangle kernels
    > Kernel creation code is adopted for different kernel sizes to not create only white images on the output
2019-10-04 21:25:33 +03:00
Talamanov, Anatoliy
06067efa3f Add new render primitives 2019-10-01 12:11:41 +03:00
Andrey Golubev
9f4f9000bc Merge pull request #15313 from andrey-golubev:map_subst_to_pattern
G-API: add transformation logic to GCompiler

* Introduce transformation logic to GCOmpiler

* Remove partialOk() method

* Fix minor issues

* Refactor code according to code review

1. Re-design matchPatternToSubstitute logic
2. Update transformations order
3. Replace check_transformations pass with a
   one time check in GCompiler ctor

* Revert unused nodes handling in pattern matching

* Address minor code review issues

* Address code review comments:

1) Fix some mistakes
2) Add new tests for endless loops
3) Update GCompiler's transformations logic

* Simplify GCompiler check for endless loops

1. Simplify transformations endless loops check:
 - Original idea wasn't a full solution
 - Need to develop a good method (heuristic?) to find loops
   in general case (TODO)
2. Remove irrelevant Endless Loops tests
3. Add new "bad arg" tests and unit tests

* Update comments
2019-09-25 18:19:45 +03:00
smirnov-alexey
bab8addcbb Move maxval to threshold tests parameter
Fix documentation
2019-09-23 14:21:33 +03:00
Alexander Alekhin
6d669dcd7d gapi(test): fix 32S->8U type in OwnMatConversion.WithND 2019-09-03 14:00:28 +03:00
OrestChura
55c1720719 Merge pull request #15419 from OrestChura:gapi_headers_internal_flag_issue
* - headers in "infer/" and "infer/ie/" folders are included into gapi_ext_hdrs;
+ because of that a few #includes are required in the headers
- HAVE_INF_ENGINE flag check in headers "infer/ie.hpp" and "infer/ie/util.hpp" is deleted

* - the "ie/util.hpp" header is a private header now as it's used for tests; it's been moved to the scr directory to the place next to the implementation file "ie/giebackend.cpp"
- the path to this header in files "ie/giebackend.cpp" and "test/infer/gapi_infer_ie_test.cpp" is updated
- As it's private header now and explicitly depends on IE, the "HAVE_INF_ENGINE" flag check is returned
2019-09-03 13:22:12 +03:00
Alexey Smirnov
8a7e74673e Merge pull request #15312 from smirnov-alexey:gapi_fluid_garray
* Support GArray as input in fluid kernels

* Create tests on GArray input in fluid

* Some fixes to fully support GArray

* Refactor code and change the kernel according to review

* Add histogram calculation as a G-API kernel

Add assert that input GArgs in fluid contain at least one GMat
2019-09-02 15:51:58 +03:00
Alexander Alekhin
1ae001d10a Merge pull request #15378 from andrey-golubev:acc_tests_doc 2019-08-27 12:20:05 +00:00