Commit Graph

2691 Commits

Author SHA1 Message Date
Tomoaki Teshima
640d77be25 let the performance tests of WarpPerspective pass
* avoid misuse of vzeroupper on Visual Studio 2013 Update 5
  * add ifdef to avoid unattended optimization
2018-03-07 18:55:27 +09:00
Tomoaki Teshima
9079d9ce17 let the test OCL_Filter/Bilateral pass
* avoid aggressive optimization on Visual Studio 2012 Update 5
  * add code branch to avoid unattended optimization (keep the old code)
2018-03-06 19:48:04 +09:00
Tomoaki Teshima
8fd1bbde76 fix test error on Tinker Board (OpenCL on Arm platform)
* loosen some test threshold mainly for integer types
  * use relative error for floating points result
  * avoid division by zero by following the comment
  * fix the indentation
2018-02-26 22:55:06 +09:00
Florian Echtler
6a8f57e5d7 Merge pull request #10081 from floe:java-camera2-view
* add (untested) JavaCamera2View class

* initial fixes

* minor cleanup

* exclude JavaCamera2View from build for older SDK version

* fix method name typo

* add asserts + sanity checks

* fix preview format checks

* fix the memory leak

* export cvtTwoPlaneYUVtoBGR for Java usage

* add handling for two-plane YUV frames (C wrapper still missing)

* add two-plane cvtColor helper function

* fix warnings

* actually use the new cvtColorTwoPlane helper func

* fix wrong output matrix size

* fix wrong conversion type

* simplify method signature, add error condition

* minor fixes to Mat types

* remove leftover semaphore from camera api 1

* android: JavaCamera2View minor refactoring

- re-apply Java code style
- imports cleanup
- dump exceptions information

* android: JavaCamera2View: pause/resume fixes

* android: JavaCamera2View: fix mScale
2018-02-17 15:01:24 +03:00
Alexander Alekhin
c020a7bb67 build: portable integer types 2018-02-15 23:43:02 +03:00
luz.paz
d05714995c Misc. modules/ cont. pt2
Found via `codespell`
2018-02-13 11:28:11 -05:00
Alexander Alekhin
579781e35e Merge pull request #10822 from alalek:ocl_fix_imgproc_amd 2018-02-12 13:48:06 +00:00
Alexander Alekhin
fad3a6bf15 ocl: disable Laplacian5 and sepFilter2D_SinglePass kernels for AMD OpenCL 2018-02-12 14:06:57 +03:00
take1014
03407a9da0 Merge pull request #10646 from take1014:master
* Add a new interface for hough transform

* Fixed warning code

* Fix HoughLinesUsingSetOfPoints based on HoughLinesStandard

* Delete memset

* Rename HoughLinesUsingSetOfPoints and add common function

* Fix test error

* Change static function name

* Change using CV_Assert instead of if-block and add integer test case

* I solve the conflict and delete 'std :: tr1' and changed it to use 'tuple'

* I deleted std::tr1::get and changed int to use 'get'

* Fixed sample code

* revert test_main.cpp

* Delete sample code in comment and add snippets

* Change file name

* Delete static function

* Fixed build error
2018-02-08 22:54:43 +03:00
Alexander Alekhin
44d7435a48 build: eliminate calls of removed functionality from C++17
Most part is deprecated since C++11
2018-02-07 12:00:33 +03:00
Alexander Alekhin
4a297a2443 ts: refactor OpenCV tests
- removed tr1 usage (dropped in C++17)
- moved includes of vector/map/iostream/limits into ts.hpp
- require opencv_test + anonymous namespace (added compile check)
- fixed norm() usage (must be from cvtest::norm for checks) and other conflict functions
- added missing license headers
2018-02-03 19:39:47 +00:00
Rostislav Vasilikhin
1055f9d208 Merge pull request #10757 from savuor:test_hist_renew
* old types removed

* QueryHist tests: new types

* ThreshHist tests: new types

* CalcHist tests: new types

* CalcBackProject tests: new types

* CalcBackProjectPatch tests: new types

