opencv/modules/imgproc/test
Pierre Chatelier f351653589
Merge pull request #13869 from chacha21:LineVirtualIterator
* LineVirtualIterator

Proposal of LineVirtualIterator, an alternative to "LineIterator not attached to any mat".
This is basically the same implementation, replacing the address difference by a single "offset" variable. elemsize becomes irrelevant and considered to be 1. "step" is thus equal to size.width since no stride is expected.

* Update drawing.cpp

fixed warning

* improvement of LineVirtualIterator

instead of being too conservative, the new implementation gets rid of "offset/step" and only keeps a "Point currentPos" up to date.

left_to_right is renamed to forceLeftToRight as suggested (even for the old LineIterator)

assert() replaced by CV_Assert() (even for the old LineIterator)

* fixed implementation

+fixed last commit so that LineVirtualIterator gives at least the same results as LineIterator

+added a new constructor that does not require any Size, so that no clipping is done and iteration occurs from pt1 to pt2. This is done by adding a spatial offset to pt1 and pt2 so that the same implementation is used, the size being in that case the spatial size between pt1 and pt2

* Update imgproc.hpp

fixed warnings

* Update drawing.cpp

fixed whitespace

* Update drawing.cpp

trailing whitespace

* Update imgproc.hpp

+added a new constructor that takes a Rect rather than a Size. It computes the line pt1->pt2 that clips that rect.
Yet again, this is still based on the same implementation, thanks to the Size and the currentPosOffset that can artifically consider the origin of the rect at (0,0)

* revert changes

revert changes on  original LineIterator implementation, that will be superseded by the new LineVirtualIterator anyway

* added test of LineVirtualIterator

* More tests

* refactoring

Use C++11 chained constructors
Improved code style

* improve test

Added offset as random test data.

* fixed order of initialization

* merged LineIterator and VirtualLineIterator

* merged LineIterator & VirtualLineIterator

* merged LineIterator & VirtualLineIterator

* merged LineIterator & VirtualLineIterator

* made LineIterator::operator ++() more efficient

added one perfectly predictable check; in theory, since ptmode is set in the end of the constructor in the header file, the compiler can figure out that it's always true/false and eliminate the check from the inline `LineIterator::operator++()` completely

* optimized Line() function

in the most common case (CV_8UC3) eliminated the check from the loop

Co-authored-by: Vadim Pisarevsky <vadim.pisarevsky@gmail.com>
2020-04-13 06:59:31 +00:00
..
ocl let the test pass on Mali G52 (ODROID-N2) 2020-04-05 01:39:47 +09:00
test_approxpoly.cpp Fix spelling typos 2019-12-27 12:46:53 +00:00
test_bilateral_filter.cpp ts: refactor OpenCV tests 2018-02-03 19:39:47 +00:00
test_boundingrect.cpp build: unreachable code after CV_Error() (part 2) 2018-04-24 16:03:40 +03:00
test_canny.cpp Fix modules/ typos 2019-08-16 17:34:29 +03:00
test_color.cpp Merge pull request #14106 from savuor:lab_wide 2019-05-20 21:10:20 +03:00
test_connectedcomponents.cpp Merge pull request #16415 from arnaudbrejeon:bug_fix_16410 2020-01-29 23:55:43 +03:00
test_contours.cpp completely new C++ persistence implementation (#13011) 2018-11-02 00:27:06 +03:00
test_convhull.cpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-02-26 20:09:03 +03:00
test_cvtyuv.cpp Merge pull request #12971 from sturkmen72:upd_imgproc_hpp 2018-10-31 18:08:24 +03:00
test_distancetransform.cpp don't use constructors for C API structures 2018-09-06 14:34:16 +03:00
test_drawing.cpp Merge pull request #13869 from chacha21:LineVirtualIterator 2020-04-13 06:59:31 +00:00
test_emd.cpp ts: refactor OpenCV tests 2018-02-03 19:39:47 +00:00
test_filter.cpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-03-23 16:54:35 +00:00
test_fitellipse_ams.cpp ts: refactor OpenCV tests 2018-02-03 19:39:47 +00:00
test_fitellipse_direct.cpp ts: refactor OpenCV tests 2018-02-03 19:39:47 +00:00
test_fitellipse.cpp ts: refactor OpenCV tests 2018-02-03 19:39:47 +00:00
test_floodfill.cpp don't use constructors for C API structures 2018-09-06 14:34:16 +03:00
test_goodfeaturetotrack.cpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-11-02 05:33:35 +00:00
test_grabcut.cpp Check for empty Mat in compare, operator= and RNG::fill, fixed related tests 2018-07-17 17:50:50 +03:00
test_histograms.cpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-02-26 20:09:03 +03:00
test_houghcircles.cpp Merge pull request #16561 from vpisarev:better_hough_circles 2020-02-14 19:16:41 +03:00
test_houghlines.cpp Merge pull request #11108 from take1014:hough_4303 2018-05-23 20:42:12 +00:00
test_imgproc_umat.cpp ts: refactor OpenCV tests 2018-02-03 19:39:47 +00:00
test_imgwarp_strict.cpp change area() emptiness checks to empty() 2018-10-13 21:35:10 +02:00
test_imgwarp.cpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-04-02 21:52:32 +00:00
test_intersectconvexconvex.cpp imgproc: fixed bug from intersectConvexConvex 2019-05-01 11:06:30 +02:00
test_intersection.cpp Fix spelling typos 2019-12-27 12:46:53 +00:00
test_lsd.cpp imgproc: removed LSD code due original code license conflict 2019-03-01 16:25:39 +03:00
test_main.cpp Merge pull request #11897 from Jakub-Golinowski:hpx_backend 2018-08-31 16:23:26 +03:00
test_moments.cpp don't use constructors for C API structures 2018-09-06 14:34:16 +03:00
test_pc.cpp ts: refactor OpenCV tests 2018-02-03 19:39:47 +00:00
test_precomp.hpp ts: refactor OpenCV tests 2018-02-03 19:39:47 +00:00
test_resize_bitexact.cpp imgproc(test): fix resize bitexact test 2018-11-30 16:38:07 +03:00
test_smooth_bitexact.cpp imgproc: fix bit-exact GaussianBlur() / sepFilter2D() (#15855) 2019-11-18 01:39:27 +03:00
test_subdivision2d.cpp resolve #5788 2018-08-31 00:59:00 +09:00
test_templmatch.cpp completely new C++ persistence implementation (#13011) 2018-11-02 00:27:06 +03:00
test_thresh.cpp Enable Otsu thresholding for CV_16UC1 images 2020-04-06 21:19:07 -07:00
test_watershed.cpp Fix some typos 2019-11-26 18:41:19 +03:00