486 Commits

Autor SHA1 Mensagem Data
Roman Donchenko 5ae9add102 Merge pull request #2221 from asmorkalov:ocv_test_install_custom 2014-01-29 17:09:28 +04:00
Alexander Smorkalov d45350a06a opencv_run_all_tests.sh script added to -tests package. 2014-01-29 16:31:24 +04:00
Roman Donchenko 3e59ddbace Merge pull request #2215 from asmorkalov:ocv_testpack_fix 2014-01-28 17:51:07 +04:00
Alexander Smorkalov d9dc5ffa91 Multiple fixes for tests deb package build.
Added opencv_testing.sh.in file;
opencv_testing.sh installation guarded by OS check.
2014-01-28 16:32:26 +04:00
Roman Donchenko 7a0a9d010b Merge pull request #2205 from jet47:bug-3477-fix 2014-01-28 12:23:32 +04:00
Andrey Pavlenko 51aa649499 Merge pull request #2097 from pclove1:blur_border_isolated 2014-01-28 10:51:11 +04:00
Vladislav Vinogradov c41e8006c7 fix #3477:
CV_CAP_PROP_SUPPORTED_PREVIEW_SIZES_STRING property is not supported
by all VideoCapture backends. Some backends can return 0.0 or -1.0.
2014-01-28 10:28:00 +04:00
Seunghoon Park eb9d7c4dd5 fixing bug #3345. use norm to make sure two matrices are the same. 2014-01-27 20:57:40 -05:00
Seunghoon Park 73389b2b9c Merge branch '2.4' into blur_border_isolated 2014-01-27 20:44:03 -05:00
Roman Donchenko 452ea4c15f Merge pull request #2209 from asmorkalov:ocv_test_install 2014-01-27 20:59:53 +04:00
Alexander Smorkalov 39201e68e2 Code review notes fixed.
Env setup for testing package implemented using /etc/profile.d;
Variable with path for all native samples added;
Path for test binaries and test data updated.
2014-01-27 18:47:09 +04:00
Alexander Smorkalov f332cba14b OpenCV C/C++/OCL/CUDA samples install path fixed. Install rools for tests added. 2014-01-27 15:49:24 +04:00
Andrey Pavlenko d093cb54d5 Merge pull request #2194 from apavlenko:2.4_perf_haar_iter 2014-01-24 16:13:19 +04:00
Roman Donchenko 24caa80143 Merge pull request #2197 from asmorkalov:ocv_packaging2 2014-01-24 14:27:44 +04:00
Alexander Smorkalov 086792ec06 Improvements in package build. 2014-01-24 12:00:44 +04:00
Andrey Pavlenko 0a4a1d7526 temporary disabling hanging test 2014-01-24 10:07:21 +04:00
Roman Donchenko 078d49609e Merge pull request #2193 from apavlenko:2.4_lic_remove 2014-01-23 17:13:52 +04:00
Andrey Pavlenko dca5684145 removing duplicated legacy license, the actual instance is in 'opencv/LICENSE' 2014-01-23 17:05:20 +04:00
Roman Donchenko 7ff9d7eb2d Merge pull request #2188 from jet47:gpumat-copyto-fix 2014-01-23 13:28:12 +04:00
Roman Donchenko 3715f71aaf Merge pull request #2175 from vrabaud:2.4 2014-01-23 13:27:38 +04:00
Vincent Rabaud 167a26642e fix message sent to user during cross_compilation 2014-01-22 15:26:14 +01:00
Roman Donchenko a4b34e7ae1 Merge pull request #2181 from asmorkalov:ocv_packaging 2014-01-22 11:54:07 +04:00
Vladislav Vinogradov dda999545c fix GpuMat::copyTo method with mask:
fill destination matrix with zeros if it was reallocated
2014-01-22 10:40:14 +04:00
Alexander Smorkalov 7821fe2bde Initial Linux packages build rools for CPack. 2014-01-21 20:34:36 +04:00
Alexander Smorkalov b75cbfde45 All installed files marked with component names for install customization. 2014-01-21 20:34:36 +04:00
Roman Donchenko a548a08129 Merge pull request #2183 from jet47:cuda-hough-fix 2014-01-21 19:27:54 +04:00
Andrey Pavlenko 32bc89f094 Merge pull request #2107 from nghiaho12:nn_doc 2014-01-21 19:11:12 +04:00
Vladislav Vinogradov 33d42b740c disable CUDA generalized Hough Transform 2014-01-21 15:07:47 +04:00
Vladislav Vinogradov d847387694 split CUDA Hough sources 2014-01-21 15:07:47 +04:00
Vincent Rabaud eabcfa5652 reorder the if's for clarity 2014-01-21 10:27:37 +01:00
Vincent Rabaud 6cb90c0e97 fix cross-compilation issue with Numpy 2014-01-21 10:07:19 +01:00
Roman Donchenko 64244e160b Merge pull request #2171 from djetter99:fix_static_init_order 2014-01-20 19:30:29 +04:00
Drew Jetter 6bf599b1bc Fixed bug #3489: The code assumed that two global variables would be constructed in a particular order, but global variable initialization order is compiler-dependent. 2014-01-18 23:04:16 -07:00
Roman Donchenko 088535fa56 Merge pull request #2159 from SpecLad:1xN 2014-01-17 18:23:53 +04:00
Roman Donchenko 58afe5dd17 Merge pull request #2140 from Daniil-Osokin:fix_saving_untrained_svm_model 2014-01-17 14:57:57 +04:00
Roman Donchenko 5f8d8c0069 Added a test for matrix-to-vector copy and convert. 2014-01-17 14:18:31 +04:00
Roman Donchenko 4e4a7d0353 Removed an unnecessary workaround for matrix-to-vector copyTo. 2014-01-17 14:16:22 +04:00
Roman Donchenko ee97a5e757 Re-fix bug #3319 with less side effects. 2014-01-17 14:13:21 +04:00
Roman Donchenko f02204847a Revert "fixed bug #3319"
See 092f916 for explanation.

This reverts commit 4f9c081dc3.
2014-01-17 13:43:00 +04:00
Andrey Pavlenko 8dbc96fed8 Merge pull request #2143 from Daniil-Osokin:fix_docs_cvt_color_alpha_channel 2014-01-17 10:43:40 +04:00
Daniil Osokin 8ce691e679 Fixed cvtColor alpha channel docs 2014-01-16 18:36:06 +04:00
Seunghoon Park 2272a58769 fixing bug #3345. don't use BORDER_ISOLATED alone. it should be combined with some border type 2014-01-14 20:47:23 -05:00
Roman Donchenko 2fde4d8a94 Merge pull request #2145 from andreasBihlmaier:2.4 2014-01-14 11:55:29 +04:00
Roman Donchenko 2443e8090e Merge pull request #2133 from apavlenko:2.4-perf_haar 2014-01-13 19:28:09 +04:00
ahb 49dfa5a17f Fix the following error for ocl::getOpenCLPlatforms() on Ubuntu 12.04 with gcc 4.8
OpenCV Error: Unknown error code -6 (OpenCL function is not available: [clGetPlatformIDs]) in opencl_check_fn, file /home/ahb/software/opencv/modules/ocl/src/cl_runtime/cl_runtime.cpp, line 83

