Commit Graph

34 Commits

Author SHA1 Message Date
xiong-jie-y
c929f1b62f Add make_capture_src for video stream to Python 2022-05-16 20:46:08 +09:00
luzpaz
554d08c3a1
Merge pull request #21775 from luzpaz:typos/gapi
* GAPI: fix various gapi related typos

Fixes source comments and documentation related to gapi code.

* Fix source typos

* Fixed typos requested

* Follow-up typo fix
2022-04-13 17:06:37 +00:00
Vadim Levin
119d8b3aca
Merge pull request #21553 from VadimLevin:dev/vlevin/scope-for-classes-4x-port
4.x: submodule or a class scope for exported classes

* feature: submodule or a class scope for exported classes

All classes are registered in the scope that corresponds to C++
namespace or exported class.

Example:
`cv::ml::Boost` is exported as `cv.ml.Boost`
`cv::SimpleBlobDetector::Params` is exported as
`cv.SimpleBlobDetector.Params`

For backward compatibility all classes are registered in the global
module with their mangling name containing scope information.
Example:
`cv::ml::Boost` has `cv.ml_Boost` alias to `cv.ml.Boost` type

* refactor: remove redundant GAPI aliases

* fix: use explicit string literals in CVPY_TYPE macro

* fix: add handling for class aliases
2022-02-25 01:17:43 +03:00
Anatoliy Talamanov
2b79a6ff8f
Merge pull request #20832 from TolyaTalamanov:at/python-gstreamer-source
G-API: Wrap GStreamerSource

* Wrap GStreamerSource into python

* Fixed test skipping when can't make Gst-src

* Wrapped GStreamerPipeline class, added dummy test for it

* Fix no_gst testing

* Changed wrap for GStreamerPipeline::getStreamingSource() : now python-specific in-class method GStreamerPipeline::get_streaming_source()

* Added accuracy tests vs OCV:VideoCapture(Gstreamer)

* Add skipping when can't use VideoCapture(GSTREAMER);
Add better handling of GStreamer backend unavailable;
Changed video to avoid terminations

* Applying comments

* back to a separate get_streaming_source function, with comment

Co-authored-by: OrestChura <orest.chura@intel.com>
2022-01-26 14:01:13 +00:00
Aleksei Trutnev
c68fec7e97 Move GKernelPackage to cv namespace 2021-12-24 18:04:11 +03:00
Alexander Alekhin
5aa7435d25 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2021-09-02 15:24:04 +00:00
Anatoliy Talamanov
5ad6ff239b
Merge pull request #20555 from TolyaTalamanov:at/fix-compileStreaming-bug
[G-API] Extend compileStreaming to support different overloads

* Make different overloads

* Order python compileStreaming overloads

* Fix compileStreaming bug

* Replace

gin -> descr_of

* Set error message

* Fix review comments

* Use macros for pyopencv_to GMetaArgs
* Use GAPI_PROP_RW
* Not split Prims python stuff
2021-08-24 12:37:50 +03:00
Maxim Pashchenkov
6306bc3ddc Applying of comments 2021-08-06 09:54:40 +03:00
Maxim Pashchenkov
05f1939b02
Merge pull request #20298 from mpashchenkov:mp/python-desync
G-API: Python. Desync.

* Desync. GMat.

* Alignment
2021-07-01 19:06:35 +00:00
Maxim Pashchenkov
d70053aba5
Merge pull request #20144 from mpashchenkov:mp/python-ge
G-API: Python. Gaze Estimation sample.

* GE pep8

* Added function description, wrapped copy

* Applying review comments

* One more change

* Added gin

* Rstrt bb
2021-07-01 10:27:28 +00:00
Anatoliy Talamanov
9fe49497bb
Merge pull request #20284 from TolyaTalamanov:at/wrap-render
G-API: Wrap render functionality to python

* Wrap render Rect prim

* Add all primitives and tests

* Cover mosaic and image

* Handle error in pyopencv_to(Prim)

* Move Mosaic and Rect ctors wrappers to shadow file

* Use GAPI_PROP_RW

* Fix indent
2021-07-01 09:36:19 +00:00
Anatoliy Talamanov
fb7ef76e74
Merge pull request #20271 from TolyaTalamanov:at/extend-python-bindings
G-API: Extend python bindings

