opencv/modules
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
..
calib3d Merge pull request #16614 from GFleishman:estimateTranslation3D 2020-04-07 19:58:25 +00:00
core Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-04-06 15:57:43 +00:00
dnn Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-04-09 19:19:20 +00:00
features2d Fixs several problems found by static analysis 2020-03-16 19:15:26 +03:00
flann Fix spelling typos 2019-12-27 12:46:53 +00:00
gapi Fixed standalone build, added cv::gapi::proto::ptr test 2020-04-09 17:19:11 +03:00
highgui Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-04-09 19:19:20 +00:00
imgcodecs OpenJPEG: fixed compilation and warnings with VS 2020-04-07 16:03:17 +03:00
imgproc Merge pull request #13869 from chacha21:LineVirtualIterator 2020-04-13 06:59:31 +00:00
java Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-01-28 14:26:57 +03:00
js Fix spelling typos 2019-12-27 12:46:53 +00:00
ml Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-12-31 10:11:39 +00:00
objdetect Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-03-23 16:54:35 +00:00
photo Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-01-22 16:58:30 +03:00
python Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-03-20 21:41:15 +00:00
stitching Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-04-02 21:52:32 +00:00
ts Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-03-23 16:54:35 +00:00
video Fix spelling typos 2019-12-27 12:46:53 +00:00
videoio videoio: set plugin output dir on windows to bin 2020-04-08 15:22:50 +03:00
world Merge pull request #13422 from mshabunin:split-videoio-cmake 2018-12-26 15:50:20 +03:00
CMakeLists.txt