opencv/modules/imgproc/src
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
..
opencl Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-04-08 10:19:09 +00:00
_geom.h
accum.cpp refactoring catching all exceptions as const ref 2018-11-08 19:59:47 +03:00
accum.dispatch.cpp
accum.simd.hpp Merge pull request #15527 from everton1984:faster_acc 2019-10-11 18:32:59 +03:00
approx.cpp Fix spelling typos 2019-12-27 12:46:53 +00:00
bilateral_filter.dispatch.cpp imgproc: add src.empty() checks in filter operations 2020-03-20 21:04:29 +00:00
bilateral_filter.simd.hpp imgproc: dispatch bilateral_filter 2019-03-11 13:54:12 +00:00
blend.cpp blendLinear() reworked to use wide universal intrinsics 2019-01-25 14:16:20 +03:00
box_filter.dispatch.cpp imgproc: add src.empty() checks in filter operations 2020-03-20 21:04:29 +00:00
box_filter.simd.hpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-03-11 19:20:22 +00:00
canny.cpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-07-02 21:17:45 +00:00
clahe.cpp Add semicolons after CV_INSTRUMENT macros 2018-09-14 06:45:31 +09:00
color_hsv.dispatch.cpp imgproc: dispatch color* 2019-03-07 15:45:05 +03:00
color_hsv.simd.hpp rgb2hls_b: out of bounds read fixed 2019-05-27 16:19:52 +03:00
color_lab.cpp out of bounds read fixed in rgb2luv_b 2019-05-27 16:19:01 +03:00
color_rgb.dispatch.cpp imgproc: dispatch color* 2019-03-07 15:45:05 +03:00
color_rgb.simd.hpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-03-11 19:20:22 +00:00
color_yuv.dispatch.cpp imgproc: dispatch color* 2019-03-07 15:45:05 +03:00
color_yuv.simd.hpp imgproc: dispatch color* 2019-03-07 15:45:05 +03:00
color.cpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-03-11 19:20:22 +00:00
color.hpp imgproc(color): clarify error message 2019-12-06 13:25:51 +03:00
color.simd_helpers.hpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-03-11 19:20:22 +00:00
colormap.cpp Merge pull request #15388 from atinfinity:impl-turbo-colormap 2019-08-26 17:55:10 +03:00
connectedcomponents.cpp Merge pull request #16415 from arnaudbrejeon:bug_fix_16410 2020-01-29 23:55:43 +03:00
contours.cpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-07-02 21:17:45 +00:00
convhull.cpp Merge pull request #16594 from vpisarev:hull_ordering_fix 2020-02-21 18:18:24 +03:00
corner.avx.cpp Merge pull request #16236 from alalek:fix_core_simd_emulator 2020-01-10 21:31:02 +03:00
corner.cpp Restored IPP call reduction 2019-07-31 15:41:22 +03:00
corner.hpp
cornersubpix.cpp Add semicolons after CV_INSTRUMENT macros 2018-09-14 06:45:31 +09:00
demosaicing.cpp Convert demosiacing with variable number of gradients to HAL - 5.5x faster 2019-11-15 07:42:03 -06:00
deriv.cpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-03-23 16:54:35 +00:00
distransform.cpp imgproc(IPP): disable ippiDistanceTransform_3x3_8u32f_C1R 2019-11-13 14:14:19 +03:00
drawing.cpp Merge pull request #13869 from chacha21:LineVirtualIterator 2020-04-13 06:59:31 +00:00
emd.cpp Add semicolons after CV_INSTRUMENT macros 2018-09-14 06:45:31 +09:00
featureselect.cpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-11-10 20:50:26 +00:00
filter.dispatch.cpp imgproc: add src.empty() checks in filter operations 2020-03-20 21:04:29 +00:00
filter.hpp imgproc: get rid of filter.avx2.cpp 2019-03-11 13:54:12 +00:00
filter.simd.hpp imgproc: fix unaligned memory access 2019-07-11 20:49:47 +00:00
filterengine.hpp Merge pull request #14936 from StefanBruens:crosscorr_cleanup 2019-06-30 19:04:25 +03:00
fixedpoint.inl.hpp imgproc: fix bit-exact GaussianBlur() / sepFilter2D() (#15855) 2019-11-18 01:39:27 +03:00
floodfill.cpp Add semicolons after CV_INSTRUMENT macros 2018-09-14 06:45:31 +09:00
gabor.cpp
generalized_hough.cpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-09-14 23:44:35 +00:00
geometry.cpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-05-23 19:50:20 +03:00
grabcut.cpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-06-26 20:19:04 +00:00
hal_replacement.hpp Merge pull request #12106 from CJSmith-0141:warpPerspective_typofix 2018-08-01 14:41:20 +03:00
hershey_fonts.cpp
histogram.cpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-12-12 13:02:19 +03:00
hough.cpp Merge pull request #16561 from vpisarev:better_hough_circles 2020-02-14 19:16:41 +03:00
imgwarp.avx2.cpp
imgwarp.cpp Merge pull request #12670 from alalek:imgproc_getRotationMatrix2D_return_type 2019-09-28 18:03:34 +00:00
imgwarp.hpp Merge pull request #15358 from ChipKerchner:imgwarpToHal 2019-08-31 13:47:58 +03:00
imgwarp.sse4_1.cpp imgproc: apply CV_OVERRIDE/CV_FINAL 2018-03-28 17:57:59 +03:00
intersection.cpp Add semicolons after CV_INSTRUMENT macros 2018-09-14 06:45:31 +09:00
linefit.cpp imgproc: fix fitLine() implementation 2019-10-03 21:23:52 +00:00
lsd.cpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-03-06 11:43:16 +03:00
main.cpp
matchcontours.cpp Add semicolons after CV_INSTRUMENT macros 2018-09-14 06:45:31 +09:00
median_blur.dispatch.cpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-03-23 16:54:35 +00:00
median_blur.simd.hpp imgproc: dispatch medianBlur 2019-03-11 13:54:12 +00:00
min_enclosing_triangle.cpp More issues found by static analysis 2018-07-24 16:04:42 +03:00
moments.cpp Merge pull request #15828 from ChipKerchner:momentsToHal 2019-11-05 18:52:35 +03:00
morph.dispatch.cpp imgproc: add src.empty() checks in filter operations 2020-03-20 21:04:29 +00:00
morph.simd.hpp imgproc: dispatch morph 2019-03-11 13:54:12 +00:00
phasecorr.cpp Add semicolons after CV_INSTRUMENT macros 2018-09-14 06:45:31 +09:00
precomp.hpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-04-24 18:13:06 +03:00
pyramids.cpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-02-26 20:09:03 +03:00
resize.avx2.cpp imgproc(resize): drop unused 'pix_size4' 2020-03-29 02:41:50 +00:00
resize.cpp imgproc(resize): drop unused 'pix_size4' 2020-03-29 02:41:50 +00:00
resize.hpp imgproc(resize): drop unused 'pix_size4' 2020-03-29 02:41:50 +00:00
resize.sse4_1.cpp imgproc(resize): drop unused 'pix_size4' 2020-03-29 02:41:50 +00:00
rotcalipers.cpp Fix modules/ typos 2019-08-16 17:34:29 +03:00
samplers.cpp Add semicolons after CV_INSTRUMENT macros 2018-09-14 06:45:31 +09:00
segmentation.cpp Add semicolons after CV_INSTRUMENT macros 2018-09-14 06:45:31 +09:00
shapedescr.cpp Fix spelling typos 2019-12-27 12:46:53 +00:00
smooth.dispatch.cpp imgproc: add src.empty() checks in filter operations 2020-03-20 21:04:29 +00:00
smooth.simd.hpp Fix pixel value evaluation overflow in bit-exact GaussianBlur implementation 2019-07-12 18:11:51 +03:00
spatialgradient.cpp Merge pull request #13693 from terfendail:spatialgrad_wintr 2019-01-30 22:37:27 +03:00
subdivision2d.cpp Add semicolons after CV_INSTRUMENT macros 2018-09-14 06:45:31 +09:00
sumpixels.avx512_skx.hpp imgproc: dispatch sumpixels (integral) 2020-01-17 16:54:29 +03:00
sumpixels.dispatch.cpp imgproc: dispatch sumpixels (integral) 2020-01-17 16:54:29 +03:00
sumpixels.simd.hpp Merge pull request #16731 from alalek:issue_16708 2020-03-04 19:28:04 +00:00
tables.cpp
templmatch.cpp Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-07-02 21:17:45 +00:00
thresh.cpp Enable Otsu thresholding for CV_16UC1 images 2020-04-06 21:19:07 -07:00
utils.cpp