Conversation
|
@TolyaTalamanov The PR still does not pass pre-commit checks. Please take a look on CI. |
3a6c459 to
48e3d24
Compare
48e3d24 to
1940228
Compare
ae2fdaa to
e3fdd97
Compare
e3fdd97 to
1fc2945
Compare
|
@dkurt Could you have a look, please ? |
| cv.gapi.core.cpu.kernels(), | ||
| cv.gapi.core.fluid.kernels() | ||
| # cv.gapi.core.plaidml.kernels() | ||
| ] |
There was a problem hiding this comment.
indentation is strange here (use 4 spaces)
| def test_good_features_to_track(self): | ||
| # TODO: Extend to use any type and size here | ||
| sz = (720, 1280) | ||
| in1 = np.random.randint(0, 100, sz).astype(np.uint8) |
There was a problem hiding this comment.
np.random
- input is not determined (no way to reproduce failed test) - we don't want sporadic failures.
- it is better to use some image instead (or draw it)
| # OpenCV - (num_points, 1, 2) | ||
| # G-API - (num_points, 2) | ||
| # Comparison | ||
| self.assertEqual(0.0, cv.norm(expected.flatten(), actual.flatten(), cv.NORM_INF)) |
There was a problem hiding this comment.
for pkg in pkgs
Consider providing clear messages about failures: add information about used "pkg".
| ccomp.start() | ||
|
|
||
| # Assert | ||
| while cap.isOpened(): |
There was a problem hiding this comment.
Please limit the number of processed frames.
We really don't need to process all 100 frames here.
/cc @dmatveev This note is actual for other tests too, including C++
|
@alalek @dkurt @smirnov-alexey Could you have a look ? |
| { | ||
| switch (info.kind) | ||
| { | ||
| case cv::detail::OpaqueKind::CV_POINT2F: |
There was a problem hiding this comment.
I'm going to use HostCtor to avoid switch here in next PR
There was a problem hiding this comment.
It has been already implemented in PR: #18900
|
@dmatveev Could you have a look ? |
[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
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.
Overview
Changes
GTypeInfowhich storesGShape&GKind.collectInfowhich collectGTypeInfofrom input/output node handles in theade::Graph, such kind of information are needed to:GComputation.apply()doesn't take output args, so need to allocate their inside)cv::Scalarorcv::Rect)CV_POINT2FtoGKindto handleGArray<cv::Point2f>GGoodFeaturesoperationGArray<cv::Point2f>asGArrayP2finto python (GArray is supported only for output)Implementation details
GArrayis a template class, so it can't be wrapped to pythonas is. The solution is wrap all instances corresponding inGKind. Now only instance forGArray<cv::Point2f>(cv::GShape::CV_POINT2F)is wrapped. For this, need to create using on GArraycv::Point2f`:and put this:
to
shadow_gapi.hppto force python generate code for this instance.Such principle will be used for wrapping other
GArray&GOpaquetypes.Kind
cv::GKind::CV_UNKNOWNisn't planned to be supported, yetBuild configuration