Commit Graph

461 Commits

Author SHA1 Message Date
Ruslan Garnov
be1615b1c3
Merge pull request #16964 from rgarnov:rg/opaque_for_streaming_exec
* Added GOpaque support to GStreamingExecutor

* Added inter-island GOpaque support to GExecutor
2020-04-06 15:53:54 +00:00
Maxim Pashchenkov
ca9fd66744
Merge pull request #16886 from mpashchenkov:mp/ocv-gapi-add-disable
G-API: DISABLED_ in tests instead #if 0

* Removed if 0, replaced with DISABLED_

* boner

* Added tests for fluid

* -1 instead 0.0

* Added GMatDesc's tests for own::Mat

* IMGPROC_FLUID CORE_FLUID

* Added use_only, disabled tests without kernels
2020-04-06 15:21:08 +00:00
Alexander Alekhin
bdc95d2c66 Merge pull request #16911 from anton-potapov:ap/variant_move_issue 2020-04-06 15:19:32 +00:00
Alexander Alekhin
a10385543b Merge pull request #16963 from rgarnov:rg/gframe 2020-04-06 14:35:52 +00:00
Dmitry Matveev
1b5730a799 Introduce a new abstraction layer over island input/output data
- Port GExecutor to this new interface
2020-04-06 12:24:19 +03:00
Ruslan Garnov
c8776e6ebd Added GFrame 2020-04-03 01:21:51 +03:00
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
Anton Potapov
3ffed0bf6e GAPI - KW fixes
- remove unreachable code in GIsland::producer()
2020-04-02 12:05:34 +03: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
Anton Potapov
faceb05775 G-API utils - make variant converting constructor and assignment
operator properly forward it's argument
2020-03-27 14:30:16 +03:00
Alexander Alekhin
99502e99cc gapi(simd): initialize accumulator values 2020-03-26 16:48:21 +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
Alexander Alekhin
978666c816 Merge pull request #16849 from anton-potapov:ap/variant__assignment_operator_compile_error 2020-03-23 22:04:48 +00:00
Dmitry Matveev
020be63df5 Try to enable G-API build on Android 2020-03-20 17:20:01 +03: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
Alexander Alekhin
a1230ad0a0 Merge pull request #16796 from anton-potapov:kw_fixes_own_mat_total_overflow 2020-03-12 13:05:52 +00:00
Anton Potapov
d3b68b059b GAPI - KW fixes
- avoid overflow in own::Mat::total() and according tests
2020-03-12 13:29:54 +03:00
Anton Potapov
3ba6b41961 GAPI - KW fixes
- replaced bitwise &= on bools, with explicit && to make KW happy
2020-03-11 18:16:56 +03:00
Anton Potapov
72fedbe096 GAPI - KW fixes
- replace "unsafe" memcpy with "safe" :) std::copy_n to make KW happy
2020-03-11 11:23:15 +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
Alexander Alekhin
23bc89d6fc Merge pull request #16577 from Volskig:mp/ocv-gapi-work 2020-03-05 10:58:51 +00: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
Maxim Pashchenkov
f3a50224f2 Rm imgproc from render.cpp 2020-03-05 11:41:36 +03:00
Anton Potapov
8ed89bae84 KW: G-API tests - fixes for uninitialized variables 2020-03-03 11:37:40 +03:00
Alexander Alekhin
db5f1c3554 Merge pull request #16688 from alalek:issue_16679 2020-02-27 20:55:49 +00:00
Alexander Alekhin
e93c51762b gapi(test): fix check 2020-02-27 19:43:06 +00:00
Rajkiran Natarajan
b17e9c614b Fix annoying compiler warning. 2020-02-26 22:59:02 -08:00
Alexander Alekhin
f2d3edec80 gapi(test): ban and get rid of countNonZero() checks 2020-02-26 14:19:19 +03:00
Dmitry Matveev
dae1fc8889
Merge pull request #16555 from dmatveev:dm/ocv_blog_sample
* G-API/Samples: Added a simple "privacy masking camera" sample

The main idea is to host this code for an opencv.org blog post only

* G-API/Samples: Modified privacy masking camera code to look better for the post

* G-API/Samples: fix Windows (MSVC) support in Privacy Masking Camera

* G-API/Samples: Addressed the majority of review comments in PMC

* G-API/Samples: Use TickMeter to measure time + more info in cmd options

* G-API/Samples: fix yet another Windows warning in PMC

* G-API/Samples: Fix wording in PMC cmd arg parameters

* Fix wording, again

* G-API/Samples: Fix PMC cmd-line arguments, again
2020-02-18 15:11:44 +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
Alexander Alekhin
7d998336d3 Merge pull request #16510 from andrey-golubev:unify_g_typed_kernel 2020-02-07 11:22:23 +00:00
Alexander Alekhin
d0d676929d Merge pull request #16519 from TolyaTalamanov:at/fix-render-text-slowdown 2020-02-06 13:38:22 +00:00
Talamanov, Anatoliy
4dffcbd9f0 Fix render opencv backend text slowdown 2020-02-06 15:12:38 +03:00
Andrey Golubev
5baa2c0706 Update documentation and clean up redundant code 2020-02-05 15:01:42 +02:00
Alexander Alekhin
c56e91dcc0 Merge pull request #16487 from asmorkalov:as/gapi_freetype 2020-02-04 11:40:15 +00:00
Andrey Golubev
e569e9dcbd Unify G_TYPED_KERNEL and G_TYPED_KERNEL_M 2020-02-04 02:16:51 +02:00
Alexander Smorkalov
a9a33d9a5f Fixed build with FREETYPE and without tests. 2020-02-03 16:41:31 +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
Alexander Alekhin
5265db82c7 Merge pull request #16409 from smirnov-alexey:as/gapi_fix_standalone_streaming 2020-01-24 08:47:57 +00:00
Smirnov Alexey
e5ed22bd5b Fix linkage in standalone mode 2020-01-22 17:51:16 +03:00
Ruslan Garnov
65ccafd494 Changed shared_ptr to unique_ptr for Priv storage in fluid::View 2020-01-21 18:03:03 +03:00
Ruslan Garnov
6c93e42d94 Changed sharev_ptr for Priv to unique_ptr for fluid::Buffer 2020-01-21 13:48:46 +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
Orest Chura
287874a444 Merge pull request #15942 from OrestChura:fb_tutorial
G-API: Tutorial: Face beautification algorithm implementation

* Introduce a tutorial on face beautification algorithm

- small typo issue in render_ocv.cpp

* Addressing comments rgarnov smirnov-alexey
2019-12-17 11:00:49 +03:00
Alexander Alekhin
c2b6c67431 Merge pull request #16141 from OrestChura:oc/fix-standalone-build 2019-12-12 18:34:12 +00: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
Dmitry Matveev
f270e8d040 Merge pull request #16066 from dmatveev:dm/gapi_slides
* G-API: Added G-API Overview slides & its source code

- Sample code snippets are moved to separate files;
- Introduced a separate benchmark to measure Fluid/OpenCV
  performance;
- Added notes on API changes (it is still a 4.0, not a 4.2 talk!)
- Added a "Metropolis" beamer download-n-build script.

* G-API: Addressed review issues on G-API overview slides
2019-12-12 18:48:38 +03:00
OrestChura
3cd8976493 Fix standalone-gapi 2019-12-12 18:22:16 +03:00
Alexander Alekhin
121bc50ca9 Merge pull request #16130 from alalek:fix_build_gapi_gcc_4.x 2019-12-11 14:17:03 +00:00
atalaman
0d19fa0720 Merge pull request #16062 from TolyaTalamanov:at/add-default-initlization-for-primitives
G-API: Add default initialization for primitives

* Add ctors for primitives

* Add description for constructors
2019-12-11 17:10:42 +03:00
Alexander Alekhin
b8ef2036b0 Merge pull request #16091 from dkurt:png_to_dot 2019-12-11 14:01:39 +00:00
Alexander Alekhin
8b9982a0a5 Merge pull request #16086 from alalek:gapi_test_bitwise_not_exclude_32f 2019-12-11 14:00:59 +00:00
Alexander Alekhin
6b6c2f6087 gapi: fix build with GCC 4.8 2019-12-11 13:31:50 +03: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
Dmitry Matveev
c89780dfe0 Merge pull request #16039 from dmatveev:dm/gapi_tutorial_interactive_face_detection
* G-API-NG/Docs: Added a tutorial page on interactive face detection sample

- Introduced a "--ser" option to run the pipeline serially for
  benchmarking purposes
- Reorganized sample code to better fit the documentation;
- Fixed a couple of issues (mainly typos) in the public headers

* G-API-NG/Docs: Reflected meta-less compilation in new G-API tutorial

* G-API-NG/Docs: Addressed review comments on Face Analytics Pipeline example
2019-12-10 00:30:10 +03:00
Alexander Alekhin
65d606630d Merge pull request #16084 from alalek:issue_15784 2019-12-07 22:33:11 +00:00
Dmitry Kurtaev
ad56838040 Replace .png to .dot 2019-12-07 15:03:28 +03:00
Alexander Alekhin
c0503718cd gapi(test): exclude 32F from bitwise_not case 2019-12-06 18:12:45 +03:00
Alexander Alekhin
1ddcfc5c68 gapi: update CMakeLists.txt, fix TBB dependency handling 2019-12-06 16:36:42 +03:00
Dmitry Matveev
b2b6f52d14 Merge pull request #16050 from dmatveev:dm/ocv42_gapi_doc_fixup
* G-API: Addressed various documentation issues

- Fixed various typos and missing references;
- Added brief documentaion on G_TYPED_KERNEL and G_COMPOUND_KERNEL macros;
- Briefly described GComputationT<>;
- Briefly described G-API data objects (in a group section).

* G-API: Some clean-ups in doxygen, also a chapter on Render API

* G-API: Expose more graph compilation arguments in the documentation

* G-API: Address documentation review comments
2019-12-06 15:36:02 +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
Pinaev Danil
53b6fb465c Merge pull request #15695 from aDanPin:dp/incorrect_use_of_muve_fix
Fix incorrect use of std::move() in g-api perf tests

* First version

* Fix perfomace tests

Replace

    c.apply(...);

with

    cc = c.compile(...);
    cc(...);

* Remove output meta arguments from .compile()

* Style fix

* Remove useless commented string

* Stick to common pattern : i.e. use gin() and gout() explicitly.

* Use cc(gin(...), gout(...)) in all cases.
2019-11-28 16:25:20 +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
Dmitry Matveev
fb5e7964b3 Merge pull request #15753 from dmatveev:dm/ng-5000-security_barrier-interactive_face
G-API: Introduced Security Barrier & Interactive Face Detection samples

* G-API-NG/Samples: Added samples & relevant changes

- Security barrier camera sample
- Age/Gender/Emotions recognition sample
- GIEBackend now loads CPU extension libraries
- A couple of API-level workarounds added to deal with cv::Mat/Blob conversions

* G-API-NG/Samples: removed HAVE_INF_ENGINE remnants
2019-11-27 17:54:17 +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
Orest Chura
af230ec133 Merge pull request #15888 from OrestChura:facebeautification_gapi_sample
Introducing the sample of Face Beautification algorithm implemented via Graph-API

* Introducing the sample of Face Beautification algorithm implemented via Graph-API
- 'gapi/samples/face_beautification.cpp' added
- FIXME added in 'gcpukernel.hpp'

* INF_ENGINE fix
- preprocessing clauses added not to run the sample without Inference Engine

* INF_ENGINE fix 2
- warnings removed

* Fixes
- checking IE version cut as there is no dependency
- some alignments fixed
- the comment about preprocessing commands fixed

* ie::backend() issue fix (according to dmatveev)
- as the sample needs the cv::gapi::ie::backend() to be defined regardless of having IE or not, there is its throw-error definition in `giebackend.cpp` now (by dmatveev)
- for the same reason, #includes in `giebackend.hpp` are fixed
- HAVE_INF_ENGINE check is removed from the sample
2019-11-18 15:13:05 +03:00
Alexander Alekhin
ac2dc29525 Merge pull request #15852 from akhakim:gauss_blur_kernel_5x5 2019-11-14 14:55:24 +00:00
Alexander Alekhin
d1c4e4b5a5 Merge pull request #15906 from anton-potapov:gapi_fluid_i420_support 2019-11-14 14:07:05 +00:00
Anna Khakimova
beb14c70da GAPI Fluid: SIMD optimization for sep filters 5x5 kernel size (gaussBlur) 2019-11-14 13:42:20 +03: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
Maksim Shabunin
ad5874779c Install: added missing gapi headers 2019-11-07 14:03:46 +03:00
Alexander Alekhin
469addeca3 Merge pull request #15763 from akhakim:dynamic_set_kernel_window_size 2019-10-31 11:10:45 +00:00
Anna Khakimova
c394847c35 GAPI Fluid: Dynamic window size 2019-10-30 17:09:54 +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
Alexander Alekhin
cd6d79d106 gapi: fix opencv_world build 2019-10-28 18:53:14 +00:00
Dmitry Budnikov
8dfba51884 add empty implementation 2019-10-25 17:50:09 +03:00
Alexander Alekhin
87a692b89e Merge pull request #15736 from akhakim:fix_for_ADE-859_using_namespace_cv_G_TYPED_KERNEL_fail_c++ 2019-10-23 17:07:32 +00:00
Alexander Alekhin
09619c1c45 Merge pull request #15762 from rgarnov:return_exported_mkdatanode 2019-10-23 12:05:28 +00:00
Anna Khakimova
8bf5bed0a9 GAPI:Fix for using cv makes G_TYPED_KERNEL fail 2019-10-23 12:17:49 +03:00
Alexander Alekhin
5ffeebabad Merge pull request #15759 from alalek:issue_15758 2019-10-22 21:40:10 +00:00
Ruslan Garnov
e89c1103ff Returned GModel::mkDataNode() overload for external backends 2019-10-22 18:57:31 +03:00
Alexander Alekhin
fe4f27b99b gapi: fix build
- gcc 4.8.4 (ARMv7)
2019-10-22 16:31:40 +03:00
anton-potapov
471b40040a Merge pull request #15735 from anton-potapov:gapi_async_documentaion
* G-API: Doxygen documentatation for Async API