* Extend G-API bindings

* Wrap timestamp, seqNo, seq_id
* Wrap copy
* Wrap parseSSD, parseYolo

* Rewrap cv.gapi.networks

* Add test for metabackend in pytnon

* Remove int64 pyopencv_to
2021-06-30 09:04:09 +00:00
Anatoliy Talamanov
53eca2ff5b
Merge pull request #20196 from TolyaTalamanov:at/support-vaargs-compile-args
G-API: Support vaargs for cv.compile_args

* Support cv.compile_args to work with variadic number of inputs

* Disable python2.x G-API

* Move compile_args to gapi pkg
2021-06-18 20:16:07 +03:00
Maxim Pashchenkov
2610724ee0
Merge pull request #20157 from mpashchenkov:mp/ocv-gapi-pnetworks
G-API: Python. Wrapper for networks.

* Python networks

* Added pyopencv_to

* Changed work with pyopencv_to
2021-06-01 14:42:44 +00:00
Anatoliy Talamanov
c4df8989e9
Merge pull request #19982 from TolyaTalamanov:at/new-python-operation-api
G-API: New python operations API

* Reimplement test using decorators

* Custom python operation API

* Remove wip status

* python: support Python code in bindings (through loader only)

* cleanup, skip tests for Python 2.x (not supported)

* python 2.x can't skip unittest modules

* Clean up

* Clean up

* Fix segfault python3.9

Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
2021-05-20 18:59:53 +00:00
Alexander Alekhin
c20a424e3a gapi(python): rename cv.gapi_wip_op / cv.gapi_wip_kernels 2021-03-31 20:34:04 +00:00
Anatoliy Talamanov
3f14cb073b
Merge pull request #19804 from TolyaTalamanov:at/python-custom-op
[G-API] Introduce custom python operator API

* Introduce custom python operator API

* Add wip namespace
2021-03-30 20:59:02 +00:00
Anatoliy Talamanov
79d4a38d87 Implement python backend 2021-03-29 22:51:24 +03:00
Anatoliy Talamanov
0753408e10
Merge pull request #19318 from TolyaTalamanov:at/python-generic-infer
[G-API] Python ROI generic inference

* Python generic infer overloads

* Move wrappers to appropriate file
2021-03-25 16:55:29 +00:00
Anatoliy Talamanov
50a264d832
Merge pull request #19310 from TolyaTalamanov:at/generic-infer-overloads
[G-API] Support generic infer overloads

* Overloads for generic infer

* Fix build

* Refactoring

* Fix docs

* Put extra stuff to detail namespace

* Add doc for usings

* Remove uneccessary template in Priv
2021-03-19 12:50:45 +00:00
Anatoliy Talamanov
eb82ba36a3
Merge pull request #19322 from TolyaTalamanov:at/python-callbacks
[G-API] Introduce cv.gin/cv.descr_of for python

* Implement cv.gin/cv.descr_of

* Fix macos build

* Fix gcomputation tests

* Add test

* Add using to a void exceeded length for windows build

* Add using to a void exceeded length for windows build

* Fix comments to review

* Fix comments to review

* Update from latest master

* Avoid graph compilation to obtain in/out info

* Fix indentation

* Fix comments to review

* Avoid using default in switches

* Post output meta for giebackend
2021-03-01 15:52:11 +00:00
Anatoliy Talamanov
c527b3cefd
Merge pull request #19319 from TolyaTalamanov:at/introduce-gopaque-garray-for-python
[G-API] Introduce GOpaque and GArray for python

* Introduce GOpaque and GArray for python

* Fix ctor

* Avoid code duplication by using macros

* gapi: move Python-specific files to misc/python

* Fix windows build

Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
2021-02-09 13:55:16 +00:00
Anatoliy Talamanov
7521f207b1
Merge pull request #18762 from TolyaTalamanov:at/support-garray
[G-API] Wrap GArray

* Wrap GArray for output

* Collect in/out info in graph

* Add imgproc tests

* Add cv::Point2f

* Update test_gapi_imgproc.py

* Fix comments to review
2020-11-27 17:39:46 +00:00
Anatoliy Talamanov
93c3775927
Merge pull request #18491 from TolyaTalamanov:at/wrap-inference
[G-API] Wrap cv::gapi::infer<Generic> into python

* Introduce generic infer

