1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-21 19:33:03 +04:00

Compare commits

...

802 Commits

Author SHA1 Message Date
Alexander Alekhin ddbd10c001 release: OpenCV 4.1.1
OpenCV 4.1.1
2019-07-26 03:24:45 +00:00
Alexander Alekhin 7c0a43d425 Merge tag '4.1.1-openvino' 2019-07-26 03:23:42 +00:00
Alexander Alekhin 0cf479dd5c Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-07-25 19:21:47 +00:00
Alexander Alekhin 1f736a95a7 Merge pull request #15131 from paroj:web 2019-07-25 16:25:57 +00:00
Alexander Alekhin 79859ebca3 Merge pull request #15145 from alalek:fix_15127 2019-07-25 16:14:25 +00:00
Alexander Alekhin 5691d998ea core(persistence): added null ptr checks 2019-07-25 15:14:22 +03:00
Andrey Golubev b10ec8ef8b Merge pull request #14985 from andrey-golubev:gapi_fix_ocl_umat
* G-API: fix GOCLExecutable issue with UMat lifetime

Add tests on initialized/uninitialized outputs for all
backends

* Use proper clean-up procedure for magazine

* Rename InitOut test and reduce tested sizes

* Enable output allocation test
2019-07-24 23:36:18 +03:00
Alexey Smirnov 8313209704 Merge pull request #14952 from smirnov-alexey:gapi_transform_macro_rework
G-API: GAPI_TRANSFORM internal functionality rework (#14952)

* Change internal pattern and substitute signatures and refactor tests

* Enhance GArrayU with type-checker function

Add a couple of new tests on GAPI_TRANSFORM
2019-07-24 23:29:52 +03:00
Alexander Alekhin 89f23a35c5 Merge pull request #15091 from anton-potapov:fluid_internal_parallellism_custom_pfor 2019-07-24 20:28:48 +00:00
Pavel Rojtberg 293729f48a js: whitelist some more functions (calib3d , aruco) 2019-07-23 11:57:59 +02:00
Alexander Alekhin 79310a0051 Merge pull request #15105 from komakai:camera_permissions 2019-07-22 17:47:54 +00:00
Alexander Alekhin b69bf8a897 Merge pull request #15097 from komakai:no_samples_build-option 2019-07-22 17:38:37 +00:00
Alexander Alekhin 426482e05b Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-07-21 18:06:04 +00:00
Giles Payne 2734291b35 Add CameraActivity utility class to automate Camera permission request handling 2019-07-20 13:40:10 +09:00
Alexander Alekhin 3361c59576 Merge pull request #15084 from lpea:calib3d_doc_fix 2019-07-19 10:11:35 +00:00
Anton Potapov 8936d55675 Fluid Internal Parallelism
- added ability to use custom implementation of "parallel for" function
2019-07-19 11:56:57 +03:00
Alexander Alekhin 199ddff13b Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-07-18 20:25:25 +00:00
Alexander Alekhin 985e5014bc Merge pull request #15058 from alalek:core_fix_base64_packed_struct_master 2019-07-18 19:09:08 +00:00
Alexander Alekhin 8b341884d2 Merge pull request #15080 from alalek:gapi_fix_build 2019-07-18 15:15:25 +00:00
Giles Payne a897fc91ec Add no_samples_build option to Android SDK build 2019-07-18 21:31:02 +09:00
Alexander Alekhin e7bb0ecee0 gapi: fix build with unique_ptr
avoid generation of copy ctors with unique_ptr members
2019-07-18 14:08:42 +03:00
Guillaume Jacob 4a28ef8034 calib3d: fix format in findChessboardCornersSB doxygen 2019-07-18 10:04:47 +02:00
Alexander Alekhin f6ec0cd827 Merge pull request #15061 from AsyaPronina:dev/fix_merge_issue 2019-07-16 21:00:50 +03:00
AsyaPronina add1df4bcb Fixed issue happened during merge 2019-07-16 20:47:34 +03:00
Alexander Alekhin 65d148d9a8 Merge pull request #15024 from alalek:android_stl_cxx_shared 2019-07-16 17:10:04 +00:00
Andrey Golubev c9bd43c0f6 Merge pull request #14945 from andrey-golubev:delete_bool
G-API: clean up accuracy tests (#14945)

* Delete createOutputMatrices flag

Update the way compile args function is created

Fix instantiation suffix print function

* Update comment (NB)

* Make printable comparison functions

* Use defines instead of objects for compile args

* Remove custom printers, use operator<< overload

* Remove SAME_TYPE and use -1 instead

* Delete createOutputMatrices flag in new tests

* Fix GetParam() printed values

* Update Resize tests: use CompareF object

* Address code review feedback

* Add default cases for operator<< overloads

* change throw to GAPI_Assert
2019-07-16 19:04:18 +03:00
Andrey Golubev c11423df1e Merge pull request #15012 from andrey-golubev:test_output
G-API: Add output allocation tests for backends (#15012)

* Add output tests for backends

* Fix large size test: output is in fact reallocated

* Use cv::Mat copies for reallocation tracking

* Separate LargeSizeWithCorrectSubmatrix test

* Rename backed output allocation tests

* Address code review feedback

Update test names

Add illustrative "expect (non-)empty" checks

Rename mat "copy" to mat reference

Add more pointer checks

* Add illustrative checks
2019-07-16 19:01:45 +03:00
Andrey Golubev e629785a97 Merge pull request #15021 from andrey-golubev:gapi_fix_standalone_exports
* Fix G-API export specifier in standalone build

* Make dummy GAPI_EXPORTS in case of non-OpenCV builds

* Add old version under #if 0
2019-07-16 18:53:51 +03:00
Alexander Alekhin 3a2a74b655 Merge pull request #14968 from anton-potapov:fluid_internal_parallellism 2019-07-16 14:22:06 +00:00
Anton Potapov 97e88bd769 Fluid Internal Parallelism
- Added new graph compile time argument to specify multiple independent
ROIs (Tiles)
 - Added new "executable" with serial loop other user specified
ROIs(Tiles)
 - refactored graph traversal code into separate function to be called
once
 - added saturate cast to Fluid AddCsimple test kernel
2019-07-16 16:09:14 +03:00
Alexander Alekhin d4501f08b8 core(persistence): disable base64 tests due missing encoders 2019-07-16 15:37:58 +03:00
Alexander Alekhin 2df7736562 Merge branch 'core_fix_base64_packed_struct' 2019-07-16 15:35:43 +03:00
Alexander Alekhin ee1de8f30d Merge pull request #15053 from SciMad:fix-error-message 2019-07-16 09:55:06 +00:00
Madhav bee510dbce Fix error message on invalid seam finder parameter 2019-07-16 13:27:04 +05:45
Alexander Alekhin 571b69bdb6 Merge pull request #15049 from alalek:disable_14850 2019-07-15 16:27:45 +00:00
Alexander Alekhin 095f44f4b2 cmake: disable WITH_NVCUVID by default due build failures 2019-07-15 17:09:07 +03:00
Alexander Alekhin 95415ac3a5 android: change ANDROID_STL='c++_shared'
- fixes crashes in face-detector application
- libc++_shared.so is bundled automatically via CMake helper project
2019-07-12 18:58:02 +00:00
Alexander Alekhin f6c573880e Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-07-12 18:45:06 +00:00
Alexander Alekhin f663e8f903 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-07-09 19:57:57 +00:00
Alexander Alekhin de4d304d90 Merge pull request #15000 from mshabunin:fix-videoio-writer 2019-07-09 12:59:10 +00:00
Maksim Shabunin 2a9521661e Fixed video writer filename check for plugins 2019-07-09 14:16:49 +03:00
Maksim Shabunin 693877212d Fixed video writer filename check for plugins 2019-07-09 14:08:29 +03:00
Alexander Alekhin 8408587341 Merge pull request #14888 from vchiluka5:NVIDIA_Optical_Flow 2019-07-07 17:20:53 +03:00
Alexander Alekhin 0fc584961c cmake: workaround to fix link issues with stubs/libcuda.so.1 2019-07-06 16:29:59 +00:00
Alexander Alekhin d7744aca02 dnn: use OpenVINO 2019R2 defines 2019-07-04 19:22:48 +03:00
Alexander Alekhin db211446f3 OpenCV version '-openvino' 2019-07-04 19:22:48 +03:00
Alexander Alekhin 43eba3d750 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-07-04 18:44:13 +03:00
Ruslan Garnov ad49138fae Merge pull request #14917 from rgarnov:gapi_planar_kernels
G-API planar kernels (#14917)

* Added resizeP with tests

* NV12 planar filters

* fix warnings in ResizeP test

* fix out mat ocv warning

* sz_on - > sz rename

* cpu tests new signature

* try to fix resizeP test

* trailing spaces remove

* doxygen doc fixed

* doxygen minor fix

* more doxygen fixes

* Doxygen corrected and extended after review.
2019-07-04 18:19:09 +03:00
Alexander Alekhin 097d81363b Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-07-02 21:17:45 +00:00
Andrey Golubev 2bf8793632 Merge pull request #14946 from andrey-golubev:obj_not_ref
G-API: Use object instead of reference in extended lifetime case (#14946)

* Use object instead of reference

* Make the object const
2019-07-02 19:03:45 +03:00
Alexander Alekhin bff90d4684 Merge pull request #14951 from alalek:issue_14937 2019-07-01 16:48:05 +00:00
Alexander Alekhin 65552bf403 dnn: fix build with Vulkan 2019-07-01 17:54:40 +03:00
Alexander Alekhin 6fdce865b8 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-06-29 17:27:48 +00:00
Alexander Alekhin 453466eb1a Merge pull request #14885 from anton-potapov:common_flow_explanatory_test_cases 2019-06-28 16:52:03 +00:00
Alexander Alekhin 49805f976a Merge pull request #14923 from andrey-golubev:imgproc_tests_update_clean 2019-06-28 16:01:32 +00:00
Andrey Golubev 1666195984 Merge pull request #14922 from andrey-golubev:operators_tests_update_clean
G-API: Align operators tests to new test model (#14922)

* Align operators tests to new test model

* Change init function in NotOperatorTest
2019-06-28 17:59:52 +03:00
Anton Potapov 3d345ca4c4 Async API for GAPI
- explanatory  test cases for common usage models
2019-06-28 17:40:00 +03:00
atalaman 8dd596b7ba Merge pull request #14892 from TolyaTalamanov:at/parameterized-render-tests
G-API: Parameterized render tests (#14892)

* Init commit

* Add mat size as test parameter

* Add test for text render

* Add test for rect render

* Add tests for line and circle

* Remove old render tests

* Init output mats

* Remove methods input arguments

* Add comment about data loss in BGR2NV12 conversion

* Add edge test cases

* Replace default color for out mats black -> white
2019-06-28 17:11:03 +03:00
Andrey Golubev 719912e46e Align imgproc tests to new model 2019-06-28 14:31:50 +03:00
Andrey Golubev 75c567b6ab Merge pull request #14757 from andrey-golubev:core_tests_update
G-API: Introduce new approach to write accuracy tests (#14757)

* G-API: Introduce new common accuracy test fixture

* Enable Range<> to Seq<> implicit conversion

* Fix shadowing parameters

* Update license headers

* Rename ALIGNED_TYPE to SAME_TYPE

* Move MkRange to tests

* Fix TODO(agolubev) in test instantiations

* Squash simple fixture declarations in one line

* Remove unused line

* Fix Windows issues with macro expansion

* Choose between 1 or 2 matrix initialization

* Redesign common class behavior

Use "views" for GetParam() provided by GTest
base class instead of doing segregation
(with copy!) of common and specific parameters:
request common or specific parameter directly
by index from GetParam()-returned parameters

* Refine user-level API and usage of new test model

* Fix -fpermissive errors

* Remove unnecessary init calls

* Replace GCompileArgs member variable with func ptr

* Rename initMatsRandN to make its behavior explicit

Rename initMatsRandN to initMatrixRandN to eliminate confusion:
initMatsRandN only initialized first matrix (similarly to
initMatrixRandU)

* Fix common of initNothing

* Update copyright dates in missed files

* Add check for specific parameters

* Fix coment stlye
2019-06-28 13:07:41 +03:00
Vishal Chiluka 0e9a865bbf Moved NVIDIA_Optical_Flow sample app to opencv_contrib
Description:
Moved NVIDIA_Optical_flow sample app and comparison app to
opencv_contrib branch. Added CUDA_CUDA_LIBRARY in CMakeLists.txt for
resolving linker errors.
2019-06-28 09:19:26 +05:30
Alexander Alekhin b95e93c20a Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-06-26 20:19:04 +00:00
Alexander Alekhin b58b2c5ae8 Merge pull request #14878 from JoeHowse:4.1.0-patches 2019-06-24 18:29:30 +00:00
atalaman de60600126 Merge pull request #14820 from TolyaTalamanov:at/circle_and_line
G-API: Implement line and circle draw operations (#14820)

* Implement line and circle draw operations

* Fix comments to review
2019-06-24 17:37:32 +03:00
Alexander Alekhin f4ca2c8e72 Merge pull request #14874 from alalek:videoio_fix_gstreamer_plugin_build 2019-06-24 12:37:53 +00:00
Maksim Shabunin 46205a7235 videoio: fix GStreamer plugin build 2019-06-24 13:56:43 +03:00
Alexander Alekhin 974491f93d Merge pull request #14861 from alalek:update_version_4.1.1-pre 2019-06-22 13:57:10 +00:00
Alexander Alekhin 442bc80cd7 pre: OpenCV 4.1.1 (version++) 2019-06-21 19:18:50 +03:00
Alexander Alekhin f84b08ff08 dnn: bump API version 2019-06-21 19:18:23 +03:00
Alexander Alekhin f33f88de31 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-06-21 17:27:14 +03:00
Alexander Alekhin e69ff71302 Merge pull request #14846 from alalek:videoio_gstreamer_issues_master 2019-06-21 13:51:22 +00:00
Alexander Alekhin 2b2633c11f videoio(gstreamer): port changes from 14834 2019-06-21 14:42:58 +03:00
Joe Howse 729848caeb core: revise syntax to support Visual C++ 2013 2019-06-20 13:57:17 -03:00
Alexander Alekhin 9cb239247d Merge pull request #14689 from anton-potapov:gapi_async_cacnel 2019-06-20 13:48:05 +00:00
Alexander Alekhin 1b7b2c3a62 Merge pull request #14844 from rgarnov:gapi_contains_tuple 2019-06-20 12:52:07 +00:00
Ruslan Garnov 7c0a9ff4c1 Added overload of contains<> for tuple 2019-06-20 14:40:14 +03:00
Anton Potapov 8d75bfae47 Cancelation support fo Async GAPI
-
2019-06-19 13:41:39 +03:00
Alexander Alekhin 1d2ef6b2a1 Merge pull request #14774 from alalek:videoio_ffmpeg_plugin_win32 2019-06-17 14:47:48 +00:00
Alexey Smirnov 7f9a9f2a09 Merge pull request #14648 from smirnov-alexey:as/gapi_transform
* Introduce GAPI_TRANSFORM initial interface

Comes along with simple tests and kernel package changes

* Fix documentation and adjust combine() function

* Fix stuff after rebasing on master

* Remove redundant functionality

* Refactoring according to review feedback provided

* Fixes according to review feedback

* Reconsider transformations return and fix a warning

* Fixes from code review

* Add a new simple test

* Cleanup, added tests on GScalar, GMatP, GArray
2019-06-17 16:26:28 +03:00
Alexander Alekhin 26dfa5e77c ffmpeg: win32 wrapper update 2019-06-16 16:20:40 +00:00
Alexander Alekhin 7b099e0fe2 videoio: plugins support on Win32 2019-06-16 15:25:25 +00:00
Alexander Alekhin 66d7956e67 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-06-15 16:25:11 +00:00
Ruslan Garnov 3df83dce7e Merge pull request #14741 from rgarnov:gapi_fix_includes
Changed quotes to brackets when including public includes (#14741)
2019-06-14 19:27:19 +03:00
atalaman d3c0f4ef98 Merge pull request #14700 from TolyaTalamanov:at/cv_gapi_render
G-API: Render (#14700)

* cv::Render

Implement OCVRedner for BGR as input

* Support two plane cv::Render::run

* Snapshot

* Add RenderCreator

* text2Points

* Snapshot

* Refactoring tests

* Remove text2points

* Fix render input data type in tests

* Refactoring

* Fix headers
* Change struct fields name

* Fix headers

* Fix warnings

* Replace cv::Scalar -> cv::gapi::own::Scalar

* Add test

* PutText and rectangle case

* Fix comments to review

* Fix comments to review

* Fix comments to review

* Create render_priv.hpp
* Implement BGR2NV12
* Fix NV12 test

* Fix comments to review

* Add header for GAPI_Assert
2019-06-14 18:29:49 +03:00
Alexander Alekhin cf9bddcb89 Merge pull request #14805 from alalek:fix_valgrind_issues 2019-06-14 14:15:01 +00:00
Alexander Alekhin 3af1b6ecdc valgrind: fix issues 2019-06-14 14:31:38 +03:00
Alexander Alekhin 4623e6220f Merge pull request #14804 from mshabunin:fix-mediasdk-detect 2019-06-14 11:20:37 +00:00
Maksim Shabunin ae31115017 Improved MediaSDK detection mechanism 2019-06-14 12:37:49 +03:00
Alexander Alekhin 6389303c1c Merge pull request #14793 from mshabunin:fix-plugin-install 2019-06-13 14:05:55 +00:00
Maksim Shabunin 5015829ce8 Fixed plugin installation location on Windows 2019-06-13 16:06:06 +03:00
Alexander Alekhin 81fad9e247 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-06-11 20:43:40 +00:00
Alexander Alekhin e7dbc4ff28 Merge pull request #14782 from alalek:core_fix_log_level_default 2019-06-11 20:11:32 +00:00
Alexander Alekhin b4d3ff378e Merge pull request #14720 from rgarnov:gapi_remove_lut3d 2019-06-11 16:24:54 +00:00
Alexander Alekhin 6c8ffe81d0 core: repair default log level 2019-06-11 19:19:10 +03:00
Alexander Alekhin 1706a7609a Merge pull request #14781 from mshabunin:minimal-python-3-master 2019-06-11 14:19:37 +00:00
Maksim Shabunin d60ac98ef2 Limited API support for Python3 2019-06-11 15:20:43 +03:00
Alexander Alekhin 3f67623c26 Merge pull request #14779 from alalek:oss_fuzz_14115 2019-06-11 11:35:28 +00:00
Alexander Alekhin 59f4a2e0f3 Merge pull request #14777 from alalek:oss_fuzz_15154 2019-06-11 11:34:46 +00:00
Alexander Alekhin d3d13c41c4 core: avoid function type cast, make happy UBSAN
oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14115
2019-06-11 07:06:29 +00:00
Alexander Alekhin f6230ae019 imgcodecs(tiff): add more checks
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=15154
2019-06-10 21:00:20 +00:00
Alexander Alekhin 11b020b9f9 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-06-10 19:05:28 +00:00
Alexander Alekhin 987061d800 Merge pull request #14771 from mshabunin:fix-world-build 2019-06-10 12:02:39 +00:00
Maksim Shabunin f99f58d99f Allow setting IS_PART_OF_WORLD in command line, fix videoio plugin linking 2019-06-10 14:13:54 +03:00
atalaman 1aefa6779f Merge pull request #14513 from TolyaTalamanov:at/color-convert-kernels
G-API: Implement color-convert kernels (#14513)

* Implement color-convert kernels

* Fix rgb2yuv422 reference version

* Fix comments to review

* Restore NV12toBGR in imgproc.hpp

* Add accuracy tests

* Fix doxygen

* Fix ref version yuv422

* Fix warnings

* Fix typos

* Fix simd version yuv422

* Fix warnings

* Fix compile error

* Fix warning

* Remove comment
2019-06-10 14:09:30 +03:00
Alexander Alekhin ddcf388270 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-06-07 19:02:55 +03:00
Alexander Alekhin f3de2b4be7 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-06-05 19:11:52 +03:00
Ruslan Garnov 25e4bce1a6 Removed LUT3D API entry 2019-06-04 17:13:21 +03:00
Alexey Smirnov e329c84d5e Merge pull request #14684 from smirnov-alexey:as/convert2_test_extension
G-API: Add parameters alpha and beta in tests on ConvertTo kernel (#14684)

* Add parameters alpha and beta in tests on ConvertTo kernel

* Change tolerance function

* Reduce number of test cases
2019-06-04 15:54:09 +03:00
Alexander Alekhin 03a3be0844 Merge pull request #14716 from alalek:oss_fuzz_13282 2019-06-04 09:24:32 +00:00
Alexander Alekhin 76fca0e755 imgcodecs: sanitize PAM decoding
oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13282
2019-06-03 22:19:42 +00:00
Alexander Alekhin db900af8c7 Merge pull request #14696 from devnexen:fbsd_build_fix 2019-06-02 20:54:32 +00:00
David Carlier 9fd95b93f7 FreeBSD build fix 2019-06-02 20:25:42 +01:00
Yashas Samaga B L ae279966c2 Merge pull request #14660 from YashasSamaga:dnn-cuda-build
add cuDNN dependency and setup build for cuda4dnn (#14660)

* update cmake for cuda4dnn

- Adds FindCUDNN
- Adds new options:
   * WITH_CUDA
   * OPENCV_DNN_CUDA
- Adds CUDA4DNN preprocessor symbol for the DNN module

* FIX: append EXCLUDE_CUDA instead of overwrite

* remove cuDNN dependency for user apps

* fix unused variable warning
2019-06-02 14:47:15 +03:00
Alexander Alekhin 3ccb1d67c2 Merge pull request #14670 from alalek:gapi_fix_visibility_conflict 2019-05-30 11:21:50 +00:00
Alexander Alekhin d2d8535a31 Merge pull request #14664 from alalek:oss_fuzz_13314 2019-05-29 20:05:33 +00:00
Alexander Alekhin 419a6d51b3 3rdparty(libpng): fix leak in png_handle_eXIf
oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13314
ported commit: https://github.com/glennrp/libpng/commit/a142b7a543d16d271b8aba3ef7ca4aa9a368f55d
2019-05-29 18:51:52 +00:00
Alexander Alekhin 9f68376c91 gapi: fix visibility conflict in OpenCV builds 2019-05-29 15:06:08 +03:00
Alexander Alekhin 216988b0b1 Merge pull request #14582 from alalek:android_update_debug 2019-05-29 11:22:53 +00:00
Alexander Alekhin 53c771551c Merge pull request #14473 from alalek:video_dis_update_opencl
video(DISOpticalFlow): update OpenCL implementation (#14473)

* video(DIS): add code for profiling

* video(DIS): fix test parameters

* video(DIS): simplify OpenCL kernels

- parameters -> defines
- avoid float3
- const / local scope
- improve readability, replace Kernel::set() -> args()

* video(DIS): use CV_32FC2 buffers
2019-05-29 14:22:21 +03:00
Alexander Alekhin 43467a2ac7 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-05-28 18:29:48 +00:00
Alexander Alekhin ed96864892 Merge pull request #14641 from thangktran:thangktran/bugfix/DISOpticalFlow-segfault-for-small-images 2019-05-27 16:23:08 +00:00
Thang Tran d1615ba11a video:fixed DISOpticalFlow segfault from small img 2019-05-27 08:18:26 +02:00
Alexander Alekhin 6c6dd16acf Merge pull request #14628 from devnexen:openbsd_build_fix 2019-05-25 13:53:53 +00:00
David Carlier a6144b8e1a OpenBSD build fix 2019-05-25 10:18:34 +01:00
Alexander Alekhin 166ecaeda8 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-05-23 19:50:20 +03:00
Alexander Alekhin 2080e06f7b Merge pull request #14601 from asashour:14211_CvType 2019-05-23 12:26:19 +00:00
Ahmed Ashour 1050b5351e java: add CvType.CV_16F 2019-05-23 08:49:01 +02:00
Alexander Alekhin 8bf9dda604 Merge pull request #14514 from mshabunin:fix-videoio-docs 2019-05-22 18:15:43 +00:00
Ruslan Garnov 54ff72a1cc Merge pull request #14599 from rgarnov:gapi_aux_kernels
G-API aux kernels (#14599)

* Removed gcpuimgproc.hpp and gcpucore.hpp

* Changed GModel::orderedInputs and orderedOutputs to get ConstGraph&

* Added auxiliaryKernels() method of GBackend::Priv
2019-05-22 21:13:13 +03:00
atalaman cbb699efd2 Merge pull request #14151 from TolyaTalamanov:at/own-mat-output-doesnt-support
G-API: own::Mat as output computation doesn't work (#14151)

* Fix bug with output own::Mat

* Fix comments to review

* Fix preprocess condition

* Fix comments to review
2019-05-22 19:57:08 +03:00
atalaman d9dac9cd1b Merge pull request #14150 from TolyaTalamanov:at/computation-doesnt-work-with-out-vector
G-API: GComputation doesn't work with output vector<cv::Mat> (#14150)

* Fix bug with gcomputation output vector

* Add test fixture

* Fix comments to review

* Fix alignment
2019-05-22 19:13:15 +03:00
Maksim Shabunin bcf7286ad9 Docs: updated videoio module overview 2019-05-22 15:35:34 +03:00
atalaman 935c02c0a3 Merge pull request #13851 from TolyaTalamanov:at/new-kernel-package-design
G-API: Kernel package design (#13851)

* Remove cv::unite_policy from API

* Add check that all id in kernel package are unique

* Refactor checker id procedure

* Remove cv::gapi::GLookupOrder from API

* Implement cv::gapi::use_only

* Fix samples

* Fix docs

* Fix comments to review

* Remove unite_policy

* Fix GKernelPackage::backends()

* Fix comments to review

* Fix all_unique

* Fix comments to review

* Fix comments to review

* Remove out of date tests
2019-05-22 14:53:44 +03:00
Alexander Alekhin de977cc9c8 Merge pull request #14474 from alalek:ocl_kernel_args_variadic 2019-05-20 18:18:02 +00:00
Alexander Alekhin e4b9a58c15 Merge pull request #14578 from mshabunin:add-mfx-plugin 2019-05-19 19:36:16 +00:00
Alexander Alekhin 3c1267dbe6 android: update 'debug' information support 2019-05-19 16:09:45 +00:00
Alexander Alekhin b4ec8fe3ef Merge pull request #14539 from rgarnov:gapi_fix_nv12_odd_slices 2019-05-17 16:59:52 +00:00
Maksim Shabunin 6fc6207e93 Added videoio plugin for MediaSDK 2019-05-17 17:24:53 +03:00
Alexander Alekhin 9003b60d65 Merge pull request #14567 from alalek:core_drop_ostream_string_overload 2019-05-16 11:32:13 +00:00
Alexander Alekhin d93588dfeb Merge pull request #14562 from alalek:calid3d_fix_examples_paragraph 2019-05-16 11:23:16 +00:00
Alexander Alekhin e21262deba Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-05-16 04:40:39 +00:00
Alexander Alekhin b8f9076de0 core: drop 'operator << (ostream, String)' overload
'cv::String' is 'std::string' in OpenCV 4.x
2019-05-15 14:00:02 +03:00
Alexander Alekhin d784b40e24 calib3d(docs): examples paragraph is related to findHomography() 2019-05-14 19:20:40 +00:00
Ruslan Garnov 50af4df1d7 Fixed roi inference to always produce even sizes for nv12 2019-05-14 18:37:33 +03:00
Alexander Alekhin b2abd8ca41 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-05-07 16:04:54 +00:00
Alexander Alekhin 2aed9aea47 Merge pull request #14492 from anton-potapov:gapi_async_review_updates 2019-05-07 14:15:45 +00:00
Anton Potapov c2e26c1527 Async API for GAPI
- minor cosmetic changes : comments, typos
2019-05-07 13:12:15 +03:00
Alexander Alekhin 610f5481c1 core(ocl): ocl::Kernels::args() via variadic template 2019-05-04 00:06:31 +00:00
Alexander Alekhin 03ec1ca0a4 Merge pull request #14403 from alalek:issue_14372 2019-05-03 20:41:51 +00:00
Alexander Alekhin 04caf0549d video(DIS): OpenCL workaround for AMDGPU 2019-05-03 19:01:14 +00:00
Alexander Alekhin 0e1dd63f5e video(DIS): use OpenCL shared mem
- fix perf test iterations
2019-05-03 18:58:26 +00:00
Alexander Alekhin e28e3c9491 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-05-01 08:27:45 +00:00
Alexander Alekhin 076ee65c85 Merge pull request #14448 from rgarnov:gapi_gmatp 2019-04-30 16:48:34 +00:00
Ruslan Garnov 834d438d6e Added GMatP type 2019-04-30 17:25:29 +03:00
anton-potapov f5801ee7da Merge pull request #14346 from anton-potapov:gapi_async
* Async API for GAPI

 - naive implementation as a starting point

* Fix namespace comment in header
2019-04-30 13:11:56 +03:00
Alexander Alekhin faca45a7ea Merge pull request #14429 from rgarnov:gapi_fluid_fix_small_rois 2019-04-29 15:08:11 +00:00
Alexander Alekhin e8ac7a34dd Merge pull request #14426 from alalek:cmake_fix_include_pkgconfig 2019-04-26 20:18:38 +00:00
Alexander Alekhin c9f3f4d1d3 cmake: fix pkg-config handling
Avoid non-intentional call of "include(FindPkgConfig)"
It should be handled in the root CMakeLists.txt (safely for cross-compiling)
2019-04-26 18:19:03 +03:00
Alexander Alekhin 7b8ce63730 Merge pull request #14402 from rgarnov:gapi_planar_mats 2019-04-26 14:59:12 +00:00
Ruslan Garnov ffaf4d5da4 Fixed incorrect first window setting for fluid FilterAgent 2019-04-26 17:34:44 +03:00
Ruslan Garnov fb326a3589 Added a reproducer 2019-04-26 17:33:50 +03:00
Ruslan Garnov f81886d17c Added planar flag to GMatDesc, intergated into framework, added tests 2019-04-26 14:04:44 +03:00
Alexander Alekhin d0032b0717 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-04-22 18:17:28 +00:00
Alexander Alekhin 8120595c3e Merge pull request #14387 from alalek:fix_winpack_build 2019-04-22 15:53:13 +00:00
Alexander Alekhin 44bd849697 build: reduce usage of constexpr
some compilers has lack of proper support for that
2019-04-22 15:41:27 +03:00
Ryan Wong 8af96248bf Merge pull request #13909 from kinchungwong:logging_20190220
OE-11 Logging revamp (#13909)

* Initial commit for log tag support.

Part of #11003, incomplete. Should pass build.

Moved LogLevel enum to logger.defines.hpp

LogTag struct used to convey both name and log level threshold as
one argument to the new logging macro. See logtag.hpp file, and
CV_LOG_WITH_TAG macro.

Global log level is now associated with a global log tag, when a
logging statement doesn't specify any log tag. See getLogLevel and
getGlobalLogTag functions.

A macro CV_LOGTAG_FALLBACK is allowed to be re-defined by other modules
or compilation units, internally, so that logging statements inside
that unit that specify NULL as tag will fall back to the re-defined tag.

Line-of-code information (file name, line number, function name),
together with tag name, are passed into the new log message sink.
See writeLogMessageEx function.

Fixed old incorrect CV_LOG_VERBOSE usage in ocl4dnn_conv_spatial.cpp.

* Implemented tag-based log filtering

Added LogTagManager. This is an initial version, using standard C++
approach as much as possible, to allow easier code review. Will
optimize later.

A workaround for all static dynamic initialization issues is
implemented. Refer to code comments.

* Added LogTagConfigParser.

Note: new code does not fully handle old log config parsing behavior.

* Fix log tag config vs registering ordering issue.

* Started testing LogTagConfigParser, incomplete.

The intention of this commit is to illustrate the capabilities of
the current design of LogTagConfigParser.

The test contained in this commit is not complete. Also, design changes
may require throwing away this commit and rewriting test code from
scratch.

Does not test whitespace segmentation (multiple tags on the config);
will do in next commit.

* Added CV_LOGTAG_EXPAND_NAME macro

This macro allows to be re-defined locally in other compilation units
to apply a prefix to whatever argument is passed as the "tag" argument
into CV_LOG_WITH_TAG. The default definition in logger.hpp does not
modify the argument. It is recommended to include the address-of
operator (ampersand) when re-defined locally.

* Added a few tests for LogTagManager, some fail.

See test_logtagmanager.cpp
Failed tests are: non-global ("something"), setting level by name-part
(first part or any part) has no effect at all.

* LogTagManagerTests substring non-confusion tests

* Fix major bugs in LogTagManager

The code change is intended to approximate the spec documented in
https://gist.github.com/kinchungwong/ec25bc1eba99142e0be4509b0f67d0c6

Refer to test suite in test_logtagmanager.cpp

Filter test result in "opencv_test_core" ...
with gtest_filter "LogTagManager*"

To see the test code that finds the bugs, refer to original commits
(before rebase; might be gone)

.. f3451208 (2019-03-03T19:45:17Z)
.... LogTagManagerTests substring non-confusion tests

.. 1b848f5f (2019-03-03T01:55:18Z)
.... Added a few tests for LogTagManager, some fail.

* Added LogTagManagerNamePartNonConfusionTest.

See test_logtagmanager.cpp in modules/core/test.

* Added LogTagAuto for auto registration in ctor

* Rewritten LogTagManager to resolve issues.

* Resolves code review issues around 2019-04-10

LogTagConfigParser::parseLogLevel - as part of resolving code review
issues, this function is rewritten to simplify control flow and to
improve conformance with legacy usage (for string values "OFF",
"DISABLED", and "WARNINGS").
2019-04-22 00:01:10 +03:00
Alexander Alekhin f439fc4306 Merge pull request #14373 from alalek:oss_fuzz_14185_14321 2019-04-20 20:53:07 +00:00
Alexander Alekhin 25247b9f6e imgcodecs(tiff): update tile size checks
oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14185
oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14321
2019-04-20 20:13:47 +00:00
Alexander Alekhin c024edb9a8 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-04-19 15:43:58 +03:00
Ruslan Garnov 1f517b8a02 Merge pull request #13943 from rgarnov:export_headers_for_backend_development
G-API external backend development (#13943)

* Moved HostCtor and ConstVal from gapi_priv.hpp to objref.hpp

* Added gmodel_priv.hpp, added export of symbols from gmodel.hpp

* Added export of binInArg and bindOutArg

* Renamed gapi_priv.*pp -> gorigin.*pp

* Added a fixme on collecting exports inside one class
2019-04-17 21:54:47 +03:00
Alexander Alekhin 7ad5d21900 Merge pull request #14339 from alalek:cmake_fix_std_cxx11 2019-04-16 13:10:24 +00:00
Alexander Alekhin a56c12278e cmake: fix C++11 flags (ENABLE_CXX11 is not required) 2019-04-15 20:00:55 +03:00
Alexander Alekhin 4635356435 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-04-13 20:00:54 +00:00
Alexander Alekhin d68e722b71 Merge pull request #11748 from paroj:cap_except 2019-04-12 11:36:17 +00:00
Maksim Shabunin 5cb0eded64 Merge pull request #14278 from mshabunin:fix-osx-camera-auth-rt
* AVFoundation: Use runtime check for camera authorization
2019-04-11 19:16:50 +03:00
Pavel Rojtberg 15bb0b86ce VideoCapture: add exception error mode similar to fstream + test 2019-04-10 13:41:57 +02:00
Alexander Alekhin 64168fc20a '-dev' version 2019-04-08 14:34:32 +03:00
Alexander Alekhin 072b524e02 Merge tag '4.1.0' 2019-04-08 08:10:29 +00:00
Alexander Alekhin 371bba8f54 release: OpenCV 4.1.0
OpenCV 4.1.0
2019-04-07 17:09:10 +00:00
Alexander Alekhin 2eaf35eb63 Merge tag '4.1.0-openvino' 2019-04-07 17:07:27 +00:00
Alexander Alekhin 0b9d53829f Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-04-07 12:35:15 +00:00
Alexander Alekhin c9fc27b337 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-04-05 19:08:23 +00:00
Maksim Shabunin aa1359dc19 Merge pull request #14267 from mshabunin:fix-osx-camera-auth
* Added authorization request to AVFoundation camera backend (OSX 10.14+)
2019-04-05 21:58:01 +03:00
Dmitry Kurtaev 4c2100e02c Merge pull request #14266 from dkurt:fix_qrcode_decode_java
* Fix decode and detectAndDecode Java wrappers for QRCodeDetector

* revert changes in objdetect

* java: fix wrapping of std::string type
2019-04-05 17:15:51 +03:00
Alexander Alekhin 473941c341 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-04-04 18:09:24 +00:00
Alexander Alekhin 4001346a30 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-04-03 19:33:52 +00:00
Alexander Alekhin ee7255aac4 Merge pull request #14144 from alalek:issue_14143 2019-04-03 14:35:54 +00:00
Alexander Alekhin 5dc606097c Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-04-02 20:54:41 +00:00
Alexander Alekhin 14843679af Merge pull request #14217 from alalek:fix_world_gapi_tests 2019-04-02 16:27:12 +00:00
Alexander Alekhin 785a540ebd Merge pull request #14175 from paroj:copyto 2019-04-02 16:18:00 +00:00
Alexander Alekhin d2854448c2 Merge pull request #14203 from alalek:fix_ossfuzz_13292 2019-04-02 15:15:13 +00:00
Alexander Alekhin cd6d8048bb gapi: fix tests build 2019-04-02 13:46:25 +03:00
Alexander Alekhin 3d7a3a51a7 cmake: don't add tests dirs as include directories
- use relative paths for includes
- fix PCH generation with GCC (dummy file has been used)
2019-04-02 13:46:25 +03:00
Alexander Alekhin b4e2c99346 Merge pull request #14201 from alalek:fix_ossfuzz_13295 2019-04-01 18:47:00 +00:00
Alexander Alekhin 33dde339fe Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-04-01 18:11:55 +03:00
Alexander Alekhin 066c074b66 Merge pull request #14206 from alalek:issue_14205 2019-03-31 20:58:17 +00:00
Alexander Alekhin 142a524d2f cmake: fix CUDA world build 2019-03-31 19:56:30 +00:00
Alexander Alekhin 7142f46d1c Merge pull request #14202 from alalek:fix_ossfuzz_13285 2019-03-31 14:39:20 +00:00
Alexander Alekhin f2803aba07 imgcodecs(sunras): avoid undefined shift
oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13292
2019-03-31 12:14:42 +00:00
Alexander Alekhin 45428b897f imgcodecs(tiff): avoid leak of helper struct on malformed inputs
oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13285
2019-03-31 11:50:33 +00:00
Alexander Alekhin 50a6f9d251 imgcodecs(bmp): limit size of processed images
2Gb+ images can't be handled properly by current implementation

ozz-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13295
2019-03-31 10:48:07 +00:00
Alexander Alekhin 360758e8ae Merge pull request #14193 from alalek:fix_ossfuzz_13317 2019-03-30 20:26:15 +00:00
Alexander Alekhin 8afb2f0cb7 3rdparty(zlib): prevent uninitialized use of state->check
ozz-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13317
PR: https://github.com/opencv/opencv/pull/14193
zlib upstream bug: madler/zlib#245
Ported fix: https://chromium.googlesource.com/chromium/src/+/ee376c65abdd5afe787bfb63af9f2e82fdc35c2e
2019-03-30 18:46:10 +00:00
Alexander Alekhin 7442100caa Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-03-29 19:29:36 +00:00
Maksim Shabunin 52cd1dacbf Merge pull request #14156 from mshabunin:videowriter-bad-test
* videoio: added bad parameters handling to VideoWriter

* AVFoundation/Writer: support UTF-8, check input parameters
2019-03-29 17:52:22 +03:00
Pavel Rojtberg 62775660d1 core: python - test cv::copyTo with pre-allocated dst 2019-03-29 13:56:26 +01:00
Alexander Alekhin f75152a597 gapi: fix build with Intel Compiler 2019 2019-03-28 19:24:43 +00:00
Alexander Alekhin b761ec0132 Merge pull request #14177 from alalek:fix_14173 2019-03-28 14:57:07 +00:00
Alexander Alekhin c7c987843c cmake: emit error if CUDA is enabled without opencv_contrib 2019-03-28 16:51:11 +03:00
Alexander Alekhin 73191ad3ec Merge pull request #14172 from smirnov-alexey:gapi_fix_nv12_valgrind 2019-03-28 13:45:45 +00:00
smirnov-alexey 769d2f4c44 Fix valgrind issue in NV12 test 2019-03-28 12:59:51 +03:00
Alexander Alekhin 90df5e00b4 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-03-26 18:56:54 +00:00
Alexander Alekhin 8c25a8eb7b Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-03-22 19:31:31 +03:00
Alexander Alekhin f147ba16e2 Merge pull request #14124 from alalek:fix_python_samples 2019-03-22 15:10:46 +00:00
Alexander Alekhin c43371f190 Merge pull request #14101 from alalek:core_fix_constexpt_fallback 2019-03-22 10:34:19 +00:00
Alexander Alekhin fbed33cc1f samples: fix python samples compatibility with demo.py 2019-03-21 19:42:34 +00:00
Alexander Alekhin a509ec0d91 Merge pull request #14112 from alalek:android_pack_default_api21 2019-03-21 13:23:11 +00:00
Alexander Alekhin 40da61a314 Merge pull request #14096 from oseiskar:fix-android-sample-menus 2019-03-20 21:58:49 +00:00
Alexander Alekhin f473b61585 android: build package with API 21
enables Video I/O backend via Media NDK
2019-03-20 19:21:43 +03:00
Alexander Alekhin 6501cb93a4 Merge pull request #14104 from alalek:android_build_sdk_reduce_mem_usage 2019-03-20 15:35:05 +00:00
Giles Payne 0d1a0b126b Merge pull request #14005 from komakai:android-video-cap
* Add Android Media NDK video i/o file capture back-end

* Fix failing test

* Improve error handling/prevent resource leaks

* Add license text

* Modify default for WITH_ANDROID_MEDIANDK option

* Fix spelling of deleter_AMediaExtractor
2019-03-19 21:28:45 +03:00
Alexander Alekhin 9a202c1522 Merge pull request #14090 from andrey-golubev:gapi_unused_node_fluid_fix 2019-03-19 15:15:53 +00:00
Alexander Alekhin e8a0bc5794 android: reduce memory consumption by gradle builds 2019-03-19 16:50:08 +03:00
Alexander Alekhin e783e6677e Merge pull request #14091 from alalek:core_cache_dir_version_update 2019-03-19 10:33:36 +00:00
Alexander Alekhin 8518d078d7 core: fix fallback CV_CONSTEXPR definition
keep it empty to avoid failures of these declarations:
static CV_CONSTEXPR const int var = ...;
2019-03-19 13:02:22 +03:00
Otto Seiskari 3a1ccd5f43 Remove fullscreen android:theme where it hides the menu
Many of the Android samples rely on an options menu to work properly
but, at least on newer devices, the menu is permanently hidden by the
Android theme "Theme.NoTitleBar.Fullscreen", which means that most
of the examples were dysfunctional.
2019-03-18 21:23:47 +02:00
Alexander Alekhin 6e90b85cae core: cache dir version update 2019-03-18 19:17:54 +03:00
Andrey Golubev dd2823aaec [G-API] Allow unused nodes in Fluid backend
Allow nodes produced after some operation to be
"unused": not being an output and not being used
as inputs to other operations

Add fluid test to cover this case
2019-03-18 18:20:11 +03:00
Maksim Shabunin 00171ca935 Patched libpng to address CVE-2019-7317 2019-03-18 12:24:18 +03:00
Alexander Alekhin 9c748beef5 OpenCV version '-openvino' 2019-03-18 08:07:09 +03:00
Alexander Alekhin 26087e28ad Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-03-15 22:42:57 +00:00
Alexander Alekhin 17ad33c919 Merge pull request #14051 from LaurentBerger:i14047 2019-03-14 13:27:44 +00:00
Alexander Alekhin 1ed47900d8 Merge pull request #14048 from alalek:issue_13522 2019-03-14 13:26:34 +00:00
LaurentBerger d338644159 Issue 14047 2019-03-13 22:28:02 +01:00
Alexander Alekhin bd1fd59fc1 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-03-13 19:13:13 +00:00
Alexander Alekhin 1fa3d21f6a android: don't install java/build.gradle 2019-03-13 18:52:15 +00:00
Alexander Alekhin 3f42122387 Merge pull request #14043 from alalek:revert_13843 2019-03-13 16:02:42 +00:00
Alexander Alekhin f73b4f4a26 imgproc: revert #13843
This reverts commit 00e8c7810f
2019-03-13 15:07:37 +03:00
Alexander Alekhin a534af68b8 Merge pull request #14037 from alalek:update_version_4.1.0-pre 2019-03-12 12:42:32 +00:00
Alexander Alekhin 6e2ede8c56 pre: OpenCV 4.1.0 (version++) 2019-03-12 13:01:44 +03:00
Alexander Alekhin 8c0b0714e7 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-03-11 19:20:22 +00:00
Giles Payne 55f02d8c66 Merge pull request #14011 from komakai:debug-build
* Add Android SDK debug build flag

* Change LOG_TAG define for consistency with other modules
2019-03-11 17:16:42 +03:00
Alexander Alekhin 49093d6d38 Merge pull request #13847 from ghellwig:jpeg2000-compression-flag 2019-03-11 10:03:18 +00:00
Gregor Mittag d71977b4dd Add JPEG2000 compression flag. 2019-03-10 07:59:09 +01:00
Alexander Alekhin a1ef612662 Merge pull request #14000 from nglee:dev_FixCuda101BuildIssueMaster 2019-03-07 20:19:50 +00:00
Alexander Alekhin 4f9a99141e Merge pull request #13937 from smirnov-alexey:gapi_change_standalone_cmake 2019-03-07 14:38:14 +00:00
Namgoo Lee 713d91b04e CUDA 10.1 Build Issue Fix on Master Branch 2019-03-07 23:13:03 +09:00
Alexander Alekhin 332c37f332 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-03-06 11:43:16 +03:00
Alexander Alekhin b46fa2e556 Merge pull request #13970 from alalek:videoio_plugins_update 2019-03-05 11:48:39 +00:00
Alexander Alekhin 25a9a32f8e videoio: plugins, add strict checks 2019-03-05 13:22:52 +03:00
Alexander Alekhin 11fd9e5fdc videoio: revert registry chages, update cap.cpp 2019-03-04 21:37:20 +00:00
Alexander Alekhin 403f11fdbf videoio: update plugin API 2019-03-04 21:36:22 +00:00
Alexander Alekhin b4cba524d3 videoio: move backend.cpp -> backend_plugin.cpp 2019-03-04 20:06:19 +00:00
Alexander Alekhin 746cd1e1e6 Merge pull request #13949 from alalek:videoio_plugins_target 2019-03-04 19:25:11 +00:00
x3lif 19cf511895 Merge pull request #13910 from x3lif:Issue_13908
* Fix Issue 13908

Allocate the matrix _Jo only when the solver needs it (ie when solver.state == CvLevMarq::CALC_J)

* Fix calib3D unit test

Fix _Jo allocation when stddev is not empty

* Removing trailing whitespaces

* scope _dp* variables

* fix whitespaces
2019-03-04 19:34:10 +03:00
smirnov-alexey 6b31f58092 Modifies standalone G-API cmake for testing it properly 2019-03-04 15:33:15 +03:00
Giles Payne 7444f0c651 Merge pull request #13939 from komakai:android-build-improvements
* Android build improvements
* look for NDK in "ndk-bundle" directory under the SDK directory if location not specified
* look for cmake and ninja in "cmake" directory under the SDK directory if not found in the path
* disable use of ccache if not found in the path

* Redo build tool existence checks
2019-03-04 15:19:29 +03:00
Alexander Alekhin dd37c10d4a Merge pull request #13922 from smirnov-alexey:gapi_fix_nv12_asserts 2019-03-04 11:36:53 +00:00
Alexander Alekhin dd262b7087 Merge pull request #13960 from nglee:dev_FixWindowsBuildIssue 2019-03-04 11:18:20 +00:00
Namgoo Lee 65e76adeda Windows Build Issue Fix 2019-03-04 09:52:50 +09:00
JoeHowse c0d41f05d6 Merge pull request #13947 from JoeHowse:4.0.1-patches
* core, stitching: revise syntax to support Visual C++ 2013

* stitching: revise syntax again to support Visual C++ 2013 and other compilers

* stitching: minor update to clarify changes
2019-03-02 19:00:32 +03:00
Alexander Alekhin 9a6f2630b2 cmake: +opencv_videoio_plugins virtual target
- support comma-separated list in VIDEOIO_PLUGIN_LIST
- opencv tests/samples depend on plugins virtual target
2019-03-02 09:19:08 +00:00
smirnov-alexey 939ea4ba30 Remove incorrect asserts in NV12 to RGB/BGR kernels 2019-03-01 13:31:16 +03:00
Alexander Alekhin c3cf35ab63 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-02-26 17:34:42 +03:00
Alexander Alekhin 4188e8aaf9 Merge pull request #13677 from mshabunin:video_plugins 2019-02-26 11:36:25 +00:00
Maksim Shabunin 9702987209 Framework for dynamic videoio backends, FFmpeg and GStreamer plugins 2019-02-26 13:50:30 +03:00
Alexander Alekhin 8bde6aea4b Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-02-19 19:49:13 +00:00
Alexander Alekhin f1d9666a20 Merge pull request #13858 from rgarnov:fluid_nv12_support 2019-02-19 19:26:10 +00:00
Ruslan Garnov c0076b58cd Added NV12 support to fluid backend 2019-02-19 18:18:23 +03:00
Pierre Chatelier 00e8c7810f LineIterator witout a Mat (#13843)
* LineIterator witout a Mat

cv::LineIterator can be used without being attached to any cv::Mat, it only needs the size and type of data. An alternative constructor has been defined for that.
In that case, a LineIterator can no more be dereferenced with the * operator, but pos() still returns valid pixel positions.
It can be useful when LineIterator is just used to compute positions of pixels on a line, without requiring to build a Mat just for that.
Use case : with a dataset that would represent a huge image, pixel positions can be pre-computed before querying the dataset API.

* Update imgproc.hpp

removed trailing spaces

* Update drawing.cpp

fixed warning
2019-02-19 13:44:41 +03:00
Ruslan Garnov 322115bfcf Removed unused functions from View::Priv 2019-02-18 19:26:54 +03:00
Alexander Alekhin a6160b6994 Merge pull request #13777 from smirnov-alexey:gapi_update_tutorial 2019-02-18 14:00:31 +00:00
Alexander Alekhin abfcb60118 Merge pull request #13838 from smirnov-alexey:gapi_add_nv12_to_rgb 2019-02-15 13:55:48 +00:00
smirnov-alexey 406392e13d Introduces yuv420p(nv12) to rgb and bgr color conversion 2019-02-15 14:25:57 +03:00
smirnov-alexey 7b7d21ebef Updates gapi tutorial using normalize kernel
Changes doc, images and sample code itself
2019-02-15 14:13:42 +03:00
Alexander Alekhin 54a1bbe1c4 Merge pull request #13812 from smirnov-alexey:gapi_fix_sobelxy_valgrind 2019-02-12 18:15:14 +00:00
smirnov-alexey caf438c63b Fixes an issue with valgrind and sobelxy 2019-02-12 18:36:06 +03:00
Alexander Alekhin dfef04b325 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-02-12 17:54:40 +03:00
Alexander Alekhin f8ac46ba07 Merge pull request #13786 from ka7:spelling 2019-02-11 12:38:49 +00:00
klemens 997b7b18af spelling fixes 2019-02-09 22:29:54 +01:00
Alexander Alekhin f414c16c13 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-02-08 17:18:56 +00:00
Alexander Alekhin c6f39870ff Merge pull request #13776 from alalek:fix_13741 2019-02-08 15:30:36 +00:00
Alexey Smirnov b1cc114b7b Merge pull request #13723 from smirnov-alexey:gapi_add_sobelxy
* Add Sobel kernel which returns both dx and dy

* Splice dx and dy and extend add_border function

Also change some tests parameters

* Add borderValue parameter in test

* Introduces fluid kernel for sobelxy

Adds tests (basic and performance) on new backend

* Introduces BufHelper struct for some arithmetic
2019-02-08 16:59:56 +03:00
Alexey Smirnov 766fd20faa Merge pull request #13745 from smirnov-alexey:gapi_add_gout_overloading
* Add GOut overloading for tuple of parameter pack

* Move getGOut_impl into namespace and add const to input references
2019-02-08 13:16:50 +03:00
Alexey Smirnov 315e7fbbee Merge pull request #13721 from smirnov-alexey:gapi_add_normalize
GAPI: Add normalize kernel in G-API (#13721)

* Add normalize kernel in G-API

In addition add several tests on new kernel

* Fix indentations and normalize test structure

* Move normalize kernel from imgproc to core

Set default parameter ddepth to -1

* Fix alignment
2019-02-07 16:05:39 +03:00
Alexander Alekhin fcec053d59 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-02-05 19:12:41 +03:00
Alexander Alekhin d073215f10 Merge pull request #13705 from mshabunin:clang-warnings 2019-02-01 16:11:00 +00:00
Alexander Alekhin 665408e57f Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-02-01 13:17:32 +03:00
Maksim Shabunin ea3dc78986 Fixed warnings produced by clang-9.0.0 2019-01-30 14:05:32 +03:00
Alexey Smirnov a65ccc0603 Merge pull request #13678 from smirnov-alexey:gapi_fix_descrof_overloading
* Return vector of MetaArg instead of MatDesc and fix test with ADL check

* Fix construction of vector

* Change names and tests according to review
Also add GAPI_EXPORTS prefix for two ostream operators
2019-01-28 16:26:32 +03:00
Alexander Alekhin e2dbf054ac Merge pull request #13686 from mshabunin:fix-avfoundation 2019-01-25 14:06:24 +00:00
ExpandingDev 62f3c9bfa9 Merge pull request #13675 from ExpandingDev:patch-1
* Add note about building for pkg-config

* minor fixes
2019-01-25 16:36:28 +03:00
Alexander Alekhin 287ee9d0ea Merge pull request #13687 from rgarnov:gapi_fix_fluid_heterogeneity 2019-01-24 16:22:12 +00:00
Ruslan Garnov 3c6d5aba22 Fixed fluid heterogeneity support 2019-01-24 17:45:26 +03:00
Maksim Shabunin eeb6f7726e AVFoundation on Mac: fixed frame count and unsupported format handling 2019-01-24 16:12:38 +03:00
Alexander Alekhin 631b246881 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-01-22 18:00:34 +00:00
Alexander Alekhin e1c8256602 Merge pull request #13666 from savuor:yuv_wide_port 2019-01-22 15:31:28 +00:00
Alexey Smirnov 5728679fd5 Merge pull request #13664 from smirnov-alexey:gapi_add_descrof_overloading
* Add version of descr_of function taking vector of Mat

* Overload descr_of function for cv::Mat

* Add template function instead of copypasting and change tests a little
2019-01-22 13:14:33 +03:00
Rostislav Vasilikhin a6af9c75e9 a*b+c -> fma 2019-01-21 18:57:08 +03:00
Rostislav Vasilikhin 6de86e325f fixed (un)signed packing s16 -> u8 2019-01-21 18:01:44 +03:00
Rostislav Vasilikhin 48e471fdd4 YUV vectorizations ported to master from 3.4 2019-01-21 15:35:34 +03:00
Alexander Alekhin e5917a8fa5 Merge pull request #13580 from LaurentBerger:PythonStitch2 2019-01-19 13:44:30 +00:00
LaurentBerger 49a43dfc8f Check syntax of stitchnig detailed 2019-01-18 19:31:05 +01:00
Alexander Alekhin 40959fcc61 Merge pull request #13637 from berak:fix_openvx 2019-01-18 14:56:31 +00:00
Andrey Golubev 55770c9853 Merge pull request #13640 from andrey-golubev:gapi_gcallpriv_doc
* GAPI: document GCall's recursive behavior

* Move documentation outside the class
2019-01-17 20:59:47 +03:00
Alexander Alekhin 2ea4626911 Merge pull request #13639 from andrey-golubev:gapi_fix_gcall_misuse 2019-01-16 17:49:06 +00:00
Andrey Golubev c8a89134a7 GAPI: fix GCall misuse in unrollExpr 2019-01-16 18:15:44 +03:00
berak 53c2ebf7f6 fix openvx wrappers 2019-01-16 12:10:22 +01:00
Alexander Alekhin 7e2ebecd52 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-01-10 12:29:41 +03:00
Quentin Chateau 581d0ef8a9 Merge pull request #13584 from qchateau:improve_stitching_detailed
Improve stitching detailed (#13584)

* Added block size getter/setters

* Added a bunch of new features to the stitching_detailed sample

* Do not required XFEATURES2D for default use

* Add support for akaze features in stitching_detailed

* Improved sample logs
2019-01-09 17:01:07 +03:00
Alexander Alekhin a9c1af39d6 Merge pull request #13571 from paroj:jsaruco 2019-01-09 13:59:49 +00:00
Alexander Alekhin 5f419c014f Merge pull request #13583 from qchateau:fix_13582 2019-01-09 13:38:57 +00:00
Quentin Chateau ed7607935e Do not compute gains when no images overlap 2019-01-05 16:39:09 +01:00
Alexander Alekhin 78da679472 Merge pull request #13555 from qchateau:nr_blocks_gain_filtering_iterations 2019-01-04 12:12:35 +00:00
Pavel Rojtberg 2f89158339 js: allow building with basic aruco functionality 2019-01-03 19:04:00 +01:00
Pavel Rojtberg 27d15894d8 js: allow building without dnn 2019-01-03 18:50:36 +01:00
Alexander Alekhin 79e13be04c Merge pull request #13566 from qchateau:fix_13563 2019-01-03 12:15:54 +00:00
Quentin Chateau c72a855214 Fixed uninitialized value and naming 2019-01-02 22:06:29 +01:00
Alexander Alekhin fd08d0d80d copyright: 2019 2019-01-02 01:20:38 +00:00
Quentin Chateau d93ec07dd8 Setter/getter for number of gain filtering iterations 2018-12-31 18:52:47 +01:00
Quentin Chateau 6b96512d46 Merge pull request #13532 from Tytan:channel_exp_comp
Channels exposure compensators (#13532)

* feed compatible with single channel images

* Simplified BlockGainCompensator::apply

* ChannelsCompensator

* BlocksChannelsCompensator

* Make source level compatibility detector happy
2018-12-28 13:53:46 +03:00
Alexander Alekhin a9cf01113a Merge pull request #13534 from mshabunin:fix-external-ffmpeg 2018-12-28 10:51:12 +00:00
Alexander Alekhin 85ade61ef7 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-12-27 18:15:50 +03:00
WuZhiwen 3d44e9ad92 Merge pull request #13520 from wzw-intel:hang
* dnn/Vulkan: fix GPU hang for heavy convolution tasks

Intel i915 driver will declare GPU hang if the compute shader
takes too long to complete. See
https://bugs.freedesktop.org/show_bug.cgi?id=108947 for details.

The idea in this commit is to divide heavy task into several light
ones and run compute shader multiple times to make each run take
short time enough.

TODO: Add more efficient compute shader

Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>

* dnn/Vulkan: add a more efficient conv shader
2018-12-27 15:06:44 +03:00
Maksim Shabunin a8fb72a807 Fixed standalone FFmpeg search with pkg-config 2018-12-27 14:40:44 +03:00
Maksim Shabunin 73959fed45 Merge pull request #13422 from mshabunin:split-videoio-cmake
* Split videoio dependencies search into pieces, removed obsolete backends
2018-12-26 15:50:20 +03:00
Alexander Alekhin e267342108 Merge pull request #13504 from Tytan:stitcher_result_mask 2018-12-26 10:27:38 +00:00
Quentin Chateau 757411bffc Merge pull request #13503 from Tytan:gain_comp_multi_feed
Stitching: multi-feed on gain and block compensator (#13503)

* multi-feed on gain and block compensator

* ABI compatibility
2018-12-26 10:24:38 +03:00
Alexander Alekhin 6142b21dd5 Merge pull request #13518 from wzw-intel:test_vulkan 2018-12-24 16:49:45 +00:00
Alexander Alekhin b363489702 Merge pull request #13517 from wzw-intel:check_vulkan 2018-12-24 16:48:13 +00:00
Wu Zhiwen dae03273cd dnn: fixup missing vkcom/vulkan combination of backend/target in dnn test 2018-12-24 11:00:45 +08:00
Wu Zhiwen be6a837e15 dnn: add Vulkan device check for BackendRegistry 2018-12-24 10:41:58 +08:00
Alexander Alekhin e1f5b886fb Merge tag '4.0.1'
OpenCV 4.0.1
2018-12-22 07:05:31 +00:00
Alexander Alekhin c9ad5779f2 release: OpenCV 4.0.1 (version++) 2018-12-22 07:03:30 +00:00
Alexander Alekhin 26c5b0c71f Merge tag '4.0.1-openvino'
OpenCV 4.0.1 for Intel(R) OpenVINO(TM) toolkit
2018-12-22 07:01:13 +00:00
Alexander Alekhin 1dee705074 Merge branch '3.4' into merge-3.4 2018-12-22 05:40:15 +00:00
Quentin Chateau f9c951440d stitcher result mask getter 2018-12-21 23:21:22 +01:00
Alexander Alekhin 578ea4bae9 Merge pull request #13386 from alalek:android_gradle 2018-12-21 13:56:03 +00:00
Dmitry Kurtaev 6bcf0b5519 Merge pull request #13482 from dkurt:fix_python_bindings_without_stitching
* Fix python bindings without stitching module

* stitching: move stitching specific code into modules/stitching/misc
2018-12-19 23:37:55 +03:00
Alexander Alekhin e82d03ef61 Merge pull request #13480 from dbudniko:dbudniko/gapi_ocl_backend_internal_umat_size_fix 2018-12-19 15:50:32 +00:00
Dmitry Budnikov eedd7bfd50 fix size 2018-12-19 17:45:00 +03:00
Alexander Alekhin cbf80117af eliminate build warnings 2018-12-19 15:42:38 +03:00
Alexander Alekhin 2b35c1708b android: gradle-based package and samples
- drop hello-android sample
2018-12-19 14:59:48 +03:00
Alexander Alekhin e093a19c70 Merge pull request #13471 from dkurt:fix_enum_struct_java 2018-12-19 11:53:41 +00:00
Dmitry Kurtaev 6fbcb283b9 Try to fix "enum struct" wrapping for Java 2018-12-19 13:16:43 +03:00
Alexander Alekhin 7fb70e1701 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-12-18 19:07:43 +00:00
LaurentBerger 2fb409b286 Merge pull request #13267 from LaurentBerger:StitchPython
* Python wrapper for detail

* hide pyrotationwrapper

* copy code in pyopencv_rotationwarper.hpp

* move ImageFeatures MatchInfo and CameraParams in core/misc/

* add python test for detail

* move test_detail in test_stitching

* rename
2018-12-18 21:49:16 +03:00
Alexander Alekhin d5f430cc11 android: gradle wrapper
https://github.com/gradle/gradle/tree/v4.6.0

License: Apache 2.0
2018-12-18 15:45:45 +03:00
Quentin Chateau fd27d5ea00 Merge pull request #13449 from Tytan:stitching-warp-interpolation
Stitching: added functions to set warp interpolation mode (#13449)

* Added functions to set warp interpolation mode

* Use InterpolationFlags enum

* Improved getter/setter naming
2018-12-18 14:43:05 +03:00
Rostislav Vasilikhin 493611ace5 Merge pull request #13440 from savuor:rgb_wide
* conversions of color_rgb.cpp vectorized

* CL impl: coeffs updated

* unused constants removed

* CUDA color coeffs updated
2018-12-17 17:22:38 +03:00
Alexander Alekhin e058febaad Merge pull request #13441 from paroj:capimg 2018-12-14 15:41:40 +00:00
Pavel Rojtberg d7f60f69f1 videoio: fix CAP_IMAGES
broken in 11eafca3e2
2018-12-14 15:32:33 +01:00
Alexander Alekhin 4b33910449 Merge pull request #13428 from rgarnov:gapi_add_kernels_pass_stage 2018-12-14 12:30:36 +00:00
Alexander Alekhin 0c16d8f6c3 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-12-13 15:12:26 +03:00
Ruslan Garnov 5340073770 Removed UNUSED macro 2018-12-13 14:39:33 +03:00
Alexander Alekhin 384ac63490 Merge pull request #13425 from alalek:issue_13277 2018-12-12 16:21:46 +00:00
Ruslan Garnov d38676085a Added "kernels" pass stage to compiler, removed unused opaque from cv::gimpl::Op 2018-12-12 17:22:52 +03:00
Alexander Alekhin d8583b2c7a dnn: fix vulkan backend builds with Clang 2018-12-12 15:25:39 +03:00
Alexander Alekhin 82227b5ace Merge pull request #13419 from seanm:SemiWarnings 2018-12-12 11:07:00 +00:00
Alexander Alekhin c8f934b5b1 Merge pull request #13415 from alalek:issue_13406
* python: add checks for drawKeypoints() symbol

* python: more hacks in hdr_parser.py
2018-12-12 13:26:31 +03:00
Sean McBride a4111fab39 Fixed -Wextra-semi warnings in public headers 2018-12-11 14:45:27 -05:00
Alexander Alekhin 54de51ef3c Merge pull request #13416 from alalek:avoid_cv2_in_docs 2018-12-11 17:47:41 +03:00
Alexander Alekhin 0915df5b18 python: don't use 'cv2.' in documentation 2018-12-11 16:05:12 +03:00
Maksim Shabunin 81e7c7d8c8 OpenVINO version bump 2018-12-10 14:44:53 +03:00
Alexander Alekhin ea64e860de Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-12-09 13:21:58 +00:00
Rijubrata Bhaumik e70786e05e Merge pull request #13300 from riju:photoModule
* Enable Javascript bindings for photo module.

1. Enable the build flag in build_js.py.
2. Append js into WRAP list of photo’s CMakefiles.txt
3. Add photo module's API into JS API whitelist (embindgen.py)

Exposing the HDR imaging part of photo module.

[TODO]
Add tests
Fix opencv/doc/js_tutorials/

* [WIP] TODO: Add tests

* Remove TonemapDurand: algorithm patented in US, so moved to opencv_contrib

* Fix ningxin's comment: expose the base class.

* Add some more simple binding tests.

Also expose process function
2018-12-09 15:08:59 +03:00
Alexander Alekhin cab15f6c5e Merge pull request #13377 from dkurt:hotfix_dnn_ie_master 2018-12-06 15:11:09 +00:00
Alexander Alekhin e82e672a93 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-12-06 07:06:58 +00:00
Dmitry Kurtaev 93971a53d9 Exclude Input layer from list of outputs for IE networks 2018-12-06 09:12:05 +03:00
Tsukasa Sugiura 09b3dcb6db Merge pull request #13341 from UnaNancyOwen:fix_librealsense
* videoio(librealsense): fix pipeline start with config

fix to apply pipeline settings by passing config to start.

* videoio(librealsense): add support get props

add support get some props.
2018-12-05 20:12:25 +03:00
okriof ef42baf9f0 Merge pull request #13361 from okriof:brisk_getset
* Get/Set functions for BRISK parameters, issue #11527.

Allows setting threshold and octaves parameters after creating a brisk object. These parameters do not affect the initial pattern initialization and can be changed later without re-initialization.

* Fix doc parameter name.

* Brisk get/set functions tests. Check for correct value and make tests independent of default parameter values.

* Add dummy implementations for BRISK get/set functions not to break API in case someone has overloaded the Feature2d::BRISK interface. This makes BRISK different from the other detectors/descriptors on the other hand, where get/set functions are pure virtual in the interface.
2018-12-05 18:44:23 +03:00
Alexander Alekhin e55ad25355 Merge pull request #13363 from kartikmohta:patch-1 2018-12-05 09:50:09 +00:00
Kartik Mohta 80a3d7bffa Fix comment marker in OpenCVDetectCudaArch.cu 2018-12-04 11:47:28 -08:00
Maksim Shabunin 6481397710 Merge pull request #13358 from terfendail:disflow_warn 2018-12-04 14:21:43 +00:00
Vitaly Tuzov 388ccda85d Fixed static analyzer warnings in DISOpticalFlow 2018-12-04 12:57:14 +03:00
Alexander Alekhin 2e0150e601 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-12-03 18:38:27 +03:00
Alexander Alekhin 2dc5e245d0 Merge pull request #13350 from alalek:fix_kw_gapi 2018-12-03 15:16:45 +00:00
Alexander Alekhin ea3a5950a3 Merge pull request #13346 from alalek:fix_kw_persistence 2018-12-03 15:16:31 +00:00
Alexander Alekhin 4e8311085f core(persistence): fix KW issues 2018-12-03 17:10:20 +03:00
Alexander Alekhin cf0be1a0af Merge pull request #13349 from mshabunin:fix-highgui-test 2018-12-03 13:06:09 +00:00
Alexander Alekhin c577c2cc6a gapi: eliminate KW issues 2018-12-03 15:20:47 +03:00
Maksim Shabunin 905d96dd4a Restored 500ms delay in highgui test 2018-12-03 14:34:29 +03:00
Alexander Alekhin 197285d12a Merge pull request #13331 from dbudniko:dbudniko/gapi_gpu_to_ocl_renaming_patch 2018-11-29 15:39:14 +00:00
Evgeny Latkin ab430b8c87 Merge pull request #13329 from elatkin:el/gapi_perf_medblur
GAPI (fluid): Median blur optimization (#13329)

* GAPI (fluid): Median blur optimization: reference 3x3

* GAPI (fluid): Median blur optimization: CPU dispatcher

* GAPI (fluid): Median blur optimization: manual CV_SIMD
2018-11-29 18:02:29 +03:00
Dmitry Budnikov d1029faa90 patch removes gpu mention from ocl backend 2018-11-29 17:05:41 +03:00
Dmitry Budnikov 6374b99a1a Merge pull request #13240 from dbudniko:dbudniko/gapi_gpu_to_ocl_renaming
G-API rename GPU backend to OCL backend (#13240)

* renaming draft

* inline namespace instead non-safe define

* more back compatibility

* Updates after review from Dmitry
2018-11-29 16:29:11 +03:00
Alexander Alekhin 4fb9bce79f Merge pull request #13264 from mshabunin:fix-windows 2018-11-28 20:00:04 +00:00
Alexander Alekhin 487f631243 Merge pull request #13320 from alalek:api_checks_4.0.0 2018-11-28 19:51:29 +00:00
Evgeny Latkin c928c21fe7 Merge pull request #13319 from elatkin:el/gapi_perf_erdilate_2
GAPI (fluid): Erode/Dilate optimization, part 2 (#13319)

* GAPI (fluid): Erode/Dilate optimization: hard-code 3x3 case

* GAPI (fluid): Erode/Dilate optimization: CPU dispatcher

* GAPI (fluid): Erode/Dilate optimization: speed-up 10-15x times with CV_SIMD

* GAPI (fluid): Erode/Dilate optimization: 20-30% speed-up
2018-11-28 19:50:39 +03:00
Alexander Alekhin 59fa477edb opencv4: fix abi-checker (to enable API/source checks only) 2018-11-28 18:42:19 +03:00
Evgeny Latkin 992d5b8bcd Merge pull request #13315 from elatkin:el/gapi_perf_erdilate
GAPI (fluid): Erode/Dilate optimization (#13315)

* GAPI (fluid): Erode/Dilate optimization: hard-code 3x3 case

* GAPI (fluid): Erode/Dilate optimization: CPU dispatcher

* GAPI (fluid): Erode/Dilate optimization: speed-up 10-15x times with CV_SIMD
2018-11-28 18:20:31 +03:00
Evgeny Latkin 6808d33b2f Merge pull request #13290 from elatkin:el/gapi_perf_filter2d
GAPI (fluid): Filter 2D optimization (#13290)

* GAPI (fluid): Filter 2D optimization: speedup 13x if float, 2x if integral

* GAPI (fluid): Filter 2D speedup 8x if output is short/ushort

* GAPI (fluid): Filter 2D speedup 7x if output is uchar

* GAPI (fluid): Filter 2D optimization: fixed compiler warnings

* GAPI (fluid): fix compiler warnings on Mac

* GAPI (fluid): fix compiler warnings on Mac

* GAPI (fluid): fix compiler errors on VS2015

* GAPI (fluid): fix compiler errors on VS2015

* GAPI (fluid): fix compiler errors on VS2015
2018-11-27 19:12:14 +03:00
Maksim Shabunin 966f27df34 Merge pull request #13293 from dkurt:dnn_add_extra_ie_net_method 2018-11-27 12:26:09 +00:00
Alexander Alekhin 21bb17e3ee Merge pull request #13292 from mshabunin:fix-filenode-compat 2018-11-27 10:56:23 +00:00
Dmitry Kurtaev 4ba4901ca9 Add serialize method for IE net wrapper 2018-11-27 12:02:00 +03:00
Maksim Shabunin 9de63c1edd Made FileNode::operator string inline 2018-11-27 11:47:23 +03:00
Dmitry Budnikov 51cc78b2a2 Merge pull request #13251 from dbudniko:dbudniko/gapi_more_fixes_for_tests
More fixes for G-API tests (#13251)

* scalar comparator and more fixes for tests

* add weighted aligned

* white space

* more white space

* Add weighted test accuracy check enabled
2018-11-26 17:44:46 +03:00
Alexander Alekhin 8f4e5c2fb8 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-11-26 15:37:45 +03:00
Maksim Shabunin db1c8b3f9e Restored function to rescale pixel values before imshow 2018-11-26 15:25:05 +03:00
Evgeny Latkin f07856eab9 Merge pull request #13221 from elatkin:el/gapi_perf_sepfilter
GAPI (fluid): optimization of Separable filter (#13221)

* GAPI (fluid): Separable filter: performance test

* GAPI (fluid): enable all performance tests

* GAPI: separable filters: alternative code for Sobel

* GAPI (fluid): hide unused old code for Sobel filter

* GAPI (fluid): especial code for Sobel if U8 into S16

* GAPI (fluid): back to old code for Sobel

* GAPI (fluid): run_sepfilter3x3_impl() with CPU dispatcher

* GAPI (fluid): run_sepfilter3x3_impl(): fix compiler warnings

* GAPI (fluid): new engine for separable filters (but Sobel)

* GAPI (fluid): new performance engine for Sobel

* GAPI (fluid): Sepfilters performance: fixed compilation error
2018-11-26 15:05:35 +03:00
Alexander Alekhin dd952f6d68 Merge pull request #13278 from mshabunin:fix-carotene-build 2018-11-26 09:29:48 +00:00
Alexander Alekhin e63efe2978 Merge pull request #13275 from wzw-intel:thread_safe 2018-11-26 09:15:09 +00:00
Maksim Shabunin fb6929ac3d Fixed NEON detection in Carotene build 2018-11-26 11:30:20 +03:00
Wu Zhiwen 4e65283081 dnn/Vulkan: make thread safe
Use a global dedicated mutex to make sure initialize once and
protect command buffer pool and queue.

Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
2018-11-26 14:08:37 +08:00
Alexander Alekhin c6daa4aa16 Merge pull request #13260 from alalek:cmake_ade_12856 2018-11-23 17:09:47 +00:00
Alexander Alekhin c0016d7fe9 Merge pull request #13253 from alalek:fix_13201
* cmake: install 'legacy/constants_c.h' files

* samples: add compatibility test code
2018-11-23 20:02:46 +03:00
Dmitry Budnikov a518e7063d Merge pull request #13120 from dbudniko:dbudniko/gapi_opencl_kernel_example
* custom OpenCL G-API kernel draft

* clean up and warnings fix

* more warnings

* white space

* new blank line at the EOF removed

* HAVE_OPENCL guard

* remove unnecessary ocl API call

* remove sum test workaround

* check if opencl activated

* fix std::str warning

* CPU fall back for symm7x7

* gpu test kernel draft

* adjust have opencl guard

* more guards

* one more attempt to adjust guards

* empty stub files and kernel source files creation in the test directory

* try to force auto generation

* one more attempt to force build

* remove symm7x7 custom from gapi module

* looks like that this version works properly on Win desktop

* clean up

* more clean up

* address some suggestions from Dmitry's review

* const kernel coefficients

* CV_Error in kernel + try to fix cpu fallback

* CV_Error_ instead CV_Error

* everything in one gapi_gpu_test.cpp

* fix warning

* remove kernel generation, add kernel string

* avoid generated code and ocl internal namespace

* fix misprint

* c_str
2018-11-23 17:51:15 +03:00
Alexander Alekhin de8696aa43 cmake: allow to disable ADE build too (BUILD_opencv_gapi=OFF is not enough)
CMake option: WITH_ADE=OFF
2018-11-23 12:52:41 +03:00
WuZhiwen 02cc1cd6e6 Merge pull request #13244 from wzw-intel:init_vulkan
* dnn/Vulkan: don't init Vulkan runtime if using other backend/target

Don't need to explictly call a init API but will automatically
init Vulkan environment the first time to use an VkCom object.

Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>

* dnn/Vulkan: depress compilier warning for "-Wsign-promo"

Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
2018-11-22 19:46:30 +03:00
Alexander Alekhin 0e6cf41923 Merge pull request #13241 from pasbi:master 2018-11-22 17:18:23 +03:00
pascal 7579cd8068 updated documentation for imread and imwrite (added pfm image format) 2018-11-21 17:59:37 +01:00
Alexander Alekhin b6a447798a Merge pull request #13235 from berak:highgui_window_w32 2018-11-21 15:54:42 +00:00
berak 9344d0d0e3 highgui: restore convertscale semantics in window_w32.cpp 2018-11-21 11:05:24 +01:00
Alexander Alekhin 7fa7fa0226 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-11-21 08:33:39 +00:00
Ruslan Garnov a3df05d93b Merge pull request #13215 from rgarnov:rg/overhead
* Added caching of agents execution sequence

* Merged linesRead() and nextWindow() methods on FluidAgent in one method

* Added caching of input lines for fluid::View

* Added caching of output lines for fluid::Buffer

* Fixed GAPI_Assert to work in standalone mode
2018-11-20 17:25:04 +03:00
Alexander Alekhin 798e2779f2 Merge pull request #13218 from dmatveev:fix_standalone 2018-11-20 13:25:13 +00:00
Dmitry Matveev 1b13df5368 G-API: Recent inclusion has broken STANDALONE build
This MR fixes this.
2018-11-20 14:00:08 +03:00
Evgeny Latkin 083332f85f Merge pull request #13206 from elatkin:el/gapi_perf_rgb2lab
GAPI (fluid): RGB to Lab optimization (#13206)

* GAPI (fluid): BGR2LUV, RGB2Lab: performance test

* GAPI (fluid): BGR2LUV, RGB2Lab: using cv::hal::cvtBGRtoLab

* GAPI (fluid): BGR2LUV, RGB2Lab: hide reference code with #ifdef
2018-11-19 18:52:48 +03:00
Evgeny Latkin 6757c2c5a6 Merge pull request #13174 from elatkin:el/gapi_perf_rgb2yuv
GAPI (fluid): RGB to YUV optimization (#13174)

* GAPI (fluid): RGB to YUV: activate performance tests

* GAPI (fluid): speedup 4-8x RGB-to-YUV, 2.5x YUV to RGB with int16 arithmetic

* GAPI (fluid): RGB <--> YUV: fixed compiler warning

* GAPI (fluid): RGB <--> YUV: additional speedup 2-3x times (10-15x over original) via manual CV_SIMD

* GAPI (fluid): RGB <--> YUV: dynamic CV_SIMD dispatching
2018-11-19 17:30:14 +03:00
Alexander Alekhin 59e2ca16d9 Merge tag '4.0.0'
OpenCV 4.0.0
2018-11-18 09:22:00 +00:00
Alexander Alekhin 75ed282b20 release: OpenCV 4.0.0 (version++) 2018-11-18 09:19:28 +00:00
Alexander Alekhin 754956857c Merge tag '4.0.0-openvino'
OpenCV 4.0.0 for Intel(R) OpenVINO(TM) toolkit
2018-11-18 09:19:04 +00:00
Alexander Alekhin a4ab60920f Merge pull request #13195 from alalek:legacy_constants 2018-11-18 01:36:44 +00:00
Alexander Alekhin a574788e89 move legacy C-API constants into separate files 2018-11-17 23:47:51 +00:00
Alexander Alekhin 22dbcf98c5 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-11-17 14:17:35 +00:00
Dmitry Matveev d7540c9a3c Merge pull request #13176 from dmatveev:gapi_doxygen
G-API: Doxygen class reference

* G-API Doxygen documentation: covered cv::GComputation

* G-API Doxygen documentation: added sections on compile arguments

* G-API Doxygen documentation: restructuring & more text

* Added new sections (organized API reference into it);
* Documented GCompiled, compile args, backends, etc.

* G-API Doxygen documentation: documented GKernelPackage and added group for meta
2018-11-16 23:38:10 +03:00
Alexander Alekhin bea312bd65 Merge pull request #13183 from tomoaki0705:fixCaroteneColorConvert2Gray 2018-11-16 23:35:51 +03:00
Alexander Alekhin 3705648c9b Merge pull request #13184 from paroj:imshow_cvtscale 2018-11-16 20:34:22 +00:00
Alexander Alekhin 940dc1f2b7 Merge pull request #13151 from paroj:nocapmodes 2018-11-16 17:20:48 +00:00
Pavel Rojtberg f54b230906 highgui: Qt - restore convertscale semantics
broken in 11eafca3e2
2018-11-16 16:13:05 +01:00
Tomoaki Teshima 3bbc4e44c3 fix test failure of ColorCvtRGB2Gray
- update parameter in carotene
2018-11-16 23:31:01 +09:00
Evgeny Latkin f81370232a Merge pull request #13162 from elatkin:el/gapi_perf_rgb2gray
GAPI (fluid): RGB/BGR to gray: optimization (#13162)

* GAPI (fluid): RGB/BGR to Gray: add performance tests

* GAPI (fluid): RGB/BGR to Gray: speedup 8-12x with manual CV_SIMD

* GAPI (fluid): RGB/BGR to Gray: fix compiler warning

* GAPI (fluid): RGB/BGR to Gray: dynamic dispatching to AVX2

* GAPI (fluid): RGB/BGR to Gray: check R/G/B coefficients

* GAPI (fluid): RGB/BGR to Gray: fixed compilation error (caused by change in master)
2018-11-15 18:14:27 +03:00
Dmitry Matveev 85fad1504a Merge pull request #13030 from dmatveev:tutorial
* G-API: First steps with tutorial

* G-API Tutorial: First iteration

* G-API port of anisotropic image segmentation tutorial;
* Currently works via OpenCV only;
* Some new kernels have been required.

* G-API Tutorial: added chapters on execution code, inspection, and profiling

* G-API Tutorial: make Fluid kernel headers public

For some reason, these headers were not moved to the public
headers subtree during the initial development. Somehow it even
worked for the existing workloads.

* G-API Tutorial: Fix a couple of issues found during the work

* Introduced Phase & Sqrt kernels, OCV & Fluid versions
* Extended GKernelPackage to allow kernel removal & policies on include()

All the above stuff needs to be tested, tests will be added later

* G-API Tutorial: added chapter on running Fluid backend

* G-API Tutorial: fix a number of issues in the text

* G-API Tutorial - some final updates

- Fixed post-merge issues after Sobel kernel renaming;
- Simplified G-API code a little bit;
- Put a conclusion note in text.

* G-API Tutorial - fix build issues in test/perf targets

Public headers were refactored but tests suites were not updated in time

* G-API Tutorial: Added tests & reference docs on new kernels

* Phase
* Sqrt

* G-API Tutorial: added link to the tutorial from the main module doc

* G-API Tutorial: Added tests on new GKernelPackage functionality

* G-API Tutorial: Extended InRange tests to cover 32F

* G-API Tutorial: Misc fixes

* Avoid building examples when gapi module is not there
* Added a volatile API disclaimer to G-API root documentation page

* G-API Tutorial: Fix perf tests build issue

This change came from master where Fluid kernels are still used
incorrectly.

* G-API Tutorial: Fixed channels support in Sqrt/Phase fluid kernels

Extended tests to cover this case

* G-API Tutorial: Fix text problems found on team review
2018-11-15 18:12:36 +03:00
Alexander Alekhin 1d10d56651 Merge pull request #13173 from dkurt:dnn_fix_vulkan_pool 2018-11-15 12:56:10 +00:00
Dmitry Kurtaev ef5d921eac Fix Vulkan's max pooling in case of no output indices 2018-11-15 14:10:54 +03:00
Alexander Alekhin 8409aa9eba Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-11-14 19:41:09 +00:00
Alexander Alekhin ca9aa180c1 Merge pull request #13096 from alalek:gapi_tests_checks 2018-11-14 15:59:01 +00:00
Alexander Alekhin ce46cc9852 Merge pull request #13153 from savuor:fix/filenodeit_member_ptr 2018-11-14 14:22:58 +00:00
Alexander Alekhin 39f327acdb Merge pull request #13157 from elatkin:el/gapi_perf_sobel_3 2018-11-14 13:19:30 +00:00
Alexander Alekhin 6189b47648 gapi(test): more reliable checks
avoid `countNonZero()`, use `norm()`
2018-11-14 13:30:53 +03:00
Alexander Alekhin dd6f5949c2 gapi(test): use relative error check for Norm/Sum tests 2018-11-14 13:30:53 +03:00
Latkin, Yevgeny I a62539489d GAPI (fluid): Sobel 3x3 optimization: remove needless file 2018-11-14 10:17:40 +03:00
Rostislav Vasilikhin d6b2739525 removed FileNodeIterator::operator->() 2018-11-13 20:18:53 +03:00
Pavel Rojtberg 846a500fb4 videoio: drop VideoCaptureModes enum in favour of fourcc 2018-11-13 17:20:24 +01:00
Alexander Alekhin 8b7f805642 Merge pull request #13150 from dmatveev:update_ade011d 2018-11-13 16:18:32 +00:00
Evgeny Latkin cc5190eb91 Merge pull request #13133 from elatkin:el/gapi_perf_sobel_2
GAPI (fluid): Sobel 3x3 optimization: CV_SIMD dynamic dispatching (#13133)

* GAPI (fluid): Sobel 3x3: remove template for run_sobel_row()

* GAPI (fluid): Sobel 3x3: dynamic dispatching of CV_SIMD code

* GAPI (fluid): Sobel 3x3 optimization: fixed CV_SIMD dynamic dispatcher
2018-11-13 17:48:10 +03:00
Dmitry Matveev 4eff798270 Update ADE to version 0.1.1d 2018-11-13 16:44:29 +03:00
Evgeny Latkin 4e40e5bb88 Merge pull request #13070 from elatkin:el/gapi_perf_sobel
GAPI (fluid): optimization of Sobel 3x3 (#13070)

* GAPI: performance test for Sobel

* GAPI: performance test for Sobel w/FP32 input

* GAPI: Sobel speedup: 2.5x (U8) up to 10x (float)

* GAPI: Sobel 3x3 to support U8 into S16

* GAPI (fluid): Sobel 3x3 speedup: 10% (uchar), 1.5x (float)

* GAPI (fluid): Sobel 3x3 speedup: +10x (uchar), but -20% (float)

* GAPI (fluid): Sobel 3x3 speedup: +10% (float)

* GAPI (fluid): Sobel 3x3 speedup: +15% (float), +10% (uchar)

* GAPI (fluid): Sobel 3x3: address GCC warnings

* GAPI (fluid): Sobel 3x3: separate *.cpp file w/SIMD code

* GAPI (fluid): Sobel 3x3: fixed AVX2 code, AVX2 speedup 20-50% (uchar), 10-20% (float)

* GAPI (fluid): Sobel 3x3: fix CV_SIMD code for AVX2

* GAPI (fluid): Sobel 3x3: refactor
2018-11-13 15:04:37 +03:00
Alexander Alekhin a456b968cf Merge tag '4.0.0-rc'
OpenCV 4.0.0-rc
2018-11-12 21:42:02 +00:00
Alexander Alekhin a6387c3012 release: OpenCV 4.0.0-rc (version++) 2018-11-12 19:39:09 +00:00
Alexander Alekhin 5f2074d757 Merge pull request #13140 from alalek:opencv3_opencv4 2018-11-12 22:34:10 +03:00
Alexander Alekhin 2a9c81eb25 Merge pull request #13124 from alalek:workaround_13121 2018-11-12 22:33:47 +03:00
Alexander Alekhin 65fb8ae33e Merge pull request #13137 from alalek:videoio_v4l_disable_normalization 2018-11-12 22:15:00 +03:00
Alexander Alekhin dc88c9f3a2 Merge pull request #13127 from alalek:fix_13114 2018-11-12 22:11:40 +03:00
Alexander Alekhin fc3fc6005e Merge pull request #13126 from mshabunin:remove_libv4l 2018-11-12 22:10:49 +03:00
Alexander Alekhin 27fd913c86 build: fix version 3->4 2018-11-12 19:05:58 +00:00
Alexander Alekhin e0e828ef5c videoio: remove using of HAVE_CAMV4L 2018-11-12 18:53:19 +00:00
Alexander Alekhin 9992c4d275 stitching(test): workaround ParallelFeaturesFinder.IsSameWithSerial 2018-11-12 20:17:28 +03:00
Maksim Shabunin ab65b9745b Repair V4L backend 2018-11-12 20:04:33 +03:00
Alexander Alekhin 4e3ab026fe videoio(v4l): turn off normalization of V4L properties 2018-11-12 19:10:13 +03:00
Alexander Alekhin f5b212a9d4 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-11-12 17:58:45 +03:00
Alexander Alekhin e31eb46123 Merge pull request #13123 from dkurt:fs_keys 2018-11-12 17:46:49 +03:00
Alexander Alekhin 326be0d7ba Merge pull request #13115 from catree:fix_dis_flow_intrin 2018-11-12 17:44:12 +03:00
Alexander Alekhin e5c39ed48a cmake: fix Android features detection
avoid using of ENABLE_* flags
2018-11-12 13:51:52 +03:00
Pavel Rojtberg 0d65397ae7 videoio: remove cap_libv4l in favour of cap_v4l
cap_libv4l depends on an external library (libv4l) yet is still larger
(1966 loc vs 1822 loc).
It was initially introduced copy pasting cap_v4l in order to offload
various color conversions to libv4l.
However nowadays we handle most of the needed color conversions inside
OpenCV. Our own implementation is better tested and (probably) also
better performing. (as it can optionally leverage IPP/ OpenCL)

Currently cap_v4l is better maintained and generally the code is in
better shape. There is however an API
difference in getting unconverted frames:
* on cap_libv4l one need to set `CV_CAP_MODE_GRAY=1` or
`CV_CAP_MODE_YUYV=1`
* on cap_v4l one needs to set `CV_CAP_PROP_CONVERT_RGB=0`

the latter is more flexible though as it also allows accessing undecoded
JPEG images.

fixes #4563
2018-11-12 13:38:59 +03:00
Dmitry Kurtaev a7f30391d0 Add FileNode::keys() missed during refactoring 2018-11-12 13:34:01 +03:00
catree c96850ba59 Fix missing intrin.hpp header in dis_flow.cpp.
Fix #ifdef CV_SIMD128, should be #if CV_SIMD128.
2018-11-11 23:34:04 +01:00
Alexander Alekhin 5459c11e99 Merge pull request #12896 from alalek:cmake_deprecate_pkgconfig 2018-11-11 22:12:41 +00:00
Alexander Alekhin e755a2a6e4 cmake: OPENCV_GENERATE_PKGCONFIG 2018-11-10 22:47:26 +00:00
Alexander Alekhin 1913482cf5 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-11-10 20:50:26 +00:00
Alexander Alekhin c7d04c6c5c Merge pull request #13104 from alalek:docs_fix_bib_Kroeger2016
docs: fix Kroeger2016 bib reference

move from opencv_contrib
2018-11-10 20:11:28 +03:00
Jiri Horner 1ba7c728a6 Merge pull request #12827 from hrnr:stitching_4
[evolution] Stitching for OpenCV 4.0

* stitching: wrap Stitcher::create for bindings

* provide method for consistent stitcher usage across languages

* samples: add python stitching sample

* port cpp stitching sample to python

* stitching: consolidate Stitcher create methods

* remove Stitcher::createDefault, it returns Stitcher, not Ptr<Stitcher> -> inconsistent API
* deprecate cv::createStitcher and cv::createStitcherScans in favor of Stitcher::create

* stitching: avoid anonymous enum in Stitcher

* ORIG_RESOL should be double
* add documentatiton

* stitching: improve documentation in Stitcher

* stitching: expose estimator in Stitcher

* remove ABI hack

* stitching: drop try_use_gpu flag

* OCL will be used automatically through T-API in OCL-enable paths
* CUDA won't be used unless user sets CUDA-enabled classes manually

* stitching: drop FeaturesFinder

* use Feature2D instead of FeaturesFinder
* interoperability with features2d module
* detach from dependency on xfeatures2d

* features2d: fix compute and detect to work with UMat vectors

* correctly pass UMats as UMats to allow OCL paths
* support vector of UMats as output arg

* stitching: use nearest interpolation for resizing masks

* fix warnings
2018-11-10 19:53:48 +03:00
Alexander Alekhin be9b676db3 Merge pull request #13072 from gineshidalgo99:Pendantic_warning 2018-11-09 22:52:41 +00:00
Alexander Alekhin 75a6eaf147 Merge pull request #13024 from rgarnov:gapi_fix_lut_test 2018-11-09 19:16:39 +00:00
Matt Bennett 10e1c2b3cd Merge pull request #11935 from mattmyne:filestorage_matx
* Support for Matx read/write by FileStorage

* Only empty filestorage read now produces default Matx. Split Matx IO test into smaller units. Test checks for exception thrown if reading a Mat into a Matx of different size.
2018-11-09 20:05:59 +03:00
Alexander Alekhin a1dd30ed50 Merge pull request #13094 from alalek:ocl_reduce_sync 2018-11-09 16:44:10 +00:00
Alexander Alekhin f74f1a94fe core(ocl): run "reduce" kernels in synchronous mode 2018-11-09 17:57:13 +03:00
Vadim Pisarevsky 96bf26611e Merge pull request #13084 from vpisarev:shuffle_optflow_algos
* moved DIS optical flow from opencv_contrib to opencv, moved TVL1 from opencv to opencv_contrib

* fixed compile warning

* TVL1 optical flow example moved to opencv_contrib
2018-11-09 17:52:06 +03:00
Vadim Pisarevsky 841741aa52 significantly reduced OpenCV binary size by disabling IPP in some funcs (#13085)
* significantly reduced OpenCV binary size by disabling IPP calls in some OpenCV functions: Sobel, Scharr, medianBlur, GaussianBlur, filter2D, mean, meanStdDev, norm, sum, minMaxIdx, sort.

* re-enable IPP in norm, since it's much faster (without adding too much space overhead)
2018-11-09 17:39:29 +03:00
Vadim Pisarevsky 8f15a609af mostly removed obsolete C API from calib3d (at least at the interface level) (#13081) 2018-11-09 16:12:22 +03:00
Vadim Pisarevsky 8cdf7bb84b refined QRCodeDetector API for OpenCV 4.0 (#13086)
* refined QRCodeDetector API for OpenCV 4.0

* expanded and tested QRCodeDetector::detectAndDecode()
2018-11-09 12:57:27 +03:00
Alexander Alekhin 6fb780eae6 Merge pull request #13088 from alalek:gapi_fix_arm_build 2018-11-09 12:25:52 +03:00
Ruslan Garnov 858ba6c798 Fixed uniniitialized mats in tests, added operator<< for compare_f 2018-11-09 12:00:55 +03:00
Alexander Alekhin 386733aea1 gapi: fix ARM build 2018-11-09 06:37:48 +00:00
Vadim Pisarevsky 11eafca3e2 removed C API in the following modules: photo, video, imgcodecs, videoio (#13060)
* removed C API in the following modules: photo, video, imgcodecs, videoio

* trying to fix various compile errors and warnings on Windows and Linux

* continue to fix compile errors and warnings

* continue to fix compile errors, warnings, as well as the test failures

* trying to resolve compile warnings on Android

* Update cap_dc1394_v2.cpp

fix warning from the new GCC
2018-11-09 00:52:09 +03:00
Dmitry Budnikov 5087ff0814 Merge pull request #13008 from dbudniko:dbudniko/gpu_opencl_backend
G-API GPU-OpenCL backend (#13008)

* gpu/ocl backend core

* accuracy tests added and adjusted + license headers

* GPU perf. tests added; almost all adjusted to pass

* all tests adjusted and passed - ready for pull request

* missing license headers

* fix warning (workaround RGB2Gray)

* fix c++ magic

* precompiled header

* white spaces

* try to fix warning and blur test

* try to fix Blur perf tests

* more alignments with the latest cpu backend

* more gapi tests refactoring + 1 more UB issue fix + more informative tolerance exceed reports

* white space fix

* try workaround for SumTest

* GAPI_EXPORTS instead CV_EXPORTS
2018-11-08 22:14:53 +03:00
Alexander Alekhin ebc8015638 Merge pull request #13074 from alalek:cleanup_videoio 2018-11-08 19:09:32 +03:00
Alexander Alekhin 35c7cab742 Merge pull request #13073 from alalek:cleanup_carbon 2018-11-08 19:08:33 +03:00
Alexander Alekhin c1921f1b12 Merge pull request #13069 from alalek:move_viz_contrib 2018-11-08 19:04:31 +03:00
Alexander Alekhin 9b978afaa2 Merge pull request #13029 from alalek:move_videostab_contrib 2018-11-08 19:03:14 +03:00
Alexander Alekhin 997ad12730 Merge pull request #12985 from wzw-intel:vkcom_refine 2018-11-08 10:26:57 +00:00
Alexander Alekhin 777eaa7352 Merge pull request #13057 from sturkmen72:Mat_to_IOArray 2018-11-07 21:00:14 +00:00
Alexander Alekhin bb61a2547a Merge pull request #13061 from alalek:ffmpeg_update 2018-11-07 19:59:41 +00:00
Alexander Alekhin 5869415a57 videoio: drop obsolete backends
- VFW
- QuickTime/QtKit
- Unicap - GPL, no active support: https://github.com/unicap/unicap
- DC1394 (1st version) / CMU1394
2018-11-07 19:49:09 +03:00
gineshidalgo99 b5248da826 Fixed pendantic warnings 2018-11-07 11:23:21 -05:00
Alexander Alekhin b059a361dd highgui: drop obsolete Carbon API
https://en.wikipedia.org/wiki/Carbon_(API)

In 2012, with the release of OS X 10.8 Mountain Lion, most Carbon APIs were considered deprecated.
2018-11-07 19:21:33 +03:00
Alexander Alekhin 3c99dc96b1 Merge pull request #13001 from rgarnov:gapi_standalone_cmake 2018-11-07 15:12:29 +00:00
Alexander Alekhin dadba232de viz: move samples/tutorials to opencv_contrib 2018-11-07 17:11:26 +03:00
Alexander Alekhin 787f5236a9 viz: move to opencv_contrib 2018-11-07 16:14:10 +03:00
Alexander Alekhin 31498ebbea videostab: move sample to opencv_contrib 2018-11-07 15:49:35 +03:00
Alexander Alekhin 9636ffc471 videostab: move to opencv_contrib 2018-11-07 15:41:04 +03:00
Alexander Alekhin b17e1531d2 Merge pull request #13026 from alalek:move_superres_contrib 2018-11-07 12:36:55 +00:00
Alexander Alekhin 05dc645b81 Merge pull request #13025 from alalek:move_shape_contrib 2018-11-07 12:36:30 +00:00
Alexander Alekhin d4f038dfcc ffmpeg: update 4.1 (OpenCV 4.x branch)
ffmpeg 4.0.2 -> 4.1
2018-11-07 15:15:04 +03:00
Ruslan Garnov c972c94662 Added Standalone.cmake 2018-11-07 14:54:18 +03:00
Wu Zhiwen 33c9d57c6f dnn/Vulkan: skip heavy convolution task
This is a workaround for GPU hang on heavy convolution workload (> 10 GFLOPS).
e.g. ResNet101_DUC_HDC

For the long time task, vkWaitForFences() return without error but next call on
vkQueueSubmit() return -4, i.e. "VK_ERROR_DEVICE_LOST" and driver reports GPU hang.

Need more investigation on root cause of GPU hang and need to optimize convolution shader
to reduce process time.
2018-11-07 16:38:36 +08:00
Alexander Alekhin 2c6f1ab57d Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-11-06 20:04:31 +00:00
Evgeny Latkin 000110e760 Merge pull request #13052 from elatkin:yl/gapi_sobel3x3_f32_v2
* GAPI: Sobel 3x3 with FP32 input

* GAPI: Sobel 3x3 with FP32 input, v2
2018-11-06 23:08:50 +03:00
Alexander Alekhin 7a686a0c43 Merge pull request #13010 from dkurt:fix_cl_eye_fp16 2018-11-06 18:36:09 +00:00
Alexander Alekhin 835e4b6de9 Merge pull request #13032 from ijean:mingw-w64-build 2018-11-06 16:26:56 +00:00
Alexander Alekhin 0a5301bc5b Merge pull request #13041 from berak:docs_highgui 2018-11-06 19:19:51 +03:00
Alexander Alekhin 3a4bc0d41e Merge pull request #13055 from vpisarev:remove_old_haar 2018-11-06 16:01:28 +00:00
Alexander Alekhin cfb02b5370 shape: move sample to opencv_contrib 2018-11-06 16:52:17 +03:00
Vadim Pisarevsky b8175f8976 removed the old C API for Haar-based object detection; use CascadeClassifier from now on 2018-11-06 15:39:37 +03:00
Suleyman TURKMEN 182f43b6f9 Update imgproc.hpp 2018-11-05 04:48:49 +03:00
berak 6d2a97e954 docs: remove NULL strings from highgui.hpp 2018-11-04 12:59:35 +01:00
Jean Carass 66e4ace39f Replaced strcpy_s, strcat_s for MinGW builds. 2018-11-02 08:51:57 -07:00
Alexander Alekhin a920ed9e1e superres: move to opencv_contrib 2018-11-02 16:06:16 +03:00
Alexander Alekhin 6c8ec5336f shape: move to opencv_contrib 2018-11-02 15:23:05 +03:00
Alexander Alekhin 687fa6a8ca Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-11-02 05:33:35 +00:00
Dmitry Kurtaev 32797515de Fix https://github.com/opencv/opencv/issues/12824 2018-11-02 08:26:08 +03:00
Vadim Pisarevsky 0f622206e4 completely new C++ persistence implementation (#13011)
* integrated the new C++ persistence; removed old persistence; most of OpenCV compiles fine! the tests have not been run yet

* fixed multiple bugs in the new C++ persistence

* fixed raw size of the parsed empty sequences

* [temporarily] excluded obsolete applications traincascade and createsamples from build

* fixed several compiler warnings and multiple test failures

* undo changes in cocoa window rendering (that was fixed in another PR)

* fixed more compile warnings and the remaining test failures (hopefully)

* trying to fix the last little warning
2018-11-02 00:27:06 +03:00
Alexander Alekhin ca55982669 Merge pull request #13007 from dkurt:fix_12970 2018-11-01 11:30:37 +00:00
Dmitry Kurtaev ea67060081 Fix https://github.com/opencv/opencv/issues/12970 2018-11-01 11:22:28 +03:00
Alexander Alekhin 2dfaad3259 Merge pull request #12889 from alalek:drop_untested_flann_hdf5_header 2018-10-31 15:11:32 +00:00
Alexander Alekhin 06ffa408ce Merge pull request #12988 from LaurentBerger:test_copyto_py 2018-10-31 14:23:08 +00:00
Wu Zhiwen 34e9d1eb3c dnn/Vulkan: support log softmax
Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
2018-10-31 09:47:38 +08:00
Wu Zhiwen 3914c17b0d dnn/Vulkan: Refine error handle mechanism
Fallback to OPENCV backend and CPU target if catch exception from
vkcom backend.

Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
2018-10-31 09:47:33 +08:00
Alexander Alekhin c92e0838c1 Merge pull request #12951 from catree:easy_fixes_const_viz 2018-10-30 18:55:21 +00:00
Ruslan Garnov 443fed796a Merge pull request #12990 from rgarnov:gapi_fluid_reshape_support
G-API: Introduce new `reshape()` API (#12990)

* Moved initFluidUnits, initLineConsumption, calcLatency, calcSkew to separate functions

* Added Fluid::View::allocate method (moved allocation logic from constructor)

* Changed util::zip to util::indexed, utilized collectInputMeta in GFluidExecutable constructor

* Added makeReshape method to FluidExecutable

* Removed m_outputRoi from GFluidExecutable

* Added reshape feature

* Added switch of resize mapper if agent ratio was changed

* Added more TODOs and renamed a function

* G-API reshape(): add missing `override` specifiers

Fix warnings on all platforms
2018-10-30 21:12:36 +03:00
AsyaPronina 08536943ad Merge pull request #12949 from AsyaPronina:missed_multiply_operator_for_GMAT
Made scale parameter optional for mul kernel wrapper (#12949)

* Added missed operator*(GMat, GMat). Made scale parameter optional for mul kernel.

* Fixed perf test for mul(GMat, GMat) kernel

* Removed operator*(GMat, GMat) as not needed
2018-10-30 21:10:47 +03:00
LaurentBerger 936523ae52 Add python test for copyto with mask 2018-10-30 13:25:38 +01:00
Wu Zhiwen 7fff245f87 dnn/Vulkan: Rename function_list.inl
Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>
2018-10-30 08:29:43 +08:00
WuZhiwen 6e3ea8b49d Merge pull request #12703 from wzw-intel:vkcom
* dnn: Add a Vulkan based backend

This commit adds a new backend "DNN_BACKEND_VKCOM" and a
new target "DNN_TARGET_VULKAN". VKCOM means vulkan based
computation library.

This backend uses Vulkan API and SPIR-V shaders to do
the inference computation for layers. The layer types
that implemented in DNN_BACKEND_VKCOM include:
Conv, Concat, ReLU, LRN, PriorBox, Softmax, MaxPooling,
AvePooling, Permute

This is just a beginning work for Vulkan in OpenCV DNN,
more layer types will be supported and performance
tuning is on the way.

Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>

* dnn/vulkan: Add FindVulkan.cmake to detect Vulkan SDK

In order to build dnn with Vulkan support, need installing
Vulkan SDK and setting environment variable "VULKAN_SDK" and
add "-DWITH_VULKAN=ON" to cmake command.

You can download Vulkan SDK from:
https://vulkan.lunarg.com/sdk/home#linux

For how to install, see
https://vulkan.lunarg.com/doc/sdk/latest/linux/getting_started.html
https://vulkan.lunarg.com/doc/sdk/latest/windows/getting_started.html
https://vulkan.lunarg.com/doc/sdk/latest/mac/getting_started.html
respectively for linux, windows and mac.

To run the vulkan backend, also need installing mesa driver.
On Ubuntu, use this command 'sudo apt-get install mesa-vulkan-drivers'

To test, use command '$BUILD_DIR/bin/opencv_test_dnn --gtest_filter=*VkCom*'

Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>

* dnn/Vulkan: dynamically load Vulkan runtime

No compile-time dependency on Vulkan library.
If Vulkan runtime is unavailable, fallback to CPU path.

Use environment "OPENCL_VULKAN_RUNTIME" to specify path to your
own vulkan runtime library.

Signed-off-by: Wu Zhiwen <zhiwen.wu@intel.com>

* dnn/Vulkan: Add a python script to compile GLSL shaders to SPIR-V shaders

The SPIR-V shaders are in format of text-based 32-bit hexadecimal
numbers, and inserted into .cpp files as unsigned int32 array.

* dnn/Vulkan: Put Vulkan headers into 3rdparty directory and some other fixes

Vulkan header files are copied from
https://github.com/KhronosGroup/Vulkan-Docs/tree/master/include/vulkan
to 3rdparty/include

Fix the Copyright declaration issue.

Refine OpenCVDetectVulkan.cmake

* dnn/Vulkan: Add vulkan backend tests into existing ones.

Also fixed some test failures.

- Don't use bool variable as uniform for shader
- Fix dispathed group number beyond max issue
- Bypass "group > 1" convolution. This should be support in future.

* dnn/Vulkan: Fix multiple initialization in one thread.
2018-10-29 17:51:26 +03:00
Dmitry Budnikov 220b278575 Merge pull request #12944 from dbudniko:dbudniko/tests_thresholds
* added threshold to g-api imgproc tests

* trailing spaces remove

* try to fix warnings

* fix license header

* fix random numbers issue

* fix Sobel test

* license headers + precompiled headers included
2018-10-29 17:34:20 +03:00
catree 2b022311a4 Make cast() function const. Make parameters of addLight() const. 2018-10-29 14:53:28 +01:00
Alexander Alekhin 853f5111c2 Merge pull request #12978 from xoox:fix-collectCalibrationData-signature 2018-10-29 12:23:39 +00:00
Vadim Pisarevsky 65ab6ed59f Merge pull request #12980 from LaurentBerger:copyToPy 2018-10-29 11:22:20 +00:00
LaurentBerger 389aae59ae add python copyto with mask (https://github.com/opencv/opencv/issues/10225) 2018-10-29 09:09:30 +01:00
Wenfeng CAI c9abb823a7 Fix signature of static collectCalibrationData()
This is a fix to the signature of static function
collectCalibrationData() and clean-up for #12772. Since fallback scheme
in calibration method selection is not used anymore. As an input
parameter, iFixedPoint should be passed by value according to the OpenCV
coding style guide.
2018-10-29 10:19:02 +08:00
AsyaPronina e6dd9a78ae Merge pull request #12947 from AsyaPronina:sobel_renaming
* Renamed Sobel operator GAPI kernel to match with OpenCV naming rules

* Fixed perf tests

* Small refactoring to check CI issue

* Refactored alignment for kernel wrappers in imgproc.hpp
2018-10-27 19:54:32 +03:00
Alexander Alekhin e0c888acf7 Merge pull request #12952 from seanm:fix12933 2018-10-26 18:27:27 +00:00
Alexander Alekhin 50bec53afc Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-10-26 17:56:55 +03:00
Sean McBride 828091cfbb Fixed #12933: added cast to silence clang -Wcomma warning 2018-10-25 13:27:17 -04:00
wanghanmin eb981cc7d7 Merge pull request #12138 from wanghanmin:wanghanmin-patch-videoio_crossbarsetting-1
* Update videoio.hpp

add VideoCapturePropertie for clossbar input pin setting

* Update cap_dshow.cpp

For some kind of capture card, such as "avermedia cv710 " , it use SerialDigital as input pin and so it can not work.
Here added new PhysicalConnectorType enumeration: PhysConn_Video_YRYBY and PhysConn_Video_SerialDigital to support it.
And also provide new property parameter CAP_CROSSBAR_INPIN_TYPE to set the crossbar input pin type which will be used in videoInput::start(int deviceID, videoDevice *VD):
" if(VD->useCrossbar)
    {
        DebugPrintOut("SETUP: Checking crossbar\n");
        routeCrossbar(&VD->pCaptureGraph, &VD->pVideoInputFilter, VD->connection, CAPTURE_MODE);

    }
"

And at last ,fixed one issue for function setSizeAndSubtype, added code 
pVih->rcSource.top = pVih->rcSource.left = pVih->rcTarget.top =pVih->rcTarget.left=0;
pVih->rcSource.right = pVih->rcTarget.right= attemptWidth;
pVih->rcSource.bottom = pVih->rcTarget.bottom = attemptHeight;

without these code , rcSource and rcTarget will keeping use default resolution and cause fail in hr = VD->streamConf->SetFormat(VD->pAmMediaType) and cannot find suitable MediaType.

Tested with python3 and mfc (Avermedia cv710)
Python3 code:
import cv2
print("test cv")
cap=cv2.VideoCapture(0)
cap.set(5,60)
cap.set(3,1920)
cap.set(4,1080)
cap.set(31,6)


ret,img=cap.read()
cv2.namedWindow("cap",cv2.WINDOW_NORMAL)
cv2.resizeWindow("cap",960,640);
while True:
    ret,img=cap.read()
    if ret==False:
        continue
    cv2.imshow("cap",img)
    if cv2.waitKey(1) & 0xFF == ord('q'):
        break
cap.release()

cv2.destroyAllWindows()

MFC code:
void CcvtestDlg::OnBnClickedButton1()
{
VideoCapture cap(0);
cap.set(CAP_PROP_FRAME_WIDTH, 1920);
cap.set(CAP_PROP_FRAME_HEIGHT, 1080);

cap.set(CAP_CROSSBAR_INPIN_TYPE , 6);
Mat img;
namedWindow("test", WINDOW_NORMAL);
resizeWindow("test", 960, 640);
while (1)
{
if (cap.read(img))
{
imshow("test", img);
if ('q' ==waitKey(1))
break;
}
}
destroyAllWindows();
cap.release();
}

* Update cap_dshow.cpp

* Update videoio.hpp

move enum value of CAP_CROSSBAR_INPIN_TYPE to the end of list

* Update videoio.hpp

* Update cap_dshow.cpp

removed trailing whitespace

* Update test_camera.cpp

Add test for capture device using PhysConn_Video_SerialDigital as crossbar input pin

* Update test_camera.cpp

Correction of misunderstanding about how to add test case.
2018-10-25 19:41:37 +03:00
Wenfeng CAI 31be03a805 Merge pull request #12772 from xoox:calib-release-object
More accurate pinhole camera calibration with imperfect planar target (#12772)
43 commits:

* Add derivatives with respect to object points

Add an output parameter to calculate derivatives of image points with
respect to 3D coordinates of object points. The output jacobian matrix
is a 2Nx3N matrix where N is the number of points.

This commit introduces incompatibility to old function signature.

* Set zero for dpdo matrix before using

dpdo is a sparse matrix with only non-zero value close to major
diagonal. Set it to zero because only elements near major diagonal are
computed.

* Add jacobian columns to projectPoints()

The output jacobian matrix of derivatives with respect to coordinates of
3D object points are added. This might break callers who assume the
columns of jacobian matrix.

* Adapt test code to updated project functions

The test cases for projectPoints() and cvProjectPoints2() are updated to
fit new function signatures.

* Add accuracy test code for dpdo

* Add badarg test for dpdo

* Add new enum item for new calibration method

CALIB_RELEASE_OBJECT is used to whether to release 3D coordinates of
object points. The method was proposed in: K. H. Strobl and G. Hirzinger.
"More Accurate Pinhole Camera Calibration with Imperfect Planar Target".
In Proceedings of the IEEE International Conference on Computer Vision
(ICCV 2011), 1st IEEE Workshop on Challenges and Opportunities in Robot
Perception, Barcelona, Spain, pp. 1068-1075, November 2011.

* Add releasing object method into internal function

It's a simple extension of the standard calibration scheme. We choose to
fix the first and last object point and a user-selected fixed point.

* Add interfaces for extended calibration method

* Refine document for calibrateCamera()

When releasing object points, only the z coordinates of the
objectPoints[0].back is fixed.

* Add link to strobl2011iccv paper

* Improve documentation for calibrateCamera()

* Add implementations of wrapping calibrateCamera()

* Add checking for params of new calibration method

If input parameters are not qualified, then fall back to standard
calibration method.

* Add camera calibration method of releasing object

The current implementation is equal to or better than
https://github.com/xoox/calibrel

* Update doc for CALIB_RELEASE_OBJECT

CALIB_USE_QR or CALIB_USE_LU could be used for faster calibration with
potentially less precise and less stable in some rare cases.

* Add RELEASE_OBJECT calibration to tutorial code

To select the calibration method of releasing object points, a command
line parameter `-d=<number>` should be provided.

* Update tutorial doc for camera_calibration

If the method of releasing object points is merged into OpenCV. It will
be expected to be firstly released in 4.1, I think.

* Reduce epsilon for cornerSubPix()

Epsilon of 0.1 is a bigger one. Preciser corner positions are required
with calibration method of releasing object.

* Refine camera calibration tutorial

The hypothesis coordinates are used to indicate which distance must be
measured between two specified object points.

* Update sample calibration code method selection

Similar to camera_calibration tutorial application, a command line
argument `-dt=<number>` is used to select the calibration method.

* Add guard to flags of cvCalibrateCamera2()

cvCalibrateCamera2() doesn't accept CALIB_RELEASE_OBJECT unless overload
interface is added in the future.

* Simplify fallback when iFixedPoint is out of range

* Refactor projectPoints() to keep compatibilities

* Fix arg string "Bad rvecs header"

* Read calibration flags from test data files

Instead of being hard coded into source file, the calibration flags will
be read from test data files.
opencv_extra/testdata/cv/cameracalibration/calib?.dat must be sync with
the test code.

* Add new C interface of cvCalibrateCamera4()

With this new added C interface, the extended calibration method with
CALIB_RELEASE_OBJECT can be called by C API.

* Add regression test of extended calibration method

It has been tested with new added test data in xoox:calib-release-object
branch of opencv_extra.

* Fix assertion in test_cameracalibration.cpp

The total number of refined 3D object coordinates is checked.

* Add checker for iFixedPoint in cvCalibrateCamera4

If iFixedPoint is out of rational range, fall back to standard method.

* Fix documentation for overloaded calibrateCamera()

* Remove calibration flag of CALIB_RELEASE_OBJECT

The method selection is based on the range of the index of fixed point.
For minus values, standard calibration method will be chosen.  Values in
a rational range will make the object-releasing calibration method
selected.

* Use new interfaces instead of function overload

Existing interfaces are preserved and new interfaces are added. Since
most part of the code base are shared, calibrateCamera() is now a
wrapper function of calibrateCameraRO().

* Fix exported name of calibrateCameraRO()

* Update documentation for calibrateCameraRO()

The circumstances where this method is mostly helpful are described.

* Add note on the rigidity of the calibration target

* Update documentation for calibrateCameraRO()

It is clarified that iFixedPoint is used as a switch to select
calibration method. If input data are not qualified, exceptions will be
thrown instead of fallback scheme.

* Clarify iFixedPoint as switch and remove fallback

iFixedPoint is now used as a switch for calibration method selection. No
fallback scheme is utilized anymore. If the input data are not
qualified, exceptions will be thrown.

* Add badarg test for object-releasing method

* Fix document format of sample list

List items of same level should be indented the same way. Otherwise they
will be formatted as nested lists by Doxygen.

* Add brief intro for objectPoints and imagePoints

* Sync tutorial to sample calibration code

* Update tutorial compatibility version to 4.0
2018-10-25 19:38:55 +03:00
Alexander Alekhin ca3848d773 Merge pull request #12937 from mshabunin:fix-static-4 2018-10-25 15:15:15 +00:00
Maksim Shabunin e6d9486a6c Fixed several issues found by static analysis 2018-10-25 16:39:54 +03:00
Maksim Shabunin 9a8e47a766 Version update for OpenVINO 2018-10-25 16:38:30 +03:00
Alexander Alekhin 13f244b6a5 Merge pull request #12927 from alalek:docs_filter_gapi_exports 2018-10-25 11:53:06 +00:00
Alexander Alekhin 28556f1498 core: move compiler defines from base.hpp into cvdef.h 2018-10-25 14:05:46 +03:00
Maksim Shabunin 0ccd810738 Fixed several issues found by static analysis 2018-10-25 10:45:59 +03:00
Alexander Alekhin e959f449ae Merge pull request #12894 from alalek:c_api_drop_samples 2018-10-24 15:40:04 +00:00
Alexander Alekhin e4aea680b9 Merge pull request #12922 from alalek:fix_merge_12787 2018-10-24 15:15:13 +00:00
Alexander Alekhin 5d3822f15e docs: hide GAPI_EXPORTS from documentation 2018-10-24 18:05:21 +03:00
Alexander Alekhin 465ae048a0 Merge pull request #12887 from alalek:fix_cmake_conditions 2018-10-24 13:17:54 +00:00
Alexander Alekhin 71009c9b4d core: fix merge from 3.4
`CV_ErrorNoReturn` should not be used in OpenCV
2018-10-24 14:45:45 +03:00
Dmitry Matveev dbed39a931 Merge pull request #12857 from dmatveev:hld
* G-API Documentation: first submission

This PR introduces a number of new OpenCV documentation chapters for
Graph API module.

In particular, the following topics are covered:
- Introduction & background information;
- High-level design overview;
- Kernel API;
- Pipeline example.

All changes are done in Markdown files, no headers, etc modified.

Doxygen references for main API classes will be added later.

Also, a tutorial will be introduced soon (in the common Tutorials place)

* G-API Documentation - fix warnings & trailing whitespaces

* G-API Documentation: address review issues

* G-API Documentation: export code snippets to compileable files

* gapi: move documentation samples
2018-10-24 07:47:56 +03:00
Vadim Pisarevsky ea31c09384 rewrote the line segment intersection function to make the static analyzer happy (#12902)
* rewrote the line segment intersection function to make the static analyzer happy

* fixed bug with improper "no intersection" detection in some of corner cases

* fixed bug with improper "no intersection" detection in some of corner cases
2018-10-23 17:09:23 +03:00
Alexander Alekhin 329a1fb781 drop C-API sample code 2018-10-23 14:38:20 +03:00
Alexander Alekhin 043e7e3516 flann: drop untested hdf5.h 2018-10-21 15:16:52 +00:00
Alexander Alekhin 9c23f2f1a6 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-10-20 11:37:54 +00:00
Dmitry Matveev 5e9750d1f5 Merge pull request #12870 from dmatveev:gapi_fluid_basic_hetero_support
* G-API Fluid basic heterogeneity support: initial upload

* G-API Fluid heterogeneity: address some coding style issues

* G-API Fluid heterogeneity: fix compiler warnings

* G-API Fluid heterogeneity: fix warnings on Windows & ARMv7

* G-API Fluid heterogeneity: finally fix Windows warnings

* G-API Fluid heterogeneity: fix dangling reference problem
2018-10-19 18:32:48 +03:00
Alexander Alekhin 2180a67670 Merge pull request #12863 from alalek:disable_wshadow_gcc_4.x 2018-10-17 13:59:13 +00:00
Alexander Alekhin 1188c6fe14 Merge pull request #12838 from dmatveev:gapi_fluid_resize_lpi 2018-10-17 09:22:28 +00:00
Alexander Alekhin a2e754c136 build: eliminate warnings 2018-10-17 08:43:18 +00:00
Alexander Alekhin 5339ef3004 Merge tag '4.0.0-beta' 2018-10-15 20:33:41 +00:00
Alexander Alekhin 6a2b3c8d4c release: OpenCV 4.0.0-beta (version++) 2018-10-15 20:31:53 +00:00
Alexander Alekhin edacd91a27 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-10-15 20:15:42 +00:00
Alexander Alekhin 5dd46b54c1 Merge pull request #12848 from alalek:issue_12337 2018-10-15 20:09:36 +00:00
Alexander Alekhin ea502b6e84 Merge pull request #12845 from alalek:workaround_12824 2018-10-15 20:09:06 +00:00
Alexander Alekhin 954536073d core: update solveLP() interface 2018-10-15 18:58:11 +00:00
Alexander Alekhin cc45c10f3d ocl: bailout from unsupported types 2018-10-15 18:06:06 +00:00
Alexander Alekhin 13aa23f706 Merge pull request #12836 from dmatveev:gapi_upd151018 2018-10-15 16:20:52 +00:00
Alexander Alekhin 78b51fb574 Merge pull request #12826 from alalek:issue_8413 2018-10-15 14:24:56 +00:00
Dmitry Matveev 922d5796b9 G-API: Introduce LPI (multiple Lines-Per-Iteration) support for Resize
Several Resize optimizations count on fetching multiple input lines at
once to do interpolation more efficiently.

At the moment, Fluid backend supports only LPI=1 for Resize kernels.

This patch introduces scheduling support for Resizes with LPI>1 and
covers these cases with new tests.

The support is initially written by Ruslan Garnov.
2018-10-15 17:11:55 +03:00
Dmitry Matveev f0ddc2a53c G-API: Fixed static analysis issue in own::Mat
Tool reported a false alarm on possible out-of-bounds access which
was work-arounded to make code more clear
2018-10-15 16:31:31 +03:00
Alexander Alekhin d5d059690f gapi(test): disable divide tests with zeros 2018-10-14 10:47:50 +00:00
Alexander Alekhin fd832bb57d core: follow IEEE 754 rules for floating-point division 2018-10-14 10:47:50 +00:00
Alexander Alekhin 09cb329d73 core(test): zero values divide test (4.0+) 2018-10-14 03:46:29 +00:00
Alexander Alekhin 4a9291fd89 Merge branch 'issue_8413_3.4' 2018-10-14 03:46:01 +00:00
Alexander Alekhin 5115e5decb Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-10-13 16:19:05 +00:00
Alexander Alekhin 1ed9ff17e1 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-10-12 10:05:55 +00:00
Alexander Alekhin f1fdfa1a51 Merge pull request #12623 from sturkmen72:videoio-4 2018-10-11 19:24:57 +00:00
Alexander Alekhin 0f3fe957f5 Merge pull request #12450 from sturkmen72:update_HOGDescriptor 2018-10-11 19:23:35 +00:00
Alexander Alekhin fc4679d4cf Merge pull request #12795 from mshabunin:fix-win-python 2018-10-10 20:55:32 +00:00
Alexander Alekhin 35c53204cb Merge pull request #12781 from alalek:videoio_drop_rectification_dc1394 2018-10-10 20:01:06 +00:00
Alexander Alekhin f731515628 cmake: fix Python detection for standalone bindings 2018-10-10 22:59:42 +03:00
Suleyman TURKMEN 59bf2a34fa Update videoio 2018-10-10 21:58:04 +03:00
Suleyman TURKMEN abbb73e894 Update HOGDescriptor 2018-10-10 21:53:35 +03:00
Alexander Alekhin dada5a422d Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-10-09 21:20:15 +00:00
Alexander Alekhin 8bb3d363a4 videoio: drop rectification code for VIDERE cameras 2018-10-09 14:06:15 +00:00
Alexander Alekhin 1522722fab Merge pull request #12728 from alalek:calib3d_move_undistort 2018-10-08 15:34:30 +00:00
Alexander Alekhin 8f1f4273a2 calib3d: move undistort files from imgproc 2018-10-05 07:52:21 +00:00
Alexander Alekhin a9c8a526cf Merge pull request #12695 from sam09:master 2018-10-04 12:53:37 +00:00
Sam Radhakrishnan 699db77293 Fixes #12692: Update samples/gpu/videoreader.cpp
Change iteration to iterate separately when the video is decode on a GPU to account for different number of frames
2018-10-03 17:42:57 +05:30
Alexander Alekhin 690fb0544c Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-10-02 14:31:05 +03:00
Alexander Alekhin ae4c72a153 Merge pull request #12668 from alalek:calib3d_chessboardsb_updates 2018-10-01 00:00:01 +03:00
Alexander Alekhin ea92c2b1a6 Merge pull request #12663 from sturkmen72:patch-12 2018-09-29 12:52:27 +00:00
Alexander Alekhin 9ac7aea930 Merge pull request #12653 from cv3d:cuda/legacy_traits 2018-09-28 19:21:04 +00:00
Hamdi Sahloul 5f17cc1abd Fix Python wrapper for GpuMat 2018-09-29 02:47:59 +09:00
Alexander Alekhin 8f6695acc7 CUDA: drop OPENCV_TRAITS_ENABLE_DEPRECATED requirement 2018-09-29 02:47:59 +09:00
chacha21 9524abcd28 Merge pull request #12658 from chacha21:clr-mutex
* hide use of std::mutex from /clr compilation under Visual Studio

C++11 <mutex> is not available when compiling with  /clr under Visual Studio, thus opencv cannot be easily included.
It is fixed by making a CEEMutex wrapper class, around an opaque implementation using std::mutex internally

* fixed compilation outside of Visual Studio

fixed compilation outside of Visual Studio by avoiding some macros

* fixed indentation, prepare getting rid of CEEMutex/CEELockGuard

fixed indentation
After discussion, CEEMutex and CEELockGuard can be totally removed, letting the developer in a /clr context to provide his own implementation

* remove CEEMutex/CEELockGuard
2018-09-28 19:19:05 +03:00
Alexander Alekhin 83efde6243 Merge pull request #12678 from cv3d:cleanup/python/enums 2018-09-28 16:07:21 +00:00
Suleyman TURKMEN 8eb987e393 Update findContours parameter type 2018-09-28 18:42:48 +03:00
Dmitry Matveev 2c6ab65476 Merge pull request #12674 from dmatveev:gapi_upd270918
* Update G-API code base to 27-Sep-18

Changes mostly improve standalone build support

* G-API code base update 28-09-2018

* Windows/Documentation warnings should be fixed
* Fixed stability issues in Fluid backend
* Fixed precompiled headers issues in G-API source files

* G-API code base update 28-09-18 EOD

* Fixed several static analysis issues
* Fixed issues found when G-API is built in a standalone mode
2018-09-28 18:42:09 +03:00
Alexander Alekhin 66fdddc339 Merge pull request #12656 from alalek:fix_documentation_build 2018-09-28 14:16:25 +00:00
Alexander Alekhin 5575171652 Merge pull request #12673 from alalek:fix_build_warnings
* fix build warnings

* python: forbid wrapping of functions with "void*" arguments
2018-09-28 16:53:05 +03:00
Alexander Alekhin a8b0db4e5d Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-09-28 14:14:47 +03:00
Hamdi Sahloul e104fcc000 Generate enum bindings automatically 2018-09-28 15:39:51 +09:00
Alexander Alekhin e4f71994c2 calib3d: findChessboardCornersSB() minor updates
- avoid updating of input image during equalizeHist() call
- avoid for() with double variable (use 'int' instead)
- more CV_Check*() macros
- use Mat_<T>, Matx
- static for local variables
2018-09-27 15:38:01 +03:00
Dmitry Matveev 29e88e50ff Merge pull request #12608 from dmatveev:gapi
* G-API Initial code upload

* Update G-API code base to Sep-24-2018

* The majority of OpenCV buildbot problems was addressed

* Update G-API code base to 24-Sep-18 EOD

* G-API code base update 25-Sep-2018

* Linux warnings should be resolved
* Documentation build should become green
* Number of Windows warnings should be reduced

* Update G-API code base to 25-Sep-18 EOD

* ARMv7 build issue should be resolved
* ADE is bumped to latest version and should fix Clang builds for macOS/iOS
* Remaining Windows warnings should be resolved
* New Linux32 / ARMv7 warnings should be resolved

* G-API code base update 25-Sep-2018-EOD2

* Final Windows warnings should be resolved now

* G-API code base update 26-Sep-2018

* Fixed issues with precompiled headers in module and its tests
2018-09-26 21:50:39 +03:00
Alexander Alekhin 852f061b26 Merge pull request #12655 from alalek:fix_printf_format_warning 2018-09-26 16:21:07 +00:00
Menghui Xie f0d277e452 M_PI changed to CV_PI (#12645)
* M_PI changed to CV_PI

* M_PI changed to CV_PI

* M_PI changed to CV_PI
2018-09-26 16:05:02 +03:00
Alexander Alekhin 2e8483bd1c docs: fix build without opencv_contrib (avoid links to CUDA modules) 2018-09-26 15:24:52 +03:00
Alexander Alekhin 3eec8fd0eb dnn: fix printf format warning 2018-09-26 14:06:04 +03:00
Alexander Alekhin d8d025c33b Merge pull request #12599 from mshabunin:printf 2018-09-25 14:44:21 +00:00
Alexander Duda 8811dabbac Merge pull request #12615 from D-Alex:master
findChessboardCornersSB: speed improvements (#12615)

* chessboard: fix do not modify const image

* chessboard: speed up scale space using parallel_for

* chessboard: small improvements

* chessboard: speed up board growing using parallel_for

* chessboard: add flags for tuning detection

* chessboard: fix compiler warnings

* chessborad: change flag name to CALIB_CB_EXHAUSTIVE

This also fixes a typo

* chessboard: fix const ref + remove to_string
2018-09-25 17:06:46 +03:00
Alexander Alekhin efca746d36 Merge pull request #12622 from cv3d:fix/js_property 2018-09-24 09:36:51 +00:00
Maksim Shabunin e0f524d3b7 Fixed several incorrect printf format specifiers 2018-09-24 11:31:40 +03:00
Pavel Rojtberg d1c842cf29 core: fix printf warnings by using c++11 format 2018-09-24 11:31:40 +03:00
Pavel Rojtberg 4d23a5d92d core: enable printf format warnings for cv::format 2018-09-24 11:31:40 +03:00
Hamdi Sahloul 0739d1c2eb JS: Support enum properties 2018-09-24 16:37:52 +09:00
Alexander Alekhin 475c775b25 Merge pull request #12621 from cv3d:fix/opengl 2018-09-23 20:00:53 +00:00
Hamdi Sahloul b7e8ce4523 fix a bug in OpenGL 2018-09-23 23:07:28 +09:00
Alexander Alekhin e8fcd721b8 Merge pull request #12612 from alalek:winpack_samples_python_launcher_update 2018-09-22 20:44:46 +00:00
Hamdi Sahloul ef5579dc86 Merge pull request #12310 from cv3d:chunks/enum_interface
* Cleanup macros and enable expansion of `__VA_ARGS__` for Visual Studio

* Macros for enum-arguments backwards compatibility

* Convert struct Param to enum struct

* Enabled ParamType.type for enum types

* Enabled `cv.read` and `cv.write` for enum types

* Rename unnamed enum to AAKAZE.DescriptorType

* Rename unnamed enum to AccessFlag

* Rename unnamed enum to AgastFeatureDetector.DetectorType

* Convert struct DrawMatchesFlags to enum struct

* Rename unnamed enum to FastFeatureDetector.DetectorType

* Rename unnamed enum to Formatter.FormatType

* Rename unnamed enum to HOGDescriptor.HistogramNormType

* Rename unnamed enum to DescriptorMatcher.MatcherType

* Rename unnamed enum to KAZE.DiffusivityType

* Rename unnamed enum to ORB.ScoreType

* Rename unnamed enum to UMatData.MemoryFlag

* Rename unnamed enum to _InputArray.KindFlag

* Rename unnamed enum to _OutputArray.DepthMask

* Convert normType enums to static const NormTypes

* Avoid conflicts with ElemType

* Rename unnamed enum to DescriptorStorageFormat
2018-09-21 18:12:35 +03:00
Hamdi Sahloul 84ae8097b1 Merge pull request #12601 from cv3d:fix/js
* JS: Support enum types in constructors

* JS: Avoid unary expression on enum-based consts
2018-09-21 18:11:46 +03:00
Alexander Alekhin 295b988657 Merge tag '4.0.0-alpha' 2018-09-19 20:47:17 +00:00
Alexander Alekhin 68942affdb release: OpenCV 4.0.0-alpha (version++) 2018-09-19 19:30:30 +03:00
Alexander Alekhin e0980c4d73 Merge pull request #12585 from alalek:move_cuda_modules
cuda: move CUDA modules to opencv_contrib: https://github.com/opencv/opencv_contrib/pull/1781
2018-09-19 19:30:02 +03:00
Alexander Alekhin c5920df159 cuda: move CUDA modules to opencv_contrib
OpenCV 4.0+
2018-09-19 18:57:00 +03:00
Alexander Alekhin 86ddff0b88 Merge pull request #12401 from alalek:opencv_install_paths 2018-09-19 15:49:47 +00:00
Alexander Alekhin 908978d00b Merge pull request #12589 from xoox:fix-stddev-request 2018-09-19 15:07:58 +00:00
Alexander Alekhin a956732874 cmake: update install paths (Linux) 2018-09-19 15:43:52 +03:00
Alexander Alekhin 879e046b22 Merge pull request #12586 from Slyce-Inc:bug-xcode10-compile 2018-09-19 10:58:51 +00:00
Alexander Alekhin 5fb0f34e8a Merge pull request #12570 from alalek:drop_usrtype1
* core: drop usage of CV_USRTYPE1 in OpenCV

avoid OpenCV crashes due size change CV_ELEM_SIZE(CV_USRTYPE1): 8 -> 2

* ! fix persistence internal types
2018-09-19 13:55:26 +03:00
Alexander Alekhin 861415133e Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-09-19 10:58:43 +03:00
Wenfeng CAI fce75cd858 Fix failure to request stddev of non-intrinsics
Before this fix, the code would fail if only standard deviations of
extrinsic parameters are requested. While standard deviations matrix
should be computed if any set of standard deviations is requested. A
variable is added to represent this case.
2018-09-19 12:27:07 +08:00
Andrew Mroczkowski b6d5565df1 build: fix Xcode 10 build problems
Updating the base SDK from 6.0 to 8.0 where applicable
2018-09-18 15:42:03 -04:00
Alexander Alekhin 53ad291ef1 Merge pull request #12572 from alalek:ffmpeg_update_master 2018-09-18 16:12:10 +00:00
Alexander Alekhin 145d3ba99d Merge pull request #12574 from alalek:fixes_master 2018-09-18 11:16:24 +00:00
Alexander Alekhin e6171d17f8 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-09-18 12:49:52 +03:00
Alexander Alekhin aa1c86f95e ts: flush stdout/stderr before and after test code run 2018-09-18 08:04:52 +00:00
Alexander Alekhin 699565828d videoio(test): dump file size information 2018-09-18 08:04:51 +00:00
Alexander Alekhin 38de2a8754 calib3d: fix build warnings 2018-09-17 22:16:31 +00:00
Alexander Alekhin 8b661cde15 ffmpeg: update 4.0 (master)
- ffmpeg 4.0.2
- openh264 1.8.0
2018-09-17 21:36:52 +00:00
Gaetano Checinski e628fd7bce Merge pull request #12503 from nikhedonia:12500-move-gcgraph
* feat: move gcgraph to detail

* chore: puts gcgraph cv::detail namespace
2018-09-17 20:13:47 +03:00
Alexander Alekhin 808ba552c5 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-09-14 23:44:35 +00:00
Alexander Duda a024593fa6 Merge pull request #12147 from D-Alex:master
* add new chessboard detector

The chessboar detector is based on the paper.
Accurate Detection and Localization of Checkerboard Corners for
Calibration Alexander Duda, Udo Frese
British Machine Vision Conference, o.A., 2018.

It utilizes point symmetry of checkerboard corners in combination with a
localized Radon transform approximated by box filters to achieve high
performance even on large images. Here, tests have shown that the
ability to localize checkerboard corners is close to the theoretical
limit of 1/100 of a pixel while being considerably less sensitive
to image noise than standard methods.

* chessboard: add reference to bibtex file

* chessboard: add dependency to opencv_flann

* fix: test chesscorners. It is valid to return an empty list

In case no chessboard was detected it should be valid for the detector
to return an empty list.

For simplifcation, it should be allowed to return any number of corners
if they are flagged as not found.

* fix: opencv.bib remove empty lines

* fix: doc findChessboardCorners replace cvSize with cv::Size

* chessboard tests: factor out logic selecting detector

* chessboard: add unit test for findChessboardCorners2

This is includes a new chessboard generator which supports subpix
corners with high accuracy by wrapping an optimal chessboard using
wrapPerspective.

* fix: chessboard unit test - overwrite of default parameter flag of findCirclesGrid

* chessboard: remove trailing whitespace

* chessboard: fix debug drawing

* chessboard: fix some issues during code review

* chessboard: normalize asymmetric chessboard

* chessboard: fix float double warning

* remove trailing whitespace

* chessboards: fix compiler warnings

* chessboards: fix compiler warnings

* checkerboard: some performance improvements

* chessboard: remove NULL macros for language bindinges from internal headers

* chessboard: shorten license terms

* chessboard: remove unused internal method

* chessboard: set helper functions to static

* chessboard: fix normalizePoints1D using unshifted points

* chessboard: remove wrongly copied text

* chessboard: use CV_CheckTypeEQ macro

* chessboard: comment all NaN checks

* chessboard: use consistent color conversion

* chessboard: use CheckChannelEQ macro

* chessboard: assume gray color image for internal methods

* chessboard: use std::swap

* chessboard: use Mat.dataend

* chessboard: fix compiler warnings

* chessboard: replace some checks witch CV_CHECK macro

* chessboard: fix comparison function for partial sort

* chessboard: small cleanup

* chessboard: use short license header

* chessboard: rename findChessboard2 to findChessboardSB

* chessboard: fix type in unit test
2018-09-13 15:43:04 +03:00
Alexander Alekhin 87b5737293 Merge pull request #12509 from alalek:fix_cv_ptr_default_deleter 2018-09-12 18:45:01 +00:00
Alexander Alekhin b80c978f5d core: change cv::Ptr DefaultDeleter 2018-09-12 12:20:15 +00:00
Hamdi Sahloul 10ae0c4364 Merge pull request #12486 from cv3d:fix_cpp11
Support MSVC 2013 (#12486)

* Added CV_CONSTEXPR macro

* Utilize CV_NOEXCEPT and CV_CONSTEXPR

* Provides some Ptr<> logical operators
2018-09-11 22:35:03 +03:00
Alexander Alekhin cb3ae1232b Merge pull request #12478 from alalek:fix_python_converters 2018-09-11 19:33:11 +00:00
Alexander Alekhin e73e393c82 Merge pull request #12477 from alalek:drop_legacy_headers 2018-09-11 19:31:16 +00:00
Vadim Pisarevsky b01f63835e Merge pull request #12467 from alalek:core_use_shared_ptr 2018-09-10 13:59:14 +00:00
Vadim Pisarevsky 6d7f5871db added basic support for CV_16F (the new datatype etc.) (#12463)
* added basic support for CV_16F (the new datatype etc.). CV_USRTYPE1 is now equal to CV_16F, which may break some [rarely used] functionality. We'll see

* fixed just introduced bug in norm; reverted errorneous changes in Torch importer (need to find a better solution)

* addressed some issues found during the PR review

* restored the patch to fix some perf test failures
2018-09-10 16:56:29 +03:00
Alexander Alekhin 89720ae24d python: fix "unsigned int" / "size_t" overloading conflict 2018-09-10 11:24:47 +00:00
Alexander Alekhin 9097ccf515 drop legacy headers 2018-09-10 08:33:16 +00:00
Alexander Alekhin dca657a2fd Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-09-10 00:10:21 +03:00
Alexander Alekhin df8b057b44 avoid Ptr<> == NULL checks 2018-09-09 19:30:46 +00:00
Alexander Alekhin 64b3c1e691 core(test): update cv::Ptr tests 2018-09-09 19:30:46 +00:00
Alexander Alekhin 15aee09c7f core: replace cv::Ptr implementation => std::shared_ptr 2018-09-09 19:30:46 +00:00
Sergey Nuzhny 80610ca054 Merge pull request #12449 from Nuzhny007:master
* Fixed compilation error WITH_OPENMP under Windows

* Move up OpenMP condition
2018-09-08 23:20:14 +03:00
Alexander Alekhin fd0df5a89b Merge pull request #12469 from cv3d:fix/js/python3_msvc 2018-09-08 11:42:11 +00:00
Hamdi Sahloul b487e2df0b opencv_js: Support Python3 and MSVC 2018-09-08 18:23:41 +09:00
Hamdi Sahloul c6ed2bf9aa opencv_js: fix a bug in handling enums using the new parser 2018-09-08 18:23:41 +09:00
Alexander Alekhin 40b1dc12de Merge pull request #12464 from alalek:fix_contrib_1754 2018-09-07 20:03:41 +00:00
Alexander Alekhin 8eba3c1e7e Merge pull request #12462 from alalek:issue_12453 2018-09-07 16:55:01 +00:00
Alexander Alekhin b50c70bbfa features2d(test): extract common extract/invariance test code
to share with opencv_contrib/xfeatures2d
2018-09-07 19:30:51 +03:00
Alexander Alekhin af021e79d9 video(perf): drop unreliable sanity checks 2018-09-07 18:09:00 +03:00
Alexander Alekhin 73bfe68821 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-09-07 12:40:27 +03:00
Alexander Alekhin 4a73b4859f Merge pull request #12452 from seiko2plus:issue12427 2018-09-07 07:32:15 +00:00
Sayed Adel f5d181db3a python:ppc64 Add missing support for PyLongObject 2018-09-06 20:04:05 +00:00
Rostislav Vasilikhin da7e1cfb49 Merge pull request #12279 from savuor:cvtcolor_bgr2gray_8u_15bits
* bgr2gray 8u fixed to be in conformance with IPP code

* coefficients fixed so their sum is 32768

* java test for CascadeDetect fixed: equalizeHist added
2018-09-06 13:28:24 +03:00
Alexander Alekhin 43b64140ae Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-09-05 19:54:09 +03:00
Alexander Alekhin d74b98c3d9 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-09-04 18:39:03 +00:00
Alexander Alekhin e0bfe44cac Merge pull request #12400 from alalek:dnn_update_inline_namespace_master 2018-09-04 15:17:15 +00:00
cyy 10fb88d027 Merge pull request #12391 from DEEPIR:master
fix some errors found by static analyzer. (#12391)

* fix possible divided by zero and by negative values

* only 4 elements are used in these arrays

* fix uninitialized member

* use boolean type for semantic boolean variables

* avoid invalid array index

* to avoid exception and because base64_beg is only used in this block

* use std::atomic<bool> to avoid thread control race condition
2018-09-04 16:39:19 +03:00
Alexander Alekhin f826709452 Merge pull request #12303 from cv3d:improvements/binding_python 2018-09-03 20:57:11 +00:00
Alexander Alekhin f10fd64630 dnn: update "guard" inline namespace
- differ from 3.4 branch
2018-09-03 20:46:57 +00:00
cyy 09837928d9 Merge pull request #12357 from DEEPIR:master
* fix some static analyzer warnings

* fix some static analyzer warnings

* fix race condition of workthread control
2018-09-02 16:34:43 +03:00
Alexander Alekhin dce4e94f02 Merge pull request #12372 from cv3d:fix/python_phantom 2018-09-02 04:17:34 +00:00
Hamdi Sahloul ee6415bd1c Improves a UMat unit test 2018-09-02 00:34:35 +09:00
Hamdi Sahloul 78835ad87a Support enum arguments for Java binding 2018-09-01 15:04:55 +09:00
Hamdi Sahloul 4e6be21a44 Support enum arguments for Python binding 2018-09-01 15:04:55 +09:00
Hamdi Sahloul f89e4e7dd0 Support parsing C++11 enum struct and enum class 2018-09-01 15:04:54 +09:00
Alexander Alekhin dfa8467a08 Merge pull request #12180 from cv3d:cleanup/python_umat 2018-08-31 20:25:30 +00:00
Hamdi Sahloul 669ee0415a Rewrite the UMat Python wrapper 2018-09-01 01:36:10 +09:00
Peter Leitzen 367668710c Use secure URLs in README (#12160)
Saves a redirect from HTTP -> HTTPS each.

[ci skip]
2018-08-31 17:09:40 +03:00
Alexander Alekhin 94dea84915 Merge pull request #12361 from alalek:fix_12359 2018-08-31 13:27:56 +00:00
Jakub Golinowski 9f1218b00b Merge pull request #11897 from Jakub-Golinowski:hpx_backend
* Add HPX backend for OpenCV implementation
Adds hpx backend for cv::parallel_for_() calls respecting the nstripes chunking parameter. C++ code for the backend is added to modules/core/parallel.cpp. Also, the necessary changes to cmake files are introduced.
Backend can operate in 2 versions (selectable by cmake build option WITH_HPX_STARTSTOP): hpx (runtime always on) and hpx_startstop (start and stop the backend for each cv::parallel_for_() call)

* WIP: Conditionally include hpx_main.hpp to tests in core module
Header hpx_main.hpp is included to both core/perf/perf_main.cpp and core/test/test_main.cpp.
The changes to cmake files for linking hpx library to above mentioned test executalbles are proposed but have issues.

* Add coditional iclusion of hpx_main.hpp to cpp cpu modules

* Remove start/stop version of hpx backend
2018-08-31 16:23:26 +03:00
Alexander Alekhin fcfa488250 build: fix js build (make video->calib3d dependency optional)
- estimateRigidTransform() is excluded from JS bindings
2018-08-31 14:29:25 +03:00
Hamdi Sahloul 2bbe31a8f6 Support non-static phantom methods for binding generator 2018-08-31 05:44:50 +09:00
Hamdi Sahloul 7cdb0eafeb Enable the binding generator to parse shadow files 2018-08-31 05:44:02 +09:00
Alexander Alekhin 90f47eb952 Merge pull request #12234 from cv3d:python/cuda/wrapping_functionalities 2018-08-30 20:23:38 +00:00
Alexander Alekhin 15e57d28f5 Merge pull request #12293 from alalek:cleanup_stl_string_replacement 2018-08-30 15:43:57 +00:00
Hamdi Sahloul 532eace7d6 Extensive wrapping of CUDA functionalities for Python 2018-08-30 22:50:33 +09:00
Hamdi Sahloul d4ac4fcde1 Python binding: METH_STATIC instead of METH_CLASS for static functions 2018-08-30 22:50:33 +09:00
Alexander Alekhin c1db75e0c7 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-08-29 16:24:56 +03:00
Alexander Alekhin acfdd0e1fc core: fix MSVS "unreachable code" warnings 2018-08-27 16:23:25 +03:00
Alexander Alekhin 9fb8f6347f core: don't call std::string(NULL) 2018-08-27 16:23:25 +03:00
Alexander Alekhin 7f73b105ca core: std::string more changes 2018-08-27 15:41:01 +03:00
Vladislav Sovrasov ae8dcdf40d core: get rid of built-in String type 2018-08-27 14:42:18 +03:00
Alexander Alekhin ee1e1ce377 Merge pull request #12313 from sturkmen72:patch-1 2018-08-27 11:10:45 +00:00
Suleyman TURKMEN 6d165dae5e related moved enums 2018-08-27 00:43:04 +03:00
Alexander Alekhin 335e61dc47 Merge pull request #12269 from cv3d:improvements/binding_python 2018-08-24 19:38:12 +00:00
Hamdi Sahloul 64380baa85 Documentation for the new bindings-generator features 2018-08-25 01:58:42 +09:00
Hamdi Sahloul b5eb65e53e Improve Python binding generator with mappable types and phantom headers 2018-08-25 01:58:42 +09:00
Hamdi Sahloul f1ca05c822 Extend python exception cv.error
to provide `file`, `func`, `line`, `code`, `msg`, and `err` attributes
2018-08-25 01:58:42 +09:00
Hamdi Sahloul 900df21b7d Support enum-type detection for binding generator 2018-08-25 01:58:42 +09:00
Hamdi Sahloul 93bad514a8 Easy binding for python code generator 2018-08-25 01:58:42 +09:00
Suleyman TURKMEN d8cd1d8fcc Merge pull request #12246 from sturkmen72:move_enums
* Update core.hpp

* Update imgproc.hpp

* Update ImgprocTest.java

* Update CameraCalibrator.java

* Update OnCameraFrameRender.java

* Update FindContoursDemo.java

* Update IntroductionToSVMDemo.java

* Update NonLinearSVMsDemo.java

* Update IntroductionToPCADemo.java

* Update Smoothing.java

* Update MainActivity.java

* Update CalcBackProjectDemo1.java

* Update CornerSubPixDemo.java

* Update CornerDetectorDemo.java

* Update GoodFeaturesToTrackDemo.java
2018-08-24 11:11:34 +03:00
Alexander Alekhin 6356403964 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-08-22 17:38:51 +03:00
Alexander Alekhin e8a14a775e Merge pull request #12268 from cv3d:fix/cuda/meanShiftSegmentation 2018-08-22 09:49:36 +00:00
Hamdi Sahloul 7b90a1e85a Closes #6349 - a bug in cuda::meanShiftSegmentation 2018-08-22 02:08:10 +09:00
Jiri Horner 49283ec035 Merge pull request #12248 from hrnr:video_remove_ransac
* video: remove duplicate RANSAC code

* remove RANSAC code video module. The module now uses RANSAC estimators from calib3d.
* deprecate estimateRigidTransform

* replace internal usage of deprecated estimateRigidTransform

* remove from wrappers
* replace usage in shape module. shape module now links to calib3d instead of video module.
* reprecate also C API version

* remove cvEstimateRigidTransform

* supress deprecated warnings in estimateRigidTransform test

* the function is now deprecated
2018-08-21 17:08:27 +03:00
Alexander Alekhin 7d4bb9428b Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-08-20 19:30:18 +03:00
pasbi 76eb389761 Merge pull request #12240 from pasbi:pfm_fix
* fixed 64-float pfm auto conversion

* removed trailing whitespace
2018-08-17 18:53:09 +03:00
Alexander Alekhin e9a1ccb89a Merge pull request #12232 from cv3d:bugfix/cudafeatures2d/python_wrapper 2018-08-17 15:26:09 +00:00
Hamdi Sahloul db262fa76a Avoid multi-inheritance in the cuda::features2d classes 2018-08-17 17:32:51 +09:00
Alexander Alekhin 4e59d6fd12 Merge pull request #12224 from cv3d:improvments/CUDA_detection 2018-08-16 09:51:13 +00:00
Hamdi Sahloul e136c11c7c Avoid detecting dublicate CUDA archs 2018-08-16 17:40:09 +09:00
Hamdi Sahloul 0e80f56e44 Bugfix: Detect CUDA archs for Windows 2018-08-16 17:10:08 +09:00
Alexander Alekhin 94758c18de Merge pull request #12156 from cv3d:master 2018-08-14 14:29:17 +00:00
Alexander Alekhin e76b375a31 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-08-13 18:57:57 +03:00
pasbi 9f5f64e14e Merge pull request #12192 from pasbi:pfm
* created new decoder and encoder for PFM

pfm file format stores binary RGB or grayscale float images.

* added test for pfm codec

* replaced large with short licence header

* little/big-endian-check is now compile time

* fixed width/height confusion, improved big/little endian recognition, fixed scaling issue and Improved signature check

* adapted tests to handle float images well

* removed data-dependency: lena.pfm

the lena image is now loaded is pam and converted to pfm.

* fixed bug in endianess detection macro

* Added endianess detection for android and win

* removed fancy endianess detection

endianess detection will be implemented in cmake scripts soonish.

* fixed minor warnings

* fixed stupid elif defined bug

* silenced some implicit cast warnings

* replaced std::to_string with std::stringstream solution

std::to_string variant did not build on android.

* replaced new endianess macros with existing ones

* improved readability
2018-08-13 13:14:12 +03:00
Alexander Alekhin 4eb2966559 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-08-07 20:12:10 +03:00
Hamdi Sahloul 293facbae7 Support Python binding for CUDA functionalities 2018-08-07 15:48:12 +09:00
CYTing1998 053259fd92 Merge pull request #12093 from CYTing1998:update_issue
* I have updated the requirements of reporting issues inside ISSUE_TEMPLATE.md
2018-08-03 20:08:30 +03:00
CJ Smith da41ac9e60 Merge pull request #12106 from CJSmith-0141:warpPerspective_typofix
* Fixes typo in function name hal::warpPerspective.

* Fixes remaining typos in word Perspective (was Perspectve).
2018-08-01 14:41:20 +03:00
Alexander Alekhin 82c477c9f7 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-07-31 21:35:00 +03:00
Alexander Alekhin 57bead3a5e Merge pull request #12002 from alalek:imgproc_getPerspectiveTransform_solveMethod_param 2018-07-30 16:43:23 +00:00
Alexander Alekhin d044ac1c66 imgproc(getPerspectiveTransform): add solveMethod parameter
drop compatibility workaround via runtime parameter
2018-07-26 18:22:59 +03:00
Alexander Alekhin 9787ab598b Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-07-24 22:48:54 +03:00
Alexander Alekhin 7e9b5d9e30 Merge pull request #12006 from mshabunin:static-debug-assert 2018-07-19 09:36:36 +00:00
Alexander Alekhin 3d141280aa Merge pull request #12000 from tomoaki0705:fixVS2013noexcept 2018-07-18 11:43:23 +00:00
Tomoaki Teshima 9df7517dea fix build error on Visual Studio 2013 and earlier 2018-07-18 12:56:02 +03:00
Alexander Alekhin 4560909a5e Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-07-17 19:27:48 +03:00
Pavel Rojtberg 3f65924c45 core: FileStorage - add support for writing vector<String> with bindings (#11883)
* core: FileStorage - add support for writing vector<String> with bindings

* python: extend persistence test for string sequences
2018-07-17 13:38:48 +03:00
Alexander Alekhin 5e31c82b5b Merge pull request #11980 from berak:core_lda_dataAsRow 2018-07-15 14:32:15 +00:00
berak 4382bdc859 core: remove unused dataAsRow flag from LDA 2018-07-15 11:32:00 +02:00
Alexander Alekhin fa66c6b797 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-07-11 12:35:10 +03:00
Alexander Alekhin 2da96be217 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-07-09 19:44:51 +03:00
Arnaud Brejeon 43f821afb9 Merge pull request #11899 from arnaudbrejeon:moveable_types
Add missing constructors and operator= (#11899)
2018-07-06 23:36:08 +03:00
Alexander Alekhin 3165baa1f1 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-07-02 14:58:29 +03:00
Vadim Pisarevsky 9a8a964b69 Merge pull request #11847 from floe:gray8 2018-06-27 14:25:48 +00:00
Florian Echtler 17888ce0fd add support for 8-bit greyscale format 2018-06-27 15:31:53 +02:00
Vadim Pisarevsky 051b40f956 a part of PR #11364 (extended findNonZero & PSNR) (#11837)
* a part of https://github.com/opencv/opencv/pull/11364 by Tetragramm. Rewritten and extended findNonZero & PSNR to support more types, not just 8u.

* fixed compile & doxygen warnings

* fixed small bug in findNonZero test
2018-06-26 17:10:00 +03:00
Alessandro de Oliveira Faria (A.K.A.CABELO) cc8db99695 Include ELA example (#11819)
* Include ELA example

* Include ELA example

* Include ELA example

* Include ELA example

* Include ELA example

* Include ELA example

* Include ELA example

* Include ELA example

* Include ELA example

* Include ELA example

* Include ELA example

* did some code cleanup

* fixed compile error
2018-06-26 12:10:52 +03:00
Alexander Alekhin b39cd06249 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-06-25 22:03:17 +03:00
Vadim Pisarevsky 46def2fdc1 Merge pull request #11757 from freiling:master 2018-06-25 12:53:07 +00:00
Alexander Alekhin 2195f0cc62 Merge pull request #11795 from paroj:realsensev2 2018-06-23 18:50:43 +00:00
Alexander Alekhin 387e92353c Merge pull request #11772 from PhilLab:patch-5 2018-06-21 11:57:24 +00:00
Pavel Rojtberg 2047abd9c3 videoio: realsense - add cvtColor as the pixel-format is only a hint 2018-06-19 17:55:09 +02:00
Alexander Alekhin 64f2b1b250 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-06-17 16:26:48 +03:00
Philipp Hasper 577546ccd9 Added Size_::aspectRatio 2018-06-15 14:59:54 +02:00
Forrest Reiling e858c21e1f Fix system.cpp includes on Fuchsia. 2018-06-13 12:14:53 -07:00
Alexander Alekhin 0d6518aaa0 Merge remote-tracking branch 'upstream/3.4' into merge-3.4
OpenCV FFmpeg wrapper download links are preserved from ffmpeg/master branch
2018-06-13 19:34:44 +03:00
Alexander Alekhin d1a598c652 Merge pull request #11730 from paroj:realsensev2 2018-06-08 19:06:11 +00:00
Pavel Rojtberg bfc227b8d4 videoio: update librealsense to API 2.0
this enables the usage of current sensors, while dropping support for
legacy devices, see:
https://github.com/IntelRealSense/librealsense#overview

Given limited resources, and that the legacy sensors where not that
great, I think we should focus on v2.
2018-06-08 18:23:00 +02:00
Alexander Alekhin 45dd575ed2 Merge remote-tracking branch 'upstream/3.4' into merge-3.4
Revert "documentation: avoid links to 'master' branch from 3.4 maintenance branch"
This reverts commit 9ba9358ecb.

Revert "documentation: avoid links to 'master' branch from 3.4 maintenance branch (2)"
This reverts commit f185802489.
2018-06-04 19:26:10 +03:00
Vadim Pisarevsky 80709697e5 Merge pull request #11643 from savuor:fix/viz_const 2018-06-04 10:20:19 +00:00
Alexander Alekhin 1b53a4fccc Merge pull request #11669 from csukuangfj:fix-11668 2018-06-02 20:48:46 +00:00
Fangjun Kuang 4bb220bb90 fix #11668. 2018-06-02 16:17:32 +08:00
Rostislav Vasilikhin e1b3cf5c14 Viz3d::getViewerPose() made const 2018-06-01 15:53:05 +03:00
Alexander Alekhin 0f298a4203 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-05-28 11:22:55 +00:00
Alexander Alekhin 5e68f35500 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-05-22 19:02:01 +03:00
Alexander Alekhin ba1bd64bf9 Merge pull request #11532 from paroj:realsense 2018-05-21 15:59:46 +00:00
Alexander Alekhin db88cd1b25 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-05-21 16:20:14 +03:00
Pavel Rojtberg 936d2963a2 videoio: add rudimentary librealsense 1.x support
it is reusing CAP_INTELPERC* enums as Intel PerC is deprecated and
librealsense replaces it.
2018-05-17 11:56:52 +02:00
Alexander Alekhin 4378b4d03d Merge pull request #11516 from berak:java_features2d 2018-05-16 15:40:51 +00:00
berak 6ddef3b7a9 features2d: remove deprecated java wrappers 2018-05-16 16:13:18 +02:00
Alexander Alekhin 68c92908d5 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-05-14 15:17:35 +03:00
Alexander Alekhin 51e543050c Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-05-10 18:19:56 +03:00
Alexander Alekhin 000a13b6a3 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-05-03 14:30:38 +00:00
Alexander Alekhin 84b3b5b4a4 Merge pull request #11392 from alalek:master_drop_errorNoReturn 2018-04-25 19:42:57 +00:00
Alexander Alekhin 4e83f4c579 core: drop cv::errorNoReturn()
replaced to cv::error()
2018-04-25 15:07:18 +03:00
Alexander Alekhin cd2b188c9a Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-04-24 18:13:06 +03:00
Alexander Alekhin 1e0a60be2a Merge pull request #11384 from berak:ml_virtual 2018-04-24 12:23:17 +00:00
berak fc5bba66af ml: refactor non-virtual methods 2018-04-24 13:23:27 +02:00
Alexander Alekhin 4d7d630e92 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-04-23 18:45:02 +03:00
Alexander Alekhin 4b2d1aaeea Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2018-04-16 12:41:47 +03:00
Alexander Alekhin 7e5581cd86 Merge pull request #11286 from sturkmen72:update_rectangle 2018-04-13 13:38:50 +00:00
Suleyman TURKMEN 8b6a6d4546 Update the function rectangle 2018-04-12 14:55:04 +03:00
Alexander Alekhin 7ae83df8aa Merge pull request #11292 from tomoaki0705:fixCUDABuild40 2018-04-11 13:41:25 +00:00
Tomoaki Teshima 779a42678d fix CUDA build crash
* add --std=c++11 flag to nvcc definition
  * remove not used abs functions
2018-04-11 17:19:09 +09:00
Alexander Alekhin 10ba6a93a6 Merge pull request #11256 from alalek:prepare_next 2018-04-10 18:46:12 +00:00
Alexander Alekhin c917be2189 next(core): use C++11 classes for cv::Mutex/cv::AutoLock 2018-04-10 18:09:54 +03:00
Alexander Alekhin c6aa97c9aa next(android): java3 -> java4 2018-04-10 18:09:54 +03:00
Alexander Alekhin 250941bd47 next: drop WITH_CSTRIPES 2018-04-10 18:09:54 +03:00
Alexander Alekhin 5b17a60dde next: drop HAVE_TEGRA_OPTIMIZATION/TADP 2018-04-10 18:09:54 +03:00
Alexander Alekhin b07f772f36 android: enable C++11 in test sample 2018-04-10 18:09:54 +03:00
Alexander Alekhin d4688e6474 cmake: require C++11 and CMake 3.5.1+ 2018-04-10 18:09:54 +03:00
Vladislav Sovrasov e7e29cb63c cmake: add compilation test for VTK 2018-04-10 18:09:54 +03:00
Alexander Alekhin ca922443db next(calib3d): eliminate CirclesGridFinderParameters2 2018-04-10 18:09:54 +03:00
Alexander Alekhin 2385a5870e next(ml): eliminate dummy interface class ANN_MLP_ANNEAL 2018-04-10 18:09:54 +03:00
Alexander Alekhin e567135ed3 next: force C++11 features unconditionally: CV_CXX_MOVE_SEMANTICS/CV_CXX_STD_ARRAY 2018-04-10 18:09:54 +03:00
Alexander Alekhin 98c8584b88 next: drop CV_CXX11 conditions
define itself is still here for compatibility
2018-04-10 18:09:54 +03:00
Alexander Alekhin 2b2fa58f97 next: drop DISABLE_OPENCV_24_COMPATIBILITY 2018-04-10 18:09:53 +03:00
Alexander Alekhin 2d54fed3cc next: OPENCV_ABI_COMPATIBILITY
drop change:
    template<typename _Tp2> operator Vec<_Tp2, 3>() const;
because it break builds due ambiguous errors
2018-04-10 18:09:53 +03:00
Alexander Alekhin 964a4d75b4 next: version.hpp 2018-04-10 18:09:53 +03:00
1798 changed files with 103311 additions and 198922 deletions
+9 -1
View File
@@ -2,6 +2,14 @@
If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses.
If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute).
Please:
* Read the documentation to test with the latest developer build.
* Check if other person has already created the same issue to avoid duplicates. You can comment on it if there already is an issue.
* Try to be as detailed as possible in your report.
* Report only one problem per created issue.
This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library.
-->
@@ -27,4 +35,4 @@ This is a template helping you to create an issue which can be processed as quic
// C++ code example
```
or attach as .txt or .zip file
-->
-->
+2
View File
@@ -12,6 +12,8 @@ elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64.*|AARCH64.*")
set(AARCH64 TRUE)
endif()
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wunused-function)
set(TEGRA_COMPILER_FLAGS "")
if(CV_GCC OR CV_CLANG)
+4 -4
View File
@@ -49,12 +49,12 @@ namespace {
enum
{
SHIFT = 14,
SHIFT = 15,
SHIFT_DELTA = 1 << (SHIFT - 1),
R2Y_BT601 = 4899,
G2Y_BT601 = 9617,
B2Y_BT601 = 1868,
R2Y_BT601 = 9798,
G2Y_BT601 = 19235,
B2Y_BT601 = 3735,
R2Y_BT709 = 3483,
G2Y_BT709 = 11718,
+22 -36
View File
@@ -151,6 +151,10 @@ void div(const Size2D &size,
typedef typename internal::VecTraits<T>::vec128 vec128;
typedef typename internal::VecTraits<T>::vec64 vec64;
#if defined(__GNUC__) && (defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L)
static_assert(std::numeric_limits<T>::is_integer, "template implementation is for integer types only");
#endif
if (scale == 0.0f ||
(std::numeric_limits<T>::is_integer &&
(scale * std::numeric_limits<T>::max()) < 1.0f &&
@@ -311,6 +315,10 @@ void recip(const Size2D &size,
typedef typename internal::VecTraits<T>::vec128 vec128;
typedef typename internal::VecTraits<T>::vec64 vec64;
#if defined(__GNUC__) && (defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L)
static_assert(std::numeric_limits<T>::is_integer, "template implementation is for integer types only");
#endif
if (scale == 0.0f ||
(std::numeric_limits<T>::is_integer &&
scale < 1.0f &&
@@ -463,8 +471,6 @@ void div(const Size2D &size,
return;
}
float32x4_t v_zero = vdupq_n_f32(0.0f);
size_t roiw128 = size.width >= 3 ? size.width - 3 : 0;
size_t roiw64 = size.width >= 1 ? size.width - 1 : 0;
@@ -485,9 +491,7 @@ void div(const Size2D &size,
float32x4_t v_src0 = vld1q_f32(src0 + j);
float32x4_t v_src1 = vld1q_f32(src1 + j);
uint32x4_t v_mask = vceqq_f32(v_src1,v_zero);
vst1q_f32(dst + j, vreinterpretq_f32_u32(vbicq_u32(
vreinterpretq_u32_f32(vmulq_f32(v_src0, internal::vrecpq_f32(v_src1))), v_mask)));
vst1q_f32(dst + j, vmulq_f32(v_src0, internal::vrecpq_f32(v_src1)));
}
for (; j < roiw64; j += 2)
@@ -495,14 +499,12 @@ void div(const Size2D &size,
float32x2_t v_src0 = vld1_f32(src0 + j);
float32x2_t v_src1 = vld1_f32(src1 + j);
uint32x2_t v_mask = vceq_f32(v_src1,vget_low_f32(v_zero));
vst1_f32(dst + j, vreinterpret_f32_u32(vbic_u32(
vreinterpret_u32_f32(vmul_f32(v_src0, internal::vrecp_f32(v_src1))), v_mask)));
vst1_f32(dst + j, vmul_f32(v_src0, internal::vrecp_f32(v_src1)));
}
for (; j < size.width; j++)
{
dst[j] = src1[j] ? src0[j] / src1[j] : 0.0f;
dst[j] = src0[j] / src1[j];
}
}
}
@@ -523,10 +525,8 @@ void div(const Size2D &size,
float32x4_t v_src0 = vld1q_f32(src0 + j);
float32x4_t v_src1 = vld1q_f32(src1 + j);
uint32x4_t v_mask = vceqq_f32(v_src1,v_zero);
vst1q_f32(dst + j, vreinterpretq_f32_u32(vbicq_u32(
vreinterpretq_u32_f32(vmulq_f32(vmulq_n_f32(v_src0, scale),
internal::vrecpq_f32(v_src1))), v_mask)));
vst1q_f32(dst + j, vmulq_f32(vmulq_n_f32(v_src0, scale),
internal::vrecpq_f32(v_src1)));
}
for (; j < roiw64; j += 2)
@@ -534,15 +534,13 @@ void div(const Size2D &size,
float32x2_t v_src0 = vld1_f32(src0 + j);
float32x2_t v_src1 = vld1_f32(src1 + j);
uint32x2_t v_mask = vceq_f32(v_src1,vget_low_f32(v_zero));
vst1_f32(dst + j, vreinterpret_f32_u32(vbic_u32(
vreinterpret_u32_f32(vmul_f32(vmul_n_f32(v_src0, scale),
internal::vrecp_f32(v_src1))), v_mask)));
vst1_f32(dst + j, vmul_f32(vmul_n_f32(v_src0, scale),
internal::vrecp_f32(v_src1)));
}
for (; j < size.width; j++)
{
dst[j] = src1[j] ? src0[j] * scale / src1[j] : 0.0f;
dst[j] = src0[j] * scale / src1[j];
}
}
}
@@ -620,8 +618,6 @@ void reciprocal(const Size2D &size,
return;
}
float32x4_t v_zero = vdupq_n_f32(0.0f);
size_t roiw128 = size.width >= 3 ? size.width - 3 : 0;
size_t roiw64 = size.width >= 1 ? size.width - 1 : 0;
@@ -639,23 +635,19 @@ void reciprocal(const Size2D &size,
float32x4_t v_src1 = vld1q_f32(src1 + j);
uint32x4_t v_mask = vceqq_f32(v_src1,v_zero);
vst1q_f32(dst + j, vreinterpretq_f32_u32(vbicq_u32(
vreinterpretq_u32_f32(internal::vrecpq_f32(v_src1)), v_mask)));
vst1q_f32(dst + j, internal::vrecpq_f32(v_src1));
}
for (; j < roiw64; j += 2)
{
float32x2_t v_src1 = vld1_f32(src1 + j);
uint32x2_t v_mask = vceq_f32(v_src1,vget_low_f32(v_zero));
vst1_f32(dst + j, vreinterpret_f32_u32(vbic_u32(
vreinterpret_u32_f32(internal::vrecp_f32(v_src1)), v_mask)));
vst1_f32(dst + j, internal::vrecp_f32(v_src1));
}
for (; j < size.width; j++)
{
dst[j] = src1[j] ? 1.0f / src1[j] : 0;
dst[j] = 1.0f / src1[j];
}
}
}
@@ -673,25 +665,19 @@ void reciprocal(const Size2D &size,
float32x4_t v_src1 = vld1q_f32(src1 + j);
uint32x4_t v_mask = vceqq_f32(v_src1,v_zero);
vst1q_f32(dst + j, vreinterpretq_f32_u32(vbicq_u32(
vreinterpretq_u32_f32(vmulq_n_f32(internal::vrecpq_f32(v_src1),
scale)),v_mask)));
vst1q_f32(dst + j, vmulq_n_f32(internal::vrecpq_f32(v_src1), scale));
}
for (; j < roiw64; j += 2)
{
float32x2_t v_src1 = vld1_f32(src1 + j);
uint32x2_t v_mask = vceq_f32(v_src1,vget_low_f32(v_zero));
vst1_f32(dst + j, vreinterpret_f32_u32(vbic_u32(
vreinterpret_u32_f32(vmul_n_f32(internal::vrecp_f32(v_src1),
scale)), v_mask)));
vst1_f32(dst + j, vmul_n_f32(internal::vrecp_f32(v_src1), scale));
}
for (; j < size.width; j++)
{
dst[j] = src1[j] ? scale / src1[j] : 0;
dst[j] = scale / src1[j];
}
}
}
+1
View File
@@ -30,6 +30,7 @@
#include <sys/cdefs.h>
#include <stdint.h>
#include <string.h>
__BEGIN_DECLS
+2 -2
View File
@@ -1,6 +1,6 @@
$url = "https://raw.githubusercontent.com/opencv/opencv_3rdparty/@FFMPEG_BINARIES_COMMIT@/ffmpeg/opencv_ffmpeg_64.dll"
$url = "https://raw.githubusercontent.com/opencv/opencv_3rdparty/@FFMPEG_BINARIES_COMMIT@/ffmpeg/opencv_videoio_ffmpeg_64.dll"
$expected_md5 = "@FFMPEG_FILE_HASH_BIN64@"
$output = "$PSScriptRoot\@OPENCV_BIN_INSTALL_PATH@\opencv_ffmpeg@OPENCV_DLLVERSION@_64.dll"
$output = "$PSScriptRoot\@OPENCV_BIN_INSTALL_PATH@\opencv_videoio_ffmpeg@OPENCV_DLLVERSION@_64.dll"
Write-Output ("=" * 120)
try {
+8 -8
View File
@@ -1,16 +1,16 @@
# Binaries branch name: ffmpeg/3.4_20190612
# Binaries were created for OpenCV: 1c661e754812d3423e8c15ccb9cdab57fc122c44
ocv_update(FFMPEG_BINARIES_COMMIT "d284fd09e76966e95f08e1ac3a1a28b227447501")
ocv_update(FFMPEG_FILE_HASH_BIN32 "a7032bf6cc1cb010dc055f352277792c")
ocv_update(FFMPEG_FILE_HASH_BIN64 "40d1a38b83a0413a3fcf9df1044fff2a")
ocv_update(FFMPEG_FILE_HASH_CMAKE "3b90f67f4b429e77d3da36698cef700c")
# Binaries branch name: ffmpeg/master_20190616
# Binaries were created for OpenCV: 7b099e0fe2d929e55d6705b6ad510c2c9081606b
ocv_update(FFMPEG_BINARIES_COMMIT "998718df34e35ea0fa429724875fc3900faa266f")
ocv_update(FFMPEG_FILE_HASH_BIN32 "f03b47fb809edd2e06b6db135cbd3e49")
ocv_update(FFMPEG_FILE_HASH_BIN64 "5c4571459570c288d874704244c428b5")
ocv_update(FFMPEG_FILE_HASH_CMAKE "f710891525a04586d565d0e700e62a9c")
function(download_win_ffmpeg script_var)
set(${script_var} "" PARENT_SCOPE)
set(ids BIN32 BIN64 CMAKE)
set(name_BIN32 "opencv_ffmpeg.dll")
set(name_BIN64 "opencv_ffmpeg_64.dll")
set(name_BIN32 "opencv_videoio_ffmpeg.dll")
set(name_BIN64 "opencv_videoio_ffmpeg_64.dll")
set(name_CMAKE "ffmpeg_version.cmake")
set(FFMPEG_DOWNLOAD_DIR "${OpenCV_BINARY_DIR}/3rdparty/ffmpeg")
+4 -4
View File
@@ -13,10 +13,10 @@
* On Windows OpenCV uses pre-built ffmpeg binaries, built with proper flags (without GPL components) and
wrapped with simple, stable OpenCV-compatible API.
The binaries are opencv_ffmpeg.dll (version for 32-bit Windows) and
opencv_ffmpeg_64.dll (version for 64-bit Windows).
The binaries are opencv_videoio_ffmpeg.dll (version for 32-bit Windows) and
opencv_videoio_ffmpeg_64.dll (version for 64-bit Windows).
The pre-built opencv_ffmpeg*.dll is:
The pre-built opencv_videoio_ffmpeg*.dll is:
* LGPL library, not BSD libraries.
* Loaded at runtime by opencv_videoio module.
If it succeeds, ffmpeg can be used to decode/encode videos;
@@ -30,7 +30,7 @@
Or you can specify location of binary file via OPENH264_LIBRARY environment variable.
If LGPL/GPL software can not be supplied with your OpenCV-based product, simply exclude
opencv_ffmpeg*.dll from your distribution; OpenCV will stay fully functional except for the ability to
opencv_videoio_ffmpeg*.dll from your distribution; OpenCV will stay fully functional except for the ability to
decode/encode videos using FFMPEG (though, it may still be able to do that using other API,
such as Video for Windows, Windows Media Foundation or our self-contained motion jpeg codec).
+92
View File
@@ -0,0 +1,92 @@
//
// File: vk_platform.h
//
/*
** Copyright (c) 2014-2017 The Khronos Group Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
#ifndef VK_PLATFORM_H_
#define VK_PLATFORM_H_
#ifdef __cplusplus
extern "C"
{
#endif // __cplusplus
/*
***************************************************************************************************
* Platform-specific directives and type declarations
***************************************************************************************************
*/
/* Platform-specific calling convention macros.
*
* Platforms should define these so that Vulkan clients call Vulkan commands
* with the same calling conventions that the Vulkan implementation expects.
*
* VKAPI_ATTR - Placed before the return type in function declarations.
* Useful for C++11 and GCC/Clang-style function attribute syntax.
* VKAPI_CALL - Placed after the return type in function declarations.
* Useful for MSVC-style calling convention syntax.
* VKAPI_PTR - Placed between the '(' and '*' in function pointer types.
*
* Function declaration: VKAPI_ATTR void VKAPI_CALL vkCommand(void);
* Function pointer type: typedef void (VKAPI_PTR *PFN_vkCommand)(void);
*/
#if defined(_WIN32)
// On Windows, Vulkan commands use the stdcall convention
#define VKAPI_ATTR
#define VKAPI_CALL __stdcall
#define VKAPI_PTR VKAPI_CALL
#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH < 7
#error "Vulkan isn't supported for the 'armeabi' NDK ABI"
#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7 && defined(__ARM_32BIT_STATE)
// On Android 32-bit ARM targets, Vulkan functions use the "hardfloat"
// calling convention, i.e. float parameters are passed in registers. This
// is true even if the rest of the application passes floats on the stack,
// as it does by default when compiling for the armeabi-v7a NDK ABI.
#define VKAPI_ATTR __attribute__((pcs("aapcs-vfp")))
#define VKAPI_CALL
#define VKAPI_PTR VKAPI_ATTR
#else
// On other platforms, use the default calling convention
#define VKAPI_ATTR
#define VKAPI_CALL
#define VKAPI_PTR
#endif
#include <stddef.h>
#if !defined(VK_NO_STDINT_H)
#if defined(_MSC_VER) && (_MSC_VER < 1600)
typedef signed __int8 int8_t;
typedef unsigned __int8 uint8_t;
typedef signed __int16 int16_t;
typedef unsigned __int16 uint16_t;
typedef signed __int32 int32_t;
typedef unsigned __int32 uint32_t;
typedef signed __int64 int64_t;
typedef unsigned __int64 uint64_t;
#else
#include <stdint.h>
#endif
#endif // !defined(VK_NO_STDINT_H)
#ifdef __cplusplus
} // extern "C"
#endif // __cplusplus
#endif
+83
View File
@@ -0,0 +1,83 @@
#ifndef VULKAN_H_
#define VULKAN_H_ 1
/*
** Copyright (c) 2015-2018 The Khronos Group Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
#include "vk_platform.h"
#include "vulkan_core.h"
#ifdef VK_USE_PLATFORM_ANDROID_KHR
#include "vulkan_android.h"
#endif
#ifdef VK_USE_PLATFORM_FUCHSIA
#include <zircon/types.h>
#include "vulkan_fuchsia.h"
#endif
#ifdef VK_USE_PLATFORM_IOS_MVK
#include "vulkan_ios.h"
#endif
#ifdef VK_USE_PLATFORM_MACOS_MVK
#include "vulkan_macos.h"
#endif
#ifdef VK_USE_PLATFORM_MIR_KHR
#include <mir_toolkit/client_types.h>
#include "vulkan_mir.h"
#endif
#ifdef VK_USE_PLATFORM_VI_NN
#include "vulkan_vi.h"
#endif
#ifdef VK_USE_PLATFORM_WAYLAND_KHR
#include <wayland-client.h>
#include "vulkan_wayland.h"
#endif
#ifdef VK_USE_PLATFORM_WIN32_KHR
#include <windows.h>
#include "vulkan_win32.h"
#endif
#ifdef VK_USE_PLATFORM_XCB_KHR
#include <xcb/xcb.h>
#include "vulkan_xcb.h"
#endif
#ifdef VK_USE_PLATFORM_XLIB_KHR
#include <X11/Xlib.h>
#include "vulkan_xlib.h"
#endif
#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
#include <X11/Xlib.h>
#include <X11/extensions/Xrandr.h>
#include "vulkan_xlib_xrandr.h"
#endif
#endif // VULKAN_H_
+126
View File
@@ -0,0 +1,126 @@
#ifndef VULKAN_ANDROID_H_
#define VULKAN_ANDROID_H_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*
** Copyright (c) 2015-2018 The Khronos Group Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#define VK_KHR_android_surface 1
struct ANativeWindow;
#define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6
#define VK_KHR_ANDROID_SURFACE_EXTENSION_NAME "VK_KHR_android_surface"
typedef VkFlags VkAndroidSurfaceCreateFlagsKHR;
typedef struct VkAndroidSurfaceCreateInfoKHR {
VkStructureType sType;
const void* pNext;
VkAndroidSurfaceCreateFlagsKHR flags;
struct ANativeWindow* window;
} VkAndroidSurfaceCreateInfoKHR;
typedef VkResult (VKAPI_PTR *PFN_vkCreateAndroidSurfaceKHR)(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR(
VkInstance instance,
const VkAndroidSurfaceCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
#endif
#define VK_ANDROID_external_memory_android_hardware_buffer 1
struct AHardwareBuffer;
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION 3
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME "VK_ANDROID_external_memory_android_hardware_buffer"
typedef struct VkAndroidHardwareBufferUsageANDROID {
VkStructureType sType;
void* pNext;
uint64_t androidHardwareBufferUsage;
} VkAndroidHardwareBufferUsageANDROID;
typedef struct VkAndroidHardwareBufferPropertiesANDROID {
VkStructureType sType;
void* pNext;
VkDeviceSize allocationSize;
uint32_t memoryTypeBits;
} VkAndroidHardwareBufferPropertiesANDROID;
typedef struct VkAndroidHardwareBufferFormatPropertiesANDROID {
VkStructureType sType;
void* pNext;
VkFormat format;
uint64_t externalFormat;
VkFormatFeatureFlags formatFeatures;
VkComponentMapping samplerYcbcrConversionComponents;
VkSamplerYcbcrModelConversion suggestedYcbcrModel;
VkSamplerYcbcrRange suggestedYcbcrRange;
VkChromaLocation suggestedXChromaOffset;
VkChromaLocation suggestedYChromaOffset;
} VkAndroidHardwareBufferFormatPropertiesANDROID;
typedef struct VkImportAndroidHardwareBufferInfoANDROID {
VkStructureType sType;
const void* pNext;
struct AHardwareBuffer* buffer;
} VkImportAndroidHardwareBufferInfoANDROID;
typedef struct VkMemoryGetAndroidHardwareBufferInfoANDROID {
VkStructureType sType;
const void* pNext;
VkDeviceMemory memory;
} VkMemoryGetAndroidHardwareBufferInfoANDROID;
typedef struct VkExternalFormatANDROID {
VkStructureType sType;
void* pNext;
uint64_t externalFormat;
} VkExternalFormatANDROID;
typedef VkResult (VKAPI_PTR *PFN_vkGetAndroidHardwareBufferPropertiesANDROID)(VkDevice device, const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties);
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryAndroidHardwareBufferANDROID)(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetAndroidHardwareBufferPropertiesANDROID(
VkDevice device,
const struct AHardwareBuffer* buffer,
VkAndroidHardwareBufferPropertiesANDROID* pProperties);
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryAndroidHardwareBufferANDROID(
VkDevice device,
const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo,
struct AHardwareBuffer** pBuffer);
#endif
#ifdef __cplusplus
}
#endif
#endif
File diff suppressed because it is too large Load Diff
+58
View File
@@ -0,0 +1,58 @@
#ifndef VULKAN_FUCHSIA_H_
#define VULKAN_FUCHSIA_H_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*
** Copyright (c) 2015-2018 The Khronos Group Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#define VK_FUCHSIA_imagepipe_surface 1
#define VK_FUCHSIA_IMAGEPIPE_SURFACE_SPEC_VERSION 1
#define VK_FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME "VK_FUCHSIA_imagepipe_surface"
typedef VkFlags VkImagePipeSurfaceCreateFlagsFUCHSIA;
typedef struct VkImagePipeSurfaceCreateInfoFUCHSIA {
VkStructureType sType;
const void* pNext;
VkImagePipeSurfaceCreateFlagsFUCHSIA flags;
zx_handle_t imagePipeHandle;
} VkImagePipeSurfaceCreateInfoFUCHSIA;
typedef VkResult (VKAPI_PTR *PFN_vkCreateImagePipeSurfaceFUCHSIA)(VkInstance instance, const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateImagePipeSurfaceFUCHSIA(
VkInstance instance,
const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
#endif
#ifdef __cplusplus
}
#endif
#endif
+58
View File
@@ -0,0 +1,58 @@
#ifndef VULKAN_IOS_H_
#define VULKAN_IOS_H_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*
** Copyright (c) 2015-2018 The Khronos Group Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#define VK_MVK_ios_surface 1
#define VK_MVK_IOS_SURFACE_SPEC_VERSION 2
#define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface"
typedef VkFlags VkIOSSurfaceCreateFlagsMVK;
typedef struct VkIOSSurfaceCreateInfoMVK {
VkStructureType sType;
const void* pNext;
VkIOSSurfaceCreateFlagsMVK flags;
const void* pView;
} VkIOSSurfaceCreateInfoMVK;
typedef VkResult (VKAPI_PTR *PFN_vkCreateIOSSurfaceMVK)(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateIOSSurfaceMVK(
VkInstance instance,
const VkIOSSurfaceCreateInfoMVK* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
#endif
#ifdef __cplusplus
}
#endif
#endif
+58
View File
@@ -0,0 +1,58 @@
#ifndef VULKAN_MACOS_H_
#define VULKAN_MACOS_H_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*
** Copyright (c) 2015-2018 The Khronos Group Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#define VK_MVK_macos_surface 1
#define VK_MVK_MACOS_SURFACE_SPEC_VERSION 2
#define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface"
typedef VkFlags VkMacOSSurfaceCreateFlagsMVK;
typedef struct VkMacOSSurfaceCreateInfoMVK {
VkStructureType sType;
const void* pNext;
VkMacOSSurfaceCreateFlagsMVK flags;
const void* pView;
} VkMacOSSurfaceCreateInfoMVK;
typedef VkResult (VKAPI_PTR *PFN_vkCreateMacOSSurfaceMVK)(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateMacOSSurfaceMVK(
VkInstance instance,
const VkMacOSSurfaceCreateInfoMVK* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
#endif
#ifdef __cplusplus
}
#endif
#endif
+65
View File
@@ -0,0 +1,65 @@
#ifndef VULKAN_MIR_H_
#define VULKAN_MIR_H_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*
** Copyright (c) 2015-2018 The Khronos Group Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#define VK_KHR_mir_surface 1
#define VK_KHR_MIR_SURFACE_SPEC_VERSION 4
#define VK_KHR_MIR_SURFACE_EXTENSION_NAME "VK_KHR_mir_surface"
typedef VkFlags VkMirSurfaceCreateFlagsKHR;
typedef struct VkMirSurfaceCreateInfoKHR {
VkStructureType sType;
const void* pNext;
VkMirSurfaceCreateFlagsKHR flags;
MirConnection* connection;
MirSurface* mirSurface;
} VkMirSurfaceCreateInfoKHR;
typedef VkResult (VKAPI_PTR *PFN_vkCreateMirSurfaceKHR)(VkInstance instance, const VkMirSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceMirPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, MirConnection* connection);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateMirSurfaceKHR(
VkInstance instance,
const VkMirSurfaceCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceMirPresentationSupportKHR(
VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex,
MirConnection* connection);
#endif
#ifdef __cplusplus
}
#endif
#endif
+58
View File
@@ -0,0 +1,58 @@
#ifndef VULKAN_VI_H_
#define VULKAN_VI_H_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*
** Copyright (c) 2015-2018 The Khronos Group Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#define VK_NN_vi_surface 1
#define VK_NN_VI_SURFACE_SPEC_VERSION 1
#define VK_NN_VI_SURFACE_EXTENSION_NAME "VK_NN_vi_surface"
typedef VkFlags VkViSurfaceCreateFlagsNN;
typedef struct VkViSurfaceCreateInfoNN {
VkStructureType sType;
const void* pNext;
VkViSurfaceCreateFlagsNN flags;
void* window;
} VkViSurfaceCreateInfoNN;
typedef VkResult (VKAPI_PTR *PFN_vkCreateViSurfaceNN)(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateViSurfaceNN(
VkInstance instance,
const VkViSurfaceCreateInfoNN* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
#endif
#ifdef __cplusplus
}
#endif
#endif
+65
View File
@@ -0,0 +1,65 @@
#ifndef VULKAN_WAYLAND_H_
#define VULKAN_WAYLAND_H_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*
** Copyright (c) 2015-2018 The Khronos Group Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#define VK_KHR_wayland_surface 1
#define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 6
#define VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME "VK_KHR_wayland_surface"
typedef VkFlags VkWaylandSurfaceCreateFlagsKHR;
typedef struct VkWaylandSurfaceCreateInfoKHR {
VkStructureType sType;
const void* pNext;
VkWaylandSurfaceCreateFlagsKHR flags;
struct wl_display* display;
struct wl_surface* surface;
} VkWaylandSurfaceCreateInfoKHR;
typedef VkResult (VKAPI_PTR *PFN_vkCreateWaylandSurfaceKHR)(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateWaylandSurfaceKHR(
VkInstance instance,
const VkWaylandSurfaceCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWaylandPresentationSupportKHR(
VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex,
struct wl_display* display);
#endif
#ifdef __cplusplus
}
#endif
#endif
+276
View File
@@ -0,0 +1,276 @@
#ifndef VULKAN_WIN32_H_
#define VULKAN_WIN32_H_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*
** Copyright (c) 2015-2018 The Khronos Group Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#define VK_KHR_win32_surface 1
#define VK_KHR_WIN32_SURFACE_SPEC_VERSION 6
#define VK_KHR_WIN32_SURFACE_EXTENSION_NAME "VK_KHR_win32_surface"
typedef VkFlags VkWin32SurfaceCreateFlagsKHR;
typedef struct VkWin32SurfaceCreateInfoKHR {
VkStructureType sType;
const void* pNext;
VkWin32SurfaceCreateFlagsKHR flags;
HINSTANCE hinstance;
HWND hwnd;
} VkWin32SurfaceCreateInfoKHR;
typedef VkResult (VKAPI_PTR *PFN_vkCreateWin32SurfaceKHR)(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateWin32SurfaceKHR(
VkInstance instance,
const VkWin32SurfaceCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR(
VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex);
#endif
#define VK_KHR_external_memory_win32 1
#define VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
#define VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_KHR_external_memory_win32"
typedef struct VkImportMemoryWin32HandleInfoKHR {
VkStructureType sType;
const void* pNext;
VkExternalMemoryHandleTypeFlagBits handleType;
HANDLE handle;
LPCWSTR name;
} VkImportMemoryWin32HandleInfoKHR;
typedef struct VkExportMemoryWin32HandleInfoKHR {
VkStructureType sType;
const void* pNext;
const SECURITY_ATTRIBUTES* pAttributes;
DWORD dwAccess;
LPCWSTR name;
} VkExportMemoryWin32HandleInfoKHR;
typedef struct VkMemoryWin32HandlePropertiesKHR {
VkStructureType sType;
void* pNext;
uint32_t memoryTypeBits;
} VkMemoryWin32HandlePropertiesKHR;
typedef struct VkMemoryGetWin32HandleInfoKHR {
VkStructureType sType;
const void* pNext;
VkDeviceMemory memory;
VkExternalMemoryHandleTypeFlagBits handleType;
} VkMemoryGetWin32HandleInfoKHR;
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleKHR)(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandlePropertiesKHR)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleKHR(
VkDevice device,
const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo,
HANDLE* pHandle);
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandlePropertiesKHR(
VkDevice device,
VkExternalMemoryHandleTypeFlagBits handleType,
HANDLE handle,
VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties);
#endif
#define VK_KHR_win32_keyed_mutex 1
#define VK_KHR_WIN32_KEYED_MUTEX_SPEC_VERSION 1
#define VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_KHR_win32_keyed_mutex"
typedef struct VkWin32KeyedMutexAcquireReleaseInfoKHR {
VkStructureType sType;
const void* pNext;
uint32_t acquireCount;
const VkDeviceMemory* pAcquireSyncs;
const uint64_t* pAcquireKeys;
const uint32_t* pAcquireTimeouts;
uint32_t releaseCount;
const VkDeviceMemory* pReleaseSyncs;
const uint64_t* pReleaseKeys;
} VkWin32KeyedMutexAcquireReleaseInfoKHR;
#define VK_KHR_external_semaphore_win32 1
#define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION 1
#define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME "VK_KHR_external_semaphore_win32"
typedef struct VkImportSemaphoreWin32HandleInfoKHR {
VkStructureType sType;
const void* pNext;
VkSemaphore semaphore;
VkSemaphoreImportFlags flags;
VkExternalSemaphoreHandleTypeFlagBits handleType;
HANDLE handle;
LPCWSTR name;
} VkImportSemaphoreWin32HandleInfoKHR;
typedef struct VkExportSemaphoreWin32HandleInfoKHR {
VkStructureType sType;
const void* pNext;
const SECURITY_ATTRIBUTES* pAttributes;
DWORD dwAccess;
LPCWSTR name;
} VkExportSemaphoreWin32HandleInfoKHR;
typedef struct VkD3D12FenceSubmitInfoKHR {
VkStructureType sType;
const void* pNext;
uint32_t waitSemaphoreValuesCount;
const uint64_t* pWaitSemaphoreValues;
uint32_t signalSemaphoreValuesCount;
const uint64_t* pSignalSemaphoreValues;
} VkD3D12FenceSubmitInfoKHR;
typedef struct VkSemaphoreGetWin32HandleInfoKHR {
VkStructureType sType;
const void* pNext;
VkSemaphore semaphore;
VkExternalSemaphoreHandleTypeFlagBits handleType;
} VkSemaphoreGetWin32HandleInfoKHR;
typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreWin32HandleKHR)(VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo);
typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreWin32HandleKHR)(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreWin32HandleKHR(
VkDevice device,
const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo);
VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreWin32HandleKHR(
VkDevice device,
const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo,
HANDLE* pHandle);
#endif
#define VK_KHR_external_fence_win32 1
#define VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION 1
#define VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME "VK_KHR_external_fence_win32"
typedef struct VkImportFenceWin32HandleInfoKHR {
VkStructureType sType;
const void* pNext;
VkFence fence;
VkFenceImportFlags flags;
VkExternalFenceHandleTypeFlagBits handleType;
HANDLE handle;
LPCWSTR name;
} VkImportFenceWin32HandleInfoKHR;
typedef struct VkExportFenceWin32HandleInfoKHR {
VkStructureType sType;
const void* pNext;
const SECURITY_ATTRIBUTES* pAttributes;
DWORD dwAccess;
LPCWSTR name;
} VkExportFenceWin32HandleInfoKHR;
typedef struct VkFenceGetWin32HandleInfoKHR {
VkStructureType sType;
const void* pNext;
VkFence fence;
VkExternalFenceHandleTypeFlagBits handleType;
} VkFenceGetWin32HandleInfoKHR;
typedef VkResult (VKAPI_PTR *PFN_vkImportFenceWin32HandleKHR)(VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo);
typedef VkResult (VKAPI_PTR *PFN_vkGetFenceWin32HandleKHR)(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkImportFenceWin32HandleKHR(
VkDevice device,
const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo);
VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceWin32HandleKHR(
VkDevice device,
const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo,
HANDLE* pHandle);
#endif
#define VK_NV_external_memory_win32 1
#define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
#define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32"
typedef struct VkImportMemoryWin32HandleInfoNV {
VkStructureType sType;
const void* pNext;
VkExternalMemoryHandleTypeFlagsNV handleType;
HANDLE handle;
} VkImportMemoryWin32HandleInfoNV;
typedef struct VkExportMemoryWin32HandleInfoNV {
VkStructureType sType;
const void* pNext;
const SECURITY_ATTRIBUTES* pAttributes;
DWORD dwAccess;
} VkExportMemoryWin32HandleInfoNV;
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleNV)(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleNV(
VkDevice device,
VkDeviceMemory memory,
VkExternalMemoryHandleTypeFlagsNV handleType,
HANDLE* pHandle);
#endif
#define VK_NV_win32_keyed_mutex 1
#define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 1
#define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex"
typedef struct VkWin32KeyedMutexAcquireReleaseInfoNV {
VkStructureType sType;
const void* pNext;
uint32_t acquireCount;
const VkDeviceMemory* pAcquireSyncs;
const uint64_t* pAcquireKeys;
const uint32_t* pAcquireTimeoutMilliseconds;
uint32_t releaseCount;
const VkDeviceMemory* pReleaseSyncs;
const uint64_t* pReleaseKeys;
} VkWin32KeyedMutexAcquireReleaseInfoNV;
#ifdef __cplusplus
}
#endif
#endif
+66
View File
@@ -0,0 +1,66 @@
#ifndef VULKAN_XCB_H_
#define VULKAN_XCB_H_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*
** Copyright (c) 2015-2018 The Khronos Group Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#define VK_KHR_xcb_surface 1
#define VK_KHR_XCB_SURFACE_SPEC_VERSION 6
#define VK_KHR_XCB_SURFACE_EXTENSION_NAME "VK_KHR_xcb_surface"
typedef VkFlags VkXcbSurfaceCreateFlagsKHR;
typedef struct VkXcbSurfaceCreateInfoKHR {
VkStructureType sType;
const void* pNext;
VkXcbSurfaceCreateFlagsKHR flags;
xcb_connection_t* connection;
xcb_window_t window;
} VkXcbSurfaceCreateInfoKHR;
typedef VkResult (VKAPI_PTR *PFN_vkCreateXcbSurfaceKHR)(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateXcbSurfaceKHR(
VkInstance instance,
const VkXcbSurfaceCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXcbPresentationSupportKHR(
VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex,
xcb_connection_t* connection,
xcb_visualid_t visual_id);
#endif
#ifdef __cplusplus
}
#endif
#endif
+66
View File
@@ -0,0 +1,66 @@
#ifndef VULKAN_XLIB_H_
#define VULKAN_XLIB_H_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*
** Copyright (c) 2015-2018 The Khronos Group Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#define VK_KHR_xlib_surface 1
#define VK_KHR_XLIB_SURFACE_SPEC_VERSION 6
#define VK_KHR_XLIB_SURFACE_EXTENSION_NAME "VK_KHR_xlib_surface"
typedef VkFlags VkXlibSurfaceCreateFlagsKHR;
typedef struct VkXlibSurfaceCreateInfoKHR {
VkStructureType sType;
const void* pNext;
VkXlibSurfaceCreateFlagsKHR flags;
Display* dpy;
Window window;
} VkXlibSurfaceCreateInfoKHR;
typedef VkResult (VKAPI_PTR *PFN_vkCreateXlibSurfaceKHR)(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateXlibSurfaceKHR(
VkInstance instance,
const VkXlibSurfaceCreateInfoKHR* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface);
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXlibPresentationSupportKHR(
VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex,
Display* dpy,
VisualID visualID);
#endif
#ifdef __cplusplus
}
#endif
#endif
+54
View File
@@ -0,0 +1,54 @@
#ifndef VULKAN_XLIB_XRANDR_H_
#define VULKAN_XLIB_XRANDR_H_ 1
#ifdef __cplusplus
extern "C" {
#endif
/*
** Copyright (c) 2015-2018 The Khronos Group Inc.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#define VK_EXT_acquire_xlib_display 1
#define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1
#define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display"
typedef VkResult (VKAPI_PTR *PFN_vkAcquireXlibDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display);
typedef VkResult (VKAPI_PTR *PFN_vkGetRandROutputDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkAcquireXlibDisplayEXT(
VkPhysicalDevice physicalDevice,
Display* dpy,
VkDisplayKHR display);
VKAPI_ATTR VkResult VKAPI_CALL vkGetRandROutputDisplayEXT(
VkPhysicalDevice physicalDevice,
Display* dpy,
RROutput rrOutput,
VkDisplayKHR* pDisplay);
#endif
#ifdef __cplusplus
}
#endif
#endif
+3 -3
View File
@@ -188,8 +188,8 @@ int ovx_hal_mul(const T *a, size_t astep, const T *b, size_t bstep, T *c, size_t
refineStep(w, h, ivx::TypeToEnum<T>::imgType, astep);
refineStep(w, h, ivx::TypeToEnum<T>::imgType, bstep);
refineStep(w, h, ivx::TypeToEnum<T>::imgType, cstep);
#ifdef _MSC_VER
const float MAGIC_SCALE = 0x0.01010102;
#ifdef _WIN32
const float MAGIC_SCALE = 0x0.01010102p0;
#else
const float MAGIC_SCALE = 0x1.010102p-8;
#endif
@@ -431,7 +431,7 @@ int ovx_hal_warpAffine(int atype, const uchar *a, size_t astep, int aw, int ah,
return CV_HAL_ERROR_OK;
}
int ovx_hal_warpPerspectve(int atype, const uchar *a, size_t astep, int aw, int ah, uchar *b, size_t bstep, int bw, int bh, const double M[9], int interpolation, int borderType, const double borderValue[4])
int ovx_hal_warpPerspective(int atype, const uchar *a, size_t astep, int aw, int ah, uchar *b, size_t bstep, int bw, int bh, const double M[9], int interpolation, int borderType, const double borderValue[4])
{
if (skipSmallImages<VX_KERNEL_WARP_PERSPECTIVE>(aw, ah))
return CV_HAL_ERROR_NOT_IMPLEMENTED;
+2 -2
View File
@@ -27,7 +27,7 @@ int ovx_hal_mul(const T *a, size_t astep, const T *b, size_t bstep, T *c, size_t
int ovx_hal_merge8u(const uchar **src_data, uchar *dst_data, int len, int cn);
int ovx_hal_resize(int atype, const uchar *a, size_t astep, int aw, int ah, uchar *b, size_t bstep, int bw, int bh, double inv_scale_x, double inv_scale_y, int interpolation);
int ovx_hal_warpAffine(int atype, const uchar *a, size_t astep, int aw, int ah, uchar *b, size_t bstep, int bw, int bh, const double M[6], int interpolation, int borderType, const double borderValue[4]);
int ovx_hal_warpPerspectve(int atype, const uchar *a, size_t astep, int aw, int ah, uchar *b, size_t bstep, int bw, int bh, const double M[9], int interpolation, int borderType, const double borderValue[4]);
int ovx_hal_warpPerspective(int atype, const uchar *a, size_t astep, int aw, int ah, uchar *b, size_t bstep, int bw, int bh, const double M[9], int interpolation, int borderType, const double borderValue[4]);
struct cvhalFilter2D;
int ovx_hal_filterInit(cvhalFilter2D **filter_context, uchar *kernel_data, size_t kernel_step, int kernel_type, int kernel_width, int kernel_height,
@@ -97,7 +97,7 @@ int ovx_hal_integral(int depth, int sdepth, int, const uchar * a, size_t astep,
//#undef cv_hal_warpAffine
//#define cv_hal_warpAffine ovx_hal_warpAffine
//#undef cv_hal_warpPerspective
//#define cv_hal_warpPerspective ovx_hal_warpPerspectve
//#define cv_hal_warpPerspective ovx_hal_warpPerspective
#undef cv_hal_filterInit
#define cv_hal_filterInit ovx_hal_filterInit
+2 -3
View File
@@ -1718,8 +1718,7 @@ static const vx_enum
}
#ifdef IVX_USE_OPENCV
/// Convert image format (fourcc) to cv::Mat type
/// \return CV_USRTYPE1 for unknown image formats
/// Convert image format (fourcc) to cv::Mat type, throws WrapperError if not possible
static int formatToMatType(vx_df_image format, vx_uint32 planeIdx = 0)
{
switch (format)
@@ -1739,7 +1738,7 @@ static const vx_enum
case VX_DF_IMAGE_YUYV: return CV_8UC2;
case VX_DF_IMAGE_NV12:
case VX_DF_IMAGE_NV21: return planeIdx == 0 ? CV_8UC1 : CV_8UC2;
default: return CV_USRTYPE1;
default: throw WrapperError(std::string(__func__)+"(): unsupported image format");
}
}
+96 -156
View File
@@ -163,7 +163,6 @@ endif()
# ----------------------------------------------------------------------------
# Detect compiler and target platform architecture
# ----------------------------------------------------------------------------
OCV_OPTION(ENABLE_CXX11 "Enable C++11 compilation mode" "${OPENCV_CXX11}")
include(cmake/OpenCVDetectCXXCompiler.cmake)
ocv_cmake_hook(POST_DETECT_COMPILER)
@@ -235,13 +234,13 @@ OCV_OPTION(BUILD_ITT "Build Intel ITT from source"
# ===================================================
OCV_OPTION(WITH_1394 "Include IEEE1394 support" ON
VISIBLE_IF NOT ANDROID AND NOT IOS AND NOT WINRT
VERIFY HAVE_DC1394)
VERIFY HAVE_DC1394_2)
OCV_OPTION(WITH_AVFOUNDATION "Use AVFoundation for Video I/O (iOS/Mac)" ON
VISIBLE_IF APPLE
VERIFY HAVE_AVFOUNDATION)
OCV_OPTION(WITH_CARBON "Use Carbon for UI instead of Cocoa (OBSOLETE)" OFF
VISIBLE_IF APPLE
VERIFY HAVE_CARBON OR HAVE_COCOA)
OCV_OPTION(WITH_CAP_IOS "Enable iOS video capture" ON
VISIBLE_IF IOS
VERIFY HAVE_CAP_IOS)
OCV_OPTION(WITH_CAROTENE "Use NVidia carotene acceleration library for ARM platform" ON
VISIBLE_IF (ARM OR AARCH64) AND NOT IOS AND NOT (CMAKE_VERSION VERSION_LESS "2.8.11"))
OCV_OPTION(WITH_CPUFEATURES "Use cpufeatures Android library" ON
@@ -259,24 +258,21 @@ OCV_OPTION(WITH_CUFFT "Include NVidia Cuda Fast Fourier Transform (FFT) library
OCV_OPTION(WITH_CUBLAS "Include NVidia Cuda Basic Linear Algebra Subprograms (BLAS) library support" WITH_CUDA
VISIBLE_IF WITH_CUDA
VERIFY HAVE_CUBLAS)
OCV_OPTION(WITH_NVCUVID "Include NVidia Video Decoding library support" WITH_CUDA
OCV_OPTION(WITH_CUDNN "Include NVIDIA CUDA Deep Neural Network (cuDNN) library support" WITH_CUDA
VISIBLE_IF WITH_CUDA
VERIFY HAVE_CUDNN)
OCV_OPTION(WITH_NVCUVID "Include NVidia Video Decoding library support" OFF # disabled, details: https://github.com/opencv/opencv/issues/14850
VISIBLE_IF WITH_CUDA
VERIFY HAVE_NVCUVID)
OCV_OPTION(WITH_EIGEN "Include Eigen2/Eigen3 support" (NOT CV_DISABLE_OPTIMIZATION AND NOT CMAKE_CROSSCOMPILING)
VISIBLE_IF NOT WINRT
VERIFY HAVE_EIGEN)
OCV_OPTION(WITH_VFW "Include Video for Windows support (deprecated, consider using MSMF)" OFF
VISIBLE_IF WIN32
VERIFY HAVE_VFW)
OCV_OPTION(WITH_FFMPEG "Include FFMPEG support" (NOT ANDROID)
VISIBLE_IF NOT IOS AND NOT WINRT
VERIFY HAVE_FFMPEG)
OCV_OPTION(WITH_GSTREAMER "Include Gstreamer support" ON
VISIBLE_IF NOT ANDROID AND NOT IOS AND NOT WINRT
VERIFY HAVE_GSTREAMER AND GSTREAMER_BASE_VERSION VERSION_GREATER "0.99")
OCV_OPTION(WITH_GSTREAMER_0_10 "Enable Gstreamer 0.10 support (instead of 1.x)" OFF
VISIBLE_IF TRUE
VERIFY HAVE_GSTREAMER AND GSTREAMER_BASE_VERSION VERSION_LESS "1.0")
VERIFY HAVE_GSTREAMER AND GSTREAMER_VERSION VERSION_GREATER "0.99")
OCV_OPTION(WITH_GTK "Include GTK support" ON
VISIBLE_IF UNIX AND NOT APPLE AND NOT ANDROID
VERIFY HAVE_GTK)
@@ -289,6 +285,9 @@ OCV_OPTION(WITH_IPP "Include Intel IPP support" (NOT MINGW AND NOT CV_DISABLE_OP
OCV_OPTION(WITH_HALIDE "Include Halide support" OFF
VISIBLE_IF TRUE
VERIFY HAVE_HALIDE)
OCV_OPTION(WITH_VULKAN "Include Vulkan support" OFF
VISIBLE_IF TRUE
VERIFY HAVE_VULKAN)
OCV_OPTION(WITH_INF_ENGINE "Include Intel Inference Engine support" OFF
VISIBLE_IF TRUE
VERIFY INF_ENGINE_TARGET)
@@ -325,9 +324,6 @@ OCV_OPTION(WITH_GDCM "Include DICOM support" OFF
OCV_OPTION(WITH_PVAPI "Include Prosilica GigE support" OFF
VISIBLE_IF NOT ANDROID AND NOT IOS AND NOT WINRT
VERIFY HAVE_PVAPI)
OCV_OPTION(WITH_GIGEAPI "Include Smartek GigE support" OFF
VISIBLE_IF NOT ANDROID AND NOT IOS AND NOT WINRT
VERIFY HAVE_GIGE_API)
OCV_OPTION(WITH_ARAVIS "Include Aravis GigE support" OFF
VISIBLE_IF NOT ANDROID AND NOT IOS AND NOT WINRT AND NOT WIN32
VERIFY HAVE_ARAVIS_API)
@@ -337,36 +333,24 @@ OCV_OPTION(WITH_QT "Build with Qt Backend support" OFF
OCV_OPTION(WITH_WIN32UI "Build with Win32 UI Backend support" ON
VISIBLE_IF WIN32 AND NOT WINRT
VERIFY HAVE_WIN32UI)
OCV_OPTION(WITH_QUICKTIME "Use QuickTime for Video I/O (OBSOLETE)" OFF
VISIBLE_IF APPLE
VERIFY HAVE_QUICKTIME)
OCV_OPTION(WITH_QTKIT "Use QTKit Video I/O backend" OFF
VISIBLE_IF APPLE
VERIFY HAVE_QTKIT)
OCV_OPTION(WITH_TBB "Include Intel TBB support" OFF
VISIBLE_IF NOT IOS AND NOT WINRT
VERIFY HAVE_TBB)
OCV_OPTION(WITH_HPX "Include Ste||ar Group HPX support" OFF
VISIBLE_IF TRUE
VERIFY HAVE_HPX)
OCV_OPTION(WITH_OPENMP "Include OpenMP support" OFF
VISIBLE_IF TRUE
VERIFY HAVE_OPENMP)
OCV_OPTION(WITH_CSTRIPES "Include C= support" OFF
VISIBLE_IF WIN32 AND NOT WINRT
VERIFY HAVE_CSTRIPES)
OCV_OPTION(WITH_PTHREADS_PF "Use pthreads-based parallel_for" ON
VISIBLE_IF NOT WIN32 OR MINGW
VERIFY HAVE_PTHREADS_PF)
OCV_OPTION(WITH_TIFF "Include TIFF support" ON
VISIBLE_IF NOT IOS
VERIFY HAVE_TIFF)
OCV_OPTION(WITH_UNICAP "Include Unicap support (GPL)" OFF
VISIBLE_IF UNIX AND NOT APPLE AND NOT ANDROID
VERIFY HAVE_UNICAP)
OCV_OPTION(WITH_V4L "Include Video 4 Linux support" ON
VISIBLE_IF UNIX AND NOT ANDROID AND NOT APPLE
VERIFY HAVE_CAMV4L OR HAVE_CAMV4L2 OR HAVE_VIDEOIO)
OCV_OPTION(WITH_LIBV4L "Use libv4l for Video 4 Linux support" OFF
VISIBLE_IF UNIX AND NOT ANDROID AND NOT APPLE
VERIFY HAVE_LIBV4L)
OCV_OPTION(WITH_DSHOW "Build VideoIO with DirectShow support" ON
VISIBLE_IF WIN32 AND NOT ARM AND NOT WINRT
VERIFY HAVE_DSHOW)
@@ -403,9 +387,9 @@ OCV_OPTION(WITH_DIRECTX "Include DirectX support" ON
OCV_OPTION(WITH_OPENCL_D3D11_NV "Include NVIDIA OpenCL D3D11 support" WITH_DIRECTX
VISIBLE_IF WIN32 AND NOT WINRT
VERIFY HAVE_OPENCL_D3D11_NV)
OCV_OPTION(WITH_INTELPERC "Include Intel Perceptual Computing support" OFF
VISIBLE_IF WIN32 AND NOT WINRT
VERIFY HAVE_INTELPERC)
OCV_OPTION(WITH_LIBREALSENSE "Include Intel librealsense support" OFF
VISIBLE_IF NOT WITH_INTELPERC
VERIFY HAVE_LIBREALSENSE)
OCV_OPTION(WITH_VA "Include VA support" OFF
VISIBLE_IF UNIX AND NOT ANDROID
VERIFY HAVE_VA)
@@ -439,9 +423,15 @@ OCV_OPTION(WITH_IMGCODEC_SUNRASTER "Include SUNRASTER support" ON
OCV_OPTION(WITH_IMGCODEC_PXM "Include PNM (PBM,PGM,PPM) and PAM formats support" ON
VISIBLE_IF TRUE
VERIFY HAVE_IMGCODEC_PXM)
OCV_OPTION(WITH_IMGCODEC_PFM "Include PFM formats support" ON
VISIBLE_IF TRUE
VERIFY HAVE_IMGCODEC_PFM)
OCV_OPTION(WITH_QUIRC "Include library QR-code decoding" ON
VISIBLE_IF TRUE
VERIFY HAVE_QUIRC)
OCV_OPTION(WITH_ANDROID_MEDIANDK "Use Android Media NDK for Video I/O (Android)" (ANDROID_NATIVE_API_LEVEL GREATER 20)
VISIBLE_IF ANDROID
VERIFY HAVE_ANDROID_MEDIANDK)
# OpenCV build components
# ===================================================
@@ -483,7 +473,7 @@ OCV_OPTION(OPENCV_ENABLE_MEMORY_SANITIZER "Better support for memory/address san
OCV_OPTION(ENABLE_OMIT_FRAME_POINTER "Enable -fomit-frame-pointer for GCC" ON IF CV_GCC )
OCV_OPTION(ENABLE_POWERPC "Enable PowerPC for GCC" ON IF (CV_GCC AND CMAKE_SYSTEM_PROCESSOR MATCHES powerpc.*) )
OCV_OPTION(ENABLE_FAST_MATH "Enable compiler options for fast math optimizations on FP computations (not recommended)" OFF)
if(NOT IOS) # Use CPU_BASELINE instead
if(NOT IOS AND (NOT ANDROID OR OPENCV_ANDROID_USE_LEGACY_FLAGS)) # Use CPU_BASELINE instead
OCV_OPTION(ENABLE_NEON "Enable NEON instructions" (NEON OR ANDROID_ARM_NEON OR AARCH64) IF (CV_GCC OR CV_CLANG) AND (ARM OR AARCH64 OR IOS) )
OCV_OPTION(ENABLE_VFPV3 "Enable VFPv3-D32 instructions" OFF IF (CV_GCC OR CV_CLANG) AND (ARM OR AARCH64 OR IOS) )
endif()
@@ -497,7 +487,7 @@ OCV_OPTION(ENABLE_BUILD_HARDENING "Enable hardening of the resulting binarie
OCV_OPTION(ENABLE_LTO "Enable Link Time Optimization" OFF IF CV_GCC OR MSVC)
OCV_OPTION(ENABLE_THIN_LTO "Enable Thin LTO" OFF IF CV_CLANG)
OCV_OPTION(GENERATE_ABI_DESCRIPTOR "Generate XML file for abi_compliance_checker tool" OFF IF UNIX)
OCV_OPTION(OPENCV_GENERATE_PKGCONFIG "Generate .pc file for pkg-config build tool (deprecated)" ON IF (UNIX AND NOT MSVC AND NOT IOS AND NOT ANDROID) )
OCV_OPTION(OPENCV_GENERATE_PKGCONFIG "Generate .pc file for pkg-config build tool (deprecated)" OFF)
OCV_OPTION(CV_ENABLE_INTRINSICS "Use intrinsic-based optimized code" ON )
OCV_OPTION(CV_DISABLE_OPTIMIZATION "Disable explicit optimized code (dispatched code/intrinsics/loop unrolling/etc)" OFF )
OCV_OPTION(CV_TRACE "Enable OpenCV code trace" ON)
@@ -537,8 +527,6 @@ endif()
if(ANDROID OR WIN32)
ocv_update(OPENCV_DOC_INSTALL_PATH doc)
else()
ocv_update(OPENCV_DOC_INSTALL_PATH share/OpenCV/doc)
endif()
if(WIN32 AND CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
@@ -578,8 +566,6 @@ if(ANDROID)
ocv_update(OPENCV_TEST_DATA_INSTALL_PATH "sdk/etc/testdata")
elseif(WIN32)
ocv_update(OPENCV_TEST_DATA_INSTALL_PATH "testdata")
else()
ocv_update(OPENCV_TEST_DATA_INSTALL_PATH "share/OpenCV/testdata")
endif()
if(ANDROID)
@@ -608,26 +594,22 @@ else()
ocv_update(OPENCV_JAR_INSTALL_PATH java)
ocv_update(OPENCV_OTHER_INSTALL_PATH etc)
ocv_update(OPENCV_CONFIG_INSTALL_PATH ".")
ocv_update(OPENCV_INCLUDE_INSTALL_PATH "include")
ocv_update(OPENCV_LICENSES_INSTALL_PATH "${OPENCV_OTHER_INSTALL_PATH}/licenses")
else()
# Note: layout differs from OpenCV 3.4
include(GNUInstallDirs)
ocv_update(OPENCV_LIB_INSTALL_PATH ${CMAKE_INSTALL_LIBDIR})
ocv_update(OPENCV_3P_LIB_INSTALL_PATH share/OpenCV/3rdparty/${OPENCV_LIB_INSTALL_PATH})
ocv_update(OPENCV_SAMPLES_SRC_INSTALL_PATH share/OpenCV/samples)
ocv_update(OPENCV_JAR_INSTALL_PATH share/OpenCV/java)
ocv_update(OPENCV_OTHER_INSTALL_PATH share/OpenCV)
ocv_update(OPENCV_LICENSES_INSTALL_PATH "${CMAKE_INSTALL_DATAROOTDIR}/licenses/opencv3")
if(NOT DEFINED OPENCV_CONFIG_INSTALL_PATH)
math(EXPR SIZEOF_VOID_P_BITS "8 * ${CMAKE_SIZEOF_VOID_P}")
if(LIB_SUFFIX AND NOT SIZEOF_VOID_P_BITS EQUAL LIB_SUFFIX)
ocv_update(OPENCV_CONFIG_INSTALL_PATH ${CMAKE_INSTALL_LIBDIR}/cmake/opencv)
else()
ocv_update(OPENCV_CONFIG_INSTALL_PATH share/OpenCV)
endif()
endif()
ocv_update(OPENCV_INCLUDE_INSTALL_PATH "${CMAKE_INSTALL_INCLUDEDIR}/opencv4")
ocv_update(OPENCV_LIB_INSTALL_PATH "${CMAKE_INSTALL_LIBDIR}")
ocv_update(OPENCV_CONFIG_INSTALL_PATH "${OPENCV_LIB_INSTALL_PATH}/cmake/opencv4")
ocv_update(OPENCV_3P_LIB_INSTALL_PATH "${OPENCV_LIB_INSTALL_PATH}/opencv4/3rdparty")
ocv_update(OPENCV_SAMPLES_SRC_INSTALL_PATH "${CMAKE_INSTALL_DATAROOTDIR}/opencv4/samples")
ocv_update(OPENCV_DOC_INSTALL_PATH "${CMAKE_INSTALL_DATAROOTDIR}/doc/opencv4")
ocv_update(OPENCV_JAR_INSTALL_PATH "${CMAKE_INSTALL_DATAROOTDIR}/java/opencv4")
ocv_update(OPENCV_TEST_DATA_INSTALL_PATH "${CMAKE_INSTALL_DATAROOTDIR}/opencv4/testdata")
ocv_update(OPENCV_OTHER_INSTALL_PATH "${CMAKE_INSTALL_DATAROOTDIR}/opencv4")
ocv_update(OPENCV_LICENSES_INSTALL_PATH "${CMAKE_INSTALL_DATAROOTDIR}/licenses/opencv4")
endif()
ocv_update(OPENCV_INCLUDE_INSTALL_PATH "include")
#ocv_update(OPENCV_PYTHON_INSTALL_PATH "python") # no default value, see https://github.com/opencv/opencv/issues/13202
endif()
@@ -635,18 +617,18 @@ ocv_update(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${OPENCV_LIB_INSTALL_PAT
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
if(INSTALL_TO_MANGLED_PATHS)
set(OPENCV_INCLUDE_INSTALL_PATH ${OPENCV_INCLUDE_INSTALL_PATH}/opencv-${OPENCV_VERSION})
foreach(v
OPENCV_INCLUDE_INSTALL_PATH
# file names include version (.so/.dll): OPENCV_LIB_INSTALL_PATH
OPENCV_CONFIG_INSTALL_PATH
OPENCV_3P_LIB_INSTALL_PATH
OPENCV_SAMPLES_SRC_INSTALL_PATH
OPENCV_CONFIG_INSTALL_PATH
OPENCV_DOC_INSTALL_PATH
OPENCV_JAR_INSTALL_PATH
# JAR file name includes version: OPENCV_JAR_INSTALL_PATH
OPENCV_TEST_DATA_INSTALL_PATH
OPENCV_OTHER_INSTALL_PATH
)
string(REPLACE "OpenCV" "OpenCV-${OPENCV_VERSION}" ${v} "${${v}}")
string(REPLACE "opencv" "opencv-${OPENCV_VERSION}" ${v} "${${v}}")
string(REGEX REPLACE "opencv[0-9]*" "opencv-${OPENCV_VERSION}" ${v} "${${v}}")
endforeach()
endif()
@@ -853,6 +835,11 @@ if(WITH_HALIDE)
include(cmake/OpenCVDetectHalide.cmake)
endif()
# --- VkCom ---
if(WITH_VULKAN)
include(cmake/OpenCVDetectVulkan.cmake)
endif()
# --- Inference Engine ---
if(WITH_INF_ENGINE)
include(cmake/OpenCVDetectInferenceEngine.cmake)
@@ -935,27 +922,6 @@ configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/custom_hal.hpp.in" "${CMAKE
unset(_hal_includes)
# ----------------------------------------------------------------------------
# Add CUDA libraries (needed for apps/tools, samples)
# ----------------------------------------------------------------------------
if(HAVE_CUDA)
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY})
if(HAVE_CUBLAS)
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${CUDA_cublas_LIBRARY})
endif()
if(HAVE_CUFFT)
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${CUDA_cufft_LIBRARY})
endif()
foreach(p ${CUDA_LIBS_PATH})
if(MSVC AND CMAKE_GENERATOR MATCHES "Ninja|JOM")
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${CMAKE_LIBRARY_PATH_FLAG}"${p}")
else()
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${CMAKE_LIBRARY_PATH_FLAG}${p})
endif()
endforeach()
endif()
# ----------------------------------------------------------------------------
# Code trace support
# ----------------------------------------------------------------------------
@@ -1002,7 +968,7 @@ if(BUILD_opencv_apps)
endif()
# examples
if(BUILD_EXAMPLES OR BUILD_ANDROID_EXAMPLES OR INSTALL_PYTHON_EXAMPLES OR INSTALL_C_EXAMPLES)
if(BUILD_EXAMPLES OR BUILD_ANDROID_EXAMPLES OR INSTALL_ANDROID_EXAMPLES OR INSTALL_PYTHON_EXAMPLES OR INSTALL_C_EXAMPLES)
add_subdirectory(samples)
endif()
@@ -1020,9 +986,7 @@ ocv_cmake_hook(PRE_FINALIZE)
include(cmake/OpenCVGenHeaders.cmake)
# Generate opencv.pc for pkg-config command
if(NOT OPENCV_SKIP_PKGCONFIG_GENERATION
AND OPENCV_GENERATE_PKGCONFIG
AND NOT CMAKE_GENERATOR MATCHES "Xcode")
if(OPENCV_GENERATE_PKGCONFIG)
include(cmake/OpenCVGenPkgconfig.cmake)
endif()
@@ -1190,9 +1154,6 @@ string(STRIP "${OPENCV_COMPILER_STR}" OPENCV_COMPILER_STR)
status("")
status(" C/C++:")
status(" Built as dynamic libs?:" BUILD_SHARED_LIBS THEN YES ELSE NO)
if(ENABLE_CXX11 OR HAVE_CXX11)
status(" C++11:" HAVE_CXX11 THEN YES ELSE NO)
endif()
status(" C++ Compiler:" ${OPENCV_COMPILER_STR})
status(" C++ flags (Release):" ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE})
status(" C++ flags (Debug):" ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG})
@@ -1242,7 +1203,7 @@ ocv_build_features_string(apps_status
IF BUILD_EXAMPLES THEN "examples"
IF BUILD_opencv_apps THEN "apps"
IF BUILD_ANDROID_SERVICE THEN "android_service"
IF BUILD_ANDROID_EXAMPLES AND CAN_BUILD_ANDROID_PROJECTS THEN "android_examples"
IF (BUILD_ANDROID_EXAMPLES OR INSTALL_ANDROID_EXAMPLES) AND CAN_BUILD_ANDROID_PROJECTS THEN "android_examples"
ELSE "-")
status(" Applications:" "${apps_status}")
ocv_build_features_string(docs_status
@@ -1327,12 +1288,8 @@ if(WITH_WIN32UI)
status(" Win32 UI:" HAVE_WIN32UI THEN YES ELSE NO)
endif()
if(APPLE)
if(WITH_CARBON)
status(" Carbon:" YES)
else()
status(" Cocoa:" YES)
endif()
if(HAVE_COCOA) # APPLE
status(" Cocoa:" YES)
endif()
if(WITH_GTK OR HAVE_GTK)
@@ -1401,7 +1358,7 @@ if(WITH_GDAL OR HAVE_GDAL)
endif()
if(WITH_GDCM OR HAVE_GDCM)
status(" GDCM:" HAVE_GDCM THEN "YES (ver ${GDCM_VERSION})" ELSE "NO")
status(" GDCM:" HAVE_GDCM THEN "YES (${GDCM_VERSION})" ELSE "NO")
endif()
if(WITH_IMGCODEC_HDR OR DEFINED HAVE_IMGCODEC_HDR)
@@ -1416,22 +1373,16 @@ if(WITH_IMGCODEC_PXM OR DEFINED HAVE_IMGCODEC_PXM)
status(" PXM:" HAVE_IMGCODEC_PXM THEN "YES" ELSE "NO")
endif()
if(WITH_IMGCODEC_PFM OR DEFINED HAVE_IMGCODEC_PFM)
status(" PFM:" HAVE_IMGCODEC_PFM THEN "YES" ELSE "NO")
endif()
# ========================== VIDEO IO ==========================
status("")
status(" Video I/O:")
if(WITH_VFW OR HAVE_VFW)
status(" Video for Windows:" HAVE_VFW THEN YES ELSE NO)
endif()
if(WITH_1394 OR HAVE_DC1394)
if (HAVE_DC1394_2)
status(" DC1394:" "YES (ver ${DC1394_2_VERSION})")
elseif (HAVE_DC1394)
status(" DC1394:" "YES (ver ${DC1394_VERSION})")
else()
status(" DC1394:" "NO")
endif()
if(WITH_1394 OR HAVE_DC1394_2)
status(" DC1394:" HAVE_DC1394_2 THEN "YES (${DC1394_2_VERSION})" ELSE NO)
endif()
if(WITH_FFMPEG OR HAVE_FFMPEG)
@@ -1442,89 +1393,64 @@ if(WITH_FFMPEG OR HAVE_FFMPEG)
else()
status(" FFMPEG:" HAVE_FFMPEG THEN YES ELSE NO)
endif()
status(" avcodec:" FFMPEG_libavcodec_FOUND THEN "YES (ver ${FFMPEG_libavcodec_VERSION})" ELSE NO)
status(" avformat:" FFMPEG_libavformat_FOUND THEN "YES (ver ${FFMPEG_libavformat_VERSION})" ELSE NO)
status(" avutil:" FFMPEG_libavutil_FOUND THEN "YES (ver ${FFMPEG_libavutil_VERSION})" ELSE NO)
status(" swscale:" FFMPEG_libswscale_FOUND THEN "YES (ver ${FFMPEG_libswscale_VERSION})" ELSE NO)
status(" avresample:" FFMPEG_libavresample_FOUND THEN "YES (ver ${FFMPEG_libavresample_VERSION})" ELSE NO)
status(" avcodec:" FFMPEG_libavcodec_VERSION THEN "YES (${FFMPEG_libavcodec_VERSION})" ELSE NO)
status(" avformat:" FFMPEG_libavformat_VERSION THEN "YES (${FFMPEG_libavformat_VERSION})" ELSE NO)
status(" avutil:" FFMPEG_libavutil_VERSION THEN "YES (${FFMPEG_libavutil_VERSION})" ELSE NO)
status(" swscale:" FFMPEG_libswscale_VERSION THEN "YES (${FFMPEG_libswscale_VERSION})" ELSE NO)
status(" avresample:" FFMPEG_libavresample_VERSION THEN "YES (${FFMPEG_libavresample_VERSION})" ELSE NO)
endif()
if(WITH_GSTREAMER OR HAVE_GSTREAMER)
status(" GStreamer:" HAVE_GSTREAMER THEN "YES" ELSE NO)
if(HAVE_GSTREAMER)
status(" base:" "YES (ver ${GSTREAMER_BASE_VERSION})")
status(" video:" "YES (ver ${GSTREAMER_VIDEO_VERSION})")
status(" app:" "YES (ver ${GSTREAMER_APP_VERSION})")
status(" riff:" "YES (ver ${GSTREAMER_RIFF_VERSION})")
status(" pbutils:" "YES (ver ${GSTREAMER_PBUTILS_VERSION})")
endif(HAVE_GSTREAMER)
endif()
if(WITH_OPENNI OR HAVE_OPENNI)
status(" OpenNI:" HAVE_OPENNI THEN "YES (ver ${OPENNI_VERSION_STRING}, build ${OPENNI_VERSION_BUILD})" ELSE NO)
status(" OpenNI PrimeSensor Modules:" HAVE_OPENNI_PRIME_SENSOR_MODULE THEN "YES (${OPENNI_PRIME_SENSOR_MODULE})" ELSE NO)
status(" GStreamer:" HAVE_GSTREAMER THEN "YES (${GSTREAMER_VERSION})" ELSE NO)
endif()
if(WITH_OPENNI2 OR HAVE_OPENNI2)
status(" OpenNI2:" HAVE_OPENNI2 THEN "YES (ver ${OPENNI2_VERSION_STRING}, build ${OPENNI2_VERSION_BUILD})" ELSE NO)
status(" OpenNI2:" HAVE_OPENNI2 THEN "YES (${OPENNI2_VERSION})" ELSE NO)
endif()
if(WITH_PVAPI OR HAVE_PVAPI)
status(" PvAPI:" HAVE_PVAPI THEN YES ELSE NO)
endif()
if(WITH_GIGEAPI OR HAVE_GIGE_API)
status(" GigEVisionSDK:" HAVE_GIGE_API THEN YES ELSE NO)
status(" PvAPI:" HAVE_PVAPI THEN YES ELSE NO)
endif()
if(WITH_ARAVIS OR HAVE_ARAVIS_API)
status(" Aravis SDK:" HAVE_ARAVIS_API THEN "YES (${ARAVIS_LIBRARIES})" ELSE NO)
status(" Aravis SDK:" HAVE_ARAVIS_API THEN "YES (${ARAVIS_VERSION})" ELSE NO)
endif()
if(APPLE)
status(" AVFoundation:" HAVE_AVFOUNDATION THEN YES ELSE NO)
if(WITH_QUICKTIME OR HAVE_QUICKTIME)
status(" QuickTime:" HAVE_QUICKTIME THEN YES ELSE NO)
endif()
if(WITH_QTKIT OR HAVE_QTKIT)
status(" QTKit:" HAVE_QTKIT THEN "YES (deprecated)" ELSE NO)
endif()
if(WITH_AVFOUNDATION OR HAVE_AVFOUNDATION)
status(" AVFoundation:" HAVE_AVFOUNDATION THEN YES ELSE NO)
endif()
if(WITH_UNICAP OR HAVE_UNICAP)
status(" UniCap:" HAVE_UNICAP THEN "YES (ver ${UNICAP_libunicap_VERSION})" ELSE NO)
status(" UniCap ucil:" HAVE_UNICAP THEN "YES (ver ${UNICAP_libucil_VERSION})" ELSE NO)
if(HAVE_CAP_IOS)
status(" iOS capture:" YES)
endif()
if(WITH_V4L OR WITH_LIBV4L OR HAVE_LIBV4L OR HAVE_CAMV4L OR HAVE_CAMV4L2 OR HAVE_VIDEOIO)
status(" libv4l/libv4l2:" HAVE_LIBV4L THEN "${LIBV4L_libv4l1_VERSION} / ${LIBV4L_libv4l2_VERSION}" ELSE "NO")
if(WITH_V4L OR HAVE_V4L)
ocv_build_features_string(v4l_status
IF HAVE_CAMV4L THEN "linux/videodev.h"
IF HAVE_CAMV4L2 THEN "linux/videodev2.h"
IF HAVE_VIDEOIO THEN "sys/videoio.h"
ELSE "NO")
status(" v4l/v4l2:" "${v4l_status}")
status(" v4l/v4l2:" HAVE_V4L THEN "YES (${v4l_status})" ELSE NO)
endif()
if(WITH_DSHOW OR HAVE_DSHOW)
status(" DirectShow:" HAVE_DSHOW THEN YES ELSE NO)
status(" DirectShow:" HAVE_DSHOW THEN YES ELSE NO)
endif()
if(WITH_MSMF OR HAVE_MSMF)
status(" Media Foundation:" HAVE_MSMF THEN YES ELSE NO)
status(" DXVA:" HAVE_MSMF_DXVA THEN YES ELSE NO)
status(" Media Foundation:" HAVE_MSMF THEN YES ELSE NO)
status(" DXVA:" HAVE_MSMF_DXVA THEN YES ELSE NO)
endif()
if(WITH_XIMEA OR HAVE_XIMEA)
status(" XIMEA:" HAVE_XIMEA THEN YES ELSE NO)
status(" XIMEA:" HAVE_XIMEA THEN YES ELSE NO)
endif()
if(WITH_XINE OR HAVE_XINE)
status(" Xine:" HAVE_XINE THEN "YES (ver ${XINE_VERSION})" ELSE NO)
endif()
if(WITH_INTELPERC OR HAVE_INTELPERC)
status(" Intel PerC:" HAVE_INTELPERC THEN "YES" ELSE NO)
if(WITH_LIBREALSENSE OR HAVE_LIBREALSENSE)
status(" Intel RealSense:" HAVE_LIBREALSENSE THEN "YES (${LIBREALSENSE_VERSION})" ELSE NO)
endif()
if(WITH_MFX OR HAVE_MFX)
@@ -1538,7 +1464,7 @@ endif()
# Order is similar to CV_PARALLEL_FRAMEWORK in core/src/parallel.cpp
ocv_build_features_string(parallel_status EXCLUSIVE
IF HAVE_TBB THEN "TBB (ver ${TBB_VERSION_MAJOR}.${TBB_VERSION_MINOR} interface ${TBB_INTERFACE_VERSION})"
IF HAVE_CSTRIPES THEN "C="
IF HAVE_HPX THEN "HPX"
IF HAVE_OPENMP THEN "OpenMP"
IF HAVE_GCD THEN "GCD"
IF WINRT OR HAVE_CONCURRENCY THEN "Concurrency"
@@ -1643,6 +1569,20 @@ if(WITH_CUDA OR HAVE_CUDA)
status(" NVIDIA GPU arch:" ${OPENCV_CUDA_ARCH_BIN})
status(" NVIDIA PTX archs:" ${OPENCV_CUDA_ARCH_PTX})
endif()
endif()
if(WITH_CUDNN OR HAVE_CUDNN)
status("")
status(" cuDNN:" HAVE_CUDNN THEN "YES (ver ${CUDNN_VERSION})" ELSE NO)
endif()
if(WITH_VULKAN OR HAVE_VULKAN)
status("")
status(" Vulkan:" HAVE_VULKAN THEN "YES" ELSE "NO")
if(HAVE_VULKAN)
status(" Include path:" VULKAN_INCLUDE_DIRS THEN "${VULKAN_INCLUDE_DIRS}" ELSE "NO")
status(" Link libraries:" VULKAN_LIBRARIES THEN "${VULKAN_LIBRARIES}" ELSE "Dynamic load")
endif()
endif()
if(WITH_OPENCL OR HAVE_OPENCL)
+2 -2
View File
@@ -2,8 +2,8 @@
### Resources
* Homepage: <http://opencv.org>
* Docs: <http://docs.opencv.org/master/>
* Homepage: <https://opencv.org>
* Docs: <https://docs.opencv.org/master/>
* Q&A forum: <http://answers.opencv.org>
* Issue tracking: <https://github.com/opencv/opencv/issues>
+2 -2
View File
@@ -49,8 +49,8 @@ macro(ocv_add_app directory)
endif()
endmacro()
ocv_add_app(traincascade)
ocv_add_app(createsamples)
#ocv_add_app(traincascade)
#ocv_add_app(createsamples)
ocv_add_app(annotation)
ocv_add_app(visualisation)
ocv_add_app(interactive-calibration)
@@ -210,7 +210,7 @@ void calib::calibDataController::filterFrames()
worstElemIndex = i;
}
}
showOverlayMessage(cv::format("Frame %d is worst", worstElemIndex + 1));
showOverlayMessage(cv::format("Frame %zu is worst", worstElemIndex + 1));
if(mCalibData->imagePoints.size()) {
mCalibData->imagePoints.erase(mCalibData->imagePoints.begin() + worstElemIndex);
@@ -318,7 +318,7 @@ cv::Mat CalibProcessor::processFrame(const cv::Mat &frame)
saveFrameData();
bool isFrameBad = checkLastFrame();
if (!isFrameBad) {
std::string displayMessage = cv::format("Frame # %d captured", std::max(mCalibData->imagePoints.size(),
std::string displayMessage = cv::format("Frame # %zu captured", std::max(mCalibData->imagePoints.size(),
mCalibData->allCharucoCorners.size()));
if(!showOverlayMessage(displayMessage))
showCaptureMessage(frame, displayMessage);
-1
View File
@@ -30,7 +30,6 @@ using cv::ParallelLoopBody;
#include "boost.h"
#include "cascadeclassifier.h"
#include <queue>
#include "cxmisc.h"
#include "cvconfig.h"
+13 -12
View File
@@ -144,8 +144,8 @@ public:
CV_WRAP virtual void save( const char* filename, const char* name=0 ) const;
CV_WRAP virtual void load( const char* filename, const char* name=0 );
virtual void write( CvFileStorage* storage, const char* name ) const;
virtual void read( CvFileStorage* storage, CvFileNode* node );
virtual void write( cv::FileStorage& storage, const char* name ) const;
virtual void read( const cv::FileNode& node );
protected:
const char* default_model_name;
@@ -210,8 +210,8 @@ public:
bool update=false );
CV_WRAP virtual float predict( const cv::Mat& samples, CV_OUT cv::Mat* results=0, CV_OUT cv::Mat* results_prob=0 ) const;
virtual void write( CvFileStorage* storage, const char* name ) const;
virtual void read( CvFileStorage* storage, CvFileNode* node );
virtual void write( cv::FileStorage& storage, const char* name ) const;
virtual void read( const cv::FileNode& node );
protected:
int var_count, var_all;
@@ -521,8 +521,8 @@ public:
static CvParamGrid get_default_grid( int param_id );
virtual void write( CvFileStorage* storage, const char* name ) const;
virtual void read( CvFileStorage* storage, CvFileNode* node );
virtual void write( cv::FileStorage& storage, const char* name ) const;
virtual void read( const cv::FileNode& node );
CV_WRAP int get_var_count() const { return var_idx ? var_idx->cols : var_all; }
protected:
@@ -538,8 +538,8 @@ protected:
virtual float predict( const float* row_sample, int row_len, bool returnDFVal=false ) const;
virtual void write_params( CvFileStorage* fs ) const;
virtual void read_params( CvFileStorage* fs, CvFileNode* node );
virtual void write_params( cv::FileStorage& fs ) const;
virtual void read_params( const cv::FileNode& node );
void optimize_linear_svm();
@@ -673,8 +673,8 @@ struct CvDTreeTrainData
virtual CvDTreeNode* subsample_data( const CvMat* _subsample_idx );
virtual void write_params( CvFileStorage* fs ) const;
virtual void read_params( CvFileStorage* fs, CvFileNode* node );
virtual void write_params( cv::FileStorage& fs ) const;
virtual void read_params( const cv::FileNode& node );
// release all the data
virtual void clear();
@@ -1738,7 +1738,7 @@ protected:
// Read parameters of the gtb model and data.
//
// API
// virtual void read_params( CvFileStorage* fs );
// virtual void read_params( const cv::FileStorage& fs );
//
// INPUT
// fs - file storage to read parameters from.
@@ -2033,7 +2033,8 @@ typedef CvANN_MLP NeuralNet_MLP;
typedef CvGBTreesParams GradientBoostingTreeParams;
typedef CvGBTrees GradientBoostingTrees;
template<> void DefaultDeleter<CvDTreeSplit>::operator ()(CvDTreeSplit* obj) const;
template<> struct DefaultDeleter<CvDTreeSplit>{ void operator ()(CvDTreeSplit* obj) const; };
}
#endif // __cplusplus
+1 -4
View File
@@ -1880,10 +1880,7 @@ double CvDTree::calc_node_dir( CvDTreeNode* node )
namespace cv
{
template<> void DefaultDeleter<CvDTreeSplit>::operator ()(CvDTreeSplit* obj) const
{
fastFree(obj);
}
void DefaultDeleter<CvDTreeSplit>::operator ()(CvDTreeSplit* obj) const { fastFree(obj); }
DTreeBestSplitFinder::DTreeBestSplitFinder( CvDTree* _tree, CvDTreeNode* _node)
{
+105
View File
@@ -0,0 +1,105 @@
# template taken from https://cmake.org/cmake/help/v3.14/manual/cmake-developer.7.html
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
#[=======================================================================[.rst:
FindCUDNN
---------
Finds the cuDNN library.
Requires:
^^^^^^^^^
find_cuda_helper_libs from FindCUDA.cmake
i.e. CUDA module should be found using FindCUDA.cmake before attempting to find cuDNN
Result Variables
^^^^^^^^^^^^^^^^
This will define the following variables:
``CUDNN_FOUND``
``CUDNN_INCLUDE_DIRS`` location of cudnn.h
``CUDNN_LIBRARIES`` location of cudnn library
Cache Variables
^^^^^^^^^^^^^^^
The following cache variables will be set if cuDNN was found. They may also be set on failure.
``CUDNN_LIBRARY``
``CUDNN_INCLUDE_DIR``
``CUDNN_VERSION``
``CUDNN_VERSION_MAJOR`` INTERNAL
``CUDNN_VERSION_MINOR`` INTERNAL
``CUDNN_VERSION_PATCH`` INTERNAL
#]=======================================================================]
# find the library
if(CUDA_FOUND)
find_cuda_helper_libs(cudnn)
set(CUDNN_LIBRARY ${CUDA_cudnn_LIBRARY} CACHE FILEPATH "location of the cuDNN library")
unset(CUDA_cudnn_LIBRARY CACHE)
endif()
# find the include
if(CUDNN_LIBRARY)
find_path(CUDNN_INCLUDE_DIR
cudnn.h
PATHS ${CUDA_TOOLKIT_INCLUDE}
DOC "location of cudnn.h"
NO_DEFAULT_PATH
)
if(NOT CUDNN_INCLUDE_DIR)
find_path(CUDNN_INCLUDE_DIR
cudnn.h
DOC "location of cudnn.h"
)
endif()
endif()
# extract version from the include
if(CUDNN_INCLUDE_DIR)
file(READ "${CUDNN_INCLUDE_DIR}/cudnn.h" CUDNN_H_CONTENTS)
string(REGEX MATCH "define CUDNN_MAJOR ([0-9]+)" _ "${CUDNN_H_CONTENTS}")
set(CUDNN_MAJOR_VERSION ${CMAKE_MATCH_1} CACHE INTERNAL "")
string(REGEX MATCH "define CUDNN_MINOR ([0-9]+)" _ "${CUDNN_H_CONTENTS}")
set(CUDNN_MINOR_VERSION ${CMAKE_MATCH_1} CACHE INTERNAL "")
string(REGEX MATCH "define CUDNN_PATCHLEVEL ([0-9]+)" _ "${CUDNN_H_CONTENTS}")
set(CUDNN_PATCH_VERSION ${CMAKE_MATCH_1} CACHE INTERNAL "")
set(CUDNN_VERSION
"${CUDNN_MAJOR_VERSION}.${CUDNN_MINOR_VERSION}.${CUDNN_PATCH_VERSION}"
CACHE
STRING
"cuDNN version"
)
unset(CUDNN_H_CONTENTS)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(CUDNN
FOUND_VAR CUDNN_FOUND
REQUIRED_VARS
CUDNN_LIBRARY
CUDNN_INCLUDE_DIR
VERSION_VAR CUDNN_VERSION
)
if(CUDNN_FOUND)
set(CUDNN_LIBRARIES ${CUDNN_LIBRARY})
set(CUDNN_INCLUDE_DIRS ${CUDNN_INCLUDE_DIR})
endif()
mark_as_advanced(
CUDNN_LIBRARY
CUDNN_INCLUDE_DIR
CUDNN_VERSION
)
-139
View File
@@ -1,139 +0,0 @@
FILE(TO_CMAKE_PATH "$ENV{GSTREAMER_DIR}" TRY1_DIR)
FILE(TO_CMAKE_PATH "${GSTREAMER_DIR}" TRY2_DIR)
FILE(GLOB GSTREAMER_DIR ${TRY1_DIR} ${TRY2_DIR})
FIND_PATH(GSTREAMER_gst_INCLUDE_DIR gst/gst.h
PATHS ${GSTREAMER_DIR}/include/gstreamer-1.0 ${GSTREAMER_DIR}/include /usr/local/include/gstreamer-1.0 /usr/include/gstreamer-1.0
ENV INCLUDE DOC "Directory containing gst/gst.h include file")
FIND_PATH(GSTREAMER_glib_INCLUDE_DIR glib.h
PATHS ${GSTREAMER_DIR}/include/glib-2.0/
ENV INCLUDE DOC "Directory containing glib.h include file")
FIND_PATH(GSTREAMER_glibconfig_INCLUDE_DIR glibconfig.h
PATHS ${GSTREAMER_DIR}/lib/glib-2.0/include
ENV INCLUDE DOC "Directory containing glibconfig.h include file")
FIND_PATH(GSTREAMER_gstconfig_INCLUDE_DIR gst/gstconfig.h
PATHS ${GSTREAMER_DIR}/lib/gstreamer-1.0/include ${GSTREAMER_DIR}/include ${GSTREAMER_DIR}/include/gstreamer-1.0 ${GSTREAMER_DIR}/lib/include /usr/local/include/gstreamer-1.0 /usr/include/gstreamer-1.0 /usr/local/lib/include/gstreamer-1.0 /usr/lib/include/gstreamer-1.0
ENV INCLUDE DOC "Directory containing gst/gstconfig.h include file")
FIND_LIBRARY(GSTREAMER_gstaudio_LIBRARY NAMES gstaudio libgstaudio-1.0 gstaudio-1.0
PATHS ${GSTREMAER_DIR}/lib ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
ENV LIB
DOC "gstaudio library to link with"
NO_SYSTEM_ENVIRONMENT_PATH)
FIND_LIBRARY(GSTREAMER_gstapp_LIBRARY NAMES gstapp libgstapp-1.0 gstapp-1.0
PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
ENV LIB
DOC "gstapp library to link with"
NO_SYSTEM_ENVIRONMENT_PATH)
FIND_LIBRARY(GSTREAMER_gstbase_LIBRARY NAMES gstbase libgstbase-1.0 gstbase-1.0
PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
ENV LIB
DOC "gstbase library to link with"
NO_SYSTEM_ENVIRONMENT_PATH)
FIND_LIBRARY(GLIB_gstcdda_LIBRARY NAMES gstcdda libgstcdda-1.0 gstcdda-1.0
PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
ENV LIB
DOC "gstcdda library to link with"
NO_SYSTEM_ENVIRONMENT_PATH)
FIND_LIBRARY(GSTREAMER_gstcontroller_LIBRARY NAMES gstcontroller libgstcontroller-1.0 gstcontroller-1.0
PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
ENV LIB
DOC "gstcontroller library to link with"
NO_SYSTEM_ENVIRONMENT_PATH)
FIND_LIBRARY(GSTREAMER_gstnet_LIBRARY NAMES gstnet libgstnet-1.0 gstnet-1.0
PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
ENV LIB
DOC "gstnet library to link with"
NO_SYSTEM_ENVIRONMENT_PATH)
FIND_LIBRARY(GSTREAMER_gstpbutils_LIBRARY NAMES gstpbutils libgstpbutils-1.0 gstpbutils-1.0
PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
ENV LIB
DOC "gstpbutils library to link with"
NO_SYSTEM_ENVIRONMENT_PATH)
FIND_LIBRARY(GSTREAMER_gstreamer_LIBRARY NAMES gstreamer libgstreamer-1.0 gstreamer-1.0
PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
ENV LIB
DOC "gstreamer library to link with"
NO_SYSTEM_ENVIRONMENT_PATH)
FIND_LIBRARY(GSTREAMER_gstriff_LIBRARY NAMES gstriff libgstriff-1.0 gstriff-1.0
PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
ENV LIB
DOC "gstriff library to link with"
NO_SYSTEM_ENVIRONMENT_PATH)
FIND_LIBRARY(GSTREAMER_gstrtp_LIBRARY NAMES gstrtp libgstrtp-1.0 gstrtp-1.0
PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
ENV LIB
DOC "gstrtp library to link with"
NO_SYSTEM_ENVIRONMENT_PATH)
FIND_LIBRARY(GSTREAMER_gstrtsp_LIBRARY NAMES gstrtsp libgstrtsp-1.0 gstrtsp-1.0
PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
ENV LIB
DOC "gstrtsp library to link with"
NO_SYSTEM_ENVIRONMENT_PATH)
FIND_LIBRARY(GSTREAMER_gstsdp_LIBRARY NAMES gstsdp libgstsdp-1.0 gstsdp-1.0
PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
ENV LIB
DOC "gstsdp library to link with"
NO_SYSTEM_ENVIRONMENT_PATH)
FIND_LIBRARY(GSTREAMER_gsttag_LIBRARY NAMES gsttag libgsttag-1.0 gsttag-1.0
PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
ENV LIB
DOC "gsttag library to link with"
NO_SYSTEM_ENVIRONMENT_PATH)
FIND_LIBRARY(GSTREAMER_gstvideo_LIBRARY NAMES gstvideo libgstvideo-1.0 gstvideo-1.0
PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
ENV LIB
DOC "gstvideo library to link with"
NO_SYSTEM_ENVIRONMENT_PATH)
FIND_LIBRARY(GLIB_LIBRARY NAMES libglib-2.0 glib-2.0
PATHS ${GSTREAMER_DIR}/lib
ENV LIB
DOC "Glib library"
NO_SYSTEM_ENVIRONMENT_PATH)
FIND_LIBRARY(GOBJECT_LIBRARY NAMES libobject-2.0 gobject-2.0
PATHS ${GSTREAMER_DIR}/lib
ENV LIB
DOC "Glib library"
NO_SYSTEM_ENVIRONMENT_PATH)
IF (GSTREAMER_gst_INCLUDE_DIR AND GSTREAMER_gstconfig_INCLUDE_DIR AND
GSTREAMER_gstaudio_LIBRARY AND GSTREAMER_gstbase_LIBRARY AND GSTREAMER_gstcontroller_LIBRARY AND GSTREAMER_gstnet_LIBRARY
AND GSTREAMER_gstpbutils_LIBRARY AND GSTREAMER_gstreamer_LIBRARY AND
GSTREAMER_gstriff_LIBRARY AND GSTREAMER_gstrtp_LIBRARY AND GSTREAMER_gstrtsp_LIBRARY AND GSTREAMER_gstsdp_LIBRARY AND
GSTREAMER_gsttag_LIBRARY AND GSTREAMER_gstvideo_LIBRARY AND GLIB_LIBRARY AND GSTREAMER_gstapp_LIBRARY AND GOBJECT_LIBRARY)
SET(GSTREAMER_INCLUDE_DIR ${GSTREAMER_gst_INCLUDE_DIR} ${GSTREAMER_gstconfig_INCLUDE_DIR} ${GSTREAMER_glib_INCLUDE_DIR} ${GSTREAMER_glibconfig_INCLUDE_DIR})
list(REMOVE_DUPLICATES GSTREAMER_INCLUDE_DIR)
SET(GSTREAMER_LIBRARIES ${GSTREAMER_gstaudio_LIBRARY} ${GSTREAMER_gstbase_LIBRARY}
${GSTREAMER_gstcontroller_LIBRARY} ${GSTREAMER_gstdataprotocol_LIBRARY} ${GSTREAMER_gstinterfaces_LIBRARY}
${GSTREAMER_gstnet_LIBRARY} ${GSTREAMER_gstpbutils_LIBRARY}
${GSTREAMER_gstreamer_LIBRARY} ${GSTREAMER_gstriff_LIBRARY} ${GSTREAMER_gstrtp_LIBRARY}
${GSTREAMER_gstrtsp_LIBRARY} ${GSTREAMER_gstsdp_LIBRARY} ${GSTREAMER_gsttag_LIBRARY} ${GSTREAMER_gstvideo_LIBRARY} ${GLIB_LIBRARY}
${GSTREAMER_gstapp_LIBRARY} ${GOBJECT_LIBRARY})
list(REMOVE_DUPLICATES GSTREAMER_LIBRARIES)
SET(GSTREAMER_FOUND TRUE)
ENDIF (GSTREAMER_gst_INCLUDE_DIR AND GSTREAMER_gstconfig_INCLUDE_DIR AND
GSTREAMER_gstaudio_LIBRARY AND GSTREAMER_gstbase_LIBRARY AND GSTREAMER_gstcontroller_LIBRARY
AND GSTREAMER_gstnet_LIBRARY AND GSTREAMER_gstpbutils_LIBRARY AND GSTREAMER_gstreamer_LIBRARY AND
GSTREAMER_gstriff_LIBRARY AND GSTREAMER_gstrtp_LIBRARY AND GSTREAMER_gstrtsp_LIBRARY AND GSTREAMER_gstsdp_LIBRARY AND
GSTREAMER_gsttag_LIBRARY AND GSTREAMER_gstvideo_LIBRARY AND GLIB_LIBRARY AND GSTREAMER_gstapp_LIBRARY AND GOBJECT_LIBRARY)
+27
View File
@@ -0,0 +1,27 @@
# Find Vulkan
#
# Vulkan_INCLUDE_DIRS
# Vulkan_LIBRARIES
# Vulkan_FOUND
if (WIN32)
find_path(Vulkan_INCLUDE_DIRS NAMES vulkan/vulkan.h HINTS
"$ENV{VULKAN_SDK}/Include"
"$ENV{VK_SDK_PATH}/Include")
if (CMAKE_CL_64)
find_library(Vulkan_LIBRARIES NAMES vulkan-1 HINTS
"$ENV{VULKAN_SDK}/Bin"
"$ENV{VK_SDK_PATH}/Bin")
else()
find_library(Vulkan_LIBRARIES NAMES vulkan-1 HINTS
"$ENV{VULKAN_SDK}/Bin32"
"$ENV{VK_SDK_PATH}/Bin32")
endif()
else()
find_path(Vulkan_INCLUDE_DIRS NAMES vulkan/vulkan.h HINTS
"$ENV{VULKAN_SDK}/include")
find_library(Vulkan_LIBRARIES NAMES vulkan HINTS
"$ENV{VULKAN_SDK}/lib")
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Vulkan DEFAULT_MSG Vulkan_LIBRARIES Vulkan_INCLUDE_DIRS)
mark_as_advanced(Vulkan_INCLUDE_DIRS Vulkan_LIBRARIES)
+3 -1
View File
@@ -117,7 +117,9 @@ if(CV_GCC OR CV_CLANG)
add_extra_compiler_option(-Wundef)
add_extra_compiler_option(-Winit-self)
add_extra_compiler_option(-Wpointer-arith)
add_extra_compiler_option(-Wshadow)
if(NOT (CV_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0"))
add_extra_compiler_option(-Wshadow) # old GCC emits warnings for variables + methods combination
endif()
add_extra_compiler_option(-Wsign-promo)
add_extra_compiler_option(-Wuninitialized)
add_extra_compiler_option(-Winit-self)
-11
View File
@@ -1,11 +0,0 @@
if(WIN32)
find_path( CSTRIPES_LIB_DIR
NAMES "C=.lib"
DOC "The path to C= lib and dll")
if(CSTRIPES_LIB_DIR)
ocv_include_directories("${CSTRIPES_LIB_DIR}/..")
link_directories("${CSTRIPES_LIB_DIR}")
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} "C=")
set(HAVE_CSTRIPES 1)
endif()
endif()
+81 -4
View File
@@ -37,6 +37,16 @@ if(CUDA_FOUND)
set(HAVE_CUBLAS 1)
endif()
if(WITH_CUDNN)
set(CMAKE_MODULE_PATH "${OpenCV_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
find_host_package(CUDNN "${MIN_VER_CUDNN}")
list(REMOVE_AT CMAKE_MODULE_PATH 0)
if(CUDNN_FOUND)
set(HAVE_CUDNN 1)
endif()
endif()
if(WITH_NVCUVID)
find_cuda_helper_libs(nvcuvid)
if(WIN32)
@@ -70,6 +80,12 @@ if(CUDA_FOUND)
unset(CUDA_ARCH_PTX CACHE)
endif()
SET(DETECT_ARCHS_COMMAND "${CUDA_NVCC_EXECUTABLE}" ${CUDA_NVCC_FLAGS} "${OpenCV_SOURCE_DIR}/cmake/checks/OpenCVDetectCudaArch.cu" "--run")
if(WIN32 AND CMAKE_LINKER) #Workaround for VS cl.exe not being in the env. path
get_filename_component(host_compiler_bindir ${CMAKE_LINKER} DIRECTORY)
SET(DETECT_ARCHS_COMMAND ${DETECT_ARCHS_COMMAND} "-ccbin" "${host_compiler_bindir}")
endif()
set(__cuda_arch_ptx "")
if(CUDA_GENERATION STREQUAL "Fermi")
set(__cuda_arch_bin "2.0")
@@ -84,10 +100,11 @@ if(CUDA_FOUND)
elseif(CUDA_GENERATION STREQUAL "Turing")
set(__cuda_arch_bin "7.5")
elseif(CUDA_GENERATION STREQUAL "Auto")
execute_process( COMMAND "${CUDA_NVCC_EXECUTABLE}" ${CUDA_NVCC_FLAGS} "${OpenCV_SOURCE_DIR}/cmake/checks/OpenCVDetectCudaArch.cu" "--run"
execute_process( COMMAND ${DETECT_ARCHS_COMMAND}
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/"
RESULT_VARIABLE _nvcc_res OUTPUT_VARIABLE _nvcc_out
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REGEX REPLACE ".*\n" "" _nvcc_out "${_nvcc_out}") #Strip leading warning messages, if any
if(NOT _nvcc_res EQUAL 0)
message(STATUS "Automatic detection of CUDA generation failed. Going to build for all known architectures.")
else()
@@ -101,10 +118,11 @@ if(CUDA_FOUND)
set(__cuda_arch_bin "3.2")
set(__cuda_arch_ptx "")
elseif(AARCH64)
execute_process( COMMAND "${CUDA_NVCC_EXECUTABLE}" ${CUDA_NVCC_FLAGS} "${OpenCV_SOURCE_DIR}/cmake/checks/OpenCVDetectCudaArch.cu" "--run"
execute_process( COMMAND ${DETECT_ARCHS_COMMAND}
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/"
RESULT_VARIABLE _nvcc_res OUTPUT_VARIABLE _nvcc_out
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REGEX REPLACE ".*\n" "" _nvcc_out "${_nvcc_out}") #Strip leading warning messages, if any
if(NOT _nvcc_res EQUAL 0)
message(STATUS "Automatic detection of CUDA generation failed. Going to build for all known architectures.")
set(__cuda_arch_bin "5.3 6.2 7.2")
@@ -244,7 +262,7 @@ if(CUDA_FOUND)
endif()
if(UNIX OR APPLE)
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -Xcompiler -fPIC)
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -Xcompiler -fPIC --std=c++11)
endif()
if(APPLE)
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -Xcompiler -fno-finite-math-only)
@@ -285,6 +303,13 @@ if(HAVE_CUDA)
endforeach()
endif()
if(HAVE_CUDNN)
foreach(p ${CUDNN_LIBRARIES})
get_filename_component(_tmp ${p} PATH)
list(APPEND CUDA_LIBS_PATH ${_tmp})
endforeach()
endif()
if(HAVE_CUFFT)
foreach(p ${CUDA_cufft_LIBRARY})
get_filename_component(_tmp ${p} PATH)
@@ -303,9 +328,61 @@ if(HAVE_CUDA)
set(CUDA_cublas_LIBRARY_ABS ${CUDA_cublas_LIBRARY})
ocv_convert_to_lib_name(CUDA_cublas_LIBRARY ${CUDA_cublas_LIBRARY})
endif()
if(HAVE_CUDNN)
set(CUDNN_LIBRARIES_ABS ${CUDNN_LIBRARIES})
ocv_convert_to_lib_name(CUDNN_LIBRARIES ${CUDNN_LIBRARIES})
endif()
if(HAVE_CUFFT)
set(CUDA_cufft_LIBRARY_ABS ${CUDA_cufft_LIBRARY})
ocv_convert_to_lib_name(CUDA_cufft_LIBRARY ${CUDA_cufft_LIBRARY})
endif()
endif()
# ----------------------------------------------------------------------------
# Add CUDA libraries (needed for apps/tools, samples)
# ----------------------------------------------------------------------------
if(HAVE_CUDA)
# details: https://github.com/NVIDIA/nvidia-docker/issues/775
if(" ${CUDA_CUDA_LIBRARY}" MATCHES "/stubs/libcuda.so" AND NOT OPENCV_SKIP_CUDA_STUB_WORKAROUND)
set(CUDA_STUB_ENABLED_LINK_WORKAROUND 1)
if(EXISTS "${CUDA_CUDA_LIBRARY}" AND NOT OPENCV_SKIP_CUDA_STUB_WORKAROUND_RPATH_LINK)
set(CUDA_STUB_TARGET_PATH "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/")
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${CUDA_CUDA_LIBRARY}" "${CUDA_STUB_TARGET_PATH}/libcuda.so.1"
RESULT_VARIABLE CUDA_STUB_SYMLINK_RESULT)
if(NOT CUDA_STUB_SYMLINK_RESULT EQUAL 0)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CUDA_CUDA_LIBRARY}" "${CUDA_STUB_TARGET_PATH}/libcuda.so.1"
RESULT_VARIABLE CUDA_STUB_COPY_RESULT)
if(NOT CUDA_STUB_COPY_RESULT EQUAL 0)
set(CUDA_STUB_ENABLED_LINK_WORKAROUND 0)
endif()
endif()
if(CUDA_STUB_ENABLED_LINK_WORKAROUND)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath-link,\"${CUDA_STUB_TARGET_PATH}\"")
endif()
else()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--allow-shlib-undefined")
endif()
if(NOT CUDA_STUB_ENABLED_LINK_WORKAROUND)
message(WARNING "CUDA: workaround for stubs/libcuda.so.1 is not applied")
endif()
endif()
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY} ${CUDA_npp_LIBRARY})
if(HAVE_CUBLAS)
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${CUDA_cublas_LIBRARY})
endif()
if(HAVE_CUDNN)
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${CUDNN_LIBRARIES})
endif()
if(HAVE_CUFFT)
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${CUDA_cufft_LIBRARY})
endif()
foreach(p ${CUDA_LIBS_PATH})
if(MSVC AND CMAKE_GENERATOR MATCHES "Ninja|JOM")
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${CMAKE_LIBRARY_PATH_FLAG}"${p}")
else()
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${CMAKE_LIBRARY_PATH_FLAG}${p})
endif()
endforeach()
endif()
+9 -9
View File
@@ -175,18 +175,15 @@ if(CMAKE_VERSION VERSION_LESS "3.1")
endforeach()
endif()
if(ENABLE_CXX11)
#cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
set(CMAKE_CXX_EXTENSIONS OFF) # use -std=c++11 instead of -std=gnu++11
if(CMAKE_CXX11_COMPILE_FEATURES)
set(HAVE_CXX11 ON)
endif()
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
set(CMAKE_CXX_EXTENSIONS OFF) # use -std=c++11 instead of -std=gnu++11
if(CMAKE_CXX11_COMPILE_FEATURES)
set(HAVE_CXX11 ON)
endif()
if(NOT HAVE_CXX11)
ocv_check_compiler_flag(CXX "" HAVE_CXX11 "${OpenCV_SOURCE_DIR}/cmake/checks/cxx11.cpp")
if(NOT HAVE_CXX11 AND ENABLE_CXX11)
if(NOT HAVE_CXX11)
ocv_check_compiler_flag(CXX "-std=c++11" HAVE_STD_CXX11 "${OpenCV_SOURCE_DIR}/cmake/checks/cxx11.cpp")
if(HAVE_STD_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
@@ -194,3 +191,6 @@ if(NOT HAVE_CXX11)
endif()
endif()
endif()
if(NOT HAVE_CXX11)
message(FATAL_ERROR "OpenCV 4.x requires C++11")
endif()
-7
View File
@@ -17,13 +17,6 @@
# INF_ENGINE_TARGET - set to name of imported library target representing InferenceEngine
#
if(NOT HAVE_CXX11)
message(WARNING "DL Inference engine requires C++11. You can turn it on via ENABLE_CXX11=ON CMake flag.")
return()
endif()
# =======================
function(add_custom_ie_build _inc _lib _lib_rel _lib_dbg _msg)
if(NOT _inc OR NOT (_lib OR _lib_rel OR _lib_dbg))
return()
-59
View File
@@ -1,59 +0,0 @@
set(HAVE_MFX 0)
if (UNIX)
set(root "$ENV{MFX_HOME}")
elseif(WIN32)
set(root "$ENV{INTELMEDIASDKROOT}")
endif()
# TODO: ICC? MINGW? ARM? IOS?
if(WIN32)
if(X86_64)
set(arch "x64")
else()
set(arch "win32")
endif()
elseif(UNIX)
set(arch "lin_x64")
else()
# ???
endif()
find_path(MFX_INCLUDE mfxdefs.h PATHS "${root}/include" NO_DEFAULT_PATH)
message(STATUS "MFX_INCLUDE: ${MFX_INCLUDE} (${root}/include)")
find_library(MFX_LIBRARY NAMES mfx PATHS "${root}/lib/${arch}" NO_DEFAULT_PATH)
if(MSVC)
if(MSVC14)
find_library(MFX_LIBRARY NAMES libmfx_vs2015.lib PATHS "${root}/lib/${arch}" NO_DEFAULT_PATH)
else()
find_library(MFX_LIBRARY NAMES libmfx.lib PATHS "${root}/lib/${arch}" NO_DEFAULT_PATH)
endif()
endif()
if(NOT MFX_INCLUDE OR NOT MFX_LIBRARY)
return()
endif()
set(deps)
if (UNIX)
find_library(MFX_VA_LIBRARY va)
find_library(MFX_VA_DRM_LIBRARY va-drm)
if (NOT MFX_VA_LIBRARY OR NOT MFX_VA_DRM_LIBRARY)
return()
endif()
add_library(mfx-va UNKNOWN IMPORTED)
set_target_properties(mfx-va PROPERTIES IMPORTED_LOCATION "${MFX_VA_LIBRARY}")
add_library(mfx-va-drm UNKNOWN IMPORTED)
set_target_properties(mfx-va-drm PROPERTIES IMPORTED_LOCATION "${MFX_VA_DRM_LIBRARY}")
list(APPEND deps mfx-va mfx-va-drm "-Wl,--exclude-libs=libmfx")
endif()
add_library(mfx UNKNOWN IMPORTED)
set_target_properties(mfx PROPERTIES
IMPORTED_LOCATION "${MFX_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${MFX_INCLUDE}"
INTERFACE_LINK_LIBRARIES "${deps}"
)
set(HAVE_MFX 1)
+13
View File
@@ -52,5 +52,18 @@ if(HAVE_QT AND VTK_VERSION VERSION_GREATER "6.0.0" AND NOT ${VTK_QT_VERSION} STR
endif()
endif()
try_compile(VTK_COMPILE_STATUS
"${OpenCV_BINARY_DIR}"
"${OpenCV_SOURCE_DIR}/cmake/checks/vtk_test.cpp"
CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${VTK_INCLUDE_DIRS}"
LINK_LIBRARIES ${VTK_LIBRARIES}
OUTPUT_VARIABLE OUTPUT
)
if(NOT ${VTK_COMPILE_STATUS})
message(STATUS "VTK support is disabled. Compilation of the sample code has failed.")
return()
endif()
set(HAVE_VTK ON)
message(STATUS "Found VTK ${VTK_VERSION} (${VTK_USE_FILE})")
+20
View File
@@ -0,0 +1,20 @@
set(VULKAN_INCLUDE_DIRS "${OpenCV_SOURCE_DIR}/3rdparty/include" CACHE PATH "Vulkan include directory")
set(VULKAN_LIBRARIES "")
try_compile(VALID_VULKAN
"${OpenCV_BINARY_DIR}"
"${OpenCV_SOURCE_DIR}/cmake/checks/vulkan.cpp"
CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${VULKAN_INCLUDE_DIRS}"
OUTPUT_VARIABLE TRY_OUT
)
if(NOT ${VALID_VULKAN})
message(WARNING "Can't use Vulkan")
return()
endif()
set(HAVE_VULKAN 1)
if(HAVE_VULKAN)
add_definitions(-DVK_NO_PROTOTYPES)
include_directories(${VULKAN_INCLUDE_DIRS})
endif()
+8 -8
View File
@@ -2,22 +2,22 @@
# Detect frameworks that may be used by 3rd-party libraries as well as OpenCV
# ----------------------------------------------------------------------------
# --- C= ---
if(WITH_CSTRIPES AND NOT HAVE_TBB)
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVDetectCStripes.cmake")
else()
set(HAVE_CSTRIPES 0)
endif()
# --- HPX ---
if(WITH_HPX)
find_package(HPX REQUIRED)
ocv_include_directories(${HPX_INCLUDE_DIRS})
set(HAVE_HPX TRUE)
endif(WITH_HPX)
# --- GCD ---
if(APPLE AND NOT HAVE_TBB AND NOT HAVE_CSTRIPES)
if(APPLE AND NOT HAVE_TBB)
set(HAVE_GCD 1)
else()
set(HAVE_GCD 0)
endif()
# --- Concurrency ---
if(MSVC AND NOT HAVE_TBB AND NOT HAVE_CSTRIPES)
if(MSVC AND NOT HAVE_TBB)
set(_fname "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/concurrencytest.cpp")
file(WRITE "${_fname}" "#if _MSC_VER < 1600\n#error\n#endif\nint main() { return 0; }\n")
try_compile(HAVE_CONCURRENCY "${CMAKE_BINARY_DIR}" "${_fname}")
-20
View File
@@ -1,20 +0,0 @@
# Main variables:
# INTELPERC_LIBRARIES and INTELPERC_INCLUDE to link Intel Perceptial Computing SDK modules
# HAVE_INTELPERC for conditional compilation OpenCV with/without Intel Perceptial Computing SDK
if(X86_64)
find_path(INTELPERC_INCLUDE_DIR "pxcsession.h" PATHS "$ENV{PCSDK_DIR}include" DOC "Path to Intel Perceptual Computing SDK interface headers")
find_file(INTELPERC_LIBRARIES "libpxc.lib" PATHS "$ENV{PCSDK_DIR}lib/x64" DOC "Path to Intel Perceptual Computing SDK interface libraries")
else()
find_path(INTELPERC_INCLUDE_DIR "pxcsession.h" PATHS "$ENV{PCSDK_DIR}include" DOC "Path to Intel Perceptual Computing SDK interface headers")
find_file(INTELPERC_LIBRARIES "libpxc.lib" PATHS "$ENV{PCSDK_DIR}lib/Win32" DOC "Path to Intel Perceptual Computing SDK interface libraries")
endif()
if(INTELPERC_INCLUDE_DIR AND INTELPERC_LIBRARIES)
set(HAVE_INTELPERC TRUE)
else()
set(HAVE_INTELPERC FALSE)
message(WARNING "Intel Perceptual Computing SDK library directory (set by INTELPERC_LIB_DIR variable) is not found or does not have Intel Perceptual Computing SDK libraries.")
endif() #if(INTELPERC_INCLUDE_DIR AND INTELPERC_LIBRARIES)
mark_as_advanced(FORCE INTELPERC_LIBRARIES INTELPERC_INCLUDE_DIR)
+2 -4
View File
@@ -86,11 +86,9 @@ if(WITH_OPENGL)
endif()
endif(WITH_OPENGL)
# --- Carbon & Cocoa ---
# --- Cocoa ---
if(APPLE)
if(WITH_CARBON)
set(HAVE_CARBON YES)
elseif(NOT IOS AND CV_CLANG)
if(NOT IOS AND CV_CLANG)
set(HAVE_COCOA YES)
endif()
endif()
+5
View File
@@ -269,3 +269,8 @@ if(WITH_IMGCODEC_PXM)
elseif(DEFINED WITH_IMGCODEC_PXM)
set(HAVE_IMGCODEC_PXM OFF)
endif()
if(WITH_IMGCODEC_PFM)
set(HAVE_IMGCODEC_PFM ON)
elseif(DEFINED WITH_IMGCODEC_PFM)
set(HAVE_IMGCODEC_PFM OFF)
endif()
-325
View File
@@ -1,333 +1,8 @@
# ----------------------------------------------------------------------------
# Detect 3rd-party video IO libraries
# ----------------------------------------------------------------------------
ocv_clear_vars(HAVE_VFW)
if(WITH_VFW)
try_compile(HAVE_VFW
"${OpenCV_BINARY_DIR}"
"${OpenCV_SOURCE_DIR}/cmake/checks/vfwtest.cpp"
CMAKE_FLAGS "-DLINK_LIBRARIES:STRING=vfw32")
endif(WITH_VFW)
# --- GStreamer ---
ocv_clear_vars(HAVE_GSTREAMER)
# try to find gstreamer 1.x first if 0.10 was not requested
if(WITH_GSTREAMER AND NOT WITH_GSTREAMER_0_10)
if(WIN32)
SET(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_CURRENT_LIST_DIR}")
FIND_PACKAGE(GstreamerWindows)
IF(GSTREAMER_gstbase_LIBRARY AND GSTREAMER_gstvideo_LIBRARY AND GSTREAMER_gstapp_LIBRARY AND GSTREAMER_gstpbutils_LIBRARY AND GSTREAMER_gstriff_LIBRARY)
set(HAVE_GSTREAMER TRUE)
set(GSTREAMER_BASE_VERSION 1.0)
set(GSTREAMER_VIDEO_VERSION 1.0)
set(GSTREAMER_APP_VERSION 1.0)
set(GSTREAMER_RIFF_VERSION 1.0)
set(GSTREAMER_PBUTILS_VERSION 1.0)
ENDIF(GSTREAMER_gstbase_LIBRARY AND GSTREAMER_gstvideo_LIBRARY AND GSTREAMER_gstapp_LIBRARY AND GSTREAMER_gstpbutils_LIBRARY AND GSTREAMER_gstriff_LIBRARY)
else(WIN32)
ocv_check_modules(GSTREAMER-1.0 gstreamer-base-1.0 gstreamer-video-1.0 gstreamer-app-1.0 gstreamer-riff-1.0 gstreamer-pbutils-1.0)
if(HAVE_GSTREAMER-1.0)
set(HAVE_GSTREAMER TRUE)
ocv_append_build_options(VIDEOIO GSTREAMER-1.0)
set(GSTREAMER_BASE_VERSION ${GSTREAMER-1.0_gstreamer-base-1.0_VERSION})
set(GSTREAMER_VIDEO_VERSION ${GSTREAMER-1.0_gstreamer-video-1.0_VERSION})
set(GSTREAMER_APP_VERSION ${GSTREAMER-1.0_gstreamer-app-1.0_VERSION})
set(GSTREAMER_RIFF_VERSION ${GSTREAMER-1.0_gstreamer-riff-1.0_VERSION})
set(GSTREAMER_PBUTILS_VERSION ${GSTREAMER-1.0_gstreamer-pbutils-1.0_VERSION})
endif()
endif(WIN32)
endif()
# if gstreamer 1.x was not found, or we specified we wanted 0.10, try to find it
if(WITH_GSTREAMER AND NOT HAVE_GSTREAMER OR WITH_GSTREAMER_0_10)
ocv_check_modules(GSTREAMER-0.10 gstreamer-base-0.10 gstreamer-video-0.10 gstreamer-app-0.10 gstreamer-riff-0.10 gstreamer-pbutils-0.10)
if(HAVE_GSTREAMER-0.10)
set(HAVE_GSTREAMER TRUE)
ocv_append_build_options(VIDEOIO GSTREAMER-0.10)
set(GSTREAMER_BASE_VERSION ${GSTREAMER-0.10_gstreamer-base-0.10_VERSION})
set(GSTREAMER_VIDEO_VERSION ${GSTREAMER-0.10_gstreamer-video-0.10_VERSION})
set(GSTREAMER_APP_VERSION ${GSTREAMER-0.10_gstreamer-app-0.10_VERSION})
set(GSTREAMER_RIFF_VERSION ${GSTREAMER-0.10_gstreamer-riff-0.10_VERSION})
set(GSTREAMER_PBUTILS_VERSION ${GSTREAMER-0.10_gstreamer-pbutils-0.10_VERSION})
endif()
endif()
# --- unicap ---
ocv_clear_vars(HAVE_UNICAP)
if(WITH_UNICAP)
ocv_check_modules(HAVE_UNICAP libunicap libucil)
if(HAVE_UNICAP)
ocv_append_build_options(VIDEOIO UNICAP)
endif()
endif()
# --- PvApi ---
ocv_clear_vars(HAVE_PVAPI)
if(WITH_PVAPI)
find_path(PVAPI_INCLUDE_PATH "PvApi.h"
PATHS /usr/local /opt /usr ENV ProgramFiles ENV ProgramW6432
PATH_SUFFIXES include "Allied Vision Technologies/GigESDK/inc-pc" "AVT GigE SDK/inc-pc" "GigESDK/inc-pc"
DOC "The path to PvAPI header")
if(PVAPI_INCLUDE_PATH)
if(X86 AND NOT WIN32)
set(PVAPI_SDK_SUBDIR x86)
elseif(X86_64)
set(PVAPI_SDK_SUBDIR x64)
elseif(ARM)
set(PVAPI_SDK_SUBDIR arm)
endif()
get_filename_component(_PVAPI_LIBRARY_HINT "${PVAPI_INCLUDE_PATH}/../lib-pc" ABSOLUTE)
find_library(PVAPI_LIBRARY NAMES "PvAPI" PATHS "${_PVAPI_LIBRARY_HINT}")
if(PVAPI_LIBRARY)
if(WIN32)
if(MINGW)
set(PVAPI_DEFINITIONS "-DPVDECL=__stdcall")
endif(MINGW)
endif()
set(HAVE_PVAPI TRUE)
endif()
endif(PVAPI_INCLUDE_PATH)
endif(WITH_PVAPI)
# --- GigEVisionSDK ---
ocv_clear_vars(HAVE_GIGE_API)
if(WITH_GIGEAPI)
find_path(GIGEAPI_INCLUDE_PATH "GigEVisionSDK.h"
PATHS /usr/local /var /opt /usr ENV ProgramFiles ENV ProgramW6432
PATH_SUFFIXES include "Smartek Vision Technologies/GigEVisionSDK/gige_cpp" "GigEVisionSDK/gige_cpp" "GigEVisionSDK/gige_c"
DOC "The path to Smartek GigEVisionSDK header")
FIND_LIBRARY(GIGEAPI_LIBRARIES NAMES GigEVisionSDK)
if(GIGEAPI_LIBRARIES AND GIGEAPI_INCLUDE_PATH)
set(HAVE_GIGE_API TRUE)
endif()
endif(WITH_GIGEAPI)
# --- Aravis SDK ---
ocv_clear_vars(HAVE_ARAVIS_API)
if(WITH_ARAVIS)
ocv_check_modules(ARAVIS_GLIB glib-2.0)
if(HAVE_ARAVIS_GLIB)
find_path(ARAVIS_INCLUDE_PATH "arv.h"
PATHS /usr/local /var /opt /usr ENV ProgramFiles ENV ProgramW6432
PATH_SUFFIXES include "aravis-0.6" "aravis-0.4"
DOC "The path to Aravis SDK headers")
find_library(ARAVIS_LIBRARIES NAMES "aravis-0.6" "aravis-0.4" )
if(ARAVIS_LIBRARIES AND ARAVIS_INCLUDE_PATH)
ocv_append_build_options(VIDEOIO ARAVIS_GLIB)
set(HAVE_ARAVIS_API TRUE)
endif()
else()
message("Can not build Aravis support without glib2")
endif()
endif(WITH_ARAVIS)
# --- Dc1394 ---
ocv_clear_vars(HAVE_DC1394 HAVE_DC1394_2)
if(WITH_1394)
if(WIN32 AND MINGW)
# TODO remove this, use pkgconfig from MinGW instead
find_path(CMU1394_INCLUDE_PATH "/1394common.h"
PATH_SUFFIXES include
DOC "The path to cmu1394 headers")
find_path(DC1394_2_INCLUDE_PATH "/dc1394/dc1394.h"
PATH_SUFFIXES include
DOC "The path to DC1394 2.x headers")
if(CMU1394_INCLUDE_PATH AND DC1394_2_INCLUDE_PATH)
set(CMU1394_LIB_DIR "${CMU1394_INCLUDE_PATH}/../lib" CACHE PATH "Full path of CMU1394 library directory")
set(DC1394_2_LIB_DIR "${DC1394_2_INCLUDE_PATH}/../lib" CACHE PATH "Full path of DC1394 2.x library directory")
if(EXISTS "${CMU1394_LIB_DIR}/lib1394camera.a" AND EXISTS "${DC1394_2_LIB_DIR}/libdc1394.a")
set(HAVE_DC1394_2 TRUE)
endif()
endif()
if(HAVE_DC1394_2)
ocv_parse_pkg(DC1394_2_VERSION "libdc1394-2" "${DC1394_2_LIB_DIR}/pkgconfig")
ocv_include_directories(${DC1394_2_INCLUDE_PATH})
set(VIDEOIO_LIBRARIES ${VIDEOIO_LIBRARIES}
"${DC1394_2_LIB_DIR}/libdc1394.a"
"${CMU1394_LIB_DIR}/lib1394camera.a")
endif()
endif()
if(NOT HAVE_DC1394_2)
ocv_check_modules(DC1394_2 libdc1394-2)
if(HAVE_DC1394_2)
ocv_append_build_options(VIDEOIO DC1394_2)
else()
ocv_check_modules(DC1394 libdc1394)
if(HAVE_DC1394)
ocv_append_build_options(VIDEOIO DC1394)
endif()
endif()
endif()
endif()
# --- xine ---
ocv_clear_vars(HAVE_XINE)
if(WITH_XINE)
ocv_check_modules(XINE libxine)
if(HAVE_XINE)
ocv_append_build_options(VIDEOIO XINE)
endif()
endif(WITH_XINE)
# --- V4L ---
ocv_clear_vars(HAVE_LIBV4L HAVE_CAMV4L HAVE_CAMV4L2 HAVE_VIDEOIO)
if(WITH_V4L)
if(WITH_LIBV4L)
ocv_check_modules(LIBV4L libv4l1 libv4l2)
if(HAVE_LIBV4L)
ocv_append_build_options(VIDEOIO LIBV4L)
endif()
endif()
CHECK_INCLUDE_FILE(linux/videodev.h HAVE_CAMV4L)
CHECK_INCLUDE_FILE(linux/videodev2.h HAVE_CAMV4L2)
CHECK_INCLUDE_FILE(sys/videoio.h HAVE_VIDEOIO)
endif(WITH_V4L)
# --- OpenNI ---
ocv_clear_vars(HAVE_OPENNI HAVE_OPENNI_PRIME_SENSOR_MODULE)
if(WITH_OPENNI)
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindOpenNI.cmake")
endif(WITH_OPENNI)
ocv_clear_vars(HAVE_OPENNI2)
if(WITH_OPENNI2)
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindOpenNI2.cmake")
endif(WITH_OPENNI2)
# --- XIMEA ---
ocv_clear_vars(HAVE_XIMEA)
if(WITH_XIMEA)
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindXimea.cmake")
if(XIMEA_FOUND)
set(HAVE_XIMEA TRUE)
endif()
endif(WITH_XIMEA)
# --- FFMPEG ---
ocv_clear_vars(HAVE_FFMPEG)
if(WITH_FFMPEG) # try FFmpeg autodetection
if(OPENCV_FFMPEG_USE_FIND_PACKAGE)
if(OPENCV_FFMPEG_USE_FIND_PACKAGE STREQUAL "1" OR OPENCV_FFMPEG_USE_FIND_PACKAGE STREQUAL "ON")
set(OPENCV_FFMPEG_USE_FIND_PACKAGE "FFMPEG")
endif()
find_package(${OPENCV_FFMPEG_USE_FIND_PACKAGE}) # Required components: AVCODEC AVFORMAT AVUTIL SWSCALE
if(FFMPEG_FOUND OR FFmpeg_FOUND)
set(HAVE_FFMPEG TRUE)
else()
message(STATUS "Can't find FFmpeg via find_package(${OPENCV_FFMPEG_USE_FIND_PACKAGE})")
endif()
elseif(WIN32 AND NOT ARM AND NOT OPENCV_FFMPEG_SKIP_DOWNLOAD)
include("${OpenCV_SOURCE_DIR}/3rdparty/ffmpeg/ffmpeg.cmake")
download_win_ffmpeg(FFMPEG_CMAKE_SCRIPT)
if(FFMPEG_CMAKE_SCRIPT)
set(HAVE_FFMPEG TRUE)
set(HAVE_FFMPEG_WRAPPER 1)
include("${FFMPEG_CMAKE_SCRIPT}")
endif()
elseif(PKG_CONFIG_FOUND)
ocv_check_modules(FFMPEG libavcodec libavformat libavutil libswscale)
ocv_check_modules(FFMPEG_libavresample libavresample)
if(FFMPEG_libavresample_FOUND)
ocv_append_build_options(FFMPEG FFMPEG_libavresample)
endif()
else()
message(STATUS "Can't find ffmpeg - 'pkg-config' utility is missing")
endif()
endif()
if(HAVE_FFMPEG
AND NOT HAVE_FFMPEG_WRAPPER
)
try_compile(__VALID_FFMPEG
"${OpenCV_BINARY_DIR}"
"${OpenCV_SOURCE_DIR}/cmake/checks/ffmpeg_test.cpp"
CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${FFMPEG_INCLUDE_DIRS}"
"-DLINK_DIRECTORIES:STRING=${FFMPEG_LIBRARY_DIRS}"
"-DLINK_LIBRARIES:STRING=${FFMPEG_LIBRARIES}"
OUTPUT_VARIABLE TRY_OUT
)
if(NOT __VALID_FFMPEG)
#message(FATAL_ERROR "FFMPEG: test check build log:\n${TRY_OUT}")
message(STATUS "WARNING: Can't build ffmpeg test code")
set(HAVE_FFMPEG FALSE)
else()
ocv_append_build_options(VIDEOIO FFMPEG)
endif()
endif()
# --- VideoInput/DirectShow ---
if(WITH_DSHOW)
if(MSVC_VERSION GREATER 1499)
set(HAVE_DSHOW 1)
elseif(NOT HAVE_DSHOW)
check_include_file(DShow.h HAVE_DSHOW)
endif()
endif(WITH_DSHOW)
# --- VideoInput/Microsoft Media Foundation ---
ocv_clear_vars(HAVE_MSMF)
if(WITH_MSMF)
check_include_file(Mfapi.h HAVE_MSMF)
set(HAVE_MSMF_DXVA "")
if(WITH_MSMF_DXVA)
check_include_file(D3D11.h D3D11_found)
check_include_file(D3d11_4.h D3D11_4_found)
if(D3D11_found AND D3D11_4_found)
set(HAVE_MSMF_DXVA YES)
endif()
endif()
endif()
# --- Extra HighGUI and VideoIO libs on Windows ---
if(WIN32)
list(APPEND HIGHGUI_LIBRARIES comctl32 gdi32 ole32 setupapi ws2_32)
if(HAVE_VFW)
list(APPEND VIDEOIO_LIBRARIES vfw32)
endif()
if(MINGW64)
list(APPEND VIDEOIO_LIBRARIES avifil32 avicap32 winmm msvfw32)
list(REMOVE_ITEM VIDEOIO_LIBRARIES vfw32)
elseif(MINGW)
list(APPEND VIDEOIO_LIBRARIES winmm)
endif()
endif(WIN32)
if(APPLE)
if(WITH_AVFOUNDATION)
set(HAVE_AVFOUNDATION YES)
endif()
if(NOT IOS)
if(WITH_QUICKTIME)
set(HAVE_QUICKTIME YES)
elseif(WITH_QTKIT)
set(HAVE_QTKIT YES)
endif()
endif()
endif(APPLE)
# --- Intel Perceptual Computing SDK ---
if(WITH_INTELPERC)
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindIntelPerCSDK.cmake")
endif(WITH_INTELPERC)
if(WITH_MFX)
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVDetectMediaSDK.cmake")
endif()
# --- gPhoto2 ---
ocv_clear_vars(HAVE_GPHOTO2)
if(WITH_GPHOTO2)
ocv_check_modules(GPHOTO2 libgphoto2)
if(HAVE_GPHOTO2)
ocv_append_build_options(VIDEOIO GPHOTO2)
endif()
endif()
# --- VA & VA_INTEL ---
if(WITH_VA_INTEL)
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindVA_INTEL.cmake")
-89
View File
@@ -1,89 +0,0 @@
# Main variables:
# OPENNI_LIBRARY and OPENNI_INCLUDES to link OpenCV modules with OpenNI
# HAVE_OPENNI for conditional compilation OpenCV with/without OpenNI
if(NOT "${OPENNI_LIB_DIR}" STREQUAL "${OPENNI_LIB_DIR_INTERNAL}")
unset(OPENNI_LIBRARY CACHE)
unset(OPENNI_LIB_DIR CACHE)
endif()
if(NOT "${OPENNI_INCLUDE_DIR}" STREQUAL "${OPENNI_INCLUDE_DIR_INTERNAL}")
unset(OPENNI_INCLUDES CACHE)
unset(OPENNI_INCLUDE_DIR CACHE)
endif()
if(NOT "${OPENNI_PRIME_SENSOR_MODULE_BIN_DIR}" STREQUAL "${OPENNI_PRIME_SENSOR_MODULE_BIN_DIR_INTERNAL}")
unset(OPENNI_PRIME_SENSOR_MODULE CACHE)
unset(OPENNI_PRIME_SENSOR_MODULE_BIN_DIR CACHE)
endif()
if(WIN32)
if(NOT (MSVC64 OR MINGW64))
find_file(OPENNI_INCLUDES "XnCppWrapper.h" PATHS "$ENV{OPEN_NI_INSTALL_PATH}Include" DOC "OpenNI c++ interface header")
find_library(OPENNI_LIBRARY "OpenNI" PATHS $ENV{OPEN_NI_LIB} DOC "OpenNI library")
else()
find_file(OPENNI_INCLUDES "XnCppWrapper.h" PATHS "$ENV{OPEN_NI_INSTALL_PATH64}Include" DOC "OpenNI c++ interface header")
find_library(OPENNI_LIBRARY "OpenNI64" PATHS $ENV{OPEN_NI_LIB64} DOC "OpenNI library")
endif()
elseif(UNIX OR APPLE)
find_file(OPENNI_INCLUDES "XnCppWrapper.h" PATHS "/usr/include/ni" "/usr/include/openni" DOC "OpenNI c++ interface header")
find_library(OPENNI_LIBRARY "OpenNI" PATHS "/usr/lib" DOC "OpenNI library")
endif()
if(OPENNI_LIBRARY AND OPENNI_INCLUDES)
set(HAVE_OPENNI TRUE)
# the check: are PrimeSensor Modules for OpenNI installed
if(WIN32)
if(NOT (MSVC64 OR MINGW64))
find_file(OPENNI_PRIME_SENSOR_MODULE "XnCore.dll" PATHS "$ENV{OPEN_NI_INSTALL_PATH}../PrimeSense/Sensor/Bin" "$ENV{OPEN_NI_INSTALL_PATH}../PrimeSense/SensorKinect/Bin" DOC "Core library of PrimeSensor Modules for OpenNI")
else()
find_file(OPENNI_PRIME_SENSOR_MODULE "XnCore64.dll" PATHS "$ENV{OPEN_NI_INSTALL_PATH64}../PrimeSense/Sensor/Bin64" "$ENV{OPEN_NI_INSTALL_PATH64}../PrimeSense/SensorKinect/Bin64" DOC "Core library of PrimeSensor Modules for OpenNI")
endif()
elseif(UNIX OR APPLE)
find_library(OPENNI_PRIME_SENSOR_MODULE "XnCore" PATHS "/usr/lib" DOC "Core library of PrimeSensor Modules for OpenNI")
endif()
if(OPENNI_PRIME_SENSOR_MODULE)
set(HAVE_OPENNI_PRIME_SENSOR_MODULE TRUE)
endif()
endif() #if(OPENNI_LIBRARY AND OPENNI_INCLUDES)
get_filename_component(OPENNI_LIB_DIR "${OPENNI_LIBRARY}" PATH)
get_filename_component(OPENNI_INCLUDE_DIR ${OPENNI_INCLUDES} PATH)
get_filename_component(OPENNI_PRIME_SENSOR_MODULE_BIN_DIR "${OPENNI_PRIME_SENSOR_MODULE}" PATH)
if(HAVE_OPENNI)
set(OPENNI_LIB_DIR "${OPENNI_LIB_DIR}" CACHE PATH "Path to OpenNI libraries" FORCE)
set(OPENNI_INCLUDE_DIR "${OPENNI_INCLUDE_DIR}" CACHE PATH "Path to OpenNI headers" FORCE)
set(OPENNI_PRIME_SENSOR_MODULE_BIN_DIR "${OPENNI_PRIME_SENSOR_MODULE_BIN_DIR}" CACHE PATH "Path to OpenNI PrimeSensor Module binaries" FORCE)
endif()
if(OPENNI_LIBRARY)
set(OPENNI_LIB_DIR_INTERNAL "${OPENNI_LIB_DIR}" CACHE INTERNAL "This is the value of the last time OPENNI_LIB_DIR was set successfully." FORCE)
else()
message( WARNING, " OpenNI library directory (set by OPENNI_LIB_DIR variable) is not found or does not have OpenNI libraries." )
endif()
if(OPENNI_INCLUDES)
set(OPENNI_INCLUDE_DIR_INTERNAL "${OPENNI_INCLUDE_DIR}" CACHE INTERNAL "This is the value of the last time OPENNI_INCLUDE_DIR was set successfully." FORCE)
else()
message( WARNING, " OpenNI include directory (set by OPENNI_INCLUDE_DIR variable) is not found or does not have OpenNI include files." )
endif()
if(OPENNI_PRIME_SENSOR_MODULE)
set(OPENNI_PRIME_SENSOR_MODULE_BIN_DIR_INTERNAL "${OPENNI_PRIME_SENSOR_MODULE_BIN_DIR}" CACHE INTERNAL "This is the value of the last time OPENNI_PRIME_SENSOR_MODULE_BIN_DIR was set successfully." FORCE)
else()
message( WARNING, " PrimeSensor Module binaries directory (set by OPENNI_PRIME_SENSOR_MODULE_BIN_DIR variable) is not found or does not have PrimeSensor Module binaries." )
endif()
mark_as_advanced(FORCE OPENNI_PRIME_SENSOR_MODULE)
mark_as_advanced(FORCE OPENNI_LIBRARY)
mark_as_advanced(FORCE OPENNI_INCLUDES)
if(HAVE_OPENNI)
ocv_parse_header("${OPENNI_INCLUDE_DIR}/XnVersion.h" OPENNI_VERSION_LINES XN_MAJOR_VERSION XN_MINOR_VERSION XN_MAINTENANCE_VERSION XN_BUILD_VERSION)
if(XN_MAJOR_VERSION)
set(OPENNI_VERSION_STRING ${XN_MAJOR_VERSION}.${XN_MINOR_VERSION}.${XN_MAINTENANCE_VERSION} CACHE INTERNAL "OpenNI version")
set(OPENNI_VERSION_BUILD ${XN_BUILD_VERSION} CACHE INTERNAL "OpenNI build version")
endif()
endif()
-61
View File
@@ -1,61 +0,0 @@
# Main variables:
# OPENNI2_LIBRARY and OPENNI2_INCLUDES to link OpenCV modules with OpenNI2
# HAVE_OPENNI2 for conditional compilation OpenCV with/without OpenNI2
if(NOT "${OPENNI2_LIB_DIR}" STREQUAL "${OPENNI2_LIB_DIR_INTERNAL}")
unset(OPENNI2_LIBRARY CACHE)
unset(OPENNI2_LIB_DIR CACHE)
endif()
if(NOT "${OPENNI2_INCLUDE_DIR}" STREQUAL "${OPENNI2_INCLUDE_DIR_INTERNAL}")
unset(OPENNI2_INCLUDES CACHE)
unset(OPENNI2_INCLUDE_DIR CACHE)
endif()
if(WIN32)
if(NOT (MSVC64 OR MINGW64))
find_file(OPENNI2_INCLUDES "OpenNI.h" PATHS $ENV{OPENNI2_INCLUDE} "$ENV{OPEN_NI_INSTALL_PATH}Include" DOC "OpenNI2 c++ interface header")
find_library(OPENNI2_LIBRARY "OpenNI2" PATHS $ENV{OPENNI2_LIB} DOC "OpenNI2 library")
else()
find_file(OPENNI2_INCLUDES "OpenNI.h" PATHS $ENV{OPENNI2_INCLUDE64} "$ENV{OPEN_NI_INSTALL_PATH64}Include" DOC "OpenNI2 c++ interface header")
find_library(OPENNI2_LIBRARY "OpenNI2" PATHS $ENV{OPENNI2_LIB64} DOC "OpenNI2 library")
endif()
elseif(UNIX OR APPLE)
find_file(OPENNI2_INCLUDES "OpenNI.h" PATHS "/usr/include/ni2" "/usr/include/openni2" $ENV{OPENNI2_INCLUDE} DOC "OpenNI2 c++ interface header")
find_library(OPENNI2_LIBRARY "OpenNI2" PATHS "/usr/lib" $ENV{OPENNI2_REDIST} DOC "OpenNI2 library")
endif()
if(OPENNI2_LIBRARY AND OPENNI2_INCLUDES)
set(HAVE_OPENNI2 TRUE)
endif() #if(OPENNI2_LIBRARY AND OPENNI2_INCLUDES)
get_filename_component(OPENNI2_LIB_DIR "${OPENNI2_LIBRARY}" PATH)
get_filename_component(OPENNI2_INCLUDE_DIR ${OPENNI2_INCLUDES} PATH)
if(HAVE_OPENNI2)
set(OPENNI2_LIB_DIR "${OPENNI2_LIB_DIR}" CACHE PATH "Path to OpenNI2 libraries" FORCE)
set(OPENNI2_INCLUDE_DIR "${OPENNI2_INCLUDE_DIR}" CACHE PATH "Path to OpenNI2 headers" FORCE)
endif()
if(OPENNI2_LIBRARY)
set(OPENNI2_LIB_DIR_INTERNAL "${OPENNI2_LIB_DIR}" CACHE INTERNAL "This is the value of the last time OPENNI_LIB_DIR was set successfully." FORCE)
else()
message( WARNING, " OpenNI2 library directory (set by OPENNI2_LIB_DIR variable) is not found or does not have OpenNI2 libraries." )
endif()
if(OPENNI2_INCLUDES)
set(OPENNI2_INCLUDE_DIR_INTERNAL "${OPENNI2_INCLUDE_DIR}" CACHE INTERNAL "This is the value of the last time OPENNI2_INCLUDE_DIR was set successfully." FORCE)
else()
message( WARNING, " OpenNI2 include directory (set by OPENNI2_INCLUDE_DIR variable) is not found or does not have OpenNI2 include files." )
endif()
mark_as_advanced(FORCE OPENNI2_LIBRARY)
mark_as_advanced(FORCE OPENNI2_INCLUDES)
if(HAVE_OPENNI2)
ocv_parse_header("${OPENNI2_INCLUDE_DIR}/OniVersion.h" ONI_VERSION_LINE ONI_VERSION_MAJOR ONI_VERSION_MINOR ONI_VERSION_MAINTENANCE ONI_VERSION_BUILD)
if(ONI_VERSION_MAJOR)
set(OPENNI2_VERSION_STRING ${ONI_VERSION_MAJOR}.${ONI_VERSION_MINOR}.${ONI_VERSION_MAINTENANCE} CACHE INTERNAL "OpenNI2 version")
set(OPENNI2_VERSION_BUILD ${ONI_VERSION_BUILD} CACHE INTERNAL "OpenNI2 build version")
endif()
endif()
-52
View File
@@ -1,52 +0,0 @@
# - Find XIMEA
# This module finds if XIMEA Software package is installed
# and determines where the binaries and header files are.
# This code sets the following variables:
#
# XIMEA_FOUND - True if XIMEA API found
# XIMEA_PATH: - Path to the XIMEA API folder
# XIMEA_LIBRARY_DIR - XIMEA libraries folder
#
# Created: 5 Aug 2011 by Marian Zajko (marian.zajko@ximea.com)
# Updated: 25 June 2012 by Igor Kuzmin (parafin@ximea.com)
# Updated: 22 October 2012 by Marian Zajko (marian.zajko@ximea.com)
#
set(XIMEA_FOUND)
set(XIMEA_PATH)
set(XIMEA_LIBRARY_DIR)
if(WIN32)
# Try to find the XIMEA API path in registry.
GET_FILENAME_COMPONENT(XIMEA_PATH "[HKEY_CURRENT_USER\\Software\\XIMEA\\CamSupport\\API;Path]" ABSOLUTE)
if(EXISTS ${XIMEA_PATH})
set(XIMEA_FOUND 1)
# set LIB folders
if(X86_64)
set(XIMEA_LIBRARY_DIR "${XIMEA_PATH}/x64")
else()
set(XIMEA_LIBRARY_DIR "${XIMEA_PATH}/x86")
endif()
else()
set(XIMEA_FOUND 0)
endif()
elseif(APPLE)
if(EXISTS /Library/Frameworks/m3api.framework)
set(XIMEA_FOUND 1)
else()
set(XIMEA_FOUND 0)
endif()
else()
if(EXISTS /opt/XIMEA)
set(XIMEA_FOUND 1)
# set folders
set(XIMEA_PATH /opt/XIMEA/include)
else()
set(XIMEA_FOUND 0)
endif()
endif()
mark_as_advanced(FORCE XIMEA_FOUND)
mark_as_advanced(FORCE XIMEA_PATH)
mark_as_advanced(FORCE XIMEA_LIBRARY_DIR)
+1 -3
View File
@@ -22,8 +22,6 @@ set(OPENCV_ABI_HEADERS "{RELPATH}/${OPENCV_INCLUDE_INSTALL_PATH}")
# Libraries
set(OPENCV_ABI_LIBRARIES "{RELPATH}/${OPENCV_LIB_INSTALL_PATH}")
set(OPENCV_ABI_SKIP_HEADERS "")
set(OPENCV_ABI_SKIP_LIBRARIES "")
foreach(mod ${OPENCV_MODULES_BUILD})
string(REGEX REPLACE "^opencv_" "" mod "${mod}")
if(NOT OPENCV_MODULE_opencv_${mod}_CLASS STREQUAL "PUBLIC"
@@ -44,7 +42,7 @@ string(REPLACE ";" "\n " OPENCV_ABI_SKIP_HEADERS "${OPENCV_ABI_SKIP_HEADERS}"
string(REPLACE ";" "\n " OPENCV_ABI_SKIP_LIBRARIES "${OPENCV_ABI_SKIP_LIBRARIES}")
# Options
set(OPENCV_ABI_GCC_OPTIONS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} -DOPENCV_ABI_CHECK=1")
set(OPENCV_ABI_GCC_OPTIONS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} -DOPENCV_ABI_CHECK=1 -DCV_DNN_DONT_ADD_INLINE_NS=1")
string(REGEX REPLACE "([^ ]) +([^ ])" "\\1\\n \\2" OPENCV_ABI_GCC_OPTIONS "${OPENCV_ABI_GCC_OPTIONS}")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/templates/opencv_abi.xml.in" "${path1}.base")
+1 -1
View File
@@ -48,7 +48,7 @@ if(ANDROID)
string(REPLACE "opencv_" "" OPENCV_MODULES_CONFIGMAKE "${OPENCV_MODULES_CONFIGMAKE}")
if(BUILD_FAT_JAVA_LIB)
set(OPENCV_LIBS_CONFIGMAKE java3)
set(OPENCV_LIBS_CONFIGMAKE java4)
else()
set(OPENCV_LIBS_CONFIGMAKE "${OPENCV_MODULES_CONFIGMAKE}")
endif()
+4 -4
View File
@@ -33,7 +33,7 @@ endif()
# -------------------------------------------------------------------------------------------
# Part 1/3: ${BIN_DIR}/OpenCVConfig.cmake -> For use *without* "make install"
# -------------------------------------------------------------------------------------------
set(OpenCV_INCLUDE_DIRS_CONFIGCMAKE "\"${OPENCV_CONFIG_FILE_INCLUDE_DIR}\" \"${OpenCV_SOURCE_DIR}/include\" \"${OpenCV_SOURCE_DIR}/include/opencv\"")
set(OpenCV_INCLUDE_DIRS_CONFIGCMAKE "\"${OPENCV_CONFIG_FILE_INCLUDE_DIR}\" \"${OpenCV_SOURCE_DIR}/include\"")
foreach(m ${OPENCV_MODULES_BUILD})
if(EXISTS "${OPENCV_MODULE_${m}_LOCATION}/include")
@@ -41,7 +41,7 @@ foreach(m ${OPENCV_MODULES_BUILD})
endif()
endforeach()
export(TARGETS ${OpenCVModules_TARGETS} FILE "${CMAKE_BINARY_DIR}/OpenCVModules.cmake")
export(EXPORT OpenCVModules FILE "${CMAKE_BINARY_DIR}/OpenCVModules.cmake")
if(TARGET ippicv AND NOT BUILD_SHARED_LIBS)
set(USE_IPPICV TRUE)
@@ -69,9 +69,9 @@ configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/OpenCVConfig-version.cmake.
# -------------------------------------------------------------------------------------------
file(RELATIVE_PATH OpenCV_INSTALL_PATH_RELATIVE_CONFIGCMAKE "${CMAKE_INSTALL_PREFIX}/${OPENCV_CONFIG_INSTALL_PATH}/" ${CMAKE_INSTALL_PREFIX})
if (IS_ABSOLUTE ${OPENCV_INCLUDE_INSTALL_PATH})
set(OpenCV_INCLUDE_DIRS_CONFIGCMAKE "\"${OPENCV_INCLUDE_INSTALL_PATH}\" \"${OPENCV_INCLUDE_INSTALL_PATH}/opencv\"")
set(OpenCV_INCLUDE_DIRS_CONFIGCMAKE "\"${OPENCV_INCLUDE_INSTALL_PATH}\"")
else()
set(OpenCV_INCLUDE_DIRS_CONFIGCMAKE "\"\${OpenCV_INSTALL_PATH}/${OPENCV_INCLUDE_INSTALL_PATH}\" \"\${OpenCV_INSTALL_PATH}/${OPENCV_INCLUDE_INSTALL_PATH}/opencv\"")
set(OpenCV_INCLUDE_DIRS_CONFIGCMAKE "\"\${OpenCV_INSTALL_PATH}/${OPENCV_INCLUDE_INSTALL_PATH}\"")
endif()
if(USE_IPPICV)
+2 -2
View File
@@ -43,9 +43,9 @@ endmacro()
if(NOT DEFINED CMAKE_HELPER_SCRIPT)
if(INSTALL_TO_MANGLED_PATHS)
set(OPENCV_PC_FILE_NAME "opencv-${OPENCV_VERSION}.pc")
ocv_update(OPENCV_PC_FILE_NAME "opencv-${OPENCV_VERSION}.pc")
else()
set(OPENCV_PC_FILE_NAME opencv.pc)
ocv_update(OPENCV_PC_FILE_NAME opencv4.pc)
endif()
# build the list of opencv libs and dependencies for all modules
+1 -1
View File
@@ -15,7 +15,7 @@ endif()
if(INSTALL_TO_MANGLED_PATHS)
ocv_update(OPENCV_SETUPVARS_FILENAME "setup_vars_opencv-${OPENCV_VERSION}${OPENCV_SCRIPT_EXTENSION}")
else()
ocv_update(OPENCV_SETUPVARS_FILENAME setup_vars_opencv3${OPENCV_SCRIPT_EXTENSION})
ocv_update(OPENCV_SETUPVARS_FILENAME setup_vars_opencv4${OPENCV_SCRIPT_EXTENSION})
endif()
##### build directory
+2 -1
View File
@@ -1,5 +1,6 @@
set(MIN_VER_CMAKE 2.8.12.2)
set(MIN_VER_CMAKE 3.5.1)
set(MIN_VER_CUDA 6.5)
set(MIN_VER_CUDNN 6)
set(MIN_VER_PYTHON2 2.7)
set(MIN_VER_PYTHON3 3.2)
set(MIN_VER_ZLIB 1.2.3)
+27 -1
View File
@@ -33,7 +33,7 @@
# The verbose template for OpenCV module:
#
# ocv_add_module(modname <dependencies>)
# ocv_glob_module_sources(([EXCLUDE_CUDA] <extra sources&headers>)
# ocv_glob_module_sources(([EXCLUDE_OPENCL] [EXCLUDE_CUDA] <extra sources&headers>)
# or glob them manually and ocv_set_module_sources(...)
# ocv_module_include_directories(<extra include directories>)
# ocv_create_module()
@@ -185,6 +185,7 @@ macro(ocv_add_module _name)
# add self to the world dependencies
if((NOT DEFINED OPENCV_MODULE_IS_PART_OF_WORLD
AND NOT OPENCV_MODULE_${the_module}_CLASS STREQUAL "BINDINGS"
AND (NOT DEFINED OPENCV_MODULE_${the_module}_IS_PART_OF_WORLD OR OPENCV_MODULE_${the_module}_IS_PART_OF_WORLD)
AND (NOT OPENCV_PROCESSING_EXTRA_MODULES OR NOT OPENCV_WORLD_EXCLUDE_EXTRA_MODULES)
AND (NOT BUILD_SHARED_LIBS OR NOT "x${OPENCV_MODULE_TYPE}" STREQUAL "xSTATIC"))
OR OPENCV_MODULE_IS_PART_OF_WORLD
@@ -779,6 +780,7 @@ macro(ocv_glob_module_sources)
"${CMAKE_CURRENT_LIST_DIR}/include/opencv2/${name}/hal/*.h"
"${CMAKE_CURRENT_LIST_DIR}/include/opencv2/${name}/utils/*.hpp"
"${CMAKE_CURRENT_LIST_DIR}/include/opencv2/${name}/utils/*.h"
"${CMAKE_CURRENT_LIST_DIR}/include/opencv2/${name}/legacy/*.h"
)
file(GLOB lib_hdrs_detail
"${CMAKE_CURRENT_LIST_DIR}/include/opencv2/${name}/detail/*.hpp"
@@ -1015,6 +1017,8 @@ macro(_ocv_create_module)
string(REGEX REPLACE "^.*opencv2/" "opencv2/" hdr2 "${hdr}")
if(NOT hdr2 MATCHES "private" AND hdr2 MATCHES "^(opencv2/?.*)/[^/]+.h(..)?$" )
install(FILES ${hdr} OPTIONAL DESTINATION "${OPENCV_INCLUDE_INSTALL_PATH}/${CMAKE_MATCH_1}" COMPONENT dev)
else()
#message("Header file will be NOT installed: ${hdr}")
endif()
endforeach()
endif()
@@ -1149,6 +1153,15 @@ function(ocv_add_perf_tests)
ocv_target_link_libraries(${the_target} LINK_PRIVATE ${perf_deps} ${OPENCV_MODULE_${the_module}_DEPS} ${OPENCV_LINKER_LIBS} ${OPENCV_PERF_${the_module}_DEPS})
add_dependencies(opencv_perf_tests ${the_target})
if(TARGET opencv_videoio_plugins)
add_dependencies(${the_target} opencv_videoio_plugins)
endif()
if(HAVE_HPX)
message("Linking HPX to Perf test of module ${name}")
ocv_target_link_libraries(${the_target} LINK_PRIVATE "${HPX_LIBRARIES}")
endif()
set_target_properties(${the_target} PROPERTIES LABELS "${OPENCV_MODULE_${the_module}_LABEL};PerfTest")
set_source_files_properties(${OPENCV_PERF_${the_module}_SOURCES} ${${the_target}_pch}
PROPERTIES LABELS "${OPENCV_MODULE_${the_module}_LABEL};PerfTest")
@@ -1234,6 +1247,15 @@ function(ocv_add_accuracy_tests)
ocv_target_link_libraries(${the_target} LINK_PRIVATE ${test_deps} ${OPENCV_MODULE_${the_module}_DEPS} ${OPENCV_LINKER_LIBS} ${OPENCV_TEST_${the_module}_DEPS})
add_dependencies(opencv_tests ${the_target})
if(TARGET opencv_videoio_plugins)
add_dependencies(${the_target} opencv_videoio_plugins)
endif()
if(HAVE_HPX)
message("Linking HPX to Perf test of module ${name}")
ocv_target_link_libraries(${the_target} LINK_PRIVATE "${HPX_LIBRARIES}")
endif()
set_target_properties(${the_target} PROPERTIES LABELS "${OPENCV_MODULE_${the_module}_LABEL};AccuracyTest")
set_source_files_properties(${OPENCV_TEST_${the_module}_SOURCES} ${${the_target}_pch}
PROPERTIES LABELS "${OPENCV_MODULE_${the_module}_LABEL};AccuracyTest")
@@ -1311,6 +1333,10 @@ function(ocv_add_samples)
endif()
add_dependencies(${parent_target} ${the_target})
if(TARGET opencv_videoio_plugins)
add_dependencies(${the_target} opencv_videoio_plugins)
endif()
if(WIN32)
install(TARGETS ${the_target} RUNTIME DESTINATION "samples/${module_id}" COMPONENT samples)
endif()
+10 -5
View File
@@ -99,10 +99,15 @@ if(HAVE_CUDA)
set(CPACK_DEB_libs_PACKAGE_DEPENDS "${CPACK_DEB_libs_PACKAGE_DEPENDS}, cuda-cufft-${cuda_version_suffix}")
set(CPACK_DEB_dev_PACKAGE_DEPENDS "${CPACK_DEB_dev_PACKAGE_DEPENDS}, cuda-cufft-dev-${cuda_version_suffix}")
endif()
if(HAVE_HAVE_CUBLAS)
if(HAVE_CUBLAS)
set(CPACK_DEB_libs_PACKAGE_DEPENDS "${CPACK_DEB_libs_PACKAGE_DEPENDS}, cuda-cublas-${cuda_version_suffix}")
set(CPACK_DEB_dev_PACKAGE_DEPENDS "${CPACK_DEB_dev_PACKAGE_DEPENDS}, cuda-cublas-dev-${cuda_version_suffix}")
endif()
if(HAVE_CUDNN)
# TODO
#ex: libcudnn7_7.5.1.10-1+cuda10.1_amd64
#ex: libcudnn7-dev_7.5.1.10-1+cuda10.1_amd64
endif()
endif()
set(CPACK_COMPONENT_dev_DEPENDS libs)
endif()
@@ -123,7 +128,7 @@ foreach(module calib3d core cudaarithm cudabgsegm cudacodec cudafeatures2d cudaf
cudev features2d flann hal highgui imgcodecs imgproc ml objdetect ocl
photo shape stitching superres ts video videoio videostab viz)
if(HAVE_opencv_${module})
list(APPEND STD_OPENCV_LIBS "libopencv-${module}3.0")
list(APPEND STD_OPENCV_LIBS "libopencv-${module}4.0")
list(APPEND STD_OPENCV_DEV "libopencv-${module}-dev")
endif()
endforeach()
@@ -140,9 +145,9 @@ set(CPACK_COMPONENT_PYTHON_CONFLICTS python-opencv)
set(CPACK_COMPONENT_PYTHON_PROVIDES python-opencv)
set(CPACK_COMPONENT_PYTHON_REPLACES python-opencv)
set(CPACK_COMPONENT_JAVA_CONFLICTS "libopencv3.0-java, libopencv3.0-jni")
set(CPACK_COMPONENT_JAVA_PROVIDES "libopencv3.0-java, libopencv3.0-jni")
set(CPACK_COMPONENT_JAVA_REPLACES "libopencv3.0-java, libopencv3.0-jni")
set(CPACK_COMPONENT_JAVA_CONFLICTS "libopencv4.0-java, libopencv4.0-jni")
set(CPACK_COMPONENT_JAVA_PROVIDES "libopencv4.0-java, libopencv4.0-jni")
set(CPACK_COMPONENT_JAVA_REPLACES "libopencv4.0-java, libopencv4.0-jni")
set(CPACK_COMPONENT_DOCS_CONFLICTS opencv-doc)
set(CPACK_COMPONENT_SAMPLES_CONFLICTS opencv-doc)
-9
View File
@@ -1317,15 +1317,6 @@ macro(ocv_parse_header2 LIBNAME HDR_PATH VARNAME)
endif()
endmacro()
# TODO remove this
# read single version info from the pkg file
macro(ocv_parse_pkg ver_varname LIBNAME PKG_PATH)
if(EXISTS "${PKG_PATH}/${LIBNAME}.pc")
file(STRINGS "${PKG_PATH}/${LIBNAME}.pc" line_to_parse REGEX "^Version:[ \t]+[0-9.]*.*$" LIMIT_COUNT 1)
STRING(REGEX REPLACE ".*Version: ([^ ]+).*" "\\1" ${ver_varname} "${line_to_parse}" )
endif()
endmacro()
################################################################################################
# short command to setup source group
function(ocv_source_group group)
@@ -8,6 +8,25 @@ if(DEFINED ANDROID_NDK_REVISION AND ANDROID_NDK_REVISION MATCHES "(1[56])([0-9]+
set(ANDROID_NDK_REVISION "${ANDROID_NDK_REVISION}" CACHE INTERNAL "Android NDK revision")
endif()
# fixup -g option: https://github.com/opencv/opencv/issues/8460#issuecomment-434249750
if(INSTALL_CREATE_DISTRIB
AND (NOT BUILD_WITH_DEBUG_INFO AND NOT CMAKE_BUILD_TYPE MATCHES "Debug")
AND NOT OPENCV_SKIP_ANDROID_G_OPTION_FIX
)
if(" ${CMAKE_CXX_FLAGS} " MATCHES " -g ")
message(STATUS "Android: fixup -g compiler option from Android toolchain")
endif()
string(REPLACE " -g " " " CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} ")
string(REPLACE " -g " " " CMAKE_C_FLAGS " ${CMAKE_C_FLAGS} ")
string(REPLACE " -g " " " CMAKE_ASM_FLAGS " ${CMAKE_ASM_FLAGS} ")
if(NOT " ${CMAKE_CXX_FLAGS_DEBUG}" MATCHES " -g")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g")
endif()
if(NOT " ${CMAKE_C_FLAGS_DEBUG}" MATCHES " -g")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g")
endif()
endif()
# https://developer.android.com/studio/command-line/variables.html
ocv_check_environment_variables(ANDROID_SDK_ROOT ANDROID_HOME ANDROID_SDK)
+2 -2
View File
@@ -201,8 +201,8 @@ macro(add_android_project target path)
LIBRARY_OUTPUT_DIRECTORY "${android_proj_bin_dir}/libs/${ANDROID_NDK_ABI_NAME}"
)
if (NOT (CMAKE_BUILD_TYPE MATCHES "debug"))
add_custom_command(TARGET ${JNI_LIB_NAME} POST_BUILD COMMAND ${CMAKE_STRIP} --strip-unneeded "$<TARGET_FILE:${JNI_LIB_NAME}>")
if(NOT BUILD_WITH_DEBUG_INFO AND NOT CMAKE_BUILD_TYPE MATCHES "Debug")
add_custom_command(TARGET ${JNI_LIB_NAME} POST_BUILD COMMAND ${CMAKE_STRIP} --strip-unneeded "$<TARGET_FILE:${JNI_LIB_NAME}>")
endif()
endif()
endif()
+162 -4
View File
@@ -1,5 +1,163 @@
message(FATAL_ERROR "
Android gradle-based build/projects are not supported in this version of OpenCV.
You need to downgrade Android SDK Tools to version 25.2.5.
Details: https://github.com/opencv/opencv/issues/8460
# https://developer.android.com/studio/releases/gradle-plugin
set(ANDROID_GRADLE_PLUGIN_VERSION "3.2.1" CACHE STRING "Android Gradle Plugin version (3.0+)")
message(STATUS "Android Gradle Plugin version: ${ANDROID_GRADLE_PLUGIN_VERSION}")
set(ANDROID_COMPILE_SDK_VERSION "26" CACHE STRING "Android compileSdkVersion")
set(ANDROID_MIN_SDK_VERSION "21" CACHE STRING "Android minSdkVersion")
set(ANDROID_TARGET_SDK_VERSION "26" CACHE STRING "Android minSdkVersion")
set(ANDROID_BUILD_BASE_DIR "${OpenCV_BINARY_DIR}/opencv_android" CACHE INTERNAL "")
set(ANDROID_TMP_INSTALL_BASE_DIR "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/install/opencv_android")
set(ANDROID_INSTALL_SAMPLES_DIR "samples")
set(ANDROID_BUILD_ABI_FILTER "
reset()
include '${ANDROID_ABI}'
")
set(ANDROID_INSTALL_ABI_FILTER "
//reset()
//include 'armeabi-v7a'
//include 'arm64-v8a'
//include 'x86'
//include 'x86_64'
")
if(NOT INSTALL_CREATE_DISTRIB)
set(ANDROID_INSTALL_ABI_FILTER "${ANDROID_BUILD_ABI_FILTER}")
endif()
# BUG: Ninja generator generates broken targets with ANDROID_ABI_FILTER name (CMake 3.11.2)
#set(__spaces " ")
#string(REPLACE "\n" "\n${__spaces}" ANDROID_ABI_FILTER "${__spaces}${ANDROID_BUILD_ABI_FILTER}")
#string(REPLACE REGEX "[ ]+$" "" ANDROID_ABI_FILTER "${ANDROID_ABI_FILTER}")
set(ANDROID_ABI_FILTER "${ANDROID_BUILD_ABI_FILTER}")
configure_file("${OpenCV_SOURCE_DIR}/samples/android/build.gradle.in" "${ANDROID_BUILD_BASE_DIR}/build.gradle" @ONLY)
set(ANDROID_ABI_FILTER "${ANDROID_INSTALL_ABI_FILTER}")
configure_file("${OpenCV_SOURCE_DIR}/samples/android/build.gradle.in" "${ANDROID_TMP_INSTALL_BASE_DIR}/${ANDROID_INSTALL_SAMPLES_DIR}/build.gradle" @ONLY)
install(FILES "${ANDROID_TMP_INSTALL_BASE_DIR}/${ANDROID_INSTALL_SAMPLES_DIR}/build.gradle" DESTINATION "${ANDROID_INSTALL_SAMPLES_DIR}" COMPONENT samples)
set(GRADLE_WRAPPER_FILES
"gradle/wrapper/gradle-wrapper.jar"
"gradle/wrapper/gradle-wrapper.properties"
"gradlew.bat"
"gradlew"
"gradle.properties"
)
foreach(fname ${GRADLE_WRAPPER_FILES})
get_filename_component(__dir "${fname}" DIRECTORY)
set(__permissions "")
set(__permissions_prefix "")
if(fname STREQUAL "gradlew")
set(__permissions FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
endif()
file(COPY "${OpenCV_SOURCE_DIR}/platforms/android/gradle-wrapper/${fname}" DESTINATION "${ANDROID_BUILD_BASE_DIR}/${__dir}" ${__permissions})
string(REPLACE "FILE_PERMISSIONS" "PERMISSIONS" __permissions "${__permissions}")
if("${__dir}" STREQUAL "")
set(__dir ".")
endif()
install(FILES "${OpenCV_SOURCE_DIR}/platforms/android/gradle-wrapper/${fname}" DESTINATION "${ANDROID_INSTALL_SAMPLES_DIR}/${__dir}" COMPONENT samples ${__permissions})
endforeach()
file(WRITE "${ANDROID_BUILD_BASE_DIR}/settings.gradle" "
include ':opencv'
")
file(WRITE "${ANDROID_TMP_INSTALL_BASE_DIR}/settings.gradle" "
rootProject.name = 'opencv_samples'
def opencvsdk='../'
//def opencvsdk='/<path to OpenCV-android-sdk>'
//println opencvsdk
include ':opencv'
project(':opencv').projectDir = new File(opencvsdk + '/sdk')
")
macro(add_android_project target path)
get_filename_component(__dir "${path}" NAME)
set(OPENCV_ANDROID_CMAKE_EXTRA_ARGS "")
if(DEFINED ANDROID_TOOLCHAIN)
set(OPENCV_ANDROID_CMAKE_EXTRA_ARGS "${OPENCV_ANDROID_CMAKE_EXTRA_ARGS},\n\"-DANDROID_TOOLCHAIN=${ANDROID_TOOLCHAIN}\"")
endif()
if(DEFINED ANDROID_STL)
set(OPENCV_ANDROID_CMAKE_EXTRA_ARGS "${OPENCV_ANDROID_CMAKE_EXTRA_ARGS},\n\"-DANDROID_STL=${ANDROID_STL}\"")
endif()
#
# Build
#
set(ANDROID_SAMPLE_JNI_PATH "${path}/jni")
set(ANDROID_SAMPLE_JAVA_PATH "${path}/src")
set(ANDROID_SAMPLE_RES_PATH "${path}/res")
set(ANDROID_SAMPLE_MANIFEST_PATH "${path}/gradle/AndroidManifest.xml")
set(ANDROID_ABI_FILTER "${ANDROID_BUILD_ABI_FILTER}")
set(ANDROID_PROJECT_JNI_PATH "../../")
string(REPLACE ";" "', '" ANDROID_SAMPLE_JAVA_PATH "['${ANDROID_SAMPLE_JAVA_PATH}']")
string(REPLACE ";" "', '" ANDROID_SAMPLE_RES_PATH "['${ANDROID_SAMPLE_RES_PATH}']")
configure_file("${path}/build.gradle.in" "${ANDROID_BUILD_BASE_DIR}/${__dir}/build.gradle" @ONLY)
file(APPEND "${ANDROID_BUILD_BASE_DIR}/settings.gradle" "
include ':${__dir}'
")
if (BUILD_ANDROID_EXAMPLES)
# build apk
set(APK_FILE "${ANDROID_BUILD_BASE_DIR}/${__dir}/build/outputs/apk/release/${__dir}-${ANDROID_ABI}-release-unsigned.apk")
ocv_update(OPENCV_GRADLE_VERBOSE_OPTIONS "-i")
add_custom_command(
OUTPUT "${APK_FILE}" "${OPENCV_DEPHELPER}/android_sample_${__dir}"
COMMAND ./gradlew ${OPENCV_GRADLE_VERBOSE_OPTIONS} "${__dir}:assemble"
COMMAND ${CMAKE_COMMAND} -E touch "${OPENCV_DEPHELPER}/android_sample_${__dir}"
WORKING_DIRECTORY "${ANDROID_BUILD_BASE_DIR}"
DEPENDS ${depends} opencv_java_android
COMMENT "Building OpenCV Android sample project: ${__dir}"
)
else() # install only
# copy samples
add_custom_command(
OUTPUT "${OPENCV_DEPHELPER}/android_sample_${__dir}"
COMMAND ${CMAKE_COMMAND} -E touch "${OPENCV_DEPHELPER}/android_sample_${__dir}"
WORKING_DIRECTORY "${ANDROID_BUILD_BASE_DIR}"
DEPENDS ${depends} opencv_java_android
COMMENT "Copying OpenCV Android sample project: ${__dir}"
)
endif()
file(REMOVE "${OPENCV_DEPHELPER}/android_sample_${__dir}") # force rebuild after CMake run
add_custom_target(android_sample_${__dir} ALL DEPENDS "${OPENCV_DEPHELPER}/android_sample_${__dir}" SOURCES "${ANDROID_SAMPLE_MANIFEST_PATH}")
#
# Install
#
set(ANDROID_SAMPLE_JNI_PATH "jni")
set(ANDROID_SAMPLE_JAVA_PATH "src")
set(ANDROID_SAMPLE_RES_PATH "res")
set(ANDROID_SAMPLE_MANIFEST_PATH "AndroidManifest.xml")
install(DIRECTORY "${path}/res" DESTINATION "${ANDROID_INSTALL_SAMPLES_DIR}/${__dir}" COMPONENT samples OPTIONAL)
install(DIRECTORY "${path}/src" DESTINATION "${ANDROID_INSTALL_SAMPLES_DIR}/${__dir}" COMPONENT samples)
install(DIRECTORY "${path}/jni" DESTINATION "${ANDROID_INSTALL_SAMPLES_DIR}/${__dir}" COMPONENT samples OPTIONAL)
install(FILES "${path}/gradle/AndroidManifest.xml" DESTINATION "${ANDROID_INSTALL_SAMPLES_DIR}/${__dir}" COMPONENT samples)
set(ANDROID_ABI_FILTER "${ANDROID_INSTALL_ABI_FILTER}")
set(ANDROID_PROJECT_JNI_PATH "native/jni")
string(REPLACE ";" "', '" ANDROID_SAMPLE_JAVA_PATH "['${ANDROID_SAMPLE_JAVA_PATH}']")
string(REPLACE ";" "', '" ANDROID_SAMPLE_RES_PATH "['${ANDROID_SAMPLE_RES_PATH}']")
configure_file("${path}/build.gradle.in" "${ANDROID_TMP_INSTALL_BASE_DIR}/${__dir}/build.gradle" @ONLY)
install(FILES "${ANDROID_TMP_INSTALL_BASE_DIR}/${__dir}/build.gradle" DESTINATION "${ANDROID_INSTALL_SAMPLES_DIR}/${__dir}" COMPONENT samples)
file(APPEND "${ANDROID_TMP_INSTALL_BASE_DIR}/settings.gradle" "
include ':${__dir}'
")
endmacro()
install(FILES "${ANDROID_TMP_INSTALL_BASE_DIR}/settings.gradle" DESTINATION "${ANDROID_INSTALL_SAMPLES_DIR}" COMPONENT samples)
+16 -5
View File
@@ -1,14 +1,25 @@
#include <stdio.h>
#include <iostream>
#include <sstream>
#include <list>
int main()
{
std::ostringstream arch;
std::list<std::string> archs;
int count = 0;
if (cudaSuccess != cudaGetDeviceCount(&count)){return -1;}
if (count == 0) {return -1;}
if (cudaSuccess != cudaGetDeviceCount(&count)){ return -1; }
if (count == 0) { return -1; }
for (int device = 0; device < count; ++device)
{
cudaDeviceProp prop;
if (cudaSuccess != cudaGetDeviceProperties(&prop, device)){ continue;}
printf("%d.%d ", prop.major, prop.minor);
if (cudaSuccess != cudaGetDeviceProperties(&prop, device)){ continue; }
arch << prop.major << "." << prop.minor;
archs.push_back(arch.str());
arch.str("");
}
archs.unique(); // Some devices might have the same arch
for (std::list<std::string>::iterator it=archs.begin(); it!=archs.end(); ++it)
std::cout << *it << " ";
return 0;
}
-10
View File
@@ -1,10 +0,0 @@
#include <windows.h>
#include <vfw.h>
int main()
{
AVIFileInit();
AVIFileExit();
return 0;
}
+9
View File
@@ -0,0 +1,9 @@
#include <vtkSmartPointer.h>
#include <vtkTransform.h>
#include <vtkMath.h>
int main()
{
vtkSmartPointer<vtkTransform> transform = vtkSmartPointer<vtkTransform>::New();
return 0;
}
+6
View File
@@ -0,0 +1,6 @@
#include <vulkan/vulkan.h>
int main(int /*argc*/, char** /*argv*/)
{
return 0;
}
@@ -6,6 +6,9 @@ set(OpenCV_USE_CUBLAS "@HAVE_CUBLAS@")
set(OpenCV_USE_CUFFT "@HAVE_CUFFT@")
set(OpenCV_USE_NVCUVID "@HAVE_NVCUVID@")
set(OpenCV_CUDNN_VERSION "@CUDNN_VERSION@")
set(OpenCV_USE_CUDNN "@HAVE_CUDNN@")
if(NOT CUDA_FOUND)
find_host_package(CUDA ${OpenCV_CUDA_VERSION} EXACT REQUIRED)
else()
+10 -94
View File
@@ -22,18 +22,6 @@
/* Compile for 'virtual' NVIDIA PTX architectures */
#define CUDA_ARCH_PTX "${OPENCV_CUDA_ARCH_PTX}"
/* AVFoundation video libraries */
#cmakedefine HAVE_AVFOUNDATION
/* V4L capturing support */
#cmakedefine HAVE_CAMV4L
/* V4L2 capturing support */
#cmakedefine HAVE_CAMV4L2
/* Carbon windowing environment */
#cmakedefine HAVE_CARBON
/* AMD's Basic Linear Algebra Subprograms Library*/
#cmakedefine HAVE_CLAMDBLAS
@@ -46,24 +34,18 @@
/* Cocoa API */
#cmakedefine HAVE_COCOA
/* C= */
#cmakedefine HAVE_CSTRIPES
/* NVIDIA CUDA Runtime API*/
#cmakedefine HAVE_CUDA
/* NVIDIA CUDA Basic Linear Algebra Subprograms (BLAS) API*/
#cmakedefine HAVE_CUBLAS
/* NVIDIA CUDA Runtime API*/
#cmakedefine HAVE_CUDA
/* NVIDIA CUDA Deep Neural Network (cuDNN) API*/
#cmakedefine HAVE_CUDNN
/* NVIDIA CUDA Fast Fourier Transform (FFT) API*/
#cmakedefine HAVE_CUFFT
/* IEEE1394 capturing support */
#cmakedefine HAVE_DC1394
/* IEEE1394 capturing support - libdc1394 v2.x */
#cmakedefine HAVE_DC1394_2
/* DirectX */
#cmakedefine HAVE_DIRECTX
#cmakedefine HAVE_DIRECTX_NV12
@@ -71,21 +53,12 @@
#cmakedefine HAVE_D3D10
#cmakedefine HAVE_D3D9
/* DirectShow Video Capture library */
#cmakedefine HAVE_DSHOW
/* Eigen Matrix & Linear Algebra Library */
#cmakedefine HAVE_EIGEN
/* FFMpeg video library */
#cmakedefine HAVE_FFMPEG
/* Geospatial Data Abstraction Library */
#cmakedefine HAVE_GDAL
/* GStreamer multimedia framework */
#cmakedefine HAVE_GSTREAMER
/* GTK+ 2.0 Thread support */
#cmakedefine HAVE_GTHREAD
@@ -95,12 +68,12 @@
/* Halide support */
#cmakedefine HAVE_HALIDE
/* Vulkan support */
#cmakedefine HAVE_VULKAN
/* Define to 1 if you have the <inttypes.h> header file. */
#cmakedefine HAVE_INTTYPES_H 1
/* Intel Perceptual Computing SDK library */
#cmakedefine HAVE_INTELPERC
/* Intel Integrated Performance Primitives */
#cmakedefine HAVE_IPP
#cmakedefine HAVE_IPP_ICV
@@ -119,12 +92,6 @@
/* GDCM DICOM codec */
#cmakedefine HAVE_GDCM
/* V4L/V4L2 capturing support via libv4l */
#cmakedefine HAVE_LIBV4L
/* Microsoft Media Foundation Capture library */
#cmakedefine HAVE_MSMF
/* NVIDIA Video Decoding API*/
#cmakedefine HAVE_NVCUVID
@@ -145,12 +112,6 @@
/* OpenGL support*/
#cmakedefine HAVE_OPENGL
/* OpenNI library */
#cmakedefine HAVE_OPENNI
/* OpenNI library */
#cmakedefine HAVE_OPENNI2
/* PNG codec */
#cmakedefine HAVE_PNG
@@ -166,52 +127,28 @@
/* Qt OpenGL support */
#cmakedefine HAVE_QT_OPENGL
/* QuickTime video libraries */
#cmakedefine HAVE_QUICKTIME
/* QTKit video libraries */
#cmakedefine HAVE_QTKIT
/* Intel Threading Building Blocks */
#cmakedefine HAVE_TBB
/* Ste||ar Group High Performance ParallelX */
#cmakedefine HAVE_HPX
/* TIFF codec */
#cmakedefine HAVE_TIFF
/* Unicap video capture library */
#cmakedefine HAVE_UNICAP
/* Video for Windows support */
#cmakedefine HAVE_VFW
/* V4L2 capturing support in videoio.h */
#cmakedefine HAVE_VIDEOIO
/* Win32 UI */
#cmakedefine HAVE_WIN32UI
/* XIMEA camera support */
#cmakedefine HAVE_XIMEA
/* Xine video library */
#cmakedefine HAVE_XINE
/* Define if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#cmakedefine WORDS_BIGENDIAN
/* gPhoto2 library */
#cmakedefine HAVE_GPHOTO2
/* VA library (libva) */
#cmakedefine HAVE_VA
/* Intel VA-API/OpenCL */
#cmakedefine HAVE_VA_INTEL
/* Intel Media SDK */
#cmakedefine HAVE_MFX
/* Lapack */
#cmakedefine HAVE_LAPACK
@@ -221,27 +158,6 @@
/* OpenVX */
#cmakedefine HAVE_OPENVX
#if defined(HAVE_XINE) || \
defined(HAVE_GSTREAMER) || \
defined(HAVE_QUICKTIME) || \
defined(HAVE_QTKIT) || \
defined(HAVE_AVFOUNDATION) || \
/*defined(HAVE_OPENNI) || too specialized */ \
defined(HAVE_FFMPEG) || \
defined(HAVE_MSMF)
#define HAVE_VIDEO_INPUT
#endif
#if /*defined(HAVE_XINE) || */\
defined(HAVE_GSTREAMER) || \
defined(HAVE_QUICKTIME) || \
defined(HAVE_QTKIT) || \
defined(HAVE_AVFOUNDATION) || \
defined(HAVE_FFMPEG) || \
defined(HAVE_MSMF)
#define HAVE_VIDEO_OUTPUT
#endif
/* OpenCV trace utilities */
#cmakedefine OPENCV_TRACE
+3
View File
@@ -28,7 +28,9 @@
opencv/cxeigen.hpp
opencv2/core/eigen.hpp
opencv2/flann/hdf5.h
opencv2/imgcodecs/imgcodecs_c.h
opencv2/imgcodecs/ios.h
opencv2/videoio/videoio_c.h
opencv2/videoio/cap_ios.h
opencv2/xobjdetect/private.hpp
@OPENCV_ABI_SKIP_HEADERS@
@@ -39,6 +41,7 @@
</skip_libs>
<gcc_options>
-std=c++11
@OPENCV_ABI_GCC_OPTIONS@
</gcc_options>
+15
View File
@@ -19,6 +19,12 @@ if(DOXYGEN_FOUND)
unset(CMAKE_DOXYGEN_TUTORIAL_CONTRIB_ROOT)
unset(CMAKE_DOXYGEN_TUTORIAL_JS_ROOT)
set(OPENCV_DOCS_EXCLUDE_CUDA ON)
if(";${OPENCV_MODULES_EXTRA};" MATCHES ";cudev;")
set(OPENCV_DOCS_EXCLUDE_CUDA OFF)
list(APPEND CMAKE_DOXYGEN_ENABLED_SECTIONS "CUDA_MODULES")
endif()
# gathering headers
set(paths_include)
set(paths_doc)
@@ -47,6 +53,15 @@ if(DOXYGEN_FOUND)
if(EXISTS "${header_dir}")
list(APPEND paths_include "${header_dir}")
list(APPEND deps ${header_dir})
if(OPENCV_DOCS_EXCLUDE_CUDA)
if(EXISTS "${OPENCV_MODULE_opencv_${m}_LOCATION}/include/opencv2/${m}/cuda")
list(APPEND CMAKE_DOXYGEN_EXCLUDE_LIST "${OPENCV_MODULE_opencv_${m}_LOCATION}/include/opencv2/${m}/cuda")
endif()
file(GLOB list_cuda_files "${OPENCV_MODULE_opencv_${m}_LOCATION}/include/opencv2/${m}/*cuda*.hpp")
if(list_cuda_files)
list(APPEND CMAKE_DOXYGEN_EXCLUDE_LIST ${list_cuda_files})
endif()
endif()
endif()
# doc folder
set(docs_dir "${OPENCV_MODULE_opencv_${m}_LOCATION}/doc")
+6 -1
View File
@@ -106,7 +106,7 @@ FILE_PATTERNS =
RECURSIVE = YES
EXCLUDE = @CMAKE_DOXYGEN_EXCLUDE_LIST@
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS = *.inl.hpp *.impl.hpp *_detail.hpp */cudev/**/detail/*.hpp *.m */opencl/runtime/*
EXCLUDE_PATTERNS = *.inl.hpp *.impl.hpp *_detail.hpp */cudev/**/detail/*.hpp *.m */opencl/runtime/* */legacy/* *_c.h @DOXYGEN_EXCLUDE_PATTERNS@
EXCLUDE_SYMBOLS = cv::DataType<*> cv::traits::* int void CV__* T __CV*
EXAMPLE_PATH = @CMAKE_DOXYGEN_EXAMPLE_PATH@
EXAMPLE_PATTERNS = *
@@ -234,12 +234,17 @@ PREDEFINED = __cplusplus=1 \
CV_EXPORTS_W_SIMPLE= \
CV_EXPORTS_AS(x)= \
CV_EXPORTS_W_MAP= \
GAPI_EXPORTS= \
GAPI_EXPORTS_W= \
CV_IN_OUT= \
CV_OUT= \
CV_PROP= \
CV_PROP_RW= \
CV_WRAP= \
CV_WRAP_AS(x)= \
CV_WRAP_MAPPABLE(x)= \
CV_WRAP_PHANTOM(x)= \
CV_WRAP_DEFAULT(x)= \
CV_CDECL= \
CV_Func = \
CV_DO_PRAGMA(x)= \
@@ -20,20 +20,20 @@ A simple example on extending C++ functions to Python can be found in official P
documentation[1]. So extending all functions in OpenCV to Python by writing their wrapper functions
manually is a time-consuming task. So OpenCV does it in a more intelligent way. OpenCV generates
these wrapper functions automatically from the C++ headers using some Python scripts which are
located in modules/python/src2. We will look into what they do.
located in `modules/python/src2`. We will look into what they do.
First, modules/python/CMakeFiles.txt is a CMake script which checks the modules to be extended to
First, `modules/python/CMakeFiles.txt` is a CMake script which checks the modules to be extended to
Python. It will automatically check all the modules to be extended and grab their header files.
These header files contain list of all classes, functions, constants etc. for that particular
modules.
Second, these header files are passed to a Python script, modules/python/src2/gen2.py. This is the
Python bindings generator script. It calls another Python script modules/python/src2/hdr_parser.py.
Second, these header files are passed to a Python script, `modules/python/src2/gen2.py`. This is the
Python bindings generator script. It calls another Python script `modules/python/src2/hdr_parser.py`.
This is the header parser script. This header parser splits the complete header file into small
Python lists. So these lists contain all details about a particular function, class etc. For
example, a function will be parsed to get a list containing function name, return type, input
arguments, argument types etc. Final list contains details of all the functions, structs, classes
etc. in that header file.
arguments, argument types etc. Final list contains details of all the functions, enums, structs,
classes etc. in that header file.
But header parser doesn't parse all the functions/classes in the header file. The developer has to
specify which functions should be exported to Python. For that, there are certain macros added to
@@ -44,15 +44,15 @@ macros will be given in next session.
So header parser returns a final big list of parsed functions. Our generator script (gen2.py) will
create wrapper functions for all the functions/classes/enums/structs parsed by header parser (You
can find these header files during compilation in the build/modules/python/ folder as
can find these header files during compilation in the `build/modules/python/` folder as
pyopencv_generated_\*.h files). But there may be some basic OpenCV datatypes like Mat, Vec4i,
Size. They need to be extended manually. For example, a Mat type should be extended to Numpy array,
Size should be extended to a tuple of two integers etc. Similarly, there may be some complex
structs/classes/functions etc. which need to be extended manually. All such manual wrapper functions
are placed in modules/python/src2/cv2.cpp.
are placed in `modules/python/src2/cv2.cpp`.
So now only thing left is the compilation of these wrapper files which gives us **cv2** module. So
when you call a function, say res = equalizeHist(img1,img2) in Python, you pass two numpy arrays and
when you call a function, say `res = equalizeHist(img1,img2)` in Python, you pass two numpy arrays and
you expect another numpy array as the output. So these numpy arrays are converted to cv::Mat and
then calls the equalizeHist() function in C++. Final result, res will be converted back into a Numpy
array. So in short, almost all operations are done in C++ which gives us almost same speed as that
@@ -67,19 +67,19 @@ Header parser parse the header files based on some wrapper macros added to funct
Enumeration constants don't need any wrapper macros. They are automatically wrapped. But remaining
functions, classes etc. need wrapper macros.
Functions are extended using CV_EXPORTS_W macro. An example is shown below.
Functions are extended using `CV_EXPORTS_W` macro. An example is shown below.
@code{.cpp}
CV_EXPORTS_W void equalizeHist( InputArray src, OutputArray dst );
@endcode
Header parser can understand the input and output arguments from keywords like
InputArray, OutputArray etc. But sometimes, we may need to hardcode inputs and outputs. For that,
macros like CV_OUT, CV_IN_OUT etc. are used.
macros like `CV_OUT`, `CV_IN_OUT` etc. are used.
@code{.cpp}
CV_EXPORTS_W void minEnclosingCircle( InputArray points,
CV_OUT Point2f& center, CV_OUT float& radius );
@endcode
For large classes also, CV_EXPORTS_W is used. To extend class methods, CV_WRAP is used.
Similarly, CV_PROP is used for class fields.
For large classes also, `CV_EXPORTS_W` is used. To extend class methods, `CV_WRAP` is used.
Similarly, `CV_PROP` is used for class fields.
@code{.cpp}
class CV_EXPORTS_W CLAHE : public Algorithm
{
@@ -90,9 +90,9 @@ public:
CV_WRAP virtual double getClipLimit() const = 0;
}
@endcode
Overloaded functions can be extended using CV_EXPORTS_AS. But we need to pass a new name so that
Overloaded functions can be extended using `CV_EXPORTS_AS`. But we need to pass a new name so that
each function will be called by that name in Python. Take the case of integral function below. Three
functions are available, so each one is named with a suffix in Python. Similarly CV_WRAP_AS can be
functions are available, so each one is named with a suffix in Python. Similarly `CV_WRAP_AS` can be
used to wrap overloaded methods.
@code{.cpp}
//! computes the integral image
@@ -107,9 +107,9 @@ CV_EXPORTS_AS(integral3) void integral( InputArray src, OutputArray sum,
OutputArray sqsum, OutputArray tilted,
int sdepth = -1, int sqdepth = -1 );
@endcode
Small classes/structs are extended using CV_EXPORTS_W_SIMPLE. These structs are passed by value
to C++ functions. Examples are KeyPoint, Match etc. Their methods are extended by CV_WRAP and
fields are extended by CV_PROP_RW.
Small classes/structs are extended using `CV_EXPORTS_W_SIMPLE`. These structs are passed by value
to C++ functions. Examples are `KeyPoint`, `Match` etc. Their methods are extended by `CV_WRAP` and
fields are extended by `CV_PROP_RW`.
@code{.cpp}
class CV_EXPORTS_W_SIMPLE DMatch
{
@@ -125,8 +125,8 @@ public:
CV_PROP_RW float distance;
};
@endcode
Some other small classes/structs can be exported using CV_EXPORTS_W_MAP where it is exported to a
Python native dictionary. Moments() is an example of it.
Some other small classes/structs can be exported using `CV_EXPORTS_W_MAP` where it is exported to a
Python native dictionary. `Moments()` is an example of it.
@code{.cpp}
class CV_EXPORTS_W_MAP Moments
{
@@ -142,6 +142,41 @@ public:
So these are the major extension macros available in OpenCV. Typically, a developer has to put
proper macros in their appropriate positions. Rest is done by generator scripts. Sometimes, there
may be an exceptional cases where generator scripts cannot create the wrappers. Such functions need
to be handled manually, to do this write your own pyopencv_*.hpp extending headers and put them into
to be handled manually, to do this write your own `pyopencv_*.hpp` extending headers and put them into
misc/python subdirectory of your module. But most of the time, a code written according to OpenCV
coding guidelines will be automatically wrapped by generator scripts.
coding guidelines will be automatically wrapped by generator scripts.
More advanced cases involves providing Python with additional features that does not exist
in the C++ interface such as extra methods, type mappings, or to provide default arguments.
We will take `UMat` datatype as an example of such cases later on.
First, to provide Python-specific methods, `CV_WRAP_PHANTOM` is utilized in a similar manner to
`CV_WRAP`, except that it takes the method header as its argument, and you would need to provide
the method body in your own `pyopencv_*.hpp` extension. `UMat::queue()` and `UMat::context()` are
an example of such phantom methods that does not exist in C++ interface, but are needed to handle
OpenCL functionalities at the Python side.
Second, if an already-existing datatype(s) is mappable to your class, it is highly preferable to
indicate such capacity using `CV_WRAP_MAPPABLE` with the source type as its argument,
rather than crafting your own binding function(s). This is the case of `UMat` which maps from `Mat`.
Finally, if a default argument is needed, but it is not provided in the native C++ interface,
you can provide it for Python side as the argument of `CV_WRAP_DEFAULT`. As per the `UMat::getMat`
example below:
@code{.cpp}
class CV_EXPORTS_W UMat
{
public:
//! Mat is mappable to UMat.
// You would need to provide `static bool cv_mappable_to(const Ptr<Mat>& src, Ptr<UMat>& dst)`
CV_WRAP_MAPPABLE(Ptr<Mat>);
/! returns the OpenCL queue used by OpenCV UMat.
// You would need to provide the method body in the binder code
CV_WRAP_PHANTOM(static void* queue());
//! returns the OpenCL context used by OpenCV UMat
// You would need to provide the method body in the binder code
CV_WRAP_PHANTOM(static void* context());
//! The wrapped method become equivalent to `get(int flags = ACCESS_RW)`
CV_WRAP_AS(get) Mat getMat(int flags CV_WRAP_DEFAULT(ACCESS_RW)) const;
};
@endcode
@@ -23,7 +23,7 @@ import cv2 as cv
img = cv.imread('star.jpg',0)
ret,thresh = cv.threshold(img,127,255,0)
im2,contours,hierarchy = cv.findContours(thresh, 1, 2)
contours,hierarchy = cv.findContours(thresh, 1, 2)
cnt = contours[0]
M = cv.moments(cnt)
@@ -17,7 +17,7 @@ detection and recognition.
- For better accuracy, use binary images. So before finding contours, apply threshold or canny
edge detection.
- Since OpenCV 3.2, findContours() no longer modifies the source image but returns a modified image as the first of three return parameters.
- Since OpenCV 3.2, findContours() no longer modifies the source image.
- In OpenCV, finding contours is like finding white object from black background. So remember,
object to be found should be white and background should be black.
@@ -29,11 +29,11 @@ import cv2 as cv
im = cv.imread('test.jpg')
imgray = cv.cvtColor(im, cv.COLOR_BGR2GRAY)
ret, thresh = cv.threshold(imgray, 127, 255, 0)
im2, contours, hierarchy = cv.findContours(thresh, cv.RETR_TREE, cv.CHAIN_APPROX_SIMPLE)
contours, hierarchy = cv.findContours(thresh, cv.RETR_TREE, cv.CHAIN_APPROX_SIMPLE)
@endcode
See, there are three arguments in **cv.findContours()** function, first one is source image, second
is contour retrieval mode, third is contour approximation method. And it outputs a modified image, the contours and
hierarchy. contours is a Python list of all the contours in the image. Each individual contour is a
is contour retrieval mode, third is contour approximation method. And it outputs the contours and hierarchy.
Contours is a Python list of all the contours in the image. Each individual contour is a
Numpy array of (x,y) coordinates of boundary points of the object.
@note We will discuss second and third arguments and about hierarchy in details later. Until then,
@@ -39,7 +39,7 @@ import numpy as np
img = cv.imread('star.jpg')
img_gray = cv.cvtColor(img,cv.COLOR_BGR2GRAY)
ret,thresh = cv.threshold(img_gray, 127, 255,0)
im2,contours,hierarchy = cv.findContours(thresh,2,1)
contours,hierarchy = cv.findContours(thresh,2,1)
cnt = contours[0]
hull = cv.convexHull(cnt,returnPoints = False)
@@ -93,9 +93,9 @@ img2 = cv.imread('star2.jpg',0)
ret, thresh = cv.threshold(img1, 127, 255,0)
ret, thresh2 = cv.threshold(img2, 127, 255,0)
im2,contours,hierarchy = cv.findContours(thresh,2,1)
contours,hierarchy = cv.findContours(thresh,2,1)
cnt1 = contours[0]
im2,contours,hierarchy = cv.findContours(thresh2,2,1)
contours,hierarchy = cv.findContours(thresh2,2,1)
cnt2 = contours[0]
ret = cv.matchShapes(cnt1,cnt2,1,0.0)
@@ -36,7 +36,7 @@ gives us a feature vector containing 64 values. This is the feature vector we us
Finally, as in the previous case, we start by splitting our big dataset into individual cells. For
every digit, 250 cells are reserved for training data and remaining 250 data is reserved for
testing. Full code is given below, you also can download it from [here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/ml/py_svm_opencv/hogsvm.py):
testing. Full code is given below, you also can download it from [here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/ml/py_svm_opencv/hogsvm.py):
@include samples/python/tutorial_code/ml/py_svm_opencv/hogsvm.py
@@ -62,12 +62,11 @@ yum install cmake
yum install python-devel numpy
yum install gcc gcc-c++
@endcode
Next we need **GTK** support for GUI features, Camera support (libdc1394, libv4l), Media Support
Next we need **GTK** support for GUI features, Camera support (libdc1394, v4l), Media Support
(ffmpeg, gstreamer) etc.
@code{.sh}
yum install gtk2-devel
yum install libdc1394-devel
yum install libv4l-devel
yum install ffmpeg-devel
yum install gstreamer-plugins-base-devel
@endcode
@@ -66,12 +66,11 @@ sudo apt-get install python-dev python-numpy
sudo apt-get install gcc g++
```
Next we need **GTK** support for GUI features, Camera support (libv4l), Media Support
Next we need **GTK** support for GUI features, Camera support (v4l), Media Support
(ffmpeg, gstreamer) etc.
```
sudo apt-get install gtk2-devel
sudo apt-get install libv4l-devel
sudo apt-get install ffmpeg-devel
sudo apt-get install gstreamer-plugins-base-devel
```
@@ -77,13 +77,13 @@ Source code
You may also find the source code in the `samples/cpp/tutorial_code/calib3d/camera_calibration/`
folder of the OpenCV source library or [download it from here
](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/calib3d/camera_calibration/camera_calibration.cpp). The program has a
single argument: the name of its configuration file. If none is given then it will try to open the
](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/calib3d/camera_calibration/camera_calibration.cpp). For the usage of the program, run it with `-h` argument. The program has an
essential argument: the name of its configuration file. If none is given then it will try to open the
one named "default.xml". [Here's a sample configuration file
](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/calib3d/camera_calibration/in_VID5.xml) in XML format. In the
](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/calib3d/camera_calibration/in_VID5.xml) in XML format. In the
configuration file you may choose to use camera as an input, a video file or an image list. If you
opt for the last one, you will need to create a configuration file where you enumerate the images to
use. Here's [an example of this ](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/calib3d/camera_calibration/VID5.xml).
use. Here's [an example of this ](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/calib3d/camera_calibration/VID5.xml).
The important part to remember is that the images need to be specified using the absolute path or
the relative one from your application's working directory. You may find all this in the samples
directory mentioned above.
@@ -131,6 +131,8 @@ Explanation
Similar images result in similar equations, and similar equations at the calibration step will
form an ill-posed problem, so the calibration will fail. For square images the positions of the
corners are only approximate. We may improve this by calling the @ref cv::cornerSubPix function.
(`winSize` is used to control the side length of the search window. Its default value is 11.
`winSzie` may be changed by command line parameter `--winSize=<number>`.)
It will produce better calibration result. After this we add a valid inputs result to the
*imagePoints* vector to collect all of the equations into a single container. Finally, for
visualization feedback purposes we will draw the found points on the input image using @ref
@@ -170,7 +172,7 @@ of the calibration variables we'll create these variables here and pass on both
calibration and saving function. Again, I'll not show the saving part as that has little in common
with the calibration. Explore the source file in order to find out how and what:
@snippet samples/cpp/tutorial_code/calib3d/camera_calibration/camera_calibration.cpp run_and_save
We do the calibration with the help of the @ref cv::calibrateCamera function. It has the following
We do the calibration with the help of the @ref cv::calibrateCameraRO function. It has the following
parameters:
- The object points. This is a vector of *Point3f* vector that for each input image describes how
@@ -184,13 +186,33 @@ parameters:
@code{.cpp}
vector<vector<Point3f> > objectPoints(1);
calcBoardCornerPositions(s.boardSize, s.squareSize, objectPoints[0], s.calibrationPattern);
objectPoints[0][s.boardSize.width - 1].x = objectPoints[0][0].x + grid_width;
newObjPoints = objectPoints[0];
objectPoints.resize(imagePoints.size(),objectPoints[0]);
@endcode
@note If your calibration board is inaccurate, unmeasured, roughly planar targets (Checkerboard
patterns on paper using off-the-shelf printers are the most convenient calibration targets and
most of them are not accurate enough.), a method from @cite strobl2011iccv can be utilized to
dramatically improve the accuracies of the estimated camera intrinsic parameters. This new
calibration method will be called if command line parameter `-d=<number>` is provided. In the
above code snippet, `grid_width` is actually the value set by `-d=<number>`. It's the measured
distance between top-left (0, 0, 0) and top-right (s.squareSize*(s.boardSize.width-1), 0, 0)
corners of the pattern grid points. It should be measured precisely with rulers or vernier calipers.
After calibration, newObjPoints will be updated with refined 3D coordinates of object points.
- The image points. This is a vector of *Point2f* vector which for each input image contains
coordinates of the important points (corners for chessboard and centers of the circles for the
circle pattern). We have already collected this from @ref cv::findChessboardCorners or @ref
cv::findCirclesGrid function. We just need to pass it on.
- The size of the image acquired from the camera, video file or the images.
- The index of the object point to be fixed. We set it to -1 to request standard calibration method.
If the new object-releasing method to be used, set it to the index of the top-right corner point
of the calibration board grid. See cv::calibrateCameraRO for detailed explanation.
@code{.cpp}
int iFixedPoint = -1;
if (release_object)
iFixedPoint = s.boardSize.width - 1;
@endcode
- The camera matrix. If we used the fixed aspect ratio option we need to set \f$f_x\f$:
@snippet samples/cpp/tutorial_code/calib3d/camera_calibration/camera_calibration.cpp fixed_aspect
- The distortion coefficient matrix. Initialize with zero.
@@ -202,11 +224,15 @@ parameters:
coordinate space). The 7-th and 8-th parameters are the output vector of matrices containing in
the i-th position the rotation and translation vector for the i-th object point to the i-th
image point.
- The updated output vector of calibration pattern points. This parameter is ignored with standard
calibration method.
- The final argument is the flag. You need to specify here options like fix the aspect ratio for
the focal length, assume zero tangential distortion or to fix the principal point.
the focal length, assume zero tangential distortion or to fix the principal point. Here we use
CALIB_USE_LU to get faster calibration speed.
@code{.cpp}
double rms = calibrateCamera(objectPoints, imagePoints, imageSize, cameraMatrix,
distCoeffs, rvecs, tvecs, s.flag|CV_CALIB_FIX_K4|CV_CALIB_FIX_K5);
rms = calibrateCameraRO(objectPoints, imagePoints, imageSize, iFixedPoint,
cameraMatrix, distCoeffs, rvecs, tvecs, newObjPoints,
s.flag | CALIB_USE_LU);
@endcode
- The function returns the average re-projection error. This number gives a good estimation of
precision of the found parameters. This should be as close to zero as possible. Given the
@@ -3,14 +3,14 @@ Create calibration pattern {#tutorial_camera_calibration_pattern}
The goal of this tutorial is to learn how to create calibration pattern.
You can find a chessboard pattern in https://github.com/opencv/opencv/blob/3.4/doc/pattern.png
You can find a chessboard pattern in https://github.com/opencv/opencv/blob/master/doc/pattern.png
You can find a circleboard pattern in https://github.com/opencv/opencv/blob/3.4/doc/acircles_pattern.png
You can find a circleboard pattern in https://github.com/opencv/opencv/blob/master/doc/acircles_pattern.png
Create your own pattern
---------------
Now, if you want to create your own pattern, you will need python to use https://github.com/opencv/opencv/blob/3.4/doc/pattern_tools/gen_pattern.py
Now, if you want to create your own pattern, you will need python to use https://github.com/opencv/opencv/blob/master/doc/pattern_tools/gen_pattern.py
Example
@@ -21,7 +21,7 @@ Although we get most of our images in a 2D format they do come from a 3D world.
- @subpage tutorial_camera_calibration
*Compatibility:* \> OpenCV 2.0
*Compatibility:* \> OpenCV 4.0
*Author:* Bernát Gábor
@@ -33,19 +33,19 @@ Source Code
@add_toggle_cpp
Download the source code from
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/cpp/tutorial_code/core/AddingImages/AddingImages.cpp).
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/cpp/tutorial_code/core/AddingImages/AddingImages.cpp).
@include cpp/tutorial_code/core/AddingImages/AddingImages.cpp
@end_toggle
@add_toggle_java
Download the source code from
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/java/tutorial_code/core/AddingImages/AddingImages.java).
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/java/tutorial_code/core/AddingImages/AddingImages.java).
@include java/tutorial_code/core/AddingImages/AddingImages.java
@end_toggle
@add_toggle_python
Download the source code from
[here](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/python/tutorial_code/core/AddingImages/adding_images.py).
[here](https://raw.githubusercontent.com/opencv/opencv/master/samples/python/tutorial_code/core/AddingImages/adding_images.py).
@include python/tutorial_code/core/AddingImages/adding_images.py
@end_toggle
@@ -69,7 +69,7 @@ We need two source images (\f$f_{0}(x)\f$ and \f$f_{1}(x)\f$). So, we load them
@snippet python/tutorial_code/core/AddingImages/adding_images.py load
@end_toggle
We used the following images: [LinuxLogo.jpg](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/data/LinuxLogo.jpg) and [WindowsLogo.jpg](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/data/WindowsLogo.jpg)
We used the following images: [LinuxLogo.jpg](https://raw.githubusercontent.com/opencv/opencv/master/samples/data/LinuxLogo.jpg) and [WindowsLogo.jpg](https://raw.githubusercontent.com/opencv/opencv/master/samples/data/WindowsLogo.jpg)
@warning Since we are *adding* *src1* and *src2*, they both have to be of the same size
(width and height) and type.
@@ -58,7 +58,7 @@ Code
@add_toggle_cpp
- **Downloadable code**: Click
[here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/ImgProc/BasicLinearTransforms.cpp)
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/ImgProc/BasicLinearTransforms.cpp)
- The following code performs the operation \f$g(i,j) = \alpha \cdot f(i,j) + \beta\f$ :
@include samples/cpp/tutorial_code/ImgProc/BasicLinearTransforms.cpp
@@ -66,7 +66,7 @@ Code
@add_toggle_java
- **Downloadable code**: Click
[here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/ImgProc/changing_contrast_brightness_image/BasicLinearTransformsDemo.java)
[here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/ImgProc/changing_contrast_brightness_image/BasicLinearTransformsDemo.java)
- The following code performs the operation \f$g(i,j) = \alpha \cdot f(i,j) + \beta\f$ :
@include samples/java/tutorial_code/ImgProc/changing_contrast_brightness_image/BasicLinearTransformsDemo.java
@@ -74,7 +74,7 @@ Code
@add_toggle_python
- **Downloadable code**: Click
[here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/imgProc/changing_contrast_brightness_image/BasicLinearTransforms.py)
[here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/imgProc/changing_contrast_brightness_image/BasicLinearTransforms.py)
- The following code performs the operation \f$g(i,j) = \alpha \cdot f(i,j) + \beta\f$ :
@include samples/python/tutorial_code/imgProc/changing_contrast_brightness_image/BasicLinearTransforms.py
@@ -284,15 +284,15 @@ and are not intended to be used as a replacement of a raster graphics editor!**
### Code
@add_toggle_cpp
Code for the tutorial is [here](https://github.com/opencv/opencv/blob/3.4/samples/cpp/tutorial_code/ImgProc/changing_contrast_brightness_image/changing_contrast_brightness_image.cpp).
Code for the tutorial is [here](https://github.com/opencv/opencv/blob/master/samples/cpp/tutorial_code/ImgProc/changing_contrast_brightness_image/changing_contrast_brightness_image.cpp).
@end_toggle
@add_toggle_java
Code for the tutorial is [here](https://github.com/opencv/opencv/blob/3.4/samples/java/tutorial_code/ImgProc/changing_contrast_brightness_image/ChangingContrastBrightnessImageDemo.java).
Code for the tutorial is [here](https://github.com/opencv/opencv/blob/master/samples/java/tutorial_code/ImgProc/changing_contrast_brightness_image/ChangingContrastBrightnessImageDemo.java).
@end_toggle
@add_toggle_python
Code for the tutorial is [here](https://github.com/opencv/opencv/blob/3.4/samples/python/tutorial_code/imgProc/changing_contrast_brightness_image/changing_contrast_brightness_image.py).
Code for the tutorial is [here](https://github.com/opencv/opencv/blob/master/samples/python/tutorial_code/imgProc/changing_contrast_brightness_image/changing_contrast_brightness_image.py).
@end_toggle
Code for the gamma correction:
@@ -19,7 +19,7 @@ Source code
@add_toggle_cpp
You can [download this from here
](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/cpp/tutorial_code/core/discrete_fourier_transform/discrete_fourier_transform.cpp) or
](https://raw.githubusercontent.com/opencv/opencv/master/samples/cpp/tutorial_code/core/discrete_fourier_transform/discrete_fourier_transform.cpp) or
find it in the
`samples/cpp/tutorial_code/core/discrete_fourier_transform/discrete_fourier_transform.cpp` of the
OpenCV source code library.
@@ -27,7 +27,7 @@ OpenCV source code library.
@add_toggle_java
You can [download this from here
](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/java/tutorial_code/core/discrete_fourier_transform/DiscreteFourierTransform.java) or
](https://raw.githubusercontent.com/opencv/opencv/master/samples/java/tutorial_code/core/discrete_fourier_transform/DiscreteFourierTransform.java) or
find it in the
`samples/java/tutorial_code/core/discrete_fourier_transform/DiscreteFourierTransform.java` of the
OpenCV source code library.
@@ -35,7 +35,7 @@ OpenCV source code library.
@add_toggle_python
You can [download this from here
](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/python/tutorial_code/core/discrete_fourier_transform/discrete_fourier_transform.py) or
](https://raw.githubusercontent.com/opencv/opencv/master/samples/python/tutorial_code/core/discrete_fourier_transform/discrete_fourier_transform.py) or
find it in the
`samples/python/tutorial_code/core/discrete_fourier_transform/discrete_fourier_transform.py` of the
OpenCV source code library.
@@ -222,7 +222,7 @@ An application idea would be to determine the geometrical orientation present in
example, let us find out if a text is horizontal or not? Looking at some text you'll notice that the
text lines sort of form also horizontal lines and the letters form sort of vertical lines. These two
main components of a text snippet may be also seen in case of the Fourier transform. Let us use
[this horizontal ](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/data/imageTextN.png) and [this rotated](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/data/imageTextR.png)
[this horizontal ](https://raw.githubusercontent.com/opencv/opencv/master/samples/data/imageTextN.png) and [this rotated](https://raw.githubusercontent.com/opencv/opencv/master/samples/data/imageTextR.png)
image about a text.
In case of the horizontal text:
@@ -2,7 +2,7 @@ File Input and Output using XML and YAML files {#tutorial_file_input_output_with
==============================================
@prev_tutorial{tutorial_discrete_fourier_transform}
@next_tutorial{tutorial_interoperability_with_OpenCV_1}
@next_tutorial{tutorial_how_to_use_OpenCV_parallel_for_}
Goal
----
@@ -19,7 +19,7 @@ Source code
-----------
You can [download this from here
](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/core/file_input_output/file_input_output.cpp) or find it in the
](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/core/file_input_output/file_input_output.cpp) or find it in the
`samples/cpp/tutorial_code/core/file_input_output/file_input_output.cpp` of the OpenCV source code
library.
@@ -54,7 +54,7 @@ three major ways of going through an image pixel by pixel. To make things a litt
will make the scanning for each image using all of these methods, and print out how long it took.
You can download the full source code [here
](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/core/how_to_scan_images/how_to_scan_images.cpp) or look it up in
](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/core/how_to_scan_images/how_to_scan_images.cpp) or look it up in
the samples directory of OpenCV at the cpp tutorial code for the core section. Its basic usage is:
@code{.bash}
how_to_scan_images imageName.jpg intValueToReduce [G]
@@ -1,7 +1,7 @@
How to use the OpenCV parallel_for_ to parallelize your code {#tutorial_how_to_use_OpenCV_parallel_for_}
==================================================================
@prev_tutorial{tutorial_interoperability_with_OpenCV_1}
@prev_tutorial{tutorial_file_input_output_with_xml_yml}
Goal
----
@@ -9,7 +9,7 @@ Goal
The goal of this tutorial is to show you how to use the OpenCV `parallel_for_` framework to easily
parallelize your code. To illustrate the concept, we will write a program to draw a Mandelbrot set
exploiting almost all the CPU load available.
The full tutorial code is [here](https://github.com/opencv/opencv/blob/3.4/samples/cpp/tutorial_code/core/how_to_use_OpenCV_parallel_for_/how_to_use_OpenCV_parallel_for_.cpp).
The full tutorial code is [here](https://github.com/opencv/opencv/blob/master/samples/cpp/tutorial_code/core/how_to_use_OpenCV_parallel_for_/how_to_use_OpenCV_parallel_for_.cpp).
If you want more information about multithreading, you will have to refer to a reference book or course as this tutorial is intended
to remain simple.
@@ -177,7 +177,7 @@ C++ 11 standard allows to simplify the parallel implementation by get rid of the
Results
-----------
You can find the full tutorial code [here](https://github.com/opencv/opencv/blob/3.4/samples/cpp/tutorial_code/core/how_to_use_OpenCV_parallel_for_/how_to_use_OpenCV_parallel_for_.cpp).
You can find the full tutorial code [here](https://github.com/opencv/opencv/blob/master/samples/cpp/tutorial_code/core/how_to_use_OpenCV_parallel_for_/how_to_use_OpenCV_parallel_for_.cpp).
The performance of the parallel implementation depends of the type of CPU you have. For instance, on 4 cores / 8 threads
CPU, you can expect a speed-up of around 6.9X. There are many factors to explain why we do not achieve a speed-up of almost 8X.
Main reasons should be mostly due to:
Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

@@ -1,143 +0,0 @@
Interoperability with OpenCV 1 {#tutorial_interoperability_with_OpenCV_1}
==============================
@prev_tutorial{tutorial_file_input_output_with_xml_yml}
@next_tutorial{tutorial_how_to_use_OpenCV_parallel_for_}
Goal
----
For the OpenCV developer team it's important to constantly improve the library. We are constantly
thinking about methods that will ease your work process, while still maintain the libraries
flexibility. The new C++ interface is a development of us that serves this goal. Nevertheless,
backward compatibility remains important. We do not want to break your code written for earlier
version of the OpenCV library. Therefore, we made sure that we add some functions that deal with
this. In the following you'll learn:
- What changed with the version 2 of OpenCV in the way you use the library compared to its first
version
- How to add some Gaussian noise to an image
- What are lookup tables and why use them?
General
-------
When making the switch you first need to learn some about the new data structure for images:
@ref tutorial_mat_the_basic_image_container, this replaces the old *CvMat* and *IplImage* ones. Switching to the new
functions is easier. You just need to remember a couple of new things.
OpenCV 2 received reorganization. No longer are all the functions crammed into a single library. We
have many modules, each of them containing data structures and functions relevant to certain tasks.
This way you do not need to ship a large library if you use just a subset of OpenCV. This means that
you should also include only those headers you will use. For example:
@code{.cpp}
#include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
@endcode
All the OpenCV related stuff is put into the *cv* namespace to avoid name conflicts with other
libraries data structures and functions. Therefore, either you need to prepend the *cv::* keyword
before everything that comes from OpenCV or after the includes, you just add a directive to use
this:
@code{.cpp}
using namespace cv; // The new C++ interface API is inside this namespace. Import it.
@endcode
Because the functions are already in a namespace there is no need for them to contain the *cv*
prefix in their name. As such all the new C++ compatible functions don't have this and they follow
the camel case naming rule. This means the first letter is small (unless it's a name, like Canny)
and the subsequent words start with a capital letter (like *copyMakeBorder*).
Now, remember that you need to link to your application all the modules you use, and in case you are
on Windows using the *DLL* system you will need to add, again, to the path all the binaries. For
more in-depth information if you're on Windows read @ref tutorial_windows_visual_studio_opencv and for
Linux an example usage is explained in @ref tutorial_linux_eclipse.
Now for converting the *Mat* object you can use either the *IplImage* or the *CvMat* operators.
While in the C interface you used to work with pointers here it's no longer the case. In the C++
interface we have mostly *Mat* objects. These objects may be freely converted to both *IplImage* and
*CvMat* with simple assignment. For example:
@code{.cpp}
Mat I;
IplImage pI = I;
CvMat mI = I;
@endcode
Now if you want pointers the conversion gets just a little more complicated. The compilers can no
longer automatically determinate what you want and as you need to explicitly specify your goal. This
is to call the *IplImage* and *CvMat* operators and then get their pointers. For getting the pointer
we use the & sign:
@code{.cpp}
Mat I;
IplImage* pI = &I.operator IplImage();
CvMat* mI = &I.operator CvMat();
@endcode
One of the biggest complaints of the C interface is that it leaves all the memory management to you.
You need to figure out when it is safe to release your unused objects and make sure you do so before
the program finishes or you could have troublesome memory leaks. To work around this issue in OpenCV
there is introduced a sort of smart pointer. This will automatically release the object when it's no
longer in use. To use this declare the pointers as a specialization of the *Ptr* :
@code{.cpp}
Ptr<IplImage> piI = &I.operator IplImage();
@endcode
Converting from the C data structures to the *Mat* is done by passing these inside its constructor.
For example:
@code{.cpp}
Mat K(piL), L;
L = Mat(pI);
@endcode
A case study
------------
Now that you have the basics done [here's](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/core/interoperability_with_OpenCV_1/interoperability_with_OpenCV_1.cpp)
an example that mixes the usage of the C interface with the C++ one. You will also find it in the
sample directory of the OpenCV source code library at the
`samples/cpp/tutorial_code/core/interoperability_with_OpenCV_1/interoperability_with_OpenCV_1.cpp` .
To further help on seeing the difference the programs supports two modes: one mixed C and C++ and
one pure C++. If you define the *DEMO_MIXED_API_USE* you'll end up using the first. The program
separates the color planes, does some modifications on them and in the end merge them back together.
@snippet interoperability_with_OpenCV_1.cpp head
@snippet interoperability_with_OpenCV_1.cpp start
Here you can observe that with the new structure we have no pointer problems, although it is
possible to use the old functions and in the end just transform the result to a *Mat* object.
@snippet interoperability_with_OpenCV_1.cpp new
Because, we want to mess around with the images luma component we first convert from the default BGR
to the YUV color space and then split the result up into separate planes. Here the program splits:
in the first example it processes each plane using one of the three major image scanning algorithms
in OpenCV (C [] operator, iterator, individual element access). In a second variant we add to the
image some Gaussian noise and then mix together the channels according to some formula.
The scanning version looks like:
@snippet interoperability_with_OpenCV_1.cpp scanning
Here you can observe that we may go through all the pixels of an image in three fashions: an
iterator, a C pointer and an individual element access style. You can read a more in-depth
description of these in the @ref tutorial_how_to_scan_images tutorial. Converting from the old function
names is easy. Just remove the cv prefix and use the new *Mat* data structure. Here's an example of
this by using the weighted addition function:
@snippet interoperability_with_OpenCV_1.cpp noisy
As you may observe the *planes* variable is of type *Mat*. However, converting from *Mat* to
*IplImage* is easy and made automatically with a simple assignment operator.
@snippet interoperability_with_OpenCV_1.cpp end
The new *imshow* highgui function accepts both the *Mat* and *IplImage* data structures. Compile and
run the program and if the first image below is your input you may get either the first or second as
output:
![](images/outputInteropOpenCV1.jpg)
You may observe a runtime instance of this on the [YouTube
here](https://www.youtube.com/watch?v=qckm-zvo31w) and you can [download the source code from here
](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/core/interoperability_with_OpenCV_1/interoperability_with_OpenCV_1.cpp)
or find it in the
`samples/cpp/tutorial_code/core/interoperability_with_OpenCV_1/interoperability_with_OpenCV_1.cpp`
of the OpenCV source code library.
@youtube{qckm-zvo31w}
@@ -33,7 +33,7 @@ Code
@add_toggle_cpp
You can download this source code from [here
](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/cpp/tutorial_code/core/mat_mask_operations/mat_mask_operations.cpp) or look in the
](https://raw.githubusercontent.com/opencv/opencv/master/samples/cpp/tutorial_code/core/mat_mask_operations/mat_mask_operations.cpp) or look in the
OpenCV source code libraries sample directory at
`samples/cpp/tutorial_code/core/mat_mask_operations/mat_mask_operations.cpp`.
@include samples/cpp/tutorial_code/core/mat_mask_operations/mat_mask_operations.cpp
@@ -41,7 +41,7 @@ OpenCV source code libraries sample directory at
@add_toggle_java
You can download this source code from [here
](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/java/tutorial_code/core/mat_mask_operations/MatMaskOperations.java) or look in the
](https://raw.githubusercontent.com/opencv/opencv/master/samples/java/tutorial_code/core/mat_mask_operations/MatMaskOperations.java) or look in the
OpenCV source code libraries sample directory at
`samples/java/tutorial_code/core/mat_mask_operations/MatMaskOperations.java`.
@include samples/java/tutorial_code/core/mat_mask_operations/MatMaskOperations.java
@@ -49,7 +49,7 @@ OpenCV source code libraries sample directory at
@add_toggle_python
You can download this source code from [here
](https://raw.githubusercontent.com/opencv/opencv/3.4/samples/python/tutorial_code/core/mat_mask_operations/mat_mask_operations.py) or look in the
](https://raw.githubusercontent.com/opencv/opencv/master/samples/python/tutorial_code/core/mat_mask_operations/mat_mask_operations.py) or look in the
OpenCV source code libraries sample directory at
`samples/python/tutorial_code/core/mat_mask_operations/mat_mask_operations.py`.
@include samples/python/tutorial_code/core/mat_mask_operations/mat_mask_operations.py
+6 -11
View File
@@ -150,11 +150,12 @@ If we need to copy the data, this is done using, for example, cv::Mat::copyTo or
@snippet samples/python/tutorial_code/core/mat_operations/mat_operations.py Reference counting 2
@end_toggle
To the contrary with C API where an output image had to be created by the developer, an empty output Mat
can be supplied to each function. Each implementation calls Mat::create for a destination matrix.
This method allocates data for a matrix if it is empty. If it is not empty and has the correct size
and type, the method does nothing. If however, size or type are different from the input arguments, the
data is deallocated (and lost) and a new data is allocated. For example:
An empty output Mat can be supplied to each function.
Each implementation calls Mat::create for a destination matrix.
This method allocates data for a matrix if it is empty.
If it is not empty and has the correct size and type, the method does nothing.
If however, size or type are different from the input arguments, the data is deallocated (and lost) and a new data is allocated.
For example:
@add_toggle_cpp
@snippet samples/cpp/tutorial_code/core/mat_operations/mat_operations.cpp Reference counting 3
@@ -199,12 +200,6 @@ Selecting a region of interest:
@snippet samples/python/tutorial_code/core/mat_operations/mat_operations.py Select ROI
@end_toggle
A conversion from Mat to C API data structures (**C++ only**):
@snippet samples/cpp/tutorial_code/core/mat_operations/mat_operations.cpp C-API conversion
Note that there is no data copying here.
Conversion from color to greyscale:
@add_toggle_cpp
@@ -262,7 +262,7 @@ OpenCV offers support for output of other common OpenCV data structures too via
![](images/MatBasicContainerOut15.png)
Most of the samples here have been included in a small console application. You can download it from
[here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/core/mat_the_basic_image_container/mat_the_basic_image_container.cpp)
[here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/core/mat_the_basic_image_container/mat_the_basic_image_container.cpp)
or in the core section of the cpp samples.
You can also find a quick video demonstration of this on
@@ -82,17 +82,6 @@ understanding how to manipulate the images on a pixel level.
You will see how to use the @ref cv::FileStorage data structure of OpenCV to write and read
data to XML or YAML file format.
- @subpage tutorial_interoperability_with_OpenCV_1
*Compatibility:* \> OpenCV 2.0
*Author:* Bernát Gábor
Did you used OpenCV before its 2.0 version? Do you wanna know what happened with your library
with 2.0? Don't you know how to convert your old OpenCV programs to the new C++ interface?
Look here to shed light on all this questions.
- @subpage tutorial_how_to_use_OpenCV_parallel_for_
*Compatibility:* \>= OpenCV 2.4.3
@@ -12,7 +12,7 @@ Tutorial was written for the following versions of corresponding software:
- Download and install Android Studio from https://developer.android.com/studio.
- Get the latest pre-built OpenCV for Android release from https://github.com/opencv/opencv/releases and unpack it (for example, `opencv-3.4.7-android-sdk.zip`).
- Get the latest pre-built OpenCV for Android release from https://github.com/opencv/opencv/releases and unpack it (for example, `opencv-4.1.1-android-sdk.zip`).
- Download MobileNet object detection model from https://github.com/chuanqi305/MobileNet-SSD. We need a configuration file `MobileNetSSD_deploy.prototxt` and weights `MobileNetSSD_deploy.caffemodel`.
@@ -216,7 +216,7 @@ a centric one.
@snippet dnn/edge_detection.py Register
That's it! We've replaced an implemented OpenCV's layer to a custom one.
You may find a full script in the [source code](https://github.com/opencv/opencv/tree/3.4/samples/dnn/edge_detection.py).
You may find a full script in the [source code](https://github.com/opencv/opencv/tree/master/samples/dnn/edge_detection.py).
<table border="0">
<tr>
@@ -13,7 +13,7 @@ We will demonstrate results of this example on the following picture.
Source Code
-----------
We will be using snippets from the example application, that can be downloaded [here](https://github.com/opencv/opencv/blob/3.4/samples/dnn/classification.cpp).
We will be using snippets from the example application, that can be downloaded [here](https://github.com/opencv/opencv/blob/master/samples/dnn/classification.cpp).
@include dnn/classification.cpp
@@ -25,7 +25,7 @@ Explanation
[bvlc_googlenet.caffemodel](http://dl.caffe.berkeleyvision.org/bvlc_googlenet.caffemodel)
Also you need file with names of [ILSVRC2012](http://image-net.org/challenges/LSVRC/2012/browse-synsets) classes:
[classification_classes_ILSVRC2012.txt](https://github.com/opencv/opencv/blob/3.4/samples/data/dnn/classification_classes_ILSVRC2012.txt).
[classification_classes_ILSVRC2012.txt](https://github.com/opencv/opencv/blob/master/samples/data/dnn/classification_classes_ILSVRC2012.txt).
Put these files into working dir of this program example.
@@ -68,8 +68,6 @@ MSBuild.exe /m:4 /t:Build /p:Configuration=Release .\\ALL_BUILD.vcxproj
## Build OpenCV with Halide backend
When you build OpenCV add the following configuration flags:
- `ENABLE_CXX11` - enable C++11 standard
- `WITH_HALIDE` - enable Halide linkage
- `HALIDE_ROOT_DIR` - path to Halide build directory
+2 -2
View File
@@ -19,8 +19,8 @@ Source Code
-----------
Use a universal sample for object detection models written
[in C++](https://github.com/opencv/opencv/blob/3.4/samples/dnn/object_detection.cpp) and
[in Python](https://github.com/opencv/opencv/blob/3.4/samples/dnn/object_detection.py) languages
[in C++](https://github.com/opencv/opencv/blob/master/samples/dnn/object_detection.cpp) and
[in Python](https://github.com/opencv/opencv/blob/master/samples/dnn/object_detection.py) languages
Usage examples
--------------

Some files were not shown because too many files have changed in this diff Show More