G-API Expose all imgproc operations to python#22735
Merged
alalek merged 2 commits intoopencv:4.xfrom Nov 18, 2022
Merged
Conversation
bd5e9d5 to
c3bcc4d
Compare
Contributor
Author
|
@dmatveev Could you have a look, please? |
Merged
a-sajjad72
pushed a commit
to a-sajjad72/opencv
that referenced
this pull request
Mar 30, 2023
…proc-to-python G-API Expose all imgproc operations to python * Expose imgproc operations * Fix alignment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.
Motivation
Python bindings are available since a long time, but only a few operations (
operation::on(...)wrappers) were exposed.There was a great plan to implement feature in python parser that could automatically detect
G-APIoperation (viaGAPI_TYPED_KERNELmacro or so) and expose it into python, but this functionality is more about giving an opportunity to user to implement pythonkernelsfor already existing in G-API operations.This PR is going to expose just
operation::onwrappers to python in order to give user everything that is available from c++, because now, for developers who don't build from source and change the code only available a small amount of functionality.Since a lot of developers use
opencvfrompiplet's expose it once and forever.Great example of G-API usage: https://github.com/xiong-jie-y/g_api_examples
TODO list:
coreimgprocvideostereoG-Type's & some compiler args)Problems
Some of
imgprocoperations are still not exposed because of complexity of wrapping their return types to python.GArray<GArray<Point>> findContours(...)- 2 overloadsstd::tuple<GArray<GArray<Point>>,GArray<Vec4i>> findContoursH(...)- 2 overloadsGOpaque<Vec4f> fitLine2D(...)- 4 overloadsGOpaque<Vec6f> fitLine3D(...)- 4 overloadsGMatP NV12toRGBp(...)GMatP NV12toBGRp(...)GMatP resizeP(...)Issue: #22736