* Move Generic to infer.hpp

* Removew num_outs

* Fix windows warnings

* Fix comments to review

* Fix doxygen

* Add comment

* Fix comments to review

* Wrap inference to python

* Add default ctor to Params

* Add test

* Fix clang build

* Implement GInferInputs/GInferOutputs as Pimpl

* Add checkIEtarget to infer test

* Fix path

* Supress warning

* Use getAvailableDevices insted of checkIETarget

* Move PyParams to bindings_ie

* Add namespace

* Update CMakeLists.txt
2020-10-26 19:02:03 +00:00
Anatoliy Talamanov
0d3e05f9b3
Merge pull request #18493 from TolyaTalamanov:at/wrap-streaming
[G-API Wrap streaming

* Wrap streaming

* Fix build

* Add comments

* Remove comment

* Fix comments to review

* Add test for python pull overload
2020-10-14 22:21:09 +00:00
Anastasiya(Asya) Pronina
af2f8c69f0
Merge pull request #18496 from AsyaPronina:comp_args_serialization
Serialization && deserialization for compile arguments

* Initial stub

* Add test on serialization of a custom type

* Namespaces rework

* Fix isSupported in test struct

* Fix clang lookup issue

* Initial implementation

* Drop the isSupported flag

* Initial implementation

* Removed internal header inclusion

* Switched to public API

* Implemented serialization

* Adding desirialize: WIP

* Fixed merge errors

* Implemented

* Final polishing

* Addressed review comments and added debug throw

* Added FluidROI test

* Polishing

* Polishing

* Polishing

* Polishing

* Polishing

* Updated CMakeLists.txt

* Fixed comments

* Addressed review comments

* Removed decay from deserialize_arg

* Addressed review comments

* Removed extra inclusion

* Fixed Win64 warning

* Update gcommon.hpp

* Update serialization.cpp

* Update gcommon.hpp

* gapi: drop GAPI_EXPORTS_W_SIMPLE from GCompileArg

Co-authored-by: Smirnov Alexey <alexey.smirnov@intel.com>
Co-authored-by: AsyaPronina <155jj@mail.ru>
2020-10-07 21:48:49 +00:00
Anatoliy Talamanov
537494f4dd
Merge pull request #18512 from TolyaTalamanov:at/fix-untyped-np-array-for-gapi-python
[G-API] Numpy array with int64 failed in cv.gin

* Fix bug with numpy array precision in G-API python

* Fix comments to review
2020-10-07 20:38:59 +00:00
Anatoliy Talamanov
e998d89e88 Implement cv.gin and multiple output for python 2020-09-29 13:45:40 +03:00
Alexander Alekhin
7163781639
Merge pull request #18343 from TolyaTalamanov:at/support-return-tuple
[G-API] Support std::tuple for return type
2020-09-18 16:38:37 +03:00
Anatoliy Talamanov
a07f064e50
Merge pull request #18332 from TolyaTalamanov:at/wrap-GIn-GOut
[G-API] Wrap GIn & GOut

* Wrap GIn & GOut into python

* Remove extra brackets

* Use reinterpret_cast
2020-09-17 19:00:03 +00:00
Anatoliy Talamanov
986bc65e1f Change imports order for copytomask 2020-09-17 11:09:41 +03:00
Anatoliy Talamanov
5218443784 Support tuple for python bindings 2020-09-16 16:22:46 +03:00
Anatoliy Talamanov
a258404a58
Merge pull request #18309 from TolyaTalamanov:at/wrap-apply-overloads
[G-API] Wrap cv::gapi::mean kernel into python

* Wrap cv::gapi::mean kernel into python

* Fix test
2020-09-12 22:02:21 +00:00
Anatoliy Talamanov
c708f506a4
Merge pull request #17493 from TolyaTalamanov:at/python-bindings-gapi
* Implement G-API python bindings

* Fix hdr_parser

* Drop initlization with brackets using regexp

* Handle bracket initilization another way

* Add test for core operations

* Declaration and definition of View constructor now in different files

* Refactor tests

* Remove combine decorator from tests

* Fix comment to review

* Fix test

* Fix comments to review

* Remove GCompilerArgs implementation from python

Co-authored-by: Pinaev <danil.pinaev@intel.com>
2020-07-29 16:18:52 +03:00