[G-API]: fitLine() Standard Kernel Implementation#18790
[G-API]: fitLine() Standard Kernel Implementation#18790alalek merged 6 commits intoopencv:masterfrom
Conversation
- initialization for vectors of cv::Point and Mats via vectors added - comparison functions for Vec<T, n> added: - straight average difference comparison - comparison by equasion for 2d line - stream overload for cv::DistanceTypes added
| vec_.clear(); | ||
| vec_.reserve(sz_in); | ||
|
|
||
| for (int i = 0; i < sz_in; i++) |
There was a problem hiding this comment.
There is a warning here:
gapi_tests_common.hpp(339): warning C4702: unreachable code
There was a problem hiding this comment.
Could you try to print the values here (sz_in, vec_). There might me an uninitialized value somewhere
There was a problem hiding this comment.
@alalek please, could you help with these two problems?
There was a problem hiding this comment.
As it is a test code (not a public header), so you can eliminate this warning through #pragma for MSVS 2015 (use _MSC_VER < 1910/*MSVS 2017*/)
| { | ||
| Pt<T> pt; | ||
| initPointRandU(rng, pt); | ||
| vec_.push_back(pt); |
There was a problem hiding this comment.
And here is warning too:
gapi_tests_common.hpp(343): warning C4702: unreachable code
There was a problem hiding this comment.
Mb emplace_back, or wrapping (Pt{pt}) might help
| double _tol; | ||
| }; | ||
|
|
||
| // class AbsToleranceLine2D : public WrappableVec<AbsToleranceLine2D, float, 4> |
smirnov-alexey
left a comment
There was a problem hiding this comment.
Overall looks great, thanks for your effort!
Try to fix warning
smirnov-alexey
left a comment
There was a problem hiding this comment.
Looks good, thanks
[G-API]: fitLine() Standard Kernel Implementation * fitLine API (Mat, 32S, 32F) (2D, 3D) * Complete fitLine kernel & accuracy tests - initialization for vectors of cv::Point and Mats via vectors added - comparison functions for Vec<T, n> added: - straight average difference comparison - comparison by equasion for 2d line - stream overload for cv::DistanceTypes added * Fix precommit warnings * Fix docs * Address comments Try to fix warning * Disable warning in tests
These changes:
fitLine()standard kernelcv::GMat,cv::GArray<Point{2,3}i>,cv::GArray<Point{2,3}f>,cv::GArray<Point{2,3}d>)cv::Vec<T, n>providedPull 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.