The issue results from modules/ocl/src/cl_runtime/cl_runtime.cpp checking for
"linux" instead of "__linux__" (cp.  http://sourceforge.net/p/predef/wiki/OperatingSystems/)

Adjust all other occurrences of "defined(linux)" as well.
2014-01-13 16:09:42 +01:00
Andrey Pavlenko 4c99196399 adding finish() to flush CL queue, renaming the test to match 'master' branch 2014-01-13 18:12:30 +04:00
Roman Donchenko 9628abc786 Merge pull request #2137 from ilya-lavrenov:gitignore 2014-01-13 16:33:16 +04:00
Roman Donchenko 87e0c26129 Merge pull request #2108 from pemmanuelviel:flannMemoryLeak 2014-01-13 16:26:02 +04:00
Daniil Osokin 5d2edced26 Added throwing exception when saving untrained SVM model 2014-01-13 13:50:30 +04:00
Andrey Pavlenko a7821c60e5 refactoring the test as it should be in 2.4 2014-01-13 11:20:17 +04:00
Ilya Lavrenov f197d8b91c updated .gitignore 2014-01-10 18:59:06 +04:00
Roman Donchenko 890f1baff0 Merge pull request #2132 from ComFreek:patch-2 2014-01-10 11:44:46 +04:00
Andrey Pavlenko 4d28e8243c 'master'-like Haar perf test 2014-01-10 00:14:48 +04:00
ComFreek ae795e5797 Corrected package name in tutorial
See also #2101
2014-01-09 17:24:20 +01:00
Roman Donchenko a13e32f5ab Merge pull request #2115 from nghiaho12:kmeans_sample 2014-01-09 16:58:29 +04:00
Roman Donchenko d509165d96 Merge pull request #2118 from ilya-lavrenov:semicolons 2014-01-09 16:21:49 +04:00
Nghia Ho bf4994554d Removed unecessary initialisation of Mat centers. 2014-01-09 21:04:17 +11:00
Roman Donchenko 7acea48788 Merge pull request #2106 from robbertkl:patch-2 2014-01-09 13:25:59 +04:00
Roman Donchenko 58882e5c22 Merge pull request #2114 from kazuki-ma:SparseMat_convertTo_typofix_24 2014-01-09 13:24:20 +04:00
Ilya Lavrenov 6b9ebcbf3d deleted extra semicolons 2014-01-07 02:52:30 +04:00
Nghia Ho 601b7d1dd3 Fixed a valgrind 'Conditional jump or move depends on uninitialised value(s)' on cv::kmeans(...). The original code used points(sampleCount, 1, CV_32FC2), which confused generateCentersPP into thinking it is a 1 dimensional center, instead of 2. As a result it would set only the x variable and leave y unitialised. 2014-01-06 20:19:07 +11:00
Kazuki Matsuda 2ae20c74a2 Fix typo of SparseMat_<_Tp>::SparseMat_(const SparseMat& m)
Fix compilation erros when compiling this constructor.
First argument type of "convertTo" should be instance, not a pointer of instance.

First pull request was created for master branch.
But it should be marged for 2.4.
https://github.com/Itseez/opencv/pull/2113
2014-01-06 02:24:14 +09:00
Pierre-Emmanuel Viel 3f458c6eb1 Fix: freeing previous elements has to be done before loading new parameters to avoid trying to delete unexisting objects if arrays size was modified 2014-01-03 13:16:36 +01:00
Nghia Ho d3e24f3cbf Improved documentation for neural network 2014-01-03 14:18:07 +11:00
Robbert Klarenbeek e21c6e19db Fix algorithm setter argument validation for uchar 2014-01-02 21:17:55 +01:00
Roman Donchenko 5327482b46 Merge pull request #2084 from ilya-lavrenov:cont 2013-12-31 16:51:30 +04:00
Ilya Lavrenov 4f9c081dc3 fixed bug #3319 2013-12-31 13:56:59 +04:00
Roman Donchenko 157202fc8d Merge pull request #2094 from SpecLad:multimon-be-gone 2013-12-31 11:40:44 +04:00
Seunghoon Park b036fc756a fixing bug #3345 2013-12-30 21:10:06 -05:00
Roman Donchenko 4ce684e61c Merge pull request #2087 from ilya-lavrenov:remap_sse2_cond 2013-12-30 18:18:42 +04:00
Roman Donchenko 795c108f2b Fixed MinGW build by declaring the minimal required Windows version.
Also deleted miscellaneous remaining multimon cruft.
Deleted #include <winuser.h>, because <windows.h> includes it
already.

This should have a nice side effect of preventing us from
accidentally using any Windows API that's too new.
2013-12-30 18:13:42 +04:00
Roman Donchenko 6811d2ab24 Merge pull request #2086 from ilya-lavrenov:mul_fix 2013-12-30 17:57:43 +04:00
Ilya Lavrenov 5db1754d49 SSE2 optimization of cv::remap doesn't work with big images 2013-12-30 17:13:40 +04:00
Ilya Lavrenov 09d25e11c6 fixed bug #3341 2013-12-30 16:47:54 +04:00
Roman Donchenko a0c98dcefa Merge pull request #2092 from alalek:fix_mingw_warn 2013-12-30 15:34:16 +04:00
Alexander Alekhin 44970ddf56 eliminate MINGW pragma warning 2013-12-30 12:31:00 +04:00
Roman Donchenko 05b9c991dd Merge pull request #2083 from jet47:gpu_android_tests 2013-12-27 21:09:18 +04:00
Roman Donchenko 46be47cb4b Merge pull request #2080 from asmorkalov:ocv_dynamic_cuda_deviceinfo_fix 2013-12-27 20:53:42 +04:00
Roman Donchenko 4eb9b9d6cf Merge pull request #2082 from asmorkalov:dynamicuda_internal_fix 2013-12-27 19:58:57 +04:00
Vladislav Vinogradov 53494ba397 increase thresholds for some tests 2013-12-27 18:20:14 +04:00
Vladislav Vinogradov 15678efe84 disable 2 problematic tests 2013-12-27 18:20:01 +04:00
Vladislav Vinogradov 8399568edf disabled GEMM test if library was built without CUBLAS 2013-12-27 18:19:29 +04:00
Roman Donchenko 0566ab4d3d Merge pull request #2078 from ilya-lavrenov:warn 2013-12-27 18:17:21 +04:00
Alexander Smorkalov df63060e4d Bugfix for DeviceInfoFuncTable in dynamicuda amd core modules. 2013-12-27 18:04:10 +04:00
Alexander Smorkalov 4175916b2a dynamicuda became private module. 2013-12-27 17:19:38 +04:00
Andrey Pavlenko d649f47eeb Merge pull request #2072 from pengx17:patch-3 2013-12-27 15:36:24 +04:00
Ilya Lavrenov d014cb8fb4 fixed warning [-Wempty-body] 2013-12-27 14:44:58 +04:00
Roman Donchenko c45492371a Merge pull request #2036 from GregoryMorse:patch-1 2013-12-27 12:44:02 +04:00
Roman Donchenko 719149877e Merge pull request #2074 from asmorkalov:android_nonfree_cuda 2013-12-27 12:43:49 +04:00
Roman Donchenko ee36717db4 Merge pull request #2037 from GregoryMorse:patch-2 2013-12-27 12:11:52 +04:00
Alexander Smorkalov c48777a1c3 CUDA dependency in nonfree nodule removed. OpenCV.mk generation fixed. 2013-12-27 11:18:10 +04:00
Peng Xiao 0ccc903647 fixed a buffer overrun of ocl canny
the `map` buffer does not have the same size with CUDA and index starts at [1, 1] instead of [0, 0].
2013-12-27 11:54:08 +08:00
Andrey Pavlenko 41fd711ab0 Merge pull request #2069 from asmorkalov:android_ocl_1_1_fix 2013-12-26 23:07:25 +04:00
Andrey Pavlenko 4b885e2067 Merge pull request #2068 from akarsakov:disable_ipp 2013-12-26 22:41:52 +04:00
Alexander Smorkalov 4f6f6e8cac static function qualifier replaced on inline to enable kernel compilation with OpenCL 1.1 embedded profile. 2013-12-26 21:20:32 +04:00
Alexander Karsakov 6ef0253fb7 Disabled some IPP implementation since it breaks tests 2013-12-26 19:53:53 +04:00
Andrey Pavlenko f7b5e6544f Merge pull request #2061 from apavlenko:2.4_fix_build_vs12 2013-12-26 19:38:57 +04:00
Roman Donchenko 648facccd6 Merge pull request #2064 from dpen2000:patch-2 2013-12-26 17:47:09 +04:00
Roman Donchenko 709e8e8e07 Merge pull request #2057 from asmorkalov:android_cuda_sample 2013-12-26 16:59:56 +04:00
Andrey Pavlenko 734bf8babd removing legacy stuff 2013-12-26 15:49:12 +04:00
GregoryMorse 4880858119 Update CMakeLists.txt
WinRT native C++ support allowing building of static libraries

Update CMakeLists.txt

Update OpenCVCRTLinkage.cmake

Update OpenCVCRTLinkage.cmake
2013-12-26 19:45:21 +08:00
Alexander Smorkalov cea9a97434 CUDA support check added. 2013-12-26 14:52:41 +04:00
Alexander Smorkalov b3eee49451 New sample for CUDA on Android added. 2013-12-26 14:52:41 +04:00
Roman Donchenko 60906d9175 Merge pull request #2060 from asmorkalov:ocv_ts_cuda 2013-12-26 14:39:51 +04:00
dpen2000 d6a88397b4 Fix python sample path 2013-12-26 10:36:24 +00:00
Roman Donchenko 8fe79738ce Merge pull request #2056 from asmorkalov:java_core_cuda_wrappers 2013-12-26 14:21:21 +04:00
Roman Donchenko 86aabf704f Merge pull request #2050 from asmorkalov:android_mk_fix2 2013-12-26 14:16:29 +04:00
Andrey Pavlenko f9aa148ba9 eliminating VS2013 build warnings 2013-12-26 13:35:59 +04:00
Alexander Smorkalov 358e59e91b Fake dependency from CUDA in case of satic linkage with OpenCV removed. 2013-12-26 13:07:53 +04:00
Roman Donchenko b94963d381 Merge pull request #2052 from SpecLad:seporate 2013-12-26 12:22:46 +04:00
Alexander Smorkalov e79c875fe2 Java wrappers for functions from cv::gpu namespace in core module added. 2013-12-26 12:13:23 +04:00
Roman Donchenko 24be7b26cd Merge pull request #2049 from asmorkalov:android_cuda_warning_fix 2013-12-26 12:07:01 +04:00
Alexander Smorkalov 0206f419c1 ts dependency from CUDA runtime removed. All implicit CUDA calls replaced by calls from core module. 2013-12-26 11:36:00 +04:00
Alexander Smorkalov 1e038e2837 CUDA warning fix/supporession for Android. 2013-12-26 10:17:38 +04:00
Alexander Smorkalov 4aa9f83100 Dynamic CUDA support library name fixed. Additional error messages added. 2013-12-26 10:16:29 +04:00
Roman Donchenko 1acc1085d2 Merge pull request #2017 from pemmanuelviel:flannMemoryLeak 2013-12-25 19:36:49 +04:00
Roman Donchenko 83fe2f3b16 Fixed the seporate/seporator typo everywhere. 2013-12-25 14:04:44 +04:00
Roman Donchenko 1e27b07e29 Merge pull request #2051 from AlexWillisson:patch-2 2013-12-25 13:14:14 +04:00
Alex Willisson 4293a54447 Fixed typo in comment 2013-12-24 19:53:50 -05:00
Roman Donchenko edce617a58 Merge pull request #2040 from asmorkalov:android_mk_fix 2013-12-23 18:02:18 +04:00
Alexander Smorkalov 51d3138dff OCV option ENABLE_DYNAMIC_CUDA mistake fix. 2013-12-23 16:40:31 +04:00
Roman Donchenko 83cdd43a4c Merge pull request #2039 from asmorkalov:ocv_version_inc3 2013-12-23 15:53:11 +04:00
Alexander Smorkalov 58e7d9f32f OpenCV.mk fixed for accurate CUDA support. 2013-12-23 12:58:12 +04:00
Roman Donchenko f22d9a232d Merge pull request #2022 from asmorkalov:ocv_dynamic_cuda 2013-12-23 12:45:49 +04:00
Alexander Smorkalov 4ec1930949 OpenCV version++; OpenCV Manager version++. 2013-12-23 12:35:06 +04:00
Alexander Smorkalov bc72f4d2a2 Code review fixes. 2013-12-23 11:34:46 +04:00
GregoryMorse 08d8faf9da Update system.cpp
Add native C++ support
2013-12-23 00:21:51 +08:00
Andrey Pavlenko f9268d34dc Merge pull request #2023 from krodyush:pullreq/2.4-opt-131126-cvt 2013-12-21 12:44:06 +04:00
Roman Donchenko 6e22be4100 Merge pull request #2003 from vbystricky:intelperc_camera_2.4 2013-12-20 17:06:27 +04:00
Roman Donchenko ce07840e9f Merge pull request #1966 from asmorkalov:ocv_neon_support 2013-12-20 17:04:17 +04:00
Andrey Pavlenko 6b7d890f34 Merge pull request #2014 from krodyush:pullreq/2.4-opt-131211-surf 2013-12-20 16:50:00 +04:00
Alexander Smorkalov 9941c6710d NEON instruction set control unified for regular and cross-compiler builds. 2013-12-20 16:02:37 +04:00
krodyush e8dd31aacd change code according reviewer suggesions 2013-12-20 13:51:51 +04:00
Vladimir Bystricky d6a7e8f84f Remove TBB ifdef form code 2013-12-20 12:33:39 +04:00
Roman Donchenko b633c73c46 Merge pull request #1994 from StevenPuttemans:bugfix_3431 2013-12-20 11:57:30 +04:00
Alexander Smorkalov 529bd41751 Build fixes for case where HAVE_CUDA==OFF. 2013-12-20 11:37:15 +04:00
krodyush 27c1bd2762 Improve ocl cvt_color performance for the following conversions: RGB<->BGR, RGB->Gray, RGB<->XYZ, RGB<->YCrCb, RGB<->YUV, and mRGBA<->RGBA.
The improvement was done basically by processing more than 1 pixel by each work-item and using vector's operations.
new performance tests were added
2013-12-19 22:56:46 +04:00
Alexander Smorkalov 069f3d8d9a Build fixes for GPU module. 2013-12-19 19:12:18 +04:00
Alexander Smorkalov 2509fa8080 Warious fixes for case where HAVE_CUDA==OFF. 2013-12-19 18:02:59 +04:00
Alexander Smorkalov 5a5c82bb1d Additional ENABLE_DYNAMIC_CUDA option implemented in cmake. Warning fixes and refactoring. 2013-12-19 17:41:04 +04:00
Andrey Pavlenko 26f5d2d639 Merge pull request #1765 from ilya-lavrenov:cv_remap 2013-12-19 17:08:52 +04:00
Andrey Pavlenko b674cd8571 Merge pull request #2007 from krodyush:pullreq/2.4-opt-131202-haar 2013-12-19 16:46:58 +04:00
Andrey Pavlenko 8c91a1af71 Merge pull request #2005 from krodyush:pullreq/2.4-opt-131114-extractCovData 2013-12-19 16:46:40 +04:00
Alexander Smorkalov 037ffcdf99 Dynamic CUDA support library reimplemented as OpenCV module. 2013-12-19 16:42:11 +04:00
Andrey Pavlenko 22a3cf0fba Merge pull request #2008 from krodyush:pullreq/2.4-opt-131209-hog 2013-12-19 16:14:42 +04:00
Andrey Pavlenko 0cea828a10 Merge pull request #2006 from krodyush:pullreq/2.4-opt-131120-gfft 2013-12-19 13:48:40 +04:00
Andrey Pavlenko bc741ab25f Merge pull request #2009 from krodyush:pullreq/2.4-opt-131211-sepFilterSinglePass_final 2013-12-19 13:38:52 +04:00
Alexander Smorkalov 64c94cb22c CUDA related func tables refactored to remove unneeded dependencies. 2013-12-19 11:18:04 +04:00
Vladimir Bystricky d449ba104a Fix comment in the cmake file from SSDK to SDK 2013-12-19 10:29:19 +04:00
Alexander Smorkalov 6da7c50fb5 Make dependency from CUDA explicit to prevent from fake dependedcies from CUDA runtime. 2013-12-19 10:27:38 +04:00
Alexander Smorkalov 442082eb0f Fixes for Android support. 2013-12-19 09:38:46 +04:00
Pierre-Emmanuel Viel 92fc763925 Fix some memory leaks in HierarchicalClusteringIndex 2013-12-18 22:46:41 +01:00
Andrey Pavlenko 459e7d4a80 Merge pull request #2015 from apavlenko:2.4_fix_ts_rng-fill 2013-12-18 19:13:22 +04:00
Roman Donchenko 400fea8626 Merge pull request #2011 from ilya-lavrenov:dft_dct 2013-12-18 17:36:18 +04:00
Andrey Pavlenko a9687a341e adding more than 4 channels random Mats support
if `Scalar:all` is used, Mats with 5+ channels cause errors
2013-12-18 17:27:39 +04:00
Andrey Pavlenko ae9d24d433 Merge pull request #2013 from apavlenko:2.4_fd_sample 2013-12-18 17:05:18 +04:00
Andrey Pavlenko 8c60498673 adding timing for multi-threaded case 2013-12-18 17:02:39 +04:00
krodyush 1ae71fe205 intel device guard was added because of perf degradation on some non intel platform. 2013-12-18 14:27:51 +04:00
Alexander Smorkalov be530bd085 DeviceInfo class method that were implemented in header moved to cpp file. 2013-12-18 12:02:15 +04:00
Vladimir Bystricky 80d0593dbd Delete end comma in enumerations 2013-12-18 11:46:52 +04:00
Vladimir Bystricky 66145ea06c Add CV_CAP_INTELPERC and CV_CAP_PROP_INTELPERC_ prefixes to const_ignore_list 2013-12-18 10:55:09 +04:00
Vladimir Bystricky dd71bef6f5 Fix errors in example (samples/cpp/intelperc_capture.cpp) 2013-12-18 09:59:24 +04:00
Andrey Pavlenko e719bee2b8 minor refactoring, no functional changes 2013-12-18 00:15:02 +04:00
Vladimir Bystricky 63ae0eeba5 Fix build errors 2013-12-17 18:39:52 +04:00
krodyush 34c630faf4 update doc to be consisted with headers 2013-12-17 17:46:09 +04:00
Ilya Lavrenov 3a6d248bee typo 2013-12-17 17:41:28 +04:00
krodyush ea0c9b7f5c GFFT fix for linux build 2013-12-17 17:12:57 +04:00
Vladimir Bystricky cc08e00876 Fix notes about cmake files. Fix build warning. 2013-12-17 16:13:55 +04:00
krodyush fffac2f085 optimize SURF by
Inlining and customizing sampling functions to reduce memory traffic and compute
Improve calcOrientation implementation.
Using more efficient rounding routines.
Removing unnecessary use of local memory
2013-12-17 14:12:33 +04:00
krodyush dfe7c98090 optimize separable filter by
Added "sep_filter_singlepass" kernel that performs separable filtering in one kernel call
Added appropriate host part - sepFilter2D_SinglePass function and SingleStepSeparableFilterEngine_GPU class
Changed function declarations to enable their usage
2013-12-17 14:09:06 +04:00
krodyush f3ee1c3d2f Changes the datatype of the angle of the gradient for Intel platforms. 2013-12-17 14:06:14 +04:00
krodyush 917b883cf0 remove extra calculations from haar to be consistent with native implementation 2013-12-17 14:04:10 +04:00
krodyush a63576e76d HOST side optimization for GFFT 2013-12-17 14:02:57 +04:00
krodyush de431609db optimize Dx and Dy calcualtion to make it as single opencl kernel 2013-12-17 14:01:01 +04:00
Roman Donchenko 5d5527d03e Merge pull request #1987 from pentschev:cv_completesymm_template_2.4 2013-12-17 13:17:25 +04:00
Vladimir Bystricky 4088013251 Add set/get depth generator properties by default. Add documentation 2013-12-17 12:00:40 +04:00
Alexander Smorkalov 88a883e68e Build fix. 2013-12-17 10:24:00 +04:00
Alexander Smorkalov 8660e048bc Dynamic CUDA support library loading implemented for Linux.
Logical mistake in macro fixed;
DeviceInfo deligate reimplemented;
Build and warning fixes.
2013-12-16 14:46:44 +04:00
Alexander Smorkalov d4087f19a2 All CUDA related stuff were moved to separate dynamic library. 2013-12-16 14:46:44 +04:00
StevenPuttemans 12c25b9310 Fixed suggestion of bugfix 3431
Seems correct to me and builds fine
2013-12-16 11:05:53 +01:00
Roman Donchenko e88253ccad Merge pull request #1990 from AD-530:Issue3164 2013-12-16 12:11:43 +04:00
Peter Andreas Entschev f44de302a0 cv::completeSymm fixed to work with any OpenCV data type and multiple channels. 2013-12-15 20:56:55 -02:00
Matthias Bady b7c97f6e30 fixed init of clCxt 2013-12-15 22:41:07 +01:00
Vladimir Bystricky e8d2a9752b Add support Creative Senz3D camera by Intel Perceptual Computing SDK 2013-12-13 17:25:16 +04:00
Andrey Pavlenko 10849d1c7a Merge pull request #1980 from alalek:ocl_interop_initialization 2013-12-13 16:09:09 +04:00
Alexander Alekhin 17ca7f9545 ocl: add support for initialization from user-provided OpenCL handles 2013-12-12 19:59:22 +04:00
Andrey Pavlenko 658282fcbe Merge pull request #1976 from alalek:ocl_multiple_command_queues 2013-12-12 09:55:33 +04:00
Andrey Pavlenko ee270d1a18 Merge pull request #1975 from magomimmo:clj-tut 2013-12-11 21:25:31 +04:00
Alexander Alekhin 740b1f235e ocl: implemented per-thread OpenCL command queue 2013-12-11 19:12:09 +04:00
Alexander Alekhin a118577a57 core: added TLS support 2013-12-11 18:50:11 +04:00
Roman Donchenko ce503c64bf Merge pull request #1968 from pentschev:fix_indentation_freak_2.4 2013-12-11 16:55:26 +04:00
Mimmmo Cosenza 00a180185e remove Daniele 2013-12-11 13:35:20 +01:00
Mimmmo Cosenza 1c639befe6 add tutorial content 2013-12-11 13:30:52 +01:00
Mimmmo Cosenza b1899e5489 add clojure tutorial 2013-12-11 13:28:27 +01:00
Mimmmo Cosenza 6f292d8036 add clojure logo 2013-12-11 13:28:04 +01:00
Mimmmo Cosenza f07e9e7c5f add clojure sample 2013-12-11 13:26:47 +01:00
Mimmmo Cosenza 2784fd7b27 add Mimmo Cosenza to Authors 2013-12-11 13:25:53 +01:00
Peter Andreas Entschev c289c8a700 Fixing some indentation issues on FREAK source file. 2013-12-10 08:57:46 -02:00
Roman Donchenko 13c058ecf8 Merge pull request #1959 from botverse:2.4 2013-12-09 17:25:33 +04:00
Alfonso (the fonz) de la Osa df0c43321d --no-display property fix in stereo_match.cpp sample 2013-12-09 10:55:44 +00:00
Roman Donchenko 8f10ca5180 Merge pull request #1946 from asmorkalov:android_manager_version_inc3 2013-12-09 13:14:16 +04:00
Alexander Smorkalov 9f04222a75 OpenCV Manager version++. 2013-12-06 18:53:03 +04:00
Roman Donchenko 060e58d080 Merge pull request #1945 from apavlenko:2.4_version_update 2013-12-06 17:56:59 +04:00
Andrey Pavlenko b5936648ca Merge pull request #1943 from pentschev:ocl_oclMat_ptr_remove_2.4 2013-12-06 16:59:02 +04:00
Andrey Pavlenko f2cf9dd8bf updating version to 2.4.7.2 2013-12-06 16:21:22 +04:00
Andrey Pavlenko 7069b4b761 Merge pull request #1927 from JBosch:issue3409 2013-12-06 16:06:03 +04:00
Andrey Pavlenko 0e3553130a Merge pull request #1872 from KonstantinMatskevich:ocl_mt_test 2013-12-06 16:00:10 +04:00
Andrey Pavlenko c34fc180a7 Merge pull request #1762 from jet47:cuda-6.0-npp-fix 2013-12-06 15:56:15 +04:00
Andrey Pavlenko 77d04a2622 Merge pull request #1844 from StevenPuttemans:bugfix_3370 2013-12-06 15:51:59 +04:00
Andrey Pavlenko 1d01c49a06 Merge pull request #1870 from es0m:es0m-2.4-imgproc-samplers 2013-12-06 15:47:39 +04:00
Peter Andreas Entschev def17f2baa Removing ocl::oclMat::ptr() method.
The method ocl::oclMat::ptr() is being removed because it returns a pointer to a row of oclMat::data. The data attribute is a cl_mem structure and cannot be iterated outside an OpenCL kernel.
2013-12-06 09:31:18 -02:00
Andrey Pavlenko 72cfff4c59 Merge pull request #1940 from pentschev:ocl_bfm_oclMat_ptr_fix_2.4 2013-12-06 15:05:34 +04:00
Konstantin Matskevich 45dd18955f Merge pull request #2 from apavlenko/ocl_mt_test
minor improvements
2013-12-06 03:03:27 -08:00
Andrey Pavlenko b0b199ee8a Merge pull request #1929 from alalek:ocl_haar_amd_beta 2013-12-06 14:56:47 +04:00
Andrey Pavlenko 894724eaf0 minor improvements 2013-12-06 14:49:36 +04:00
Konstantin Matskevich 7a78559708 some fixes 2013-12-06 12:12:24 +04:00
Peter Andreas Entschev 3bc952ed34 ocl::BruteForceMatcher fix wrong use of oclMat::ptr().
The oclMat::ptr() method was mistakenly used in ocl::BruteForceMatcher to pass a pointer to a oclMat object. The ptr() method returns a uchar pointer to the cl_mem data structure and this method will be removed.
2013-12-05 19:27:10 -02:00
Andrey Pavlenko 9dea590ada Merge pull request #1933 from gongzg:fix-ocl-kernel-2.4 2013-12-05 17:05:25 +04:00
Alexander Alekhin 3dcddad88a ocl: added workaround into Haar kernels 2013-12-05 16:56:01 +04:00
Andrey Pavlenko 39754bd6f9 Merge pull request #1920 from alalek:ocl_disable_workaround 2013-12-05 16:46:25 +04:00
Konstantin Matskevich 0a1ff0d42d multithreading facedetector 2013-12-05 09:47:36 +04:00
Konstantin Matskevich e38ba1999b facedetect 2013-12-05 09:20:36 +04:00
Zhigang Gong 6ce03b0484 Fixed some implicitly type conversions between vector and scalar data type.
There are some mixed implicitly/explicitly type conversion between
scalar and vector. Although the spec allows those conversion, I prefer
to make them consistent and use explicitly all the cases.

Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
2013-12-05 09:35:21 +08:00
Josep Bosch 2153453fd1 Fixed little issue with mouse callback refering to issue 3409. Was using round instead of floor. 2013-12-04 22:32:20 +01:00
Ilya Lavrenov eb7ff99f80 fixed cv::remap and cv::convertMaps for map types CV_16SC2 && CV_16UC1 2013-12-04 22:04:31 +04:00
Andrey Pavlenko 098d4e6174 Merge pull request #1924 from ilya-lavrenov:svm 2013-12-04 19:56:31 +04:00
Baichuan Su 632b21e090 Modify default setting, using ocl method when have ocl module 2013-12-04 18:26:54 +04:00
Baichuan Su 2cf16db683 Add Macro to decide using ocl method or not. 2013-12-04 18:26:54 +04:00
Baichuan Su 00300baa53 Add OpenCL SVM paths for bagofwords_classification and points_classifier samples. 2013-12-04 18:26:54 +04:00
Roman Donchenko d8a4d3a2eb Merge pull request #1921 from SpecLad:defined-msc-ver 2013-12-04 15:46:56 +04:00
Roman Donchenko 3e1586a1c6 Merge pull request #1919 from SpecLad:platfrom 2013-12-04 13:55:45 +04:00
Roman Donchenko fa2cd93ecf Merge pull request #1915 from jet47:gpu-color-test-fix 2013-12-04 13:55:28 +04:00
Alexander Alekhin 7b551af424 ocl: try to disable clFinish workaround 2013-12-04 13:00:37 +04:00
Roman Donchenko 11c7053b0f Fixed a -Wundef warning in cl_platform.h.
_MSC_VER -> defined _MSC_VER. Fixes building with MinGW.
Similar to fbc91c5ee.
2013-12-04 12:39:20 +04:00
Andrey Pavlenko 8752414718 Merge pull request #1911 from apavlenko:2.4_fix_vc12 2013-12-03 19:20:05 +04:00
Roman Donchenko 3509018bd6 Merge pull request #1916 from alalek:ocl_moments_fix_perf 2013-12-03 17:58:04 +04:00
Andrey Pavlenko 1966e7cea9 fixing compilation on Linux 2013-12-03 17:46:09 +04:00
Roman Donchenko 2b31055914 Fixed the "platfrom" typo everywhere. 2013-12-03 17:33:28 +04:00
Andrey Pavlenko b5dbe9e04b Added patch from master for fixing VS2013 in 3rd party lib OpenEXR 2013-12-03 16:08:57 +04:00
Alexander Alekhin c962a9d61c ocl:perf: fix moments test for plain impl 2013-12-03 16:02:55 +04:00
Vladislav Vinogradov adb2040980 added additional check in cv::gpu::demosaicing that source is not empty 2013-12-03 15:55:47 +04:00
Vladislav Vinogradov 14ee306b9e fix gpu test for Demosaicing:
check that input images was loaded correctly
2013-12-03 15:55:10 +04:00
Roman Donchenko df136339ff Merge pull request #1907 from severin-lemaignan:emscripten-2.4 2013-12-03 13:38:10 +04:00
Andrey Pavlenko bd9d3dd561 fixing build of 2.4 branch with VC12 (aka 2013)
(master branch was fixed before, no need to merge this to master!)
- disable openexr (numerous undefined std::min & std::max)
- workaround for two compilator bugs
2013-12-03 13:16:44 +04:00
Séverin Lemaignan 9ce9fc3361 Ensure compilation to Javascript with Emscripten 2013-12-03 09:18:59 +01:00
Andrey Pavlenko 3ff1620086 Merge pull request #1899 from berak:b_3171_24 2013-12-03 11:32:31 +04:00
Andrey Pavlenko 8db6d9f9b2 Merge pull request #1906 from asmorkalov:android_ocl_warn_fix 2013-12-03 11:20:48 +04:00
Andrey Pavlenko 368bac7af6 Merge pull request #1744 from liuxing6666:2.4_fix_harris_test 2013-12-02 20:38:49 +04:00
Andrey Pavlenko 19ceab13f2 Merge pull request #1590 from ilya-lavrenov:cmd_parser_fix 2013-12-02 20:07:47 +04:00
Roman Donchenko 790f53f12a Merge pull request #1887 from jet47:android-cuda-6.0 2013-12-02 18:53:26 +04:00
Roman Donchenko f7f194e5dd Merge pull request #1797 from moodoki:bugfix_3344 2013-12-02 17:53:34 +04:00
Alexander Smorkalov eab7603096 Warning fixes and suppression in ocl module for gcc 4.6 from Android NDK. 2013-12-02 17:51:29 +04:00
Roman Donchenko 838961a289 Merge pull request #1897 from berak:b_3393_24 2013-12-02 17:11:56 +04:00
Roman Donchenko fb568755a1 Merge pull request #1898 from berak:b_3349_24 2013-12-02 14:14:41 +04:00
Roman Donchenko 0bbd768d9d Merge pull request #1884 from asmorkalov:winrt_img_proc_sample 2013-12-02 12:27:51 +04:00
Roman Donchenko f20af817d4 Merge pull request #1894 from asmorkalov:ocv_debug_build 2013-12-02 12:17:30 +04:00
berak 34a390fbc2 CV_WRAP for BackgroundSubtractorMOG2 2013-11-30 13:35:23 +01:00
berak 059bf1d9e5 corrected initialization of output_folder in facereco examples 2013-11-30 13:09:42 +01:00
berak 773616ee04 swapped x,y in elbp_ 2013-11-30 12:00:22 +01:00
Andrey Pavlenko 429ab8ebee Merge pull request #1845 from StevenPuttemans:bugfix_3306 2013-11-29 23:08:20 +04:00
Alexander Smorkalov d39e73365c Some debug options are removed because they are installed by Cmake automatically.
Also forcing -ggdb3 on android leads to debuging issues.
2013-11-29 15:34:50 +04:00
Roman Donchenko f8801cfdb8 Merge pull request #1892 from asmorkalov:android_native_camera_close_fix 2013-11-29 15:10:13 +04:00
Vladislav Vinogradov fc1d38ced8 fixed compilation of gpu-basics-similarity tutorial:
initialize TIMES variable with some default value (10)
2013-11-29 14:53:33 +04:00
Alexander Smorkalov a13db7c8fa Android native camera destruction fixed for Android 4.4. 2013-11-29 10:38:26 +04:00
Alexander Smorkalov 6b09345232 Filter selection and several filters implemented for WinRT sample. 2013-11-29 09:47:25 +04:00
Roman Donchenko 41154b30de Merge pull request #1885 from jet47:gpu-bgfg-test-fix 2013-11-28 14:11:40 +04:00
Vladislav Vinogradov 5ac8444c22 fixed CUDA_TOOLKIT_TARGET_DIR for android:
use targets/armv7-linux-androideabi is exists
2013-11-28 13:35:23 +04:00
Roman Donchenko 70c1b700d9 Merge pull request #1879 from LeszekSwirski:traincascade-2.4 2013-11-28 12:24:45 +04:00
Roman Donchenko 19b88a17bf Merge pull request #1873 from abak:hough_24 2013-11-28 12:11:24 +04:00
Vladislav Vinogradov 81acc5e73e added -Xptxas;-dlcm=ca and -target-os-variant=Android to nvcc flags 2013-11-28 10:00:55 +04:00
Vladislav Vinogradov 26cb0ce1d5 fixed compilation warnings in .cu files 2013-11-28 10:00:48 +04:00
Vladislav Vinogradov 20641b4a0b fixed CC arch/pts for android (used sm_32) 2013-11-28 10:00:47 +04:00
Vladislav Vinogradov 51663f5612 enable CUDA support for android 2013-11-28 10:00:47 +04:00
Vladislav Vinogradov 95ebdf4069 fixed compilation with CUDA 6.0:
GpuMat::setTo function, removed NPP call for CV_8S
2013-11-28 09:54:34 +04:00
Alexander Smorkalov 2cfd635e9e Image processing sample for WinRT added. 2013-11-27 21:54:11 -08:00
Vladislav Vinogradov 7537521f53 disabled MOG2 performance test (sanity check fails on CUDA 6.0) 2013-11-28 09:50:05 +04:00
Vladislav Vinogradov 7c43daccba fixed perf tests for bgfg segmentation 2013-11-28 09:49:50 +04:00
Adrien BAK 38904c9a11 fix exception being thrown when no arguments are passed 2013-11-28 12:09:17 +09:00
Adrien BAK 094d7c4926 build fix 2013-11-28 11:42:44 +09:00
Anatoly Baksheev 37a754621a Fixed compilation errors: removed using namespace from hpp file. This led to pulling cv::ACCESS_MASK to global namespace where conflict with the same name in 'windows.h'
Conflicts:
	apps/traincascade/boost.cpp
2013-11-27 14:53:21 +00:00
Andrey Kamaev bef34093aa Remove all using directives for STL namespace and members
Made all STL usages explicit to be able automatically find all usages of
particular class or function.

(cherry picked from commit 2a6fb2867e)
(only cherry picked "apps/trancascade")
2013-11-27 14:46:47 +00:00
Roman Donchenko d5ead208b7 Merge pull request #1858 from StevenPuttemans:updates_traincascade 2013-11-27 17:37:36 +04:00
Roman Donchenko 935f973575 Merge pull request #1877 from tim36272:patch-2 2013-11-27 17:35:53 +04:00
tim36272 7539156109 Fixed minor documentation typo
In section "How do we get an Affine Transformation" subsection 2 there was a ' where there should have been a ` which caused the math to be rendered incorrectly.
2013-11-27 04:09:40 -08:00
StevenPuttemans a4239f972b Added extras to traincascade functionality 2013-11-27 12:54:11 +01:00
Roman Donchenko 10aec14a4d Merge pull request #1849 from StevenPuttemans:feature_3375_documentation 2013-11-27 13:22:31 +04:00
Andrey Pavlenko 1253c2101b Merge pull request #1875 from asmorkalov:android_bin_compat_fix 2013-11-26 23:17:28 +04:00
Alexander Smorkalov 8fe4ab280b Build error fix for binary-complience-checker tool. 2013-11-26 17:39:40 +04:00
Adrien BAK dda3b534ad fix indent 2013-11-26 16:09:59 +09:00
Adrien BAK 1c025be068 fix typos 2013-11-26 16:09:42 +09:00
Adrien BAK 514f1fae95 improved error handling 2013-11-26 16:09:29 +09:00
Adrien BAK 8a2de2ecca modified HoughCircleDemo to introduce variable params via trackbars
Conflicts:
	samples/cpp/tutorial_code/ImgTrans/HoughCircle_Demo.cpp
2013-11-26 16:09:04 +09:00
Andrey Pavlenko d45ce086c1 Merge pull request #1856 from alalek:ocl_fix_mt 2013-11-26 09:58:22 +04:00
Eric Sommerlade 3b4f65b186 fixed comparison to stop integer wrap around 2013-11-26 00:12:30 +00:00
StevenPuttemans 6f892b10ff Applied feature #3375 and fix of pull 1842 to avoid merging problems later 2013-11-25 10:53:03 +01:00
Roman Donchenko 16a11cfb27 Merge pull request #1842 from StevenPuttemans:bugfix_3315 2013-11-25 12:38:56 +04:00
StevenPuttemans 1b0297d92b Added fixes mentioned in bugreport 3306
- Added author provided fixes
- Added code example
- Added documentation fixes
2013-11-25 09:35:23 +01:00
Roman Donchenko 75fba08042 Merge pull request #1822 from SpecLad:msvc12 2013-11-25 12:19:58 +04:00
Roman Donchenko 4c5593b633 Merge pull request #1837 from asmorkalov:android_opencl 2013-11-25 12:19:20 +04:00
Roman Donchenko 06f6f74e61 Merge pull request #1839 from pmiecielica:memory_leaks 2013-11-25 12:17:08 +04:00
Roman Donchenko 59aa516ca5 Merge pull request #1860 from alalek:ocl_fix_undef_warn 2013-11-25 12:00:25 +04:00
Roman Donchenko 0537747f79 Merge pull request #1853 from StevenPuttemans:bugfix_3346 2013-11-22 18:26:16 +04:00
Alexander Alekhin ddc9be9170 ocl: don't disable Undef warnings 2013-11-22 18:24:50 +04:00
Alexander Alekhin fbc91c5ee9 ocl: fix cl_platform.h:95: #elif _WIN32 -> #elif defined(_WIN32) 2013-11-22 18:24:20 +04:00
Roman Donchenko 901dc3b878 Merge pull request #1854 from asmorkalov:android_engine_tegra4i5 2013-11-22 18:15:49 +04:00
StevenPuttemans e59912f803 Applied fix mentioned in bugreport 3370. Seems to solve the issue. 2013-11-22 14:25:47 +01:00
Piotr Miecielica a19cc6cb64 Added pointer initialization 2013-11-22 13:33:33 +01:00
Alexander Smorkalov 514e97223c Some hacks to build and run OpenCL on Qualcomm S800.
Some of functions were enabled on Qualcomm S800 by changing grid size;
OpenCL kernel grid size unification for different platfroms;
Test pass rate improvements by inclreasing threshold;
Some tests were disabled for Android;
run.py was adopted for devices with brackets in in name.
2013-11-22 16:13:38 +04:00
Alexander Alekhin d650efc069 ocl: multi-threading: opencl buffer memory guard 2013-11-22 14:39:51 +04:00
Alexander Alekhin 96a4a7b339 ocl: multi-threading: fix bug in intialization 2013-11-22 14:39:33 +04:00
Alexander Smorkalov bd314bf955 VFPv4 detection implemented. Some Tegra5 related updates. 2013-11-22 14:30:23 +04:00
StevenPuttemans 2427c03625 Wrong example at the visual studio tutorial. Fixed link, fixed sample
content and renamed to a more sensible name. Also fixed a wrong link in the
actual display_image tutorial.
2013-11-22 10:41:17 +01:00
StevenPuttemans 7a8bd31657 Fixed bug in report #3346 2013-11-22 09:57:47 +01:00
Alexander Smorkalov fd759223fa Package selection for Tegra 4i fixed. Initial Tegra5 support added. 2013-11-22 11:46:18 +04:00
Piotr Miecielica 923698d700 Fixes of some memory leaks 2013-11-21 18:55:09 +01:00
Andrey Pavlenko 8a4f35704a Merge pull request #1840 from ilya-lavrenov:ocl_cvtColor 2013-11-21 17:32:53 +04:00
Roman Donchenko 2509b7954e Merge pull request #1838 from alekcac:ios64_fix 2013-11-21 17:11:29 +04:00
Ilya Lavrenov d764af5318 added extra parameters to ocl::cvtColor performance test 2013-11-21 12:53:21 +04:00
Roman Donchenko 6b23cb5b02 Merge pull request #1795 from alalek:perf_report_progress 2013-11-21 12:31:36 +04:00
Roman Donchenko b8f5fcf3f9 Merge pull request #1776 from philippefoubert:merge_upstream_2.4_ximea 2013-11-21 12:03:02 +04:00
Roman Donchenko 623a02c69f Merge pull request #1834 from SpecLad:svm-copy-ctor 2013-11-21 11:55:20 +04:00
Alexander Alekhin c1541c9e79 perf report: summary.py: added --progress mode 2013-11-20 19:57:20 +04:00
Roman Donchenko 70a4de20d7 Merge pull request #1836 from ilya-lavrenov:ocl_norm_workaround 2013-11-20 18:19:08 +04:00
Alexander Shishkov 9631cb6de9 fix for supporting 64-bit architecture 2013-11-20 18:08:05 +04:00
Roman Donchenko f6283432ff Merge pull request #1833 from SpecLad:fix-qt-sample 2013-11-20 17:59:35 +04:00
Roman Donchenko 8ac3ddf421 Merge pull request #1829 from SpecLad:config-components-libs 2013-11-20 15:57:14 +04:00
Ilya Lavrenov 60b59eeb73 workaround for AMD bug: UNREACHABLE EXECUTED 2013-11-20 15:40:56 +04:00
Roman Donchenko cf00349b5b Gave CvSVM a private copy constructor & assignment operator.
The implicitly generated ones don't work properly, and I don't want to
write proper ones. :-)

