CARVIEW |
Navigation Menu
-
-
Notifications
You must be signed in to change notification settings - Fork 56.2k
[G-API]: fitLine() Standard Kernel Implementation #18790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a warning here:
gapi_tests_common.hpp(339): warning C4702: unreachable code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alalek please, could you help with these two problems?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here is warning too:
gapi_tests_common.hpp(343): warning C4702: unreachable code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mb emplace_back
, or wrapping (Pt{pt})
might help
double _tol; | ||
}; | ||
|
||
// class AbsToleranceLine2D : public WrappableVec<AbsToleranceLine2D, float, 4> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks great, thanks for your effort!
Try to fix warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok.
[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.