[G-API] Introduce custom python operator API#19804
Conversation
94f3bd5 to
de02d58
Compare
de02d58 to
65e1e75
Compare
|
@dmatveev All check are passed |
dmatveev
left a comment
There was a problem hiding this comment.
Reviewed.
I see a lot of stuff in the public API part which may be hard to change once we merge it to an OpenCV release... Dunno wut to do with it tbh, ideally we need to isolate all this code into some "volatile" header or something to indicate clearly it WILL change.
| template <typename... T> | ||
| GOutputs op(const std::string& id, cv::GKernel::M outMeta, T&&... args) | ||
| { | ||
| return op(id, outMeta, cv::GArgs{cv::GArg(std::forward<T>(args))... }); | ||
| } |
There was a problem hiding this comment.
This is not for python, right?
There was a problem hiding this comment.
Only for python it's implemented in misc/python/python_bridge.hpp and these symbols doesn't exist in libopencv_gapi.so
| return outputs; | ||
| } | ||
|
|
||
| class cv::gapi::GOutputs::Priv |
There was a problem hiding this comment.
Priv is usually hidden from the headers (as it acts for PIMPL purposes)
There was a problem hiding this comment.
There is no way to implement it in cpp file, because this files will be included into cv2.cpp
| def custom_add_meta(img_desc1, img_desc2, dtype): | ||
| return img_desc1 | ||
|
|
||
| return cv.gapi_wip_op('custom.add', custom_add_meta, g_in1, g_in2, dtype).getGMat() |
There was a problem hiding this comment.
can it be cv.gapi.wip.op ?
There was a problem hiding this comment.
No, it can't all custom function placed in cv2 namespace
This stuff isn't a part of |
dmatveev
left a comment
There was a problem hiding this comment.
Let's merge it as wip and complete till the next major ocv release.
|
@alalek Can it be merged ? |
[G-API] Introduce custom python operator API * Introduce custom python operator API * Add wip namespace
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.
Build configuration