* const ref added
2018-02-02 21:35:44 +03:00
Alexander Alekhin
82f889d9b8 Merge pull request #10765 from BelBES:sb/findContours_fix 2018-02-02 16:03:15 +00:00
Harshal Nishar
384fa95680 Fix in Canny when Sobel apertureSize is 7 (#10743)
* Fixing a bug in Canny implemetation when Sobel aperture size is 7.

* Fixing the bug in Canny accross variants and in test_canny.cpp

* Replacing a tab with white space
2018-02-02 17:00:11 +03:00
sergeybe
2266a8c85f fix FindContours default offset for CV_LINK_RUNS method 2018-02-02 16:46:05 +03:00
Aditya Rohan
ccea0a831a Merge pull request #10732 from Riyuzakii:10598
* Introduces error throw for line drawn with THICKNESS=0
2018-02-01 15:21:00 +03:00
LaurentBerger
2ebf4e084a solve issue #10687 2018-01-26 17:01:02 +01:00
Vitaly Tuzov
12ea8477a3 bitexact gaussianblur implementation (#10345)
* Bit-exact implementation of GaussianBlur smoothing

* Added universal intrinsics based implementation for bit-exact CV_8U GaussianBlur smoothing.

* Added parallel_for to evaluation of bit-exact GaussianBlur

* Added custom implementations for 3x3 and 5x5 bit-exact GaussianBlur
2018-01-22 13:26:32 +03:00
Alexander Alekhin
f056e713c3 Merge pull request #10512 from sturkmen72:update_documentation 2018-01-18 04:44:59 +00:00
Woody Chow
20b3261204 Propagate calculated Gaussian kernel size(ref). Otherwise, ipp_GaussianBlur will fail if user doesn't specify a kernel size. (#10579) 2018-01-16 17:15:23 +03:00
Maksim Shabunin
8b87c4b96a Fixed several warnings produced by clang 6 and static analyzers 2018-01-16 15:26:28 +03:00
Vadim Pisarevsky
59915a3fc9 Merge pull request #10575 from ioxp:getFontScale 2018-01-16 10:51:04 +00:00
woody.chow
f5d9a2a9c1 Parallelize initUndistortRectifyMap 2018-01-15 09:20:35 +09:00
Suleyman TURKMEN
dcd4f8f5db Update documentation 2018-01-12 22:21:14 +03:00
Philipp Hasper
6032d86e23 Added getFontScaleFromHeight() 2018-01-11 14:00:27 +01:00
Alexander Alekhin
d0b2e60edc Merge pull request #10514 from alalek:build_warnings 2018-01-05 20:54:01 +00:00
Alexander Alekhin
8acd05f12a Merge pull request #10421 from cezheng:patch-1 2018-01-05 09:24:33 +00:00
Alexander Alekhin
116c8d0ddf build: eliminate warnings
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
2018-01-05 04:30:08 +00:00
victor-ludorum
ad23c10600
Updating rotcalipers.cpp to resolve issue #10096
Updating the documentation of the rotcalipers.cpp to resolve issue #10096
2017-12-30 10:21:46 +05:30
Tom Becker
592f8d8c1b Merge pull request #10232 from TomBecker-BD:hough-many-circles
Hough many circles (#10232)

* Add Hui's optimization. Merge with latest changes in OpenCV.

* Use conditional compilation instead of a runtime flag.

* Whitespace.

* Create the sequence for the nonzero edge pixels only if using that approach.

* Improve performance for finding very large numbers of circles

* Return the circles with the larger accumulator values first, as per API documentation.
Use a separate step to check distance between circles. Allows circles to be sorted by strength first. Avoids locking in EstimateRadius which was slowing it down.
Return centers only if maxRadius == 0 as per API documentation.

* Sort the circles so results are deterministic. Otherwise the order of circles with the same strength depends on parallel processing completion order.

* Add test for HoughCircles.

* Add beads test.

* Wrap the non-zero points structure in a common interface so the code can use either a vector or a matrix.

* Remove the special case for skipping the radius search if maxRadius==0.

* Add performance tests.

* Use NULL instead of nullptr.
OpenCV should compile with C++98 compiler.

* Put test suite name first.
Use different test suite names for each test to avoid an error from the test runner.

* Address build bot errors and warnings.

* Skip radius search if maxRadius < 0.

* Dynamically switch to NZPointList when it will be faster than NZPointSet.

* Fix compile error: missing 'typename' prior to dependent type name.

* Fix compile error: missing 'typename' prior to dependent type name.
This time fix it the non C++ 11 way.

* Fix compile error: no type named 'const_reference' in 'class cv::NZPointList'

* Disable ManySmallCircles tests. Failing on Mac.

* Change beads image to JPEG for smaller file size.
Try enabling the ManySmallCircles tests again.

* Remove ManySmallCircles tests. They are failing on the Mac build.

* Fix expectations to check all circles.

* Changing case on a case-insensitive file system
Step 1: remove the old file names

* Changing case on a case-insensitive file system
Step 2: add them back with the new names

* Fix cmpAccum function to be strictly weak ordered.

* Add tests for many small circles.

* imgproc(perf): fix HoughCircles tests

* imgproc(houghCircles): refactor code

- simplify NZPointList
- drop broken (de-synchronization of 'current'/'mi' fields) NZPointSet iterator
- NZPointSet iterator is replaced to direct area scan
- use SIMD intrinsics
- avoid std exceptions (build for embedded systems)
2017-12-28 17:23:11 +03:00
Vadim Pisarevsky
69a6765bf7 Merge pull request #10387 from terfendail:resize23_perftest 2017-12-22 13:26:05 +00:00
Vadim Pisarevsky
3f68d6d8a7 Merge pull request #10392 from terfendail:bitexact_fallback 2017-12-22 13:23:55 +00:00
Alexander Alekhin
83b8cd0152 Merge pull request #10375 from tomoaki0705:buildWarningMSVC 2017-12-22 13:17:12 +00:00
Vitaly Tuzov
5fdb42a7c9 Added fallback to generic linear resize in case bit-exact resize of provided matrix isn't supported 2017-12-22 14:29:50 +03:00
Ce Zheng
602b08d9c7
Update resize inline comments
Reading through the implementation, I feel this line of comment is not consistent with the actually code, so this is for correcting it.
2017-12-22 16:03:12 +08:00
Vitaly Tuzov
019162486c Disabled universal intrinsic based implementation for bit-exact resize of 3-channel images 2017-12-22 10:08:30 +03:00
Tomoaki Teshima
fe7b3f1228 clean up the code
* disable the warning in CMake, not int the code using pragma
2017-12-22 08:42:21 +09:00
Vadim Pisarevsky
a8a51db42b Merge pull request #10316 from terfendail:bitexact_c234 2017-12-21 18:56:54 +00:00
Vitaly Tuzov
b6fe4cc807 Added performance tests for linear resize of 2 and 3-channel images 2017-12-20 18:11:21 +03:00
Alexander Alekhin
813ff37967 imgproc(ocl): fix RGB2RGBA kernel out of range access 2017-12-20 14:19:46 +00:00
Vitaly Tuzov
1eb2fa9efb Added universal intrinsics based implementations for CV_8UC2, CV_8UC3, CV_8UC4 bit-exact resizes. 2017-12-20 17:17:10 +03:00
elenagvo
b0e9d76ced HAL for canny 2017-12-19 11:03:10 +03:00
Alexander Alekhin
28b19d6e3e
Merge pull request #10313 from alalek:rename_fix
Fix file names
2017-12-15 21:40:22 +03:00
Maksim Shabunin
1033f2b1bd Fixed 3 issues found by static analysis 2017-12-15 17:29:26 +03:00
Alexander Alekhin
d5f152494b fix file names 2017-12-15 14:59:35 +03:00
Vitaly Tuzov
51cb56ef2c Implementation of bit-exact resize. Internal calls to linear resize updated to use bit-exact version. (#9468) 2017-12-13 15:00:38 +03:00
Maksim Shabunin
7349b8f5ce Build for embedded systems 2017-12-11 13:27:37 +03:00
Vadim Pisarevsky
cd7526c973 Merge pull request #10266 from ChristofKaufmann:warp_documentation 2017-12-08 18:48:48 +00:00
Elena Gvozdeva
6185f7209e Merge pull request #10172 from ElenaGvozdeva:eg/HAL_sobel
* add HAL for SobelFilter
* add HAL for pyrDown
* add HAL for Scharr
2017-12-08 16:36:24 +03:00
Christof Kaufmann
9c5b231b2d doc: Add type restriction note for geometric transformations
This is added according to #7862.
2017-12-08 12:33:51 +01:00
Vadim Pisarevsky
4781f0a337 Merge pull request #10024 from iago-suarez:bugfix-lsd-multiple-imgs-issue#10023 2017-12-06 09:01:37 +00:00
Vadim Pisarevsky
4b8275061e Merge pull request #10058 from ElenaGvozdeva:eg/HAL 2017-12-05 20:56:24 +00:00
Juha Reunanen
5b41599911 Fix pointPolygonTest for large coordinate values (#10222)
* Add test that fails

* Fix integer pointPolygonTest for large coordinate values

* Review fixes:
- change type from long long to int64
- move test code to test_contours.cpp, and make it C++98 compliant

* Hopefully fix compiler error by using push_back instead of emplace_back
2017-12-05 15:49:44 +03:00
Vadim Pisarevsky
5ce38e516e Merge pull request #10223 from vpisarev:ocl_mac_fixes
* fixed OpenCL functions on Mac, so that the tests pass

* fixed compile warnings; temporarily disabled OCL branch of TV L1 optical flow on mac

* fixed other few warnings on macos
2017-12-05 13:32:28 +03:00
elenagvo
7bfb38055c remove matrix release 2017-12-01 14:38:00 +03:00
elenagvo
81519537ae fix the parameters order 2017-12-01 14:38:00 +03:00
elenagvo
0f12351a41 fix accelerators order 2017-12-01 14:38:00 +03:00
elenagvo
7aadbc9607 remove complex data structs 2017-12-01 14:38:00 +03:00
elenagvo
ce65975625 call HAL for GaussianBlur is fixed 2017-12-01 14:38:00 +03:00
elenagvo
a25c443d1f add perf test for boxFilter CV8U to CV16U 2017-12-01 14:38:00 +03:00
elenagvo
c2c7333107 add hal for GaussianBlur 2017-12-01 14:38:00 +03:00
elenagvo
cb9e110adb add HAL for BoxFilter 2017-12-01 14:38:00 +03:00
Vadim Pisarevsky
7ae19467b5 Merge pull request #10171 from ElenaGvozdeva:Threshold 2017-11-30 10:02:47 +00:00
Vadim Pisarevsky
f5dba12762 Merge pull request #10180 from alalek:ocl_avoid_unnecessary_initialization 2017-11-29 11:42:22 +00:00
elenagvo
73ac5321f5 fix threshold HAL 2017-11-28 17:42:29 +03:00
Vadim Pisarevsky
666fc0ba69 Merge pull request #9986 from terfendail:drawcontours_docfix 2017-11-28 13:19:06 +00:00
elenagvo
762138e77e define adaptiveMethod and thresholdType for HAL 2017-11-28 16:02:06 +03:00
Alexander Alekhin
0ed3209b00 ocl: avoid unnecessary loading/initializing OpenCL subsystem
If there are no OpenCL/UMat methods calls from application.

OpenCL subsystem is initialized:
- haveOpenCL() is called from application
- useOpenCL() is called from application
- access to OpenCL allocator: UMat is created (empty UMat is ignored) or UMat <-> Mat conversions are called

Don't call OpenCL functions if OPENCV_OPENCL_RUNTIME=disabled
(independent from OpenCL linkage type)
2017-11-28 14:02:42 +03:00
elenagvo
c95bc0c7fd add HAL for threshold 2017-11-27 15:35:02 +03:00
elenagvo
11ddb9332c add HAL for adaptiveThreshold 2017-11-27 15:35:02 +03:00
Vadim Pisarevsky
ec076bfba3
Update imgproc.hpp
rewrote the added note in perhaps a cleaner way
2017-11-27 13:42:10 +03:00
Vadim Pisarevsky
92be112388 Merge pull request #10107 from ElenaGvozdeva:medianBlur_HAL 2017-11-27 10:12:16 +00:00
Alexander Alekhin
11330b9253 Merge pull request #10095 from alalek:fix_canny_intrinsics 2017-11-25 12:31:47 +00:00
elenagvo
5d0a8d2aaf fix the parameters order 2017-11-23 13:30:00 +03:00
Maksim Shabunin
1c46034166 Other buffers 2017-11-21 17:55:23 +03:00
Maksim Shabunin
2178c5e95e init ABtoXZ 2017-11-21 17:55:23 +03:00
Maksim Shabunin
b3018ba89e LUV tables 2017-11-21 17:55:23 +03:00
Maksim Shabunin
e75056a084 static init 2017-11-21 17:55:23 +03:00
Maksim Shabunin
51fc891a5c cvtColor: fixed tables init, moved some tables to heap 2017-11-21 17:55:23 +03:00
Rostislav Vasilikhin
397b57dd72 Merge pull request #10041 from savuor:RevHoughWorks
HoughCircles rewritten (PR #7434 updated) (#10041)

* initial version of renewed HoughCircles done

* fixed compilation

* fixed SIMD ability & compilation warning

* fixed accumulator nonmax comparison

* common Mutex for all invokers

* nzLocal is std::vector

* nz is std::vector

* SSE2 -> SIMD128

* centers is now std::vector

* circles is std::vector

* estimateRadius updated

* accum calculation w/o mutex

* less deprecated code

* several bugs fixed

* back to mutex, TLS gathering doesn't work

* extra code removed

* little refactoring

* docs note updated

* a little speedup

* warning fixed
2017-11-21 14:18:47 +03:00
elenagvo
3a09da71d8 add HAL for medianBlur 2017-11-20 17:09:22 +03:00
elenagvo
20c08eab73 change border type for medianBlur to BORDER_ISOLATED 2017-11-17 15:13:04 +03:00
elenagvo
1a9d8e9447 test for GaussianBlur with border 2017-11-17 13:15:15 +03:00
Alexander Alekhin
baff521b63 imgproc(Canny): eliminate unnecessary operations
drop manual loop unrolling:
- don't block compiler optimizations
- no effect on i5
2017-11-15 19:29:59 +00:00
Suleyman TURKMEN
992a81dcaa Update lsd.cpp 2017-11-11 22:26:44 +03:00
Alexander Alekhin
e89ae986fa Merge pull request #10053 from terfendail:intersectconvex_fix 2017-11-09 11:05:56 +00:00
Vitaly Tuzov
0205238dca Fix for intersectConvexConvex nested contours check 2017-11-08 20:27:07 +03:00
Fakabbir Amin
a0c658b012 Merge pull request #9979 from fakabbir:ImproveDoc
* Improve Documentation
Fixes Spelling Mistakes.
2017-11-08 16:55:48 +00:00
Alexander Alekhin
bffe254a81 Merge pull request #10003 from sturkmen72:documentation_updates 2017-11-07 16:52:15 +00:00
Suleyman TURKMEN
63fb79b519 updates documentation and samples 2017-11-07 19:21:21 +03:00
Alexander Alekhin
981009ac1f Merge pull request #9999 from mshabunin:fix-gcc72-warnings 2017-11-07 13:37:25 +00:00
Alexander Alekhin
96aebbe7f9 Merge pull request #9970 from mshabunin:media-sdk-convert 2017-11-07 13:37:07 +00:00
Iago Suárez
42d942e19c Clearing data into the detect method of the class cv::LineSegmentDetectorImpl 2017-11-04 17:12:20 +01:00
Maksim Shabunin
184daa155f Fixed minor issues reported by GCC 7.2 2017-11-03 18:06:39 +03:00
Alexander Alekhin
47ae5197a9 test: extract OpenCL Moments tests, drop 'coi' parameter 2017-11-02 13:37:58 +03:00
Alexander Alekhin
c9c759f700 ocl: fix moments global_size (should be >= local_size) 2017-11-02 13:37:57 +03:00
Vitaly Tuzov
b9b553b8bc Add more details to drawContour description 2017-11-01 16:01:12 +03:00
Maksim Shabunin
0c79f4a00f MediaSDK: fixed Linux build, improved BGR<->NV12 conversions 2017-11-01 14:14:45 +03:00
Fakabbir Amin
cd428fb798 Error in the documentation for cv::getRectSubPix. #9788 (#9871)
* Error in the documentation for cv::getRectSubPix. #9788
The function name is corrected to GetRectSubPix since, it uses the notation
of src, dst and center. Also added the number of channel assertion criteria.

* Error in the documentation for cv::getRectSubPix. #9788
Replace dst with patch in the formula, reverted function name to
getRectSubPix, removed BorderTypes comment line due to no explicit call
to the function found.

* Error in the documentation for cv::getRectSubPix. #9788
Replace dst with patch in the formula, reverted function name to
getRectSubPix, removed BorderTypes comment line due to no explicit call
to the function found.
2017-10-30 13:04:20 +03:00
Alexander Alekhin
7b0d2d189f Merge pull request #9951 from alalek:fix_bilateral_f32_simd 2017-10-27 16:43:20 +00:00