"Fixes" <http://code.opencv.org/issues/3358>.
2013-11-20 14:59:42 +04:00
Roman Donchenko b8283edfca Fix the Qt sample, broken after #1722. 2013-11-20 14:57:21 +04:00
Roman Donchenko b197ec9413 Merge pull request #1761 from bhuroc:qtkit-video-file-2.4 2013-11-20 13:36:37 +04:00
Philippe FOUBERT 78e16a906b Back to the previous coding way (using the macro with the goto). 2013-11-19 21:51:47 +01:00
Roman Donchenko 4037a4f227 Fixed OpenCV_LIBS when find_package has been used with explicit components.
Fixes <http://answers.opencv.org/question/23997/opencv-247-cmake-includes-all-modules-even-if-i/>.
2013-11-19 18:44:17 +04:00
Roman Donchenko e69d2c1bb1 Merge pull request #1819 from ilya-lavrenov:ocl_resize_AREA 2013-11-19 16:25:47 +04:00
Roman Donchenko 5c77784ac9 Merge pull request #1827 from asmorkalov:android_ndk_r9b 2013-11-19 14:53:16 +04:00
Roman Donchenko 0a90a36a1f Merge pull request #1793 from SpecLad:external-docs-1 2013-11-19 14:21:48 +04:00
Roman Donchenko c47190ef90 Merge pull request #1787 from hs3180:2.4 2013-11-19 14:21:25 +04:00
Ilya Lavrenov 198cd1a40d added area fast mode to ocl::resize 2013-11-19 13:43:50 +04:00
Roman Donchenko 4746a710bb Merge pull request #1820 from asmorkalov:android_native_camera_44 2013-11-19 12:47:48 +04:00
Roman Donchenko 3e55d705cc Merge pull request #1823 from ilya-lavrenov:ocl_abs_sum 2013-11-19 12:34:09 +04:00
Roman Donchenko 56f791679b Merge pull request #1825 from jet47:fix-opengl-mem-leak 2013-11-19 12:31:53 +04:00
Roman Donchenko 68d1110cde Merge pull request #1821 from SpecLad:watch-your-slashes 2013-11-19 12:29:55 +04:00
Alexander Smorkalov e08b075db0 Android NDK r9b support added. 2013-11-19 11:46:29 +04:00
Vladislav Vinogradov 66221a32b9 fixed memory leak in ogl::Texture2D 2013-11-19 10:12:22 +04:00
Ilya Lavrenov c0456df611 workaround for ocl::absSum (eliminated error: unreachable executed) 2013-11-18 20:38:39 +04:00
Roman Donchenko 85f92fabbd Merge pull request #1815 from asmorkalov:android_native_camera_build_automation 2013-11-18 19:44:33 +04:00
Roman Donchenko 239704f986 Added Visual Studio 2013 detection. 2013-11-18 19:39:39 +04:00
Roman Donchenko 7973594a01 Removed all slashes after ${OpenCV_INSTALL_BINARIES_PREFIX}.
If it's followed by a slash and OpenCV_INSTALL_BINARIES_PREFIX is empty,
then the resulting path becomes absolute.

