Commit Graph

45 Commits

Author SHA1 Message Date
Smirnov Alexey
3e3d4ad797 Fix fluid resize operating with zero output size 2020-05-07 12:24:57 +03:00
Maxim Pashchenkov
51a42c0647
Merge pull request #17088 from mpashchenkov:mp/ocv-gapi-kernel-laplacian
G-API: Laplacian and bilateralFilter standard kernels

* Added Laplacian kernel and tests

* Added: Laplacian kernel, Bilateral kernel (CPU, GPU); Performance and accuracy tests for this kernels

* Changed tolerance for GPU test

* boner

* Some changes with alignment; Tests's parameters are the same as for OCV

* Cut tests

* Compressed tests

* Minor changes (rsrt bb)

* Returned types
2020-04-23 17:47:55 +00:00
OrestChura
05d5c284f6 gapi: buildOpticalFlowPyramid() interface, CPUkernel and CPUtests implementation
- kernel added to a cv::gapi::video namespace
     - tests to check a kernels (based on cv::video tests for cv::buildOpticalFlowPyramid())
     - tests for a combined G-API-pipeline (buildOpticalFlowPyramid() -> calcOpticalFlowPyrLK())
     - tests for internal purposes added
     - custom function for comparison in tests implemented
2020-04-21 14:36:42 +03:00
OrestChura
d50c21e571 gapi: Full calcOpticalFlowPyrLK implementation (2 overloads) and tests
- opencv_gapi module is linked with opencv_video module (optional dependency)
     - kernels added to a new cv::gapi::video namespace and a brand new files created to provide gapi_video environment
     - there are 2 different kernels as G-API should provide GMat AND GArray<GMat> implementation: cv::calcOptFlowPyrLK doesn't calculate pyramids if vector<Mat> is given so just the cast GMat -> GArray<GMat> wouldn't represent all the cv:: functionality
     - tests to check both kernels (based on cv::video tests for cv::calcOpticalFlowPyrLK())
     - tests for internal purposes added
     - vectors<T> comparison in tests implemented
     - new (and old too) common test structures refactored to avoid code copypasting
     - "modules/gapi/test/common/gapi_video_tests_common.hpp" created to share some code snippets between perf and acc tests and avoid code copypasting
2020-04-08 18:11:55 +03:00
Orest Chura
2fe9c87433
Merge pull request #16717 from OrestChura:oc/goodFeatures
- cv::gapi::goodFeaturesToTrack() kernel is implemented
- tests (for exact check with cv::goodFeaturesToTrack() and for internal cases) are implemented
- a custom comparison function for vectors and a custom test fixture implemented
  - some posiible issues as wrong/inexact sorting of two compared vectors are
 not taken into account
- initializations of an input Mat using a picture from opencv_extra implemented (function from gapi_streaming_test used)
2020-04-07 15:53:24 +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
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
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
Alexander Alekhin
c0503718cd gapi(test): exclude 32F from bitwise_not case 2019-12-06 18:12:45 +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
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
smirnov-alexey
bab8addcbb Move maxval to threshold tests parameter
Fix documentation
2019-09-23 14:21:33 +03:00
Dmitry Budnikov
290078e0d0 copy kernels 2019-08-05 17:46:28 +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
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
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
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
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
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
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
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
cd6d8048bb gapi: fix tests build 2019-04-02 13:46:25 +03:00
smirnov-alexey
406392e13d Introduces yuv420p(nv12) to rgb and bgr color conversion 2019-02-15 14:25:57 +03: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
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
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
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
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
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
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
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
Dmitry Budnikov
220b278575 Merge pull request #12944 from dbudniko:dbudniko/tests_thresholds
* added threshold to g-api imgproc tests

* trailing spaces remove

* try to fix warnings

* fix license header

* fix random numbers issue

* fix Sobel test

* license headers + precompiled headers included
2018-10-29 17:34:20 +03:00
Dmitry Matveev
2c6ab65476 Merge pull request #12674 from dmatveev:gapi_upd270918
* Update G-API code base to 27-Sep-18

Changes mostly improve standalone build support

* G-API code base update 28-09-2018

* Windows/Documentation warnings should be fixed
* Fixed stability issues in Fluid backend
* Fixed precompiled headers issues in G-API source files

* G-API code base update 28-09-18 EOD

* Fixed several static analysis issues
* Fixed issues found when G-API is built in a standalone mode
2018-09-28 18:42:09 +03:00
Dmitry Matveev
29e88e50ff Merge pull request #12608 from dmatveev:gapi
* G-API Initial code upload

* Update G-API code base to Sep-24-2018

* The majority of OpenCV buildbot problems was addressed

* Update G-API code base to 24-Sep-18 EOD

* G-API code base update 25-Sep-2018

* Linux warnings should be resolved
* Documentation build should become green
* Number of Windows warnings should be reduced

* Update G-API code base to 25-Sep-18 EOD

* ARMv7 build issue should be resolved
* ADE is bumped to latest version and should fix Clang builds for macOS/iOS
* Remaining Windows warnings should be resolved
* New Linux32 / ARMv7 warnings should be resolved

* G-API code base update 25-Sep-2018-EOD2

* Final Windows warnings should be resolved now

* G-API code base update 26-Sep-2018

* Fixed issues with precompiled headers in module and its tests
2018-09-26 21:50:39 +03:00