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
test_boundingrect.cpp
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
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
test_distancetransform.cpp
test_drawing.cpp Merge pull request #13869 from chacha21:LineVirtualIterator 2020-04-13 06:59:31 +00:00
test_emd.cpp
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
test_fitellipse_direct.cpp
test_fitellipse.cpp
test_floodfill.cpp
test_goodfeaturetotrack.cpp
test_grabcut.cpp
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
test_imgproc_umat.cpp
test_imgwarp_strict.cpp
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
test_moments.cpp
test_pc.cpp
test_precomp.hpp
test_resize_bitexact.cpp
test_smooth_bitexact.cpp imgproc: fix bit-exact GaussianBlur() / sepFilter2D() (#15855) 2019-11-18 01:39:27 +03:00
test_subdivision2d.cpp
test_templmatch.cpp
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