* G-API: Doxygen documentatation for Async API

 - renamed local variable (reading parameter async) async ->
asyncNumReq in object_detection DNN sample
to avoid Doxygen erroneous linking the sample to cv::gapi::wip::async
documentation
2019-10-21 22:33:18 +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
cc9b199ecb Merge pull request #15704 from alalek:gapi_avoid_dynamic_initializers_in_optimized_code 2019-10-15 15:22:09 +00:00
Alexander Alekhin
a84969bdcd gapi: avoid dynamic initialization in dispatched files 2019-10-14 23:07:57 +00:00
Alexander Alekhin
823e767eed Merge pull request #15684 from OrestChura:id_helper_class_semicolon_issue 2019-10-14 09:46:41 +00:00
Alexander Alekhin
2f30c3fd4f Merge pull request #15681 from mshabunin:fix-gapi-ie-test 2019-10-11 13:12:45 +00:00
OrestChura
2f9351d995 Fix warning issue:
- unnecessary extra semicolon after member function definition removed
2019-10-10 18:48:27 +03: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
andrey-golubev
d50babfc99 G-API: fix perform substitution UB/crash 2019-10-02 20:54:11 +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
Maksim Shabunin
349f0cf5e9 Merge pull request #15443 from anton-potapov:fluid_internal_parallellism_fix_review_comments 2019-09-09 19:27:59 +00:00
Anton Potapov
758156a9b6 Fluid Internal Parallelism:
- add comments on signature of custom parallel_for
  - use cv::parallel_for_ by default
2019-09-09 17:37:52 +03:00
Anton Potapov
8747082091 G-API: fixing CMake warning for standalone build 2019-09-09 16:23:04 +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
Anton Potapov
f7b5900671 Fluid Internal Parallelism
- make static analysis happy
2019-09-02 16:16:01 +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
Alexander Alekhin
576644a197 Merge pull request #15236 from dbudniko:dbudniko/g_api_copy_kernels 2019-08-23 10:47:47 +00:00
Andrey Golubev
410583e5f9 Document usage of accuracy tests model 2019-08-23 13:15:35 +03:00
luz.paz
ec43292e1e Fix modules/ typos
Found using `codespell -q 3 -S ./3rdparty -L activ,amin,ang,atleast,childs,dof,endwhile,halfs,hist,iff,nd,od,uint`
2019-08-15 18:02:09 -04:00
smirnov-alexey
35e5f00cac Simplify tests on GAPI_TRANSFORM 2019-08-14 13:37:40 +03:00
Alexander Alekhin
290da93845 Merge pull request #15285 from AsyaPronina:dev/asyadev/matching_requirements_test 2019-08-14 09:59:56 +00:00
Andrey Golubev
f6bb900259 Merge pull request #15238 from andrey-golubev:fluid_fix_journal
G-API: Fix Journal usage in Fluid backend (#15238)

* Fix Journal usage in Fluid backend

* Delete dumpDotRequired(): invalid check

* Update mem consumption test

* Test that new test works

* Debug memory consumption function

* Increase iterations in test

* Re-write memory consumption measurement part

* Restore correct fix for Fluid journals
2019-08-14 10:03:52 +03:00
Alexander Alekhin
72ccb5fe6e Merge pull request #15283 from smirnov-alexey:gapi_transform_tests 2019-08-13 14:45:18 +00:00
Andrey Golubev
bf0765fc7f Merge pull request #15282 from andrey-golubev:rename_argkind_opaque
* G-API: rename ArgKind OPAQUE to GOPAQUE

Rename ArgKind value to GOPAQUE to fix conflict in the
user code when wingdi.h is included: it defines OPAQUE
macro that (for some reason) is chosen instead of ArgKind
value

* Add compatibility with existing API

* Renamed GOPAQUE to OPAQUE_VAL
2019-08-13 13:57:27 +03:00
AsyaPronina
59de4d9ad8 Added Preproc use case test for graph pattern matching 2019-08-12 20:14:56 +03:00
smirnov-alexey
4c168e95de Extend test suite on GAPI_TRANSFORM macro 2019-08-12 16:44:05 +03:00
Alexander Alekhin
183fc43a67 Merge pull request #15217 from elatkin:15163_gapi_std_math 2019-08-12 09:41:11 +00:00
AsyaPronina
e06efd5329 G-API: Added graph pattern matching routine and basic tests 2019-08-09 18:57:56 +03:00
Alexander Alekhin
358d69956a Merge pull request #15198 from AsyaPronina:bump_to_new_ade_release 2019-08-09 15:24:01 +00:00
Alexander Alekhin
5e527d22e3 gapi: fix build with MSVS2017/2019 2019-08-08 16:13:25 +03:00
AsyaPronina
816929c704 Bump to new ADE release v0.1.1f 2019-08-07 21:35:28 +03:00
Dmitry Budnikov
6427744063 perf tests are added 2019-08-05 19:04:14 +03:00
Dmitry Matveev
0757a51e2b Merge pull request #15090 from dmatveev:dm/ng-0001-g-api-inference-api
* G-API-NG/API: Introduced inference API and IE-based backend

- Very quick-n-dirty implementation
- OpenCV's own DNN module is not used
- No tests so far

* G-API-NG/IE: Refined IE backend, added more tests

* G-API-NG/IE: Fixed various CI warnings & build issues + tests

- Added tests on multi-dimensional own::Mat
- Added tests on GMatDesc with dimensions
- Documentation on infer.hpp
- Fixed more warnings + added a ROI list test
- Fix descr_of clash for vector<Mat> & standalone mode
- Fix build issue with gcc-4.8x
- Addressed review comments

* G-API-NG/IE: Addressed review comments

- Pass `false` to findDataFile()
- Add deprecation warning suppression macros for IE
2019-08-05 17:56:34 +03:00
Dmitry Budnikov
290078e0d0 copy kernels 2019-08-05 17:46:28 +03:00
Evgeny Latkin
f17a6b478b GAPI: use plain-C interface to math functions, sin/cos, etc.
- addresses #15163: C++11 definition issue by @neheb
2019-08-04 08:07:46 +03:00
Andrey Golubev
fc85f3644d Merge pull request #15190 from andrey-golubev:fluid_invalid_roi
G-API: verify y offset and height of Fluid output ROIs (#15190)

* G-API: validate GFluidOutputRoi y and height

* Rearrange tested ROIs
2019-08-01 19:30:05 +03:00
Andrey Golubev
304e3ac12f G-API: fix Fluid reshape with unused nodes (Merge pull request #15115)
* G-API: fix fluid reshape with unused nodes

* Update test names

* Add FIXME for future improvement
2019-07-30 23:48:46 +03:00
Andrey Golubev
b10ec8ef8b Merge pull request #14985 from andrey-golubev:gapi_fix_ocl_umat
* G-API: fix GOCLExecutable issue with UMat lifetime

Add tests on initialized/uninitialized outputs for all
backends

* Use proper clean-up procedure for magazine

* Rename InitOut test and reduce tested sizes

* Enable output allocation test
2019-07-24 23:36:18 +03:00
Alexey Smirnov
8313209704 Merge pull request #14952 from smirnov-alexey:gapi_transform_macro_rework
G-API: GAPI_TRANSFORM internal functionality rework (#14952)

* Change internal pattern and substitute signatures and refactor tests

* Enhance GArrayU with type-checker function

Add a couple of new tests on GAPI_TRANSFORM
2019-07-24 23:29:52 +03:00
Anton Potapov
8936d55675 Fluid Internal Parallelism
- added ability to use custom implementation of "parallel for" function
2019-07-19 11:56:57 +03:00
Alexander Alekhin
e7bb0ecee0 gapi: fix build with unique_ptr
avoid generation of copy ctors with unique_ptr members
2019-07-18 14:08:42 +03:00
AsyaPronina
add1df4bcb Fixed issue happened during merge 2019-07-16 20:47:34 +03:00
Andrey Golubev
c9bd43c0f6 Merge pull request #14945 from andrey-golubev:delete_bool
G-API: clean up accuracy tests (#14945)

* Delete createOutputMatrices flag

Update the way compile args function is created

Fix instantiation suffix print function

* Update comment (NB)

* Make printable comparison functions

* Use defines instead of objects for compile args

* Remove custom printers, use operator<< overload

* Remove SAME_TYPE and use -1 instead

* Delete createOutputMatrices flag in new tests

* Fix GetParam() printed values

* Update Resize tests: use CompareF object

* Address code review feedback

* Add default cases for operator<< overloads

* change throw to GAPI_Assert
2019-07-16 19:04:18 +03:00
Andrey Golubev
c11423df1e Merge pull request #15012 from andrey-golubev:test_output
G-API: Add output allocation tests for backends (#15012)

* Add output tests for backends

* Fix large size test: output is in fact reallocated

* Use cv::Mat copies for reallocation tracking

* Separate LargeSizeWithCorrectSubmatrix test

* Rename backed output allocation tests

* Address code review feedback

Update test names

Add illustrative "expect (non-)empty" checks

Rename mat "copy" to mat reference

Add more pointer checks

* Add illustrative checks
2019-07-16 19:01:45 +03:00
Andrey Golubev
e629785a97 Merge pull request #15021 from andrey-golubev:gapi_fix_standalone_exports
* Fix G-API export specifier in standalone build

* Make dummy GAPI_EXPORTS in case of non-OpenCV builds

* Add old version under #if 0
2019-07-16 18:53:51 +03:00
Alexander Alekhin
3a2a74b655 Merge pull request #14968 from anton-potapov:fluid_internal_parallellism 2019-07-16 14:22:06 +00:00
Anton Potapov
97e88bd769 Fluid Internal Parallelism
- Added new graph compile time argument to specify multiple independent
ROIs (Tiles)
 - Added new "executable" with serial loop other user specified
ROIs(Tiles)
 - refactored graph traversal code into separate function to be called
once
 - added saturate cast to Fluid AddCsimple test kernel
2019-07-16 16:09:14 +03:00
Ruslan Garnov
ad49138fae Merge pull request #14917 from rgarnov:gapi_planar_kernels
G-API planar kernels (#14917)

* Added resizeP with tests

* NV12 planar filters

* fix warnings in ResizeP test

* fix out mat ocv warning

* sz_on - > sz rename

* cpu tests new signature

* try to fix resizeP test

* trailing spaces remove

* doxygen doc fixed

* doxygen minor fix

* more doxygen fixes

* Doxygen corrected and extended after review.
2019-07-04 18:19:09 +03:00
Andrey Golubev
2bf8793632 Merge pull request #14946 from andrey-golubev:obj_not_ref
G-API: Use object instead of reference in extended lifetime case (#14946)

* Use object instead of reference

* Make the object const
2019-07-02 19:03:45 +03:00
Alexander Alekhin
453466eb1a Merge pull request #14885 from anton-potapov:common_flow_explanatory_test_cases 2019-06-28 16:52:03 +00:00
Alexander Alekhin
49805f976a Merge pull request #14923 from andrey-golubev:imgproc_tests_update_clean 2019-06-28 16:01:32 +00:00
Andrey Golubev
1666195984 Merge pull request #14922 from andrey-golubev:operators_tests_update_clean
G-API: Align operators tests to new test model (#14922)

* Align operators tests to new test model

* Change init function in NotOperatorTest
2019-06-28 17:59:52 +03:00
Anton Potapov
3d345ca4c4 Async API for GAPI
- explanatory  test cases for common usage models
2019-06-28 17:40:00 +03:00
atalaman
8dd596b7ba Merge pull request #14892 from TolyaTalamanov:at/parameterized-render-tests
G-API: Parameterized render tests (#14892)

* Init commit

* Add mat size as test parameter

* Add test for text render

* Add test for rect render

* Add tests for line and circle

* Remove old render tests

* Init output mats

* Remove methods input arguments

* Add comment about data loss in BGR2NV12 conversion

* Add edge test cases

* Replace default color for out mats black -> white
2019-06-28 17:11:03 +03:00
Andrey Golubev
719912e46e Align imgproc tests to new model 2019-06-28 14:31:50 +03:00
Andrey Golubev
75c567b6ab Merge pull request #14757 from andrey-golubev:core_tests_update
G-API: Introduce new approach to write accuracy tests (#14757)

* G-API: Introduce new common accuracy test fixture

* Enable Range<> to Seq<> implicit conversion

* Fix shadowing parameters

* Update license headers

* Rename ALIGNED_TYPE to SAME_TYPE

* Move MkRange to tests

* Fix TODO(agolubev) in test instantiations

* Squash simple fixture declarations in one line

* Remove unused line

* Fix Windows issues with macro expansion

* Choose between 1 or 2 matrix initialization

* Redesign common class behavior

Use "views" for GetParam() provided by GTest
base class instead of doing segregation
(with copy!) of common and specific parameters:
request common or specific parameter directly
by index from GetParam()-returned parameters

* Refine user-level API and usage of new test model

* Fix -fpermissive errors

* Remove unnecessary init calls

* Replace GCompileArgs member variable with func ptr

* Rename initMatsRandN to make its behavior explicit

Rename initMatsRandN to initMatrixRandN to eliminate confusion:
initMatsRandN only initialized first matrix (similarly to
initMatrixRandU)

* Fix common of initNothing

* Update copyright dates in missed files

* Add check for specific parameters

* Fix coment stlye
2019-06-28 13:07:41 +03:00
atalaman
de60600126 Merge pull request #14820 from TolyaTalamanov:at/circle_and_line
G-API: Implement line and circle draw operations (#14820)

* Implement line and circle draw operations

* Fix comments to review
2019-06-24 17:37:32 +03:00
Alexander Alekhin
9cb239247d Merge pull request #14689 from anton-potapov:gapi_async_cacnel 2019-06-20 13:48:05 +00:00
Ruslan Garnov
7c0a9ff4c1 Added overload of contains<> for tuple 2019-06-20 14:40:14 +03:00
Anton Potapov
8d75bfae47 Cancelation support fo Async GAPI
-
2019-06-19 13:41:39 +03:00
Alexey Smirnov
7f9a9f2a09 Merge pull request #14648 from smirnov-alexey:as/gapi_transform
* Introduce GAPI_TRANSFORM initial interface

Comes along with simple tests and kernel package changes

* Fix documentation and adjust combine() function

* Fix stuff after rebasing on master

* Remove redundant functionality

* Refactoring according to review feedback provided

* Fixes according to review feedback

* Reconsider transformations return and fix a warning

* Fixes from code review

* Add a new simple test

* Cleanup, added tests on GScalar, GMatP, GArray
2019-06-17 16:26:28 +03:00
Ruslan Garnov
3df83dce7e Merge pull request #14741 from rgarnov:gapi_fix_includes
Changed quotes to brackets when including public includes (#14741)
2019-06-14 19:27:19 +03:00
atalaman
d3c0f4ef98 Merge pull request #14700 from TolyaTalamanov:at/cv_gapi_render
G-API: Render (#14700)

* cv::Render

Implement OCVRedner for BGR as input

* Support two plane cv::Render::run

* Snapshot

* Add RenderCreator

* text2Points

* Snapshot

* Refactoring tests

* Remove text2points

* Fix render input data type in tests

* Refactoring

* Fix headers
* Change struct fields name

* Fix headers

* Fix warnings

* Replace cv::Scalar -> cv::gapi::own::Scalar

* Add test

* PutText and rectangle case

* Fix comments to review

* Fix comments to review

* Fix comments to review

* Create render_priv.hpp
* Implement BGR2NV12
* Fix NV12 test

* Fix comments to review

* Add header for GAPI_Assert
2019-06-14 18:29:49 +03:00
Alexander Alekhin
b4d3ff378e Merge pull request #14720 from rgarnov:gapi_remove_lut3d 2019-06-11 16:24:54 +00:00
atalaman
1aefa6779f Merge pull request #14513 from TolyaTalamanov:at/color-convert-kernels
G-API: Implement color-convert kernels (#14513)

* Implement color-convert kernels

* Fix rgb2yuv422 reference version

* Fix comments to review

* Restore NV12toBGR in imgproc.hpp

* Add accuracy tests

* Fix doxygen

* Fix ref version yuv422

* Fix warnings

* Fix typos

* Fix simd version yuv422

* Fix warnings

* Fix compile error

* Fix warning

* Remove comment
2019-06-10 14:09:30 +03:00
Ruslan Garnov
25e4bce1a6 Removed LUT3D API entry 2019-06-04 17:13:21 +03:00
Alexey Smirnov
e329c84d5e Merge pull request #14684 from smirnov-alexey:as/convert2_test_extension
G-API: Add parameters alpha and beta in tests on ConvertTo kernel (#14684)

* Add parameters alpha and beta in tests on ConvertTo kernel

* Change tolerance function

* Reduce number of test cases
2019-06-04 15:54:09 +03:00
Alexander Alekhin
9f68376c91 gapi: fix visibility conflict in OpenCV builds 2019-05-29 15:06:08 +03:00
Ruslan Garnov
54ff72a1cc Merge pull request #14599 from rgarnov:gapi_aux_kernels
G-API aux kernels (#14599)

* Removed gcpuimgproc.hpp and gcpucore.hpp

* Changed GModel::orderedInputs and orderedOutputs to get ConstGraph&

* Added auxiliaryKernels() method of GBackend::Priv
2019-05-22 21:13:13 +03:00
atalaman
cbb699efd2 Merge pull request #14151 from TolyaTalamanov:at/own-mat-output-doesnt-support
G-API: own::Mat as output computation doesn't work (#14151)

* Fix bug with output own::Mat

* Fix comments to review

* Fix preprocess condition

* Fix comments to review
2019-05-22 19:57:08 +03:00
atalaman
d9dac9cd1b Merge pull request #14150 from TolyaTalamanov:at/computation-doesnt-work-with-out-vector
G-API: GComputation doesn't work with output vector<cv::Mat> (#14150)

* Fix bug with gcomputation output vector

* Add test fixture

* Fix comments to review

* Fix alignment
2019-05-22 19:13:15 +03:00
atalaman
935c02c0a3 Merge pull request #13851 from TolyaTalamanov:at/new-kernel-package-design
G-API: Kernel package design (#13851)

* Remove cv::unite_policy from API

* Add check that all id in kernel package are unique

* Refactor checker id procedure

* Remove cv::gapi::GLookupOrder from API

* Implement cv::gapi::use_only

* Fix samples

* Fix docs

* Fix comments to review

* Remove unite_policy

* Fix GKernelPackage::backends()

* Fix comments to review

* Fix all_unique

* Fix comments to review

* Fix comments to review

* Remove out of date tests
2019-05-22 14:53:44 +03:00
Ruslan Garnov
50af4df1d7 Fixed roi inference to always produce even sizes for nv12 2019-05-14 18:37:33 +03:00
Anton Potapov
c2e26c1527 Async API for GAPI
- minor cosmetic changes : comments, typos
2019-05-07 13:12:15 +03:00
Alexander Alekhin
076ee65c85 Merge pull request #14448 from rgarnov:gapi_gmatp 2019-04-30 16:48:34 +00:00
Ruslan Garnov
834d438d6e Added GMatP type 2019-04-30 17:25:29 +03:00
anton-potapov
f5801ee7da Merge pull request #14346 from anton-potapov:gapi_async
* Async API for GAPI

 - naive implementation as a starting point

* Fix namespace comment in header
2019-04-30 13:11:56 +03:00
Alexander Alekhin
faca45a7ea Merge pull request #14429 from rgarnov:gapi_fluid_fix_small_rois 2019-04-29 15:08:11 +00:00
Ruslan Garnov
ffaf4d5da4 Fixed incorrect first window setting for fluid FilterAgent 2019-04-26 17:34:44 +03:00
Ruslan Garnov
fb326a3589 Added a reproducer 2019-04-26 17:33:50 +03:00
Ruslan Garnov
f81886d17c Added planar flag to GMatDesc, intergated into framework, added tests 2019-04-26 14:04:44 +03:00
Ruslan Garnov
1f517b8a02 Merge pull request #13943 from rgarnov:export_headers_for_backend_development
G-API external backend development (#13943)

* Moved HostCtor and ConstVal from gapi_priv.hpp to objref.hpp

* Added gmodel_priv.hpp, added export of symbols from gmodel.hpp

* Added export of binInArg and bindOutArg

* Renamed gapi_priv.*pp -> gorigin.*pp

* Added a fixme on collecting exports inside one class
2019-04-17 21:54:47 +03:00
Alexander Alekhin
ee7255aac4 Merge pull request #14144 from alalek:issue_14143 2019-04-03 14:35:54 +00:00
Alexander Alekhin
cd6d8048bb gapi: fix tests build 2019-04-02 13:46:25 +03:00
Alexander Alekhin
f75152a597 gapi: fix build with Intel Compiler 2019 2019-03-28 19:24:43 +00:00
Alexander Alekhin
73191ad3ec Merge pull request #14172 from smirnov-alexey:gapi_fix_nv12_valgrind 2019-03-28 13:45:45 +00:00
smirnov-alexey
769d2f4c44 Fix valgrind issue in NV12 test 2019-03-28 12:59:51 +03:00
Andrey Golubev
dd2823aaec [G-API] Allow unused nodes in Fluid backend
Allow nodes produced after some operation to be
"unused": not being an output and not being used
as inputs to other operations

Add fluid test to cover this case
2019-03-18 18:20:11 +03:00
Alexander Alekhin
4f9a99141e Merge pull request #13937 from smirnov-alexey:gapi_change_standalone_cmake 2019-03-07 14:38:14 +00:00
smirnov-alexey
6b31f58092 Modifies standalone G-API cmake for testing it properly 2019-03-04 15:33:15 +03:00
smirnov-alexey
939ea4ba30 Remove incorrect asserts in NV12 to RGB/BGR kernels 2019-03-01 13:31:16 +03:00
Ruslan Garnov
c0076b58cd Added NV12 support to fluid backend 2019-02-19 18:18:23 +03:00
Ruslan Garnov
322115bfcf Removed unused functions from View::Priv 2019-02-18 19:26:54 +03:00
smirnov-alexey
406392e13d Introduces yuv420p(nv12) to rgb and bgr color conversion 2019-02-15 14:25:57 +03:00
smirnov-alexey
caf438c63b Fixes an issue with valgrind and sobelxy 2019-02-12 18:36:06 +03:00
klemens
997b7b18af spelling fixes 2019-02-09 22:29:54 +01:00
Alexey Smirnov
b1cc114b7b Merge pull request #13723 from smirnov-alexey:gapi_add_sobelxy
* Add Sobel kernel which returns both dx and dy

* Splice dx and dy and extend add_border function

Also change some tests parameters

* Add borderValue parameter in test

* Introduces fluid kernel for sobelxy

Adds tests (basic and performance) on new backend

* Introduces BufHelper struct for some arithmetic
2019-02-08 16:59:56 +03:00
Alexey Smirnov
766fd20faa Merge pull request #13745 from smirnov-alexey:gapi_add_gout_overloading
* Add GOut overloading for tuple of parameter pack

* Move getGOut_impl into namespace and add const to input references
2019-02-08 13:16:50 +03:00
Alexey Smirnov
315e7fbbee Merge pull request #13721 from smirnov-alexey:gapi_add_normalize
GAPI: Add normalize kernel in G-API (#13721)

* Add normalize kernel in G-API

In addition add several tests on new kernel

* Fix indentations and normalize test structure

* Move normalize kernel from imgproc to core

Set default parameter ddepth to -1

* Fix alignment
2019-02-07 16:05:39 +03:00
Alexander Alekhin
d073215f10 Merge pull request #13705 from mshabunin:clang-warnings 2019-02-01 16:11:00 +00:00
Maksim Shabunin
ea3dc78986 Fixed warnings produced by clang-9.0.0 2019-01-30 14:05:32 +03:00
Alexey Smirnov
a65ccc0603 Merge pull request #13678 from smirnov-alexey:gapi_fix_descrof_overloading
* Return vector of MetaArg instead of MatDesc and fix test with ADL check

* Fix construction of vector

* Change names and tests according to review
Also add GAPI_EXPORTS prefix for two ostream operators
2019-01-28 16:26:32 +03:00
Ruslan Garnov
3c6d5aba22 Fixed fluid heterogeneity support 2019-01-24 17:45:26 +03:00
Alexey Smirnov
5728679fd5 Merge pull request #13664 from smirnov-alexey:gapi_add_descrof_overloading
* Add version of descr_of function taking vector of Mat

* Overload descr_of function for cv::Mat

* Add template function instead of copypasting and change tests a little
2019-01-22 13:14:33 +03:00
Andrey Golubev
55770c9853 Merge pull request #13640 from andrey-golubev:gapi_gcallpriv_doc
* GAPI: document GCall's recursive behavior

* Move documentation outside the class
2019-01-17 20:59:47 +03:00
Andrey Golubev
c8a89134a7 GAPI: fix GCall misuse in unrollExpr 2019-01-16 18:15:44 +03:00
Dmitry Budnikov
eedd7bfd50 fix size 2018-12-19 17:45:00 +03:00
Ruslan Garnov
5340073770 Removed UNUSED macro 2018-12-13 14:39:33 +03:00
Ruslan Garnov
d38676085a Added "kernels" pass stage to compiler, removed unused opaque from cv::gimpl::Op 2018-12-12 17:22:52 +03:00
Alexander Alekhin
c577c2cc6a gapi: eliminate KW issues 2018-12-03 15:20:47 +03:00
Alexander Alekhin
197285d12a Merge pull request #13331 from dbudniko:dbudniko/gapi_gpu_to_ocl_renaming_patch 2018-11-29 15:39:14 +00:00
Evgeny Latkin
ab430b8c87 Merge pull request #13329 from elatkin:el/gapi_perf_medblur
GAPI (fluid): Median blur optimization (#13329)

* GAPI (fluid): Median blur optimization: reference 3x3

* GAPI (fluid): Median blur optimization: CPU dispatcher

* GAPI (fluid): Median blur optimization: manual CV_SIMD
2018-11-29 18:02:29 +03:00
Dmitry Budnikov
d1029faa90 patch removes gpu mention from ocl backend 2018-11-29 17:05:41 +03:00
Dmitry Budnikov
6374b99a1a Merge pull request #13240 from dbudniko:dbudniko/gapi_gpu_to_ocl_renaming
G-API rename GPU backend to OCL backend (#13240)

* renaming draft

* inline namespace instead non-safe define

* more back compatibility

* Updates after review from Dmitry
2018-11-29 16:29:11 +03:00
Evgeny Latkin
c928c21fe7 Merge pull request #13319 from elatkin:el/gapi_perf_erdilate_2
GAPI (fluid): Erode/Dilate optimization, part 2 (#13319)

* GAPI (fluid): Erode/Dilate optimization: hard-code 3x3 case

* GAPI (fluid): Erode/Dilate optimization: CPU dispatcher

* GAPI (fluid): Erode/Dilate optimization: speed-up 10-15x times with CV_SIMD

* GAPI (fluid): Erode/Dilate optimization: 20-30% speed-up
2018-11-28 19:50:39 +03:00
Evgeny Latkin
992d5b8bcd Merge pull request #13315 from elatkin:el/gapi_perf_erdilate
GAPI (fluid): Erode/Dilate optimization (#13315)

* GAPI (fluid): Erode/Dilate optimization: hard-code 3x3 case

* GAPI (fluid): Erode/Dilate optimization: CPU dispatcher

* GAPI (fluid): Erode/Dilate optimization: speed-up 10-15x times with CV_SIMD
2018-11-28 18:20:31 +03:00
Evgeny Latkin
6808d33b2f Merge pull request #13290 from elatkin:el/gapi_perf_filter2d
GAPI (fluid): Filter 2D optimization (#13290)

* GAPI (fluid): Filter 2D optimization: speedup 13x if float, 2x if integral

* GAPI (fluid): Filter 2D speedup 8x if output is short/ushort

* GAPI (fluid): Filter 2D speedup 7x if output is uchar

* GAPI (fluid): Filter 2D optimization: fixed compiler warnings

* GAPI (fluid): fix compiler warnings on Mac

* GAPI (fluid): fix compiler warnings on Mac

* GAPI (fluid): fix compiler errors on VS2015

* GAPI (fluid): fix compiler errors on VS2015

* GAPI (fluid): fix compiler errors on VS2015
2018-11-27 19:12:14 +03:00
Dmitry Budnikov
51cc78b2a2 Merge pull request #13251 from dbudniko:dbudniko/gapi_more_fixes_for_tests
More fixes for G-API tests (#13251)

* scalar comparator and more fixes for tests

* add weighted aligned

* white space

* more white space

* Add weighted test accuracy check enabled
2018-11-26 17:44:46 +03:00
Evgeny Latkin
f07856eab9 Merge pull request #13221 from elatkin:el/gapi_perf_sepfilter
GAPI (fluid): optimization of Separable filter (#13221)

* GAPI (fluid): Separable filter: performance test

* GAPI (fluid): enable all performance tests

* GAPI: separable filters: alternative code for Sobel

* GAPI (fluid): hide unused old code for Sobel filter

* GAPI (fluid): especial code for Sobel if U8 into S16

* GAPI (fluid): back to old code for Sobel

* GAPI (fluid): run_sepfilter3x3_impl() with CPU dispatcher

* GAPI (fluid): run_sepfilter3x3_impl(): fix compiler warnings

* GAPI (fluid): new engine for separable filters (but Sobel)

* GAPI (fluid): new performance engine for Sobel

* GAPI (fluid): Sepfilters performance: fixed compilation error
2018-11-26 15:05:35 +03:00
Alexander Alekhin
c6daa4aa16 Merge pull request #13260 from alalek:cmake_ade_12856 2018-11-23 17:09:47 +00:00
Dmitry Budnikov
a518e7063d Merge pull request #13120 from dbudniko:dbudniko/gapi_opencl_kernel_example
* custom OpenCL G-API kernel draft

* clean up and warnings fix

* more warnings

* white space

* new blank line at the EOF removed

* HAVE_OPENCL guard

* remove unnecessary ocl API call

* remove sum test workaround

* check if opencl activated

* fix std::str warning

* CPU fall back for symm7x7

* gpu test kernel draft

* adjust have opencl guard

* more guards

* one more attempt to adjust guards

* empty stub files and kernel source files creation in the test directory

* try to force auto generation

* one more attempt to force build

* remove symm7x7 custom from gapi module

* looks like that this version works properly on Win desktop

* clean up

* more clean up

* address some suggestions from Dmitry's review

* const kernel coefficients

* CV_Error in kernel + try to fix cpu fallback

* CV_Error_ instead CV_Error

* everything in one gapi_gpu_test.cpp

* fix warning

* remove kernel generation, add kernel string

* avoid generated code and ocl internal namespace

* fix misprint

* c_str
2018-11-23 17:51:15 +03:00
Alexander Alekhin
de8696aa43 cmake: allow to disable ADE build too (BUILD_opencv_gapi=OFF is not enough)
CMake option: WITH_ADE=OFF
2018-11-23 12:52:41 +03:00
Ruslan Garnov
a3df05d93b Merge pull request #13215 from rgarnov:rg/overhead
* Added caching of agents execution sequence

* Merged linesRead() and nextWindow() methods on FluidAgent in one method

* Added caching of input lines for fluid::View

* Added caching of output lines for fluid::Buffer

* Fixed GAPI_Assert to work in standalone mode
2018-11-20 17:25:04 +03:00
Dmitry Matveev
1b13df5368 G-API: Recent inclusion has broken STANDALONE build
This MR fixes this.
2018-11-20 14:00:08 +03:00
Evgeny Latkin
083332f85f Merge pull request #13206 from elatkin:el/gapi_perf_rgb2lab
GAPI (fluid): RGB to Lab optimization (#13206)

* GAPI (fluid): BGR2LUV, RGB2Lab: performance test

* GAPI (fluid): BGR2LUV, RGB2Lab: using cv::hal::cvtBGRtoLab

* GAPI (fluid): BGR2LUV, RGB2Lab: hide reference code with #ifdef
2018-11-19 18:52:48 +03:00
Evgeny Latkin
6757c2c5a6 Merge pull request #13174 from elatkin:el/gapi_perf_rgb2yuv
GAPI (fluid): RGB to YUV optimization (#13174)

* GAPI (fluid): RGB to YUV: activate performance tests

* GAPI (fluid): speedup 4-8x RGB-to-YUV, 2.5x YUV to RGB with int16 arithmetic

* GAPI (fluid): RGB <--> YUV: fixed compiler warning

* GAPI (fluid): RGB <--> YUV: additional speedup 2-3x times (10-15x over original) via manual CV_SIMD

* GAPI (fluid): RGB <--> YUV: dynamic CV_SIMD dispatching
2018-11-19 17:30:14 +03:00
Alexander Alekhin
a574788e89 move legacy C-API constants into separate files 2018-11-17 23:47:51 +00:00
Dmitry Matveev
d7540c9a3c Merge pull request #13176 from dmatveev:gapi_doxygen
G-API: Doxygen class reference

* G-API Doxygen documentation: covered cv::GComputation

* G-API Doxygen documentation: added sections on compile arguments

* G-API Doxygen documentation: restructuring & more text

* Added new sections (organized API reference into it);
* Documented GCompiled, compile args, backends, etc.

* G-API Doxygen documentation: documented GKernelPackage and added group for meta
2018-11-16 23:38:10 +03:00
Evgeny Latkin
f81370232a Merge pull request #13162 from elatkin:el/gapi_perf_rgb2gray
GAPI (fluid): RGB/BGR to gray: optimization (#13162)

* GAPI (fluid): RGB/BGR to Gray: add performance tests

* GAPI (fluid): RGB/BGR to Gray: speedup 8-12x with manual CV_SIMD

* GAPI (fluid): RGB/BGR to Gray: fix compiler warning

* GAPI (fluid): RGB/BGR to Gray: dynamic dispatching to AVX2

* GAPI (fluid): RGB/BGR to Gray: check R/G/B coefficients

* GAPI (fluid): RGB/BGR to Gray: fixed compilation error (caused by change in master)
2018-11-15 18:14:27 +03:00
Dmitry Matveev
85fad1504a Merge pull request #13030 from dmatveev:tutorial
* G-API: First steps with tutorial

* G-API Tutorial: First iteration

* G-API port of anisotropic image segmentation tutorial;
* Currently works via OpenCV only;
* Some new kernels have been required.

* G-API Tutorial: added chapters on execution code, inspection, and profiling

* G-API Tutorial: make Fluid kernel headers public

For some reason, these headers were not moved to the public
headers subtree during the initial development. Somehow it even
worked for the existing workloads.

* G-API Tutorial: Fix a couple of issues found during the work

* Introduced Phase & Sqrt kernels, OCV & Fluid versions
* Extended GKernelPackage to allow kernel removal & policies on include()

All the above stuff needs to be tested, tests will be added later

* G-API Tutorial: added chapter on running Fluid backend

* G-API Tutorial: fix a number of issues in the text

* G-API Tutorial - some final updates

- Fixed post-merge issues after Sobel kernel renaming;
- Simplified G-API code a little bit;
- Put a conclusion note in text.

* G-API Tutorial - fix build issues in test/perf targets

Public headers were refactored but tests suites were not updated in time

* G-API Tutorial: Added tests & reference docs on new kernels

* Phase
* Sqrt

* G-API Tutorial: added link to the tutorial from the main module doc

* G-API Tutorial: Added tests on new GKernelPackage functionality

* G-API Tutorial: Extended InRange tests to cover 32F

* G-API Tutorial: Misc fixes

* Avoid building examples when gapi module is not there
* Added a volatile API disclaimer to G-API root documentation page

* G-API Tutorial: Fix perf tests build issue

This change came from master where Fluid kernels are still used
incorrectly.

* G-API Tutorial: Fixed channels support in Sqrt/Phase fluid kernels

Extended tests to cover this case

* G-API Tutorial: Fix text problems found on team review
2018-11-15 18:12:36 +03:00
Alexander Alekhin
ca9aa180c1 Merge pull request #13096 from alalek:gapi_tests_checks 2018-11-14 15:59:01 +00:00
Alexander Alekhin
6189b47648 gapi(test): more reliable checks
avoid `countNonZero()`, use `norm()`
2018-11-14 13:30:53 +03:00
Alexander Alekhin
dd6f5949c2 gapi(test): use relative error check for Norm/Sum tests 2018-11-14 13:30:53 +03:00
Latkin, Yevgeny I
a62539489d GAPI (fluid): Sobel 3x3 optimization: remove needless file 2018-11-14 10:17:40 +03:00
Alexander Alekhin
8b7f805642 Merge pull request #13150 from dmatveev:update_ade011d 2018-11-13 16:18:32 +00:00
Evgeny Latkin
cc5190eb91 Merge pull request #13133 from elatkin:el/gapi_perf_sobel_2
GAPI (fluid): Sobel 3x3 optimization: CV_SIMD dynamic dispatching (#13133)

* GAPI (fluid): Sobel 3x3: remove template for run_sobel_row()

* GAPI (fluid): Sobel 3x3: dynamic dispatching of CV_SIMD code

* GAPI (fluid): Sobel 3x3 optimization: fixed CV_SIMD dynamic dispatcher
2018-11-13 17:48:10 +03:00
Dmitry Matveev
4eff798270 Update ADE to version 0.1.1d 2018-11-13 16:44:29 +03:00
Evgeny Latkin
4e40e5bb88 Merge pull request #13070 from elatkin:el/gapi_perf_sobel
GAPI (fluid): optimization of Sobel 3x3 (#13070)

* GAPI: performance test for Sobel

* GAPI: performance test for Sobel w/FP32 input

* GAPI: Sobel speedup: 2.5x (U8) up to 10x (float)

* GAPI: Sobel 3x3 to support U8 into S16

* GAPI (fluid): Sobel 3x3 speedup: 10% (uchar), 1.5x (float)

* GAPI (fluid): Sobel 3x3 speedup: +10x (uchar), but -20% (float)

* GAPI (fluid): Sobel 3x3 speedup: +10% (float)

* GAPI (fluid): Sobel 3x3 speedup: +15% (float), +10% (uchar)

* GAPI (fluid): Sobel 3x3: address GCC warnings

* GAPI (fluid): Sobel 3x3: separate *.cpp file w/SIMD code

* GAPI (fluid): Sobel 3x3: fixed AVX2 code, AVX2 speedup 20-50% (uchar), 10-20% (float)

* GAPI (fluid): Sobel 3x3: fix CV_SIMD code for AVX2

* GAPI (fluid): Sobel 3x3: refactor
2018-11-13 15:04:37 +03:00
Alexander Alekhin
75a6eaf147 Merge pull request #13024 from rgarnov:gapi_fix_lut_test 2018-11-09 19:16:39 +00:00
Ruslan Garnov
858ba6c798 Fixed uniniitialized mats in tests, added operator<< for compare_f 2018-11-09 12:00:55 +03:00
Alexander Alekhin
386733aea1 gapi: fix ARM build 2018-11-09 06:37:48 +00:00
Dmitry Budnikov
5087ff0814 Merge pull request #13008 from dbudniko:dbudniko/gpu_opencl_backend
G-API GPU-OpenCL backend (#13008)

* gpu/ocl backend core

* accuracy tests added and adjusted + license headers

* GPU perf. tests added; almost all adjusted to pass

* all tests adjusted and passed - ready for pull request

* missing license headers

* fix warning (workaround RGB2Gray)

* fix c++ magic

* precompiled header

* white spaces

* try to fix warning and blur test

* try to fix Blur perf tests

* more alignments with the latest cpu backend

* more gapi tests refactoring + 1 more UB issue fix + more informative tolerance exceed reports

* white space fix

* try workaround for SumTest

* GAPI_EXPORTS instead CV_EXPORTS
2018-11-08 22:14:53 +03:00
Alexander Alekhin
3c99dc96b1 Merge pull request #13001 from rgarnov:gapi_standalone_cmake 2018-11-07 15:12:29 +00:00
Ruslan Garnov
c972c94662 Added Standalone.cmake 2018-11-07 14:54:18 +03:00
Evgeny Latkin
000110e760 Merge pull request #13052 from elatkin:yl/gapi_sobel3x3_f32_v2
* GAPI: Sobel 3x3 with FP32 input

* GAPI: Sobel 3x3 with FP32 input, v2
2018-11-06 23:08:50 +03:00
Ruslan Garnov
443fed796a Merge pull request #12990 from rgarnov:gapi_fluid_reshape_support
G-API: Introduce new `reshape()` API (#12990)

* Moved initFluidUnits, initLineConsumption, calcLatency, calcSkew to separate functions

* Added Fluid::View::allocate method (moved allocation logic from constructor)

* Changed util::zip to util::indexed, utilized collectInputMeta in GFluidExecutable constructor

* Added makeReshape method to FluidExecutable

* Removed m_outputRoi from GFluidExecutable

* Added reshape feature

* Added switch of resize mapper if agent ratio was changed

* Added more TODOs and renamed a function

* G-API reshape(): add missing `override` specifiers

Fix warnings on all platforms
2018-10-30 21:12:36 +03:00
AsyaPronina
08536943ad Merge pull request #12949 from AsyaPronina:missed_multiply_operator_for_GMAT
Made scale parameter optional for mul kernel wrapper (#12949)

* Added missed operator*(GMat, GMat). Made scale parameter optional for mul kernel.

* Fixed perf test for mul(GMat, GMat) kernel

* Removed operator*(GMat, GMat) as not needed
2018-10-30 21:10:47 +03:00