Fixes <http://code.opencv.org/issues/3350>.
2013-11-18 19:21:31 +04:00
Ilya Lavrenov f70d63e4c9 added INTER_AREA interpolation to ocl::resize 2013-11-18 18:28:49 +04:00
Alexander Smorkalov 26d3a1a036 Prebuilt libnative_camera_xxx updated. 2013-11-18 18:19:38 +04:00
Alexander Smorkalov 04d293d2c4 Initial NativeCamera support for Android 4.4 KitKat. 2013-11-18 18:07:26 +04:00
Roman Donchenko cdf4e4e0b5 Merge pull request #1810 from Nerei:2.4 2013-11-18 17:49:40 +04:00
Alexander Smorkalov e3f450cffb NativeCamera build with AndroidStub backported from OpenCV master. 2013-11-18 17:43:21 +04:00
Roman Donchenko 8b99a1e850 Merge pull request #1806 from akarsakov:ffmpeg_without_iconv 2013-11-18 17:26:40 +04:00
Roman Donchenko 7703b63cae Merge pull request #1722 from StevenPuttemans:feature_1631_second 2013-11-18 15:48:27 +04:00
Roman Donchenko 4fd1960425 Merge pull request #1807 from KonstantinMatskevich:intel_bug 2013-11-18 15:16:37 +04:00
Roman Donchenko 3f927abb4d Merge pull request #1809 from ilya-lavrenov:ocl_resize_nn 2013-11-18 14:55:24 +04:00
Alexander Karsakov 83cefcb92a FFmpeg 2.0.2 32-bit builded with mingw (4.6.1) with following additional options: --enable-w32threads --disable-iconv --cpu=i686 (workaroud for http://trac.ffmpeg.org/ticket/2363) 2013-11-18 13:56:02 +04:00
Konstantin Matskevich 327d9f274b fixed Split for device version equals 78712 2013-11-18 13:20:57 +04:00
Konstantin Matskevich 0e1717c14c fixing bugs for Intel platform CPU device 2013-11-18 13:20:54 +04:00
Roman Donchenko f5ded41016 Merge pull request #1808 from alalek:ocl_fix_cvtcolor_xyz 2013-11-18 12:20:58 +04:00
StevenPuttemans 2b106db02f Applied all fixes related to translating C to C++ code
Also fixed some typos and code alignment
Also adapted tutorial CPP samples
Fixed some identation problems
2013-11-17 20:34:50 +01:00
Anatoly Baksheev 13bb236ad5 fixed some warnings 2013-11-16 21:18:36 +04:00
Anatoly Baksheev 8f6f9c3e58 compilation for VS2008 2013-11-16 20:14:01 +04:00
Alexander Alekhin 0a698bf145 ocl: fix cvtColor XYZ: variables on stack 2013-11-16 13:45:39 +04:00
Ilya Lavrenov cc237b7aba generalized ocl::resize for all data types (INTER_NEAREST mode) 2013-11-15 22:52:29 +04:00
Roman Donchenko f95ff0a352 Merge pull request #1802 from SpecLad:cmake-templates 2013-11-15 16:52:56 +04:00
Roman Donchenko 4e2ec7b97d Merge pull request #1803 from ilya-lavrenov:ocl_cvtColor 2013-11-15 15:55:29 +04:00
Roman Donchenko 2e79dde357 Merge pull request #1799 from SpecLad:avformat-53-6 2013-11-15 11:51:59 +04:00
moodoki cebf109d39 Replaced code in .rst file with literalinclude as suggested 2013-11-15 00:27:07 +08:00
Roman Donchenko 428fb72625 Made the generated file templates' naming more consistent.
The general convention is <output file name> + ".in".
2013-11-14 19:14:38 +04:00
Roman Donchenko 3b7acf2657 Fix building with FFmpeg 0.8.
avformat_find_stream_info was introduced in Libav avformat 53.3,
but it was only merged to FFmpeg in avformat 53.6.

In Libav avformat 53.3-53.5 av_find_stream_info is not removed
(only deprecated), so this shouldn't break building with that.
2013-11-14 17:25:46 +04:00
Roman Donchenko 01f8645bc8 Merge pull request #1794 from vrabaud:2.4 2013-11-14 16:43:50 +04:00
Roman Donchenko be88b20154 Merge pull request #1796 from ilya-lavrenov:ocl_cvtColor 2013-11-14 14:46:43 +04:00
Roman Donchenko 84da6ca265 Merge pull request #1792 from ilya-lavrenov:ocl_warp_eps 2013-11-14 14:46:06 +04:00
Roman Donchenko 19b3064706 Merge pull request #1790 from ilya-lavrenov:ocl_ref 2013-11-14 14:45:50 +04:00
Vincent Rabaud 8e944cfe70 cleaner fix 2013-11-14 11:45:42 +01:00
Ilya Lavrenov fe76b2116a added RGBA <-> mRGBA 2013-11-14 12:02:59 +04:00
moodoki b8de81749c Slight modification to example code for FLANN matcher with comment on #3344 2013-11-14 00:22:20 +08:00
Ilya Lavrenov 1b7c5b201d added HLS -> RGB[A][FULL] conversion 2013-11-13 19:35:24 +04:00
Ilya Lavrenov 98915e06bc added HSV -> RGB[A][FULL] conversion 2013-11-13 19:10:06 +04:00
Ilya Lavrenov 3bdd9626f3 added RGB[A] -> HLS[FULL] conversion 2013-11-13 17:41:40 +04:00
Roman Donchenko 15f4292a1f Merge pull request #1788 from alalek:perf_test_skip 2013-11-13 17:21:52 +04:00
Vincent Rabaud ee7c74ceeb return when OpenCV is found 2013-11-13 14:20:09 +01:00
Ilya Lavrenov af7c614438 added RGB[A] -> HSV[FULL] conversion 2013-11-13 17:09:05 +04:00
Roman Donchenko 411629a57d Merge pull request #1786 from SpecLad:cap-images-file-pattern 2013-11-13 17:00:20 +04:00
Roman Donchenko 54ea5bbac7 Merge pull request #1779 from perping:integral_2.4 2013-11-13 15:53:42 +04:00
Roman Donchenko 28e0d3d771 Merge pull request #1784 from SpecLad:ffmpeg-no-png 2013-11-13 15:52:42 +04:00
Vincent Rabaud 9007a02302 fixes http://code.opencv.org/issues/3367 2013-11-13 12:25:44 +01:00
Alexander Alekhin fb326a58fc ocl: perf tests: skip tests if we fail check for maxMemoryAllocSize 2013-11-13 14:17:57 +04:00
Alexander Alekhin f1873bbca1 perf tests: allow to skip performance tests 2013-11-13 14:17:56 +04:00
Ilya Lavrenov 6770c04073 refactored some functions from ocl arithm 2013-11-13 13:56:49 +04:00
Ilya Lavrenov c38e4f9639 added eps to ocl::buildWarpPerspectiveMaps perf test 2013-11-13 13:04:02 +04:00
Roman Donchenko 376993be4c Merge pull request #1785 from ilya-lavrenov:ocl_kern_warn 2013-11-13 12:20:09 +04:00
Roman Donchenko df6bce372b Merge pull request #1789 from ilya-lavrenov:ocl_minMaxLoc 2013-11-13 12:16:02 +04:00
perping 185059959b fix haar 2013-11-13 10:19:09 +08:00
perping 1e2fb6de30 fix match_template and haar 2013-11-13 10:09:39 +08:00
Roman Donchenko 3314bc94b6 Reworked documentation building to work with extra modules.
The main problem with extra modules is that they're located outside
of the OpenCV root, while Sphinx requires that all documents are
within the documentation root. To circumvent this, we create a
"fake root" and copy all documentation (as well as all files that
it depends on) there. It's a bit messy, but what can you do.

As a bonus, this eliminates the need to generate modules/refman.rst
inside the source tree.
2013-11-12 19:38:59 +04:00
Ilya Lavrenov 0bf7350615 fixed compilation of ocl::minMaxLoc for Intel device 2013-11-12 19:14:40 +04:00
huangs f02ce90559 minX1 should be max(-maxD,0) not max(maxD,0), avoid black band at left 2013-11-12 22:37:23 +08:00
Roman Donchenko b8e3d3f791 In the image sequence capture, only search for the ordinal in the file name.
Searching in directory names can yield confusing results; e.g. if
the input is "jpeg2000/image1.jp2", it will infer the pattern
"jpeg%04d/image1.jp2", which is likely not what the user intended.

If the user really desires for the variable part to be in the
directory name, it can always use an explicit pattern.
2013-11-12 16:26:21 +04:00
Ilya Lavrenov 96121a66c5 kernel warnings on AMD 2013-11-12 15:06:46 +04:00
Roman Donchenko a81efdbb25 Merge pull request #1775 from ilya-lavrenov:ocl_cvtColor 2013-11-12 14:26:50 +04:00
perping d6e0ef2710 fix linux warning. 2013-11-12 18:13:44 +08:00
perping dee584ee15 fix haar 2013-11-12 17:54:03 +08:00
Roman Donchenko 834705490e Merge pull request #1782 from ilya-lavrenov:ocl_adapBilat 2013-11-12 12:53:34 +04:00
Roman Donchenko ef4eadd5d3 Merge pull request #1766 from ilya-lavrenov:ocl_remap_linear 2013-11-12 12:40:14 +04:00
Roman Donchenko 46e423d217 Merge pull request #1773 from ilya-lavrenov:ocl_buildWarpPerspectiveMaps 2013-11-12 12:26:37 +04:00
Roman Donchenko 6773914144 Merge pull request #1783 from SpecLad:cap-no-pattern 2013-11-12 11:52:50 +04:00
perping 8af626d295 fix some bug about haar and match_template. 2013-11-12 13:56:47 +08:00
Ilya Lavrenov eda6360fa3 added RGB5x5 <-> Gray 2013-11-12 00:32:10 +04:00
Philippe FOUBERT 93120775cd Using four spaces for indentation. 2013-11-11 20:40:18 +01:00
Roman Donchenko 405227d531 Replaced the image used in the Highgui_Video.ffmpeg_image test.
Our prebuilt FFmpeg Windows binaries don't have PNG support enabled
(because that requires zlib), so that makes a PNG image a bad choice
for this test.

When FFmpeg doesn't support PNG, VideoCapture falls back to the
"image sequence" implementation, which doesn't work for single images.
2013-11-11 18:30:04 +04:00
Ilya Lavrenov daedc6f454 removed 2000x2000, 4000x4000 from test sizes of ocl::adaptiveBilateralFilter 2013-11-11 18:14:44 +04:00
Roman Donchenko eff53e95f9 Fixed the "image sequence" capture not failing when a pattern isn't found.
at can't be a null pointer, so the condition was always false, and
a nonsensical pattern like "image.png%00d" was being inferred.
2013-11-11 18:12:49 +04:00
Ilya Lavrenov 3727168b50 added a performance test for ocl::buildWarpPerspectiveMaps; moved warps to a separate file 2013-11-11 18:07:23 +04:00
Roman Donchenko e4dee5b372 Merge pull request #1780 from ilya-lavrenov:ocl_m_pi 2013-11-11 17:00:31 +04:00
Ilya Lavrenov 1f421fce01 added RGB5x5 <-> RGB conversion 2013-11-11 14:50:44 +04:00
Philippe FOUBERT 05d9375759 Trailing whitespace removal. 2013-11-11 10:26:28 +01:00
perping 73b34e3f85 fix warning. 2013-11-11 15:06:58 +08:00
perping 50579d2524 Make Integral sum support cv_32f, sqsum support cv_64f. 2013-11-11 14:31:02 +08:00
Ilya Lavrenov 5beb887247 replaced custom PI by OpenCL M_PI constant 2013-11-11 00:55:59 +04:00
Ilya Lavrenov 3cc9502c90 added RGB[A] <-> BGR[A] conversion to ocl::cvtColor 2013-11-10 23:14:36 +04:00
Philippe FOUBERT 8b0fc04d93 Fix the build of OpenCV with XIMEA on Windows 64 bits:
- crosses initializations in "cap_ximea.cpp" (which also contained some awfull "goto" instructions)
  - the "CMAKE_CL_64" variable is not initialized when using mingw

PR#1039 modified to be able to merge on branch 2.4
2013-11-10 17:46:59 +01:00
Ilya Lavrenov 581a3e444d added XYZ to RGB conversion to ocl::cvtColor 2013-11-10 14:37:21 +04:00
Ilya Lavrenov 5e02b20482 added RGB -> XYZ conversion to ocl::cvtColor 2013-11-10 13:38:09 +04:00
Ilya Lavrenov 33ae64201c color.cpp refactoring: created generic interface for toRGB and fromRGB callers 2013-11-10 00:44:37 +04:00
Ilya Lavrenov a57030a0cd added YCrCb to RGB, BGR, RGBA, BGRA modes to ocl::cvtColor 2013-11-09 17:03:30 +04:00
Ilya Lavrenov eba6754b06 fixed ocl::cvtColor for CV_YUV2BGRA and CV_YUV2RGBA 2013-11-09 00:40:45 +04:00
Ilya Lavrenov 8b57893e40 added an accuracy test for ocl::buildWarpPerspectiveMaps 2013-11-08 18:42:13 +04:00
Ilya Lavrenov 4248f82211 added ROI support to ocl::buildWarp*Maps functions 2013-11-08 18:40:53 +04:00
Roman Donchenko 0ac61240c5 Merge pull request #1771 from kiranpradeep:2.4 2013-11-08 17:16:20 +04:00
Kiran Pradeep 5852a913a8 CMake's get_filename_component with NAME_WE parameters, interprets first period as start of extension. For. e.g file name with out extension of 'this.is.a.text.file.txt' will be taken as 'this'. Hence using NAME with regex replacement to get 'this.is.a.text.file' 2013-11-08 14:09:34 +05:30
Roman Donchenko 800d53f76b Merge pull request #1759 from ilya-lavrenov:ocl_distanceToCenters 2013-11-08 12:39:14 +04:00
Roman Donchenko 0be2752366 Merge pull request #1755 from KonstantinMatskevich:dump_info 2013-11-08 12:31:04 +04:00
Roman Donchenko 0fb629915f Merge pull request #1763 from SpecLad:cv-func 2013-11-08 12:29:50 +04:00
Baichuan Su 9a0d06247a Fix the whitespace warning. 2013-11-07 15:04:17 -08:00
Ilya Lavrenov 760b718981 added CV_16SC2 && CV_16UC1 map types support to ocl::remap (INTER_LINEAR mode) 2013-11-08 01:42:48 +04:00
Baichuan Su 99a00d3dd9 Fix merge conflicts 2013-11-07 09:56:59 -08:00
Baichuan Su befcbf56fe A minor fix. 2013-11-07 08:52:40 -08:00
Baichuan Su f0de1a08b8 Fix ocl::calcHarris not support CV_32FC1 bug. 2013-11-07 08:52:39 -08:00
Roman Donchenko 07db81a4bb Merge pull request #1760 from ilya-lavrenov:ocl_remap_nn 2013-11-07 17:29:16 +04:00
Roman Donchenko 2c38be079e Enabled CV_Assert and such to print the function name with Visual C++.
Also, I made a separate macro for the current function name, which
helps simplify a lot of code that uses it.
2013-11-07 17:22:02 +04:00
Konstantin Matskevich e9edfd1c54 update 2013-11-07 17:21:56 +04:00
Roman Donchenko 641bb7ac6b Merge pull request #1737 from vrabaud:2.4 2013-11-07 12:03:30 +04:00
Bo Hu c88fa27b1d Removed trailing whitespace in cap_qtkit.mm. 2013-11-06 13:33:17 -08:00
Bo Hu 114579c33b Added proper testing of the end of quicktime video files.
CvCaptureFile::grabFrame() always returns 1 regardless, which causes
dead loop when relying on the return value of VideoCapture::read().
2013-11-06 13:32:11 -08:00
Ilya Lavrenov fa15769f39 added CV_16SC2 && CV_16UC1 maps support to ocl::remap (nearest neighbour only) 2013-11-06 23:14:04 +04:00
Ilya Lavrenov 56d943388d speeded up ocl::distanceToCenters 2013-11-06 20:02:31 +04:00
Andrey Pavlenko 296f76a135 Merge pull request #1756 from alalek:ocl_workaround_memory_leaks_with_subbuffer 2013-11-06 18:26:39 +04:00
Andrey Pavlenko 9afe65e5c0 Merge pull request #1758 from apavlenko:adaptive_bilateral_filter 2013-11-06 18:09:49 +04:00
Roman Donchenko bca63083a8 Merge pull request #1757 from asmorkalov:android_manager_version_inc2 2013-11-06 17:50:20 +04:00
Harris Gasparakis a1de91a4fd Cleaned up adaptive bilateral filtering, added support for gaussian interpolation, updated sample and docs 2013-11-06 16:48:50 +04:00
Konstantin Matskevich 5304e9f259 extending openCL info dump 2013-11-06 15:20:05 +04:00
Roman Donchenko 370235c07b Merge pull request #1711 from SpecLad:cap-broken-mat 2013-11-06 14:53:08 +04:00
Alexander Smorkalov 24f369c4ac Android Manager Version++. 2013-11-06 14:24:18 +04:00
Alexander Alekhin 03646e7e01 ocl: workaround for subbuffer memory leaks 2013-11-06 14:02:41 +04:00
Andrey Pavlenko 43c9157220 Merge pull request #1750 from alalek:ocl_update_documentation 2013-11-06 13:32:00 +04:00
Andrey Pavlenko a3fa7a243d Merge pull request #1740 from ilya-lavrenov:ocl_corners 2013-11-06 13:31:44 +04:00
Andrey Pavlenko 95767676b7 Merge pull request #1739 from pengx17:2.4_ocl_overload_haar 2013-11-06 13:31:11 +04:00
Roman Donchenko 5c44afa427 Merge pull request #1743 from ilya-lavrenov:ocl_repeat 2013-11-06 13:24:22 +04:00
peng xiao 53d1873776 Revert back test image. 2013-11-06 11:19:26 +08:00
Alexander Alekhin 3952a0df44 ocl: update comments in ocl.hpp 2013-11-05 23:53:52 +04:00
Alexander Alekhin 5a333bfff4 ocl: update documentation 2013-11-05 23:53:51 +04:00
Andrey Pavlenko be37d99567 Merge pull request #1752 from alalek:ocl_memory_cleanup_workaround 2013-11-05 23:49:37 +04:00
Andrey Pavlenko 14c3560750 Merge pull request #1751 from ilya-lavrenov:ocl_copyMakeBorder_test_fix 2013-11-05 23:49:12 +04:00
Andrey Pavlenko 14b2eed17b Merge pull request #1745 from alalek:ocl_fix_svm_with_blas 2013-11-05 23:48:42 +04:00
Alexander Alekhin 691d5f4187 ocl: memory cleanup workaround: clFinish() before clReleaseMemObject() + 64kb memory guard 2013-11-05 19:43:07 +04:00
Roman Donchenko f2241e3d26 Merge pull request #1749 from SpecLad:update-ignore 2013-11-05 19:41:29 +04:00
Ilya Lavrenov e544e34eed fixed ocl::copyMakeBorder accuracy test 2013-11-05 18:23:34 +04:00
Alexander Alekhin 7704dbf866 ocl: svm: restore non BLAS version 2013-11-05 15:15:26 +04:00
Alexander Alekhin 9a63508f50 Revert "disable SVM when AMD BLAS is not available"
This reverts commit d63a38e9bf.

Conflicts:
	modules/ocl/test/test_ml.cpp
2013-11-05 15:13:30 +04:00
Vincent Rabaud 0b1df62215 add VERBATIM as advised by @SpecLad 2013-11-05 12:02:22 +01:00
Vincent Rabaud 3b0108e4c1 fix the crash as suggested by @SpecLad 2013-11-05 11:18:20 +01:00
Ilya Lavrenov e7e7e04dce came back to relative error 2013-11-05 14:17:31 +04:00
Roman Donchenko 4203979c87 Sorted .gitignore. 2013-11-05 13:41:42 +04:00
Roman Donchenko ec77434190 Update .gitignore.
* OpenCV4Tegra/ is no longer relevant.
* We should only ignore the particular refman.rst that we generate.
2013-11-05 13:37:01 +04:00
Ilya Lavrenov 2df53d97c5 added ocl::repeat 2013-11-05 12:23:20 +04:00
peng xiao 2a111f7a6c Let perf/accuracy test of ocl haar uses detectMultiScale api.
Fix image to be used by perf test.
2013-11-05 10:40:27 +08:00
Ilya Lavrenov c89dfd333c fixed warnings in OpenCL kernels 2013-11-04 15:30:00 +04:00
Ilya Lavrenov a8426e1c12 fixed ocl::cornerHarris, ocl::cornerMinEigenVal and their accuracy tests 2013-11-04 15:16:00 +04:00
peng xiao 8c1eb5bf0e Overload detectMultiScale API for ocl::haar. 2013-11-04 14:59:28 +08:00
Vincent Rabaud e1b2f593d6 fix crash when path has spaces
The paths are defined properly with an escape "\ " but you cannot have an escape and
quotes when piping (otherwise, escapes are understood as 2 characters).
So just remove the quotes.
2013-11-01 19:30:58 +01:00
Andrey Pavlenko dd942df08b Merge pull request #1736 from alalek:ocl_fix_corner_memory_access 2013-11-01 18:37:35 +04:00
Alexander Alekhin 99ae9d9cc1 ocl: corner*: fix memory access in kernels; change error check to relative 2013-11-01 16:38:04 +04:00
Roman Donchenko d6a7a6d503 VideoCapture: copy the captured frame, to avoid dangling Mats
Previously, VideoCapture::retrieve would return a Mat that referenced
the internal IplImage. Since the latter is rewritten every time a
frame is captured, it means that if the user captures two frames in a row,
the first frame would reference nothing. Similar if a user captures a frame,
then destroys the VideoCapture instance.

Note that the other branch of the if isn't affected, since flip allocates
a new Mat.
2013-10-29 18:47:08 +04:00
Ilya Lavrenov d57a7008f1 fixed cmd parser when arg is like -+ 2013-10-09 17:42:36 +04:00
628 arquivos alterados com 19764 adições e 7984 exclusões
+8 -9
Ver Arquivo
@@ -1,10 +1,9 @@
*.pyc
.DS_Store
refman.rst
OpenCV4Tegra/
tegra/
*.user
.sw[a-z]
.*.swp
tags
*.autosave
*.pyc
*.user
*~
.*.swp
.DS_Store
.sw[a-z]
tags
tegra/
+1 -1
Ver Arquivo
@@ -1,2 +1,2 @@
set path=c:\dev\msys32\bin;%path% & gcc -Wall -shared -o opencv_ffmpeg.dll -O2 -x c++ -I../include -I../include/ffmpeg_ -I../../modules/highgui/src ffopencv.c -L../lib -lavformat -lavcodec -lavdevice -lswscale -lavutil -liconv -lws2_32
set path=c:\dev\msys32\bin;%path% & gcc -Wall -shared -o opencv_ffmpeg.dll -O2 -x c++ -I../include -I../include/ffmpeg_ -I../../modules/highgui/src ffopencv.c -L../lib -lavformat -lavcodec -lavdevice -lswscale -lavutil -lws2_32
set path=c:\dev\msys64\bin;%path% & gcc -m64 -Wall -shared -o opencv_ffmpeg_64.dll -O2 -x c++ -I../include -I../include/ffmpeg_ -I../../modules/highgui/src ffopencv.c -L../lib -lavformat64 -lavcodec64 -lavdevice64 -lswscale64 -lavutil64 -lws2_32
Arquivo binário não exibido.
-502
Ver Arquivo
@@ -1,502 +0,0 @@
//=============================================================================
//
// multimon.h -- Stub module that fakes multiple monitor apis on Win32 OSes
// without them.
//
// By using this header your code will get back default values from
// GetSystemMetrics() for new metrics, and the new multimonitor APIs
// will act like only one display is present on a Win32 OS without
// multimonitor APIs.
//
// Exactly one source must include this with COMPILE_MULTIMON_STUBS defined.
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//=============================================================================
#ifdef __cplusplus
extern "C" { // Assume C declarations for C++
#endif // __cplusplus
//
// If we are building with Win95/NT4 headers, we need to declare
// the multimonitor-related metrics and APIs ourselves.
//
#ifndef SM_CMONITORS
#define SM_XVIRTUALSCREEN 76
#define SM_YVIRTUALSCREEN 77
#define SM_CXVIRTUALSCREEN 78
#define SM_CYVIRTUALSCREEN 79
#define SM_CMONITORS 80
#define SM_SAMEDISPLAYFORMAT 81
// HMONITOR is already declared if WINVER >= 0x0500 in windef.h
// This is for components built with an older version number.
//
#if !defined(HMONITOR_DECLARED) && (WINVER < 0x0500)
DECLARE_HANDLE(HMONITOR);
#define HMONITOR_DECLARED
#endif
#define MONITOR_DEFAULTTONULL 0x00000000
#define MONITOR_DEFAULTTOPRIMARY 0x00000001
#define MONITOR_DEFAULTTONEAREST 0x00000002
#define MONITORINFOF_PRIMARY 0x00000001
typedef struct tagMONITORINFO
{
DWORD cbSize;
RECT rcMonitor;
RECT rcWork;
DWORD dwFlags;
} MONITORINFO, *LPMONITORINFO;
#ifndef CCHDEVICENAME
#define CCHDEVICENAME 32
#endif
#ifdef __cplusplus
typedef struct tagMONITORINFOEXA : public tagMONITORINFO
{
CHAR szDevice[CCHDEVICENAME];
} MONITORINFOEXA, *LPMONITORINFOEXA;
typedef struct tagMONITORINFOEXW : public tagMONITORINFO
{
WCHAR szDevice[CCHDEVICENAME];
} MONITORINFOEXW, *LPMONITORINFOEXW;
#ifdef UNICODE
typedef MONITORINFOEXW MONITORINFOEX;
typedef LPMONITORINFOEXW LPMONITORINFOEX;
#else
typedef MONITORINFOEXA MONITORINFOEX;
typedef LPMONITORINFOEXA LPMONITORINFOEX;
#endif // UNICODE
#else // ndef __cplusplus
typedef struct tagMONITORINFOEXA
{
MONITORINFO;
CHAR szDevice[CCHDEVICENAME];
} MONITORINFOEXA, *LPMONITORINFOEXA;
typedef struct tagMONITORINFOEXW
{
MONITORINFO;
WCHAR szDevice[CCHDEVICENAME];
} MONITORINFOEXW, *LPMONITORINFOEXW;
#ifdef UNICODE
typedef MONITORINFOEXW MONITORINFOEX;
typedef LPMONITORINFOEXW LPMONITORINFOEX;
#else
typedef MONITORINFOEXA MONITORINFOEX;
typedef LPMONITORINFOEXA LPMONITORINFOEX;
#endif // UNICODE
#endif
typedef BOOL (CALLBACK* MONITORENUMPROC)(HMONITOR, HDC, LPRECT, LPARAM);
#ifndef DISPLAY_DEVICE_ATTACHED_TO_DESKTOP
typedef struct _DISPLAY_DEVICEA {
DWORD cb;
CHAR DeviceName[32];
CHAR DeviceString[128];
DWORD StateFlags;
CHAR DeviceID[128];
CHAR DeviceKey[128];
} DISPLAY_DEVICEA, *PDISPLAY_DEVICEA, *LPDISPLAY_DEVICEA;
typedef struct _DISPLAY_DEVICEW {
DWORD cb;
WCHAR DeviceName[32];
WCHAR DeviceString[128];
DWORD StateFlags;
WCHAR DeviceID[128];
WCHAR DeviceKey[128];
} DISPLAY_DEVICEW, *PDISPLAY_DEVICEW, *LPDISPLAY_DEVICEW;
#ifdef UNICODE
typedef DISPLAY_DEVICEW DISPLAY_DEVICE;
typedef PDISPLAY_DEVICEW PDISPLAY_DEVICE;
typedef LPDISPLAY_DEVICEW LPDISPLAY_DEVICE;
#else
typedef DISPLAY_DEVICEA DISPLAY_DEVICE;
typedef PDISPLAY_DEVICEA PDISPLAY_DEVICE;
typedef LPDISPLAY_DEVICEA LPDISPLAY_DEVICE;
#endif // UNICODE
#define DISPLAY_DEVICE_ATTACHED_TO_DESKTOP 0x00000001
#define DISPLAY_DEVICE_MULTI_DRIVER 0x00000002
#define DISPLAY_DEVICE_PRIMARY_DEVICE 0x00000004
#define DISPLAY_DEVICE_MIRRORING_DRIVER 0x00000008
#define DISPLAY_DEVICE_VGA_COMPATIBLE 0x00000010
#endif
#endif // SM_CMONITORS
#undef GetMonitorInfo
#undef GetSystemMetrics
#undef MonitorFromWindow
#undef MonitorFromRect
#undef MonitorFromPoint
#undef EnumDisplayMonitors
#undef EnumDisplayDevices
//
// Define COMPILE_MULTIMON_STUBS to compile the stubs;
// otherwise, you get the declarations.
//
#ifdef COMPILE_MULTIMON_STUBS
//-----------------------------------------------------------------------------
//
// Implement the API stubs.
//
//-----------------------------------------------------------------------------
#ifndef _MULTIMON_USE_SECURE_CRT
#if defined(__GOT_SECURE_LIB__) && __GOT_SECURE_LIB__ >= 200402L
#define _MULTIMON_USE_SECURE_CRT 1
#else
#define _MULTIMON_USE_SECURE_CRT 0
#endif
#endif
#ifndef MULTIMON_FNS_DEFINED
int (WINAPI* g_pfnGetSystemMetrics)(int) = NULL;
HMONITOR (WINAPI* g_pfnMonitorFromWindow)(HWND, DWORD) = NULL;
HMONITOR (WINAPI* g_pfnMonitorFromRect)(LPCRECT, DWORD) = NULL;
HMONITOR (WINAPI* g_pfnMonitorFromPoint)(POINT, DWORD) = NULL;
BOOL (WINAPI* g_pfnGetMonitorInfo)(HMONITOR, LPMONITORINFO) = NULL;
BOOL (WINAPI* g_pfnEnumDisplayMonitors)(HDC, LPCRECT, MONITORENUMPROC, LPARAM) = NULL;
BOOL (WINAPI* g_pfnEnumDisplayDevices)(PVOID, DWORD, PDISPLAY_DEVICE,DWORD) = NULL;
BOOL g_fMultiMonInitDone = FALSE;
BOOL g_fMultimonPlatformNT = FALSE;
#endif
BOOL IsPlatformNT()
{
OSVERSIONINFOA osvi = {0};
osvi.dwOSVersionInfoSize = sizeof(osvi);
GetVersionExA((OSVERSIONINFOA*)&osvi);
return (VER_PLATFORM_WIN32_NT == osvi.dwPlatformId);
}
BOOL InitMultipleMonitorStubs(void)
{
HMODULE hUser32;
if (g_fMultiMonInitDone)
{
return g_pfnGetMonitorInfo != NULL;
}
g_fMultimonPlatformNT = IsPlatformNT();
hUser32 = GetModuleHandle(TEXT("USER32"));
if (hUser32 &&
(*(FARPROC*)&g_pfnGetSystemMetrics = GetProcAddress(hUser32,"GetSystemMetrics")) != NULL &&
(*(FARPROC*)&g_pfnMonitorFromWindow = GetProcAddress(hUser32,"MonitorFromWindow")) != NULL &&
(*(FARPROC*)&g_pfnMonitorFromRect = GetProcAddress(hUser32,"MonitorFromRect")) != NULL &&
(*(FARPROC*)&g_pfnMonitorFromPoint = GetProcAddress(hUser32,"MonitorFromPoint")) != NULL &&
(*(FARPROC*)&g_pfnEnumDisplayMonitors = GetProcAddress(hUser32,"EnumDisplayMonitors")) != NULL &&
#ifdef UNICODE
(*(FARPROC*)&g_pfnEnumDisplayDevices = GetProcAddress(hUser32,"EnumDisplayDevicesW")) != NULL &&
(*(FARPROC*)&g_pfnGetMonitorInfo = g_fMultimonPlatformNT ? GetProcAddress(hUser32,"GetMonitorInfoW") :
GetProcAddress(hUser32,"GetMonitorInfoA")) != NULL
#else
(*(FARPROC*)&g_pfnGetMonitorInfo = GetProcAddress(hUser32,"GetMonitorInfoA")) != NULL &&
(*(FARPROC*)&g_pfnEnumDisplayDevices = GetProcAddress(hUser32,"EnumDisplayDevicesA")) != NULL
#endif
) {
g_fMultiMonInitDone = TRUE;
return TRUE;
}
else
{
g_pfnGetSystemMetrics = NULL;
g_pfnMonitorFromWindow = NULL;
g_pfnMonitorFromRect = NULL;
g_pfnMonitorFromPoint = NULL;
g_pfnGetMonitorInfo = NULL;
g_pfnEnumDisplayMonitors = NULL;
g_pfnEnumDisplayDevices = NULL;
g_fMultiMonInitDone = TRUE;
return FALSE;
}
}
//-----------------------------------------------------------------------------
//
// fake implementations of Monitor APIs that work with the primary display
// no special parameter validation is made since these run in client code
//
//-----------------------------------------------------------------------------
int WINAPI
xGetSystemMetrics(int nIndex)
{
if (InitMultipleMonitorStubs())
return g_pfnGetSystemMetrics(nIndex);
switch (nIndex)
{
case SM_CMONITORS:
case SM_SAMEDISPLAYFORMAT:
return 1;
case SM_XVIRTUALSCREEN:
case SM_YVIRTUALSCREEN:
return 0;
case SM_CXVIRTUALSCREEN:
nIndex = SM_CXSCREEN;
break;
case SM_CYVIRTUALSCREEN:
nIndex = SM_CYSCREEN;
break;
}
return GetSystemMetrics(nIndex);
}
#define xPRIMARY_MONITOR ((HMONITOR)0x12340042)
HMONITOR WINAPI
xMonitorFromPoint(POINT ptScreenCoords, DWORD dwFlags)
{
if (InitMultipleMonitorStubs())
return g_pfnMonitorFromPoint(ptScreenCoords, dwFlags);
if ((dwFlags & (MONITOR_DEFAULTTOPRIMARY | MONITOR_DEFAULTTONEAREST)) ||
((ptScreenCoords.x >= 0) &&
(ptScreenCoords.x < GetSystemMetrics(SM_CXSCREEN)) &&
(ptScreenCoords.y >= 0) &&
(ptScreenCoords.y < GetSystemMetrics(SM_CYSCREEN))))
{
return xPRIMARY_MONITOR;
}
return NULL;
}
HMONITOR WINAPI
xMonitorFromRect(LPCRECT lprcScreenCoords, DWORD dwFlags)
{
if (InitMultipleMonitorStubs())
return g_pfnMonitorFromRect(lprcScreenCoords, dwFlags);
if ((dwFlags & (MONITOR_DEFAULTTOPRIMARY | MONITOR_DEFAULTTONEAREST)) ||
((lprcScreenCoords->right > 0) &&
(lprcScreenCoords->bottom > 0) &&
(lprcScreenCoords->left < GetSystemMetrics(SM_CXSCREEN)) &&
(lprcScreenCoords->top < GetSystemMetrics(SM_CYSCREEN))))
{
return xPRIMARY_MONITOR;
}
return NULL;
}
HMONITOR WINAPI
xMonitorFromWindow(HWND hWnd, DWORD dwFlags)
{
WINDOWPLACEMENT wp;
if (InitMultipleMonitorStubs())
return g_pfnMonitorFromWindow(hWnd, dwFlags);
if (dwFlags & (MONITOR_DEFAULTTOPRIMARY | MONITOR_DEFAULTTONEAREST))
return xPRIMARY_MONITOR;
if (IsIconic(hWnd) ?
GetWindowPlacement(hWnd, &wp) :
GetWindowRect(hWnd, &wp.rcNormalPosition)) {
return xMonitorFromRect(&wp.rcNormalPosition, dwFlags);
}
return NULL;
}
BOOL WINAPI
xGetMonitorInfo(HMONITOR hMonitor, __inout LPMONITORINFO lpMonitorInfo)
{
RECT rcWork;
if (InitMultipleMonitorStubs())
{
BOOL f = g_pfnGetMonitorInfo(hMonitor, lpMonitorInfo);
#ifdef UNICODE
if (f && !g_fMultimonPlatformNT && (lpMonitorInfo->cbSize >= sizeof(MONITORINFOEX)))
{
MultiByteToWideChar(CP_ACP, 0,
(LPSTR)((MONITORINFOEX*)lpMonitorInfo)->szDevice, -1,
((MONITORINFOEX*)lpMonitorInfo)->szDevice, (sizeof(((MONITORINFOEX*)lpMonitorInfo)->szDevice)/sizeof(TCHAR)));
}
#endif
return f;
}
if ((hMonitor == xPRIMARY_MONITOR) &&
lpMonitorInfo &&
(lpMonitorInfo->cbSize >= sizeof(MONITORINFO)) &&
SystemParametersInfoA(SPI_GETWORKAREA, 0, &rcWork, 0))
{
lpMonitorInfo->rcMonitor.left = 0;
lpMonitorInfo->rcMonitor.top = 0;
lpMonitorInfo->rcMonitor.right = GetSystemMetrics(SM_CXSCREEN);
lpMonitorInfo->rcMonitor.bottom = GetSystemMetrics(SM_CYSCREEN);
lpMonitorInfo->rcWork = rcWork;
lpMonitorInfo->dwFlags = MONITORINFOF_PRIMARY;
if (lpMonitorInfo->cbSize >= sizeof(MONITORINFOEX))
{
#ifdef UNICODE
MultiByteToWideChar(CP_ACP, 0, "DISPLAY", -1, ((MONITORINFOEX*)lpMonitorInfo)->szDevice, (sizeof(((MONITORINFOEX*)lpMonitorInfo)->szDevice)/sizeof(TCHAR)));
#else // UNICODE
#if _MULTIMON_USE_SECURE_CRT
strncpy_s(((MONITORINFOEX*)lpMonitorInfo)->szDevice, (sizeof(((MONITORINFOEX*)lpMonitorInfo)->szDevice)/sizeof(TCHAR)), TEXT("DISPLAY"), (sizeof(((MONITORINFOEX*)lpMonitorInfo)->szDevice)/sizeof(TCHAR)) - 1);
#else
lstrcpyn(((MONITORINFOEX*)lpMonitorInfo)->szDevice, TEXT("DISPLAY"), (sizeof(((MONITORINFOEX*)lpMonitorInfo)->szDevice)/sizeof(TCHAR)));
#endif // _MULTIMON_USE_SECURE_CRT
#endif // UNICODE
}
return TRUE;
}
return FALSE;
}
BOOL WINAPI
xEnumDisplayMonitors(
HDC hdcOptionalForPainting,
LPCRECT lprcEnumMonitorsThatIntersect,
MONITORENUMPROC lpfnEnumProc,
LPARAM dwData)
{
RECT rcLimit;
if (InitMultipleMonitorStubs()) {
return g_pfnEnumDisplayMonitors(
hdcOptionalForPainting,
lprcEnumMonitorsThatIntersect,
lpfnEnumProc,
dwData);
}
if (!lpfnEnumProc)
return FALSE;
rcLimit.left = 0;
rcLimit.top = 0;
rcLimit.right = GetSystemMetrics(SM_CXSCREEN);
rcLimit.bottom = GetSystemMetrics(SM_CYSCREEN);
if (hdcOptionalForPainting)
{
RECT rcClip;
POINT ptOrg;
switch (GetClipBox(hdcOptionalForPainting, &rcClip))
{
default:
if (!GetDCOrgEx(hdcOptionalForPainting, &ptOrg))
return FALSE;
OffsetRect(&rcLimit, -ptOrg.x, -ptOrg.y);
if (IntersectRect(&rcLimit, &rcLimit, &rcClip) &&
(!lprcEnumMonitorsThatIntersect ||
IntersectRect(&rcLimit, &rcLimit, lprcEnumMonitorsThatIntersect))) {
break;
}
//fall thru
case NULLREGION:
return TRUE;
case ERROR:
return FALSE;
}
} else {
if ( lprcEnumMonitorsThatIntersect &&
!IntersectRect(&rcLimit, &rcLimit, lprcEnumMonitorsThatIntersect)) {
return TRUE;
}
}
return lpfnEnumProc(
xPRIMARY_MONITOR,
hdcOptionalForPainting,
&rcLimit,
dwData);
}
BOOL WINAPI
xEnumDisplayDevices(
PVOID Unused,
DWORD iDevNum,
__inout PDISPLAY_DEVICE lpDisplayDevice,
DWORD dwFlags)
{
if (InitMultipleMonitorStubs())
return g_pfnEnumDisplayDevices(Unused, iDevNum, lpDisplayDevice, dwFlags);
if (Unused != NULL)
return FALSE;
if (iDevNum != 0)
return FALSE;
if (lpDisplayDevice == NULL || lpDisplayDevice->cb < sizeof(DISPLAY_DEVICE))
return FALSE;
#ifdef UNICODE
MultiByteToWideChar(CP_ACP, 0, "DISPLAY", -1, lpDisplayDevice->DeviceName, (sizeof(lpDisplayDevice->DeviceName)/sizeof(TCHAR)));
MultiByteToWideChar(CP_ACP, 0, "DISPLAY", -1, lpDisplayDevice->DeviceString, (sizeof(lpDisplayDevice->DeviceString)/sizeof(TCHAR)));
#else // UNICODE
#if _MULTIMON_USE_SECURE_CRT
strncpy_s((LPTSTR)lpDisplayDevice->DeviceName, (sizeof(lpDisplayDevice->DeviceName)/sizeof(TCHAR)), TEXT("DISPLAY"), (sizeof(lpDisplayDevice->DeviceName)/sizeof(TCHAR)) - 1);
strncpy_s((LPTSTR)lpDisplayDevice->DeviceString, (sizeof(lpDisplayDevice->DeviceString)/sizeof(TCHAR)), TEXT("DISPLAY"), (sizeof(lpDisplayDevice->DeviceName)/sizeof(TCHAR)) - 1);
#else
lstrcpyn((LPTSTR)lpDisplayDevice->DeviceName, TEXT("DISPLAY"), (sizeof(lpDisplayDevice->DeviceName)/sizeof(TCHAR)));
lstrcpyn((LPTSTR)lpDisplayDevice->DeviceString, TEXT("DISPLAY"), (sizeof(lpDisplayDevice->DeviceString)/sizeof(TCHAR)));
#endif // _MULTIMON_USE_SECURE_CRT
#endif // UNICODE
lpDisplayDevice->StateFlags = DISPLAY_DEVICE_ATTACHED_TO_DESKTOP | DISPLAY_DEVICE_PRIMARY_DEVICE;
return TRUE;
}
#undef xPRIMARY_MONITOR
#undef COMPILE_MULTIMON_STUBS
#else // COMPILE_MULTIMON_STUBS
extern int WINAPI xGetSystemMetrics(int);
extern HMONITOR WINAPI xMonitorFromWindow(HWND, DWORD);
extern HMONITOR WINAPI xMonitorFromRect(LPCRECT, DWORD);
extern HMONITOR WINAPI xMonitorFromPoint(POINT, DWORD);
extern BOOL WINAPI xGetMonitorInfo(HMONITOR, LPMONITORINFO);
extern BOOL WINAPI xEnumDisplayMonitors(HDC, LPCRECT, MONITORENUMPROC, LPARAM);
extern BOOL WINAPI xEnumDisplayDevices(PVOID, DWORD, PDISPLAY_DEVICE, DWORD);
#endif // COMPILE_MULTIMON_STUBS
//
// build defines that replace the regular APIs with our versions
//
#define GetSystemMetrics xGetSystemMetrics
#define MonitorFromWindow xMonitorFromWindow
#define MonitorFromRect xMonitorFromRect
#define MonitorFromPoint xMonitorFromPoint
#define GetMonitorInfo xGetMonitorInfo
#define EnumDisplayMonitors xEnumDisplayMonitors
#define EnumDisplayDevices xEnumDisplayDevices
#ifdef __cplusplus
}
#endif // __cplusplus
+1 -1
Ver Arquivo
@@ -210,7 +210,7 @@
#include <string>
#endif
#if defined(linux) || defined(__APPLE__) || defined(__MACOSX)
#if defined(__linux__) || defined(__APPLE__) || defined(__MACOSX)
#include <alloca.h>
#include <emmintrin.h>
+2 -2
Ver Arquivo
@@ -92,7 +92,7 @@ extern "C" {
#define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED __attribute__((deprecated))
#define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
#endif
#elif _WIN32
#elif defined(_WIN32)
#ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
#define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED
#define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED
@@ -454,7 +454,7 @@ typedef unsigned int cl_GLenum;
/* Define alignment keys */
#if defined( __GNUC__ )
#define CL_ALIGNED(_x) __attribute__ ((aligned(_x)))
#elif defined( _WIN32) && (_MSC_VER)
#elif defined( _WIN32) && defined(_MSC_VER)
/* Alignment keys neutered on windows because MSVC can't swallow function arguments with alignment requirements */
/* http://msdn.microsoft.com/en-us/library/373ak2y1%28VS.71%29.aspx */
/* #include <crtdefs.h> */
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
BIN
Ver Arquivo
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
BIN
Ver Arquivo
Arquivo binário não exibido.
BIN
Ver Arquivo
Arquivo binário não exibido.
BIN
Ver Arquivo
Arquivo binário não exibido.
BIN
Ver Arquivo
Arquivo binário não exibido.
BIN
Ver Arquivo
Arquivo binário não exibido.
BIN
Ver Arquivo
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
BIN
Ver Arquivo
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
Arquivo binário não exibido.
BIN
Ver Arquivo
Arquivo binário não exibido.
+1 -1
Ver Arquivo
@@ -46,5 +46,5 @@ if(ENABLE_SOLUTION_FOLDERS)
endif()
if(NOT BUILD_SHARED_LIBS)
ocv_install_target(${JASPER_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT main)
ocv_install_target(${JASPER_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
endif()
+1 -1
Ver Arquivo
@@ -39,5 +39,5 @@ if(ENABLE_SOLUTION_FOLDERS)
endif()
if(NOT BUILD_SHARED_LIBS)
ocv_install_target(${JPEG_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT main)
ocv_install_target(${JPEG_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
endif()
+1 -1
Ver Arquivo
@@ -55,5 +55,5 @@ if(ENABLE_SOLUTION_FOLDERS)
endif()
if(NOT BUILD_SHARED_LIBS)
ocv_install_target(${PNG_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT main)
ocv_install_target(${PNG_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
endif()
+1 -1
Ver Arquivo
@@ -115,5 +115,5 @@ if(ENABLE_SOLUTION_FOLDERS)
endif()
if(NOT BUILD_SHARED_LIBS)
ocv_install_target(${TIFF_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT main)
ocv_install_target(${TIFF_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
endif()
+1 -1
Ver Arquivo
@@ -62,7 +62,7 @@ if(ENABLE_SOLUTION_FOLDERS)
endif()
if(NOT BUILD_SHARED_LIBS)
ocv_install_target(IlmImf EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT main)
ocv_install_target(IlmImf EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
endif()
set(OPENEXR_INCLUDE_PATHS ${OPENEXR_INCLUDE_PATHS} PARENT_SCOPE)
+1
Ver Arquivo
@@ -42,6 +42,7 @@
#include <ImfRgbaFile.h>
#include <ImfStandardAttributes.h>
#include <Iex.h>
#include <algorithm> // for std::max()
using namespace std;
using namespace Imath;
+1
Ver Arquivo
@@ -58,6 +58,7 @@
#include <vector>
#include <fstream>
#include <assert.h>
#include <algorithm> // for std::max()
namespace Imf {
+1
Ver Arquivo
@@ -56,6 +56,7 @@
#include <string>
#include <vector>
#include <assert.h>
#include <algorithm> // for std::max()
namespace Imf {
+1
Ver Arquivo
@@ -43,6 +43,7 @@
#include "Iex.h"
#include <ImfMisc.h>
#include <ImfChannelList.h>
#include <algorithm> // for std::max()
namespace Imf {
+1
Ver Arquivo
@@ -63,6 +63,7 @@
#include <fstream>
#include <assert.h>
#include <map>
#include <algorithm> // for std::max()
namespace Imf {
+1
Ver Arquivo
@@ -44,6 +44,7 @@
#include "ImathMatrixAlgo.h"
#include <cmath>
#include <algorithm> // for std::max()
#if defined(OPENEXR_DLL)
#define EXPORT_CONST __declspec(dllexport)
+72
Ver Arquivo
@@ -0,0 +1,72 @@
diff --git a/3rdparty/openexr/IlmImf/ImfAcesFile.cpp b/3rdparty/openexr/IlmImf/ImfAcesFile.cpp
index de4bf83..9418b9d 100644
--- a/3rdparty/openexr/IlmImf/ImfAcesFile.cpp
+++ b/3rdparty/openexr/IlmImf/ImfAcesFile.cpp
@@ -42,6 +42,7 @@
#include <ImfRgbaFile.h>
#include <ImfStandardAttributes.h>
#include <Iex.h>
+#include <algorithm> // for std::max()
using namespace std;
using namespace Imath;
diff --git a/3rdparty/openexr/IlmImf/ImfOutputFile.cpp b/3rdparty/openexr/IlmImf/ImfOutputFile.cpp
index 8831ec9..e69b92b 100644
--- a/3rdparty/openexr/IlmImf/ImfOutputFile.cpp
+++ b/3rdparty/openexr/IlmImf/ImfOutputFile.cpp
@@ -58,6 +58,7 @@
#include <vector>
#include <fstream>
#include <assert.h>
+#include <algorithm> // for std::max()
namespace Imf {
diff --git a/3rdparty/openexr/IlmImf/ImfScanLineInputFile.cpp b/3rdparty/openexr/IlmImf/ImfScanLineInputFile.cpp
index f7a12a3..5d8b522 100644
--- a/3rdparty/openexr/IlmImf/ImfScanLineInputFile.cpp
+++ b/3rdparty/openexr/IlmImf/ImfScanLineInputFile.cpp
@@ -56,6 +56,7 @@
#include <string>
#include <vector>
#include <assert.h>
+#include <algorithm> // for std::max()
namespace Imf {
diff --git a/3rdparty/openexr/IlmImf/ImfTiledMisc.cpp b/3rdparty/openexr/IlmImf/ImfTiledMisc.cpp
index 57f52f1..9588e78 100644
--- a/3rdparty/openexr/IlmImf/ImfTiledMisc.cpp
+++ b/3rdparty/openexr/IlmImf/ImfTiledMisc.cpp
@@ -43,6 +43,7 @@
#include "Iex.h"
#include <ImfMisc.h>
#include <ImfChannelList.h>
+#include <algorithm> // for std::max()
namespace Imf {
diff --git a/3rdparty/openexr/IlmImf/ImfTiledOutputFile.cpp b/3rdparty/openexr/IlmImf/ImfTiledOutputFile.cpp
index 0882106..0bc3cb3 100644
--- a/3rdparty/openexr/IlmImf/ImfTiledOutputFile.cpp
+++ b/3rdparty/openexr/IlmImf/ImfTiledOutputFile.cpp
@@ -63,6 +63,7 @@
#include <fstream>
#include <assert.h>
#include <map>
+#include <algorithm> // for std::max()
namespace Imf {
diff --git a/3rdparty/openexr/Imath/ImathMatrixAlgo.cpp b/3rdparty/openexr/Imath/ImathMatrixAlgo.cpp
index f0d2ed6..7ddc649 100644
--- a/3rdparty/openexr/Imath/ImathMatrixAlgo.cpp
+++ b/3rdparty/openexr/Imath/ImathMatrixAlgo.cpp
@@ -44,6 +44,7 @@
#include "ImathMatrixAlgo.h"
#include <cmath>
+#include <algorithm> // for std::max()
#if defined(OPENEXR_DLL)
#define EXPORT_CONST __declspec(dllexport)
+3 -3
Ver Arquivo
@@ -248,9 +248,9 @@ if(ENABLE_SOLUTION_FOLDERS)
endif()
ocv_install_target(tbb EXPORT OpenCVModules
RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT main
LIBRARY DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT main
ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT main
RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT libs
LIBRARY DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT libs
ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev
)
# get TBB version
+1 -1
Ver Arquivo
@@ -95,5 +95,5 @@ if(ENABLE_SOLUTION_FOLDERS)
endif()
if(NOT BUILD_SHARED_LIBS)
ocv_install_target(${ZLIB_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT main)
ocv_install_target(${ZLIB_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
endif()
+56 -8
Ver Arquivo
@@ -127,9 +127,9 @@ endif()
OCV_OPTION(WITH_1394 "Include IEEE1394 support" ON IF (NOT ANDROID AND NOT IOS) )
OCV_OPTION(WITH_AVFOUNDATION "Use AVFoundation for Video I/O" ON IF IOS)
OCV_OPTION(WITH_CARBON "Use Carbon for UI instead of Cocoa" OFF IF APPLE )
OCV_OPTION(WITH_CUDA "Include NVidia Cuda Runtime support" ON IF (CMAKE_VERSION VERSION_GREATER "2.8" AND NOT ANDROID AND NOT IOS) )
OCV_OPTION(WITH_CUFFT "Include NVidia Cuda Fast Fourier Transform (FFT) library support" ON IF (CMAKE_VERSION VERSION_GREATER "2.8" AND NOT ANDROID AND NOT IOS) )
OCV_OPTION(WITH_CUBLAS "Include NVidia Cuda Basic Linear Algebra Subprograms (BLAS) library support" OFF IF (CMAKE_VERSION VERSION_GREATER "2.8" AND NOT ANDROID AND NOT IOS) )
OCV_OPTION(WITH_CUDA "Include NVidia Cuda Runtime support" ON IF (CMAKE_VERSION VERSION_GREATER "2.8" AND NOT IOS) )
OCV_OPTION(WITH_CUFFT "Include NVidia Cuda Fast Fourier Transform (FFT) library support" ON IF (CMAKE_VERSION VERSION_GREATER "2.8" AND NOT IOS) )
OCV_OPTION(WITH_CUBLAS "Include NVidia Cuda Basic Linear Algebra Subprograms (BLAS) library support" OFF IF (CMAKE_VERSION VERSION_GREATER "2.8" AND NOT IOS) )
OCV_OPTION(WITH_NVCUVID "Include NVidia Video Decoding library support" OFF IF (CMAKE_VERSION VERSION_GREATER "2.8" AND NOT ANDROID AND NOT IOS AND NOT APPLE) )
OCV_OPTION(WITH_EIGEN "Include Eigen2/Eigen3 support" ON)
OCV_OPTION(WITH_VFW "Include Video for Windows support" ON IF WIN32 )
@@ -160,10 +160,10 @@ OCV_OPTION(WITH_DSHOW "Build HighGUI with DirectShow support" ON
OCV_OPTION(WITH_MSMF "Build HighGUI with Media Foundation support" OFF IF WIN32 )
OCV_OPTION(WITH_XIMEA "Include XIMEA cameras support" OFF IF (NOT ANDROID AND NOT APPLE) )
OCV_OPTION(WITH_XINE "Include Xine support (GPL)" OFF IF (UNIX AND NOT APPLE AND NOT ANDROID) )
OCV_OPTION(WITH_OPENCL "Include OpenCL Runtime support" ON IF (NOT ANDROID AND NOT IOS) )
OCV_OPTION(WITH_OPENCL "Include OpenCL Runtime support" ON IF (NOT IOS) )
OCV_OPTION(WITH_OPENCLAMDFFT "Include AMD OpenCL FFT library support" ON IF (NOT ANDROID AND NOT IOS) )
OCV_OPTION(WITH_OPENCLAMDBLAS "Include AMD OpenCL BLAS library support" ON IF (NOT ANDROID AND NOT IOS) )
OCV_OPTION(WITH_INTELPERC "Include Intel Perceptual Computing support" OFF IF WIN32 )
# OpenCV build components
# ===================================================
@@ -197,10 +197,11 @@ OCV_OPTION(INSTALL_C_EXAMPLES "Install C examples" OFF )
OCV_OPTION(INSTALL_PYTHON_EXAMPLES "Install Python examples" OFF )
OCV_OPTION(INSTALL_ANDROID_EXAMPLES "Install Android examples" OFF IF ANDROID )
OCV_OPTION(INSTALL_TO_MANGLED_PATHS "Enables mangled install paths, that help with side by side installs." OFF IF (UNIX AND NOT ANDROID AND NOT IOS AND BUILD_SHARED_LIBS) )
OCV_OPTION(INSTALL_TESTS "Install accuracy and performance test binaries and test data" OFF)
# OpenCV build options
# ===================================================
OCV_OPTION(ENABLE_DYNAMIC_CUDA "Enabled dynamic CUDA linkage" ON IF ANDROID )
OCV_OPTION(ENABLE_PRECOMPILED_HEADERS "Use precompiled headers" ON IF (NOT IOS) )
OCV_OPTION(ENABLE_SOLUTION_FOLDERS "Solution folder in Visual Studio or in other IDEs" (MSVC_IDE OR CMAKE_GENERATOR MATCHES Xcode) IF (CMAKE_VERSION VERSION_GREATER "2.8.0") )
OCV_OPTION(ENABLE_PROFILING "Enable profiling in the GCC compiler (Add flags: -g -pg)" OFF IF CMAKE_COMPILER_IS_GNUCXX )
@@ -214,9 +215,12 @@ OCV_OPTION(ENABLE_SSSE3 "Enable SSSE3 instructions"
OCV_OPTION(ENABLE_SSE41 "Enable SSE4.1 instructions" OFF IF ((CV_ICC OR CMAKE_COMPILER_IS_GNUCXX) AND (X86 OR X86_64)) )
OCV_OPTION(ENABLE_SSE42 "Enable SSE4.2 instructions" OFF IF (CMAKE_COMPILER_IS_GNUCXX AND (X86 OR X86_64)) )
OCV_OPTION(ENABLE_AVX "Enable AVX instructions" OFF IF ((MSVC OR CMAKE_COMPILER_IS_GNUCXX) AND (X86 OR X86_64)) )
OCV_OPTION(ENABLE_NEON "Enable NEON instructions" OFF IF CMAKE_COMPILER_IS_GNUCXX AND ARM )
OCV_OPTION(ENABLE_VFPV3 "Enable VFPv3-D32 instructions" OFF IF CMAKE_COMPILER_IS_GNUCXX AND ARM )
OCV_OPTION(ENABLE_NOISY_WARNINGS "Show all warnings even if they are too noisy" OFF )
OCV_OPTION(OPENCV_WARNINGS_ARE_ERRORS "Treat warnings as errors" OFF )
OCV_OPTION(ENABLE_WINRT_MODE "Build with Windows Runtime support" OFF IF WIN32 )
OCV_OPTION(ENABLE_WINRT_MODE_NATIVE "Build with Windows Runtime native C++ support" OFF IF WIN32 )
# uncategorized options
# ===================================================
@@ -240,6 +244,15 @@ include(cmake/OpenCVVersion.cmake)
# Save libs and executables in the same place
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin" CACHE PATH "Output directory for applications" )
if (ANDROID)
if (ANDROID_ABI MATCHES "NEON")
set(ENABLE_NEON ON)
endif()
if (ANDROID_ABI MATCHES "VFPV3")
set(ENABLE_VFPV3 ON)
endif()
endif()
if(ANDROID OR WIN32)
set(OPENCV_DOC_INSTALL_PATH doc)
elseif(INSTALL_TO_MANGLED_PATHS)
@@ -262,6 +275,9 @@ endif()
set(OPENCV_SAMPLES_BIN_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}samples")
set(OPENCV_BIN_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}bin")
if(NOT OPENCV_TEST_INSTALL_PATH)
set(OPENCV_TEST_INSTALL_PATH "${OPENCV_BIN_INSTALL_PATH}")
endif()
if(ANDROID)
set(LIBRARY_OUTPUT_PATH "${OpenCV_BINARY_DIR}/lib/${ANDROID_NDK_ABI_NAME}")
@@ -270,6 +286,7 @@ if(ANDROID)
set(OPENCV_3P_LIB_INSTALL_PATH sdk/native/3rdparty/libs/${ANDROID_NDK_ABI_NAME})
set(OPENCV_CONFIG_INSTALL_PATH sdk/native/jni)
set(OPENCV_INCLUDE_INSTALL_PATH sdk/native/jni/include)
set(OPENCV_SAMPLES_SRC_INSTALL_PATH samples/native)
else()
set(LIBRARY_OUTPUT_PATH "${OpenCV_BINARY_DIR}/lib")
set(3P_LIBRARY_OUTPUT_PATH "${OpenCV_BINARY_DIR}/3rdparty/lib${LIB_SUFFIX}")
@@ -280,9 +297,11 @@ else()
set(OPENCV_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}lib${LIB_SUFFIX}")
endif()
set(OPENCV_3P_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}staticlib${LIB_SUFFIX}")
set(OPENCV_SAMPLES_SRC_INSTALL_PATH samples/native)
else()
set(OPENCV_LIB_INSTALL_PATH lib${LIB_SUFFIX})
set(OPENCV_3P_LIB_INSTALL_PATH share/OpenCV/3rdparty/${OPENCV_LIB_INSTALL_PATH})
set(OPENCV_SAMPLES_SRC_INSTALL_PATH share/OpenCV/samples)
endif()
set(OPENCV_INCLUDE_INSTALL_PATH "include")
@@ -461,7 +480,11 @@ endif()
# ----------------------------------------------------------------------------
# Add CUDA libraries (needed for apps/tools, samples)
# ----------------------------------------------------------------------------
if(HAVE_CUDA)
if(NOT HAVE_CUDA)
set(ENABLE_DYNAMIC_CUDA OFF)
endif()
if(HAVE_CUDA AND NOT ENABLE_DYNAMIC_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})
@@ -470,6 +493,7 @@ if(HAVE_CUDA)
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${CUDA_cufft_LIBRARY})
endif()
endif()
# ----------------------------------------------------------------------------
# Solution folders:
# ----------------------------------------------------------------------------
@@ -540,6 +564,19 @@ include(cmake/OpenCVGenConfig.cmake)
# Generate Info.plist for the IOS framework
include(cmake/OpenCVGenInfoPlist.cmake)
# Generate environment setup file
if(INSTALL_TESTS AND OPENCV_TEST_DATA_PATH AND UNIX AND NOT ANDROID)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/templates/opencv_testing.sh.in"
"${CMAKE_BINARY_DIR}/unix-install/opencv_testing.sh" @ONLY)
install(FILES "${CMAKE_BINARY_DIR}/unix-install/opencv_testing.sh"
DESTINATION /etc/profile.d/ COMPONENT tests)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/templates/opencv_run_all_tests.sh.in"
"${CMAKE_BINARY_DIR}/unix-install/opencv_run_all_tests.sh" @ONLY)
install(FILES "${CMAKE_BINARY_DIR}/unix-install/opencv_run_all_tests.sh"
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE
DESTINATION ${OPENCV_TEST_INSTALL_PATH} COMPONENT tests)
endif()
# ----------------------------------------------------------------------------
# Summary:
# ----------------------------------------------------------------------------
@@ -649,7 +686,7 @@ endif()
if(WIN32)
status("")
status(" Windows RT support:" HAVE_WINRT THEN YES ELSE NO)
if (ENABLE_WINRT_MODE)
if (ENABLE_WINRT_MODE OR ENABLE_WINRT_MODE_NATIVE)
status(" Windows SDK v8.0:" ${WINDOWS_SDK_PATH})
status(" Visual Studio 2012:" ${VISUAL_STUDIO_PATH})
endif()
@@ -829,6 +866,11 @@ if(DEFINED WITH_XINE)
status(" Xine:" HAVE_XINE THEN "YES (ver ${ALIASOF_libxine_VERSION})" ELSE NO)
endif(DEFINED WITH_XINE)
if(DEFINED WITH_INTELPERC)
status(" Intel PerC:" HAVE_INTELPERC THEN "YES" ELSE NO)
endif(DEFINED WITH_INTELPERC)
# ========================== Other third-party libraries ==========================
status("")
status(" Other third-party libraries:")
@@ -952,3 +994,9 @@ ocv_finalize_status()
if("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
message(WARNING "The source directory is the same as binary directory. \"make clean\" may damage the source tree")
endif()
# ----------------------------------------------------------------------------
# CPack stuff
# ----------------------------------------------------------------------------
include(cmake/OpenCVPackaging.cmake)
+8 -12
Ver Arquivo
@@ -1,16 +1,11 @@
IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
By downloading, copying, installing or using the software you agree to this license.
If you do not agree to this license, do not download, install,
copy or use the software.
By downloading, copying, installing or using the software you agree to this license.
If you do not agree to this license, do not download, install,
copy or use the software.
License Agreement
For Open Source Computer Vision Library
Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
Copyright (C) 2008-2011, Willow Garage Inc., all rights reserved.
Third party copyrights are property of their respective owners.
(3-clause BSD License)
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
@@ -22,13 +17,14 @@ are permitted provided that the following conditions are met:
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* The name of the copyright holders may not be used to endorse or promote products
derived from this software without specific prior written permission.
* Neither the names of the copyright holders nor the names of the contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
This software is provided by the copyright holders and contributors "as is" and
any express or implied warranties, including, but not limited to, the implied
warranties of merchantability and fitness for a particular purpose are disclaimed.
In no event shall the Intel Corporation or contributors be liable for any direct,
In no event shall copyright holders or contributors be liable for any direct,
indirect, incidental, special, exemplary, or consequential damages
(including, but not limited to, procurement of substitute goods or services;
loss of use, data, or profits; or business interruption) however caused
+6 -6
Ver Arquivo
@@ -71,14 +71,14 @@ set_target_properties(opencv_performance PROPERTIES
if(INSTALL_CREATE_DISTRIB)
if(BUILD_SHARED_LIBS)
install(TARGETS opencv_haartraining RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} CONFIGURATIONS Release COMPONENT main)
install(TARGETS opencv_createsamples RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} CONFIGURATIONS Release COMPONENT main)
install(TARGETS opencv_performance RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} CONFIGURATIONS Release COMPONENT main)
install(TARGETS opencv_haartraining RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} CONFIGURATIONS Release COMPONENT dev)
install(TARGETS opencv_createsamples RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} CONFIGURATIONS Release COMPONENT dev)
install(TARGETS opencv_performance RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} CONFIGURATIONS Release COMPONENT dev)
endif()
else()
install(TARGETS opencv_haartraining RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT main)
install(TARGETS opencv_createsamples RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT main)
install(TARGETS opencv_performance RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT main)
install(TARGETS opencv_haartraining RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT dev)
install(TARGETS opencv_createsamples RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT dev)
install(TARGETS opencv_performance RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT dev)
endif()
if(ENABLE_SOLUTION_FOLDERS)
+1 -1
Ver Arquivo
@@ -338,7 +338,7 @@ typedef enum CvBoostType
CV_LKCLASS = 5, /* classification (K class problem) */
CV_LSREG = 6, /* least squares regression */
CV_LADREG = 7, /* least absolute deviation regression */
CV_MREG = 8, /* M-regression (Huber loss) */
CV_MREG = 8 /* M-regression (Huber loss) */
} CvBoostType;
/****************************************************************************************\
+2 -2
Ver Arquivo
@@ -35,8 +35,8 @@ endif()
if(INSTALL_CREATE_DISTRIB)
if(BUILD_SHARED_LIBS)
install(TARGETS ${the_target} RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} CONFIGURATIONS Release COMPONENT main)
install(TARGETS ${the_target} RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} CONFIGURATIONS Release COMPONENT dev)
endif()
else()
install(TARGETS ${the_target} RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT main)
install(TARGETS ${the_target} RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT dev)
endif()
+2
Ver Arquivo
@@ -4,6 +4,8 @@
#include "HOGfeatures.h"
#include "cascadeclassifier.h"
using namespace std;
using namespace cv;
CvHOGFeatureParams::CvHOGFeatureParams()
{
+12 -12
Ver Arquivo
@@ -20,33 +20,33 @@ class CvHOGEvaluator : public CvFeatureEvaluator
public:
virtual ~CvHOGEvaluator() {}
virtual void init(const CvFeatureParams *_featureParams,
int _maxSampleCount, Size _winSize );
virtual void setImage(const Mat& img, uchar clsLabel, int idx);
int _maxSampleCount, cv::Size _winSize );
virtual void setImage(const cv::Mat& img, uchar clsLabel, int idx);
virtual float operator()(int varIdx, int sampleIdx) const;
virtual void writeFeatures( FileStorage &fs, const Mat& featureMap ) const;
virtual void writeFeatures( cv::FileStorage &fs, const cv::Mat& featureMap ) const;
protected:
virtual void generateFeatures();
virtual void integralHistogram(const Mat &img, vector<Mat> &histogram, Mat &norm, int nbins) const;
virtual void integralHistogram(const cv::Mat &img, std::vector<cv::Mat> &histogram, cv::Mat &norm, int nbins) const;
class Feature
{
public:
Feature();
Feature( int offset, int x, int y, int cellW, int cellH );
float calc( const vector<Mat> &_hists, const Mat &_normSum, size_t y, int featComponent ) const;
void write( FileStorage &fs ) const;
void write( FileStorage &fs, int varIdx ) const;
float calc( const std::vector<cv::Mat> &_hists, const cv::Mat &_normSum, size_t y, int featComponent ) const;
void write( cv::FileStorage &fs ) const;
void write( cv::FileStorage &fs, int varIdx ) const;
Rect rect[N_CELLS]; //cells
cv::Rect rect[N_CELLS]; //cells
struct
{
int p0, p1, p2, p3;
} fastRect[N_CELLS];
};
vector<Feature> features;
std::vector<Feature> features;
Mat normSum; //for nomalization calculation (L1 or L2)
vector<Mat> hist;
cv::Mat normSum; //for nomalization calculation (L1 or L2)
std::vector<cv::Mat> hist;
};
inline float CvHOGEvaluator::operator()(int varIdx, int sampleIdx) const
@@ -57,7 +57,7 @@ inline float CvHOGEvaluator::operator()(int varIdx, int sampleIdx) const
return features[featureIdx].calc( hist, normSum, sampleIdx, componentIdx);
}
inline float CvHOGEvaluator::Feature::calc( const vector<Mat>& _hists, const Mat& _normSum, size_t y, int featComponent ) const
inline float CvHOGEvaluator::Feature::calc( const std::vector<cv::Mat>& _hists, const cv::Mat& _normSum, size_t y, int featComponent ) const
{
float normFactor;
float res;
+19 -6
Ver Arquivo
@@ -1,6 +1,19 @@
#include "opencv2/core/core.hpp"
#include "opencv2/core/internal.hpp"
using cv::Size;
using cv::Mat;
using cv::Point;
using cv::FileStorage;
using cv::Rect;
using cv::Ptr;
using cv::FileNode;
using cv::Mat_;
using cv::Range;
using cv::FileNodeIterator;
using cv::ParallelLoopBody;
#include "boost.h"
#include "cascadeclassifier.h"
#include <queue>
@@ -160,10 +173,10 @@ CvCascadeBoostParams::CvCascadeBoostParams( int _boostType,
void CvCascadeBoostParams::write( FileStorage &fs ) const
{
String boostTypeStr = boost_type == CvBoost::DISCRETE ? CC_DISCRETE_BOOST :
string boostTypeStr = boost_type == CvBoost::DISCRETE ? CC_DISCRETE_BOOST :
boost_type == CvBoost::REAL ? CC_REAL_BOOST :
boost_type == CvBoost::LOGIT ? CC_LOGIT_BOOST :
boost_type == CvBoost::GENTLE ? CC_GENTLE_BOOST : String();
boost_type == CvBoost::GENTLE ? CC_GENTLE_BOOST : string();
CV_Assert( !boostTypeStr.empty() );
fs << CC_BOOST_TYPE << boostTypeStr;
fs << CC_MINHITRATE << minHitRate;
@@ -175,7 +188,7 @@ void CvCascadeBoostParams::write( FileStorage &fs ) const
bool CvCascadeBoostParams::read( const FileNode &node )
{
String boostTypeStr;
string boostTypeStr;
FileNode rnode = node[CC_BOOST_TYPE];
rnode >> boostTypeStr;
boost_type = !boostTypeStr.compare( CC_DISCRETE_BOOST ) ? CvBoost::DISCRETE :
@@ -213,10 +226,10 @@ void CvCascadeBoostParams::printDefaults() const
void CvCascadeBoostParams::printAttrs() const
{
String boostTypeStr = boost_type == CvBoost::DISCRETE ? CC_DISCRETE_BOOST :
string boostTypeStr = boost_type == CvBoost::DISCRETE ? CC_DISCRETE_BOOST :
boost_type == CvBoost::REAL ? CC_REAL_BOOST :
boost_type == CvBoost::LOGIT ? CC_LOGIT_BOOST :
boost_type == CvBoost::GENTLE ? CC_GENTLE_BOOST : String();
boost_type == CvBoost::GENTLE ? CC_GENTLE_BOOST : string();
CV_Assert( !boostTypeStr.empty() );
cout << "boostType: " << boostTypeStr << endl;
cout << "minHitRate: " << minHitRate << endl;
@@ -226,7 +239,7 @@ void CvCascadeBoostParams::printAttrs() const
cout << "maxWeakCount: " << weak_count << endl;
}
bool CvCascadeBoostParams::scanAttr( const String prmName, const String val)
bool CvCascadeBoostParams::scanAttr( const string prmName, const string val)
{
bool res = true;
+10 -10
Ver Arquivo
@@ -13,11 +13,11 @@ struct CvCascadeBoostParams : CvBoostParams
CvCascadeBoostParams( int _boostType, float _minHitRate, float _maxFalseAlarm,
double _weightTrimRate, int _maxDepth, int _maxWeakCount );
virtual ~CvCascadeBoostParams() {}
void write( FileStorage &fs ) const;
bool read( const FileNode &node );
void write( cv::FileStorage &fs ) const;
bool read( const cv::FileNode &node );
virtual void printDefaults() const;
virtual void printAttrs() const;
virtual bool scanAttr( const String prmName, const String val);
virtual bool scanAttr( const std::string prmName, const std::string val);
};
struct CvCascadeBoostTrainData : CvDTreeTrainData
@@ -45,7 +45,7 @@ struct CvCascadeBoostTrainData : CvDTreeTrainData
virtual void free_train_data();
const CvFeatureEvaluator* featureEvaluator;
Mat valCache; // precalculated feature values (CV_32FC1)
cv::Mat valCache; // precalculated feature values (CV_32FC1)
CvMat _resp; // for casting
int numPrecalcVal, numPrecalcIdx;
};
@@ -54,9 +54,9 @@ class CvCascadeBoostTree : public CvBoostTree
{
public:
virtual CvDTreeNode* predict( int sampleIdx ) const;
void write( FileStorage &fs, const Mat& featureMap );
void read( const FileNode &node, CvBoost* _ensemble, CvDTreeTrainData* _data );
void markFeaturesInMap( Mat& featureMap );
void write( cv::FileStorage &fs, const cv::Mat& featureMap );
void read( const cv::FileNode &node, CvBoost* _ensemble, CvDTreeTrainData* _data );
void markFeaturesInMap( cv::Mat& featureMap );
protected:
virtual void split_node_data( CvDTreeNode* n );
};
@@ -70,10 +70,10 @@ public:
virtual float predict( int sampleIdx, bool returnSum = false ) const;
float getThreshold() const { return threshold; }
void write( FileStorage &fs, const Mat& featureMap ) const;
bool read( const FileNode &node, const CvFeatureEvaluator* _featureEvaluator,
void write( cv::FileStorage &fs, const cv::Mat& featureMap ) const;
bool read( const cv::FileNode &node, const CvFeatureEvaluator* _featureEvaluator,
const CvCascadeBoostParams& _params );
void markUsedFeaturesInMap( Mat& featureMap );
void markUsedFeaturesInMap( cv::Mat& featureMap );
protected:
virtual bool set_params( const CvBoostParams& _params );
virtual void update_weights( CvBoostTree* tree );
+22 -9
Ver Arquivo
@@ -5,6 +5,7 @@
#include <queue>
using namespace std;
using namespace cv;
static const char* stageTypes[] = { CC_BOOST };
static const char* featureTypes[] = { CC_HAAR, CC_LBP, CC_HOG };
@@ -24,10 +25,10 @@ CvCascadeParams::CvCascadeParams( int _stageType, int _featureType ) : stageType
void CvCascadeParams::write( FileStorage &fs ) const
{
String stageTypeStr = stageType == BOOST ? CC_BOOST : String();
string stageTypeStr = stageType == BOOST ? CC_BOOST : string();
CV_Assert( !stageTypeStr.empty() );
fs << CC_STAGE_TYPE << stageTypeStr;
String featureTypeStr = featureType == CvFeatureParams::HAAR ? CC_HAAR :
string featureTypeStr = featureType == CvFeatureParams::HAAR ? CC_HAAR :
featureType == CvFeatureParams::LBP ? CC_LBP :
featureType == CvFeatureParams::HOG ? CC_HOG :
0;
@@ -41,7 +42,7 @@ bool CvCascadeParams::read( const FileNode &node )
{
if ( node.empty() )
return false;
String stageTypeStr, featureTypeStr;
string stageTypeStr, featureTypeStr;
FileNode rnode = node[CC_STAGE_TYPE];
if ( !rnode.isString() )
return false;
@@ -96,7 +97,7 @@ void CvCascadeParams::printAttrs() const
cout << "sampleHeight: " << winSize.height << endl;
}
bool CvCascadeParams::scanAttr( const String prmName, const String val )
bool CvCascadeParams::scanAttr( const string prmName, const string val )
{
bool res = true;
if( !prmName.compare( "-stageType" ) )
@@ -126,9 +127,9 @@ bool CvCascadeParams::scanAttr( const String prmName, const String val )
//---------------------------- CascadeClassifier --------------------------------------
bool CvCascadeClassifier::train( const String _cascadeDirName,
const String _posFilename,
const String _negFilename,
bool CvCascadeClassifier::train( const string _cascadeDirName,
const string _posFilename,
const string _negFilename,
int _numPos, int _numNeg,
int _precalcValBufSize, int _precalcIdxBufSize,
int _numStages,
@@ -137,6 +138,9 @@ bool CvCascadeClassifier::train( const String _cascadeDirName,
const CvCascadeBoostParams& _stageParams,
bool baseFormatSave )
{
// Start recording clock ticks for training time output
const clock_t begin_time = clock();
if( _cascadeDirName.empty() || _posFilename.empty() || _negFilename.empty() )
CV_Error( CV_StsBadArg, "_cascadeDirName or _bgfileName or _vecFileName is NULL" );
@@ -247,6 +251,14 @@ bool CvCascadeClassifier::train( const String _cascadeDirName,
fs << FileStorage::getDefaultObjectName(stageFilename) << "{";
tempStage->write( fs, Mat() );
fs << "}";
// Output training time up till now
float seconds = float( clock () - begin_time ) / CLOCKS_PER_SEC;
int days = int(seconds) / 60 / 60 / 24;
int hours = (int(seconds) / 60 / 60) % 24;
int minutes = (int(seconds) / 60) % 60;
int seconds_left = int(seconds) % 60;
cout << "Training until now has taken " << days << " days " << hours << " hours " << minutes << " minutes " << seconds_left <<" seconds." << endl;
}
if(stageClassifiers.size() == 0)
@@ -310,6 +322,7 @@ int CvCascadeClassifier::fillPassedSamples( int first, int count, bool isPositiv
if( predict( i ) == 1.0F )
{
getcount++;
printf("%s current samples: %d\r", isPositive ? "POS":"NEG", getcount);
break;
}
}
@@ -399,7 +412,7 @@ bool CvCascadeClassifier::readStages( const FileNode &node)
#define ICV_HAAR_PARENT_NAME "parent"
#define ICV_HAAR_NEXT_NAME "next"
void CvCascadeClassifier::save( const String filename, bool baseFormat )
void CvCascadeClassifier::save( const string filename, bool baseFormat )
{
FileStorage fs( filename, FileStorage::WRITE );
@@ -491,7 +504,7 @@ void CvCascadeClassifier::save( const String filename, bool baseFormat )
fs << "}";
}
bool CvCascadeClassifier::load( const String cascadeDirName )
bool CvCascadeClassifier::load( const string cascadeDirName )
{
FileStorage fs( cascadeDirName + CC_PARAMS_FILENAME, FileStorage::READ );
if ( !fs.isOpened() )
+19 -19
Ver Arquivo
@@ -72,24 +72,24 @@ public:
CvCascadeParams();
CvCascadeParams( int _stageType, int _featureType );
void write( FileStorage &fs ) const;
bool read( const FileNode &node );
void write( cv::FileStorage &fs ) const;
bool read( const cv::FileNode &node );
void printDefaults() const;
void printAttrs() const;
bool scanAttr( const String prmName, const String val );
bool scanAttr( const std::string prmName, const std::string val );
int stageType;
int featureType;
Size winSize;
cv::Size winSize;
};
class CvCascadeClassifier
{
public:
bool train( const String _cascadeDirName,
const String _posFilename,
const String _negFilename,
bool train( const std::string _cascadeDirName,
const std::string _posFilename,
const std::string _negFilename,
int _numPos, int _numNeg,
int _precalcValBufSize, int _precalcIdxBufSize,
int _numStages,
@@ -99,25 +99,25 @@ public:
bool baseFormatSave = false );
private:
int predict( int sampleIdx );
void save( const String cascadeDirName, bool baseFormat = false );
bool load( const String cascadeDirName );
void save( const std::string cascadeDirName, bool baseFormat = false );
bool load( const std::string cascadeDirName );
bool updateTrainingSet( double& acceptanceRatio );
int fillPassedSamples( int first, int count, bool isPositive, int64& consumed );
void writeParams( FileStorage &fs ) const;
void writeStages( FileStorage &fs, const Mat& featureMap ) const;
void writeFeatures( FileStorage &fs, const Mat& featureMap ) const;
bool readParams( const FileNode &node );
bool readStages( const FileNode &node );
void writeParams( cv::FileStorage &fs ) const;
void writeStages( cv::FileStorage &fs, const cv::Mat& featureMap ) const;
void writeFeatures( cv::FileStorage &fs, const cv::Mat& featureMap ) const;
bool readParams( const cv::FileNode &node );
bool readStages( const cv::FileNode &node );
void getUsedFeaturesIdxMap( Mat& featureMap );
void getUsedFeaturesIdxMap( cv::Mat& featureMap );
CvCascadeParams cascadeParams;
Ptr<CvFeatureParams> featureParams;
Ptr<CvCascadeBoostParams> stageParams;
cv::Ptr<CvFeatureParams> featureParams;
cv::Ptr<CvCascadeBoostParams> stageParams;
Ptr<CvFeatureEvaluator> featureEvaluator;
vector< Ptr<CvCascadeBoost> > stageClassifiers;
cv::Ptr<CvFeatureEvaluator> featureEvaluator;
std::vector< cv::Ptr<CvCascadeBoost> > stageClassifiers;
CvCascadeImageReader imgReader;
int numStages, curNumSamples;
int numPos, numNeg;
+2 -1
Ver Arquivo
@@ -5,6 +5,7 @@
#include "cascadeclassifier.h"
using namespace std;
using namespace cv;
float calcNormFactor( const Mat& sum, const Mat& sqSum )
{
@@ -24,7 +25,7 @@ CvParams::CvParams() : name( "params" ) {}
void CvParams::printDefaults() const
{ cout << "--" << name << "--" << endl; }
void CvParams::printAttrs() const {}
bool CvParams::scanAttr( const String, const String ) { return false; }
bool CvParams::scanAttr( const string, const string ) { return false; }
//---------------------------- FeatureParams --------------------------------------
+6 -5
Ver Arquivo
@@ -5,6 +5,7 @@
#include "cascadeclassifier.h"
using namespace std;
using namespace cv;
CvHaarFeatureParams::CvHaarFeatureParams() : mode(BASIC)
{
@@ -25,9 +26,9 @@ void CvHaarFeatureParams::init( const CvFeatureParams& fp )
void CvHaarFeatureParams::write( FileStorage &fs ) const
{
CvFeatureParams::write( fs );
String modeStr = mode == BASIC ? CC_MODE_BASIC :
string modeStr = mode == BASIC ? CC_MODE_BASIC :
mode == CORE ? CC_MODE_CORE :
mode == ALL ? CC_MODE_ALL : String();
mode == ALL ? CC_MODE_ALL : string();
CV_Assert( !modeStr.empty() );
fs << CC_MODE << modeStr;
}
@@ -40,7 +41,7 @@ bool CvHaarFeatureParams::read( const FileNode &node )
FileNode rnode = node[CC_MODE];
if( !rnode.isString() )
return false;
String modeStr;
string modeStr;
rnode >> modeStr;
mode = !modeStr.compare( CC_MODE_BASIC ) ? BASIC :
!modeStr.compare( CC_MODE_CORE ) ? CORE :
@@ -58,13 +59,13 @@ void CvHaarFeatureParams::printDefaults() const
void CvHaarFeatureParams::printAttrs() const
{
CvFeatureParams::printAttrs();
String mode_str = mode == BASIC ? CC_MODE_BASIC :
string mode_str = mode == BASIC ? CC_MODE_BASIC :
mode == CORE ? CC_MODE_CORE :
mode == ALL ? CC_MODE_ALL : 0;
cout << "mode: " << mode_str << endl;
}
bool CvHaarFeatureParams::scanAttr( const String prmName, const String val)
bool CvHaarFeatureParams::scanAttr( const string prmName, const string val)
{
if ( !CvFeatureParams::scanAttr( prmName, val ) )
{
+15 -15
Ver Arquivo
@@ -18,12 +18,12 @@ public:
CvHaarFeatureParams( int _mode );
virtual void init( const CvFeatureParams& fp );
virtual void write( FileStorage &fs ) const;
virtual bool read( const FileNode &node );
virtual void write( cv::FileStorage &fs ) const;
virtual bool read( const cv::FileNode &node );
virtual void printDefaults() const;
virtual void printAttrs() const;
virtual bool scanAttr( const String prm, const String val);
virtual bool scanAttr( const std::string prm, const std::string val);
int mode;
};
@@ -32,11 +32,11 @@ class CvHaarEvaluator : public CvFeatureEvaluator
{
public:
virtual void init(const CvFeatureParams *_featureParams,
int _maxSampleCount, Size _winSize );
virtual void setImage(const Mat& img, uchar clsLabel, int idx);
int _maxSampleCount, cv::Size _winSize );
virtual void setImage(const cv::Mat& img, uchar clsLabel, int idx);
virtual float operator()(int featureIdx, int sampleIdx) const;
virtual void writeFeatures( FileStorage &fs, const Mat& featureMap ) const;
void writeFeature( FileStorage &fs, int fi ) const; // for old file fornat
virtual void writeFeatures( cv::FileStorage &fs, const cv::Mat& featureMap ) const;
void writeFeature( cv::FileStorage &fs, int fi ) const; // for old file fornat
protected:
virtual void generateFeatures();
@@ -48,13 +48,13 @@ protected:
int x0, int y0, int w0, int h0, float wt0,
int x1, int y1, int w1, int h1, float wt1,
int x2 = 0, int y2 = 0, int w2 = 0, int h2 = 0, float wt2 = 0.0F );
float calc( const Mat &sum, const Mat &tilted, size_t y) const;
void write( FileStorage &fs ) const;
float calc( const cv::Mat &sum, const cv::Mat &tilted, size_t y) const;
void write( cv::FileStorage &fs ) const;
bool tilted;
struct
{
Rect r;
cv::Rect r;
float weight;
} rect[CV_HAAR_FEATURE_MAX];
@@ -64,10 +64,10 @@ protected:
} fastRect[CV_HAAR_FEATURE_MAX];
};
vector<Feature> features;
Mat sum; /* sum images (each row represents image) */
Mat tilted; /* tilted sum images (each row represents image) */
Mat normfactor; /* normalization factor */
std::vector<Feature> features;
cv::Mat sum; /* sum images (each row represents image) */
cv::Mat tilted; /* tilted sum images (each row represents image) */
cv::Mat normfactor; /* normalization factor */
};
inline float CvHaarEvaluator::operator()(int featureIdx, int sampleIdx) const
@@ -76,7 +76,7 @@ inline float CvHaarEvaluator::operator()(int featureIdx, int sampleIdx) const
return !nf ? 0.0f : (features[featureIdx].calc( sum, tilted, sampleIdx)/nf);
}
inline float CvHaarEvaluator::Feature::calc( const Mat &_sum, const Mat &_tilted, size_t y) const
inline float CvHaarEvaluator::Feature::calc( const cv::Mat &_sum, const cv::Mat &_tilted, size_t y) const
{
const int* img = tilted ? _tilted.ptr<int>((int)y) : _sum.ptr<int>((int)y);
float ret = rect[0].weight * (img[fastRect[0].p0] - img[fastRect[0].p1] - img[fastRect[0].p2] + img[fastRect[0].p3] ) +
+12 -9
Ver Arquivo
@@ -7,7 +7,10 @@
#include <iostream>
#include <fstream>
bool CvCascadeImageReader::create( const String _posFilename, const String _negFilename, Size _winSize )
using namespace std;
using namespace cv;
bool CvCascadeImageReader::create( const string _posFilename, const string _negFilename, Size _winSize )
{
return posReader.create(_posFilename) && negReader.create(_negFilename, _winSize);
}
@@ -22,21 +25,21 @@ CvCascadeImageReader::NegReader::NegReader()
stepFactor = 0.5F;
}
bool CvCascadeImageReader::NegReader::create( const String _filename, Size _winSize )
bool CvCascadeImageReader::NegReader::create( const string _filename, Size _winSize )
{
String dirname, str;
string dirname, str;
std::ifstream file(_filename.c_str());
if ( !file.is_open() )
return false;
size_t pos = _filename.rfind('\\');
char dlmrt = '\\';
if (pos == String::npos)
if (pos == string::npos)
{
pos = _filename.rfind('/');
dlmrt = '/';
}
dirname = pos == String::npos ? "" : _filename.substr(0, pos) + dlmrt;
dirname = pos == string::npos ? "" : _filename.substr(0, pos) + dlmrt;
while( !file.eof() )
{
std::getline(file, str);
@@ -64,10 +67,10 @@ bool CvCascadeImageReader::NegReader::nextImg()
round = round % (winSize.width * winSize.height);
last %= count;
_offset.x = min( (int)round % winSize.width, src.cols - winSize.width );
_offset.y = min( (int)round / winSize.width, src.rows - winSize.height );
_offset.x = std::min( (int)round % winSize.width, src.cols - winSize.width );
_offset.y = std::min( (int)round / winSize.width, src.rows - winSize.height );
if( !src.empty() && src.type() == CV_8UC1
&& offset.x >= 0 && offset.y >= 0 )
&& _offset.x >= 0 && _offset.y >= 0 )
break;
}
@@ -126,7 +129,7 @@ CvCascadeImageReader::PosReader::PosReader()
vec = 0;
}
bool CvCascadeImageReader::PosReader::create( const String _filename )
bool CvCascadeImageReader::PosReader::create( const string _filename )
{
if ( file )
fclose( file );
+12 -12
Ver Arquivo
@@ -3,15 +3,15 @@
#include "highgui.h"
using namespace cv;
class CvCascadeImageReader
{
public:
bool create( const String _posFilename, const String _negFilename, Size _winSize );
bool create( const std::string _posFilename, const std::string _negFilename, cv::Size _winSize );
void restart() { posReader.restart(); }
bool getNeg(Mat &_img) { return negReader.get( _img ); }
bool getPos(Mat &_img) { return posReader.get( _img ); }
bool getNeg(cv::Mat &_img) { return negReader.get( _img ); }
bool getPos(cv::Mat &_img) { return posReader.get( _img ); }
private:
class PosReader
@@ -19,8 +19,8 @@ private:
public:
PosReader();
virtual ~PosReader();
bool create( const String _filename );
bool get( Mat &_img );
bool create( const std::string _filename );
bool get( cv::Mat &_img );
void restart();
short* vec;
@@ -35,18 +35,18 @@ private:
{
public:
NegReader();
bool create( const String _filename, Size _winSize );
bool get( Mat& _img );
bool create( const std::string _filename, cv::Size _winSize );
bool get( cv::Mat& _img );
bool nextImg();
Mat src, img;
vector<String> imgFilenames;
Point offset, point;
cv::Mat src, img;
std::vector<std::string> imgFilenames;
cv::Point offset, point;
float scale;
float scaleFactor;
float stepFactor;
size_t last, round;
Size winSize;
cv::Size winSize;
} negReader;
};
+2
Ver Arquivo
@@ -4,6 +4,8 @@
#include "lbpfeatures.h"
#include "cascadeclassifier.h"
using namespace cv;
CvLBPFeatureParams::CvLBPFeatureParams()
{
maxCatCount = 256;
+9 -9
Ver Arquivo
@@ -15,11 +15,11 @@ class CvLBPEvaluator : public CvFeatureEvaluator
public:
virtual ~CvLBPEvaluator() {}
virtual void init(const CvFeatureParams *_featureParams,
int _maxSampleCount, Size _winSize );
virtual void setImage(const Mat& img, uchar clsLabel, int idx);
int _maxSampleCount, cv::Size _winSize );
virtual void setImage(const cv::Mat& img, uchar clsLabel, int idx);
virtual float operator()(int featureIdx, int sampleIdx) const
{ return (float)features[featureIdx].calc( sum, sampleIdx); }
virtual void writeFeatures( FileStorage &fs, const Mat& featureMap ) const;
virtual void writeFeatures( cv::FileStorage &fs, const cv::Mat& featureMap ) const;
protected:
virtual void generateFeatures();
@@ -28,18 +28,18 @@ protected:
public:
Feature();
Feature( int offset, int x, int y, int _block_w, int _block_h );
uchar calc( const Mat& _sum, size_t y ) const;
void write( FileStorage &fs ) const;
uchar calc( const cv::Mat& _sum, size_t y ) const;
void write( cv::FileStorage &fs ) const;
Rect rect;
cv::Rect rect;
int p[16];
};
vector<Feature> features;
std::vector<Feature> features;
Mat sum;
cv::Mat sum;
};
inline uchar CvLBPEvaluator::Feature::calc(const Mat &_sum, size_t y) const
inline uchar CvLBPEvaluator::Feature::calc(const cv::Mat &_sum, size_t y) const
{
const int* psum = _sum.ptr<int>((int)y);
int cval = psum[p[5]] - psum[p[6]] - psum[p[9]] + psum[p[10]];
+2 -1
Ver Arquivo
@@ -5,11 +5,12 @@
#include "cascadeclassifier.h"
using namespace std;
using namespace cv;
int main( int argc, char* argv[] )
{
CvCascadeClassifier classifier;
String cascadeDirName, vecName, bgName;
string cascadeDirName, vecName, bgName;
int numPos = 2000;
int numNeg = 1000;
int numStages = 20;
+17 -17
Ver Arquivo
@@ -30,13 +30,13 @@
(p3) = (rect).x + (rect).width - (rect).height \
+ (step) * ((rect).y + (rect).width + (rect).height);
float calcNormFactor( const Mat& sum, const Mat& sqSum );
float calcNormFactor( const cv::Mat& sum, const cv::Mat& sqSum );
template<class Feature>
void _writeFeatures( const vector<Feature> features, FileStorage &fs, const Mat& featureMap )
void _writeFeatures( const std::vector<Feature> features, cv::FileStorage &fs, const cv::Mat& featureMap )
{
fs << FEATURES << "[";
const Mat_<int>& featureMap_ = (const Mat_<int>&)featureMap;
const cv::Mat_<int>& featureMap_ = (const cv::Mat_<int>&)featureMap;
for ( int fi = 0; fi < featureMap.cols; fi++ )
if ( featureMap_(0, fi) >= 0 )
{
@@ -53,13 +53,13 @@ public:
CvParams();
virtual ~CvParams() {}
// from|to file
virtual void write( FileStorage &fs ) const = 0;
virtual bool read( const FileNode &node ) = 0;
virtual void write( cv::FileStorage &fs ) const = 0;
virtual bool read( const cv::FileNode &node ) = 0;
// from|to screen
virtual void printDefaults() const;
virtual void printAttrs() const;
virtual bool scanAttr( const String prmName, const String val );
String name;
virtual bool scanAttr( const std::string prmName, const std::string val );
std::string name;
};
class CvFeatureParams : public CvParams
@@ -68,9 +68,9 @@ public:
enum { HAAR = 0, LBP = 1, HOG = 2 };
CvFeatureParams();
virtual void init( const CvFeatureParams& fp );
virtual void write( FileStorage &fs ) const;
virtual bool read( const FileNode &node );
static Ptr<CvFeatureParams> create( int featureType );
virtual void write( cv::FileStorage &fs ) const;
virtual bool read( const cv::FileNode &node );
static cv::Ptr<CvFeatureParams> create( int featureType );
int maxCatCount; // 0 in case of numerical features
int featSize; // 1 in case of simple features (HAAR, LBP) and N_BINS(9)*N_CELLS(4) in case of Dalal's HOG features
};
@@ -80,25 +80,25 @@ class CvFeatureEvaluator
public:
virtual ~CvFeatureEvaluator() {}
virtual void init(const CvFeatureParams *_featureParams,
int _maxSampleCount, Size _winSize );
virtual void setImage(const Mat& img, uchar clsLabel, int idx);
virtual void writeFeatures( FileStorage &fs, const Mat& featureMap ) const = 0;
int _maxSampleCount, cv::Size _winSize );
virtual void setImage(const cv::Mat& img, uchar clsLabel, int idx);
virtual void writeFeatures( cv::FileStorage &fs, const cv::Mat& featureMap ) const = 0;
virtual float operator()(int featureIdx, int sampleIdx) const = 0;
static Ptr<CvFeatureEvaluator> create(int type);
static cv::Ptr<CvFeatureEvaluator> create(int type);
int getNumFeatures() const { return numFeatures; }
int getMaxCatCount() const { return featureParams->maxCatCount; }
int getFeatureSize() const { return featureParams->featSize; }
const Mat& getCls() const { return cls; }
const cv::Mat& getCls() const { return cls; }
float getCls(int si) const { return cls.at<float>(si, 0); }
protected:
virtual void generateFeatures() = 0;
int npos, nneg;
int numFeatures;
Size winSize;
cv::Size winSize;
CvFeatureParams *featureParams;
Mat cls;
cv::Mat cls;
};
#endif
+8 -4
Ver Arquivo
@@ -759,11 +759,15 @@ endif()
set(CUDA_VERSION_STRING "${CUDA_VERSION}")
# Support for arm cross compilation with CUDA 5.5
if(CUDA_VERSION VERSION_GREATER "5.0" AND CMAKE_CROSSCOMPILING AND ${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm" AND EXISTS "${CUDA_TOOLKIT_ROOT_DIR}/targets/armv7-linux-gnueabihf")
set(CUDA_TOOLKIT_TARGET_DIR "${CUDA_TOOLKIT_ROOT_DIR}/targets/armv7-linux-gnueabihf" CACHE PATH "Toolkit target location.")
else()
set(CUDA_TOOLKIT_TARGET_DIR "${CUDA_TOOLKIT_ROOT_DIR}" CACHE PATH "Toolkit target location.")
set(__cuda_toolkit_target_dir_initial "${CUDA_TOOLKIT_ROOT_DIR}")
if(CUDA_VERSION VERSION_GREATER "5.0" AND CMAKE_CROSSCOMPILING AND ${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
if(ANDROID AND EXISTS "${CUDA_TOOLKIT_ROOT_DIR}/targets/armv7-linux-androideabi")
set(__cuda_toolkit_target_dir_initial "${CUDA_TOOLKIT_ROOT_DIR}/targets/armv7-linux-androideabi")
elseif(EXISTS "${CUDA_TOOLKIT_ROOT_DIR}/targets/armv7-linux-gnueabihf")
set(__cuda_toolkit_target_dir_initial "${CUDA_TOOLKIT_ROOT_DIR}/targets/armv7-linux-gnueabihf")
endif()
endif()
set(CUDA_TOOLKIT_TARGET_DIR "${__cuda_toolkit_target_dir_initial}" CACHE PATH "Toolkit target location.")
mark_as_advanced(CUDA_TOOLKIT_TARGET_DIR)
# Target CPU architecture
+8 -4
Ver Arquivo
@@ -9,7 +9,7 @@ set(HAVE_WINRT FALSE)
# search Windows Platform SDK
message(STATUS "Checking for Windows Platform SDK")
GET_FILENAME_COMPONENT(WINDOWS_SDK_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v8.0;InstallationFolder]" ABSOLUTE CACHE)
if (WINDOWS_SDK_PATH STREQUAL "")
if(WINDOWS_SDK_PATH STREQUAL "")
set(HAVE_MSPDK FALSE)
message(STATUS "Windows Platform SDK 8.0 was not found")
else()
@@ -19,7 +19,7 @@ endif()
#search for Visual Studio 11.0 install directory
message(STATUS "Checking for Visual Studio 2012")
GET_FILENAME_COMPONENT(VISUAL_STUDIO_PATH [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0\\Setup\\VS;ProductDir] REALPATH CACHE)
if (VISUAL_STUDIO_PATH STREQUAL "")
if(VISUAL_STUDIO_PATH STREQUAL "")
set(HAVE_MSVC2012 FALSE)
message(STATUS "Visual Studio 2012 was not found")
else()
@@ -30,11 +30,15 @@ try_compile(HAVE_WINRT_SDK
"${OpenCV_BINARY_DIR}"
"${OpenCV_SOURCE_DIR}/cmake/checks/winrttest.cpp")
if (ENABLE_WINRT_MODE AND HAVE_WINRT_SDK AND HAVE_MSVC2012 AND HAVE_MSPDK)
if(ENABLE_WINRT_MODE AND HAVE_WINRT_SDK AND HAVE_MSVC2012 AND HAVE_MSPDK)
set(HAVE_WINRT TRUE)
set(HAVE_WINRT_CX TRUE)
elseif(ENABLE_WINRT_MODE_NATIVE AND HAVE_WINRT_SDK AND HAVE_MSVC2012 AND HAVE_MSPDK)
set(HAVE_WINRT TRUE)
set(HAVE_WINRT_CX FALSE)
endif()
if (HAVE_WINRT)
if(HAVE_WINRT)
add_definitions(/DWINVER=0x0602 /DNTDDI_VERSION=NTDDI_WIN8 /D_WIN32_WINNT=0x0602)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /appcontainer")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /appcontainer")
+6 -3
Ver Arquivo
@@ -130,6 +130,12 @@ if(CMAKE_COMPILER_IS_GNUCXX)
if(ENABLE_SSE2)
add_extra_compiler_option(-msse2)
endif()
if (ENABLE_NEON)
add_extra_compiler_option("-mfpu=neon")
endif()
if (ENABLE_VFPV3 AND NOT ENABLE_NEON)
add_extra_compiler_option("-mfpu=vfpv3")
endif()
# SSE3 and further should be disabled under MingW because it generates compiler errors
if(NOT MINGW)
@@ -183,9 +189,6 @@ if(CMAKE_COMPILER_IS_GNUCXX)
set(OPENCV_EXTRA_FLAGS_RELEASE "${OPENCV_EXTRA_FLAGS_RELEASE} -DNDEBUG")
set(OPENCV_EXTRA_FLAGS_DEBUG "${OPENCV_EXTRA_FLAGS_DEBUG} -O0 -DDEBUG -D_DEBUG")
if(BUILD_WITH_DEBUG_INFO)
set(OPENCV_EXTRA_FLAGS_DEBUG "${OPENCV_EXTRA_FLAGS_DEBUG} -ggdb3")
endif()
endif()
if(MSVC)
+2
Ver Arquivo
@@ -77,6 +77,8 @@ if(MSVC)
set(OpenCV_RUNTIME vc10)
elseif(MSVC_VERSION EQUAL 1700)
set(OpenCV_RUNTIME vc11)
elseif(MSVC_VERSION EQUAL 1800)
set(OpenCV_RUNTIME vc12)
endif()
elseif(MINGW)
set(OpenCV_RUNTIME mingw)
+5 -5
Ver Arquivo
@@ -344,20 +344,20 @@ macro(add_android_project target path)
add_custom_command(TARGET ${target} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy "${android_proj_bin_dir}/bin/${target}-debug.apk" "${OpenCV_BINARY_DIR}/bin/${target}.apk")
if(INSTALL_ANDROID_EXAMPLES AND "${target}" MATCHES "^example-")
#apk
install(FILES "${OpenCV_BINARY_DIR}/bin/${target}.apk" DESTINATION "samples" COMPONENT main)
install(FILES "${OpenCV_BINARY_DIR}/bin/${target}.apk" DESTINATION "samples" COMPONENT samples)
get_filename_component(sample_dir "${path}" NAME)
#java part
list(REMOVE_ITEM android_proj_files ${ANDROID_MANIFEST_FILE})
foreach(f ${android_proj_files} ${ANDROID_MANIFEST_FILE})
get_filename_component(install_subdir "${f}" PATH)
install(FILES "${android_proj_bin_dir}/${f}" DESTINATION "samples/${sample_dir}/${install_subdir}" COMPONENT main)
install(FILES "${android_proj_bin_dir}/${f}" DESTINATION "samples/${sample_dir}/${install_subdir}" COMPONENT samples)
endforeach()
#jni part + eclipse files
file(GLOB_RECURSE jni_files RELATIVE "${path}" "${path}/jni/*" "${path}/.cproject")
ocv_list_filterout(jni_files "\\\\.svn")
foreach(f ${jni_files} ".classpath" ".project" ".settings/org.eclipse.jdt.core.prefs")
get_filename_component(install_subdir "${f}" PATH)
install(FILES "${path}/${f}" DESTINATION "samples/${sample_dir}/${install_subdir}" COMPONENT main)
install(FILES "${path}/${f}" DESTINATION "samples/${sample_dir}/${install_subdir}" COMPONENT samples)
endforeach()
#update proj
if(android_proj_lib_deps_commands)
@@ -365,9 +365,9 @@ macro(add_android_project target path)
endif()
install(CODE "EXECUTE_PROCESS(COMMAND ${ANDROID_EXECUTABLE} --silent update project --path . --target \"${android_proj_sdk_target}\" --name \"${target}\" ${inst_lib_opt}
WORKING_DIRECTORY \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/samples/${sample_dir}\"
)" COMPONENT main)
)" COMPONENT dev)
#empty 'gen'
install(CODE "MAKE_DIRECTORY(\"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/samples/${sample_dir}/gen\")" COMPONENT main)
install(CODE "MAKE_DIRECTORY(\"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/samples/${sample_dir}/gen\")" COMPONENT samples)
endif()
endif()
endmacro()
+22 -4
Ver Arquivo
@@ -90,12 +90,17 @@ if(CUDA_FOUND)
endif()
if(NOT DEFINED __cuda_arch_bin)
if(${CUDA_VERSION} VERSION_LESS "5.0")
set(__cuda_arch_bin "1.1 1.2 1.3 2.0 2.1(2.0) 3.0")
if(ANDROID)
set(__cuda_arch_bin "3.2")
set(__cuda_arch_ptx "")
else()
set(__cuda_arch_bin "1.1 1.2 1.3 2.0 2.1(2.0) 3.0 3.5")
if(${CUDA_VERSION} VERSION_LESS "5.0")
set(__cuda_arch_bin "1.1 1.2 1.3 2.0 2.1(2.0) 3.0")
else()
set(__cuda_arch_bin "1.1 1.2 1.3 2.0 2.1(2.0) 3.0 3.5")
endif()
set(__cuda_arch_ptx "3.0")
endif()
set(__cuda_arch_ptx "3.0")
endif()
set(CUDA_ARCH_BIN ${__cuda_arch_bin} CACHE STRING "Specify 'real' GPU architectures to build binaries for, BIN(PTX) format is supported")
@@ -147,6 +152,11 @@ if(CUDA_FOUND)
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} ${NVCC_FLAGS_EXTRA})
set(OpenCV_CUDA_CC "${NVCC_FLAGS_EXTRA}")
if(ANDROID)
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-Xptxas;-dlcm=ca")
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-target-os-variant=Android")
endif()
message(STATUS "CUDA NVCC target flags: ${CUDA_NVCC_FLAGS}")
OCV_OPTION(CUDA_FAST_MATH "Enable --use_fast_math for CUDA compiler " OFF)
@@ -169,6 +179,14 @@ if(CUDA_FOUND)
# we remove -Wsign-promo as it generates warnings under linux
string(REPLACE "-Wsign-promo" "" ${var} "${${var}}")
# we remove -Wno-delete-non-virtual-dtor because it's used for C++ compiler
# but NVCC uses C compiler by default
string(REPLACE "-Wno-delete-non-virtual-dtor" "" ${var} "${${var}}")
# we remove -frtti because it's used for C++ compiler
# but NVCC uses C compiler by default
string(REPLACE "-frtti" "" ${var} "${${var}}")
endforeach()
if(BUILD_SHARED_LIBS)
+2
Ver Arquivo
@@ -136,6 +136,8 @@ if(MSVC)
set(OpenCV_RUNTIME vc10)
elseif(MSVC_VERSION EQUAL 1700)
set(OpenCV_RUNTIME vc11)
elseif(MSVC_VERSION EQUAL 1800)
set(OpenCV_RUNTIME vc12)
endif()
elseif(MINGW)
set(OpenCV_RUNTIME mingw)
+24 -9
Ver Arquivo
@@ -81,24 +81,39 @@ if(PYTHON_EXECUTABLE)
SET(PYTHON_PACKAGES_PATH "${_PYTHON_PACKAGES_PATH}" CACHE PATH "Where to install the python packages.")
if(NOT PYTHON_NUMPY_INCLUDE_DIR)
# Attempt to discover the NumPy include directory. If this succeeds, then build python API with NumPy
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import os; os.environ['DISTUTILS_USE_SDK']='1'; import numpy.distutils; print numpy.distutils.misc_util.get_numpy_include_dirs()[0]"
RESULT_VARIABLE PYTHON_NUMPY_PROCESS
OUTPUT_VARIABLE PYTHON_NUMPY_INCLUDE_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(CMAKE_CROSSCOMPILING)
message(STATUS "Cannot probe for Python/Numpy support (because we are cross-compiling OpenCV)")
message(STATUS "If you want to enable Python/Numpy support, set the following variables:")
message(STATUS " PYTHON_INCLUDE_PATH")
message(STATUS " PYTHON_LIBRARIES")
message(STATUS " PYTHON_NUMPY_INCLUDE_DIR")
else()
# Attempt to discover the NumPy include directory. If this succeeds, then build python API with NumPy
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import os; os.environ['DISTUTILS_USE_SDK']='1'; import numpy.distutils; print numpy.distutils.misc_util.get_numpy_include_dirs()[0]"
RESULT_VARIABLE PYTHON_NUMPY_PROCESS
OUTPUT_VARIABLE PYTHON_NUMPY_INCLUDE_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(PYTHON_NUMPY_PROCESS EQUAL 0)
file(TO_CMAKE_PATH "${PYTHON_NUMPY_INCLUDE_DIR}" _PYTHON_NUMPY_INCLUDE_DIR)
set(PYTHON_NUMPY_INCLUDE_DIR ${_PYTHON_NUMPY_INCLUDE_DIR} CACHE PATH "Path to numpy headers")
if(NOT PYTHON_NUMPY_PROCESS EQUAL 0)
unset(PYTHON_NUMPY_INCLUDE_DIR)
endif()
endif()
endif()
if(PYTHON_NUMPY_INCLUDE_DIR)
file(TO_CMAKE_PATH "${PYTHON_NUMPY_INCLUDE_DIR}" _PYTHON_NUMPY_INCLUDE_DIR)
set(PYTHON_NUMPY_INCLUDE_DIR ${_PYTHON_NUMPY_INCLUDE_DIR} CACHE PATH "Path to numpy headers")
set(PYTHON_USE_NUMPY TRUE)
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import numpy; print numpy.version.version"
if(CMAKE_CROSSCOMPILING)
if(NOT PYTHON_NUMPY_VERSION)
set(PYTHON_NUMPY_VERSION "undefined - cannot be probed because of the cross-compilation")
endif()
else()
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import numpy; print numpy.version.version"
RESULT_VARIABLE PYTHON_NUMPY_PROCESS
OUTPUT_VARIABLE PYTHON_NUMPY_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
endif()
endif(NOT ANDROID AND NOT IOS)
+20
Ver Arquivo
@@ -0,0 +1,20 @@
# 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)
+5
Ver Arquivo
@@ -250,3 +250,8 @@ if (NOT IOS)
set(HAVE_QTKIT YES)
endif()
endif()
# --- Intel Perceptual Computing SDK ---
if(WITH_INTELPERC)
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindIntelPerCSDK.cmake")
endif(WITH_INTELPERC)
+1 -1
Ver Arquivo
@@ -23,7 +23,7 @@ if(WIN32)
if(EXISTS ${XIMEA_PATH})
set(XIMEA_FOUND 1)
# set LIB folders
if(CMAKE_CL_64)
if(X86_64)
set(XIMEA_LIBRARY_DIR "${XIMEA_PATH}/x64")
else()
set(XIMEA_LIBRARY_DIR "${XIMEA_PATH}/x86")
+15 -1
Ver Arquivo
@@ -44,6 +44,7 @@ if(ANDROID)
# build the list of opencv libs and dependencies for all modules
set(OPENCV_MODULES_CONFIGMAKE "")
set(OPENCV_HAVE_GPU_MODULE_CONFIGMAKE "off")
set(OPENCV_EXTRA_COMPONENTS_CONFIGMAKE "")
set(OPENCV_3RDPARTY_COMPONENTS_CONFIGMAKE "")
foreach(m ${OPENCV_MODULES_PUBLIC})
@@ -53,6 +54,11 @@ if(ANDROID)
endif()
endforeach()
# remove CUDA runtime and NPP from regular deps
# it can be added separately if needed.
ocv_list_filterout(OPENCV_EXTRA_COMPONENTS_CONFIGMAKE "libcu")
ocv_list_filterout(OPENCV_EXTRA_COMPONENTS_CONFIGMAKE "libnpp")
# split 3rdparty libs and modules
foreach(mod ${OPENCV_MODULES_CONFIGMAKE})
if(NOT mod MATCHES "^opencv_.+$")
@@ -63,6 +69,14 @@ if(ANDROID)
list(REMOVE_ITEM OPENCV_MODULES_CONFIGMAKE ${OPENCV_3RDPARTY_COMPONENTS_CONFIGMAKE})
endif()
# GPU module enabled separately
list(REMOVE_ITEM OPENCV_MODULES_CONFIGMAKE "opencv_gpu")
list(REMOVE_ITEM OPENCV_MODULES_CONFIGMAKE "opencv_dynamicuda")
if(HAVE_opencv_gpu)
set(OPENCV_HAVE_GPU_MODULE_CONFIGMAKE "on")
endif()
# convert CMake lists to makefile literals
foreach(lst OPENCV_MODULES_CONFIGMAKE OPENCV_3RDPARTY_COMPONENTS_CONFIGMAKE OPENCV_EXTRA_COMPONENTS_CONFIGMAKE)
ocv_list_unique(${lst})
@@ -102,5 +116,5 @@ if(ANDROID)
set(OPENCV_3RDPARTY_LIBS_DIR_CONFIGCMAKE "\$(OPENCV_THIS_DIR)/../3rdparty/libs/\$(OPENCV_TARGET_ARCH_ABI)")
configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/OpenCV.mk.in" "${CMAKE_BINARY_DIR}/unix-install/OpenCV.mk" IMMEDIATE @ONLY)
install(FILES ${CMAKE_BINARY_DIR}/unix-install/OpenCV.mk DESTINATION ${OPENCV_CONFIG_INSTALL_PATH})
install(FILES ${CMAKE_BINARY_DIR}/unix-install/OpenCV.mk DESTINATION ${OPENCV_CONFIG_INSTALL_PATH} COMPONENT dev)
endif(ANDROID)
+13 -13
Ver Arquivo
@@ -109,18 +109,18 @@ if(UNIX) # ANDROID configuration is created here also
# <prefix>/(share|lib)/<name>*/ (U)
# <prefix>/(share|lib)/<name>*/(cmake|CMake)/ (U)
if(INSTALL_TO_MANGLED_PATHS)
install(FILES ${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig.cmake DESTINATION ${OPENCV_CONFIG_INSTALL_PATH}-${OPENCV_VERSION}/)
install(FILES ${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig-version.cmake DESTINATION ${OPENCV_CONFIG_INSTALL_PATH}-${OPENCV_VERSION}/)
install(EXPORT OpenCVModules DESTINATION ${OPENCV_CONFIG_INSTALL_PATH}-${OPENCV_VERSION}/ FILE OpenCVModules${modules_file_suffix}.cmake)
install(FILES ${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig.cmake DESTINATION ${OPENCV_CONFIG_INSTALL_PATH}-${OPENCV_VERSION}/ COMPONENT dev)
install(FILES ${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig-version.cmake DESTINATION ${OPENCV_CONFIG_INSTALL_PATH}-${OPENCV_VERSION}/ COMPONENT dev)
install(EXPORT OpenCVModules DESTINATION ${OPENCV_CONFIG_INSTALL_PATH}-${OPENCV_VERSION}/ FILE OpenCVModules${modules_file_suffix}.cmake COMPONENT dev)
else()
install(FILES "${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig.cmake" DESTINATION ${OPENCV_CONFIG_INSTALL_PATH}/)
install(FILES ${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig-version.cmake DESTINATION ${OPENCV_CONFIG_INSTALL_PATH}/)
install(EXPORT OpenCVModules DESTINATION ${OPENCV_CONFIG_INSTALL_PATH}/ FILE OpenCVModules${modules_file_suffix}.cmake)
install(FILES "${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig.cmake" DESTINATION ${OPENCV_CONFIG_INSTALL_PATH}/ COMPONENT dev)
install(FILES ${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig-version.cmake DESTINATION ${OPENCV_CONFIG_INSTALL_PATH}/ COMPONENT dev)
install(EXPORT OpenCVModules DESTINATION ${OPENCV_CONFIG_INSTALL_PATH}/ FILE OpenCVModules${modules_file_suffix}.cmake COMPONENT dev)
endif()
endif()
if(ANDROID)
install(FILES "${OpenCV_SOURCE_DIR}/platforms/android/android.toolchain.cmake" DESTINATION ${OPENCV_CONFIG_INSTALL_PATH}/)
install(FILES "${OpenCV_SOURCE_DIR}/platforms/android/android.toolchain.cmake" DESTINATION ${OPENCV_CONFIG_INSTALL_PATH}/ COMPONENT dev)
endif()
# --------------------------------------------------------------------------------------------
@@ -134,12 +134,12 @@ if(WIN32)
configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/OpenCVConfig.cmake.in" "${CMAKE_BINARY_DIR}/win-install/OpenCVConfig.cmake" IMMEDIATE @ONLY)
configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/OpenCVConfig-version.cmake.in" "${CMAKE_BINARY_DIR}/win-install/OpenCVConfig-version.cmake" IMMEDIATE @ONLY)
if(BUILD_SHARED_LIBS)
install(FILES "${CMAKE_BINARY_DIR}/win-install/OpenCVConfig.cmake" DESTINATION "${OpenCV_INSTALL_BINARIES_PREFIX}/lib")
install(EXPORT OpenCVModules DESTINATION "${OpenCV_INSTALL_BINARIES_PREFIX}/lib" FILE OpenCVModules${modules_file_suffix}.cmake)
install(FILES "${CMAKE_BINARY_DIR}/win-install/OpenCVConfig.cmake" DESTINATION "${OpenCV_INSTALL_BINARIES_PREFIX}lib" COMPONENT dev)
install(EXPORT OpenCVModules DESTINATION "${OpenCV_INSTALL_BINARIES_PREFIX}lib" FILE OpenCVModules${modules_file_suffix}.cmake COMPONENT dev)
else()
install(FILES "${CMAKE_BINARY_DIR}/win-install/OpenCVConfig.cmake" DESTINATION "${OpenCV_INSTALL_BINARIES_PREFIX}/staticlib")
install(EXPORT OpenCVModules DESTINATION "${OpenCV_INSTALL_BINARIES_PREFIX}/staticlib" FILE OpenCVModules${modules_file_suffix}.cmake)
install(FILES "${CMAKE_BINARY_DIR}/win-install/OpenCVConfig.cmake" DESTINATION "${OpenCV_INSTALL_BINARIES_PREFIX}staticlib" COMPONENT dev)
install(EXPORT OpenCVModules DESTINATION "${OpenCV_INSTALL_BINARIES_PREFIX}staticlib" FILE OpenCVModules${modules_file_suffix}.cmake COMPONENT dev)
endif()
install(FILES "${CMAKE_BINARY_DIR}/win-install/OpenCVConfig-version.cmake" DESTINATION "${CMAKE_INSTALL_PREFIX}")
install(FILES "${OpenCV_SOURCE_DIR}/cmake/OpenCVConfig.cmake" DESTINATION "${CMAKE_INSTALL_PREFIX}/")
install(FILES "${CMAKE_BINARY_DIR}/win-install/OpenCVConfig-version.cmake" DESTINATION "${CMAKE_INSTALL_PREFIX}" COMPONENT dev)
install(FILES "${OpenCV_SOURCE_DIR}/cmake/OpenCVConfig.cmake" DESTINATION "${CMAKE_INSTALL_PREFIX}/" COMPONENT dev)
endif()
+2 -2
Ver Arquivo
@@ -1,5 +1,5 @@
# platform-specific config file
configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/cvconfig.h.cmake" "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/cvconfig.h")
configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/cvconfig.h.in" "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/cvconfig.h")
# ----------------------------------------------------------------------------
# opencv_modules.hpp based on actual modules list
@@ -23,4 +23,4 @@ set(OPENCV_MODULE_DEFINITIONS_CONFIGMAKE "${OPENCV_MODULE_DEFINITIONS_CONFIGMAKE
#endforeach()
configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/opencv_modules.hpp.in" "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp")
install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp" DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 COMPONENT main)
install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/opencv_modules.hpp" DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 COMPONENT dev)
+4 -2
Ver Arquivo
@@ -76,8 +76,10 @@ if(INSTALL_TO_MANGLED_PATHS)
else()
set(OPENCV_PC_FILE_NAME opencv.pc)
endif()
configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/opencv-XXX.pc.cmake.in" "${CMAKE_BINARY_DIR}/unix-install/${OPENCV_PC_FILE_NAME}" @ONLY IMMEDIATE)
configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/opencv-XXX.pc.in"
"${CMAKE_BINARY_DIR}/unix-install/${OPENCV_PC_FILE_NAME}"
@ONLY IMMEDIATE)
if(UNIX AND NOT ANDROID)
install(FILES ${CMAKE_BINARY_DIR}/unix-install/${OPENCV_PC_FILE_NAME} DESTINATION ${OPENCV_LIB_INSTALL_PATH}/pkgconfig)
install(FILES ${CMAKE_BINARY_DIR}/unix-install/${OPENCV_PC_FILE_NAME} DESTINATION ${OPENCV_LIB_INSTALL_PATH}/pkgconfig COMPONENT dev)
endif()
+15 -11
Ver Arquivo
@@ -488,7 +488,7 @@ macro(ocv_glob_module_sources)
file(GLOB lib_cuda_srcs "src/cuda/*.cu")
set(cuda_objs "")
set(lib_cuda_hdrs "")
if(HAVE_CUDA AND lib_cuda_srcs)
if(HAVE_CUDA)
ocv_include_directories(${CUDA_INCLUDE_DIRS})
file(GLOB lib_cuda_hdrs "src/cuda/*.hpp")
@@ -537,9 +537,6 @@ macro(ocv_create_module)
target_link_libraries(${the_module} ${OPENCV_MODULE_${the_module}_DEPS})
target_link_libraries(${the_module} LINK_INTERFACE_LIBRARIES ${OPENCV_MODULE_${the_module}_DEPS})
target_link_libraries(${the_module} ${OPENCV_MODULE_${the_module}_DEPS_EXT} ${OPENCV_LINKER_LIBS} ${IPP_LIBS} ${ARGN})
if (HAVE_CUDA)
target_link_libraries(${the_module} ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY})
endif()
endif()
add_dependencies(opencv_modules ${the_module})
@@ -580,9 +577,9 @@ macro(ocv_create_module)
endif()
ocv_install_target(${the_module} EXPORT OpenCVModules
RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT main
LIBRARY DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT main
ARCHIVE DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT main
RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT libs
LIBRARY DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT libs
ARCHIVE DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT dev
)
# only "public" headers need to be installed
@@ -590,7 +587,7 @@ macro(ocv_create_module)
foreach(hdr ${OPENCV_MODULE_${the_module}_HEADERS})
string(REGEX REPLACE "^.*opencv2/" "opencv2/" hdr2 "${hdr}")
if(hdr2 MATCHES "^(opencv2/.*)/[^/]+.h(..)?$")
install(FILES ${hdr} DESTINATION "${OPENCV_INCLUDE_INSTALL_PATH}/${CMAKE_MATCH_1}" COMPONENT main)
install(FILES ${hdr} DESTINATION "${OPENCV_INCLUDE_INSTALL_PATH}/${CMAKE_MATCH_1}" COMPONENT dev)
endif()
endforeach()
endif()
@@ -714,6 +711,9 @@ function(ocv_add_perf_tests)
else(OCV_DEPENDENCIES_FOUND)
# TODO: warn about unsatisfied dependencies
endif(OCV_DEPENDENCIES_FOUND)
if(INSTALL_TESTS)
install(TARGETS ${the_target} RUNTIME DESTINATION ${OPENCV_TEST_INSTALL_PATH} COMPONENT tests)
endif()
endif()
endfunction()
@@ -767,6 +767,10 @@ function(ocv_add_accuracy_tests)
else(OCV_DEPENDENCIES_FOUND)
# TODO: warn about unsatisfied dependencies
endif(OCV_DEPENDENCIES_FOUND)
if(INSTALL_TESTS)
install(TARGETS ${the_target} RUNTIME DESTINATION ${OPENCV_TEST_INSTALL_PATH} COMPONENT tests)
endif()
endif()
endfunction()
@@ -798,7 +802,7 @@ function(ocv_add_samples)
endif()
if(WIN32)
install(TARGETS ${the_target} RUNTIME DESTINATION "samples/${module_id}" COMPONENT main)
install(TARGETS ${the_target} RUNTIME DESTINATION "samples/${module_id}" COMPONENT samples)
endif()
endforeach()
endif()
@@ -807,8 +811,8 @@ function(ocv_add_samples)
if(INSTALL_C_EXAMPLES AND NOT WIN32 AND EXISTS "${samples_path}")
file(GLOB sample_files "${samples_path}/*")
install(FILES ${sample_files}
DESTINATION share/OpenCV/samples/${module_id}
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ)
DESTINATION ${OPENCV_SAMPLES_SRC_INSTALL_PATH}/${module_id}
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ COMPONENT samples)
endif()
endfunction()
+110
Ver Arquivo
@@ -0,0 +1,110 @@
if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
set(CPACK_set_DESTDIR "on")
if(NOT OPENCV_CUSTOM_PACKAGE_INFO)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Open Computer Vision Library")
set(CPACK_PACKAGE_DESCRIPTION
"OpenCV (Open Source Computer Vision Library) is an open source computer vision
and machine learning software library. OpenCV was built to provide a common
infrastructure for computer vision applications and to accelerate the use of
machine perception in the commercial products. Being a BSD-licensed product,
OpenCV makes it easy for businesses to utilize and modify the code.")
set(CPACK_PACKAGE_VENDOR "OpenCV Foundation")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
set(CPACK_PACKAGE_CONTACT "admin@opencv.org")
set(CPACK_PACKAGE_VERSION_MAJOR "${OPENCV_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${OPENCV_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${OPENCV_VERSION_PATCH}")
set(CPACK_PACKAGE_VERSION "${OPENCV_VCSVERSION}")
endif(NOT OPENCV_CUSTOM_PACKAGE_INFO)
#arch
if(X86)
set(CPACK_DEBIAN_ARCHITECTURE "i386")
set(CPACK_RPM_PACKAGE_ARCHITECTURE "i686")
elseif(X86_64)
set(CPACK_DEBIAN_ARCHITECTURE "amd64")
set(CPACK_RPM_PACKAGE_ARCHITECTURE "x86_64")
elseif(ARM)
set(CPACK_DEBIAN_ARCHITECTURE "armhf")
set(CPACK_RPM_PACKAGE_ARCHITECTURE "armhf")
else()
set(CPACK_DEBIAN_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})
set(CPACK_RPM_PACKAGE_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})
endif()
if(CPACK_GENERATOR STREQUAL "DEB")
set(OPENCV_PACKAGE_ARCH_SUFFIX ${CPACK_DEBIAN_ARCHITECTURE})
elseif(CPACK_GENERATOR STREQUAL "RPM")
set(OPENCV_PACKAGE_ARCH_SUFFIX ${CPACK_RPM_PACKAGE_ARCHITECTURE})
else()
set(OPENCV_PACKAGE_ARCH_SUFFIX ${CMAKE_SYSTEM_PROCESSOR})
endif()
set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${OPENCV_VCSVERSION}-${OPENCV_PACKAGE_ARCH_SUFFIX}")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${OPENCV_VCSVERSION}-${OPENCV_PACKAGE_ARCH_SUFFIX}")
#rpm options
set(CPACK_RPM_COMPONENT_INSTALL TRUE)
set(CPACK_RPM_PACKAGE_SUMMARY ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
set(CPACK_RPM_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION})
set(CPACK_RPM_PACKAGE_URL "http://opencv.org")
set(CPACK_RPM_PACKAGE_LICENSE "BSD")
#deb options
set(CPACK_DEB_COMPONENT_INSTALL TRUE)
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
set(CPACK_DEBIAN_PACKAGE_SECTION "libs")
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://opencv.org")
#depencencies
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS TRUE)
set(CPACK_COMPONENT_samples_DEPENDS libs)
set(CPACK_COMPONENT_dev_DEPENDS libs)
set(CPACK_COMPONENT_docs_DEPENDS libs)
set(CPACK_COMPONENT_java_DEPENDS libs)
set(CPACK_COMPONENT_python_DEPENDS libs)
set(CPACK_COMPONENT_tests_DEPENDS libs)
if(HAVE_CUDA)
string(REPLACE "." "-" cuda_version_suffix ${CUDA_VERSION})
set(CPACK_DEB_libs_PACKAGE_DEPENDS "cuda-core-libs-${cuda_version_suffix}, cuda-extra-libs-${cuda_version_suffix}")
set(CPACK_COMPONENT_dev_DEPENDS libs)
set(CPACK_DEB_dev_PACKAGE_DEPENDS "cuda-headers-${cuda_version_suffix}")
endif()
if(NOT OPENCV_CUSTOM_PACKAGE_INFO)
set(CPACK_COMPONENT_libs_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}")
set(CPACK_COMPONENT_libs_DESCRIPTION "Open Computer Vision Library")
set(CPACK_COMPONENT_python_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-python")
set(CPACK_COMPONENT_python_DESCRIPTION "Python bindings for Open Source Computer Vision Library")
set(CPACK_COMPONENT_java_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-java")
set(CPACK_COMPONENT_java_DESCRIPTION "Java bindings for Open Source Computer Vision Library")
set(CPACK_COMPONENT_dev_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-dev")
set(CPACK_COMPONENT_dev_DESCRIPTION "Development files for Open Source Computer Vision Library")
set(CPACK_COMPONENT_docs_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-docs")
set(CPACK_COMPONENT_docs_DESCRIPTION "Documentation for Open Source Computer Vision Library")
set(CPACK_COMPONENT_samples_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-samples")
set(CPACK_COMPONENT_samples_DESCRIPTION "Samples for Open Source Computer Vision Library")
set(CPACK_COMPONENT_tests_DISPLAY_NAME "lib${CMAKE_PROJECT_NAME}-tests")
set(CPACK_COMPONENT_tests_DESCRIPTION "Accuracy and performance tests for Open Source Computer Vision Library")
endif(NOT OPENCV_CUSTOM_PACKAGE_INFO)
if(NOT OPENCV_CUSTOM_PACKAGE_LAYOUT)
set(CPACK_libs_COMPONENT_INSTALL TRUE)
set(CPACK_dev_COMPONENT_INSTALL TRUE)
set(CPACK_docs_COMPONENT_INSTALL TRUE)
set(CPACK_python_COMPONENT_INSTALL TRUE)
set(CPACK_java_COMPONENT_INSTALL TRUE)
set(CPACK_samples_COMPONENT_INSTALL TRUE)
endif(NOT OPENCV_CUSTOM_PACKAGE_LAYOUT)
include(CPack)
ENDif(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
+32
Ver Arquivo
@@ -13,6 +13,19 @@ OPENCV_BASEDIR:=@OPENCV_BASE_INCLUDE_DIR_CONFIGCMAKE@
OPENCV_LOCAL_C_INCLUDES:=@OPENCV_INCLUDE_DIRS_CONFIGCMAKE@
OPENCV_MODULES:=@OPENCV_MODULES_CONFIGMAKE@
OPENCV_HAVE_GPU_MODULE=@OPENCV_HAVE_GPU_MODULE_CONFIGMAKE@
OPENCV_USE_GPU_MODULE:=
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
ifeq ($(OPENCV_HAVE_GPU_MODULE),on)
ifneq ($(CUDA_TOOLKIT_DIR),)
OPENCV_USE_GPU_MODULE:=on
endif
endif
endif
CUDA_RUNTIME_LIBS:=cufft npps nppi nppc cudart
ifeq ($(OPENCV_LIB_TYPE),)
OPENCV_LIB_TYPE:=@OPENCV_LIBTYPE_CONFIGMAKE@
endif
@@ -102,12 +115,22 @@ ifeq ($(OPENCV_MK_$(OPENCV_TARGET_ARCH_ABI)_ALREADY_INCLUDED),)
ifneq ($(OPENCV_BASEDIR),)
OPENCV_LOCAL_C_INCLUDES += $(foreach mod, $(OPENCV_MODULES), $(OPENCV_BASEDIR)/modules/$(mod)/include)
ifeq ($(OPENCV_USE_GPU_MODULE),on)
OPENCV_LOCAL_C_INCLUDES += $(OPENCV_BASEDIR)/modules/gpu/include
endif
endif
#turn off module installation to prevent their redefinition
OPENCV_MK_$(OPENCV_TARGET_ARCH_ABI)_ALREADY_INCLUDED:=on
endif
ifeq ($(OPENCV_USE_GPU_MODULE),on)
include $(CLEAR_VARS)
LOCAL_MODULE:=opencv_gpu
LOCAL_SRC_FILES:=$(OPENCV_LIBS_DIR)/libopencv_gpu.a
include $(PREBUILT_STATIC_LIBRARY)
endif
ifeq ($(OPENCV_LOCAL_CFLAGS),)
OPENCV_LOCAL_CFLAGS := -fPIC -DANDROID -fsigned-char
endif
@@ -116,6 +139,10 @@ include $(CLEAR_VARS)
LOCAL_C_INCLUDES += $(OPENCV_LOCAL_C_INCLUDES)
LOCAL_CFLAGS += $(OPENCV_LOCAL_CFLAGS)
ifeq ($(OPENCV_USE_GPU_MODULE),on)
LOCAL_C_INCLUDES += $(CUDA_TOOLKIT_DIR)/include
endif
ifeq ($(OPENCV_INSTALL_MODULES),on)
LOCAL_$(OPENCV_LIB_TYPE)_LIBRARIES += $(foreach mod, $(OPENCV_LIBS), opencv_$(mod))
else
@@ -128,5 +155,10 @@ endif
LOCAL_LDLIBS += $(foreach lib,$(OPENCV_EXTRA_COMPONENTS), -l$(lib))
ifeq ($(OPENCV_USE_GPU_MODULE),on)
LOCAL_STATIC_LIBRARIES+=libopencv_gpu
LOCAL_LDLIBS += -L$(CUDA_TOOLKIT_DIR)/lib $(foreach lib, $(CUDA_RUNTIME_LIBS), -l$(lib))
endif
#restore the LOCAL_PATH
LOCAL_PATH:=$(USER_LOCAL_PATH)
+7 -3
Ver Arquivo
@@ -41,7 +41,9 @@ if(ANDROID)
string(REPLACE - _ modules_file_suffix "_${ANDROID_NDK_ABI_NAME}")
endif()
include(${CMAKE_CURRENT_LIST_DIR}/OpenCVModules${modules_file_suffix}.cmake)
if(NOT TARGET opencv_core)
include(${CMAKE_CURRENT_LIST_DIR}/OpenCVModules${modules_file_suffix}.cmake)
endif()
# TODO All things below should be reviewed. What is about of moving this code into related modules (special vars/hooks/files)
@@ -179,6 +181,10 @@ foreach(__cvcomponent ${OpenCV_FIND_COMPONENTS})
set(${__cvcomponent}_FOUND "${__cvcomponent}_FOUND-NOTFOUND")
else()
list(APPEND OpenCV_FIND_COMPONENTS_ ${__cvcomponent})
# Not using list(APPEND) here, because OpenCV_LIBS may not exist yet.
# Also not clearing OpenCV_LIBS anywhere, so that multiple calls
# to find_package(OpenCV) with different component lists add up.
set(OpenCV_LIBS ${OpenCV_LIBS} "${__cvcomponent}")
#indicate that module is found
string(TOUPPER "${__cvcomponent}" __cvcomponent)
set(${__cvcomponent}_FOUND 1)
@@ -195,8 +201,6 @@ else()
set(OpenCV_LIB_SUFFIX "")
endif()
SET(OpenCV_LIBS "${OpenCV_LIB_COMPONENTS}")
foreach(__opttype OPT DBG)
SET(OpenCV_LIBS_${__opttype} "${OpenCV_LIBS}")
SET(OpenCV_EXTRA_LIBS_${__opttype} "")
@@ -85,6 +85,9 @@
/* Apple ImageIO Framework */
#cmakedefine HAVE_IMAGEIO
/* Intel Perceptual Computing SDK library */
#cmakedefine HAVE_INTELPERC
/* Intel Integrated Performance Primitives */
#cmakedefine HAVE_IPP
+24
Ver Arquivo
@@ -0,0 +1,24 @@
#!/bin/sh
OPENCV_TEST_PATH=@OPENCV_TEST_INSTALL_PATH@
export OPENCV_TEST_DATA_PATH=@CMAKE_INSTALL_PREFIX@/share/OpenCV/testdata
SUMMARY_STATUS=0
for t in "$OPENCV_TEST_PATH/"opencv_test_* "$OPENCV_TEST_PATH/"opencv_perf_*;
do
"$t" --perf_min_samples=1 --perf_force_samples=1 --gtest_output=xml:$t-`date --rfc-3339=date`.xml
TEST_STATUS=$?
if [ $TEST_STATUS -ne 0 ]; then
SUMMARY_STATUS=$TEST_STATUS
fi
done
rm -f /tmp/__opencv_temp.*
if [ $SUMMARY_STATUS -eq 0 ]; then
echo "All OpenCV tests finished successfully"
else
echo "OpenCV tests finished with status $SUMMARY_STATUS"
fi
return $SUMMARY_STATUS
+2
Ver Arquivo
@@ -0,0 +1,2 @@
# Environment setup for OpenCV testing
export OPENCV_TEST_DATA_PATH=@CMAKE_INSTALL_PREFIX@/share/OpenCV/testdata
+12 -4
Ver Arquivo
@@ -2,9 +2,17 @@ file(GLOB HAAR_CASCADES haarcascades/*.xml)
file(GLOB LBP_CASCADES lbpcascades/*.xml)
if(ANDROID)
install(FILES ${HAAR_CASCADES} DESTINATION sdk/etc/haarcascades COMPONENT main)
install(FILES ${LBP_CASCADES} DESTINATION sdk/etc/lbpcascades COMPONENT main)
install(FILES ${HAAR_CASCADES} DESTINATION sdk/etc/haarcascades COMPONENT libs)
install(FILES ${LBP_CASCADES} DESTINATION sdk/etc/lbpcascades COMPONENT libs)
elseif(NOT WIN32)
install(FILES ${HAAR_CASCADES} DESTINATION share/OpenCV/haarcascades COMPONENT main)
install(FILES ${LBP_CASCADES} DESTINATION share/OpenCV/lbpcascades COMPONENT main)
install(FILES ${HAAR_CASCADES} DESTINATION share/OpenCV/haarcascades COMPONENT libs)
install(FILES ${LBP_CASCADES} DESTINATION share/OpenCV/lbpcascades COMPONENT libs)
endif()
if(INSTALL_TESTS AND OPENCV_TEST_DATA_PATH)
if(ANDROID)
install(DIRECTORY ${OPENCV_TEST_DATA_PATH} DESTINATION sdk/etc/testdata COMPONENT tests)
elseif(NOT WIN32)
install(DIRECTORY ${OPENCV_TEST_DATA_PATH} DESTINATION share/OpenCV/testdata COMPONENT tests)
endif()
endif()
+64 -42
Ver Arquivo
@@ -2,9 +2,6 @@
# CMake file for OpenCV docs
#
file(GLOB FILES_TEX *.tex *.sty *.bib)
file(GLOB FILES_TEX_PICS pics/*.png pics/*.jpg)
if(BUILD_DOCS AND HAVE_SPHINX)
project(opencv_docs)
@@ -23,59 +20,84 @@ if(BUILD_DOCS AND HAVE_SPHINX)
set(OPTIONAL_DOC_LIST "")
set(OPENCV2_BASE_MODULES core imgproc highgui video calib3d features2d objdetect ml flann gpu photo stitching nonfree contrib legacy)
# build lists of modules to be documented
set(OPENCV2_MODULES "")
set(OPENCV_MODULES "")
set(BASE_MODULES "")
set(EXTRA_MODULES "")
foreach(mod ${OPENCV_MODULES_BUILD} ${OPENCV_MODULES_DISABLED_USER} ${OPENCV_MODULES_DISABLED_AUTO} ${OPENCV_MODULES_DISABLED_FORCE})
string(REGEX REPLACE "^opencv_" "" mod "${mod}")
if("${OPENCV_MODULE_opencv_${mod}_LOCATION}" STREQUAL "${OpenCV_SOURCE_DIR}/modules/${mod}")
list(APPEND OPENCV2_MODULES ${mod})
list(APPEND BASE_MODULES ${mod})
else()
list(APPEND OPENCV_MODULES ${mod})
list(APPEND EXTRA_MODULES ${mod})
endif()
endforeach()
list(REMOVE_ITEM OPENCV2_MODULES ${OPENCV2_BASE_MODULES})
ocv_list_sort(OPENCV2_MODULES)
ocv_list_sort(OPENCV_MODULES)
set(FIXED_ORDER_MODULES core imgproc highgui video calib3d features2d objdetect ml flann gpu photo stitching nonfree contrib legacy)
list(REMOVE_ITEM BASE_MODULES ${FIXED_ORDER_MODULES})
ocv_list_sort(BASE_MODULES)
ocv_list_sort(EXTRA_MODULES)
set(BASE_MODULES ${FIXED_ORDER_MODULES} ${BASE_MODULES})
# build lists of documentation files and generate table of contents for reference manual
set(OPENCV_FILES_REF "")
set(OPENCV_FILES_REF_PICT "")
set(DOC_FAKE_ROOT "${CMAKE_CURRENT_BINARY_DIR}/fake-root")
set(DOC_FAKE_ROOT_FILES "")
function(ocv_doc_add_file_to_fake_root source destination)
add_custom_command(
OUTPUT "${DOC_FAKE_ROOT}/${destination}"
COMMAND "${CMAKE_COMMAND}" -E copy "${source}" "${DOC_FAKE_ROOT}/${destination}"
DEPENDS "${source}"
COMMENT "Copying ${destination} to fake root..."
VERBATIM
)
list(APPEND DOC_FAKE_ROOT_FILES "${DOC_FAKE_ROOT}/${destination}")
set(DOC_FAKE_ROOT_FILES "${DOC_FAKE_ROOT_FILES}" PARENT_SCOPE)
endfunction()
function(ocv_doc_add_to_fake_root source)
if(ARGC GREATER 1)
set(destination "${ARGV1}")
else()
file(RELATIVE_PATH destination "${OpenCV_SOURCE_DIR}" "${source}")
endif()
if(IS_DIRECTORY "${source}")
file(GLOB_RECURSE files RELATIVE "${source}" "${source}/*")
foreach(file ${files})
ocv_doc_add_file_to_fake_root("${source}/${file}" "${destination}/${file}")
endforeach()
else()
ocv_doc_add_file_to_fake_root("${source}" "${destination}")
endif()
set(DOC_FAKE_ROOT_FILES "${DOC_FAKE_ROOT_FILES}" PARENT_SCOPE)
endfunction()
set(OPENCV_REFMAN_TOC "")
foreach(mod ${OPENCV2_BASE_MODULES} ${OPENCV2_MODULES} ${OPENCV_MODULES})
file(GLOB_RECURSE _OPENCV_FILES_REF "${OPENCV_MODULE_opencv_${mod}_LOCATION}/doc/*.rst")
file(GLOB_RECURSE _OPENCV_FILES_REF_PICT "${OPENCV_MODULE_opencv_${mod}_LOCATION}/doc/*.png" "${OPENCV_MODULE_opencv_${mod}_LOCATION}/doc/*.jpg")
list(APPEND OPENCV_FILES_REF ${_OPENCV_FILES_REF})
list(APPEND OPENCV_FILES_REF_PICT ${_OPENCV_FILES_REF_PICT})
set(toc_file "${OPENCV_MODULE_opencv_${mod}_LOCATION}/doc/${mod}.rst")
if(EXISTS "${toc_file}")
file(RELATIVE_PATH toc_file "${OpenCV_SOURCE_DIR}/modules" "${toc_file}")
set(OPENCV_REFMAN_TOC "${OPENCV_REFMAN_TOC} ${toc_file}\n")
foreach(mod ${BASE_MODULES} ${EXTRA_MODULES})
if(EXISTS "${OPENCV_MODULE_opencv_${mod}_LOCATION}/doc/${mod}.rst")
ocv_doc_add_to_fake_root("${OPENCV_MODULE_opencv_${mod}_LOCATION}/doc" modules/${mod}/doc)
set(OPENCV_REFMAN_TOC "${OPENCV_REFMAN_TOC} ${mod}/doc/${mod}.rst\n")
endif()
endforeach()
file(GLOB_RECURSE _OPENCV_FILES_REF "${OpenCV_SOURCE_DIR}/platforms/android/service/doc/*.rst")
file(GLOB_RECURSE _OPENCV_FILES_REF_PICT "${OpenCV_SOURCE_DIR}/platforms/android/service/doc/*.png" "${OpenCV_SOURCE_DIR}/platforms/android/service/doc/*.jpg")
list(APPEND OPENCV_FILES_REF ${_OPENCV_FILES_REF})
list(APPEND OPENCV_FILES_REF_PICT ${_OPENCV_FILES_REF_PICT})
configure_file("${OpenCV_SOURCE_DIR}/modules/refman.rst.in" "${DOC_FAKE_ROOT}/modules/refman.rst" @ONLY)
configure_file("${OpenCV_SOURCE_DIR}/modules/refman.rst.in" "${OpenCV_SOURCE_DIR}/modules/refman.rst" IMMEDIATE @ONLY)
file(GLOB_RECURSE OPENCV_FILES_UG user_guide/*.rst)
file(GLOB_RECURSE OPENCV_FILES_TUT tutorials/*.rst)
file(GLOB_RECURSE OPENCV_FILES_TUT_PICT tutorials/*.png tutorials/*.jpg)
set(OPENCV_DOC_DEPS conf.py ${OPENCV_FILES_REF} ${OPENCV_FILES_REF_PICT}
${OPENCV_FILES_UG} ${OPENCV_FILES_TUT} ${OPENCV_FILES_TUT_PICT})
ocv_doc_add_to_fake_root("${OpenCV_SOURCE_DIR}/index.rst")
ocv_doc_add_to_fake_root("${OpenCV_SOURCE_DIR}/doc")
ocv_doc_add_to_fake_root("${OpenCV_SOURCE_DIR}/platforms/android")
ocv_doc_add_to_fake_root("${OpenCV_SOURCE_DIR}/samples")
if(PDFLATEX_COMPILER)
add_custom_target(docs
COMMAND ${SPHINX_BUILD} -b latex -c ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/.. .
COMMAND ${SPHINX_BUILD} -b latex -c "${CMAKE_CURRENT_SOURCE_DIR}" "${DOC_FAKE_ROOT}" .
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/pics ${CMAKE_CURRENT_BINARY_DIR}/doc/opencv1/pics
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/mymath.sty ${CMAKE_CURRENT_BINARY_DIR}
COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/patch_refman_latex.py" opencv2refman.tex
@@ -95,7 +117,7 @@ if(BUILD_DOCS AND HAVE_SPHINX)
COMMAND ${CMAKE_COMMAND} -E echo "Generating opencv_cheatsheet.pdf"
COMMAND ${PDFLATEX_COMPILER} -interaction=batchmode "${CMAKE_CURRENT_SOURCE_DIR}/opencv_cheatsheet.tex"
COMMAND ${PDFLATEX_COMPILER} -interaction=batchmode "${CMAKE_CURRENT_SOURCE_DIR}/opencv_cheatsheet.tex"
DEPENDS ${OPENCV_DOC_DEPS}
DEPENDS ${DOC_FAKE_ROOT_FILES}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating the PDF Manuals"
)
@@ -109,9 +131,9 @@ if(BUILD_DOCS AND HAVE_SPHINX)
endif()
add_custom_target(html_docs
COMMAND ${SPHINX_BUILD} -b html -c ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/.. ./_html
COMMAND "${SPHINX_BUILD}" -b html -c "${CMAKE_CURRENT_SOURCE_DIR}" "${DOC_FAKE_ROOT}" ./_html
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/mymath.sty ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${OPENCV_DOC_DEPS}
DEPENDS ${DOC_FAKE_ROOT_FILES}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating Online Documentation"
)
@@ -121,11 +143,11 @@ if(BUILD_DOCS AND HAVE_SPHINX)
endif()
foreach(f ${DOC_LIST})
install(FILES "${f}" DESTINATION "${OPENCV_DOC_INSTALL_PATH}" COMPONENT main)
install(FILES "${f}" DESTINATION "${OPENCV_DOC_INSTALL_PATH}" COMPONENT docs)
endforeach()
foreach(f ${OPTIONAL_DOC_LIST})
install(FILES "${f}" DESTINATION "${OPENCV_DOC_INSTALL_PATH}" OPTIONAL)
install(FILES "${f}" DESTINATION "${OPENCV_DOC_INSTALL_PATH}" OPTIONAL COMPONENT docs)
endforeach()
endif()

Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais