fixed the ordering of contour convex hull points#16594
Conversation
alalek
left a comment
There was a problem hiding this comment.
Tests should be simple and clear as much as possible.
| Mat canvas_gray(Size(60*scale, 45*scale), CV_8U, Scalar::all(0)); | ||
| fillConvexPoly(canvas_gray, contour_.ptr<Point>(), npoints, Scalar(255, 255, 255)); | ||
|
|
||
| #if 1 // try to eliminate the self-intersection in one way or another |
There was a problem hiding this comment.
Why do we not test input "as is"?
Why do we need these hacks with preparation of input before calling of testing functions?
Why is original input considered as invalid and it requires such processing?
Suggested input comes from somewhere and should be processed in its original form - instead of drawing, dilating and finding contours.
There was a problem hiding this comment.
ok, I added the code to test the original contour
… the original contour as well
…n convexHull and convexityDetects on the original contour, without any manipulations. the rest of the test stays the same
fixed the ordering of contour convex hull points * partially fixed the issue opencv#4539 * fixed warnings and test failures * fixed integer overflow (issue opencv#14521) * added comment to force buildbot to re-run * extended the test for the issue 4539. Check the expected behaviour on the original contour as well * added comment; fixed typo, renamed another variable for a little better clarity * added yet another part to the test for issue opencv#4539, where we run convexHull and convexityDetects on the original contour, without any manipulations. the rest of the test stays the same
…m added dnn: don't require setInput in .dump() dnn: auto network dump through parameter Improved GStreamer documentation. improved documentation for imread() videoio/MSMF: refactored format handling and selection, property reading and writing dnn(test): skip failed ngraph tests add cuda 10 support 3.4 docs for 3.4 branch Resolve opencv#14566 Merge pull request opencv#16445 from atinfinity:fixed-typo * fixed typo * add compatibility code to handle migration Enable Mask R-CNN with Inference Engine. Full coverage with nGraph intrin: fixed int64->double conversion for AVX-512 Merge pull request opencv#16608 from vpisarev:fix_mac_ocl_tests * fixed several problems when running tests on Mac: * OCL_pyrUp * OCL_flip * some basic UMat tests * histogram badarg test (out of range access) * retained the storepix fix in ocl_flip only for 16U/16S datatype, where the OpenCL compiler on Mac generates incorrect code * moved deletion of ACCESS_FAST flag to non-SVM branch (where SVM is shared virtual memory (in OpenCL 2.x), not support vector machine) * force OpenCL to use read/write for GPU<=>CPU memory transfers on machines with discrete video only on Macs. On Windows/Linux the drivers are seemingly smart enough to implement map/unmap properly (and maybe more efficiently than explicit read/write) Merge pull request opencv#16594 from vpisarev:hull_ordering_fix fixed the ordering of contour convex hull points * partially fixed the issue opencv#4539 * fixed warnings and test failures * fixed integer overflow (issue opencv#14521) * added comment to force buildbot to re-run * extended the test for the issue 4539. Check the expected behaviour on the original contour as well * added comment; fixed typo, renamed another variable for a little better clarity * added yet another part to the test for issue opencv#4539, where we run convexHull and convexityDetects on the original contour, without any manipulations. the rest of the test stays the same
| increasing_idx = !(hcurr < hnext); | ||
| else if( increasing_idx != (hcurr < hnext)) | ||
| { | ||
| CV_Error(Error::StsBadArg, |
There was a problem hiding this comment.
This change sometimes breaks the ERFilter.
https://github.com/opencv/opencv_contrib/blob/master/modules/text/src/erfilter.cpp#L2837
There was a problem hiding this comment.
Please provide complete minimal reproducer and fill an issue in opencv_contrib.
Fixes issue #14521.
Partially fixes the issue #4539.