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

Compare commits

...

1166 Commits

Author SHA1 Message Date
Alexander Alekhin 59975db6a4 Merge pull request #6441 from asmorkalov:version++ 2016-04-20 14:21:19 +00:00
Alexander Alekhin ec2ff7f0c0 Merge branch '2.4.12.x-prep' into 2.4 2016-04-20 16:26:12 +03:00
Alexander Alekhin 5d038686b1 Merge pull request #6401 from StevenPuttemans:add_model_visualisation_tool_2.4 2016-04-20 13:24:25 +00:00
Alexander Smorkalov 6084901610 OpenCV version++. 2016-04-20 16:03:47 +03:00
Alexander Alekhin e58c28974b Merge pull request #6431 from StevenPuttemans:add_fixed_video_2.4 2016-04-19 14:19:41 +00:00
Alexander Alekhin 1b4bd6a905 Merge pull request #6432 from kevin-coder:bugfix_6317_Restore_2.4 2016-04-19 13:32:44 +00:00
StevenPuttemans 67fe57a0a3 add fixed video 2016-04-19 15:30:49 +02:00
Kevin, Hu db0ae2ca50 Restore 2.4 source branch for bug fix 6317. 2016-04-19 19:27:42 +08:00
Alexander Alekhin de164b0ccf Merge pull request #6421 from alalek:backport_6417 2016-04-18 15:12:17 +00:00
Suleyman TURKMEN 194f1beae8 fix for writing 16-bit jpeg2000 2016-04-18 14:51:55 +03:00
Maksim Shabunin 3bd6912e01 Merge pull request #6415 from mshabunin:fix-xcode-warnings-24 2016-04-16 06:39:00 +00:00
Maksim Shabunin 1a41ed2fda Updates for XCode 7.3 2016-04-15 21:56:50 +03:00
StevenPuttemans 9d71c19939 add visualisation tool for 2.4 branch 2016-04-14 11:33:37 +02:00
Alexander Alekhin 5b73f3a316 Merge pull request #6373 from terfendail:vt/stereobm_valgrind 2016-04-13 13:38:53 +00:00
Maksim Shabunin 96d747f030 Merge pull request #6384 from StevenPuttemans:update_annotation_tool_2.4 2016-04-13 10:02:56 +00:00
StevenPuttemans 5164c4ba31 vectorize process + enable early quitting/storage + enable delete annotation option 2016-04-13 09:10:24 +02:00
Vitaly Tuzov 13858cd561 Cost estimation boundaries description updated 2016-04-12 17:31:12 +03:00
Vitaly Tuzov 772d9689e9 Backport of StereoBM uninitialized memory access problem fix from master branch 2016-04-12 17:27:16 +03:00
Maksim Shabunin ff3bb9f4e6 Merge pull request #6383 from alalek:backport_6381 2016-04-12 08:40:01 +00:00
Maksim Shabunin e90b697cb0 Merge pull request #6386 from mshabunin:fix-python-test-issue 2016-04-12 08:29:44 +00:00
Maksim Shabunin 70bc268c1a Fixed problem with nonfree python test: could not find local test images 2016-04-11 18:45:14 +03:00
Philipp Hasper b6d8c9d990 operator<< handles keys starting with underscore 2016-04-11 12:43:58 +03:00
Vitaly Tuzov a7ce9a176b Fixed uninitialized memory errors in stereoBM 2016-04-07 23:58:17 +03:00
Alexander Alekhin 52ba3778e3 Merge pull request #6363 from alalek:ffmpeg_fix_timeout_24 2016-04-05 16:29:15 +00:00
Alexander Alekhin c7b6353a3c Merge pull request #6365 from terfendail:vt/nonlocal_testdata 2016-04-05 15:25:15 +00:00
Vitaly Tuzov 34b3d31f54 Fix for nonlocal data requirement in test2.py 2016-04-05 16:47:29 +03:00
Alexander Alekhin 6f139b4f8e ffmpeg: interrupt callback fix
backport from master
2016-04-05 14:19:44 +03:00
Alexander Alekhin 86a725933a Merge pull request #6343 from terfendail:vt/python_rng_seed_backport 2016-03-29 16:06:27 +00:00
Vitaly Tuzov 64f02aa72d Backport of setRNGSeed implementation and python test randomness fix 2016-03-29 18:05:28 +03:00
Alexander Alekhin 12a8f5486d Merge pull request #6341 from SpecLad:destroy-leak 2016-03-29 12:36:51 +00:00
Roman Donchenko 97ac59cb73 Fix a memory leak indirectly caused by cvDestroyWindow 2016-03-29 14:06:05 +03:00
Alexander Smorkalov 762965897a Merge pull request #6320 from terfendail:vt/pytestarm64 2016-03-24 17:16:52 +00:00
Vitaly Tuzov ea3746bd15 Made texture flow python test less strict to fix it on AARCH64 2016-03-23 20:07:42 +03:00
Alexander Smorkalov ef2a376baf Merge pull request #6297 from terfendail:vt/pytestarm 2016-03-21 15:01:04 +00:00
Maksim Shabunin dc8bb23a7d Merge pull request #6287 from StevenPuttemans:add_num_features_info_2.4 2016-03-21 14:09:21 +00:00
Vitaly Tuzov 24361733e4 Fixed face detection python test 2016-03-18 17:44:45 +03:00
StevenPuttemans b5fbb2b1c8 add cascade classifier info - total number of unique features passed to boosting process 2016-03-17 13:33:11 +01:00
Alexander Smorkalov b8ce65bec8 Merge pull request #6279 from terfendail:vt/pythontest_data 2016-03-17 12:27:12 +00:00
Vitaly Tuzov 96903dc4ad Test data necessary for python samples added to test package.
Test launch script updated to run new tests as well.
2016-03-17 11:38:40 +03:00
Alexander Smorkalov da669569e1 Merge pull request #6281 from SpecLad:videowriter-oob 2016-03-17 08:09:13 +00:00
Roman Donchenko eb40afa26a Add a workaround for FFmpeg's color conversion accessing past the end of the buffer
I delete the LIBAVFORMAT_BUILD < 5231 branch, because I couldn't even find FFmpeg with
such a small build number, let alone test with it.
2016-03-16 20:04:33 +03:00
Roman Donchenko 421fcf9e35 Rearrange CvVideoWriter_FFMPEG::writeFrame for better readability 2016-03-16 16:28:59 +03:00
Alexander Smorkalov d142c05d61 Merge pull request #6276 from SpecLad:bp-3813 2016-03-16 11:41:27 +00:00
Roman Donchenko 9a5d7f1a0b Backport PR #3813 to 2.4
It has already been partially backported by #6199; this commit completes
the backport.
2016-03-16 12:34:41 +03:00
Alexander Alekhin 9d49cef29e Merge pull request #6245 from delftswa2016:fix-for-issue-4375 2016-03-14 11:26:33 +00:00
shruthikashyap 1fbc6ab05d Adding the syntax and usage for cv2.undistortPoints(). 2016-03-13 13:32:24 +01:00
Vadim Pisarevsky 93c4dfb16d Merge pull request #6236 from alalek:backport_6232 2016-03-12 16:38:56 +00:00
Alexander Alekhin 52b9207105 Merge pull request #6237 from mshabunin:fix-vtk-on-2.4 2016-03-11 14:20:16 +00:00
Maksim Shabunin d2e451e877 Ported VTK cmake detection from master branch 2016-03-11 16:25:47 +03:00
Piotr Semenov 00e91fd3d0 Fix that corrects the OpenCV's random access iterator distance: d(x,y) = -d(y,x) 2016-03-11 15:20:36 +03:00
Alexander Alekhin afc62f076a Merge pull request #6234 from asmorkalov:as/deb_version_check 2016-03-11 10:06:25 +00:00
Alexander Smorkalov 9c4204b89e Added check if debian package version matches version from version.hpp 2016-03-11 11:59:15 +03:00
Maksim Shabunin 3afb5a6006 Merge pull request #6171 from terfendail:vt/new_python_tests_backport 2016-03-10 09:09:32 +00:00
Maksim Shabunin 7e44faf635 Merge pull request #6228 from wangguoqin1001:2.4 2016-03-10 08:10:19 +00:00
WANG Guoqin 8cfc87cf01 MacOSX / QTKit capture: trying to fix invalid timer call 2016-03-10 02:49:10 +08:00
Alexander Alekhin ea049e147d Merge pull request #6199 from alalek:ffmpeg_backport 2016-03-03 17:25:33 +00:00
Alexander Alekhin 60f73eee7e Merge pull request #6204 from alalek:minor_fix_break 2016-03-03 12:07:16 +00:00
Alexander Alekhin c1f3c41bab apps: add missed 'break' 2016-03-03 14:23:59 +03:00
Vitaly Tuzov d29eb2938c Calibration test temporary disabled 2016-03-03 13:38:08 +03:00
Alexander Alekhin a61b19b524 backport ffmpeg fixes 2016-03-02 18:42:53 +03:00
Vitaly Tuzov 25b4d8a1b5 Added images necessary for tests 2016-02-26 12:42:35 +03:00
Vitaly Tuzov aaa30dc5b6 Make some tests less strict due to improvement of related algorithms in master branch 2016-02-26 12:42:35 +03:00
Vitaly Tuzov e0f426f78b Backport of new python tests from master branch(PR https://github.com/Itseez/opencv/pull/6025).
At the moment tests requre samples/data copied to source location from master branch.
2016-02-26 12:42:18 +03:00
Alexander Alekhin 8a09d95eab Merge pull request #6106 from ilya-lavrenov:compilation-warning 2016-02-15 15:12:49 +00:00
Ilya Lavrenov 068769263e fixed compilation warning 2016-02-12 18:12:20 +03:00
Maksim Shabunin 21e9edd1a3 Merge pull request #6083 from alekcac:alekcac-removed-gittip-link-in-2.4 2016-02-08 15:32:41 +00:00
Alexander Shishkov 544824ffc1 Removed gittip link
This project is dead from the 1st September last year
2016-02-08 11:07:58 +03:00
Alexander Alekhin d6e2097435 Merge pull request #6037 from atinfinity:pullreq/160130-enable-nvcuvid-2.4 2016-02-02 07:09:20 +00:00
atinfinity cf43790a27 added cmakedefine to cmake/templates/cvconfig.h.in 2016-02-01 21:15:28 +09:00
atinfinity 69eaa89e22 fixed to use NVCUVID in 'cudacodec' module. 2016-01-31 01:56:45 +09:00
Alexander Alekhin e835878661 Merge pull request #6006 from mleotta:fix-install-name-dir 2016-01-23 06:41:51 +00:00
Matt Leotta 912592de4c Remove "INSTALL_NAME_DIR lib" target property
The INSTALL_NAME_DIR property of a target specifies how a dynamic library should
be found on OS X.  If INSTALL_NAME_DIR is not specified the loader will search
relative to the standard search paths.  If specified it should either be
an absolute path or relative path prefixed with either @executable_path,
@load_path, or @rpath.  Specifying "lib" does not make sense here and
causes linking error as documented here:

http://answers.opencv.org/question/4134/cmake-install_name_tool-absolute-path-for-library-on-mac-osx/

and here

http://stackoverflow.com/questions/26978806/dyld-library-not-loaded-lib-libopencv-core-3-0-dylib-reason-image-not-found

This patch removes INSTALL_NAME_DIR everywhere it is set to "lib".
An alternate solution would be to set an absolute path like
"${CMAKE_INSTALL_PREFIX}/lib" or relative path like
"@executable_path/../lib".  However, if there is not specific need for
specifying a path, it is probably best left unset.
2016-01-21 16:07:56 -05:00
Alexander Alekhin 85793d0138 Merge pull request #6001 from terfendail:pyrsegmentation_valgrind 2016-01-21 15:03:46 +00:00
Alexander Alekhin a57b03c356 Merge pull request #5993 from asmorkalov:linitian_signed_packages 2016-01-21 15:03:31 +00:00
Alexander Smorkalov 5a5378b3bf Added lintian overrides for package signature entry. 2016-01-21 17:04:28 +03:00
Vitaly Tuzov f01f1bc5e6 Fixed "Conditional jump or move depends on uninitialised value(s)" valgrind issue due to wrong pointer recalculation for zero level of pyramid. 2016-01-21 12:54:08 +03:00
Alexander Alekhin 85c7190e41 Merge pull request #5995 from alalek:fix_include_opencv_24 2016-01-21 05:16:37 +00:00
Alexander Alekhin f2e4bec925 Merge pull request #5996 from ElenaGvozdeva:pyrUp_fix 2016-01-20 15:50:59 +00:00
Alexander Alekhin 4a8d1147c2 include available modules only 2016-01-20 13:14:20 +03:00
Elena Gvozdeva bb1c2d71a8 fix bug on border at pyrUp 2016-01-20 13:07:07 +03:00
Vadim Pisarevsky be565c2235 Merge pull request #5984 from terfendail:2.4 2016-01-19 10:49:56 +00:00
Vitaly Tuzov 389f176a67 Removed ioctl calls to query for VIDIOC_G_INPUT and VIDIOC_ENUMINPUT since information returned by the calls is never used.
Fixed icvCaptureFromCAM_V4L return value in case of V4L2 camera initialization failure.
2016-01-18 12:54:53 +03:00
Alexander Alekhin 5c21ca2697 Merge pull request #5975 from terfendail:2.4 2016-01-15 11:45:10 +00:00
Vitaly Tuzov 4f5d585184 Update call to Tegra optimized morphology filtering 2016-01-15 11:48:29 +03:00
Alexander Alekhin c01fd16291 Merge pull request #5946 from takacsd:patch-1 2016-01-12 08:08:58 +00:00
takacsd 537d1322b4 Add missing implementation to one of the Mat_<_Tp> constructor. (#5945) 2016-01-11 16:05:22 +01:00
Alexander Alekhin 8a803865cf Merge pull request #5942 from akarsakov:fix_memcpy_empty_vector 2016-01-11 11:12:31 +00:00
Alexander Karsakov 6e22020dad Fixed pnpTask: don't copy inliers vector in case it's empty. 2016-01-11 11:39:18 +03:00
Alexander Alekhin f91ada572a Merge pull request #5858 from mshabunin:fix-arm-cross-warnings 2015-12-24 09:07:29 +00:00
Alexander Alekhin f7c8f74ac1 Merge pull request #5869 from atinfinity:pullreq/151223-FindTBB-VS2015-2.4 2015-12-23 16:16:57 +00:00
atinfinity c4e80952ce changed to find TBB library(VS2015) 2015-12-23 23:43:01 +09:00
Alexander Alekhin 178ed63e1a Merge pull request #5846 from mshabunin:backports-3 2015-12-22 17:31:20 +00:00
Maksim Shabunin 46edb54ac3 Fixed PCH warning during ARM crosscompilation 2015-12-22 15:58:39 +03:00
Maksim Shabunin 7cb78451d1 Backported several changes from master branch:
- #3771 - inline round on ARM
- #5633 - documentation for MSER
- #5666 - run.py fixes
2015-12-21 18:20:37 +03:00
Alexander Smorkalov 2897da037e Merge pull request #5763 from ilya-lavrenov:lintian 2015-12-16 11:27:59 +00:00
Ilya Lavrenov 4fa14f75b8 suppress lintian warning in opencv.pc 2015-12-09 13:47:09 +03:00
Vadim Pisarevsky 0886f6fe62 Merge pull request #5733 from teng88:patch-3 2015-12-07 10:08:23 +00:00
Maksim Shabunin 681df84036 Merge pull request #5720 from asmorkalov:as/cuda_qnx 2015-12-03 07:41:23 +00:00
Teng Cao 07a58c47cb Update cascadeclassifier.cpp
minor fix since predict() returun int
2015-12-02 17:31:17 +08:00
Alexander Smorkalov 53ed1a8c03 Build fix for QNX 6.6 neitrino. 2015-11-30 10:28:04 +03:00
Alexander Smorkalov 4d598719da Merge pull request #5713 from ilya-lavrenov:lintian 2015-11-26 08:20:12 +00:00
Ilya Lavrenov 130d4b1bdf added suppression for python-script-but-no-python-dep 2015-11-25 23:38:44 +03:00
Vadim Pisarevsky 42001234ab Merge pull request #5390 from StevenPuttemans:add_markers_2.4 2015-11-23 13:40:00 +00:00
Vadim Pisarevsky 6e885e5775 Merge pull request #5682 from ilya-lavrenov:lintian-overrides 2015-11-23 13:38:38 +00:00
Maksim Shabunin 5c0cdd4d2d Merge pull request #5650 from hoangviet1985:fix_bug_5623 2015-11-20 16:15:47 +00:00
Ilya Lavrenov 969f0c4456 added lintian overrides for debian packages 2015-11-19 17:10:09 +03:00
Maksim Shabunin 739d7caa32 Merge pull request #5659 from jet47:cuda-wrap-stream-2.4 2015-11-19 09:25:36 +00:00
Maksim Shabunin 6148c3525e Merge pull request #5672 from ilya-lavrenov:npp-graphcut 2015-11-19 09:18:23 +00:00
Vadim Pisarevsky df55aaec1e Merge pull request #5674 from mshabunin:mac-fix-2.4 2015-11-17 17:30:08 +00:00
Maksim Shabunin eebd4cad66 Fix compilation problems with XCode 7.1.1 and cmake 3.3.2 2015-11-17 18:52:55 +03:00
Ilya Lavrenov 0050df8750 GraphCut deprecated in 7.5 and removed in 8.0 2015-11-15 00:56:56 +03:00
Maksim Shabunin 01b5971c94 Merge pull request #5640 from mshabunin:restore-ts-gpu 2015-11-13 15:47:17 +00:00
Vladislav Vinogradov 8d3850ac02 add cv::gpu::StreamAccessor::wrapStream method
it allows to import existed CUDA stream to OpenCV
2015-11-12 13:07:30 +03:00
Alexander Alekhin 1862d1995f Merge pull request #5652 from jet47:core-test-math-warning-fix 2015-11-12 03:10:46 +00:00
Alexander Alekhin fc1694c97c Merge pull request #5655 from janstarzy:2.4-canny-fix 2015-11-12 03:10:11 +00:00
Jan Starzynski 2799829bc9 fix potential buffer overflow as in 3.0 2015-11-11 16:19:20 +01:00
Vladislav Vinogradov d5e6503fe5 fix signed/unsigned comparison warning in core/test/test_math.cpp 2015-11-11 11:53:39 +03:00
hoangviet1985 6441620f45 The right signs give the right results 2015-11-10 16:18:07 -05:00
Vadim Pisarevsky 0f288d1082 Merge pull request #5605 from hoangviet1985:fix_bug_5599 2015-11-10 16:13:26 +00:00
Vadim Pisarevsky 82c1c68560 Merge pull request #5622 from LorenaGdL:hitAndMiss2.4 2015-11-10 16:03:48 +00:00
Vadim Pisarevsky 780b713016 Merge pull request #5638 from hoangviet1985:fix_bug_5623 2015-11-10 16:01:48 +00:00
Alexander Alekhin 1b6dd03fd7 Merge pull request #5641 from alalek:backport_5320 2015-11-07 05:21:31 +00:00
berak 28974e7290 remove usage of obsolete _dataAsRows flag 2015-11-06 19:59:25 +03:00
Maksim Shabunin ffb9e877e9 Restore ts/gpu_perf.hpp, trying to compile with VS 2015 2015-11-06 13:26:58 +03:00
Viet Dinh 1e879e1ab1 clean up 2015-11-06 00:29:44 -05:00
Viet Dinh 57829d81ea mac compile error 2015-11-05 23:31:30 -05:00
Viet Dinh a20a273982 Merge remote-tracking branch 'Itseez/2.4' into fix_bug_5599 2015-11-05 23:20:04 -05:00
Viet Dinh e9b31a70bf mac osx compile errors 2015-11-05 21:44:36 -05:00
Viet Dinh a1532582a6 optimize code 2015-11-05 19:38:24 -05:00
Viet Dinh 68bcff26fb fix solveCubic
The original solution did not handle correctly when delta = 0,
resulting as nan errors. I also wrote a test case to test solving
equation x^3 = 0 after fixing.
2015-11-05 19:19:56 -05:00
Viet Dinh 433bc81b30 std::cbrt could not be found 2015-11-03 21:40:52 -05:00
Viet Dinh c8bf176558 casting warning 2015-11-03 21:10:38 -05:00
Viet Dinh cfd5caf29d deal with type casting issues 2015-11-03 16:19:41 -05:00
Viet Dinh f461d0cb7a fix compile errors
some functions were not found in namespace std
2015-11-03 15:37:25 -05:00
Viet Dinh 09b0193186 even more correct
calculates cube root of complex number to give more correct results.
2015-11-03 15:17:49 -05:00
Lorena García 252feb4774 Hit and Miss morphological op 2015-11-03 19:42:22 +01:00
Viet Dinh 537a978dcf update test_math.cpp 2015-11-03 12:52:49 -05:00
Vadim Pisarevsky 33dc41056f Merge pull request #5392 from elenash:fisheye_fix 2015-11-03 10:57:36 +00:00
Viet Dinh b6e8a47fca fix whitespace errors 2015-11-02 09:28:37 -05:00
Viet Dinh ed0065266e update fixing bug #5599 2015-11-02 08:38:05 -05:00
Vadim Pisarevsky c21ed69731 Merge pull request #5586 from mshabunin:run-py-changes-2.4 2015-11-02 12:05:00 +00:00
Viet Dinh 03e7b71707 fix whitespace errors 2015-11-02 00:50:05 -05:00
Viet Dinh e06c696b3c fix whitespace errors 2015-11-02 00:20:13 -05:00
Viet Dinh 40ce9f97d6 fix whitespace errors 2015-11-02 00:04:51 -05:00
Viet Dinh 0bc44376a5 fix bug #5599
solves equations more correctly, eliminates “nan” error.
2015-11-01 23:30:28 -05:00
Viet Dinh fdf549b921 fix bug #5599 2015-11-01 11:08:01 -05:00
Maksim Shabunin 021ff0efa6 Merge pull request #5575 from mshabunin:fix-vs2015-2.4 2015-10-30 13:47:18 +00:00
Maksim Shabunin 1e869c5e49 ts: refactor run.py script
Conflicts:
	modules/ts/misc/run.py
2015-10-29 13:04:05 +03:00
Maksim Shabunin f49936a849 Fixed cmake and build issues when using Visual Studio 2015 2015-10-29 11:50:48 +03:00
Alexander Alekhin 4552ca98c4 Merge pull request #5574 from ilya-lavrenov:image-sequence-videocapture 2015-10-27 15:41:59 +00:00
Ilya Lavrenov 9e2395e7e0 return false in grabFrame failed in open method 2015-10-27 16:56:31 +03:00
Ilya Lavrenov 05945bf00e fixed case when grabbing failed 2015-10-27 16:26:24 +03:00
Ilya Lavrenov 9d78a1ea9f allow to retrieve videocapture properties before first frame reading 2015-10-26 14:37:38 +03:00
Alexander Smorkalov 8e40becab1 Debian packages with legacy C headers added to list of conflicts, relpaces, etc.
(cherry picked from commit e245aed6bb)
2015-10-26 10:56:34 +03:00
Alexander Alekhin 60eda6f25c export simple libs from OPENCV_LINKER_LIBS (fix #5541)
(cherry picked from commit 937a096bf1)
2015-10-26 10:55:38 +03:00
Alexander Smorkalov 2e78a3e5e9 Fixed samples build with nonfree.
(cherry picked from commit 341e7b3be2)
2015-10-26 10:55:24 +03:00
Alexander Smorkalov 966d35a9fb Made samples build independent from nonfree module.
(cherry picked from commit bba8c0beac)
2015-10-26 10:55:14 +03:00
Alexander Smorkalov 42447a7610 Set of lintain warning fixes for -samples debian package.
(cherry picked from commit ff00220302)
2015-10-26 10:55:00 +03:00
Aaron Simmons ca50969c2b brining over fix in master (#4140) for libz import on 64-bit android
(cherry picked from commit 55a9fdf051)
2015-10-26 10:54:44 +03:00
a-andre 2d3e170370 install opencv2/highgui.hpp header
(cherry picked from commit d16fb30512)
2015-10-26 10:54:29 +03:00
Alexander Smorkalov 8a37fc8223 Added missing copyright headers.
(cherry picked from commit 408107ce6d)
2015-10-26 10:53:52 +03:00
Alexander Smorkalov a5c20f8592 Debian formatted copyright file added to all debian packages.
(cherry picked from commit 9d24b3c3b0)
2015-10-26 10:53:38 +03:00
Ilya Lavrenov 96a2edb375 delete video readers
(cherry picked from commit 0d5b739d35)
2015-10-26 10:53:23 +03:00
Ilya Lavrenov 15b313ce4b fixed memory leak in findHomography tests
(cherry picked from commit ec5244a73a)
2015-10-26 10:52:57 +03:00
Alexander Smorkalov 1ea6568951 Fixed wrong-name-for-changelog-of-native-package warning for deb packages.
(cherry picked from commit cb1dc7cb6e)
2015-10-26 10:51:22 +03:00
Ilya Lavrenov 56654ae360 added some property setting and getting
(cherry picked from commit 75fcedf0ed)
2015-10-26 10:50:00 +03:00
Ilya Lavrenov 9a3e53e738 repaired GStreamer 0.10 version
(cherry picked from commit c19ed39a78)
2015-10-26 10:49:43 +03:00
Ilya Lavrenov 2243bfa181 repaired gstreamer camera capture:
1. Enabled property retrieval: height, width, FPS
2. Fixed issue when isOpened returns always true even for non-existing devices
3. Ability to work with non-0 device. Camera capture index is taken into account

(cherry picked from commit dbd7912b88)
2015-10-26 10:49:32 +03:00
robertxwu 33cd7f38a8 re-submit
(cherry picked from commit 4a68cc1675)
2015-10-26 10:49:02 +03:00
Hajo Nils Krabbenhöft 2fc0ce5c24 buffer_size should be in bytes, not bits
(cherry picked from commit 7825cbeb7d)
2015-10-26 10:46:33 +03:00
Hajo Nils Krabbenhöft c5d009d6c4 fix crash for large BW tif images
(cherry picked from commit d38fee7599)
2015-10-26 10:46:23 +03:00
Roman Donchenko 7d28541bbe test2.py: fail if a downloaded image can't be decoded
(cherry picked from commit 56f17e4921)
2015-10-26 10:45:22 +03:00
Alexander Alekhin 95d6002f16 Merge pull request #5568 from asmorkalov:as/legacy_c_deb_pack_dep 2015-10-23 15:37:26 +00:00
Alexander Smorkalov e245aed6bb Debian packages with legacy C headers added to list of conflicts, relpaces, etc. 2015-10-23 16:09:04 +03:00
Maksim Shabunin 497d92e7d1 Merge pull request #5533 from sturkmen72:patch-12 2015-10-22 12:30:38 +00:00
Maksim Shabunin 1cb0dfa669 Merge pull request #5500 from StevenPuttemans:fix_mask_notice_copyTo_2.4 2015-10-22 12:28:54 +00:00
Alexander Alekhin 4dc2313527 Merge pull request #5552 from hyunkim9123:camshift-2.4 2015-10-21 06:13:38 +00:00
Alexander Alekhin 938d42a89f Merge pull request #5545 from alalek:fix_linker_libs 2015-10-19 15:29:02 +00:00
Alexander Alekhin 937a096bf1 export simple libs from OPENCV_LINKER_LIBS (fix #5541) 2015-10-19 13:49:41 +03:00
paul.kim 78a566611d Fix the issue in mouse click event 2015-10-17 10:42:48 +09:00
Suleyman TURKMEN 73240b736b Update camera_calibration_and_3d_reconstruction.rst 2015-10-16 22:30:00 +03:00
Alexander Smorkalov bf41e791ff Merge pull request #5514 from asmorkalov:as/nonfree-independent-samples 2015-10-15 10:56:23 +00:00
Alexander Smorkalov bac151675a Merge pull request #5501 from asmorkalov:as/samples_lintian_fixes 2015-10-15 10:52:46 +00:00
Alexander Smorkalov 341e7b3be2 Fixed samples build with nonfree. 2015-10-14 16:19:37 +03:00
Alexander Alekhin 98c26d95e5 Merge pull request #5511 from paleozogt:android-64-bit 2015-10-14 11:35:05 +00:00
Alexander Smorkalov bba8c0beac Made samples build independent from nonfree module. 2015-10-14 12:56:58 +03:00
Alexander Alekhin bd34f6dd98 Merge pull request #5505 from a-andre:highguiheader 2015-10-14 09:11:21 +00:00
Aaron Simmons 55a9fdf051 brining over fix in master (#4140) for libz import on 64-bit android 2015-10-13 17:42:40 -06:00
a-andre d16fb30512 install opencv2/highgui.hpp header 2015-10-13 18:16:14 +02:00
Alexander Alekhin 8b23d1ec64 Merge pull request #5498 from asmorkalov:as/copyright_headers 2015-10-13 14:22:57 +00:00
Alexander Smorkalov ff00220302 Set of lintain warning fixes for -samples debian package. 2015-10-13 16:32:53 +03:00
StevenPuttemans 8ed25ad75f adding extra explanation for mask parameter 2015-10-13 15:21:35 +02:00
Alexander Smorkalov 408107ce6d Added missing copyright headers. 2015-10-13 15:02:38 +03:00
Alexander Alekhin 3558da9ab7 Merge pull request #5494 from asmorkalov:as/deb_copyright 2015-10-13 08:54:20 +00:00
Alexander Smorkalov 9d24b3c3b0 Debian formatted copyright file added to all debian packages. 2015-10-13 09:09:07 +03:00
Alexander Alekhin 779dad12fb Merge pull request #5491 from ilya-lavrenov:video-writers-delete 2015-10-12 10:48:16 +00:00
Alexander Alekhin 297a92cd94 Merge pull request #5490 from ilya-lavrenov:mem-leak-calib3d 2015-10-12 10:47:50 +00:00
Ilya Lavrenov 0d5b739d35 delete video readers 2015-10-12 00:40:23 +03:00
Ilya Lavrenov ec5244a73a fixed memory leak in findHomography tests 2015-10-12 00:11:45 +03:00
Alexander Alekhin 454e5e5fa4 Merge pull request #5461 from berak:fix_putText_24 2015-10-06 17:12:25 +00:00
berak bb9bd3132a fix zero length std::string in putText() 2015-10-06 18:31:00 +02:00
Elena Shipunova e539a9632d Fix in fisheye calibrate function: #5389 2015-10-01 19:03:26 +03:00
StevenPuttemans 406cfc48c9 adding markers to OpenCV for 2.4 branch 2015-10-01 16:08:25 +02:00
Alexander Alekhin 59082c8ee8 Merge pull request #5398 from asmorkalov:as/wrong-name-for-changelog-of-native-package 2015-09-28 13:41:46 +00:00
Alexander Smorkalov cb1dc7cb6e Fixed wrong-name-for-changelog-of-native-package warning for deb packages. 2015-09-28 12:30:26 +03:00
Alexander Alekhin 58a11ac079 Merge pull request #5403 from sturkmen72:patch-9 2015-09-25 12:08:13 +00:00
Suleyman TURKMEN 69d84c8f3e Update how_to_scan_images.cpp 2015-09-25 14:32:58 +03:00
Maksim Shabunin 79ab6567ee Merge pull request #5395 from enesates:patch-2 2015-09-25 07:35:14 +00:00
Alexander Alekhin 60a689d27c Merge pull request #5202 from ilya-lavrenov:gstreamer-v4l2 2015-09-24 14:46:23 +00:00
Enes Ateş 5df2713b16 XML file path correction
in documentation exact path is images/CameraCalibration/VID5

see also PR #5393
2015-09-24 10:34:42 +02:00
Alexander Alekhin 134a3f165d Merge pull request #5381 from robertxwu:Bugfix_for_issue_#_of_5145 2015-09-23 09:58:24 +00:00
robertxwu 4a68cc1675 re-submit 2015-09-21 13:57:25 -07:00
Vadim Pisarevsky f838a832b2 Merge pull request #5357 from fxtentacle:ha-2.4.11 2015-09-21 14:31:13 +00:00
Vadim Pisarevsky 6f2fb383e6 Merge pull request #5359 from StevenPuttemans:contributing_guidelines_2.4 2015-09-21 11:53:06 +00:00
Alexander Alekhin e1b0d341e4 Merge pull request #5360 from SpecLad:test2-fail-on-failed-download 2015-09-18 12:10:52 +00:00
Roman Donchenko 08ad3b500b test2.py: switch from urllib to urllib2
urllib2 raises an exception if an HTTP request produces an error code,
making the test fail earlier.
2015-09-17 18:24:30 +03:00
Roman Donchenko 56f17e4921 test2.py: fail if a downloaded image can't be decoded 2015-09-17 18:17:06 +03:00
Roman Donchenko 293ea03dcc test2.py: remove unused imports 2015-09-17 18:14:49 +03:00
StevenPuttemans bef1b5322e add link to contributing guidelines 2015-09-17 14:14:21 +02:00
Alexander Smorkalov e6f3f3c029 OpenCV version++. 2015-09-17 14:02:36 +03:00
Ilya Lavrenov 7746d9b7cc fix for corrent modules dependencies
(cherry picked from commit 1c3d83df54)
2015-09-17 13:45:08 +03:00
Vladislav Vinogradov 3494d640df add extra checks to data_step_down to prevent out-of-border access
(cherry picked from commit 3ef067cc65)
2015-09-17 13:44:56 +03:00
Vladislav Vinogradov c22cc67ba8 revert previous change in gpu::StereoBeliefPropogation
(cherry picked from commit f903192c17)
2015-09-17 13:44:33 +03:00
Vladislav Vinogradov 558054a53d fix for gpu::StereoBeliefPropogation:
use continuous memory for internal buffers

(cherry picked from commit e2a9df408f)
2015-09-17 13:44:17 +03:00
Elena Shipunova c7b471f10f do not proceed with removing zero-length slice
(cherry picked from commit 036c3b4e6d)
2015-09-17 13:43:54 +03:00
Ilya Lavrenov f4ffcae8d9 initialize padding of CvString with zeros
(cherry picked from commit 7b1eb3af7b)
2015-09-17 13:43:37 +03:00
Ilya Lavrenov 0422054aa1 fixed warnings in gpu module
(cherry picked from commit 6a05939e1c)
2015-09-17 13:41:51 +03:00
Ilya Lavrenov a81f0a5123 fixed uninitialized memory writing/reading in flann
(cherry picked from commit 3934d61de7)
2015-09-17 13:41:31 +03:00
Ilya Lavrenov c36582d2df fixed memory leak in flann index
(cherry picked from commit 32d7c1950a)
2015-09-17 13:41:16 +03:00
Ilya Lavrenov d50c07e303 fixed "Conditional jump or move depends on uninitialised value(s)" in GBD
(cherry picked from commit 887736bcd4)
2015-09-17 13:41:03 +03:00
Ilya Lavrenov 54693b3fa7 fixed memory leak in GBTrees
(cherry picked from commit 1b8c2589c0)
2015-09-17 13:40:50 +03:00
Ilya Lavrenov 3c3bc123fc release filestorage before exception
(cherry picked from commit 3a1bb93340)
2015-09-17 13:40:36 +03:00
Ilya Lavrenov ac33cd688c fixed memory leak in ANN
(cherry picked from commit dfb49097e3)
2015-09-17 13:40:14 +03:00
Ilya Lavrenov b5e42d8cc1 fixed memory leak in ml module
(cherry picked from commit d7bb1025f3)
2015-09-17 13:40:02 +03:00
Ilya Lavrenov 7e4e8921bc fixed memory leak in descriptor regression tests 2015-09-17 13:39:44 +03:00
Ilya Lavrenov 6dcd455ac4 fixed memory leaks in modules/features2d/test/test_nearestneighbors.cpp 2015-09-17 13:39:34 +03:00
Vladislav Vinogradov 1d58e1a14a fix potential out-of-border access in gpu StereoBeliefPropagation 2015-09-17 13:39:17 +03:00
Roman Donchenko d122510c4f Only conflict with packages corresponding to modules that are built 2015-09-17 13:39:03 +03:00
Roman Donchenko 6613d14261 Add missing packages to the Debian conflict list
And refactor the code to make sure that the dev and runtime package lists are
in sync.
2015-09-17 13:38:52 +03:00
a-andre a14e524b32 fix documentation builder warnings 2015-09-17 13:38:25 +03:00
a-andre 226ff93917 install new headers like "opencv2/core.hpp" 2015-09-17 13:38:11 +03:00
Ilya Lavrenov d28e6c9b36 fixed memory leak caused by illegal memory access
(cherry picked from commit 4722b2d0e5)
2015-09-17 13:37:52 +03:00
Ilya Lavrenov c16f465ff5 fixed "Conditional jump or move depends on uninitialised value" warning
(cherry picked from commit f100cdb6d4)
2015-09-17 13:37:38 +03:00
Roman Donchenko 3231c2f995 NearestNeighborTest: use ts->get_rng() instead of (implicit) theRNG()
This ensures that test data is not dependent on the order the tests are
executed in.

(cherry picked from commit 1245cd1752)
2015-09-17 13:37:26 +03:00
Ilya Lavrenov 16bcc30e42 typo
(cherry picked from commit 793bdaada7)
2015-09-17 13:37:12 +03:00
Ilya Lavrenov 69c50e0181 fixed typo
(cherry picked from commit 370d1ff21a)
2015-09-17 13:37:02 +03:00
Ilya Lavrenov 486c40f578 fixed uninitialized values warning in bad arg test class
(cherry picked from commit 47cee8715b)
2015-09-17 13:36:51 +03:00
Ilya Lavrenov 08e38e9ff9 fixed memory leaks in warpAffine tests
(cherry picked from commit b70e27e076)
2015-09-17 13:36:35 +03:00
Ilya Lavrenov ba3b902da7 fixed memory leaks in floodfill tests
(cherry picked from commit d1b882ddcf)
2015-09-17 13:36:24 +03:00
Ilya Lavrenov bf94e6a91c fixed memory leaks in cvtyuv tests
(cherry picked from commit b2489d31d6)
2015-09-17 13:36:14 +03:00
Ilya Lavrenov ecc53dd7a4 fixed memory leak in core ds tests
(cherry picked from commit 7719da9552)
2015-09-17 13:35:51 +03:00
Ilya Lavrenov fc0e0239b8 fixed valgrind warning in polylines
(cherry picked from commit 855765986e)
2015-09-17 13:35:25 +03:00
Hajo Nils Krabbenhöft 7825cbeb7d buffer_size should be in bytes, not bits 2015-09-16 22:19:51 +02:00
Hajo Nils Krabbenhöft d38fee7599 fix crash for large BW tif images 2015-09-16 22:04:42 +02:00
Vadim Pisarevsky fb4b4cbf58 Merge pull request #5334 from UnaNancyOwen:fix2_LineAA 2015-09-14 11:49:48 +00:00
Tsukasa Sugiura b23e536894 Fix LineAA in case of 4 channel
Fix bug when enter 4 channel image to LineAA function.
2015-09-12 01:48:28 +09:00
Alexander Alekhin 8b33c6fa8f Merge pull request #5290 from ilya-lavrenov:cmake_bug 2015-09-11 09:49:42 +00:00
Ilya Lavrenov 1c3d83df54 fix for corrent modules dependencies 2015-09-11 11:30:10 +03:00
Alexander Alekhin b29cde552a Merge pull request #5325 from jet47:gpu-stereobp-fix 2015-09-10 14:40:05 +00:00
Vladislav Vinogradov 3ef067cc65 add extra checks to data_step_down to prevent out-of-border access 2015-09-10 10:05:25 +03:00
Vladislav Vinogradov f903192c17 revert previous change in gpu::StereoBeliefPropogation 2015-09-10 10:05:04 +03:00
Vladislav Vinogradov e2a9df408f fix for gpu::StereoBeliefPropogation:
use continuous memory for internal buffers
2015-09-10 09:55:46 +03:00
Vadim Pisarevsky cba401fe53 Merge pull request #5313 from sturkmen72:patch-5 2015-09-09 10:39:25 +00:00
Vadim Pisarevsky f3af90c6c7 Merge pull request #5315 from elenash:core_remove_slice 2015-09-09 10:25:45 +00:00
Elena Shipunova 036c3b4e6d do not proceed with removing zero-length slice 2015-09-07 13:50:30 +03:00
Suleyman TURKMEN 9df5400200 Update drawing.cpp
https://github.com/Itseez/opencv/issues/4791
2015-09-07 11:33:29 +03:00
Alexander Alekhin 6fefc53e56 Merge pull request #5299 from ilya-lavrenov:core_hog 2015-09-04 14:30:17 +00:00
Alexander Alekhin 76235cbb70 Merge pull request #5300 from ilya-lavrenov:cuda_warnings 2015-09-04 10:21:44 +00:00
Alexander Alekhin 9d006f6a1d Merge pull request #5297 from ilya-lavrenov:flann 2015-09-04 10:21:00 +00:00
Ilya Lavrenov 6a05939e1c fixed warnings in gpu module 2015-09-03 19:13:00 +03:00
Ilya Lavrenov 7b1eb3af7b initialize padding of CvString with zeros 2015-09-03 18:33:15 +03:00
Ilya Lavrenov 3934d61de7 fixed uninitialized memory writing/reading in flann 2015-09-03 13:25:29 +03:00
Alexander Alekhin a98ee0d3b2 Merge pull request #5289 from ilya-lavrenov:flann 2015-09-02 11:41:03 +00:00
Alexander Alekhin 73a8e65cbd Merge pull request #5285 from ilya-lavrenov:ml5 2015-09-02 11:39:07 +00:00
Alexander Alekhin ae0d428b62 Merge pull request #5281 from ilya-lavrenov:ml2 2015-09-02 11:38:45 +00:00
Ilya Lavrenov 32d7c1950a fixed memory leak in flann index 2015-09-01 16:58:35 +03:00
Vadim Pisarevsky 5603617b7c Merge pull request #5284 from ilya-lavrenov:ml4 2015-09-01 12:31:46 +00:00
Vadim Pisarevsky 43aae3fee8 Merge pull request #5283 from ilya-lavrenov:ml3 2015-09-01 12:31:05 +00:00
Vadim Pisarevsky a7a4a2ae30 Merge pull request #5280 from ilya-lavrenov:ml 2015-09-01 12:30:36 +00:00
Ilya Lavrenov 1b8c2589c0 fixed memory leak in GBTrees 2015-09-01 14:38:11 +03:00
Ilya Lavrenov 887736bcd4 fixed "Conditional jump or move depends on uninitialised value(s)" in GBD 2015-09-01 13:22:49 +03:00
Alexander Alekhin 5b1967f80c Merge pull request #5274 from ilya-lavrenov:features2d 2015-09-01 10:14:29 +00:00
Ilya Lavrenov 3a1bb93340 release filestorage before exception 2015-09-01 13:04:33 +03:00
Ilya Lavrenov dfb49097e3 fixed memory leak in ANN 2015-09-01 12:29:52 +03:00
Ilya Lavrenov d7bb1025f3 fixed memory leak in ml module 2015-09-01 11:26:25 +03:00
Ilya Lavrenov dc441f50cd fixed memory leak in descriptor regression tests 2015-08-31 17:30:42 +03:00
Ilya Lavrenov be499b42d9 fixed memory leaks in modules/features2d/test/test_nearestneighbors.cpp 2015-08-31 17:21:55 +03:00
Alexander Alekhin 74f5eaf70c Merge pull request #5262 from jet47:gpu-stereobp-fix 2015-08-28 10:05:19 +00:00
Vladislav Vinogradov 7ddc0bdd37 fix potential out-of-border access in gpu StereoBeliefPropagation 2015-08-27 16:09:37 +03:00
Alexander Alekhin 94cf5430d0 Merge pull request #5250 from SpecLad:missing-conflicts 2015-08-26 16:39:13 +00:00
Roman Donchenko 4ab2771957 Only conflict with packages corresponding to modules that are built 2015-08-26 13:42:21 +03:00
Roman Donchenko bef2b27155 Add missing packages to the Debian conflict list
And refactor the code to make sure that the dev and runtime package lists are
in sync.
2015-08-25 18:50:06 +03:00
Vadim Pisarevsky 702afcd760 Merge pull request #5143 from alankarkotwal:2.4 2015-08-24 11:06:30 +00:00
Maksim Shabunin 9734abdc1a Merge pull request #5114 from a-andre:missingHeader 2015-08-20 15:45:52 +00:00
Alexander Alekhin 3b97549bb1 Merge pull request #5226 from ilya-lavrenov:valgrind_memory_leak 2015-08-20 13:14:29 +00:00
Alexander Alekhin fc0b997064 Merge pull request #5223 from ilya-lavrenov:warpaffine_valgrind 2015-08-20 12:36:24 +00:00
Ilya Lavrenov 4722b2d0e5 fixed memory leak caused by illegal memory access 2015-08-20 13:28:10 +03:00
Ilya Lavrenov f100cdb6d4 fixed "Conditional jump or move depends on uninitialised value" warning 2015-08-20 12:20:38 +03:00
Alexander Alekhin a00b37d209 Merge pull request #5094 from SpecLad:f2d-ts-rng 2015-08-19 00:45:04 +00:00
a-andre b757359ff8 fix documentation builder warnings 2015-08-18 18:48:32 +02:00
Alexander Alekhin 3172e6d54b Merge pull request #5203 from ilya-lavrenov:valgrind_error 2015-08-17 17:18:07 +00:00
Ilya Lavrenov 75fcedf0ed added some property setting and getting 2015-08-16 21:25:36 +03:00
Ilya Lavrenov c19ed39a78 repaired GStreamer 0.10 version 2015-08-16 21:01:22 +03:00
Ilya Lavrenov 793bdaada7 typo 2015-08-16 11:46:48 +03:00
Ilya Lavrenov dbd7912b88 repaired gstreamer camera capture:
1. Enabled property retrieval: height, width, FPS
2. Fixed issue when isOpened returns always true even for non-existing devices
3. Ability to work with non-0 device. Camera capture index is taken into account
2015-08-16 11:16:25 +03:00
Ilya Lavrenov 370d1ff21a fixed typo 2015-08-15 16:25:25 +03:00
Ilya Lavrenov 47cee8715b fixed uninitialized values warning in bad arg test class 2015-08-15 14:30:27 +03:00
Ilya Lavrenov b70e27e076 fixed memory leaks in warpAffine tests 2015-08-15 10:11:52 +03:00
Ilya Lavrenov d1b882ddcf fixed memory leaks in floodfill tests 2015-08-15 10:09:31 +03:00
Ilya Lavrenov b2489d31d6 fixed memory leaks in cvtyuv tests 2015-08-15 10:06:09 +03:00
Ilya Lavrenov 7719da9552 fixed memory leak in core ds tests 2015-08-15 09:53:30 +03:00
Alexander Alekhin 8d264d9f64 Merge pull request #5193 from ilya-lavrenov:valgrind_error 2015-08-14 15:32:16 +00:00
Ilya Lavrenov 855765986e fixed valgrind warning in polylines 2015-08-14 17:57:54 +03:00
Alexander Smorkalov d0210f510e OpenCV version++. 2015-08-14 16:43:10 +03:00
Maksim Shabunin 34aa4e4578 Merge pull request #5151 from mshabunin:fix-training-data-corruption 2015-08-12 14:40:51 +00:00
Maksim Shabunin 447b8bf58a Fixing possible corruption for big training data sizes 2015-08-10 12:36:27 +03:00
Alexander Alekhin e9539061db Merge pull request #5124 from StevenPuttemans:fix_annotation_tool_2.4 2015-08-08 16:51:51 +00:00
Alankar Kotwal 98078c231e Merge pull request #1 from alankarkotwal/bugfix
Correct missing braces in operations_in_arrays.rst
2015-08-06 22:15:04 +05:30
Alankar Kotwal 1d92a73a55 Correct missing braces in operations_in_arrays.rst 2015-08-06 22:09:23 +05:30
StevenPuttemans ba7bf1ef68 add checks on input parameters for valid path and folder
opening a folder is system specific - made system specific code
added license
2015-08-06 10:23:41 +02:00
Alexander Alekhin 5a53f41622 Merge branch '2.4.10.x-prep' into 2.4 2015-08-05 16:20:12 +03:00
Alexander Alekhin 80844fd554 Merge pull request #5096 from terfendail:2.4 2015-08-03 12:46:45 +00:00
a-andre 5262371660 install new headers like "opencv2/core.hpp" 2015-08-02 13:13:58 +02:00
Vitaly Tuzov a96a6bf149 Resize area result verification moved to the separate function 2015-07-31 15:01:33 +03:00
Vitaly Tuzov b7c9aaa471 Added more resize_area tests to ensure right rounding behavior for half and quarter downscaling 2015-07-30 18:48:06 +03:00
Roman Donchenko 1245cd1752 NearestNeighborTest: use ts->get_rng() instead of (implicit) theRNG()
This ensures that test data is not dependent on the order the tests are
executed in.
2015-07-30 18:03:48 +03:00
Alexander Smorkalov 1f5fd865aa Merge pull request #5092 from etalanin:update-branch-to-2-4-12 2015-07-29 18:57:02 +00:00
Evgeny Talanin 9a3dccab20 Increase Android Manager version 2015-07-29 21:16:21 +03:00
Evgeny Talanin ac6ca660f4 Increase version to 2.4.12 2015-07-29 20:34:47 +03:00
Alexander Alekhin 6f47c26acf Merge pull request #5091 from jet47:gpu-sanity-epsilon 2015-07-29 16:29:37 +00:00
Vladislav Vinogradov 945663bc9b increase epsilon for some GPU sanity tests 2015-07-29 18:57:14 +03:00
Alexander Alekhin 0263b49298 Merge pull request #5090 from SpecLad:autotune-crash 2015-07-29 15:47:20 +00:00
Roman Donchenko c2f59a0f73 flann: fix AutotunedIndex crashing if a KDTree index is selected
Backport of mariusmuja/flann@f8ca6df3.
2015-07-29 18:03:48 +03:00
Maksim Shabunin 9eda260495 Merge pull request #4211 from alalek:fix_python_2_4 2015-07-24 13:33:51 +00:00
Maksim Shabunin 3ed54b9008 Merge pull request #4220 from alalek:fix_gcc_warnings_2_4 2015-07-24 13:09:44 +00:00
Alexander Alekhin 6b954cd24e Merge pull request #4219 from SpecLad:freak-missing-init 2015-07-22 12:52:36 +00:00
Alexander Alekhin 42ba5c7d16 fix GCC 4.9 warnings 2015-07-22 14:17:54 +03:00
Roman Donchenko 72ddeea479 FREAK: add missing field initialization 2015-07-22 14:06:39 +03:00
Vadim Pisarevsky 869dda4117 Merge pull request #4204 from gladilov-gleb:minMaxLocBugFix 2015-07-22 10:52:16 +00:00
Gleb Gladilov 07de67c32f Added test of minMaxLoc on filling with maximums of int 2015-07-22 11:43:35 +03:00
Gleb Gladilov c467d0d553 Fixed minMaxLoc and test functions 2015-07-21 17:17:23 +03:00
Alexander Alekhin 0906744788 fix python cross-compilation 2015-07-21 12:41:57 +03:00
Alexander Smorkalov 67158b12cd Merge pull request #4191 from SpecLad:irc-workaround 2015-07-16 08:17:45 +00:00
Roman Donchenko 9e50cf5375 Refactor a section of icvRotatingCalipers to work around a GCC bug
https://bugs.launchpad.net/ubuntu/+source/gcc-4.9/+bug/1474304
2015-07-14 13:26:47 +03:00
Alexander Alekhin 4bf82e50d0 Merge pull request #4187 from SpecLad:chessboard-png 2015-07-13 15:52:46 +00:00
Roman Donchenko 2e86d46cf2 CV_ChessboardDetectorTimingTest: don't ignore missing test data 2015-07-09 17:32:08 +03:00
Vadim Pisarevsky 707d10f115 Merge pull request #4137 from asmorkalov:as/ros_conflict 2015-06-22 11:52:05 +00:00
Alexander Alekhin 83a4ad5f51 Merge branch '2.4.9.x-prep' into 2.4 2015-06-19 14:55:38 +03:00
Alexander Alekhin e7b82a8561 Merge branch '2.4.8.x-prep' into 2.4 2015-06-19 14:54:18 +03:00
Alexander Smorkalov 546e68dc65 Merge pull request #4034 from jet47:opencv_run_all_tests_unix 2015-06-17 08:19:47 +00:00
Vadim Pisarevsky b7c2a46830 Merge pull request #4107 from SpecLad:libav-compat 2015-06-16 13:22:40 +00:00
Vadim Pisarevsky 719099ad6d Merge pull request #4104 from SpecLad:arm64-packaging 2015-06-16 13:19:11 +00:00
Vadim Pisarevsky 2e9004813e Merge pull request #4088 from howtobeahacker:2.4 2015-06-16 12:31:13 +00:00
Vincent Rabaud 50842b9036 get code to compile on Ubuntu Saucy
A define was forgotten for the codecs and there was a typo for
another.

(cherry picked from commit f052b0bc4d)

Conflicts:
	modules/videoio/src/ffmpeg_codecs.hpp
2015-06-09 15:53:08 +03:00
Vadim Pisarevsky 3d6413cfc6 fixed compile warnings; hopefully fixed test failures
(cherry picked from commit 30912b49f3)

Conflicts:
	modules/videoio/src/cap_ffmpeg_impl.hpp
	modules/videoio/src/ffmpeg_codecs.hpp
2015-06-09 15:53:08 +03:00
Vadim Pisarevsky 799622affd make sure opencv builds fine with the recent versions of libav (e.g. from Ubuntu 14.10)
(cherry picked from commit 2b2e3ee93c)

Conflicts:
	cmake/OpenCVFindLibsVideo.cmake
	modules/videoio/src/cap.cpp
	modules/videoio/src/cap_ffmpeg_impl.hpp
	modules/videoio/src/ffmpeg_codecs.hpp
	modules/videoio/test/test_ffmpeg.cpp
2015-06-09 15:53:08 +03:00
Alexander Smorkalov 57ab0d4d17 Debian packages header update to fix conflict with OpenCV from deb repo. 2015-06-09 14:59:12 +03:00
Roman Donchenko 02f8b85dd9 Add ARM64 packaging support 2015-06-08 18:03:08 +03:00
Roman Donchenko 1fbdca0c9b Set CPACK_DEBIAN_PACKAGE_ARCHITECTURE instead of CPACK_DEBIAN_ARCHITECTURE
Because that's the variable actually used by CPack.
2015-06-08 18:03:07 +03:00
howtobeahacker 9eaac6105f correct covariation matrix formula in Harris corner detector 2015-06-03 17:33:40 +08:00
Vadim Pisarevsky 83ace8d580 Merge pull request #4085 from berak:patch-3 2015-06-03 07:25:17 +00:00
berak 851ce27240 http://code.opencv.org/issues/4359 2.4 branch 2015-06-03 07:48:29 +02:00
Vadim Pisarevsky 70f8d807c8 Merge pull request #4003 from uwinsoftware:2.4 2015-05-29 18:55:55 +00:00
Vadim Pisarevsky daa21a4385 Merge pull request #4057 from apavlenko:24_java_memory_release 2015-05-28 14:59:46 +00:00
Vadim Pisarevsky 13cef0cdfc Merge pull request #4061 from ilya-lavrenov:android 2015-05-26 17:24:05 +00:00
Ilya Lavrenov 083aced3b4 fixed OS names 2015-05-26 17:41:23 +03:00
Andrey Pavlenko 72ec9c159e releasing native memory of temp Mat objects in generated Java code 2015-05-26 13:58:54 +03:00
Andrey Pavlenko 5b00d9da49 releasing native memory in Java converters 2015-05-26 13:58:35 +03:00
Vadim Pisarevsky 74bb0beeb0 Merge pull request #4008 from cr333:triangulation_fix_2.4 2015-05-23 10:18:08 +00:00
Vadim Pisarevsky 08714c510f Merge pull request #4042 from ilya-lavrenov:android_mk 2015-05-21 13:17:46 +00:00
Vadim Pisarevsky acfbed8654 Merge pull request #4037 from Lectem:patch-1 2015-05-21 12:33:42 +00:00
Vadim Pisarevsky 6212084046 Merge pull request #4041 from ilya-lavrenov:warning_fix 2015-05-21 12:24:46 +00:00
Ilya Lavrenov d89b6226a3 fixed Android mk generation for arm64-v8a 2015-05-21 15:00:46 +03:00
Ilya Lavrenov 11d1909e6b fixed warning 2015-05-21 11:49:06 +03:00
Lectem 3c6fe75149 fix mutex for uclibc
The uClibc doesn't have pthread_spin_* implemented on their 'old' linux threads.
Since it is on linux, we have to check if uclibc is using this implementation or not.
2015-05-20 12:18:28 +02:00
Alexander Smorkalov 00d9f690f6 Version++. 2015-05-20 11:21:28 +03:00
Vladislav Vinogradov ae79fe10dc do not loose logs from nvidia tests
(cherry picked from commit d58d277707)
2015-05-20 08:16:44 +03:00
Vladislav Vinogradov 62fc342d35 use fixed seed for RNG in gpu SolvePnPRansac test
(cherry picked from commit 95eed59f2d)
2015-05-20 08:16:22 +03:00
Vladislav Vinogradov 36924d6dbb use cv::theRNG() instead of ::rand() in gpu::solvePnPRansac
(cherry picked from commit 62bc647731)
2015-05-20 08:16:05 +03:00
Alexander Smorkalov ede4943d7e Merge pull request #4030 from asmorkalov:as/accurate_cuda_arch_aarch64 2015-05-20 05:12:43 +00:00
Alexander Smorkalov 9d148c76ca Merge pull request #4033 from jet47:gpu-tests-fix 2015-05-20 05:12:24 +00:00
Vladislav Vinogradov 21d8b588a2 exclude dates from report names 2015-05-19 18:26:13 +03:00
Vladislav Vinogradov 5d66b1130b save tests console output to separate log files 2015-05-19 18:26:13 +03:00
Vladislav Vinogradov 0550b2c1fe check that current directory has write access 2015-05-19 18:26:04 +03:00
Vladislav Vinogradov d58d277707 do not loose logs from nvidia tests 2015-05-19 17:28:43 +03:00
Vladislav Vinogradov 95eed59f2d use fixed seed for RNG in gpu SolvePnPRansac test 2015-05-19 17:27:50 +03:00
Vladislav Vinogradov 62bc647731 use cv::theRNG() instead of ::rand() in gpu::solvePnPRansac 2015-05-19 17:27:23 +03:00
Alexander Smorkalov 7f63776395 Precise default CUDA version for Tegra X1 chips. 2015-05-19 13:24:17 +03:00
Vadim Pisarevsky b9792fdc14 Merge pull request #3829 from ippei-i:2.4-flann-lsh-addable-index 2015-05-18 15:38:21 +00:00
Alexander Smorkalov 0410fe6978 Merge pull request #3785 from jet47:tiny-gpu-module 2015-05-18 08:00:12 +00:00
Christian Richardt 242e64c08d Fixed triangulation bug http://code.opencv.org/issues/4334. 2015-05-13 15:47:00 +02:00
Vadim Pisarevsky cc94b393c5 Merge pull request #3975 from StevenPuttemans:RGB_doc_fixing_2.4 2015-05-12 15:12:04 +00:00
Nguyen Nguyen 58dd70e8dc Revert support for audio 2015-05-08 12:06:03 -04:00
Nguyen Nguyen 53ff537f1c temporary fixes 2015-05-08 11:33:11 -04:00
Nguyen Nguyen a5814871d9 Adding audio to opencv 2015-05-06 17:01:38 -04:00
Vadim Pisarevsky 1aa03cecf1 Merge pull request #3981 from patrikhuber:vs2015-support 2015-05-06 15:35:36 +00:00
Vladislav Vinogradov f10537cdd6 fix tests compilation issue on Windows 2015-05-06 17:15:25 +03:00
Vladislav Vinogradov 9d294cbcf5 fix performance tests in tiny mode 2015-05-06 17:15:25 +03:00
Vladislav Vinogradov f1bec940b1 fix accuracy tests in tiny mode 2015-05-06 17:15:25 +03:00
Vladislav Vinogradov dd93d48be4 turn on stereob instantiates that required for tests 2015-05-06 17:15:25 +03:00
Vladislav Vinogradov ad3123adfd turn on some instantiates that required for other primitives 2015-05-06 17:15:25 +03:00
Vladislav Vinogradov f939d80f4c fixed seg faults 2015-05-06 17:15:25 +03:00
Vladislav Vinogradov ee316758ca reduce color instantiates for tiny build 2015-05-06 17:15:24 +03:00
Vladislav Vinogradov 6d7a61cbdc reduce copy_make_border instantiates for tiny build 2015-05-06 17:15:24 +03:00
Vladislav Vinogradov b44b1ab47b reduce matrix_reductions instantiates for tiny build 2015-05-06 17:15:24 +03:00
Vladislav Vinogradov 2e47a1a61b reduce pyramids instantiates for tiny build 2015-05-06 17:15:24 +03:00
Vladislav Vinogradov 72685cf01c reduce resize instantiates for tiny build 2015-05-06 17:15:24 +03:00
Vladislav Vinogradov 612888c066 reduce remap instantiates for tiny build 2015-05-06 17:15:24 +03:00
Vladislav Vinogradov e7b55f4982 reduce warp instantiates for tiny build 2015-05-06 17:15:24 +03:00
Vladislav Vinogradov 3004f5fa30 reduce stereobm instantiates for tiny build 2015-05-06 17:15:24 +03:00
Vladislav Vinogradov 9682d2afff reduce element_operations instantiates for tiny build 2015-05-06 17:15:24 +03:00
Vladislav Vinogradov 87d655325c reduce add_weighted instantiates for tiny build 2015-05-06 17:13:59 +03:00
Vladislav Vinogradov db25e44a17 reduce brute_force_matcher instantiates for tiny build 2015-05-06 17:13:59 +03:00
Vladislav Vinogradov b7a9e672c5 reduce bilateral filter instantiates for tiny build 2015-05-06 17:13:59 +03:00
Vladislav Vinogradov 8e49ab1d3b reduce filter2d instantiates for tiny build 2015-05-06 17:13:59 +03:00
Vladislav Vinogradov 00c36e88ef reduce separable filter instantiates for tiny build 2015-05-06 17:13:59 +03:00
Vladislav Vinogradov cde697dd14 introduce BUILD_TINY_GPU_MODULE CMake option
it adds OPENCV_TINY_GPU_MODULE definition, that will allow
to build tiny version of gpu module (with limited image format support)
2015-05-06 17:13:59 +03:00
Alexander Smorkalov e49e75da06 OpenCV patch verison++. 2015-05-06 16:29:51 +03:00
Vladislav Vinogradov 1d40946959 Bug #4315 : fix CUDA bitwise operations with mask
(cherry picked from commit d87c30dc84)
2015-05-06 16:27:12 +03:00
Alexander Smorkalov 2598392295 Added explicit deb package dependency from libtbb-dev if TBB is enabled.
(cherry picked from commit 63d6cc5ca6)
2015-05-06 16:26:50 +03:00
lujia 17cc5e2c40 bugfix_for_hog_detectMultiScale_with_weights
(cherry picked from commit 7ce116695d)
2015-05-06 16:24:39 +03:00
Vladislav Vinogradov 4b14400976 disable several heavy performance tests
(cherry picked from commit cbdddb473c)
2015-05-06 16:24:07 +03:00
Vladislav Vinogradov 4704a254f7 disable Video_PyrLKOpticalFlowDense performance test
sanity fails on Maxwell and CUDA 7.0 due to unknow reason
(cherry picked from commit b4c2891ef3)
2015-05-06 16:23:41 +03:00
Vladislav Vinogradov 7708e9882e use border extrapolation for central pixel in pyrDown
in case if image has odd dimension

(cherry picked from commit 1325213303)
2015-05-06 16:23:28 +03:00
Vladislav Vinogradov fe1bd0cc2f fix racecheck warning in scanRows kernel
(cherry picked from commit fb15bdfb21)
2015-05-06 16:23:09 +03:00
Vladislav Vinogradov a752f25944 increase epsilon for solvePnPRansac function
(cherry picked from commit 9d2d173485)
2015-05-06 16:22:57 +03:00
Alexander Smorkalov bb44316028 Merge pull request #3990 from jet47:cuda-bitwise-mask 2015-05-06 12:50:08 +00:00
Alexander Smorkalov 0b2cfcfda2 Merge pull request #3976 from SpecLad:rm-insertIframe 2015-05-06 12:47:59 +00:00
Alexander Smorkalov 9c02caf392 Merge pull request #3989 from asmorkalov:as/tbb_dep 2015-05-06 12:47:41 +00:00
Vladislav Vinogradov d87c30dc84 Bug #4315 : fix CUDA bitwise operations with mask 2015-05-06 13:28:08 +03:00
Alexander Smorkalov 63d6cc5ca6 Added explicit deb package dependency from libtbb-dev if TBB is enabled. 2015-05-06 13:10:39 +03:00
Nguyen Nguyen 9682430a69 Adding code to deal with audio output 2015-05-05 13:14:26 -04:00
Nguyen Nguyen b69ffe6376 Fixed memory leak when recording video in iOS 2015-05-04 16:21:25 -04:00
Nguyen Nguyen 1f72815637 Exporting videoFileString to outside world 2015-05-04 12:38:55 -04:00
Maksim Shabunin 90c3d7d361 Merge pull request #3969 from Dikay900:master_to_2_4 2015-05-04 10:13:45 +00:00
StevenPuttemans f4eebc46b2 Fixing all wrong uses of RGB channels instead of the OpenCV BGR standard 2015-05-04 09:23:15 +02:00
Patrik Huber 2b1103c1d3 Add support for VS2015
Without the fix, OpenCV will compile and silently copy the compiled libs/executables to a location not prefixed with arch/vc14, and OpenCV won't be picked up by find_package and OpenCVConfig.cmake.
2015-05-02 13:31:43 +01:00
Roman Donchenko 007a3ef8b6 Remove insertIframe.js
It hasn't been used since f82c04f. Also, the line adding the script had
an unneeded pathto call, so the script was being loaded from the wrong path
anyway.
2015-04-30 15:42:15 +03:00
Belev 83eb1d3608 Fix typo
Fixed difference in the given arguments to the ellipse function and the description after that

Fixed two more typos

Replaced unnecessary the with to

Conflicts:
	doc/tutorials/core/adding_images/adding_images.markdown
	doc/tutorials/core/basic_geometric_drawing/basic_geometric_drawing.markdown
	doc/tutorials/core/random_generator_and_text/random_generator_and_text.markdown
	modules/imgproc/include/opencv2/imgproc.hpp
2015-04-30 09:14:36 +02:00
Andrey Pavlenko 5c12c92243 Merge pull request #3961 from apavlenko:2.4_fix_polylines_empty 2015-04-28 16:22:31 +00:00
Martin Ueding 9e29762838 Add example data types for calibrateCamera call
It took me a while to figure out what was meant with

    OpenCV Error: Assertion failed (i < 0) in getMat

While searching for this error message I found [a list of error
messages](https://adventuresandwhathaveyou.wordpress.com/2014/03/14/opencv-error-messages-suck/)
which also explained what the problem was: The data type for `rvecs` was
not a simple `cv::Mat` but a `std::vector<cv::Mat>`.

After I fixed that, I got the next error message:

    OpenCV Error: Assertion failed (ni > 0 && ni == ni1) in
    collectCalibrationData, file
    /build/buildd/opencv-2.4.9+dfsg/modules/calib3d/src/calibration.cpp,
    line 3193

The problem here was that my data type for the `objectPoints` was just
`vector<Vec3f>` and not `vector<vector<Vec3f>>`.

In order to save other people the time looking for this, I added
explicit examples of the needed data types into the documentation of the
function. I had to re-read the current version a couple of times until I
can read the needed levels of `vector<>`. Having this example would have
really helped me there.

Conflicts:
	modules/calib3d/include/opencv2/calib3d.hpp
2015-04-28 17:24:37 +02:00
Vadim Pisarevsky da229cce9a Merge pull request #3946 from zjulujia:bugfix_for_hog_detectMultiScale_with_weights 2015-04-28 10:54:45 +00:00
Vadim Pisarevsky 36af97d00c Merge pull request #3959 from jet47:gpu-fixes 2015-04-28 10:49:06 +00:00
Vadim Pisarevsky d705c651f2 Merge pull request #3960 from ilya-lavrenov:aarch64_test_fixes 2015-04-28 10:48:33 +00:00
Vadim Pisarevsky 08848c56b7 Merge pull request #3965 from Dikay900:2_4_diff_to_master_2 2015-04-28 10:47:05 +00:00
Vadim Pisarevsky ebe979090e Merge pull request #3963 from Dikay900:2_4_diff_to_master 2015-04-28 10:41:42 +00:00
Pierre Moulon 901d4995e3 Fix a typo error
Fix a typo error
Conflicts:
	modules/features2d/include/opencv2/features2d.hpp
2015-04-25 15:07:17 +02:00
Adi Shavit aad95c7d8c Added call to clone() to avoid unexpected change to external data.
- Fix both stitching_detailed.cpp sample and cv::Stitcher.
2015-04-25 14:54:35 +02:00
Dikay900 d9b7b300b4 fix qt example on 2.4 with vs2010 and higher 2015-04-25 14:46:17 +02:00
Brian Park 044de4105e add input paramter checking that verifies the existance of the input files to stero_match example
remove the unnecessary header file

check input paramter by checking the image size
2015-04-25 14:46:17 +02:00
Chris Mayo 7a5aa06b9e Act on INSTALL_PYTHON_EXAMPLES
Conflicts:
	samples/CMakeLists.txt
2015-04-25 14:46:16 +02:00
Ben Hagen a21fb63c28 store user-provided data in PlaneTracker class 2015-04-25 11:22:18 +02:00
Yang Fan eaa9b78121 ENH: explicitly declared outputFilename to surpress error C2668
Conflicts:
	samples/gpu/video_writer.cpp
2015-04-25 10:58:01 +02:00
Abhijit Kundu fd4df0f67d Added suuport for finding Intel TBB for Visual Studio 2013 2015-04-25 10:23:34 +02:00
Simon Heinen 6decc2596d squashed #3729
Update android+AsyncServiceHelper.java

Update android+AsyncServiceHelper.java

changed tabs in last commit to spaces

Update android+AsyncServiceHelper.java

small formatting fixes
2015-04-24 23:02:10 +02:00
Eric Sommerlade 41b920344d added support for uncompressed parameters to tiff image format as described here: expertland.net/question/b6o3n6p9a72341db823b48nl98m91dx8n1/detail.html
Conflicts:
	modules/imgcodecs/src/grfmt_tiff.cpp
2015-04-24 22:59:08 +02:00
Ying Xiong 82668e06d4 Silence cmake 3.0+ warnings about MACOSX_RPATH 2015-04-24 22:39:49 +02:00
ttagu99 a81374c1d7 findcontour_example check image empty 2015-04-24 21:58:31 +02:00
侯骥 66fc6126d2 Update MatchTemplate_Demo.cpp 2015-04-24 21:58:31 +02:00
Jay Bosamiya 8b58b59df4 Fix typo 2015-04-24 21:58:30 +02:00
RafaRuiz f0595b8254 Update lkdemo.cpp because of memory leak
In MacOSx x64 it was getting a memory leak even without initializing points:
http://code.opencv.org/issues/4250
2015-04-24 21:58:29 +02:00
Pastafarianist 1e01441767 Fixed typo 2015-04-24 21:58:29 +02:00
Dikay900 c797746b6e use constant instead of value backported from #785 2015-04-24 21:58:28 +02:00
Dikay900 1bf4427a5c filename correction from #3217 2015-04-24 21:58:28 +02:00
Kevin Hughes ac3ec0d96d squashed #823
removed separate example for reading image sequences and modified starter_video.cpp to better explain the functionality of VideoCapture. I also added a bit more explanation in the documentation of the VideoCapture interface

Conflicts:
	modules/highgui/doc/reading_and_writing_images_and_video.rst
	samples/cpp/starter_video.cpp

starter_video.cpp changed CV WINDOW KEEPRATIO to just WINDOW KEEPTATIO to fix build error

starter_video.cpp hid local functions
2015-04-24 21:58:14 +02:00
Maximilien Cuony 5c6c537044 Fix typo in error for extrinsic parameters 2015-04-24 18:39:34 +02:00
Dikay900 f8c82fc214 update openni sample comments referring #81 2015-04-24 18:25:23 +02:00
Andrey Pavlenko 40b762bceb adding test for polylines() call with empty Point-s vector and fix for crash in this case 2015-04-24 16:40:14 +03:00
Ilya Lavrenov 89e3c508d8 fixed tests for aarch64 2015-04-24 13:56:20 +03:00
Vladislav Vinogradov cbdddb473c disable several heavy performance tests 2015-04-23 19:09:03 +03:00
Vladislav Vinogradov b4c2891ef3 disable Video_PyrLKOpticalFlowDense performance test
sanity fails on Maxwell and CUDA 7.0 due to unknow reason
2015-04-23 19:08:40 +03:00
Vladislav Vinogradov 1325213303 use border extrapolation for central pixel in pyrDown
in case if image has odd dimension
2015-04-23 17:21:42 +03:00
Vladislav Vinogradov fb15bdfb21 fix racecheck warning in scanRows kernel 2015-04-23 17:21:42 +03:00
Vladislav Vinogradov 9d2d173485 increase epsilon for solvePnPRansac function 2015-04-23 17:21:42 +03:00
Vadim Pisarevsky 26e3bcb9de Merge pull request #3956 from ilya-lavrenov:cuda_aarch64 2015-04-23 13:49:33 +00:00
Vadim Pisarevsky 960dee8ab8 Merge pull request #3953 from ilya-lavrenov:cuda_unused 2015-04-23 12:26:07 +00:00
Ilya Lavrenov 847976de4e fixed find cuda for aarch64 2015-04-23 14:49:12 +03:00
Ilya Lavrenov ceec0eb33a rmeoved unused functions 2015-04-23 12:48:50 +03:00
Vadim Pisarevsky 4840c4ae6f Merge pull request #3949 from ilya-lavrenov:clobbered_warning 2015-04-22 19:07:46 +00:00
Ilya Lavrenov 02e29fc99c suppress -Wclobbered warning 2015-04-22 16:42:03 +03:00
lujia 7ce116695d bugfix_for_hog_detectMultiScale_with_weights 2015-04-21 02:32:27 -04:00
Vadim Pisarevsky c879b1ab09 Merge pull request #3940 from sergarrido:fix-gen_pattern.py-2.4 2015-04-20 19:47:55 +00:00
Vladislav Vinogradov a984da911b increase epsilons for some sanity tests
(cherry picked from commit 6a6619ec1e)
2015-04-19 14:06:47 +03:00
Vladislav Vinogradov df55be3c3d fix BruteForceMatcher resource distribution
added launch bounds attributes for all CUDA kernels
(cherry picked from commit d22516872c)
2015-04-19 14:06:36 +03:00
Vladislav Vinogradov 55339de684 make NVIDIA tests verbose by default
(cherry picked from commit 17608f7ade)
2015-04-19 14:06:25 +03:00
Vladislav Vinogradov f08dd510fa fixed a bug in scanRows CUDA kernel (part of nppStIntegral)
uninitialized value
(cherry picked from commit 81ebe28c24)
2015-04-19 14:06:11 +03:00
Alexander Smorkalov de8d8720a2 Merge pull request #3924 from jet47:gpu-fixes 2015-04-19 11:04:55 +00:00
Vladislav Vinogradov d308ed3712 fix GPU WARP border mode in CUDA 7.0 and Maxwell architecture
(cherry picked from commit 27302c367c)
2015-04-19 14:02:54 +03:00
Vladislav Vinogradov 6d0f8aa893 fix tests for gpu HOG
initialize HOG after CUDA device switch
(cherry picked from commit c849492dfa)
2015-04-19 14:01:16 +03:00
Vladimir Kolesnikov bea98bd22a Not block PDB file in multithreaded build on Windows.
If used cl compiler, but generator is not Visual Studio e.g. Ninja,
enable FS option to prevent blocking PDB file in multithreaded build.

(cherry picked from commit 58c9135626)
2015-04-19 14:00:24 +03:00
Vladislav Vinogradov 4539607ab1 fix gpu HOG implementation:
move hog::set_up_constants from constructor to compute method

if user changed CUDA device between constructor and computation,
some variables were uninitialized
(cherry picked from commit 21bbed7baf)
2015-04-19 13:57:37 +03:00
Vladislav Vinogradov b320138dba fix GpuMat::setTo implementation
previous implementation was not thread/stream safe, since it used constant
memory

new implementation doesn't use any global objects, so it is thread/stream safe
(cherry picked from commit 4f5d30a865)
2015-04-19 13:57:23 +03:00
Vladislav Vinogradov 95ea12588e set epsilon for gpu OpticalFlowBM to 1e-6, since it uses floating point arithmetic
(cherry picked from commit c147ab1e85)
2015-04-19 13:57:03 +03:00
Roman Donchenko bcd08b5d18 Mark the libs component required
Everything else depends on it, after all.

(cherry picked from commit cf54e3b97e)
2015-04-19 13:55:35 +03:00
Roman Donchenko 19298ae3cb Add component display names
(cherry picked from commit 6d52ea8984)
2015-04-19 13:55:22 +03:00
Roman Donchenko 5e06da3050 Update the CPack variables to match the changes in asmorkalov/CMake#1
Which also happens to align the non-Debian specific variables
with the ones used by upstream CMake.

(cherry picked from commit b8c60234c3)

Conflicts:
	cmake/OpenCVPackaging.cmake
2015-04-19 13:54:32 +03:00
Roman Donchenko 17ac18a7b9 Remove useless CPACK_*_COMPONENT_INSTALL variables
They don't actually do anything. And even if they did, all components are
enabled by default, anyway.

(cherry picked from commit 49fe496914)
2015-04-19 13:42:14 +03:00
Roman Donchenko c259590b26 Fix a memory leak in CvCapture_FFMPEG::close
FFmpeg now requires that frames allocated with avcodec_alloc_frame are
freed with avcodec_free_frame.

(cherry picked from commit 77578d415f)
2015-04-19 13:41:22 +03:00
Roman Donchenko 3f3ca85103 Don't use ${CMAKE_INSTALL_PREFIX} as an install destination
Absolute destinations are not necessary, and prevent CPack from working.

(cherry picked from commit 0387f8ad56)
2015-04-19 13:39:55 +03:00
Alexander Smorkalov 05ddc16eaa Added Debian changelog to -tests package.
(cherry picked from commit a87ccb9ac0)
2015-04-19 13:39:01 +03:00
Alexander Smorkalov 2ba77614aa Debian package names replaced by lower case version to satisfy lintian.
(cherry picked from commit e6ac64008b)
2015-04-19 13:38:46 +03:00
Vladislav Vinogradov ef347aa6a4 disable gpu::matchTemplate tests
(cherry picked from commit 7bb8c50080)
2015-04-19 13:38:20 +03:00
Alexander Smorkalov b1cdb91139 Fixed samples install permissions for Debian packaging.
(cherry picked from commit cf852972d1)
2015-04-19 13:37:50 +03:00
Alexander Smorkalov a09ad35d98 opencv_testing.sh script installation is removed as run tests script does the same thing.
(cherry picked from commit 9206ec30a2)
2015-04-19 13:37:29 +03:00
Alexander Smorkalov 1b5835cd35 Added dependency from numpy to debian package with python bindings.
(cherry picked from commit be6b847675)
2015-04-19 13:37:04 +03:00
Alexander Smorkalov 9932bbad3a Added Debian changelog installation step for Debian package generation.
(cherry picked from commit ddc1b965b6)
2015-04-19 13:36:47 +03:00
Vijay Pradeep 39ac84ff04 Fixing race condition by expanding resultsMutex lock section
(cherry picked from commit 042ff210d5)
2015-04-19 13:36:17 +03:00
Vladislav Vinogradov fcbefaff86 fix tests for gpu::matchTemplate:
use ASSERT_FLOAT_EQ to compare float values, it is more robust for
large values
(cherry picked from commit d00f36ec75)
2015-04-19 13:32:24 +03:00
Roman Donchenko bf2256fb89 cvOpenFileStorage: reduce the scope of xml_buf and make sure it's freed...
... before any exceptions occur.

(cherry picked from commit 08da247a87)
2015-04-19 13:31:52 +03:00
Vladislav Vinogradov b0b2fc9e3f get rid of cuda.h usage
(cherry picked from commit eeb997261d)
2015-04-19 13:29:45 +03:00
Roman Donchenko 1ccd64e102 Fix uninitialized memory reads and memory leaks in StereoGC
(cherry picked from commit 7d8e5f623a)
2015-04-19 13:27:55 +03:00
Vicente Olivert Riera 23bf3e337a superres: Fix return value VideoFrameSource_GPU
superres module fails to compile with the following error messages:

[100%] Building CXX object modules/superres/CMakeFiles/opencv_superres.dir/src/super_resolution.cpp.o
/opencv-2.4.10/modules/superres/src/frame_source.cpp: In function 'cv::Ptr<cv::superres::FrameSource> cv::superres::createFrameSource_Video_GPU(const string&)':
/opencv-2.4.10/modules/superres/src/frame_source.cpp:263:16: error: expected type-specifier before 'VideoFrameSource'
/opencv-2.4.10/modules/superres/src/frame_source.cpp:263:16: error: could not convert '(int*)operator new(4ul)' from 'int*' to 'cv::Ptr<cv::superres::FrameSource>'
/opencv-2.4.10/modules/superres/src/frame_source.cpp:263:16: error: expected ';' before 'VideoFrameSource'
/opencv-2.4.10/modules/superres/src/frame_source.cpp:263:41: error: 'VideoFrameSource' was not declared in this scope
/opencv-2.4.10/modules/superres/src/frame_source.cpp:264:1: error: control reaches end of non-void function [-Werror=return-type]
cc1plus: some warnings being treated as errors
make[3]: *** [modules/superres/CMakeFiles/opencv_superres.dir/src/frame_source.cpp.o] Error 1
make[3]: *** Waiting for unfinished jobs....

This is caused because the return value of the createFrameSource_Video_GPU function should be a VideoFrameSource_GPU object.
(cherry picked from commit 2e393ab833)
2015-04-19 13:25:16 +03:00
Vladislav Vinogradov 3cf265992f fix installation layout for debian packages:
Install symlinks to shared libraries as a part of development package,
not runtime package.

It is default behavior for debian packages.
(cherry picked from commit f55c1cc0fb)
2015-04-19 13:23:47 +03:00
S. Garrido a855d230ec completing and fixing gen_pattern.py for 2.4 branch 2015-04-18 22:13:22 +02:00
Vladislav Vinogradov 6a6619ec1e increase epsilons for some sanity tests 2015-04-14 10:12:56 +03:00
Alexander Alekhin 8c2bde2af4 Merge pull request #3923 from ilya-lavrenov:typo 2015-04-13 16:57:13 +00:00
Vladislav Vinogradov d22516872c fix BruteForceMatcher resource distribution
added launch bounds attributes for all CUDA kernels
2015-04-13 17:12:04 +03:00
Vladislav Vinogradov 17608f7ade make NVIDIA tests verbose by default 2015-04-13 17:11:19 +03:00
Vladislav Vinogradov 81ebe28c24 fixed a bug in scanRows CUDA kernel (part of nppStIntegral)
uninitialized value
2015-04-13 17:09:59 +03:00
Vadim Pisarevsky f7792f0be2 Merge pull request #3908 from jet47:gpu-wrap-border-mode 2015-04-07 11:44:51 +00:00
Vladislav Vinogradov 27302c367c fix GPU WARP border mode in CUDA 7.0 and Maxwell architecture 2015-04-07 13:04:31 +03:00
Vadim Pisarevsky a153948a19 Merge pull request #3898 from greensea:2.4 2015-04-07 09:31:36 +00:00
Ilya Lavrenov 4273534c92 typo 2015-04-07 11:08:21 +03:00
greensea 7274e2ff1a Fix a segment fault issue in cascade classfier 2015-04-07 10:38:58 +08:00
Vadim Pisarevsky 0e8bfff386 Merge pull request #3904 from SeninAndrew:2.4 2015-04-05 18:00:30 +00:00
Andrew Senin 8c55d7be5e Ximea camera fix (see issue #4235) 2015-04-03 22:50:05 +03:00
Vadim Pisarevsky f6de017171 Merge pull request #3900 from apavlenko:doc_fix_imwrite 2015-04-03 13:26:00 +00:00
Vadim Pisarevsky cc63452f65 Merge pull request #3899 from StevenPuttemans:add_breakrule_traincascade_2.4 2015-04-03 11:44:55 +00:00
Andrey Pavlenko eeae81e903 fixing confusing variable naming in a sample code 2015-04-03 13:54:49 +03:00
StevenPuttemans e30139edc3 add the possibility to add traincascade accuracy 2015-04-03 12:47:09 +02:00
Vadim Pisarevsky f01b2413c3 Merge pull request #3770 from jet47:gpu-hog-tests 2015-04-03 10:32:59 +00:00
Alexander Smorkalov 772fcf4088 Merge pull request #3893 from SpecLad:cuda-imported-targets 2015-04-02 13:56:31 +00:00
ippei ito b8c00854fe instead of "using namespace cv" put all the tests into cv:: namespace. 2015-04-02 19:58:19 +09:00
Vadim Pisarevsky ba0a8dc723 Merge pull request #3783 from StevenPuttemans:fix_traincascade_getNegatives 2015-04-01 13:56:29 +00:00
Vadim Pisarevsky 100c2dd91c Merge pull request #3852 from renko:multithread_cl_not_studio_generator 2015-04-01 13:25:39 +00:00
Vladimir Kolesnikov 58c9135626 Not block PDB file in multithreaded build on Windows.
If used cl compiler, but generator is not Visual Studio e.g. Ninja,
enable FS option to prevent blocking PDB file in multithreaded build.
2015-04-01 13:52:07 +03:00
Roman Donchenko 6e121b2e29 Use imported targets for linking to CUDA
This retains the desirable quality of not including paths to CUDA libraries
from the build system into the config files, and has two major advantages:

* It removes the need to use link_directories, which doesn't guarantee that
  the libraries from the supplied directory will be used (there may be
  libraries with the same names earlier in the search path).

* It removes the need to put -L entries into OPENCV_LINKER_LIBS. This variable
  is used with target_link_libraries, where such entries are treated as linker
  flags, so doing this is unportable. I remove the support for -L entries
  from OpenCVGenPkgconfig.cmake, as well, to discourage adding them in the
  future.
2015-03-31 13:46:28 +03:00
Roman Donchenko e6619cf580 Move the CUDA searching code in OpenCVConfig.cmake.in out of the foreach loop
There's no reason to do it twice.
2015-03-30 15:04:27 +03:00
Roman Donchenko 122b9f8e17 Turn ocv_convert_to_lib_name into a function 2015-03-30 14:58:37 +03:00
Vadim Pisarevsky d948b2a235 Merge pull request #3886 from beahacker:2.4 2015-03-30 09:09:31 +00:00
howtobeahacker ebd7d08408 fix bug 4269 2015-03-30 00:01:20 +08:00
ippei ito 140051b18c Merge remote-tracking branch 'origin/2.4-flann-lsh-addable-index' into 2.4-flann-lsh-addable-index 2015-03-27 20:55:59 +09:00
ippei ito b7276359e9 Test accuracy for PR#3829 2015-03-27 20:54:05 +09:00
Vadim Pisarevsky 83d6d70a56 Merge pull request #3855 from polarfuchs99:2.4 2015-03-26 16:55:30 +00:00
Prof. Dr. Rudolf Haussmann a9d4e05346 Changes to be committed:
(use "git reset HEAD <file>..." to unstage)

	modified:   highgui/include/opencv2/highgui/highgui_c.h
	modified:   highgui/src/cap_dshow.cpp
	modified:   java/generator/gen_java.py

The correction of the orthographic error in the enumeration constant
CAP_PROP_MONOCROME has been undone.
2015-03-25 15:45:20 +01:00
Prof. Dr. Rudolf Haussmann e5e6367223 Merge remote-tracking branch 'upstream/2.4' into 2.4 2015-03-25 13:38:49 +01:00
Vadim Pisarevsky 5678ba1227 Merge pull request #3805 from nitsch:fix-mingw-cmake-config 2015-03-25 09:53:35 +00:00
Vadim Pisarevsky b01f067614 Merge pull request #3865 from tdsmith:2.4-python-linkage 2015-03-25 09:52:52 +00:00
ippei ito 65b0ecfec5 Test accuracy for PR#3829.Fix WOrder warning on gcc 2015-03-25 18:24:52 +09:00
ippei ito d1902a1276 Test accuracy for PR#3829.Fix warning on gcc, comment out INIT_RANDOM_SEED for same result each ran. 2015-03-25 05:28:29 +09:00
ippei ito 56cae1b293 Test accuracy for PR#3829.Fix Some Error, Modify SLA. 2015-03-25 03:11:44 +09:00
ippei ito 7c740b6a31 Test accuracy for Pull Request # 3829 2015-03-25 02:38:01 +09:00
Alexander Nitsch d430664791 Remove local variables from CMAKE namespace 2015-03-24 14:42:55 +01:00
Tim D. Smith d057828ee3 Don't explicitly link Python on OS X
Explicitly linking to a Python framework on OS X prevents modules from
being built against one python (i.e. system python) and imported from
another (i.e. Homebrew python); the interpreter segfaults if there's a
linkage to a foreign python. Building the module with `-undefined
dynamic_lookup` instead of an explicit link allows the symbols to be
resolved at load time from a compatible python.
2015-03-23 23:13:48 -07:00
Vadim Pisarevsky c9bb18b9f7 Merge pull request #3850 from piponazo:2.4 2015-03-23 08:03:49 +00:00
Vadim Pisarevsky 297e2b6f1a Merge pull request #3834 from asmorkalov:retina_docs_fix 2015-03-20 10:14:29 +00:00
Vadim Pisarevsky 3853a18e0e Merge pull request #3792 from laomaiweng:cuda-pkg-config-Ldir 2015-03-20 10:13:46 +00:00
Vadim Pisarevsky 226b4e3ed5 Merge pull request #3839 from hyperscience:fix-free-space-check-in-grow-seq 2015-03-20 09:37:49 +00:00
Prof. Dr. Rudolf Haussmann 756c1a22d9 Merge remote-tracking branch 'upstream/2.4' into 2.4 2015-03-20 01:44:29 +01:00
Prof. Dr. Rudolf Haussmann a7bf1d53d8 Changes to be committed:
(use "git reset HEAD <file>..." to unstage)

	modified:   modules/highgui/include/opencv2/highgui/highgui_c.h
	modified:   modules/highgui/src/cap_dshow.cpp
	modified:   modules/highgui/src/cap_pvapi.cpp
	modified:   modules/java/generator/gen_java.py

Änderungen in der PvAPI hinzugefügt.
2015-03-20 01:42:16 +01:00
Luis Díaz Más 7711cd284b Fix a bug that impede to set the trackbar pos using the Qt control panel 2015-03-19 21:25:10 +01:00
Boris Daskalov 8755ffbf31 Fix a bad free space check in icvGrowSeq.
A difference of two pointers was casted to unsigned which can lead to
overflow on 64-bit systems.
2015-03-19 17:32:32 +02:00
Vadim Pisarevsky 69344f175b Merge pull request #3843 from piponazo:BugFix4244 2015-03-19 12:15:41 +00:00
Luis Díaz Más d14a1de947 Fixing the bug #4244 that I just reported in code.opencv.org 2015-03-18 20:07:08 +01:00
Alexander Smorkalov 514b3b520c Documentation update after iOS warnings fix in contrib/retina header. 2015-03-17 19:25:05 +03:00
Vadim Pisarevsky 4a6b1805e0 Merge pull request #3824 from Milania1:tutorial_hough_lines_fix 2015-03-17 11:14:13 +00:00
Vadim Pisarevsky 4ab525c880 Merge pull request #3810 from StevenPuttemans:upgrade_traincascade_default_memory 2015-03-16 10:02:07 +00:00
ippei ito 7d665a4754 Fix warn conversion from 'size_t' to 'int'. add comment for doxygen 2015-03-14 09:35:53 +09:00
ippei ito f7d52c774e Fix compile error on linux change cv::InputArray& to cv::InputArray 2015-03-14 06:58:34 +09:00
ippei ito 8efdfd9dfc Fix unused-parameter Warning 2015-03-14 06:07:55 +09:00
ippei ito cd42e38013 FlannBasedMatcher(LshIndex) in the feature2d optimization for continuance additional train()
Current implementation of miniflann is releasing the trained index, and
rebuilding the index from the beginning.
But, some indexing algorithms like the LSH are able to add the indexing
data after that.
This branch is implementation of that optimization for LshIndex
FlannBasedMatcher in the feature2d.
2015-03-14 04:38:07 +09:00
Milania1 339e6aa782 fixed error in hough lines tutorial (the point (9,4) is not on the lines, but the point (4,9) is) 2015-03-12 16:46:25 +01:00
Vadim Pisarevsky 309eb3c122 Merge pull request #3815 from StevenPuttemans:add_camera_IP_regulations 2015-03-12 14:39:48 +00:00
Vadim Pisarevsky 2594e5e384 Merge pull request #3800 from StevenPuttemans:add_parameter_info_annotation 2015-03-12 14:29:04 +00:00
StevenPuttemans 3a7ea37090 extra camera specific information for IP settings 2015-03-10 10:16:13 +01:00
StevenPuttemans 9f0cd9ee10 upgrade traincascade default memory 2015-03-09 10:43:14 +01:00
Alexander Nitsch 13694c8ae8 Fix MinGW detection on x86
Make detection of x64 using the gcc's target triplet identical
to the one used in cmake/OpenCVDetectCXXCompiler.cmake.
Otherwise, MinGW-w64 setups will always be treated as x64 since
they contain "w64" as vendor key.
2015-03-07 15:49:48 +01:00
Alexander Nitsch dde7c22fad Fix MinGW architecture detection
Fix typo that would always lead to detection of x86 for MinGW
builds in the OpenCVConfig.cmake file.
2015-03-07 15:37:21 +01:00
Alexander Alekhin 29e7eb7719 Merge pull request #3789 from StevenPuttemans:fix_cmakelist_annotation 2015-03-06 14:53:43 +00:00
StevenPuttemans 3419c704a9 adding usage information 2015-03-06 13:52:52 +01:00
StevenPuttemans cdbb661eab update cmakelists of annotation tool 2015-03-06 12:51:28 +01:00
quentin afdf319f36 Add -L for CUDA libs path to pkg-config
Add all dirs from CUDA_LIBS_PATH as -L linker options to
OPENCV_LINKER_LIBS. These will end up in opencv.pc.
2015-03-05 14:37:21 +01:00
StevenPuttemans 488babf3b3 fixing undesired behaviour 2015-03-04 12:03:33 +01:00
Vadim Pisarevsky 2c57717ca2 Merge pull request #3774 from JoeHowse:2.4 2015-03-03 12:31:29 +00:00
Joe Howse e9b4813bb2 Cat face detection cascades 2015-03-02 11:58:08 -04:00
Vadim Pisarevsky 9185b62a1d Merge pull request #3761 from StevenPuttemans:fix_smile_model 2015-03-02 11:49:41 +00:00
Vadim Pisarevsky ac8045b9c6 Merge pull request #3754 from eliteraspberries:unsigned-mask 2015-03-02 11:34:43 +00:00
Vadim Pisarevsky 417f1e51a4 Merge pull request #3755 from eliteraspberries:mat-size-sign 2015-03-02 11:34:09 +00:00
Vadim Pisarevsky b595812bd0 Merge pull request #3745 from nitsch:fix-mingw-detection 2015-03-02 10:55:00 +00:00
Vadim Pisarevsky 0172bd6beb Merge pull request #3756 from eliteraspberries:cast-double 2015-03-02 10:52:28 +00:00
Vadim Pisarevsky e02d6e2c8f Merge pull request #3766 from StevenPuttemans:add_GPU_old_models 2015-03-02 10:49:38 +00:00
Vadim Pisarevsky 7458dfc082 Merge pull request #3765 from jet47:gpu-hog-fix 2015-03-02 10:34:51 +00:00
Vadim Pisarevsky bed8cb42be Merge pull request #3768 from jet47:gpumat-set-to 2015-03-02 10:33:45 +00:00
Vladislav Vinogradov c849492dfa fix tests for gpu HOG
initialize HOG after CUDA device switch
2015-03-02 11:02:47 +03:00
Vladislav Vinogradov 4f5d30a865 fix GpuMat::setTo implementation
previous implementation was not thread/stream safe, since it used constant
memory

new implementation doesn't use any global objects, so it is thread/stream safe
2015-02-27 16:28:06 +03:00
StevenPuttemans 2c0ef660bf Add GPU models in seperate folder, only old models are supported and they were replaced to make the CPU interface work.
This solves the undesired consequence of breaking the GPU interface.
2015-02-27 14:15:30 +01:00
Vladislav Vinogradov 21bbed7baf fix gpu HOG implementation:
move hog::set_up_constants from constructor to compute method

if user changed CUDA device between constructor and computation,
some variables were uninitialized
2015-02-27 14:28:12 +03:00
StevenPuttemans 1e95c964f3 fixing model size, typo in previous PR 2015-02-26 15:53:00 +01:00
Vadim Pisarevsky 2c9547e314 Merge pull request #3747 from StevenPuttemans:fix_annotationtool_extras 2015-02-25 12:10:31 +00:00
Alexander Smorkalov f73a97b53b Merge pull request #3751 from jet47:gpu-bmoptflow-test-epsilon 2015-02-25 11:54:44 +00:00
StevenPuttemans 387a0f26fb fix annotation tool, add auto make of tool 2015-02-25 11:27:59 +01:00
Vladislav Vinogradov c147ab1e85 set epsilon for gpu OpticalFlowBM to 1e-6, since it uses floating point arithmetic 2015-02-25 13:16:36 +03:00
Alexander Nitsch a5b293b412 Fix setting of architecture for MinGW builds
The architecture has been correctly determined earlier in this
file. No need to do it again.
2015-02-24 23:13:27 +01:00
Mansour Moufid 7d4cbbd7aa Cast a long integer to double explicitly. 2015-02-24 17:04:28 -05:00
Mansour Moufid b7be49426d Cast some image coordinates and sizes to double. 2015-02-24 12:21:34 -05:00
Alexander Smorkalov 96d7bcc2a9 Merge pull request #3677 from ilya-lavrenov:cuda_backport 2015-02-24 15:06:15 +00:00
Vadim Pisarevsky 2d2ecbf3ee Merge pull request #3653 from StevenPuttemans:add_annotationtool 2015-02-24 13:50:39 +00:00
Ilya Lavrenov e03136e951 backport from master 2015-02-24 16:05:21 +03:00
Alexander Smorkalov 1c6e9fdfae Merge pull request #3735 from SpecLad:align-cpack-variables 2015-02-24 11:42:40 +00:00
Maksim Shabunin d56dd0e091 Merge pull request #3727 from StevenPuttemans:fix_3714_2.4 2015-02-24 10:08:43 +00:00
Maksim Shabunin baabd95f30 Merge pull request #3740 from StevenPuttemans:fix_3028_2.4 2015-02-24 10:06:20 +00:00
Alexander Smorkalov 877058aaed Merge pull request #3739 from ilya-lavrenov:2_4_cc 2015-02-24 09:35:32 +00:00
Mansour Moufid 42b1c6440c Cast some matrix sizes to type int. 2015-02-23 23:19:33 -05:00
Mansour Moufid 35a89b1541 Change some vector mask types to unsigned. 2015-02-23 23:10:57 -05:00
Alexander Nitsch 8ae6402799 Fix MinGW detection on x86
MinGW-w64 always uses "w64" as vendor key which the previously
used check for "64" anywhere in the target triplet matched. This
would lead to MinGW-w64 setups always being treated as x64.

Since we are actually interested in finding the "64" in the
triplet's operating system key, this fix makes sure to look for
"mingw64" and thus avoids the false match.

Fixes issue #3835. Credits to Lode Leroy for the original patch.
2015-02-23 15:03:28 +01:00
StevenPuttemans 720fd144ef add fit ellipse technique notice 2015-02-23 14:59:40 +01:00
Ilya Lavrenov 0832b47d21 fixed cross-compilation for Android with CUDA 2015-02-22 13:18:57 +03:00
Alexander Smorkalov dcc569ee5c Merge pull request #3721 from nitsch:fix-cmake-current-list-dir 2015-02-21 16:49:36 +00:00
Alexander Smorkalov 0cbe2f2eab Merge pull request #3708 from StevenPuttemans:fix_traincascade_load_message 2015-02-21 16:47:58 +00:00
Alexander Smorkalov 3df13ff564 Merge pull request #3732 from StevenPuttemans:fix_4004_2.4 2015-02-21 16:46:41 +00:00
Alexander Nitsch c2944dbc0c Exclude >= 2.8.3 from reimplementation of CMAKE_CURRENT_LIST_DIR
This avoids violation of possible future CMake policy checks
regarding reserved/read-only variables.
2015-02-20 19:55:46 +01:00
Andrey Pavlenko c059f7ddcd Merge pull request #3726 from asmorkalov:ocv_version_inc4 2015-02-20 16:11:58 +00:00
Roman Donchenko cf54e3b97e Mark the libs component required
Everything else depends on it, after all.
2015-02-20 18:37:21 +03:00
Roman Donchenko 6d52ea8984 Add component display names 2015-02-20 18:22:01 +03:00
Roman Donchenko b8c60234c3 Update the CPack variables to match the changes in asmorkalov/CMake#1
Which also happens to align the non-Debian specific variables
with the ones used by upstream CMake.
2015-02-20 18:21:47 +03:00
StevenPuttemans 2136c3f3c8 add remarks for iOS tutorial 2015-02-20 15:14:36 +01:00
Vadim Pisarevsky a46166d30f Merge pull request #3710 from asmorkalov:aarc64_manager_android_5 2015-02-20 13:02:07 +00:00
Vadim Pisarevsky 85fd599939 Merge pull request #3588 from vpradeep07:feature/deterministic_pnpransac 2015-02-20 12:32:35 +00:00
Vadim Pisarevsky f3210b58a1 Merge pull request #3723 from SpecLad:run-all-tests-windows 2015-02-20 12:28:15 +00:00
Vadim Pisarevsky d34a52042e Merge pull request #3704 from SpecLad:win-install-data 2015-02-20 12:27:35 +00:00
Vadim Pisarevsky 99ae48f0b4 Merge pull request #3707 from alalek:fix_android_camera 2015-02-20 12:27:13 +00:00
Alexander Smorkalov 96e5300fdd OpenCV and OpenCV Manager version++ 2015-02-20 15:17:11 +03:00
StevenPuttemans 4f621de849 fix bug 3714 2.4 branch 2015-02-20 12:39:31 +01:00
Alexander Smorkalov 3649a1a179 Build fix for case without TegraDetector. 2015-02-20 13:29:58 +03:00
Alexander Smorkalov 352485fc54 Android 5 support and aarch64-related fixes for Android Manager. 2015-02-20 13:16:33 +03:00
Roman Donchenko c1e3ca170e Add a script to run all tests on Windows
It's pretty much a simplified copy of the Linux script, lacking fancy colors.
Also, I had to drop Python testing, because it's not easy to pass the Python
module location to the script, and I have no pressing need to run the Python
tests at the moment.
2015-02-20 12:38:25 +03:00
Alexander Nitsch 9665e08bac Implement CMAKE_CURRENT_LIST_DIR for older CMake
The use of built-in CMAKE_CURRENT_LIST_DIR requires at least
CMake 2.8.3. This fix properly defines the variable to allow its
use in versions < 2.8.3 as well.

Fixes issue #4205.
2015-02-20 00:55:26 +01:00
Vadim Pisarevsky 65e4df751c Merge pull request #3705 from SpecLad:unused-nNull 2015-02-19 18:40:22 +00:00
Alexander Alekhin 4e8aac5308 Merge pull request #3683 from SeninAndrew:2.4 2015-02-18 17:15:10 +00:00
Vadim Pisarevsky a649aea82a Merge pull request #3699 from SpecLad:rm-component-install 2015-02-18 13:55:07 +00:00
Vadim Pisarevsky 4fcfcfd002 Merge pull request #3663 from eliteraspberries:ffmpeg-dylib 2015-02-18 12:50:10 +00:00
Vijay Pradeep 4ce31c7c1a Merge remote-tracking branch 'itseez/2.4' into feature/deterministic_pnpransac 2015-02-17 10:16:44 -08:00
Vijay Pradeep 49bc100e51 Removing rng_seed arg in order to maintain ABI compatibility. Hardcoding seed 2015-02-17 09:19:36 -08:00
StevenPuttemans f5a14e5594 fix message of preloaded parameters 2015-02-17 10:21:31 +01:00
Alexander Alekhin dc21a0a6b5 Android: fix JavaCameraView implementation
1) Fixed deadlock if camera is started and stopped immediately
2) Invalid pattern usage of Object.wait(). Refer to "spurious wakeup": http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait
3) Fixed buffer usage:
  a) fix eliminates processing of zero NV12 (green in RGB) first frame
  b) latest ready frame is delivered for processing (not previous)
2015-02-17 01:28:43 +03:00
Roman Donchenko d218f28070 cap_msmf.hpp: fix a warning about nNull being unused
The two functions featuring nNull are not particularly needed, so
I simply removed them.
2015-02-16 19:31:51 +03:00
Roman Donchenko e8a7394009 Install data and test data on Windows
Because why not?
2015-02-16 19:24:07 +03:00
Vadim Pisarevsky 6a3a6416d7 Merge pull request #3698 from SpecLad:avcodec-free-frame 2015-02-16 11:33:00 +00:00
Vadim Pisarevsky 9e3a826263 Merge pull request #3697 from tomi44g:2.4 2015-02-16 11:28:02 +00:00
Roman Donchenko 8714219dab Merge pull request #3695 from SpecLad:fix-hdc-tautology 2015-02-13 14:09:07 +00:00
Roman Donchenko 6c4b3c1efe Merge pull request #3693 from SpecLad:no-absolute-destinations 2015-02-13 14:06:54 +00:00
Roman Donchenko 49fe496914 Remove useless CPACK_*_COMPONENT_INSTALL variables
They don't actually do anything. And even if they did, all components are
enabled by default, anyway.
2015-02-13 15:31:19 +03:00
Roman Donchenko 77578d415f Fix a memory leak in CvCapture_FFMPEG::close
FFmpeg now requires that frames allocated with avcodec_alloc_frame are
freed with avcodec_free_frame.
2015-02-13 15:12:52 +03:00
Thomas Gabrowski ff4c42d182 Fix iOS warnings about implicit conversion precision by changing double literals to float ones 2015-02-13 00:51:03 +00:00
Roman Donchenko 3d46c1f960 Don't install documentation if it isn't built
The HAVE_DOC_GENERATOR variable was always true.
2015-02-12 16:51:26 +03:00
Roman Donchenko 0387f8ad56 Don't use ${CMAKE_INSTALL_PREFIX} as an install destination
Absolute destinations are not necessary, and prevent CPack from working.
2015-02-10 19:43:29 +03:00
Vadim Pisarevsky 9a62173a5b Merge pull request #3689 from jet47:test-script-optional-color-2.4 2015-02-10 12:00:44 +00:00
Vladislav Vinogradov 682fdcfc9b make color output in run_test script optional 2015-02-09 15:23:34 +03:00
Andrew Senin b9a6edfe3d Fixing XIMEA parameters mapping (issue #4176) 2015-02-09 15:15:23 +03:00
Vadim Pisarevsky 606a646435 Merge pull request #3680 from jet47:fix-run-tests-script-2.4 2015-02-08 17:07:11 +00:00
Vladislav Vinogradov 94d14c637f fix opencv_run_all_tests_unix.sh script:
use `bash` shell instead of `sh`, since on Ubuntu `sh` by default is `dash`,
and `dash` doesn't support `PIPESTATUS` feature used in this sctipt
2015-02-06 12:34:50 +03:00
Vadim Pisarevsky cd1ca7b08b Merge pull request #3667 from AfterEight:cap_ximea_setResolution_bugfix 2015-02-05 07:48:43 +00:00
Vadim Pisarevsky 98f9a013d1 Merge pull request #3674 from jet47:colorize-run-test-script-2.4 2015-02-05 07:35:01 +00:00
Mansour Moufid c60fa84027 Add back the version variables removed in ab40630f. 2015-02-04 10:55:38 -05:00
Vadim Pisarevsky 50eb661df8 Merge pull request #3676 from asmorkalov:changelog_for_tests 2015-02-04 15:13:44 +00:00
Alexander Smorkalov a87ccb9ac0 Added Debian changelog to -tests package. 2015-02-04 16:52:39 +03:00
Vadim Pisarevsky 8e1b1a845b Merge pull request #3672 from asmorkalov:debian_lower_case 2015-02-04 13:17:51 +00:00
Vadim Pisarevsky 5253265342 Merge pull request #3671 from jet47:disable-gpu-match-template-tests 2015-02-04 13:17:26 +00:00
Vladislav Vinogradov 2b303f38a8 colorize opencv_run_all_tests_unix.sh script output 2015-02-04 12:38:51 +03:00
Alexander Smorkalov e6ac64008b Debian package names replaced by lower case version to satisfy lintian. 2015-02-04 11:56:29 +03:00
Vladislav Vinogradov 7bb8c50080 disable gpu::matchTemplate tests 2015-02-04 11:21:17 +03:00
Mansour Moufid 8c68f1f626 Fix indentation of 98a157f5. 2015-02-03 23:17:43 -05:00
Mansour Moufid 98a157f589 Remove Apple-specific logic in finding the FFmpeg libraries.
Thanks to SpecLad.
2015-02-03 23:14:11 -05:00
Mansour Moufid a1cc9380e5 Correct the new find_library commands.
Thanks to SpecLad.
2015-02-02 11:54:09 -05:00
AfterEight e938563de5 Modified resetCvImage() in cap_ximea.cpp, so that the IplImage* frame is also updated after the resolution has changed via set(CV_CAP_PROP_FRAME_WIDTH, value)/set(CV_CAP_PROP_XI_DOWNSAMPLING, value) 2015-02-02 15:04:29 +01:00
Vadim Pisarevsky 0ab4bbf771 Merge pull request #3662 from StevenPuttemans:fix_models 2015-02-02 10:17:43 +00:00
Mansour Moufid ab40630ff4 Use the CMake find_library command to find the FFmpeg libraries. 2015-02-01 15:51:33 -05:00
StevenPuttemans 8548a8430e fixing wrong model sizes 2015-02-01 15:13:57 +01:00
Vadim Pisarevsky 06b97b7b67 Merge pull request #3660 from asmorkalov:samples_install_permissions 2015-02-01 09:14:28 +00:00
Alexander Smorkalov cf852972d1 Fixed samples install permissions for Debian packaging. 2015-02-01 00:34:23 +03:00
Vadim Pisarevsky 1f47c22371 Merge pull request #3655 from asmorkalov:remove_opencv_testing_sh 2015-01-31 14:46:40 +00:00
Vadim Pisarevsky 602b034a03 Merge pull request #3658 from asmorkalov:numpy_dependency 2015-01-31 14:45:11 +00:00
Vadim Pisarevsky 8764b17ffc Merge pull request #3659 from asmorkalov:debian_changelog_stub 2015-01-31 14:44:41 +00:00
Alexander Smorkalov ddc1b965b6 Added Debian changelog installation step for Debian package generation. 2015-01-30 13:21:52 +03:00
Alexander Smorkalov be6b847675 Added dependency from numpy to debian package with python bindings. 2015-01-30 12:27:33 +03:00
Alexander Smorkalov 9206ec30a2 opencv_testing.sh script installation is removed as run tests script does the same thing. 2015-01-29 19:20:18 +03:00
Vadim Pisarevsky a7e9760316 Merge pull request #3649 from StevenPuttemans:fix_tutorials 2015-01-29 12:14:09 +00:00
Vadim Pisarevsky 7e1068919b Merge pull request #3587 from vpradeep07:fix/pnpransac_race_cond 2015-01-29 12:12:18 +00:00
StevenPuttemans 30d46313ec adding a universal OpenCV based annotation tool for cascade classifier training 2015-01-29 13:03:28 +01:00
Vadim Pisarevsky c1252a1089 Merge pull request #3648 from SpecLad:get_policy-ts 2015-01-28 18:49:59 +00:00
StevenPuttemans a86dc747b3 fixing tutorial errors 2015-01-28 13:52:50 +01:00
Alexander Karsakov c481e06e87 Fixed getPolicy() method to make it thread-safe.
(cherry picked from commit 8910508b83)
2015-01-27 19:20:35 +03:00
Vadim Pisarevsky 3bfe4f711d Merge pull request #3641 from cbenhagen:patch-2 2015-01-26 09:45:59 +00:00
Ben Hagen 5245c7454c Do not blacklist GStreamer on Apple 2015-01-23 12:59:09 +01:00
Vadim Pisarevsky 2fabe56bbe Merge pull request #3631 from StevenPuttemans:fix_samples 2015-01-21 10:40:19 +00:00
Vadim Pisarevsky 2ca39c910d Merge pull request #3468 from StevenPuttemans:fix_models 2015-01-20 15:25:51 +00:00
StevenPuttemans cf5a7b9679 remove an unused #endif 2015-01-20 15:41:39 +01:00
Vadim Pisarevsky 9a6a046caf Merge pull request #3613 from asmorkalov:aarch64_tiff 2015-01-20 12:36:38 +00:00
Vadim Pisarevsky c29c52a216 Merge pull request #3609 from jet47:fix-ocv_add_module-2.4 2015-01-20 12:34:50 +00:00
Vadim Pisarevsky 07c9a88d9c Merge pull request #3621 from asmorkalov:ts_master_comapat_header 2015-01-19 12:33:58 +00:00
Vadim Pisarevsky f3439de480 Merge pull request #3623 from Trundle:fix_android_link 2015-01-19 10:51:12 +00:00
Vadim Pisarevsky 28dd3aae79 Merge pull request #3614 from cwreynolds:Unicode-fix-for-addText-2 2015-01-19 10:50:14 +00:00
Andreas Stührk 0a5b200da2 Update link to information about Android platform.
The current link does no longer seem to work.
2015-01-19 00:01:12 +01:00
Alexander Smorkalov 9e9327e2f8 Added OpenCV 3.0 compat header for TS module. 2015-01-18 21:32:19 +03:00
Vadim Pisarevsky 9fb0f5ac51 Merge pull request #3620 from asmorkalov:native_samples_install 2015-01-18 18:22:27 +00:00
Alexander Smorkalov 911be68a41 Prevent native c/c++/ocl/gpu CMakeLists.txt install if samples are turned off. 2015-01-18 20:33:05 +03:00
Craig Reynolds 72d90ba8d2 In cvAddText, construct QString from "text" using fromUtf8. 2015-01-16 14:57:11 -08:00
Alexander Smorkalov d277a1ba75 TIFF support hack for aarch64 reverted. 2015-01-17 01:25:58 +03:00
Vadim Pisarevsky 396f7e1a17 Merge pull request #3604 from asmorkalov:ocv_samples_package 2015-01-16 10:23:32 +00:00
Vladislav Vinogradov 12a3eb776d fix ocv_add_module CMake macro:
it tries to remove 'opencv_' prefix from 'name' variable, but
it creates new variable with the same name as module
2015-01-16 10:59:52 +03:00
Alexander Smorkalov 6628714fc6 Fixed -samples debian package dependencies. 2015-01-15 15:36:45 +03:00
Alexander Smorkalov 187befd665 Fixed installation of CMakeLists.txt and enabled GPU samples build in stand alone version. 2015-01-15 14:48:24 +03:00
Vijay Pradeep 1292fdf71a Now using default arg instead of overloads 2015-01-13 11:25:01 -08:00
Alexander Smorkalov 3425c90b66 GPU samples with NVIDIA specific API excluded from build if CUDA disabled. 2015-01-13 14:58:51 +03:00
Alexander Smorkalov b0c5f49170 Build fixes for GPU samples. 2015-01-13 14:39:18 +03:00
Vadim Pisarevsky 9cadc1e530 Merge pull request #3310 from tSed:opencv-2.4/fix-gstreamer-detection 2015-01-13 11:25:32 +00:00
Alexander Smorkalov c0d76ef984 driver_api_stereo_multi sample reworked to use parallel_for_ instead of parallel_do 2015-01-13 13:00:06 +03:00
Alexander Smorkalov 72063bf136 parallel_do replaced with parallel_for_ in driver_gpu_multi sample. 2015-01-13 12:53:13 +03:00
Vadim Pisarevsky 36c1dce264 Merge pull request #3578 from asmorkalov:ocv_avx 2015-01-12 11:29:21 +00:00
Vijay Pradeep 964d5a20e9 Whitespace fix 2015-01-09 10:44:19 -08:00
Vijay Pradeep 177478a8ad overload instead of default arg for ABI backwards compatibility. rng_seed is now 'int' to support python port 2015-01-09 10:18:08 -08:00
Vijay Pradeep a1c5740044 solvePnPRansac now accepts a seed and is deterministic 2015-01-08 18:24:55 -08:00
Vijay Pradeep 042ff210d5 Fixing race condition by expanding resultsMutex lock section 2015-01-08 15:26:15 -08:00
Alexander Smorkalov 091c7a3821 OpenGL interop sample reworked not ot use cvconfig.h 2015-01-04 23:52:00 +03:00
Alexander Smorkalov c778011f14 More accurate AVX and AVX2 control.
- Previous version just checked option support, but not enable it.
- Also OpenCV tests reports invalid AVX and AVX2 support status.
2015-01-04 23:41:14 +03:00
Vadim Pisarevsky 4e9cb475da Merge pull request #3565 from mshabunin:ml-leak-24 2014-12-31 09:17:25 +00:00
Alexander Smorkalov e02418e904 parallel_do replaced by parallel_for_ in gpu/multi.cpp sample to get rid of cvconfig.h 2014-12-30 16:44:33 +03:00
Alexander Smorkalov 840088e021 Get rid of cvconfig.h in Latent SVM samples. Use common OpenCV parallel framework instead of direct TBB calls. 2014-12-30 15:52:23 +03:00
Maksim Shabunin e23ba9215d Fixed memory leak in ML module
"int * CvMLData::sample_idx" was not freed
2014-12-30 15:20:24 +03:00
Vadim Pisarevsky ad71efb2cb Merge pull request #3562 from asmorkalov:ocv_aarch64 2014-12-30 11:06:00 +00:00
Alexander Smorkalov 8acd4c3ff4 More accurate fix for libtiff and aarch64. 2014-12-28 12:44:24 +03:00
Alexander Smorkalov 0f263e125b Full AARCH64 support with NEON and new CUDA toolkit. 2014-12-28 11:51:33 +03:00
Alexander Smorkalov 82bd82e2f8 TBB updated to 4.3u2. Fix for aarch64 support. 2014-12-28 11:49:25 +03:00
Alexander Smorkalov c0a8d4e1ef Fix of HaarCascade GPU test for aarch64. 2014-12-28 11:49:25 +03:00
Vadim Pisarevsky a5969aec96 Merge pull request #3534 from taka-no-me:build_fixes 2014-12-26 14:34:13 +00:00
Vadim Pisarevsky b01cdf28ca Merge pull request #3543 from MatMoore:2.4 2014-12-26 12:11:42 +00:00
Vadim Pisarevsky ba84eb58f2 Merge pull request #3545 from jet47:gpu-match-template-tests 2014-12-26 12:08:54 +00:00
Vladislav Vinogradov d00f36ec75 fix tests for gpu::matchTemplate:
use ASSERT_FLOAT_EQ to compare float values, it is more robust for
large values
2014-12-25 17:43:13 +03:00
Andrey Kamaev 7ec6d8a336 Fix Android build with the most resent android.toolchain.cmake 2014-12-25 12:41:17 +03:00
Andrey Kamaev c105b72945 Assorted fixes:
* cmake CMP0054 and CMP0045
* aarch64 build
* portable code options in PCH cmake
* some of gcc 4.9 warnings
2014-12-25 12:41:16 +03:00
Roman Donchenko 1ed22204c8 Merge pull request #3506 from doltac:typofix 2014-12-24 09:01:40 +00:00
Roman Donchenko 034ff3ce13 Merge pull request #3497 from SpecLad:fs-open-fail-leak 2014-12-24 08:59:53 +00:00
Mat Moore 1386489f41 Minor grammar improvements to documentation 2014-12-23 19:17:27 +00:00
Roman Donchenko 08da247a87 cvOpenFileStorage: reduce the scope of xml_buf and make sure it's freed...
... before any exceptions occur.
2014-12-22 18:54:39 +03:00
Vadim Pisarevsky 63bc4d4b7f Merge pull request #3471 from HelenWong:FixBug3714 2014-12-22 10:55:23 +00:00
Vadim Pisarevsky cc024d3ef2 Merge pull request #3484 from euphrat:gmg_update_fix 2014-12-22 10:54:57 +00:00
Vadim Pisarevsky 20d957d212 Merge pull request #3511 from mattip:2.4 2014-12-22 10:41:21 +00:00
Vadim Pisarevsky 03df7831ab Merge pull request #3514 from mshabunin:compat-24 2014-12-22 10:38:56 +00:00
Vadim Pisarevsky 2425dac9a1 Merge pull request #3500 from StevenPuttemans:fix_2432_2.4 2014-12-22 10:28:33 +00:00
Vadim Pisarevsky 9071598a65 Merge pull request #3515 from StevenPuttemans:fix_FeatureDetector_docs 2014-12-22 10:27:01 +00:00
Roman Donchenko 16ce114e0c Fix memory leaks appearing when cvOpenFileStorage throws 2014-12-22 12:59:08 +03:00
Vadim Pisarevsky 183454a723 Merge pull request #3522 from ilya-lavrenov:update_android_toolchain_cmake 2014-12-18 14:49:35 +00:00
Ilya Lavrenov ba612fc9bd update android.toolchain.cmake 2014-12-17 20:08:55 +03:00
Maksim Shabunin 91e21847e2 Some changes to make migration to 3.0 easier 2014-12-16 13:00:31 +03:00
Vadim Pisarevsky 241991c677 Merge pull request #3498 from ilya-lavrenov:omp 2014-12-15 18:08:31 +00:00
Vadim Pisarevsky 4ef03ccbe1 Merge pull request #3449 from Ashod:2.4_highgui_trackbar_improvements 2014-12-15 18:02:29 +00:00
StevenPuttemans 73d1ea9a52 fix bug 2432 for 2.4 branch 2014-12-15 11:56:42 +01:00
StevenPuttemans db9a0cfbc0 add extra to FeatureDetector docs 2014-12-15 11:31:18 +01:00
mattip ff7ea605ef export thread control to generated wrappers 2014-12-14 11:55:02 +02:00
doltac 6cc5959356 Fixed typos in latentSVM detector demo. 2014-12-11 19:22:40 +09:00
Ilya Lavrenov ce81433aff ability to enable OpenMP simultaneously with other parallel framework 2014-12-10 13:34:39 +03:00
Ashod Nakashian 63c49be487 highgui: Support to change trackbar count in setTrackbarPos and replaced deprecated CreateToolbarEx in Windows. 2014-12-06 11:56:01 -05:00
Vadim Pisarevsky 4f82b3588a Merge pull request #3480 from mshabunin:python-test-24 2014-12-06 08:07:56 +00:00
Vadim Pisarevsky 3481c1caec Merge pull request #3488 from jeremyhu:PR-4048 2014-12-06 08:03:56 +00:00
Jeremy Huddleston Sequoia 35f96d6da7 Fix tautologies in calibfilter.cpp which cause a build failure when using -Werror=address with clang-3.5
http://code.opencv.org/issues/4048

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-12-05 10:22:11 -08:00
Firat Kalaycilar 2bda7aaf61 minor fix to make "updateBackgroundModel=false" option meaningful. 2014-12-04 22:36:42 +02:00
Maksim Shabunin 3212dd5465 Python test: new options provide local test data paths 2014-12-03 18:15:54 +03:00
StevenPuttemans 7efc917ee0 pulling most recent models 2014-12-03 12:57:37 +01:00
HelenWong ec57a938c0 Fix#3714:Improve Display Image Tutorial
For Bug #3714, user use the imshow() function without calling
namedWindow() properly, because user did not know the implicit rule for
imshow(). (i.e. without calling namedWindow implied calling namedWindow(
,CV__WINDOW_AUTOSIZE).

Improve the Display Image Tutorial to educate the user for such implied
rule.

Put a note on documentation for Bug#3714

Revise the documentation regarding to imshow() function to better
educate the user the implicit rule. (i.e. without creating the window
before the imshow() function is the same as creating AUTOSIZE window)
2014-12-02 09:43:52 -08:00
Vadim Pisarevsky c5b6c0456d Merge pull request #3445 from jet47:get-rid-of-cuda-h 2014-12-01 10:40:57 +00:00
Vadim Pisarevsky 1b73530b75 Merge pull request #3447 from a-wi:Fill_ellipse_arc 2014-12-01 10:40:12 +00:00
Artur Wieczorek 7512b5fdde Fix determining bounding box of the edge collection in FillEdgeCollection().
There is necessary to account also x-ccordinate of the end of the edge when determining bounding box of the edge collection.
2014-11-25 18:54:47 +01:00
Vladislav Vinogradov eeb997261d get rid of cuda.h usage 2014-11-25 18:29:56 +03:00
Vadim Pisarevsky 3dd1afe4ec Merge pull request #3433 from StevenPuttemans:fix_whitebalance_naming 2014-11-24 09:40:21 +00:00
StevenPuttemans f151b1d277 fix wrong property name and corresponding documentation 2014-11-19 14:00:40 +01:00
Vadim Pisarevsky 047b1ca457 Merge pull request #3419 from samyak-268:2.4 2014-11-16 18:17:54 +00:00
Vadim Pisarevsky 8ebd474c0e Merge pull request #3425 from StevenPuttemans:fix_firewire_buffersize 2014-11-16 18:06:20 +00:00
Vadim Pisarevsky 9086d6a230 Merge pull request #3427 from tstellarAMD:2.4-farneback-crash-fix 2014-11-16 18:05:17 +00:00
StevenPuttemans d9164bdd4c added extra BUFFERSIZE doc and getter 2014-11-14 14:09:43 +01:00
Tom Stellard 42b1bd56cc ocl: Move static oclMat variables into FarnebackOpticalFlow class
Move some static functions into the FarnebackOpticalFlow class as well,
so they can access these new class variables.

oclMat objects cannot be declared statically, because their destructor
depends on the statically defined __module variable from cl_context.cpp.
Since statically defined variables in separate compilation units have
an undefined destruction order there is always the possibility the
__module will be destructed before an oclMat object, which results
in a segfault.
2014-11-13 11:16:10 -05:00
Vadim Pisarevsky eedde323ce Merge pull request #3421 from SpecLad:ncv-algorithm 2014-11-13 15:40:29 +00:00
Roman Donchenko da6a38f9f6 NCV.cu: include <algorithm>
It's needed for std::max.
2014-11-13 16:16:26 +03:00
Vadim Pisarevsky 92e08c9863 Merge pull request #3412 from StevenPuttemans:ieee1934_camera_set_params 2014-11-13 07:27:33 +00:00
Vadim Pisarevsky 773e621190 Merge pull request #3414 from SpecLad:vg-stereogc 2014-11-13 07:20:30 +00:00
Alexander Alekhin d2f19a3a0d Merge pull request #3418 from tstellarAMD:2.4-hog-crash-fix 2014-11-13 01:49:06 +00:00
Samyak Datta a3f05474c9 C++ sample code to detect facial features 2014-11-12 23:35:02 +05:30
Maksim Shabunin 2d8673197c Merge pull request #3417 from ilya-lavrenov:dox_warn 2014-11-12 17:48:43 +00:00
Ilya Lavrenov d8ca61b01b attemp to fix dox warning 2014-11-12 19:18:45 +03:00
Tom Stellard ec335b7398 ocl: Fix crash during destruction of gauss_w_lut object in hog.cpp
gauss_w_lut is a statically defined variable of type oclMat.  The oclMat
destructor calls openCLFree() which via getInitializationMutex() accesses
the __module variable which has been statically defined in cl_context.cpp

Since the destruction order of statically defined variables in different
compilation units is undefined, it is possible that __module will
be destructed before gauss_w_lut, which would result in a segfault when
getInitializationMutex() is called while destructing gauss_w_lut.

In order to avoid this issue, we need to make gauss_w_lut a private
member of the HOGDescriptors class so we know it will be destroyed
before __module.
2014-11-12 10:07:07 -05:00
Roman Donchenko 7d8e5f623a Fix uninitialized memory reads and memory leaks in StereoGC 2014-11-12 17:00:08 +03:00
StevenPuttemans 2b8229f716 adding extra buffer parameter 2014-11-12 13:09:53 +01:00
Vadim Pisarevsky b80a3a91a8 Merge pull request #3401 from SpecLad:optflow-bogus-Warray-bounds 2014-11-11 13:27:41 +00:00
Roman Donchenko 13d67b6ae7 Suppress a bogus -Warray-bounds in modules/superres/src/optical_flow.cpp
This is actually the same warning that the suppression at the bottom
suppresses, but that one doesn't suppress it when using a native compiler
(go figure).

I remove the forced inclusion of precompiled headers into all sources,
since otherwise this workaround doesn't work - the header with the warning
is included before I can use a pragma.
2014-11-10 18:38:54 +03:00
Vadim Pisarevsky e05a0bc6c5 Merge pull request #3322 from StevenPuttemans:fix_pvpapi_interface 2014-11-10 08:27:42 +00:00
Vadim Pisarevsky 3da1144cef Merge pull request #3305 from tSed:opencv-2.4.x/opencv.pc-generation-refactoring 2014-11-06 08:41:07 +00:00
Vadim Pisarevsky b476bf2a00 Merge pull request #3294 from mshabunin:fix-ios-warnings-24 2014-11-05 11:35:19 +00:00
Vadim Pisarevsky 23b28a6700 Merge pull request #3376 from vriera:2.4 2014-11-05 11:13:03 +00:00
Samuel Martin eceada586b cmake/OpenCVGenPkgconfig.cmake: rework opencv.pc generation
Using absolute path to locate the components in the "Libs:" field of the
*.pc can badly break cross-compilation, especially when building
statically linked objects.

Indeed, pkg-config automatically replaces the '-I...' and '-L...' paths
when the PKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_LIBDIR environment
variables are set [1]. This feature is very helpful and common in
cross-compilation framework like Buildroot [2,3].

When there are absolute paths in the *.pc files, pkg-config won't be
able to do the path substitions for these paths when the afromentioned
environment variables are set.
In such case, since the prefix is the target one, not the sysroot one,
these libraries' abolute paths will point to:
- in the best case: a non-existing file (i.e. these files do not exists
  on the host system;
- at worst: the host system's libraries. This will make the linking
  failed because these host system's libraries will most likely not be
  build for the target architecture [4].

So, this patch replace the components' absolute paths by the form:
  -L<libdir> -l<libname>

This way, the linker will be able to resolve each dependency path,
whatever the kind of objects/build (shared object or static build) it
is dealing with.

Note that for static link, the library order does matter [5]. The order
of the opencv components has been carefully chosen to comply with this
requirement.

Fixes #3931

[1] http://linux.die.net/man/1/pkg-config
[2] http://buildroot.org/
[3] http://git.buildroot.net/buildroot/tree/package/pkgconf/pkg-config.in
[4] http://autobuild.buildroot.net/results/e8a/e8a859276db34aff87ef181b0cce98916b0afc90/build-end.log
[5] http://stackoverflow.com/questions/45135/linker-order-gcc

Signed-off-by: Samuel Martin <s.martin49@gmail.com>

---
Note: this patch properly applies on top of the master branch, though it
      has been written on top of the 2.4 branch.
2014-11-05 11:32:11 +01:00
Alexander Smorkalov 67635c6d65 Version++. 2014-11-05 08:46:55 +03:00
Vladislav Vinogradov a26e496d00 minor fix for StereoCSBP data cost compute kernel and test
(cherry picked from commit 84f33d0578)
2014-11-04 10:19:38 +03:00
Vladislav Vinogradov d579d3e596 increase epsilons for some tests, which functions use floating point arithm
(cherry picked from commit 5c07e0b6d3)
2014-11-04 10:19:18 +03:00
Vladislav Vinogradov 5a77176654 avoid pointer arithmetic on register memory in color conversion
(cherry picked from commit e0827069c1)
2014-11-04 10:18:58 +03:00
Vadim Pisarevsky a28cde9c3b Merge pull request #3382 from StevenPuttemans:fix_3982 2014-10-31 11:18:24 +00:00
Vadim Pisarevsky 529af7a90e Merge pull request #3364 from mshabunin:doxygen-docs-24 2014-10-30 10:42:25 +00:00
StevenPuttemans 8bf58937a9 fixing SVM negative value rounding 2014-10-29 13:50:20 +01:00
StevenPuttemans 7dce2d0b8f fixing cap_pvpapi interface and making sure both AVT Manta and Proscilla
series are supported. Testing this with both cams for Windows and Linux
exhaustively.

Optimizing memory footprint by removing unused calls.

Adapted with the input of Shai

Added small example that illustrates how it should work.
2014-10-28 15:33:37 +01:00
Vicente Olivert Riera 2e393ab833 superres: Fix return value VideoFrameSource_GPU
superres module fails to compile with the following error messages:

[100%] Building CXX object modules/superres/CMakeFiles/opencv_superres.dir/src/super_resolution.cpp.o
/opencv-2.4.10/modules/superres/src/frame_source.cpp: In function 'cv::Ptr<cv::superres::FrameSource> cv::superres::createFrameSource_Video_GPU(const string&)':
/opencv-2.4.10/modules/superres/src/frame_source.cpp:263:16: error: expected type-specifier before 'VideoFrameSource'
/opencv-2.4.10/modules/superres/src/frame_source.cpp:263:16: error: could not convert '(int*)operator new(4ul)' from 'int*' to 'cv::Ptr<cv::superres::FrameSource>'
/opencv-2.4.10/modules/superres/src/frame_source.cpp:263:16: error: expected ';' before 'VideoFrameSource'
/opencv-2.4.10/modules/superres/src/frame_source.cpp:263:41: error: 'VideoFrameSource' was not declared in this scope
/opencv-2.4.10/modules/superres/src/frame_source.cpp:264:1: error: control reaches end of non-void function [-Werror=return-type]
cc1plus: some warnings being treated as errors
make[3]: *** [modules/superres/CMakeFiles/opencv_superres.dir/src/frame_source.cpp.o] Error 1
make[3]: *** Waiting for unfinished jobs....

This is caused because the return value of the createFrameSource_Video_GPU function should be a VideoFrameSource_GPU object.
2014-10-27 13:39:35 +00:00
Maksim Shabunin 0c3722be82 iOS framework build script changes from master branch 2014-10-27 15:28:21 +03:00
Maksim Shabunin 09fb7512ed Fixed iOS framework compilation warnings 2014-10-27 15:28:21 +03:00
Maksim Shabunin b59aaae2dc iOS framework build script changes
- buildbot process support (break build in case of errors)
- disabled some warnings in cmake script
2014-10-27 15:28:05 +03:00
Maksim Shabunin d77088b19b Merge pull request #3336 from BKNio:putText_develop2 2014-10-27 11:56:25 +00:00
Dinar Ahmatnurov b5a6df4966 fixed issue with malformed UTF-8 string;
ocl: Change static variable order in cl_context.cpp to avoid crashes during destruction

ContextImpl::currentContext contains a reference to one of the
DeviceInfoImpl objects from:

static std::vector<DeviceInfoImpl> global_devices;

ContextImpl::currentContext is destroyed in the destructor
for the statically defined object __module, and relies on its
DeviceInfoImpl reference to query some hardware features while
being destroyed.

This means that we need to ensure that the global_devices vector is
destroyed affter __module, otherwise ContextImpl::currentContext's
DeviceInfoImpl reference will no longer be valid when __module is
destroyed.

Since these variables are all confined to a single compilation unit,
they will be destruct from bottom to top, so we need to make sure
that __module is the bottom definition so it can be destroyed first.

iOS: fix crash from overrelease in UIImageToMat

viz: fixed memory leak, issue 3961

fix installation layout for debian packages:

Install symlinks to shared libraries as a part of development package,
not runtime package.

It is default behavior for debian packages.

Fix test name.

TIFF loader: Allocate large enough buffer when (bpp * ncn) > 8.

TIFF loader: Pass buffer size to read functions.

replace not ascii and not cyrillic symbols with '?';

add test for putText;

fix warning;

minor fixes;
2014-10-27 12:47:53 +03:00
Vadim Pisarevsky 67e50b4415 Merge pull request #3362 from mshabunin:fix-drawing-24 2014-10-26 17:44:07 +00:00
Vadim Pisarevsky 0cf170587f Merge pull request #3363 from asmorkalov:qnx_support 2014-10-26 17:42:24 +00:00
Vadim Pisarevsky 0c2ccd3bae Merge pull request #3366 from jet47:fix-gpu-cuda-7.0 2014-10-26 17:41:14 +00:00
Vadim Pisarevsky 1692801fc5 Merge pull request #3356 from jet47:ctest-support 2014-10-26 17:40:35 +00:00
Vladislav Vinogradov 84f33d0578 minor fix for StereoCSBP data cost compute kernel and test 2014-10-23 19:33:44 +04:00
Vladislav Vinogradov 5c07e0b6d3 increase epsilons for some tests, which functions use floating point arithm 2014-10-23 19:33:42 +04:00
Vladislav Vinogradov e0827069c1 avoid pointer arithmetic on register memory in color conversion 2014-10-23 18:39:23 +04:00
Maksim Shabunin 9b55c09999 Basic doxygen documentation support
- updated existing Doxyfile.in
- added corresponding cmake instructions
- added some specific files (layout, icon)
- clean existing doxygen warnings

Conflicts:
	CMakeLists.txt
	doc/CMakeLists.txt
	modules/core/include/opencv2/core.hpp
	modules/core/include/opencv2/core/base.hpp
	modules/core/include/opencv2/core/cuda.inl.hpp
	modules/core/include/opencv2/core/mat.hpp
	modules/core/include/opencv2/core/matx.hpp
	modules/core/include/opencv2/core/types.hpp
	modules/flann/include/opencv2/flann/lsh_table.h
	modules/imgproc/include/opencv2/imgproc.hpp
2014-10-23 18:27:26 +04:00
Alexander Smorkalov 6bb6039ebb Fixes for QNX 6.6 Neitrino support. 2014-10-23 17:17:35 +04:00
Maksim Shabunin ba7c92b0e8 Fixed highgui drawing test
- changed image comparison technique
- removed old assert statements
2014-10-23 13:28:33 +04:00
Vladislav Vinogradov 4f8a1213bd determine test category (Public vs Extra) based on module location 2014-10-21 18:51:02 +04:00
Vladislav Vinogradov edf54ac3a9 add CTest targets for sanity tests 2014-10-21 18:50:38 +04:00
Vladislav Vinogradov f44c29ad7d disable CTest target for opencv_test_viz:
opencv_test_viz creates windows and waits until user close them,
it is not appropriate for automatic testing
2014-10-21 18:49:53 +04:00
Vladislav Vinogradov 0c57dc2e00 rewrite add_test command for accuracy tests:
* use new syntax introduced in CMake 2.8.0
* set OPENCV_TEST_DATA_PATH enviroment property
2014-10-21 18:48:46 +04:00
Vladislav Vinogradov 07bd58a0e8 turn on testing support in root binary directory 2014-10-21 18:45:47 +04:00
Vadim Pisarevsky 7bff337828 Merge pull request #3350 from Trundle:fix_some_tiff_crashes 2014-10-20 06:44:10 +00:00
Andreas Stührk 24580e348a TIFF loader: Pass buffer size to read functions. 2014-10-19 01:22:18 +02:00
Andreas Stührk cfdcf9f2d2 TIFF loader: Allocate large enough buffer when (bpp * ncn) > 8. 2014-10-19 01:22:04 +02:00
Andreas Stührk 63ac69cadf Fix test name. 2014-10-19 01:13:35 +02:00
Vadim Pisarevsky 263621aed8 Merge pull request #3341 from jet47:deb-package-lib-symlinks 2014-10-18 17:00:52 +00:00
Vadim Pisarevsky 40efd17be4 Merge pull request #3346 from Nerei:fixed_memory_leak_in_viz 2014-10-18 16:57:55 +00:00
Anatoly Baksheev 0f2b7fbc45 viz: fixed memory leak, issue 3961 2014-10-18 18:12:36 +04:00
Vadim Pisarevsky 1ce31dcd62 Merge pull request #3340 from AdLantis:2.4 2014-10-17 11:36:24 +00:00
Vladislav Vinogradov f55c1cc0fb fix installation layout for debian packages:
Install symlinks to shared libraries as a part of development package,
not runtime package.

It is default behavior for debian packages.
2014-10-17 13:23:23 +04:00
Thomas Weisbach 81c0537b0c iOS: fix crash from overrelease in UIImageToMat 2014-10-17 17:49:14 +09:00
Vadim Pisarevsky 32f978ff4b Merge pull request #3337 from tstellarAMD:2.4-ocl-context-cleanup-fix 2014-10-16 10:07:13 +00:00
Tom Stellard 8f3b876ee6 ocl: Change static variable order in cl_context.cpp to avoid crashes during destruction
ContextImpl::currentContext contains a reference to one of the
DeviceInfoImpl objects from:

static std::vector<DeviceInfoImpl> global_devices;

ContextImpl::currentContext is destroyed in the destructor
for the statically defined object __module, and relies on its
DeviceInfoImpl reference to query some hardware features while
being destroyed.

This means that we need to ensure that the global_devices vector is
destroyed affter __module, otherwise ContextImpl::currentContext's
DeviceInfoImpl reference will no longer be valid when __module is
destroyed.

Since these variables are all confined to a single compilation unit,
they will be destruct from bottom to top, so we need to make sure
that __module is the bottom definition so it can be destroyed first.
2014-10-14 20:54:13 -04:00
Vadim Pisarevsky 6b0cd392f0 Merge pull request #3331 from tSed:opencv-2.4.x/fix-x86-PIC-compilation 2014-10-12 13:42:38 +00:00
Samuel Martin ea50be0529 core: fix x86 PIC code compilation
This bug was triggered by Buildroot autobuilders [1,2], causing this
kind of failures [3,4]:

  [ 14%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/system.cpp.o
  /home/test/autobuild/instance-0/output/build/opencv-2.4.10/modules/core/src/system.cpp: In function '(static initializers for /home/test/autobuild/instance-0/output/build/opencv-2.4.10/modules/core/src/system.cpp)':
  /home/test/autobuild/instance-0/output/build/opencv-2.4.10/modules/core/src/system.cpp:280:10: error: inconsistent operand constraints in an 'asm'
  make[3]: *** [modules/core/CMakeFiles/opencv_core.dir/src/system.cpp.o] Error 1

[1] http://buildroot.org/
[2] http://autobuild.buildroot.org/
[3] http://autobuild.buildroot.org/?reason=opencv-2.4.10
[4] http://autobuild.buildroot.org/results/483/4838285b25d6293a5cf0bb9eadd5040a7c75d766/build-end.log

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
2014-10-12 12:45:20 +02:00
Vadim Pisarevsky b11b08b478 Merge pull request #3265 from BKNio:putText_develop 2014-10-11 18:06:25 +00:00
Vadim Pisarevsky a5e89bf724 Merge pull request #3329 from taka-no-me:patch-1 2014-10-11 17:41:23 +00:00
Vadim Pisarevsky 0d196529f7 Merge pull request #3300 from rohitrawat:bug_3787_docs_NAryMatIterator 2014-10-11 17:35:51 +00:00
Vadim Pisarevsky 77b57459c4 Merge pull request #3327 from JonasVautherin:patch_cmake_android_r10 2014-10-11 17:26:19 +00:00
Andrey Kamaev 5dde172452 silence cmake 3.0+ warnings on LOCATION attribute 2014-10-11 20:35:48 +04:00
Jonas Vautherin d83372a8dc Patch for NDK r10 2014-10-10 15:16:51 +02:00
Dinar Ahmatnurov 5a797ae7de fix issue with font; 2014-10-10 17:11:20 +04:00
Vadim Pisarevsky ff8e32453b Merge pull request #3307 from ilya-lavrenov:ffmpeg_rtsp 2014-10-10 11:02:50 +00:00
Ilya Lavrenov fb2012def2 TCP instead of UDP 2014-10-09 19:23:51 +04:00
Vadim Pisarevsky d7ba03a9cb Merge pull request #3298 from a-wi:DShow_capture 2014-10-09 15:00:25 +00:00
Vadim Pisarevsky 1e744bf5b1 Merge pull request #3309 from nisargthakkar:Thickness1NoLineCV_AA 2014-10-09 14:42:44 +00:00
Vadim Pisarevsky 8364ea3954 Merge pull request #3311 from BarneyBear:2.4-drawMatches-flag-fix 2014-10-09 14:20:23 +00:00
Vadim Pisarevsky c24e6f7ae9 Merge pull request #3316 from nisargthakkar:Bug3887 2014-10-09 14:19:12 +00:00
Vadim Pisarevsky ed2fb773cd Merge pull request #3319 from Trundle:tiff_infinite_rowsperstrip 2014-10-09 14:15:03 +00:00
Andreas Stührk afb164cc15 Don't allocate lots of memory when reading TIFFs with infinite rows per strip.
Some TIFF images consist of only one strip. The magic value 2**32-1 for the
"rows per strip" tag reflects that fact, effectively meaning "infinite".
2014-10-08 23:31:30 +02:00
Nisarg Thakkar 474897ff01 Made some changes specefict to 4 channel images. Fixed step value for tptr 2014-10-08 22:08:14 +05:30
Nisarg Thakkar 29fb2b6e47 Fixed doc for Bug #3887
Fixed doc for Bug #3887
2014-10-08 19:52:35 +05:30
Niklas Frisk af72e6b8f4 Fixes #3910, flags in _prepareImgAndDrawKeypoints are now binary OR'ed instead of added. 2014-10-07 09:40:56 +02:00
Samuel Martin 38bb0db9db cmake: fix gstreamer check conditions
The current situation of the Gstreamer detection does not always honor
all the configurations set by the user, among this:
- if both WITH_GSTREAMER and WITH_GSTREAMER_0_10 are off, but
  Gstreamer 0.10 is installed in the system, Gstreamer 0.10 support will
  be enable;
- if both WITH_GSTREAMER and WITH_GSTREAMER_0_10 are on, only checks for
  Gstreamer 0.10 will be run.

This patch fixes the Gstreamer detection like this:

  |        -DWITH_...          | Package installed  ||    OpenCV    |
  | GSTREAMER | GSTREAMER_0_10 | gst-1.x | gst-0.10 || gst. support |
  +===========+================+=========+==========##==============+
  |    OFF    |      OFF       |    -    |    -     ||     none     |
  |    OFF    |      ON        |    -    |    no    ||     none     |
  |    OFF    |      ON        |    -    |   yes    ||   gst-0.10   |
  |    ON     |      OFF       |    no   |    no    ||     none     |
  |    ON     |      OFF       |    no   |   yes    ||   gst-0.10   |
  |    ON     |      OFF       |   yes   |    -     ||    gst-1.x   |
  |    ON     |      ON        |   yes   |    -     ||    gst-1.x   |

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
2014-10-06 21:40:55 +02:00
Rohit Rawat 2ad8c6dbd0 Fixing bug in NAryMatIterator documentation(Bug #3787).
Fixed the non-working code example for NAryMatIterator.
The documentation of NAryMatIterator in file:
modules/core/include/opencv2/core/core.hpp has a working example which
was used for these edits.
2014-10-02 18:48:31 -05:00
Artur Wieczorek 5c96021172 Fixed getting CV_CAP_PROP_FOURCC property value
Save selected FCC in order to return proper CV_CAP_PROP_FOURCC property value (currently FCC for RGB24 is always returned).
2014-10-02 21:41:54 +02:00
Artur Wieczorek 4b1bb702ce Fixed media type GUID for I420 format in DShow capture.
FOURCC code bytes should be placed in the reverse order.
2014-10-02 13:07:50 +02:00
Maksim Shabunin a77a2f357c Merge pull request #3297 from asmorkalov:ocv_docs_fix 2014-10-02 10:56:08 +00:00
Artur Wieczorek 7e78b5d06e Fixed selecting media type in DShow video capture.
Set correct value of sample size when calling IAMStreamConfig::SetFormat function. For non-RGB media type it can be set to zero value.
(See http://msdn.microsoft.com/en-us/library/windows/desktop/dd373477%28v=vs.85%29.aspx)
2014-10-02 12:08:37 +02:00
Alexander Smorkalov 11c81067dc doc/check_docs2.py warnings fixes 2014-10-02 13:40:30 +04:00
Andrey Pavlenko 7018f94959 Merge pull request #3288 from StevenPuttemans:fix_ts_dependencies 2014-10-01 07:33:36 +00:00
Andrey Pavlenko 533fde66e3 Merge pull request #3281 from a-wi:MSMF_remove_ATL_dependency 2014-10-01 07:26:25 +00:00
Andrey Pavlenko 5bd18155be Merge pull request #3290 from asmorkalov:android_disable_fisheye.rectify_for_tegra 2014-10-01 07:26:04 +00:00
Andrey Pavlenko aa6b5ac124 Merge pull request #3291 from asmorkalov:android_superres_video_check 2014-10-01 07:25:15 +00:00
Alexander Smorkalov ca40a749b6 Turn off superres accuracy tests if video i/o is not supported. 2014-10-01 09:15:24 +04:00
Roman Donchenko d54d580f79 Merge pull request #3275 from asmorkalov:ocv_gstreamer_backport 2014-09-30 15:55:26 +00:00
Roman Donchenko 774d6c1d0a Merge pull request #3285 from asmorkalov:android_servive_big.little_fix 2014-09-30 15:19:07 +00:00
Roman Donchenko 302d80d744 Merge pull request #3287 from asmorkalov:android_manager_version_inc5 2014-09-30 14:44:36 +00:00
Alexander Smorkalov 286c6b496d OpenCV Manager hardware detector workaround for not detected ARM SoC support. 2014-09-30 18:43:11 +04:00
Maksim Shabunin 44da1f795f Merge pull request #3282 from asmorkalov:android_exclude_ocl 2014-09-30 10:53:16 +00:00
Alexander Smorkalov 71c4e96e17 Test fisheye.rectify disabled for Tegra. 2014-09-30 14:49:33 +04:00
StevenPuttemans 60fd5c2a3a fixing dependencies 2014-09-30 11:53:46 +02:00
Alexander Smorkalov 8271c4e9c4 Highgui_Video.prop_fps disabled as fails with FFmpeg in Ubuntu 14.04. 2014-09-30 13:35:19 +04:00
Alexander Smorkalov 1f4fe3bb27 GStreamer 1.0 backport from master branch. 2014-09-30 12:30:09 +04:00
Alexander Smorkalov a0431acb37 OpenCV Manager version++. 2014-09-30 12:05:46 +04:00
Artur Wieczorek e3f1d722e7 Remove ATL dependency from MSMF capture code
Use _com_ptr_t instead of CComPtr in ComPtr wrapper to avoid ATL dependency.
2014-09-30 01:35:59 +02:00
Alexander Smorkalov 1c3c94fd2c Exclude OpenCL tests from default test list for Android as they are experimental. 2014-09-29 20:45:12 +04:00
Roman Donchenko 45a1063c4a Merge pull request #3263 from asmorkalov:python_tests_package_lintian 2014-09-29 14:53:02 +00:00
Alexander Smorkalov 1cc80f10ba Added implicit dependency from python and python-py to debian packages. 2014-09-29 17:43:54 +04:00
Maksim Shabunin a160158cb3 Merge pull request #3272 from mgeorg:reset_ffmpeg_mutex_2_4 2014-09-29 12:07:22 +00:00
Vadim Pisarevsky 6a53cb9307 Merge pull request #3266 from mshabunin:arm_warning 2014-09-27 13:06:44 +00:00
Vadim Pisarevsky 1920232268 Merge pull request #3260 from a-wi:MSMF_file_error 2014-09-27 13:06:18 +00:00
Manfred Georg 7f4eb4f6c6 set ffmpeg mutex to NULL on destruction.
The Mutex manager registered with ffmpeg must reset the mutex to NULL after destruction, otherwise ffmpeg will give the invalid mutex to the next mutex manager when it asks it to CREATE a new mutex.
See ffmpeg code: http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/utils.c;h=28c5785398fcf11a3d3c70a8cd09e9df798e2734;hb=HEAD#l3423

Cherry picked from head (file has moved but issue is the same).
Conflicts:
	modules/videoio/src/cap_ffmpeg_impl.hpp
2014-09-26 10:19:34 -07:00
Dinar Ahmatnurov de6edcc48a fixing issue with "ёЁ"; 2014-09-26 11:32:14 +04:00
Maksim Shabunin e88a36621e Fixed warning during cross compile for ARM 2014-09-25 12:27:48 +04:00
Dinar Ahmatnurov e9f7c4aeba added Cyrillic;
added Cyrillic;

replace binary format with hex;

move duplicated code to inline function;
2014-09-25 11:15:20 +04:00
Vadim Pisarevsky 467f5fc90f Merge pull request #3261 from a-wi:CMake_FFMPEG_config 2014-09-24 17:03:08 +00:00
Vadim Pisarevsky ad018da224 Merge pull request #3262 from StevenPuttemans:fix_window_param 2014-09-24 12:22:20 +00:00
StevenPuttemans 90a1c6b1f0 fixing some wrong CPP prefixes - still old interface 2014-09-24 09:33:22 +02:00
Artur Wieczorek 93d1ceae43 Use FFMPEG capture only if HAVE_FFMPEG flag is defined. 2014-09-24 02:11:59 +02:00
Artur Wieczorek 073a7ff95a Fixed CMake issue with FFMPEG highgui configuration
Currently, FFMPEG source files are included in highgui project file regardless of CMake WITH_FFMPEG option.
After applying this PR FFMPEG files are included only if WITH_FFMPEG option is enabled.
2014-09-23 23:46:03 +02:00
Artur Wieczorek 5bf1a4c08c Fixed MSMF file capture error while opening the file containing unsupported video stream format 2014-09-23 20:21:53 +02:00
Vadim Pisarevsky 562ff9d111 Merge pull request #3255 from bhack:fix_cuda_macosx 2014-09-23 15:40:23 +00:00
bhack 32f6e1a554 Fix for bug #3469 CV_XADD failing in clang+nvcc combination
Taken from 3f07655231
2014-09-23 12:39:16 +02:00
Vadim Pisarevsky 10bbcca11e Merge pull request #3251 from a-wi:MSMF_camera_errors 2014-09-23 08:42:57 +00:00
Vadim Pisarevsky 19b3aab23f Merge pull request #3244 from tstellarAMD:2.4-ocl-inline-fix-v2 2014-09-23 07:19:38 +00:00
Vadim Pisarevsky df28bb5ccd Merge pull request #3190 from StevenPuttemans:fix_simpleblobdetector 2014-09-23 07:18:01 +00:00
StevenPuttemans d4ec359f11 Fixing errors 2014-09-22 22:12:27 +02:00
Artur Wieczorek 3603102c89 Fixed assertion warning in MSMF frame grabber 2014-09-22 19:38:04 +02:00
Artur Wieczorek a615102947 Fixed MSMF video capture initialization 2014-09-22 19:35:36 +02:00
Vadim Pisarevsky 9c91d0103f Merge pull request #3247 from a-wi:CMake_MSMF_configuration 2014-09-22 15:31:09 +00:00
Vadim Pisarevsky 37a1767286 Merge pull request #3243 from a-wi:MSMF_linking_error 2014-09-22 15:29:32 +00:00
StevenPuttemans 03662c0589 fix blobdetector 2014-09-22 13:58:45 +02:00
Artur Wieczorek 7c354c14f7 CMake configuration for MSMF capture 2014-09-21 21:03:41 +02:00
Artur Wieczorek d2ba09e6ff Fix linking error under Win 7 - do not import MinCore_Downlevel.lib if target is Win 7 or earlier. 2014-09-19 22:46:09 +02:00
Tom Stellard 934394c5e2 ocl: Don't use 'inline' attribute on functions
In C99 'inline' is not a hint to the compiler to inline the function,
it is an attribute that affects the linkage of the function.  'inline'
functions are required to have a definition in a different compiliation
unit, so compilers are free to delete 'inline' functions if they want to.

This issue can be seen in Clang when compiling at -O0.  Clang
will sometimes delete 'inline' functions which creates an invalid
program.

Issue 3746: http://code.opencv.org/issues/3746
2014-09-19 16:13:57 -04:00
Vadim Pisarevsky 6c3cadbd73 Merge pull request #3240 from a-wi:MSMF_compilation_errors 2014-09-19 17:36:13 +00:00
Vadim Pisarevsky 4dda2002f6 Merge pull request #3241 from WilhelmHannemann:bugfix_brute_force_match_cl 2014-09-19 17:35:07 +00:00
Artur Wieczorek 539f8032dc Fixed compilation errors under VS 2010 and Win 7 2014-09-19 17:07:52 +02:00
WilhelmHannemann f8c5128729 Merge branch 'bugfix_brute_force_match_cl' of https://github.com/WilhelmHannemann/opencv into bugfix_brute_force_match_cl 2014-09-19 16:42:59 +02:00
WilhelmHannemann 150487feda Bugfix brute_force_match.cl (see http://code.opencv.org/issues/2837): wrong results for non-float descriptors in OpenCL BruteForceMatcher 2014-09-19 16:41:54 +02:00
WilhelmHannemann b767613d20 Bugfix brute_force_match.cl (Bug #2837): wrong results for non-float descriptors in OpenCL BruteForceMatcher 2014-09-19 16:31:11 +02:00
Vadim Pisarevsky 197b2e75e1 Merge pull request #3238 from vpisarev:bfmatcher_fix 2014-09-19 13:21:05 +00:00
Vadim Pisarevsky 3516e14e05 Merge branch 'bug_3172' of https://github.com/elmarb/opencv into bfmatcher_fix;
use different fix for the problem, embedded right into the BFMatcher.
2014-09-19 15:31:21 +04:00
E Braun d82b918a7b fix for bug 3172 2014-09-19 14:47:43 +04:00
E Braun f60726b090 Revert "fix for bug 3172"
This reverts commit ed2cdb71e5.
2014-09-19 14:47:43 +04:00
E Braun 1675b23a64 fix for bug 3172 2014-09-19 14:47:43 +04:00
E Braun aa9da6e433 regression test for bug 3172 2014-09-19 14:47:43 +04:00
Vadim Pisarevsky 772f6208db Merge pull request #3235 from Atanahel:gbt_bugfix 2014-09-19 09:42:01 +00:00
Vadim Pisarevsky 0cf1de8eea Merge pull request #3236 from vpisarev:fix_traincascade 2014-09-18 17:45:28 +00:00
Stephen Mell 5947519ff4 Check sure that we're not already below required leaf false alarm rate before continuing to get negative samples. 2014-09-18 16:54:22 +04:00
Benoit Seguin 084835ec30 Fixing a line where integer data was treated as floating point data. 2014-09-18 14:03:13 +02:00
Vadim Pisarevsky a67484668e Merge pull request #2711 from GregoryMorse:patch-5 2014-09-18 11:28:58 +00:00
Vadim Pisarevsky 26fd37b27d Merge pull request #3212 from mshabunin:python_cross_build_2.4 2014-09-18 08:57:32 +00:00
Vadim Pisarevsky ccaedaedc8 Merge pull request #2047 from GregoryMorse:patch-4 2014-09-17 12:48:45 +00:00
Vadim Pisarevsky c5de129c36 Merge pull request #3222 from dmitrygribanov:dg/2.4-stitching-wave-correction-bugfix 2014-09-17 10:54:02 +00:00
Vadim Pisarevsky 533dd85299 Merge pull request #3225 from jormansa:bug_#3631 2014-09-17 10:40:42 +00:00
Vadim Pisarevsky 48dc18ed59 Merge pull request #3228 from PhilLab:patch-4 2014-09-17 09:50:09 +00:00
Philipp Hasper bac492fff6 Doc: Fixing indentation 2014-09-17 09:30:19 +02:00
jormansa 1d2d579bd6 bug fixed 2014-09-15 18:09:44 +02:00
Andrey Pavlenko 80687c8a56 Merge pull request #3219 from mshabunin:png_iccp_strip_24 2014-09-15 13:54:19 +00:00
Dmitry Gribanov 8a1d3929cc Feature based stitching's wave correction bugfix.
When we have similar matrices in input, then algorithm returns matrices
with NaN values.
2014-09-15 17:04:08 +04:00
Alexander Alekhin 281ce7a054 Merge pull request #3221 from asmorkalov:ocv_2.4.10_version_inc 2014-09-15 11:12:02 +00:00
Alexander Smorkalov 343f4b3026 OpenCV version++. 2014-09-15 14:55:25 +04:00
Maksim Shabunin 882426a9b2 Stripped iCCP chunk from png files 2014-09-15 12:48:28 +04:00
Vadim Pisarevsky cf15b9e8ad Merge pull request #3204 from parafin:ximea_unix-2.4 2014-09-14 18:44:23 +00:00
Vadim Pisarevsky f4f7522fe7 Merge pull request #3202 from parafin:bug_3858-2.4 2014-09-14 18:43:48 +00:00
Maksim Shabunin 1b4e3ec35a Changed cmake python library search startegy for crosscompiling 2014-09-12 13:44:16 +04:00
GregoryMorse b9d5f3f6e9 Add support for WinRT in the MF capture framework by removing the disallowed calls to enumerate devices and create a sample grabber sink and adding framework for the MediaCapture interface and a custom sink which interfaces with the sample grabber callback interface. The change requires discussion for making it completely functional as redundancy is required given that if the source is a video file, the old code pathways must be used. Otherwise all IMFMediaSession, IMFMediaSource, and IMFActivate code must use a MediaCapture code path and all sink code must use the CMediaSink custom sink.
Support for the custom sink is extended to non-WinRT not for compatibility as Windows Vista client is a minimum regardless, but because it offers more flexibility, could be faster and is able to be used as an optionally different code path during sink creation based on a future configuration parameter.

My discussion and proposal to finish this change:
 Devices are so easily enumerated through WinRT Windows.Devices namespace that wrapping the calls in a library is quite a chore for little benefit though to get the various modes and formats could still be a worthwhile project. For now conditional compilation to remove videodevices and any offending non-video file related activity in videodevice. In my opinion, this is a different , far less fundamental and important change which can possibly be done as a future project and also much more easily implemented in C++/CX.

ImageGrabber has the IMFSampleGrabberSinkCallback replaced with a base class (SharedSampleGrabber) which also be is base class for ImageGrabberRT. This change is necessary as the custom sink does not require a thread to pump events which is done through MediaCapture already. IMFSampleGrabberSinkCallback is the common element between both models and that piece can be shared. Initializing the new ImageGrabberRT is as simple as passing an already initialized MediaCapture object and any video format/encoding parameters.

The concurrency event is necessary to wait for completion and is the way the underlying, IAsyncAction wrappers in the task library work as well. Native WIN32 event objects would be an option if HAVE_CONCURRENCY is not defined. I could even imagine doing it with sleep/thread yield and InterlockedCompareExchange yet I am not enthusiastic about that approach either. Since there is a specific compiler HAVE_ for concurrency, I do not like pulling it in though I think for WinRT it is safe to say we will always have it available though should probably conditionally compile with the Interlocked option as WIN32 events would require HAVE_WIN32.

It looks like C++/CX cannot be used for the IMediaExtension sink (which should not be a problem) as using COM objects requires WRL and though deriving from IMediaExtension can be done, there is little purpose without COM. Objects from C++/CX can be swapped to interact with objects from native C++ as Inspectable* can reinterpret_cast to the ref object IInspectable^ and vice-versa. A solution to the COM class with C++/CX would be great so we could have dual support. Also without #define for every WRL object in use, the code will get quite muddy given that the */^ would need to be ifdef'd everywhere.

Update cap_msmf.cpp

Fixed bugs and completed the change.  I believe the new classes need to be moved to a header file as the file has become to large and more classes need to be added for handling all the asynchronous problems (one wrapping IAsyncAction in a task and another for making a task out of IAsyncAction).  Unfortunately, blocking on the UI thread is not an option in WinRT so a synchronous architecture is considered "illegal" by Microsoft's standards even if implementable (C++/CX ppltasks library throws errors if you try it).  Worse, either by design or a bug in the MF MediaCapture class with Custom Sinks causes a crash if stop/start previewing without reinitializing (spPreferredPreviewMediaType is fatally nulled).  After decompiling Windows.Media.dll, I worked around this in my own projects by using an activate-able custom sink ID which strangely assigns 1 to this pointer allowing it to be reinitialized in what can only be described as a hack by Microsoft.  This would add additional overhead to the project to implement especially for static libraries as it requires IDL/DLL exporting followed by manifest declaration.  Better to document that it is not supported.

Furthermore, an additional class for IMFAttributes should be implemented to make clean architecture for passing around attributes as opposed to directly calling non-COM interface calls on the objects and making use of SetProperties which would also be a set up for an object that uses the RuntimeClass activation ID.

The remaining changes are not difficult and will be complete soon along with debug tracing messages.

Update and rename cap_msmf.h to cap_msmf.hpp

Successful test - samples are grabbed

Library updated and cleaned up with comments, marshaling, exceptions and linker settings
Fixed trailing whitespace

VS 2013 support and cleanup consistency plus C++/CX new object fixed

VS 2013 Update 2 library bug fix integrated

Various minor cleanup

Create agile_wrl.h

a-wi's changes integrated

Update cap_msmf.hpp

Update cap_msmf.cpp

Regression test fixes and simplifications
2014-09-10 17:21:38 +08:00
GregoryMorse 587402859e Add VS2013 support
Fix indentation in output that made it look like changes were dependent on WinRT when they are independent libraries.

Defaults needed flipping otherwise undesired behavior.  Change is tested with combinations.

Fixed and tested

Windows Phone v8.0/v8.1 SDK for Universal Windows Apps (Windows Phone v8.1 Silverlight App support not included) and fix initial cache causing problem
2014-09-10 17:18:41 +08:00
Igor Kuzmin 0421da78b3 XIMEA cam support: allow on OS X too 2014-09-09 19:17:13 +04:00
Igor Kuzmin b027a84fa1 XIMEA cam support: use correct library for 64 bit Linux 2014-09-09 19:15:03 +04:00
Igor Kuzmin fbbf4e380f fix for issue 3858 (remove unneeded #include's)
also use correct include path on Linux
2014-09-09 19:10:05 +04:00
Vadim Pisarevsky faed8f43d6 Merge pull request #3194 from stonier:2.4 2014-09-09 06:33:15 +00:00
Vadim Pisarevsky 9a15c7a899 Merge pull request #3197 from asmorkalov:python_tests_package 2014-09-09 06:31:18 +00:00
Alexander Smorkalov 35768ed638 Python tests added to -tests deb package. 2014-09-08 18:11:12 +04:00
Daniel Stonier 161f50962d make sure children are included in the moveToThread 2014-09-08 04:31:37 +09:00
Daniel Stonier e638b9e805 support invokation of cv windows from parallel threads to an external qt application. 2014-09-08 03:19:56 +09:00
Roman Donchenko d7737528d1 Merge pull request #3156 from sergregory:CreateSamplesMod 2014-09-05 09:49:55 +00:00
Grigory Serebryakov 18c0511d3c Warning on converting int to bool fixed 2014-09-05 11:27:43 +04:00
Grigory Serebryakov 06a1c90679 Include for cvSameImage corrected 2014-09-05 10:45:54 +04:00
Alexander Smorkalov e929dd4d98 GPU MatchTemplate32F test epsilon increased. 2014-09-02 20:24:49 +04:00
E Braun bdb82d181f fix for bug 3172 2014-09-02 18:05:23 +02:00
Vladislav Vinogradov 10a2c51c52 fix OpenCVConfig.cmake template - missing parentheses
(cherry picked from commit 67b562d543)
2014-09-02 19:30:35 +04:00
Alexander Smorkalov 4664a339ae Fix non-Android cross compilation with OpenCVConfig.cmake
(cherry picked from commit e8376c789d)
2014-09-02 19:29:59 +04:00
Vladislav Vinogradov fb81e4df1c fix CUDA cvtColor after corresponding change in CPU version
see https://github.com/Itseez/opencv/pull/3137
(cherry picked from commit ebe36d6e7c)
2014-09-02 16:48:20 +04:00
E Braun 89833853fa Revert "fix for bug 3172"
This reverts commit ed2cdb71e5.
2014-09-02 13:56:13 +02:00
Alexander Karsakov cb1e9adc63 Fixed getConversionInfo() for YUV2RGBA_* conversions
(cherry picked from commit 023a42ba55)
2014-09-02 15:05:13 +04:00
Vladislav Vinogradov 562796e41b fix cv::gpu::resize for INTER_LINEAR, now it produces the same result as CPU version
(cherry picked from commit da9be8231f)
2014-09-02 13:17:47 +04:00
Alexander Smorkalov bb93c53948 OpenCV version++. 2014-09-02 11:54:54 +04:00
Alexander Karsakov 00575b346d Fixed range for 'v' channel for 8U images.
(cherry picked from commit b027eac173)
2014-09-02 11:41:08 +04:00
Grigory Serebryakov 25d125fba1 Documentation update: createsamples usage 2014-09-02 10:55:45 +04:00
Vladislav Vinogradov 7316676c41 fix CUDA LUT implementation
In CUDA 6.0 there was a bug in NPP LUT implementation (invalid results when
src == 255). In CUDA 6.5 the bug was fixed.

Replaced NPP LUT call with own implementation (ported from master branch)
to be independant from CUDA Toolkit version.
(cherry picked from commit eaaa2d27d5)
2014-09-02 08:34:42 +04:00
Grigory Serebryakov d1229efeec No output image resize in case of PNG dataset 2014-09-01 13:02:27 +04:00
Vadim Pisarevsky fd7a2defae Merge pull request #3178 from jimcamel:freak_sse_bugfix 2014-09-01 06:15:36 +00:00
Adrian Clark fcc481e751 Fixed crash in SSE implementation of FREAK descriptor when number of pairs is set to something other than 512.
See http://code.opencv.org/issues/3889 for more details
2014-09-01 09:37:33 +12:00
Vadim Pisarevsky 1984aacb27 Merge pull request #3164 from jet47:fix-cuda-lut 2014-08-29 08:11:29 +00:00
Vladislav Vinogradov eaaa2d27d5 fix CUDA LUT implementation
In CUDA 6.0 there was a bug in NPP LUT implementation (invalid results when
src == 255). In CUDA 6.5 the bug was fixed.

Replaced NPP LUT call with own implementation (ported from master branch) 
to be independant from CUDA Toolkit version.
2014-08-28 14:47:26 +04:00
Alexander Smorkalov 77585bf8af Several fixes for lintian varnings
(cherry picked from commit 634ffed488)
2014-08-27 16:44:18 +04:00
Vladislav Vinogradov c821cb1489 fix BGR->BGR5x5 color convertion
(cherry picked from commit 62f27b28ed)
2014-08-27 16:44:18 +04:00
Vladislav Vinogradov 86c1babd03 use downscaled frames in FGDStatModel test
(cherry picked from commit 599f5ef51b)
2014-08-27 16:44:18 +04:00
Vladislav Vinogradov 2205b2f5bc increase epsilon for ResizeSameAsHost test
(cherry picked from commit 86e12b6074)
2014-08-27 16:44:18 +04:00
Vladislav Vinogradov 975e40f1c0 increase epsilon for TVL1 sanity test
(cherry picked from commit 5dff283b39)
2014-08-27 16:44:18 +04:00
Grigory Serebryakov 74d8527f8a Naming fixes and code beautification 2014-08-27 12:41:18 +04:00
Grigory Serebryakov 57cf3d1766 Class naming update
Documentation improvement
Bug in output format for JPG set fixed
2014-08-26 10:02:50 +04:00
Grigory Serebryakov f81b3101e8 Typo in string fixed 2014-08-25 18:46:23 +04:00
Grigory Serebryakov 81aefed13a Can create training set in PNG format
The format of the training set can be changed with the `-pngoutput` key.
Output image will be resized to a 640x480 size if greater.
2014-08-25 18:14:27 +04:00
Vadim Pisarevsky 41040e589f Merge pull request #3147 from asmorkalov:ocv_deb_lintian_fixes 2014-08-22 11:49:52 +00:00
Vadim Pisarevsky 6eb26c1519 Merge pull request #3109 from jet47:gpu-test-fixes 2014-08-22 07:22:23 +00:00
Vadim Pisarevsky ad7a871708 Merge pull request #3143 from jet47:cuda-cvt-color-fix 2014-08-22 07:21:46 +00:00
Alexander Smorkalov 634ffed488 Several fixes for lintian varnings 2014-08-22 10:53:33 +04:00
Vladislav Vinogradov ebe36d6e7c fix CUDA cvtColor after corresponding change in CPU version
see https://github.com/Itseez/opencv/pull/3137
2014-08-21 14:14:06 +04:00
Vadim Pisarevsky d68e62c968 Merge pull request #3137 from akarsakov:fix_cvtcolor_luv_rgb 2014-08-21 05:39:18 +00:00
Alexander Karsakov b027eac173 Fixed range for 'v' channel for 8U images. 2014-08-20 11:09:21 +04:00
Vadim Pisarevsky 2ed24876af Merge pull request #3120 from StevenPuttemans:fix_bug3863 2014-08-18 15:39:30 +00:00
Vadim Pisarevsky b08a6ccd9d Merge pull request #3118 from akarsakov:fix_cvtcolor_perf 2014-08-18 12:45:35 +00:00
StevenPuttemans d558260a8e fixing GT and GE comparison symbol 2014-08-18 13:33:40 +02:00
Alexander Karsakov 023a42ba55 Fixed getConversionInfo() for YUV2RGBA_* conversions 2014-08-18 13:01:19 +04:00
Vadim Pisarevsky 7409f21e9f Merge pull request #3108 from LeszekSwirski:fix-gemm-buf-allocate-2.4 2014-08-16 06:03:28 +00:00
Vladislav Vinogradov 62f27b28ed fix BGR->BGR5x5 color convertion 2014-08-15 14:10:15 +04:00
Vladislav Vinogradov 599f5ef51b use downscaled frames in FGDStatModel test 2014-08-15 13:42:25 +04:00
Vladislav Vinogradov 86e12b6074 increase epsilon for ResizeSameAsHost test 2014-08-15 13:42:06 +04:00
Vladislav Vinogradov 5dff283b39 increase epsilon for TVL1 sanity test 2014-08-15 13:41:47 +04:00
Leszek Swirski 341c3d5933 Fix reallocation of D buffer in gemm
Conflicts:
	modules/core/src/matmul.cpp
2014-08-15 09:57:46 +01:00
Alexander Smorkalov 628b23acc8 GCC 4.8 warning array subscript is above array bounds fixed.
(cherry picked from commit e11333dd83)
2014-08-15 10:20:31 +04:00
Vadim Pisarevsky 988555a5d9 Merge pull request #3093 from asmorkalov:ocv_array_bound_fix 2014-08-13 14:08:51 +00:00
Alexander Smorkalov e11333dd83 GCC 4.8 warning array subscript is above array bounds fixed. 2014-08-13 17:12:08 +04:00
Vadim Pisarevsky af2434c547 Merge pull request #2827 from Alexander-Petrikov-ELVEES-NEOTEK:neon-stereobm 2014-08-13 13:04:02 +00:00
Vadim Pisarevsky a4c883c098 Merge pull request #3076 from vpisarev:fix_small_filters 2014-08-11 16:10:15 +00:00
Aleksandr Petrikov 0a531815c5 fix bug 3733 for imgproc/filter.cpp 2014-08-11 16:00:21 +04:00
Vadim Pisarevsky a15db2d9cf Merge pull request #3058 from PhilLab:patch-2 2014-08-11 11:10:17 +00:00
PhilLab efc1c39315 Fixed self-assignment in cv::Ptr::operator =
A self-assignment leads to a call of release() with refcount being 2. In the release() method, refcount is decremented and then successfully checked for being 1. As a consequence, the underlying data is released. To prevent this, we test for a self-assignment
2014-08-08 17:39:12 +02:00
Vadim Pisarevsky 3334b1437b Merge pull request #3046 from StevenPuttemans:fix_Qt_locale 2014-08-07 06:40:38 +00:00
StevenPuttemans 34103ef1cb fixing setting the locale back to what should be expected
fix should be applyed for every window interface and generation
2014-08-05 16:20:08 +02:00
Vadim Pisarevsky e7f348e720 Merge pull request #3026 from jet47:fix-gpu-resize-linear 2014-08-02 21:52:51 +00:00
Vladislav Vinogradov da9be8231f fix cv::gpu::resize for INTER_LINEAR, now it produces the same result as CPU version 2014-08-01 11:33:29 +04:00
E Braun ed2cdb71e5 fix for bug 3172 2014-08-01 07:47:59 +02:00
E Braun bbe48eaac6 regression test for bug 3172 2014-08-01 00:17:17 +02:00
Alexander Alekhin bab826a381 Merge pull request #3019 from alalek:ocl_fix_pyrUp_test 2014-07-30 13:02:45 +00:00
Alexander Smorkalov 77294855d7 Android native camera rebuilt after sources update. 2014-07-30 14:52:01 +04:00
Alexander Smorkalov d8187f7518 Merge branch 'fix_androidcamera_preview_usage_bits' into 2.4 2014-07-30 14:35:00 +04:00
Alexander Alekhin 9e83463128 ocl: fix pyrUp perf test 2014-07-30 13:27:36 +04:00
Vadim Pisarevsky e98c9a7ce3 Merge pull request #2968 from LeonidBeynenson:bugfix_crash_gpu_feature_matcher_in_stitcher 2014-07-29 13:48:19 +00:00
Vadim Pisarevsky 204651e0e2 Merge pull request #3014 from vpisarev:fix_python_tests 2014-07-29 11:54:36 +00:00
Vadim Pisarevsky 042892f0d7 hopefully fixed Python tests 2014-07-29 12:27:31 +04:00
Vadim Pisarevsky 7cefaa49dd Merge pull request #2816 from ehren:avcapturesession_leak 2014-07-25 13:18:06 +00:00
Vadim Pisarevsky fc41e8850b Merge pull request #2836 from s98felix:2.4 2014-07-25 12:59:41 +00:00
Vadim Pisarevsky 38b3698b97 Merge pull request #2997 from mojoritty:bugfix_3767 2014-07-25 12:39:30 +00:00
Vadim Pisarevsky c2746b5d2a Merge pull request #3001 from asmorkalov:cuda_6.5_support 2014-07-25 11:25:36 +00:00
Alexander Smorkalov daff2a0674 More accurate deb package build fix for CUDA 6.5 and newer.
(cherry picked from commit b2790973a3)
(cherry picked from commit f8758da289)
2014-07-24 15:08:29 +04:00
Alexander Smorkalov ad5c2de97c Deb package build fix for CUDA 6.5 and newer.
(cherry picked from commit e650d87e47)
(cherry picked from commit ca9c52ac97)
2014-07-24 15:08:27 +04:00
Alexander Smorkalov f8758da289 More accurate deb package build fix for CUDA 6.5 and newer.
(cherry picked from commit b2790973a3)
2014-07-24 15:06:38 +04:00
Alexander Smorkalov ca9c52ac97 Deb package build fix for CUDA 6.5 and newer.
(cherry picked from commit e650d87e47)
2014-07-24 15:06:35 +04:00
Martijn Liem 9c285da329 Bugfix for bug #3767
Fixed a memory leak in cap_dshow.cpp in videoInput::setVideoSettingCamera(). The leak was caused by not releasing an IBaseFilter object created in a call to getDevice(). Tho object is now properly released.
2014-07-23 12:33:51 +02:00
Richard Yoo de37cfc224 Enable Intel AVX/AVX2 compilation on Windows. 2014-07-21 13:26:50 -07:00
Vadim Pisarevsky 946c09f58c Merge pull request #2985 from StevenPuttemans:fix_3777_redo 2014-07-19 18:02:20 +00:00
StevenPuttemans 4e168ffdf3 fixing bug 3777 2014-07-18 12:49:56 +02:00
Vadim Pisarevsky d7bbafd683 Merge pull request #2948 from PhilLab:patch-1 2014-07-18 10:10:44 +00:00
Vadim Pisarevsky e90c233551 Merge pull request #2984 from cambyse:2.4 2014-07-18 10:05:22 +00:00
Vadim Pisarevsky 06897dbdb5 Merge pull request #2980 from akarsakov:revert_dft_dst_fix 2014-07-18 09:57:51 +00:00
Vadim Pisarevsky 39020fc9cf Merge pull request #2898 from PhilLab:2.4 2014-07-18 09:26:50 +00:00
PhilLab d5489f3a68 Clarified DescriptorExtractor::compute 2014-07-18 10:57:54 +02:00
Camille 5a5a487612 bug fix 3381 2014-07-18 00:06:31 +02:00
Camille 46775ad186 bug fix 3381 2014-07-17 22:57:31 +02:00
Alexander Karsakov 901d9b70b0 Revert changes by PR#2930 since it breaks logic of inverse mode. 2014-07-17 15:11:06 +04:00
Vadim Pisarevsky 0b4e043442 Merge pull request #2970 from PhilLab:patch-3 2014-07-16 19:26:46 +00:00
unknown d0c3c4c373 Function for drawing arrows 2014-07-15 14:12:16 +02:00
Vadim Pisarevsky 6c5dc17a1e Merge pull request #2909 from StevenPuttemans:bugfix_profileface_model 2014-07-15 09:47:52 +00:00
Vadim Pisarevsky cf3757448d Merge pull request #2965 from soulslicer:patch-2 2014-07-15 09:44:32 +00:00
LeonidBeynenson 8578f9c565 Added a TODO comment about changes which should be done in GpuMatcher::match 2014-07-15 13:27:59 +04:00
Vadim Pisarevsky c9c09262f7 Merge pull request #2966 from PhilLab:patch-2 2014-07-15 08:10:33 +00:00
Vadim Pisarevsky faac7f18c7 Merge pull request #2967 from LeonidBeynenson:bugfix_wave_correction_wrong_result 2014-07-15 08:10:04 +00:00
Alexander Smorkalov b2790973a3 More accurate deb package build fix for CUDA 6.5 and newer. 2014-07-14 23:58:05 +04:00
Vadim Pisarevsky 8d58b238ca Merge pull request #2780 from hbadino:Feature_3692_2.4 2014-07-14 19:00:52 +00:00
Vadim Pisarevsky 51bd56f19d Merge pull request #2959 from StevenPuttemans:add_notice_loaded_parameters 2014-07-14 18:47:13 +00:00
Vadim Pisarevsky b111fb94b7 Merge pull request #2957 from cambyse:2.4 2014-07-14 18:42:49 +00:00
Vadim Pisarevsky 544dd8b130 Merge pull request #2971 from ruslo:docfix 2014-07-14 18:40:39 +00:00
Vadim Pisarevsky 246a793d82 Merge pull request #2972 from apavlenko:24_face_rec_sample 2014-07-14 18:35:37 +00:00
Alexander Smorkalov e650d87e47 Deb package build fix for CUDA 6.5 and newer. 2014-07-14 21:27:23 +04:00
Alexander Smorkalov feb74b125d Build fixes for CUDA 6.5
(cherry picked from commit 60a5ada454)
2014-07-14 16:39:23 +04:00
Alexander Smorkalov 3c0b0b0f94 Build fixes for CUDA 6.5
(cherry picked from commit 60a5ada454)
2014-07-14 16:37:50 +04:00
Roman Donchenko d31a0eab9e Merge pull request #2815 from Aletheios:Bugfix#3705 2014-07-14 12:19:31 +00:00
Roman Donchenko ccbc764c02 Merge pull request #2975 from asmorkalov:ocv_cuda_6.5_fix 2014-07-14 12:11:49 +00:00
Alexander Smorkalov 60a5ada454 Build fixes for CUDA 6.5 2014-07-14 14:26:50 +04:00
Roman Donchenko d3c2b15f82 Merge pull request #2955 from SpecLad:find-libv4l2 2014-07-14 08:21:24 +00:00
Ruslan Baratov b030d7e6a1 Doc: fix definition of macro CV_MAKETYPE
At least this is how it's defined in core/types_c.h
2014-07-12 19:35:22 +04:00
Andrey Pavlenko 64d8cf1e2e improving face-rec sample:
* CSV can contain dir-s and wildcards
* save trained model
2014-07-12 19:28:43 +04:00
Roman Donchenko d262b04d99 Merge pull request #2903 from mmaraya:2.4 2014-07-11 14:15:59 +00:00
Leonid Beynenson cce2d9927e Fixed bug which caused crash of GPU version of feature matcher in stitcher
The bug caused crash of GPU version of feature matcher in stitcher when
we use ORB features.
2014-07-11 16:37:30 +04:00
Leonid Beynenson 79878a57a9 Fixed bug in cv::detail::waveCorrect
The function makes wave correction of a stitched panorama.
Earlier it gave wrong results for panorama made from 1 frame.
2014-07-11 15:47:41 +04:00
StevenPuttemans 03fe86f0a3 added extra warning about the automatic parameter loading for traincascade application when the param.xml file already exists 2014-07-11 11:42:13 +02:00
PhilLab 13a0c14e6c Added publication reference 2014-07-11 09:22:55 +02:00
Raaj 6e022dcb06 Update facedetect.cpp
Somebody forgot to add curly brackets
2014-07-10 17:44:40 -07:00
Richard Yoo c38023f4e7 Modifications to support dynamic vector dispatch. 2014-07-09 16:55:39 -07:00
Camille cbb5fc0acc bug fix 3696 2014-07-09 22:35:56 +02:00
Alexander Alekhin 2df3abe16b Merge pull request #2954 from ilya-lavrenov:doc_fix 2014-07-09 14:57:46 +00:00
Ilya Lavrenov ecec53f509 fixed docs 2014-07-09 17:48:28 +04:00
Roman Donchenko 023102c804 cap_libv4l.cpp depends on both libv4l 1 and 2, so search for both
How this worked before, I do not know.
2014-07-09 16:55:40 +04:00
unknown 52c05e75cc Fixed C++11 compatibility warning 2014-07-09 14:19:15 +02:00
Roman Donchenko 3d48994a72 Merge pull request #2883 from berak:b_3756_24 2014-07-09 07:49:47 +00:00
berak 7b160fa3cb added missing impl for multi-dim Mat::ones, Mat::zeros (issue #3756) 2014-07-08 18:04:56 +02:00
Roman Donchenko 71d3654832 Merge pull request #2558 from asmorkalov:ocv_matop_init_fix 2014-07-08 12:14:55 +00:00
PhilLab 2c29ee9e00 Added cast and removed formatting error 2014-07-08 13:24:35 +02:00
PhilLab aafda43df1 Double precision for solvePnPRansac()
solvePnPRansac() and pnpTask() now accept object or image points with double precision.
2014-07-08 11:52:42 +02:00
Vadim Pisarevsky 39127d942e Merge pull request #2908 from mmaraya:bug_3737 2014-07-07 13:29:38 +00:00
Vadim Pisarevsky b068e63618 Merge pull request #2930 from akarsakov:dft_dst_size_fix 2014-07-07 11:21:12 +00:00
Alexander Karsakov 4b8fb6c246 Fixed dst size 2014-07-03 15:17:51 +04:00
StevenPuttemans 939c60bcaa fixed two models, adding xml identifier to correct position 2014-07-01 10:27:36 +02:00
Mike Maraya 7936faf9a3 Fixes build failure on Mac OS X 10.10 Yosemite Beta due to highgui/src/window_cocoa.mm (Bug #3737) 2014-06-27 08:34:40 -04:00
Mike Maraya 5c85f816c9 Revert "Fixes build failure on Mac OS X 10.10 Yosemite Beta due to highgui/src/window_cocoa.mm (Bug #3737)"
This reverts commit 56683e6d11.
2014-06-27 08:20:22 -04:00
Mike Maraya 56683e6d11 Fixes build failure on Mac OS X 10.10 Yosemite Beta due to highgui/src/window_cocoa.mm (Bug #3737) 2014-06-27 08:02:01 -04:00
Mike Maraya fbac578c79 Fixes resizeWindow() on OS X (Bug #3200) 2014-06-27 23:26:09 -04:00
unknown ade46bd428 Fixed typos in comments 2014-06-26 16:29:45 +02:00
Alexander Petrikov 6882970248 Add CV_Assert (ndisp % 8 == 0) to NEON version 2014-06-23 11:08:51 +04:00
Richard Yoo 11a09ef5cc Changes to support Intel AVX/AVX2 in cvResize(). 2014-06-06 15:39:09 -07:00
Aleksandr Petrikov 1a1cd9b4e9 add NEON realization for StereoBM(findCorrespondence, prefilterXSobel) 2014-06-04 12:06:33 +04:00
Ehren Metcalfe cd3aa0184a Fix resource leak with iOS camera due to failure to remove AVCaptureSession input/outputs on stop (Bug #3389) 2014-05-31 19:41:16 -04:00
aletheios 1020a93fa3 Bugfix #3705: params.setRecordingHint(true) breaks camera preview on Samsung Galaxy S2 2014-05-31 18:44:32 +02:00
Hernan Badino 8a3b93773d Merge branch 'Itseez-2.4' into Feature_3692_2.4 2014-05-20 09:28:11 -04:00
Hernan Badino bcd63766ce Merge branch '2.4' of https://github.com/Itseez/opencv into Itseez-2.4 2014-05-20 09:27:59 -04:00
Hernan Badino ca40d635e4 Switched insertion of connected components in filterSpecklesImpl 2014-05-19 10:12:07 -04:00
Vladislav Vinogradov 942401de16 fix output matrix allocation in cv::subtract(cherry picked from commit 629461c836) 2014-05-07 20:16:27 +04:00
Vladislav Vinogradov f9ff9c5618 fix cv::subtract function:
call dst.create(...) before using it(cherry picked from commit 4c66614e07)
2014-05-07 16:54:20 +04:00
Jüri Aedla 6fb83f869c Android camera qcom HAL doesn't like it when no consumer usage bits are set. Set a usage bit for preview BufferQueue. 2014-05-01 16:03:39 +03:00
Alexander Smorkalov 0c30b18769 Bug #3611 Initializing static cv::Mat with cv::Mat::zeros causes segmentation fault fixed. 2014-04-01 18:00:44 -07:00
Vladislav Vinogradov b4845d8c9f temporary disable performance test for alphaComp function(cherry picked from commit 1ce5165cb7) 2014-02-14 17:12:31 +04:00
Alexander Smorkalov ea51396731 Dead code removed as this cannot be null in Java.
(cherry picked from commit dbe7634286)
2014-02-13 20:13:47 +04:00
Vladislav Vinogradov aa82f921cc temporary disable perf test for StereoBeliefPropagation(cherry picked from commit eb247d826f) 2014-02-13 20:13:38 +04:00
Vladislav Vinogradov 2da7eae2c4 increase epsilon for AlphaComp sanity test for integer input(cherry picked from commit 9e69e2a07a) 2014-02-13 20:13:27 +04:00
Alexander Smorkalov 25159d8e81 Application pause/resume fix for Android sample NativeActivity.
(cherry picked from commit 7da3e98dfd)
2014-02-13 17:59:23 +04:00
Alexander Smorkalov f40ffe4763 LICENSE and README files installation rules added.
(cherry picked from commit e55f2b2602)
2014-02-12 19:36:52 +04:00
Alexander Smorkalov 116311b7b4 opencv_run_all_tests.sh implemented for Android SDK.
(cherry picked from commit d02c291160)
2014-02-12 19:36:43 +04:00
Alexander Smorkalov f1ef3a4865 OpenCV version++. 2014-02-11 10:15:02 +04:00
Vladislav Vinogradov 9997aa8187 decrease input size for several gpu tests to fix "timed out" error:
* BruteForceNonLocalMeans
* OpticalFlowBM(cherry picked from commit 8b44a42a40)
2014-02-10 15:48:52 +04:00
Vladislav Vinogradov f15b42018c fix nonfree module compilation without CUDA(cherry picked from commit 3e1f74f2ca) 2014-02-10 15:48:52 +04:00
Alexander Smorkalov f9e9ae85bd dynamicuda module disabled in OpenCv.mk for all arches except armeabi-v7a.
(cherry picked from commit b10d4b05ed)
2014-02-10 15:48:52 +04:00
Alexander Smorkalov a49beb7c73 Multiple improvements in OpenCV examples build.
EMBED_CUDA and FORCE_EMBED_OPENCV flags added to cmake macro add_android_project;
INSTALL_CUDA_LIBRARIES option added to OpenCV.mk
opencv_dynamicuda library installation with enabled OPENCV_INSTALL_MODULES flag fixed;
CUDA initialization apportunity added to OpenCVLoader.initDebug();
Tutorial-4-CUDA sample reimplemented with static OpenCV and CUDA initialization.
(cherry picked from commit 6ae4a9b09b)
2014-02-10 15:48:52 +04:00
Alexander Smorkalov 51dff5b9e8 project.properties file generation fixed for per-component installation.
(cherry picked from commit 65b4d77959)
2014-02-10 15:48:52 +04:00
Alexander Smorkalov 826fc00374 Tests install path fix for Android SDK.
(cherry picked from commit 0cd0e4749b)
2014-02-10 15:48:52 +04:00
Vladislav Vinogradov c10692deff save previous values of LOCAL_* variables and restore them at the end(cherry picked from commit 286fe261d0) 2014-02-10 15:48:52 +04:00
Vladislav Vinogradov daa7b9ce5f fix path to CUDA libraries (use targets/armv7-linux-androideabi/lib)(cherry picked from commit a098fb1803) 2014-02-10 15:48:52 +04:00
Vladislav Vinogradov 1ab02631b0 update stitching sample
(cherry picked from commit 214cbabc40)
2014-02-10 15:48:52 +04:00
Vladislav Vinogradov 3e755b2290 turn on CUDA part of stitching module on Android for non-dynamic build(cherry picked from commit a138e5a6a5) 2014-02-10 15:48:51 +04:00
Vladislav Vinogradov f15a167df4 turn on CUDA part of nonfree module on Android for non-dynamic build(cherry picked from commit d8f7377122) 2014-02-10 15:48:51 +04:00
Ilya Lavrenov f6367a2ea5 eliminated possible memory leak
(cherry picked from commit e7e63fac6c)
2014-02-10 15:48:51 +04:00
Vladislav Vinogradov 5f88e2b496 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.(cherry picked from commit c41e8006c7)
2014-02-10 15:48:51 +04:00
Seunghoon Park 2c7cf52e3b fixing bug #3345. use norm to make sure two matrices are the same.
(cherry picked from commit eb9d7c4dd5)
2014-02-10 15:48:51 +04:00
Andrey Pavlenko b7c5083a87 removing duplicated legacy license, the actual instance is in 'opencv/LICENSE'
(cherry picked from commit dca5684145)
2014-02-10 15:48:51 +04:00
Vladislav Vinogradov d5d88efd5d fix GpuMat::copyTo method with mask:
fill destination matrix with zeros if it was reallocated(cherry picked from commit dda999545c)
2014-02-10 15:48:51 +04:00
Drew Jetter 6cb7a7be18 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.
(cherry picked from commit 6bf599b1bc)
2014-02-10 15:48:51 +04:00
Pierre-Emmanuel Viel cdea6b532f Fix: freeing previous elements has to be done before loading new parameters to avoid trying to delete unexisting objects if arrays size was modified
(cherry picked from commit 3f458c6eb1)
2014-02-10 15:48:51 +04:00
ComFreek d01e3529a6 Corrected package name in tutorial
See also #2101(cherry picked from commit ae795e5797)
2014-02-10 15:48:51 +04:00
Nghia Ho 7c13d3277c 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.
(cherry picked from commit 601b7d1dd3)
2014-02-10 15:48:51 +04:00
Robbert Klarenbeek 345b3b0bdd Fix algorithm setter argument validation for uchar(cherry picked from commit e21c6e19db) 2014-02-10 15:48:51 +04:00
Kazuki Matsuda a65d7d4dd3 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
(cherry picked from commit 2ae20c74a2)
2014-02-10 15:48:51 +04:00
Ilya Lavrenov 5e986f3347 fixed bug #3319
(cherry picked from commit 4f9c081dc3)
2014-02-10 15:48:50 +04:00
Seunghoon Park 27a8bb471b fixing bug #3345. don't use BORDER_ISOLATED alone. it should be combined with some border type
(cherry picked from commit 2272a58769)
2014-02-10 15:48:50 +04:00
Seunghoon Park 7868733002 fixing bug #3345
(cherry picked from commit b036fc756a)
2014-02-10 15:48:50 +04:00
Ilya Lavrenov 469aef2e5e fixed bug #3341
(cherry picked from commit 09d25e11c6)
2014-02-10 15:48:50 +04:00
Roman Donchenko 5e00fc6afe 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.
(cherry picked from commit 795c108f2b)
2014-02-10 15:48:50 +04:00
Vladislav Vinogradov 5170f0b5da fixed several bugs in CUDA Canny implementation:
* out of border access in edgesHysteresisLocalKernel
* incorrect usage of atomicAdd(cherry picked from commit 5dbdadb769)
2014-02-07 20:59:13 +04:00
Vladislav Vinogradov dc2dbb4173 Revert "disable gpu Canny and HoughCircles perf tests:"
This reverts commit dbce90692a.
(cherry picked from commit bfc27271e2)
2014-02-07 20:58:49 +04:00
Vladislav Vinogradov 79e4f7eb78 Revert "disable CUDA generalized Hough Transform"
This reverts commit 33d42b740c.
(cherry picked from commit 5d099df578)
2014-02-07 18:24:57 +04:00
Vladislav Vinogradov cc73c7000f fix epsilons for several gpu tests
(cherry picked from commit 3e4bb371c8)
2014-02-07 18:24:44 +04:00
Vladislav Vinogradov 8bb26fa5de Revert "disable gpu CvtColor.*2HSV tests:"
This reverts commit 952027a853.
(cherry picked from commit b6ba1f226c)
2014-02-07 18:24:35 +04:00
Vladislav Vinogradov 48612d7c58 Revert "disable gpu Subtract_Array test:"
This reverts commit e91bf95d58.
(cherry picked from commit da44a2fac1)
2014-02-07 18:24:23 +04:00
Alexander Smorkalov 8ba84f4b47 Implicit testdata directory permissions setup added.
(cherry picked from commit b86088b89c)
2014-02-07 18:24:11 +04:00
Alexander Smorkalov bc653add74 Absolute path to tests in opencv_run_app_tests.sh fixed.
(cherry picked from commit 530702c5f2)
2014-02-06 17:16:21 +04:00
Alexander Smorkalov 215f78eee2 Merge branch 'android_manager_version_inc4' into 2.4.8.1-prep 2014-01-31 22:25:36 +04:00
Vladislav Vinogradov 4425dac7f4 disable gpu CvtColor.*2HSV tests:
possible bug in CPU version(cherry picked from commit 3cb8b352e52f85847d98d2b0ece32ba5bdb5c31b)
2014-01-31 22:24:20 +04:00
Vladislav Vinogradov 4f79b9de48 disable gpu Subtract_Array test:
possible bug in CPU version(cherry picked from commit 59155c1eefb6f22e362e34a8d73b31841eb3413a)
2014-01-31 22:23:55 +04:00
Vladislav Vinogradov 397ac5e68f disable gpu Canny and HoughCircles perf tests:
it fails because driver terminates CUDA kernels after time out
(cherry picked from commit fa5bbb5f8dc1a86cfe004fb258d66e56c90560d6)
2014-01-31 22:23:39 +04:00
Vladislav Vinogradov 43c75c64b5 disable NPP for GpuMat methods and for copyMakeBorder(cherry picked from commit 316d49fc0fb7a609ebb0a65efc207faea6b978a4) 2014-01-31 22:23:22 +04:00
Vladislav Vinogradov c319625a07 disable some gpu tests if library was built without CUFFT(cherry picked from commit b4b929d27cc25822dd15b5b96b8d335c59d4408c) 2014-01-31 22:23:05 +04:00
Vladislav Vinogradov a7d0448faa gpu test output files moved from cwd to temp folder(cherry picked from commit 49731ad530) 2014-01-31 22:22:49 +04:00
Alexander Smorkalov ca10e5e8ae Highgui test output fixes.
Useless output to console fixed;
Test output files moved from cwd to temp folder.
(cherry picked from commit 87935f3560)
2014-01-31 22:22:33 +04:00
Vladislav Vinogradov 32414afe72 disable performance test for gpu generalized hough(cherry picked from commit 063d8b4211) 2014-01-31 22:22:14 +04:00
Alexander Smorkalov ed10f50d25 Reports path fix for opencv_run_all_tests.sh.in script.
(cherry picked from commit 3d261e8a01)
2014-01-31 22:21:57 +04:00
Alexander Smorkalov 48d9be70d5 Android toolchain file sync with original project.
Original project: https://github.com/taka-no-me/android-cmake/
Revision: 5db45cfb87fec180b74963d3680dd60d4d8d8c3a
(cherry picked from commit c815043607)
2014-01-31 22:21:34 +04:00
Alexander Smorkalov c6b31481b6 OpenCV Manager version++. 2014-01-31 12:15:22 +04:00
Alexander Smorkalov 514b714cc2 opencv_run_all_tests.sh script added to -tests package.
(cherry picked from commit d45350a06a)
2014-01-29 17:41:59 +04:00
Alexander Smorkalov 7fec87d3f6 Multiple fixes for tests deb package build.
Added opencv_testing.sh.in file;
opencv_testing.sh installation guarded by OS check.
(cherry picked from commit d9dc5ffa91)
2014-01-28 17:56:22 +04:00
Alexander Smorkalov 00d555f051 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.
(cherry picked from commit 39201e68e2)
2014-01-27 21:37:01 +04:00
Alexander Smorkalov 6cf7d6ef4e OpenCV C/C++/OCL/CUDA samples install path fixed. Install rools for tests added.
(cherry picked from commit f332cba14b)
2014-01-27 21:36:43 +04:00
Alexander Smorkalov 3ebdcafdd3 All installed files marked with component names for install customization.
(cherry picked from commit b75cbfde45)

Conflicts:

	cmake/OpenCVModule.cmake
2014-01-24 17:13:22 +04:00
Alexander Smorkalov a348f3eeaa OpenCV version++ 2014-01-24 14:49:56 +04:00
Alexander Smorkalov 33f423de04 Improvements in package build.
(cherry picked from commit 086792ec06)
2014-01-24 14:48:51 +04:00
Alexander Smorkalov d6ba52c3f9 Initial Linux packages build rools for CPack.
(cherry picked from commit 7821fe2bde)

Conflicts:

	cmake/OpenCVModule.cmake
2014-01-24 14:48:19 +04:00
Vladislav Vinogradov e9638d0997 disable CUDA generalized Hough Transform
(cherry picked from commit 33d42b740c)
2014-01-24 14:46:36 +04:00
Vladislav Vinogradov 5cb0084547 split CUDA Hough sources
(cherry picked from commit d847387694)
2014-01-24 14:46:16 +04:00
692 changed files with 743885 additions and 360765 deletions
+1
View File
@@ -0,0 +1 @@
ippicv
+2
View File
@@ -3,9 +3,11 @@ set(HAVE_FFMPEG_CODEC 1)
set(HAVE_FFMPEG_FORMAT 1)
set(HAVE_FFMPEG_UTIL 1)
set(HAVE_FFMPEG_SWSCALE 1)
set(HAVE_FFMPEG_RESAMPLE 0)
set(HAVE_GENTOO_FFMPEG 1)
set(ALIASOF_libavcodec_VERSION 55.18.102)
set(ALIASOF_libavformat_VERSION 55.12.100)
set(ALIASOF_libavutil_VERSION 52.38.100)
set(ALIASOF_libswscale_VERSION 2.3.100)
set(ALIASOF_libavresample_VERSION 1.0.1)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -26,7 +26,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
endif()
ocv_warnings_disable(CMAKE_C_FLAGS -Wcast-align -Wshadow -Wunused)
ocv_warnings_disable(CMAKE_C_FLAGS -Wunused-parameter) # clang
ocv_warnings_disable(CMAKE_C_FLAGS -Wunused-parameter -Wshift-negative-value) # clang
set_target_properties(${JPEG_LIBRARY}
PROPERTIES OUTPUT_NAME ${JPEG_LIBRARY}
+1 -1
View File
@@ -14,7 +14,7 @@ ocv_include_directories("${CMAKE_CURRENT_SOURCE_DIR}" ${ZLIB_INCLUDE_DIR})
file(GLOB lib_srcs *.c)
file(GLOB lib_hdrs *.h)
if(NEON)
if(ARM AND NEON)
list(APPEND lib_srcs arm/filter_neon.S)
add_definitions(-DPNG_ARM_NEON)
endif()
+1
View File
@@ -93,6 +93,7 @@ ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4018 /wd4100 /wd4127 /wd4311 /wd4701 /wd
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4244) # vs2008
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4267 /wd4305 /wd4306) # vs2008 Win64
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4703) # vs2012
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4456 /wd4457 /wd4312) # vs2015
ocv_warnings_disable(CMAKE_C_FLAGS /wd4267 /wd4244 /wd4018)
+2
View File
@@ -38,10 +38,12 @@ source_group("Include" FILES ${lib_hdrs} )
source_group("Src" FILES ${lib_srcs})
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wshadow -Wunused -Wsign-compare -Wundef -Wmissing-declarations -Wuninitialized -Wswitch -Wparentheses -Warray-bounds -Wextra)
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wdeprecated-declarations)
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4018 /wd4099 /wd4100 /wd4101 /wd4127 /wd4189 /wd4245 /wd4305 /wd4389 /wd4512 /wd4701 /wd4702 /wd4706 /wd4800) # vs2005
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4334) # vs2005 Win64
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4244) # vs2008
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4267) # vs2008 Win64
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4456 /wd4457 /wd4312) # vs2015
if(UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR CV_ICC))
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
+23 -17
View File
@@ -5,21 +5,26 @@ if (WIN32 AND NOT ARM)
message(FATAL_ERROR "BUILD_TBB option supports Windows on ARM only!\nUse regular official TBB build instead of the BUILD_TBB option!")
endif()
if (WIN32 AND ARM)
# 4.1 update 4 - The first release that supports Windows RT. Hangs on some Android devices
set(tbb_ver "tbb41_20130613oss")
set(tbb_url "http://threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb41_20130613oss_src.tgz")
set(tbb_md5 "108c8c1e481b0aaea61878289eb28b6a")
set(tbb_version_file "version_string.ver")
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4702)
else()
# 4.1 update 2 - works fine
set(tbb_ver "tbb41_20130116oss")
set(tbb_url "http://threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb41_20130116oss_src.tgz")
set(tbb_md5 "3809790e1001a1b32d59c9fee590ee85")
set(tbb_version_file "version_string.ver")
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wshadow)
endif()
set(tbb_ver "tbb43_20141204oss")
set(tbb_url "http://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb43_20141204oss_src.tgz")
set(tbb_md5 "e903dd92d9433701f097fa7ca29a3c1f")
set(tbb_version_file "version_string.ver")
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4702)
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wshadow)
# 4.1 update 4 - The first release that supports Windows RT. Hangs on some Android devices
#set(tbb_ver "tbb41_20130613oss")
#set(tbb_url "http://threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb41_20130613oss_src.tgz")
#set(tbb_md5 "108c8c1e481b0aaea61878289eb28b6a")
#set(tbb_version_file "version_string.ver")
#ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4702)
# 4.1 update 2 - works fine
#set(tbb_ver "tbb41_20130116oss")
#set(tbb_url "http://threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb41_20130116oss_src.tgz")
#set(tbb_md5 "3809790e1001a1b32d59c9fee590ee85")
#set(tbb_version_file "version_string.ver")
#ocv_warnings_disable(CMAKE_CXX_FLAGS -Wshadow)
# 4.1 update 3 dev - Hangs on some Android devices
#set(tbb_ver "tbb41_20130401oss")
@@ -113,7 +118,7 @@ if(NOT EXISTS "${tbb_tarball}")
message(STATUS "Downloading ${tbb_ver}_src.tgz")
file(DOWNLOAD "${tbb_url}" "${tbb_tarball}" TIMEOUT 600 STATUS __statvar)
if(NOT __statvar EQUAL 0)
message(FATAL_ERROR "Failed to download TBB sources: ${tbb_url}")
message(FATAL_ERROR "Failed to download TBB sources (${__statvar}): ${tbb_url}")
endif()
getMD5("${tbb_tarball}" tbb_local_md5)
if(NOT tbb_local_md5 STREQUAL tbb_md5)
@@ -169,6 +174,7 @@ if (WIN32)
set(CMAKE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS} /APPCONTAINER")
else()
add_definitions(-D__TBB_DYNAMIC_LOAD_ENABLED=0 #required
-D__TBB_WEAK_SYMBOLS_PRESENT=0 #required for 4.3
-D__TBB_BUILD=1 #required
-D__TBB_SURVIVE_THREAD_SWITCH=0 #no cilk support
-DTBB_USE_DEBUG=0 #just to be sure
@@ -198,7 +204,7 @@ endif()
set(TBB_SOURCE_FILES ${lib_srcs} ${lib_hdrs})
if (ARM AND NOT WIN32)
if ((ARM OR AARCH64) AND NOT WIN32)
if (NOT ANDROID)
set(TBB_SOURCE_FILES ${TBB_SOURCE_FILES} "${CMAKE_CURRENT_SOURCE_DIR}/arm_linux_stub.cpp")
endif()
+1 -1
View File
@@ -82,7 +82,7 @@ if(UNIX)
endif()
endif()
ocv_warnings_disable(CMAKE_C_FLAGS -Wattributes -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations)
ocv_warnings_disable(CMAKE_C_FLAGS -Wshorten-64-to-32 -Wattributes -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wshift-negative-value)
set_target_properties(${ZLIB_LIBRARY} PROPERTIES
OUTPUT_NAME ${ZLIB_LIBRARY}
+71 -27
View File
@@ -47,12 +47,24 @@ if(POLICY CMP0022)
cmake_policy(SET CMP0022 OLD)
endif()
if(POLICY CMP0026)
# silence cmake 3.0+ warnings about reading LOCATION attribute
cmake_policy(SET CMP0026 OLD)
endif()
if (POLICY CMP0042)
# silence cmake 3.0+ warnings about MACOSX_RPATH
cmake_policy(SET CMP0042 OLD)
endif()
# must go before the project command
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Configs" FORCE)
if(DEFINED CMAKE_BUILD_TYPE AND CMAKE_VERSION VERSION_GREATER "2.8")
set_property( CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${CMAKE_CONFIGURATION_TYPES} )
endif()
enable_testing()
project(OpenCV CXX C)
if(MSVC)
@@ -128,14 +140,15 @@ OCV_OPTION(WITH_1394 "Include IEEE1394 support" ON
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 IOS) )
OCV_OPTION(WITH_VTK "Include VTK library support (and build opencv_viz module eiher)" OFF IF (NOT ANDROID AND NOT IOS) )
OCV_OPTION(WITH_VTK "Include VTK library support (and build opencv_viz module eiher)" OFF IF (NOT ANDROID AND NOT IOS AND NOT CMAKE_CROSSCOMPILING) )
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 )
OCV_OPTION(WITH_FFMPEG "Include FFMPEG support" ON IF (NOT ANDROID AND NOT IOS))
OCV_OPTION(WITH_GSTREAMER "Include Gstreamer support" ON IF (UNIX AND NOT APPLE AND NOT ANDROID) )
OCV_OPTION(WITH_GSTREAMER "Include Gstreamer support" ON IF (UNIX AND NOT ANDROID) )
OCV_OPTION(WITH_GSTREAMER_0_10 "Enable Gstreamer 0.10 support (instead of 1.x)" OFF )
OCV_OPTION(WITH_GTK "Include GTK support" ON IF (UNIX AND NOT APPLE AND NOT ANDROID) )
OCV_OPTION(WITH_IMAGEIO "ImageIO support for OS X" OFF IF APPLE )
OCV_OPTION(WITH_IPP "Include Intel IPP support" OFF IF (MSVC OR X86 OR X86_64) )
@@ -159,7 +172,7 @@ OCV_OPTION(WITH_V4L "Include Video 4 Linux support" ON
OCV_OPTION(WITH_LIBV4L "Use libv4l for Video 4 Linux support" ON IF (UNIX AND NOT ANDROID) )
OCV_OPTION(WITH_DSHOW "Build HighGUI with DirectShow support" ON IF (WIN32 AND NOT ARM) )
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_XIMEA "Include XIMEA cameras support" OFF IF (NOT ANDROID) )
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 IOS) )
OCV_OPTION(WITH_OPENCLAMDFFT "Include AMD OpenCL FFT library support" ON IF (NOT ANDROID AND NOT IOS) )
@@ -181,6 +194,7 @@ OCV_OPTION(BUILD_WITH_STATIC_CRT "Enables use of staticaly linked CRT for sta
OCV_OPTION(BUILD_FAT_JAVA_LIB "Create fat java wrapper containing the whole OpenCV library" ON IF NOT BUILD_SHARED_LIBS AND CMAKE_COMPILER_IS_GNUCXX )
OCV_OPTION(BUILD_ANDROID_SERVICE "Build OpenCV Manager for Google Play" OFF IF ANDROID AND ANDROID_SOURCE_TREE )
OCV_OPTION(BUILD_ANDROID_PACKAGE "Build platform-specific package for Google Play" OFF IF ANDROID )
OCV_OPTION(BUILD_TINY_GPU_MODULE "Build tiny gpu module with limited image format support" OFF )
# 3rd party libs
OCV_OPTION(BUILD_ZLIB "Build zlib from source" WIN32 OR APPLE )
@@ -217,12 +231,17 @@ 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_AVX2 "Enable AVX2 instructions" OFF IF ((MSVC OR CMAKE_COMPILER_IS_GNUCXX) AND (X86 OR X86_64)) )
OCV_OPTION(ENABLE_NEON "Enable NEON instructions" AARCH64 IF CMAKE_COMPILER_IS_GNUCXX AND (ARM OR AARCH64))
OCV_OPTION(ENABLE_VFPV3 "Enable VFPv3-D32 instructions" AARCH64 IF CMAKE_COMPILER_IS_GNUCXX AND (ARM OR AARCH64))
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 )
OCV_OPTION(ENABLE_LIBVS2013 "Build VS2013 with Visual Studio 2013 libraries" OFF IF WIN32 AND (MSVC_VERSION EQUAL 1800) )
OCV_OPTION(ENABLE_WINSDK81 "Build VS2013 with Windows 8.1 SDK" OFF IF WIN32 AND (MSVC_VERSION EQUAL 1800) )
OCV_OPTION(ENABLE_WINPHONESDK80 "Build with Windows Phone 8.0 SDK" OFF IF WIN32 AND (MSVC_VERSION EQUAL 1700) )
OCV_OPTION(ENABLE_WINPHONESDK81 "Build VS2013 with Windows Phone 8.1 SDK" OFF IF WIN32 AND (MSVC_VERSION EQUAL 1800) )
# uncategorized options
# ===================================================
@@ -434,6 +453,8 @@ if(UNIX)
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} dl m log)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD|NetBSD|DragonFly")
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} m pthread)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "QNX")
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} m)
else()
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} dl m pthread rt)
endif()
@@ -472,8 +493,13 @@ include(cmake/OpenCVFindLibsPerf.cmake)
# ----------------------------------------------------------------------------
# --- LATEX for pdf documentation ---
unset(HAVE_DOXYGEN CACHE)
if(BUILD_DOCS)
include(cmake/OpenCVFindLATEX.cmake)
find_host_program(DOXYGEN_BUILD doxygen)
if (DOXYGEN_BUILD)
set(HAVE_DOXYGEN 1)
endif (DOXYGEN_BUILD)
endif(BUILD_DOCS)
# --- Python Support ---
@@ -593,23 +619,35 @@ include(cmake/OpenCVGenConfig.cmake)
include(cmake/OpenCVGenInfoPlist.cmake)
# Generate environment setup file
if(INSTALL_TESTS AND OPENCV_TEST_DATA_PATH AND UNIX)
if(INSTALL_TESTS AND OPENCV_TEST_DATA_PATH)
if(ANDROID)
get_filename_component(TEST_PATH ${OPENCV_TEST_INSTALL_PATH} DIRECTORY)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/templates/opencv_run_all_tests_android.sh.in"
"${CMAKE_BINARY_DIR}/unix-install/opencv_run_all_tests.sh" @ONLY)
install(PROGRAMS "${CMAKE_BINARY_DIR}/unix-install/opencv_run_all_tests.sh"
DESTINATION ${CMAKE_INSTALL_PREFIX} COMPONENT tests)
else()
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_unix.sh.in"
"${CMAKE_BINARY_DIR}/unix-install/opencv_run_all_tests.sh" @ONLY)
install(PROGRAMS "${CMAKE_BINARY_DIR}/unix-install/opencv_run_all_tests.sh"
DESTINATION ${OPENCV_TEST_INSTALL_PATH} COMPONENT tests)
DESTINATION . COMPONENT tests)
elseif(WIN32 OR UNIX)
set(OPENCV_PYTHON_TESTS_LIST "")
if(BUILD_opencv_python)
file(GLOB py_tests modules/python/test/*.py)
install(PROGRAMS ${py_tests} DESTINATION ${OPENCV_TEST_INSTALL_PATH} COMPONENT tests)
if(BUILD_opencv_nonfree)
file(GLOB py_nonfree_tests modules/python/test/nonfree_tests/*.py)
install(PROGRAMS ${py_nonfree_tests} DESTINATION ${OPENCV_TEST_INSTALL_PATH}/nonfree_tests COMPONENT tests)
endif()
set(OPENCV_PYTHON_TESTS_LIST "test.py")
endif()
if(WIN32)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/templates/opencv_run_all_tests_windows.cmd.in"
"${CMAKE_BINARY_DIR}/win-install/opencv_run_all_tests.cmd" @ONLY)
install(PROGRAMS "${CMAKE_BINARY_DIR}/win-install/opencv_run_all_tests.cmd"
DESTINATION ${OPENCV_TEST_INSTALL_PATH} COMPONENT tests)
else()
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/templates/opencv_run_all_tests_unix.sh.in"
"${CMAKE_BINARY_DIR}/unix-install/opencv_run_all_tests.sh" @ONLY)
install(PROGRAMS "${CMAKE_BINARY_DIR}/unix-install/opencv_run_all_tests.sh"
DESTINATION ${OPENCV_TEST_INSTALL_PATH} COMPONENT tests)
endif()
endif()
endif()
@@ -627,11 +665,11 @@ endif()
if(ANDROID OR NOT UNIX)
install(FILES ${OPENCV_LICENSE_FILE}
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ
DESTINATION ${CMAKE_INSTALL_PREFIX} COMPONENT libs)
DESTINATION . COMPONENT libs)
if(OPENCV_README_FILE)
install(FILES ${OPENCV_README_FILE}
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ
DESTINATION ${CMAKE_INSTALL_PREFIX} COMPONENT libs)
DESTINATION . COMPONENT libs)
endif()
endif()
@@ -745,8 +783,8 @@ if(WIN32)
status("")
status(" Windows RT support:" HAVE_WINRT THEN YES ELSE NO)
if (ENABLE_WINRT_MODE OR ENABLE_WINRT_MODE_NATIVE)
status(" Windows SDK v8.0:" ${WINDOWS_SDK_PATH})
status(" Visual Studio 2012:" ${VISUAL_STUDIO_PATH})
status(" Windows (Phone) SDK v8.0/v8.1:" ${WINDOWS_SDK_PATH})
status(" Visual Studio 2012/2013:" ${VISUAL_STUDIO_PATH})
endif()
endif(WIN32)
@@ -855,16 +893,19 @@ if(DEFINED WITH_FFMPEG)
status(" format:" HAVE_FFMPEG_FORMAT THEN "YES (ver ${ALIASOF_libavformat_VERSION})" ELSE NO)
status(" util:" HAVE_FFMPEG_UTIL THEN "YES (ver ${ALIASOF_libavutil_VERSION})" ELSE NO)
status(" swscale:" HAVE_FFMPEG_SWSCALE THEN "YES (ver ${ALIASOF_libswscale_VERSION})" ELSE NO)
status(" resample:" HAVE_FFMPEG_RESAMPLE THEN "YES (ver ${ALIASOF_libavresample_VERSION})" ELSE NO)
status(" gentoo-style:" HAVE_GENTOO_FFMPEG THEN YES ELSE NO)
endif(DEFINED WITH_FFMPEG)
if(DEFINED WITH_GSTREAMER)
status(" GStreamer:" HAVE_GSTREAMER THEN "" ELSE NO)
if(HAVE_GSTREAMER)
status(" base:" "YES (ver ${ALIASOF_gstreamer-base-0.10_VERSION})")
status(" app:" "YES (ver ${ALIASOF_gstreamer-app-0.10_VERSION})")
status(" video:" "YES (ver ${ALIASOF_gstreamer-video-0.10_VERSION})")
endif()
status(" base:" "YES (ver ${GSTREAMER_BASE_VERSION})")
status(" video:" "YES (ver ${GSTREAMER_VIDEO_VERSION})")
status(" app:" "YES (ver ${GSTREAMER_APP_VERSION})")
status(" riff:" "YES (ver ${GSTREAMER_RIFF_VERSION})")
status(" pbutils:" "YES (ver ${GSTREAMER_PBUTILS_VERSION})")
endif(HAVE_GSTREAMER)
endif(DEFINED WITH_GSTREAMER)
if(DEFINED WITH_OPENNI)
@@ -905,8 +946,9 @@ if(DEFINED WITH_V4L)
else()
set(HAVE_CAMV4L2_STR "NO")
endif()
status(" V4L/V4L2:" HAVE_LIBV4L THEN "Using libv4l (ver ${ALIASOF_libv4l1_VERSION})"
ELSE "${HAVE_CAMV4L_STR}/${HAVE_CAMV4L2_STR}")
status(" V4L/V4L2:" HAVE_LIBV4L
THEN "Using libv4l1 (ver ${ALIASOF_libv4l1_VERSION}) / libv4l2 (ver ${ALIASOF_libv4l2_VERSION})"
ELSE "${HAVE_CAMV4L_STR}/${HAVE_CAMV4L2_STR}")
endif(DEFINED WITH_V4L)
if(DEFINED WITH_DSHOW)
@@ -960,6 +1002,7 @@ if(HAVE_CUDA)
status(" NVIDIA GPU arch:" ${OPENCV_CUDA_ARCH_BIN})
status(" NVIDIA PTX archs:" ${OPENCV_CUDA_ARCH_PTX})
status(" Use fast math:" CUDA_FAST_MATH THEN YES ELSE NO)
status(" Tiny gpu module:" BUILD_TINY_GPU_MODULE THEN YES ELSE NO)
endif()
if(HAVE_OPENCL)
@@ -1028,6 +1071,7 @@ if(BUILD_DOCS)
endif()
status(" Sphinx:" HAVE_SPHINX THEN "${SPHINX_BUILD} (ver ${SPHINX_VERSION})" ELSE NO)
status(" PdfLaTeX compiler:" PDFLATEX_COMPILER THEN "${PDFLATEX_COMPILER}" ELSE NO)
status(" Doxygen:" HAVE_DOXYGEN THEN "YES (${DOXYGEN_BUILD})" ELSE NO)
endif()
# ========================== samples and tests ==========================
+3
View File
@@ -0,0 +1,3 @@
## Contributing guidelines
All guidelines for contributing to the OpenCV repository can be found at [`How to contribute guideline`](https://github.com/Itseez/opencv/wiki/How_to_contribute).
-2
View File
@@ -1,7 +1,5 @@
### OpenCV: Open Source Computer Vision Library
[![Gittip](http://img.shields.io/gittip/OpenCV.png)](https://www.gittip.com/OpenCV/)
#### Resources
* Homepage: <http://opencv.org>
+2
View File
@@ -2,3 +2,5 @@ link_libraries(${OPENCV_LINKER_LIBS})
add_subdirectory(haartraining)
add_subdirectory(traincascade)
add_subdirectory(annotation)
add_subdirectory(visualisation)
+35
View File
@@ -0,0 +1,35 @@
SET(OPENCV_ANNOTATION_DEPS opencv_core opencv_highgui opencv_imgproc)
ocv_check_dependencies(${OPENCV_ANNOTATION_DEPS})
if(NOT OCV_DEPENDENCIES_FOUND)
return()
endif()
project(annotation)
ocv_include_directories("${CMAKE_CURRENT_SOURCE_DIR}" "${OpenCV_SOURCE_DIR}/include/opencv")
ocv_include_modules(${OPENCV_ANNOTATION_DEPS})
set(annotation_files opencv_annotation.cpp)
set(the_target opencv_annotation)
add_executable(${the_target} ${annotation_files})
target_link_libraries(${the_target} ${OPENCV_ANNOTATION_DEPS})
set_target_properties(${the_target} PROPERTIES
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
OUTPUT_NAME "opencv_annotation")
if(ENABLE_SOLUTION_FOLDERS)
set_target_properties(${the_target} PROPERTIES FOLDER "applications")
endif()
if(INSTALL_CREATE_DISTRIB)
if(BUILD_SHARED_LIBS)
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 dev)
endif()
+319
View File
@@ -0,0 +1,319 @@
////////////////////////////////////////////////////////////////////////////////////////
//
// 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.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
// Copyright (C) 2013, OpenCV Foundation, all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// 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.
//
// 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,
// 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
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
////////////////////////////////////////////////////////////////////////////////////////
/*****************************************************************************************************
USAGE:
./opencv_annotation -images <folder location> -annotations <ouput file>
Created by: Puttemans Steven - February 2015
Adapted by: Puttemans Steven - April 2016 - Vectorize the process to enable better processing
+ early leave and store by pressing an ESC key
+ enable delete `d` button, to remove last annotation
*****************************************************************************************************/
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <fstream>
#include <iostream>
#if defined(_WIN32)
#include <direct.h>
#else
#include <sys/stat.h>
#endif
using namespace std;
using namespace cv;
// Function prototypes
void on_mouse(int, int, int, int, void*);
vector<Rect> get_annotations(Mat);
// Public parameters
Mat image;
int roi_x0 = 0, roi_y0 = 0, roi_x1 = 0, roi_y1 = 0, num_of_rec = 0;
bool start_draw = false, stop = false;
// Window name for visualisation purposes
const string window_name = "OpenCV Based Annotation Tool";
// FUNCTION : Mouse response for selecting objects in images
// If left button is clicked, start drawing a rectangle as long as mouse moves
// Stop drawing once a new left click is detected by the on_mouse function
void on_mouse(int event, int x, int y, int , void * )
{
// Action when left button is clicked
if(event == EVENT_LBUTTONDOWN)
{
if(!start_draw)
{
roi_x0 = x;
roi_y0 = y;
start_draw = true;
} else {
roi_x1 = x;
roi_y1 = y;
start_draw = false;
}
}
// Action when mouse is moving and drawing is enabled
if((event == EVENT_MOUSEMOVE) && start_draw)
{
// Redraw bounding box for annotation
Mat current_view;
image.copyTo(current_view);
rectangle(current_view, Point(roi_x0,roi_y0), Point(x,y), Scalar(0,0,255));
imshow(window_name, current_view);
}
}
// FUNCTION : returns a vector of Rect objects given an image containing positive object instances
vector<Rect> get_annotations(Mat input_image)
{
vector<Rect> current_annotations;
// Make it possible to exit the annotation process
stop = false;
// Init window interface and couple mouse actions
namedWindow(window_name, WINDOW_AUTOSIZE);
setMouseCallback(window_name, on_mouse);
image = input_image;
imshow(window_name, image);
int key_pressed = 0;
do
{
// Get a temporary image clone
Mat temp_image = input_image.clone();
Rect currentRect(0, 0, 0, 0);
// Keys for processing
// You need to select one for confirming a selection and one to continue to the next image
// Based on the universal ASCII code of the keystroke: http://www.asciitable.com/
// <c> = 99 add rectangle to current image
// <n> = 110 save added rectangles and show next image
// <d> = 100 delete the last annotation made
// <ESC> = 27 exit program
key_pressed = 0xFF & waitKey(0);
switch( key_pressed )
{
case 27:
destroyWindow(window_name);
stop = true;
break;
case 99:
// Draw initiated from top left corner
if(roi_x0<roi_x1 && roi_y0<roi_y1)
{
currentRect.x = roi_x0;
currentRect.y = roi_y0;
currentRect.width = roi_x1-roi_x0;
currentRect.height = roi_y1-roi_y0;
}
// Draw initiated from bottom right corner
if(roi_x0>roi_x1 && roi_y0>roi_y1)
{
currentRect.x = roi_x1;
currentRect.y = roi_y1;
currentRect.width = roi_x0-roi_x1;
currentRect.height = roi_y0-roi_y1;
}
// Draw initiated from top right corner
if(roi_x0>roi_x1 && roi_y0<roi_y1)
{
currentRect.x = roi_x1;
currentRect.y = roi_y0;
currentRect.width = roi_x0-roi_x1;
currentRect.height = roi_y1-roi_y0;
}
// Draw initiated from bottom left corner
if(roi_x0<roi_x1 && roi_y0>roi_y1)
{
currentRect.x = roi_x0;
currentRect.y = roi_y1;
currentRect.width = roi_x1-roi_x0;
currentRect.height = roi_y0-roi_y1;
}
// Draw the rectangle on the canvas
// Add the rectangle to the vector of annotations
current_annotations.push_back(currentRect);
break;
case 100:
// Remove the last annotation
if(current_annotations.size() > 0){
current_annotations.pop_back();
}
break;
default:
// Default case --> do nothing at all
// Other keystrokes can simply be ignored
break;
}
// Check if escape has been pressed
if(stop)
{
break;
}
// Draw all the current rectangles onto the top image and make sure that the global image is linked
for(int i=0; i < (int)current_annotations.size(); i++){
rectangle(temp_image, current_annotations[i], Scalar(0,255,0), 1);
}
image = temp_image;
// Force an explicit redraw of the canvas --> necessary to visualize delete correctly
imshow(window_name, image);
}
// Continue as long as the next image key has not been pressed
while(key_pressed != 110);
// Close down the window
destroyWindow(window_name);
// Return the data
return current_annotations;
}
int main( int argc, const char** argv )
{
// If no arguments are given, then supply some information on how this tool works
if( argc == 1 ){
cout << "Usage: " << argv[0] << endl;
cout << " -images <folder_location> [example - /data/testimages/]" << endl;
cout << " -annotations <ouput_file> [example - /data/annotations.txt]" << endl;
cout << "TIP: Use absolute paths to avoid any problems with the software!" << endl;
return -1;
}
// Read in the input arguments
string image_folder;
string annotations_file;
for(int i = 1; i < argc; ++i )
{
if( !strcmp( argv[i], "-images" ) )
{
image_folder = argv[++i];
}
else if( !strcmp( argv[i], "-annotations" ) )
{
annotations_file = argv[++i];
}
}
// Check if the folder actually exists
// If -1 is returned then the folder actually exists, and thus you can continue
// In all other cases there was a folder creation and thus the folder did not exist
#if defined(_WIN32)
if(_mkdir(image_folder.c_str()) != -1){
// Generate an error message
cerr << "The image folder given does not exist. Please check again!" << endl;
// Remove the created folder again, to ensure a second run with same code fails again
_rmdir(image_folder.c_str());
return 0;
}
#else
if(mkdir(image_folder.c_str(), 0777) != -1){
// Generate an error message
cerr << "The image folder given does not exist. Please check again!" << endl;
// Remove the created folder again, to ensure a second run with same code fails again
remove(image_folder.c_str());
return 0;
}
#endif
// Start by processing the data
// Return the image filenames inside the image folder
vector< vector<Rect> > annotations;
vector<String> filenames;
String folder(image_folder);
glob(folder, filenames);
// Loop through each image stored in the images folder
// Create and temporarily store the annotations
// At the end write everything to the annotations file
for (size_t i = 0; i < filenames.size(); i++){
// Read in an image
Mat current_image = imread(filenames[i]);
// Check if the image is actually read - avoid other files in the folder, because glob() takes them all
// If not then simply skip this iteration
if(current_image.empty()){
continue;
}
// Perform annotations & store the result inside the vectorized structure
vector<Rect> current_annotations = get_annotations(current_image);
annotations.push_back(current_annotations);
// Check if the ESC key was hit, then exit earlier then expected
if(stop){
break;
}
}
// When all data is processed, store the data gathered inside the proper file
// This now even gets called when the ESC button was hit to store preliminary results
ofstream output(annotations_file.c_str());
if ( !output.is_open() ){
cerr << "The path for the output file contains an error and could not be opened. Please check again!" << endl;
return 0;
}
// Store the annotations, write to the output file
for(int i = 0; i < (int)annotations.size(); i++){
output << filenames[i] << " " << annotations[i].size();
for(int j=0; j < (int)annotations[i].size(); j++){
Rect temp = annotations[i][j];
output << " " << temp.x << " " << temp.y << " " << temp.width << " " << temp.height;
}
output << endl;
}
return 0;
}
+7 -3
View File
@@ -14,8 +14,6 @@ if(WIN32)
link_directories(${CMAKE_CURRENT_BINARY_DIR})
endif()
link_libraries(${OPENCV_HAARTRAINING_DEPS} opencv_haartraining_engine)
# -----------------------------------------------------------
# Library
# -----------------------------------------------------------
@@ -29,14 +27,17 @@ set(cvhaartraining_lib_src
cvhaarclassifier.cpp
cvhaartraining.cpp
cvsamples.cpp
cvsamplesoutput.cpp
cvsamplesoutput.h
ioutput.h
)
add_library(opencv_haartraining_engine STATIC ${cvhaartraining_lib_src})
target_link_libraries(opencv_haartraining_engine ${OPENCV_HAARTRAINING_DEPS})
set_target_properties(opencv_haartraining_engine PROPERTIES
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
INSTALL_NAME_DIR lib
)
# -----------------------------------------------------------
@@ -44,6 +45,7 @@ set_target_properties(opencv_haartraining_engine PROPERTIES
# -----------------------------------------------------------
add_executable(opencv_haartraining cvhaartraining.h haartraining.cpp)
target_link_libraries(opencv_haartraining ${OPENCV_HAARTRAINING_DEPS} opencv_haartraining_engine)
set_target_properties(opencv_haartraining PROPERTIES
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
OUTPUT_NAME "opencv_haartraining")
@@ -53,6 +55,7 @@ set_target_properties(opencv_haartraining PROPERTIES
# -----------------------------------------------------------
add_executable(opencv_createsamples cvhaartraining.h createsamples.cpp)
target_link_libraries(opencv_createsamples ${OPENCV_HAARTRAINING_DEPS} opencv_haartraining_engine)
set_target_properties(opencv_createsamples PROPERTIES
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
OUTPUT_NAME "opencv_createsamples")
@@ -61,6 +64,7 @@ set_target_properties(opencv_createsamples PROPERTIES
# performance
# -----------------------------------------------------------
add_executable(opencv_performance performance.cpp)
target_link_libraries(opencv_performance ${OPENCV_HAARTRAINING_DEPS} opencv_haartraining_engine)
set_target_properties(opencv_performance PROPERTIES
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
OUTPUT_NAME "opencv_performance")
+34 -11
View File
@@ -50,10 +50,12 @@
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <memory>
using namespace std;
#include "cvhaartraining.h"
#include "ioutput.h"
int main( int argc, char* argv[] )
{
@@ -71,11 +73,12 @@ int main( int argc, char* argv[] )
double maxxangle = 1.1;
double maxyangle = 1.1;
double maxzangle = 0.5;
int showsamples = 0;
bool showsamples = false;
/* the samples are adjusted to this scale in the sample preview window */
double scale = 4.0;
int width = 24;
int height = 24;
bool pngoutput = false; /* whether to make the samples in png or in jpg*/
srand((unsigned int)time(0));
@@ -92,7 +95,8 @@ int main( int argc, char* argv[] )
" [-maxyangle <max_y_rotation_angle = %f>]\n"
" [-maxzangle <max_z_rotation_angle = %f>]\n"
" [-show [<scale = %f>]]\n"
" [-w <sample_width = %d>]\n [-h <sample_height = %d>]\n",
" [-w <sample_width = %d>]\n [-h <sample_height = %d>]\n"
" [-pngoutput]",
argv[0], num, bgcolor, bgthreshold, maxintensitydev,
maxxangle, maxyangle, maxzangle, scale, width, height );
@@ -155,7 +159,7 @@ int main( int argc, char* argv[] )
}
else if( !strcmp( argv[i], "-show" ) )
{
showsamples = 1;
showsamples = true;
if( i+1 < argc && strlen( argv[i+1] ) > 0 && argv[i+1][0] != '-' )
{
double d;
@@ -172,6 +176,10 @@ int main( int argc, char* argv[] )
{
height = atoi( argv[++i] );
}
else if( !strcmp( argv[i], "-pngoutput" ) )
{
pngoutput = true;
}
}
printf( "Info file name: %s\n", ((infoname == NULL) ? nullname : infoname ) );
@@ -190,10 +198,14 @@ int main( int argc, char* argv[] )
printf( "Show samples: %s\n", (showsamples) ? "TRUE" : "FALSE" );
if( showsamples )
{
printf( "Scale: %g\n", scale );
printf( "Scale applied to display : %g\n", scale );
}
if( !pngoutput)
{
printf( "Original image will be scaled to:\n");
printf( "\tWidth: $backgroundWidth / %d\n", width );
printf( "\tHeight: $backgroundHeight / %d\n", height );
}
printf( "Width: %d\n", width );
printf( "Height: %d\n", height );
/* determine action */
if( imagename && vecname )
@@ -207,13 +219,24 @@ int main( int argc, char* argv[] )
printf( "Done\n" );
}
else if( imagename && bgfilename && infoname )
else if( imagename && bgfilename && infoname)
{
printf( "Create test samples from single image applying distortions...\n" );
printf( "Create data set from single image applying distortions...\n"
"Output format: %s\n",
(( pngoutput ) ? "PNG" : "JPG") );
cvCreateTestSamples( infoname, imagename, bgcolor, bgthreshold, bgfilename, num,
invert, maxintensitydev,
maxxangle, maxyangle, maxzangle, showsamples, width, height );
std::auto_ptr<DatasetGenerator> creator;
if( pngoutput )
{
creator = std::auto_ptr<DatasetGenerator>( new PngDatasetGenerator( infoname ) );
}
else
{
creator = std::auto_ptr<DatasetGenerator>( new JpgDatasetGenerator( infoname ) );
}
creator->create( imagename, bgcolor, bgthreshold, bgfilename, num,
invert, maxintensitydev, maxxangle, maxyangle, maxzangle,
showsamples, width, height );
printf( "Done\n" );
}
+109 -72
View File
@@ -48,6 +48,8 @@
#include "cvhaartraining.h"
#include "_cvhaartraining.h"
#include "ioutput.h"
#include <cstdio>
#include <cstdlib>
#include <cmath>
@@ -2841,14 +2843,12 @@ void cvCreateTreeCascadeClassifier( const char* dirname,
cvReleaseMat( &features_idx );
}
void cvCreateTrainingSamples( const char* filename,
const char* imgfilename, int bgcolor, int bgthreshold,
const char* bgfilename, int count,
int invert, int maxintensitydev,
double maxxangle, double maxyangle, double maxzangle,
int showsamples,
bool showsamples,
int winwidth, int winheight )
{
CvSampleDistortionData data;
@@ -2915,7 +2915,7 @@ void cvCreateTrainingSamples( const char* filename,
cvShowImage( "Sample", &sample );
if( cvWaitKey( 0 ) == 27 )
{
showsamples = 0;
showsamples = false;
}
}
@@ -2942,45 +2942,43 @@ void cvCreateTrainingSamples( const char* filename,
}
#define CV_INFO_FILENAME "info.dat"
DatasetGenerator::DatasetGenerator( IOutput* _writer )
:writer(_writer)
{
}
void cvCreateTestSamples( const char* infoname,
const char* imgfilename, int bgcolor, int bgthreshold,
const char* bgfilename, int count,
int invert, int maxintensitydev,
double maxxangle, double maxyangle, double maxzangle,
int showsamples,
int winwidth, int winheight )
void DatasetGenerator::showSamples(bool* show, CvMat *img) const
{
if( *show )
{
cvShowImage( "Image", img);
if( cvWaitKey( 0 ) == 27 )
{
*show = false;
}
}
}
void DatasetGenerator::create(const char* imgfilename, int bgcolor, int bgthreshold,
const char* bgfilename, int count,
int invert, int maxintensitydev,
double maxxangle, double maxyangle, double maxzangle,
bool showsamples,
int winwidth, int winheight )
{
CvSampleDistortionData data;
assert( infoname != NULL );
assert( imgfilename != NULL );
assert( bgfilename != NULL );
if( !icvMkDir( infoname ) )
{
#if CV_VERBOSE
fprintf( stderr, "Unable to create directory hierarchy: %s\n", infoname );
#endif /* CV_VERBOSE */
return;
}
if( icvStartSampleDistortion( imgfilename, bgcolor, bgthreshold, &data ) )
{
char fullname[PATH_MAX];
char* filename;
CvMat win;
FILE* info;
if( icvInitBackgroundReaders( bgfilename, cvSize( 10, 10 ) ) )
{
int i;
int x, y, width, height;
float scale;
float maxscale;
int inverse;
if( showsamples )
@@ -2988,73 +2986,112 @@ void cvCreateTestSamples( const char* infoname,
cvNamedWindow( "Image", CV_WINDOW_AUTOSIZE );
}
info = fopen( infoname, "w" );
strcpy( fullname, infoname );
filename = strrchr( fullname, '\\' );
if( filename == NULL )
{
filename = strrchr( fullname, '/' );
}
if( filename == NULL )
{
filename = fullname;
}
else
{
filename++;
}
count = MIN( count, cvbgdata->count );
inverse = invert;
for( i = 0; i < count; i++ )
{
icvGetNextFromBackgroundData( cvbgdata, cvbgreader );
maxscale = MIN( 0.7F * cvbgreader->src.cols / winwidth,
0.7F * cvbgreader->src.rows / winheight );
if( maxscale < 1.0F ) continue;
CvRect boundingBox = getObjectPosition( cvSize( cvbgreader->src.cols,
cvbgreader->src.rows ),
cvGetSize(data.img),
cvSize( winwidth, winheight ) );
if(boundingBox.width <= 0 || boundingBox.height <= 0)
{
continue;
}
scale = (maxscale - 1.0F) * rand() / RAND_MAX + 1.0F;
width = (int) (scale * winwidth);
height = (int) (scale * winheight);
x = (int) ((0.1+0.8 * rand()/RAND_MAX) * (cvbgreader->src.cols - width));
y = (int) ((0.1+0.8 * rand()/RAND_MAX) * (cvbgreader->src.rows - height));
cvGetSubArr( &cvbgreader->src, &win, boundingBox );
cvGetSubArr( &cvbgreader->src, &win, cvRect( x, y ,width, height ) );
if( invert == CV_RANDOM_INVERT )
{
inverse = (rand() > (RAND_MAX/2));
}
icvPlaceDistortedSample( &win, inverse, maxintensitydev,
maxxangle, maxyangle, maxzangle,
1, 0.0, 0.0, &data );
writer->write( cvbgreader->src, boundingBox );
sprintf( filename, "%04d_%04d_%04d_%04d_%04d.jpg",
(i + 1), x, y, width, height );
if( info )
{
fprintf( info, "%s %d %d %d %d %d\n",
filename, 1, x, y, width, height );
}
cvSaveImage( fullname, &cvbgreader->src );
if( showsamples )
{
cvShowImage( "Image", &cvbgreader->src );
if( cvWaitKey( 0 ) == 27 )
{
showsamples = 0;
}
}
showSamples(&showsamples, &cvbgreader->src);
}
if( info ) fclose( info );
icvDestroyBackgroundReaders();
}
icvEndSampleDistortion( &data );
}
}
DatasetGenerator::~DatasetGenerator()
{
delete writer;
}
JpgDatasetGenerator::JpgDatasetGenerator( const char* filename )
:DatasetGenerator( IOutput::createOutput( filename, IOutput::JPG_DATASET ) )
{
}
CvSize JpgDatasetGenerator::scaleObjectSize( const CvSize& bgImgSize,
const CvSize& ,
const CvSize& sampleSize) const
{
float scale;
float maxscale;
maxscale = MIN( 0.7F * bgImgSize.width / sampleSize.width,
0.7F * bgImgSize.height / sampleSize.height );
if( maxscale < 1.0F )
{
scale = -1.f;
}
else
{
scale = (maxscale - 1.0F) * rand() / RAND_MAX + 1.0F;
}
int width = (int) (scale * sampleSize.width);
int height = (int) (scale * sampleSize.height);
return cvSize( width, height );
}
CvRect DatasetGenerator::getObjectPosition(const CvSize& bgImgSize,
const CvSize& imgSize,
const CvSize& sampleSize) const
{
CvSize size = scaleObjectSize( bgImgSize, imgSize, sampleSize );
int width = size.width;
int height = size.height;
int x = (int) ((0.1 + 0.8 * rand() / RAND_MAX) * (bgImgSize.width - width));
int y = (int) ((0.1 + 0.8 * rand() / RAND_MAX) * (bgImgSize.height - height));
return cvRect( x, y, width, height );
}
PngDatasetGenerator::PngDatasetGenerator(const char* filename)
:DatasetGenerator( IOutput::createOutput( filename, IOutput::PNG_DATASET ) )
{
}
CvSize PngDatasetGenerator::scaleObjectSize( const CvSize& bgImgSize,
const CvSize& imgSize,
const CvSize& ) const
{
float scale;
scale = MIN( 0.3F * bgImgSize.width / imgSize.width,
0.3F * bgImgSize.height / imgSize.height );
int width = (int) (scale * imgSize.width);
int height = (int) (scale * imgSize.height);
return cvSize( width, height );
}
/* End of file. */
+63 -5
View File
@@ -48,6 +48,11 @@
#ifndef _CVHAARTRAINING_H_
#define _CVHAARTRAINING_H_
class IOutput;
struct CvRect;
struct CvSize;
struct CvMat;
/*
* cvCreateTrainingSamples
*
@@ -74,23 +79,30 @@
*/
#define CV_RANDOM_INVERT 0x7FFFFFFF
void cvCreateTrainingSamples( const char* filename,
void cvCreateTrainingSamples(const char* filename,
const char* imgfilename, int bgcolor, int bgthreshold,
const char* bgfilename, int count,
int invert = 0, int maxintensitydev = 40,
double maxxangle = 1.1,
double maxyangle = 1.1,
double maxzangle = 0.5,
int showsamples = 0,
bool showsamples = false,
int winwidth = 24, int winheight = 24 );
void cvCreateTestSamples( const char* infoname,
const char* imgfilename, int bgcolor, int bgthreshold,
void cvCreatePngTrainingSet(const char* imgfilename, int bgcolor, int bgthreshold,
const char* bgfilename, int count,
int invert, int maxintensitydev,
double maxxangle, double maxyangle, double maxzangle,
int winwidth, int winheight,
IOutput *writer );
void cvCreateTestSamples(const char* imgfilename, int bgcolor, int bgthreshold,
const char* bgfilename, int count,
int invert, int maxintensitydev,
double maxxangle, double maxyangle, double maxzangle,
int showsamples,
int winwidth, int winheight );
int winwidth, int winheight,
IOutput* writer);
/*
* cvCreateTrainingSamplesFromInfo
@@ -189,4 +201,50 @@ void cvCreateTreeCascadeClassifier( const char* dirname,
int boosttype, int stumperror,
int maxtreesplits, int minpos, bool bg_vecfile = false );
class DatasetGenerator
{
public:
DatasetGenerator( IOutput* _writer );
void create( const char* imgfilename, int bgcolor, int bgthreshold,
const char* bgfilename, int count,
int invert, int maxintensitydev,
double maxxangle, double maxyangle, double maxzangle,
bool showsamples,
int winwidth, int winheight);
virtual ~DatasetGenerator();
private:
virtual void showSamples( bool* showSamples, CvMat* img ) const;
CvRect getObjectPosition( const CvSize& bgImgSize,
const CvSize& imgSize,
const CvSize& sampleSize ) const;
virtual CvSize scaleObjectSize(const CvSize& bgImgSize,
const CvSize& imgSize ,
const CvSize& sampleSize) const =0 ;
private:
IOutput* writer;
};
/* Provides the functionality of test set generating */
class JpgDatasetGenerator: public DatasetGenerator
{
public:
JpgDatasetGenerator(const char* filename);
private:
CvSize scaleObjectSize(const CvSize& bgImgSize,
const CvSize& ,
const CvSize& sampleSize) const;
};
class PngDatasetGenerator: public DatasetGenerator
{
public:
PngDatasetGenerator(const char *filename);
private:
CvSize scaleObjectSize(const CvSize& bgImgSize,
const CvSize& imgSize ,
const CvSize& ) const;
};
#endif /* _CVHAARTRAINING_H_ */
+227
View File
@@ -0,0 +1,227 @@
#include "cvsamplesoutput.h"
#include <cstdio>
#include "_cvcommon.h"
#include "highgui.h"
/* print statistic info */
#define CV_VERBOSE 1
IOutput::IOutput()
: currentIdx(0)
{}
void IOutput::findFilePathPart(char **partOfPath, char *fullPath)
{
*partOfPath = strrchr( fullPath, '\\' );
if( *partOfPath == NULL )
{
*partOfPath = strrchr( fullPath, '/' );
}
if( *partOfPath == NULL )
{
*partOfPath = fullPath;
}
else
{
*partOfPath += 1;
}
}
IOutput* IOutput::createOutput(const char *filename,
IOutput::OutputType type)
{
IOutput* output = 0;
switch (type) {
case IOutput::PNG_DATASET:
output = new PngDatasetOutput();
break;
case IOutput::JPG_DATASET:
output = new JpgDatasetOutput();
break;
default:
#if CV_VERBOSE
fprintf( stderr, "Invalid output type, valid types are: PNG_TRAINING_SET, JPG_TEST_SET");
#endif /* CV_VERBOSE */
return 0;
}
if ( output->init( filename ) )
return output;
else
return 0;
}
bool PngDatasetOutput::init( const char* annotationsListFileName )
{
IOutput::init( annotationsListFileName );
if(imgFileName == imgFullPath)
{
#if CV_VERBOSE
fprintf( stderr, "Invalid path to annotations file: %s\n"
"It should contain a parent directory name\n", imgFullPath );
#endif /* CV_VERBOSE */
return false;
}
const char* annotationsdirname = "/annotations/";
const char* positivesdirname = "/pos/";
imgFileName[-1] = '\0'; //erase slash at the end of the path
imgFileName -= 1;
//copy path to dataset top-level dir
strcpy(annotationFullPath, imgFullPath);
//find the name of annotation starting from the top-level dataset dir
findFilePathPart(&annotationRelativePath, annotationFullPath);
if( !strcmp( annotationRelativePath, ".." ) || !strcmp( annotationRelativePath, "." ) )
{
#if CV_VERBOSE
fprintf( stderr, "Invalid path to annotations file: %s\n"
"It should contain a parent directory name\n", annotationsListFileName );
#endif /* CV_VERBOSE */
return false;
}
//find the name of output image starting from the top-level dataset dir
findFilePathPart(&imgRelativePath, imgFullPath);
annotationFileName = annotationFullPath + strlen(annotationFullPath);
sprintf(annotationFileName, "%s", annotationsdirname);
annotationFileName += strlen(annotationFileName);
sprintf(imgFileName, "%s", positivesdirname);
imgFileName += strlen(imgFileName);
if( !icvMkDir( annotationFullPath ) )
{
#if CV_VERBOSE
fprintf( stderr, "Unable to create directory hierarchy: %s\n", annotationFullPath );
#endif /* CV_VERBOSE */
return false;
}
if( !icvMkDir( imgFullPath ) )
{
#if CV_VERBOSE
fprintf( stderr, "Unable to create directory hierarchy: %s\n", imgFullPath );
#endif /* CV_VERBOSE */
return false;
}
return true;
}
bool PngDatasetOutput::write( const CvMat& img,
const CvRect& boundingBox )
{
CvRect bbox = addBoundingboxBorder(boundingBox);
sprintf( imgFileName,
"%04d_%04d_%04d_%04d_%04d",
++currentIdx,
bbox.x,
bbox.y,
bbox.width,
bbox.height );
sprintf( annotationFileName, "%s.txt", imgFileName );
fprintf( annotationsList, "%s\n", annotationRelativePath );
FILE* annotationFile = fopen( annotationFullPath, "w" );
if(annotationFile == 0)
{
return false;
}
sprintf( imgFileName + strlen(imgFileName), ".%s", extension );
fprintf( annotationFile,
"Image filename : \"%s\"\n"
"Bounding box for object 1 \"PASperson\" (Xmin, Ymin) - (Xmax, Ymax) : (%d, %d) - (%d, %d)",
imgRelativePath,
bbox.x,
bbox.y,
bbox.x + bbox.width,
bbox.y + bbox.height );
fclose( annotationFile );
cvSaveImage( imgFullPath, &img);
return true;
}
CvRect PngDatasetOutput::addBoundingboxBorder(const CvRect& bbox) const
{
CvRect boundingBox = bbox;
int border = 5;
boundingBox.x -= border;
boundingBox.y -= border;
boundingBox.width += 2*border;
boundingBox.height += 2*border;
return boundingBox;
}
IOutput::~IOutput()
{
if(annotationsList)
{
fclose(annotationsList);
}
}
bool IOutput::init(const char *filename)
{
assert( filename != NULL );
if( !icvMkDir( filename ) )
{
#if CV_VERBOSE
fprintf( stderr, "Unable to create directory hierarchy: %s\n", filename );
#endif /* CV_VERBOSE */
return false;
}
annotationsList = fopen( filename, "w" );
if( annotationsList == NULL )
{
#if CV_VERBOSE
fprintf( stderr, "Unable to create info file: %s\n", filename );
#endif /* CV_VERBOSE */
return false;
}
strcpy( imgFullPath, filename );
findFilePathPart( &imgFileName, imgFullPath );
return true;
}
bool JpgDatasetOutput::write( const CvMat& img,
const CvRect& boundingBox )
{
sprintf( imgFileName, "%04d_%04d_%04d_%04d_%04d.jpg",
++currentIdx,
boundingBox.x,
boundingBox.y,
boundingBox.width,
boundingBox.height );
fprintf( annotationsList, "%s %d %d %d %d %d\n",
imgFileName,
1,
boundingBox.x,
boundingBox.y,
boundingBox.width,
boundingBox.height );
cvSaveImage( imgFullPath, &img);
return true;
}
+46
View File
@@ -0,0 +1,46 @@
#ifndef CVSAMPLESOUTPUT_H
#define CVSAMPLESOUTPUT_H
#include "ioutput.h"
class PngDatasetOutput: public IOutput
{
friend IOutput* IOutput::createOutput(const char *filename, OutputType type);
public:
virtual bool write( const CvMat& img,
const CvRect& boundingBox);
virtual ~PngDatasetOutput(){}
private:
PngDatasetOutput()
: extension("png")
, destImgWidth(640)
, destImgHeight(480)
{}
virtual bool init(const char* annotationsListFileName );
CvRect addBoundingboxBorder(const CvRect& bbox) const;
private:
char annotationFullPath[PATH_MAX];
char* annotationFileName;
char* annotationRelativePath;
char* imgRelativePath;
const char* extension;
int destImgWidth;
int destImgHeight ;
};
class JpgDatasetOutput: public IOutput
{
friend IOutput* IOutput::createOutput(const char *filename, OutputType type);
public:
virtual bool write( const CvMat& img,
const CvRect& boundingBox );
virtual ~JpgDatasetOutput(){}
private:
JpgDatasetOutput(){}
};
#endif // CVSAMPLESOUTPUT_H
+34
View File
@@ -0,0 +1,34 @@
#ifndef IOUTPUT_H
#define IOUTPUT_H
#include <cstdio>
#include "_cvcommon.h"
struct CvMat;
struct CvRect;
class IOutput
{
public:
enum OutputType {PNG_DATASET, JPG_DATASET};
public:
virtual bool write( const CvMat& img,
const CvRect& boundingBox ) =0;
virtual ~IOutput();
static IOutput* createOutput( const char *filename, OutputType type );
protected:
IOutput();
/* finds the beginning of the last token in the path */
void findFilePathPart( char **partOfPath, char *fullPath );
virtual bool init( const char* filename );
protected:
int currentIdx;
char imgFullPath[PATH_MAX];
char* imgFileName;
FILE* annotationsList;
};
#endif // IOUTPUT_H
-1
View File
@@ -26,7 +26,6 @@ set_target_properties(${the_target} PROPERTIES
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
INSTALL_NAME_DIR lib
OUTPUT_NAME "opencv_traincascade")
if(ENABLE_SOLUTION_FOLDERS)
+28 -28
View File
@@ -374,7 +374,7 @@ CvDTreeNode* CvCascadeBoostTrainData::subsample_data( const CvMat* _subsample_id
if (is_buf_16u)
{
unsigned short* udst_idx = (unsigned short*)(buf->data.s + root->buf_idx*get_length_subbuf() +
vi*sample_count + data_root->offset);
(size_t)vi*sample_count + data_root->offset);
for( int i = 0; i < num_valid; i++ )
{
idx = src_idx[i];
@@ -387,7 +387,7 @@ CvDTreeNode* CvCascadeBoostTrainData::subsample_data( const CvMat* _subsample_id
else
{
int* idst_idx = buf->data.i + root->buf_idx*get_length_subbuf() +
vi*sample_count + root->offset;
(size_t)vi*sample_count + root->offset;
for( int i = 0; i < num_valid; i++ )
{
idx = src_idx[i];
@@ -404,14 +404,14 @@ CvDTreeNode* CvCascadeBoostTrainData::subsample_data( const CvMat* _subsample_id
if (is_buf_16u)
{
unsigned short* udst = (unsigned short*)(buf->data.s + root->buf_idx*get_length_subbuf() +
(workVarCount-1)*sample_count + root->offset);
(size_t)(workVarCount-1)*sample_count + root->offset);
for( int i = 0; i < count; i++ )
udst[i] = (unsigned short)src_lbls[sidx[i]];
}
else
{
int* idst = buf->data.i + root->buf_idx*get_length_subbuf() +
(workVarCount-1)*sample_count + root->offset;
(size_t)(workVarCount-1)*sample_count + root->offset;
for( int i = 0; i < count; i++ )
idst[i] = src_lbls[sidx[i]];
}
@@ -421,14 +421,14 @@ CvDTreeNode* CvCascadeBoostTrainData::subsample_data( const CvMat* _subsample_id
if (is_buf_16u)
{
unsigned short* sample_idx_dst = (unsigned short*)(buf->data.s + root->buf_idx*get_length_subbuf() +
workVarCount*sample_count + root->offset);
(size_t)workVarCount*sample_count + root->offset);
for( int i = 0; i < count; i++ )
sample_idx_dst[i] = (unsigned short)sample_idx_src[sidx[i]];
}
else
{
int* sample_idx_dst = buf->data.i + root->buf_idx*get_length_subbuf() +
workVarCount*sample_count + root->offset;
(size_t)workVarCount*sample_count + root->offset;
for( int i = 0; i < count; i++ )
sample_idx_dst[i] = sample_idx_src[sidx[i]];
}
@@ -614,9 +614,9 @@ void CvCascadeBoostTrainData::setData( const CvFeatureEvaluator* _featureEvaluat
// set sample labels
if (is_buf_16u)
udst = (unsigned short*)(buf->data.s + work_var_count*sample_count);
udst = (unsigned short*)(buf->data.s + (size_t)work_var_count*sample_count);
else
idst = buf->data.i + work_var_count*sample_count;
idst = buf->data.i + (size_t)work_var_count*sample_count;
for (int si = 0; si < sample_count; si++)
{
@@ -684,11 +684,11 @@ void CvCascadeBoostTrainData::get_ord_var_data( CvDTreeNode* n, int vi, float* o
if ( vi < numPrecalcIdx )
{
if( !is_buf_16u )
*sortedIndices = buf->data.i + n->buf_idx*get_length_subbuf() + vi*sample_count + n->offset;
*sortedIndices = buf->data.i + n->buf_idx*get_length_subbuf() + (size_t)vi*sample_count + n->offset;
else
{
const unsigned short* shortIndices = (const unsigned short*)(buf->data.s + n->buf_idx*get_length_subbuf() +
vi*sample_count + n->offset );
(size_t)vi*sample_count + n->offset );
for( int i = 0; i < nodeSampleCount; i++ )
sortedIndicesBuf[i] = shortIndices[i];
@@ -799,14 +799,14 @@ struct FeatureIdxOnlyPrecalc : ParallelLoopBody
{
valCachePtr[si] = (*featureEvaluator)( fi, si );
if ( is_buf_16u )
*(udst + fi*sample_count + si) = (unsigned short)si;
*(udst + (size_t)fi*sample_count + si) = (unsigned short)si;
else
*(idst + fi*sample_count + si) = si;
*(idst + (size_t)fi*sample_count + si) = si;
}
if ( is_buf_16u )
icvSortUShAux( udst + fi*sample_count, sample_count, valCachePtr );
icvSortUShAux( udst + (size_t)fi*sample_count, sample_count, valCachePtr );
else
icvSortIntAux( idst + fi*sample_count, sample_count, valCachePtr );
icvSortIntAux( idst + (size_t)fi*sample_count, sample_count, valCachePtr );
}
}
const CvFeatureEvaluator* featureEvaluator;
@@ -835,14 +835,14 @@ struct FeatureValAndIdxPrecalc : ParallelLoopBody
{
valCache->at<float>(fi,si) = (*featureEvaluator)( fi, si );
if ( is_buf_16u )
*(udst + fi*sample_count + si) = (unsigned short)si;
*(udst + (size_t)fi*sample_count + si) = (unsigned short)si;
else
*(idst + fi*sample_count + si) = si;
*(idst + (size_t)fi*sample_count + si) = si;
}
if ( is_buf_16u )
icvSortUShAux( udst + fi*sample_count, sample_count, valCache->ptr<float>(fi) );
icvSortUShAux( udst + (size_t)fi*sample_count, sample_count, valCache->ptr<float>(fi) );
else
icvSortIntAux( idst + fi*sample_count, sample_count, valCache->ptr<float>(fi) );
icvSortIntAux( idst + (size_t)fi*sample_count, sample_count, valCache->ptr<float>(fi) );
}
}
const CvFeatureEvaluator* featureEvaluator;
@@ -1165,9 +1165,9 @@ void CvCascadeBoostTree::split_node_data( CvDTreeNode* node )
if (data->is_buf_16u)
{
unsigned short *ldst = (unsigned short *)(buf->data.s + left->buf_idx*length_buf_row +
(workVarCount-1)*scount + left->offset);
(size_t)(workVarCount-1)*scount + left->offset);
unsigned short *rdst = (unsigned short *)(buf->data.s + right->buf_idx*length_buf_row +
(workVarCount-1)*scount + right->offset);
(size_t)(workVarCount-1)*scount + right->offset);
for( int i = 0; i < n; i++ )
{
@@ -1188,9 +1188,9 @@ void CvCascadeBoostTree::split_node_data( CvDTreeNode* node )
else
{
int *ldst = buf->data.i + left->buf_idx*length_buf_row +
(workVarCount-1)*scount + left->offset;
(size_t)(workVarCount-1)*scount + left->offset;
int *rdst = buf->data.i + right->buf_idx*length_buf_row +
(workVarCount-1)*scount + right->offset;
(size_t)(workVarCount-1)*scount + right->offset;
for( int i = 0; i < n; i++ )
{
@@ -1218,9 +1218,9 @@ void CvCascadeBoostTree::split_node_data( CvDTreeNode* node )
if (data->is_buf_16u)
{
unsigned short* ldst = (unsigned short*)(buf->data.s + left->buf_idx*length_buf_row +
workVarCount*scount + left->offset);
(size_t)workVarCount*scount + left->offset);
unsigned short* rdst = (unsigned short*)(buf->data.s + right->buf_idx*length_buf_row +
workVarCount*scount + right->offset);
(size_t)workVarCount*scount + right->offset);
for (int i = 0; i < n; i++)
{
unsigned short idx = (unsigned short)tempBuf[i];
@@ -1239,9 +1239,9 @@ void CvCascadeBoostTree::split_node_data( CvDTreeNode* node )
else
{
int* ldst = buf->data.i + left->buf_idx*length_buf_row +
workVarCount*scount + left->offset;
(size_t)workVarCount*scount + left->offset;
int* rdst = buf->data.i + right->buf_idx*length_buf_row +
workVarCount*scount + right->offset;
(size_t)workVarCount*scount + right->offset;
for (int i = 0; i < n; i++)
{
int idx = tempBuf[i];
@@ -1410,7 +1410,7 @@ void CvCascadeBoost::update_weights( CvBoostTree* tree )
if (data->is_buf_16u)
{
unsigned short* labels = (unsigned short*)(buf->data.s + data->data_root->buf_idx*length_buf_row +
data->data_root->offset + (data->work_var_count-1)*data->sample_count);
data->data_root->offset + (size_t)(data->work_var_count-1)*data->sample_count);
for( int i = 0; i < n; i++ )
{
// save original categorical responses {0,1}, convert them to {-1,1}
@@ -1428,7 +1428,7 @@ void CvCascadeBoost::update_weights( CvBoostTree* tree )
else
{
int* labels = buf->data.i + data->data_root->buf_idx*length_buf_row +
data->data_root->offset + (data->work_var_count-1)*data->sample_count;
data->data_root->offset + (size_t)(data->work_var_count-1)*data->sample_count;
for( int i = 0; i < n; i++ )
{
+27 -9
View File
@@ -136,7 +136,8 @@ bool CvCascadeClassifier::train( const string _cascadeDirName,
const CvCascadeParams& _cascadeParams,
const CvFeatureParams& _featureParams,
const CvCascadeBoostParams& _stageParams,
bool baseFormatSave )
bool baseFormatSave,
double acceptanceRatioBreakValue)
{
// Start recording clock ticks for training time output
const clock_t begin_time = clock();
@@ -169,6 +170,13 @@ bool CvCascadeClassifier::train( const string _cascadeDirName,
featureEvaluator = CvFeatureEvaluator::create(cascadeParams.featureType);
featureEvaluator->init( (CvFeatureParams*)featureParams, numPos + numNeg, cascadeParams.winSize );
stageClassifiers.reserve( numStages );
}else{
// Make sure that if model parameters are preloaded, that people are aware of this,
// even when passing other parameters to the training command
cout << "---------------------------------------------------------------------------------" << endl;
cout << "Training parameters are pre-loaded from the parameter file in data folder!" << endl;
cout << "Please empty this folder if you want to use a NEW set of training parameters." << endl;
cout << "---------------------------------------------------------------------------------" << endl;
}
cout << "PARAMETERS:" << endl;
cout << "cascadeDirName: " << _cascadeDirName << endl;
@@ -179,9 +187,11 @@ bool CvCascadeClassifier::train( const string _cascadeDirName,
cout << "numStages: " << numStages << endl;
cout << "precalcValBufSize[Mb] : " << _precalcValBufSize << endl;
cout << "precalcIdxBufSize[Mb] : " << _precalcIdxBufSize << endl;
cout << "acceptanceRatioBreakValue : " << acceptanceRatioBreakValue << endl;
cascadeParams.printAttrs();
stageParams->printAttrs();
featureParams->printAttrs();
cout << "Number of unique features given windowSize [" << _cascadeParams.winSize.width << "," << _cascadeParams.winSize.height << "] : " << featureEvaluator->getNumFeatures() << "" << endl;
int startNumStages = (int)stageClassifiers.size();
if ( startNumStages > 1 )
@@ -198,18 +208,23 @@ bool CvCascadeClassifier::train( const string _cascadeDirName,
cout << endl << "===== TRAINING " << i << "-stage =====" << endl;
cout << "<BEGIN" << endl;
if ( !updateTrainingSet( tempLeafFARate ) )
if ( !updateTrainingSet( requiredLeafFARate, tempLeafFARate ) )
{
cout << "Train dataset for temp stage can not be filled. "
"Branch training terminated." << endl;
"Branch training terminated." << endl;
break;
}
if( tempLeafFARate <= requiredLeafFARate )
{
cout << "Required leaf false alarm rate achieved. "
"Branch training terminated." << endl;
"Branch training terminated." << endl;
break;
}
if( (tempLeafFARate <= acceptanceRatioBreakValue) && (acceptanceRatioBreakValue >= 0) ){
cout << "The required acceptanceRatio for the model has been reached to avoid overfitting of trainingdata. "
"Branch training terminated." << endl;
break;
}
CvCascadeBoost* tempStage = new CvCascadeBoost;
bool isStageTrained = tempStage->train( (CvFeatureEvaluator*)featureEvaluator,
@@ -284,17 +299,17 @@ int CvCascadeClassifier::predict( int sampleIdx )
return 1;
}
bool CvCascadeClassifier::updateTrainingSet( double& acceptanceRatio)
bool CvCascadeClassifier::updateTrainingSet( double minimumAcceptanceRatio, double& acceptanceRatio)
{
int64 posConsumed = 0, negConsumed = 0;
imgReader.restart();
int posCount = fillPassedSamples( 0, numPos, true, posConsumed );
int posCount = fillPassedSamples( 0, numPos, true, 0, posConsumed );
if( !posCount )
return false;
cout << "POS count : consumed " << posCount << " : " << (int)posConsumed << endl;
int proNumNeg = cvRound( ( ((double)numNeg) * ((double)posCount) ) / numPos ); // apply only a fraction of negative samples. double is required since overflow is possible
int negCount = fillPassedSamples( posCount, proNumNeg, false, negConsumed );
int negCount = fillPassedSamples( posCount, proNumNeg, false, minimumAcceptanceRatio, negConsumed );
if ( !negCount )
return false;
@@ -304,7 +319,7 @@ bool CvCascadeClassifier::updateTrainingSet( double& acceptanceRatio)
return true;
}
int CvCascadeClassifier::fillPassedSamples( int first, int count, bool isPositive, int64& consumed )
int CvCascadeClassifier::fillPassedSamples( int first, int count, bool isPositive, double minimumAcceptanceRatio, int64& consumed )
{
int getcount = 0;
Mat img(cascadeParams.winSize, CV_8UC1);
@@ -312,6 +327,9 @@ int CvCascadeClassifier::fillPassedSamples( int first, int count, bool isPositiv
{
for( ; ; )
{
if( consumed != 0 && ((double)getcount+1)/(double)(int64)consumed <= minimumAcceptanceRatio )
return getcount;
bool isGetImg = isPositive ? imgReader.getPos( img ) :
imgReader.getNeg( img );
if( !isGetImg )
@@ -319,7 +337,7 @@ int CvCascadeClassifier::fillPassedSamples( int first, int count, bool isPositiv
consumed++;
featureEvaluator->setImage( img, isPositive ? 1 : 0, i );
if( predict( i ) == 1.0F )
if( predict( i ) == 1 )
{
getcount++;
printf("%s current samples: %d\r", isPositive ? "POS":"NEG", getcount);
+4 -3
View File
@@ -96,13 +96,14 @@ public:
const CvCascadeParams& _cascadeParams,
const CvFeatureParams& _featureParams,
const CvCascadeBoostParams& _stageParams,
bool baseFormatSave = false );
bool baseFormatSave = false,
double acceptanceRatioBreakValue = -1.0 );
private:
int predict( int sampleIdx );
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 );
bool updateTrainingSet( double minimumAcceptanceRatio, double& acceptanceRatio );
int fillPassedSamples( int first, int count, bool isPositive, double requiredAcceptanceRatio, int64& consumed );
void writeParams( cv::FileStorage &fs ) const;
void writeStages( cv::FileStorage &fs, const cv::Mat& featureMap ) const;
+1 -9
View File
@@ -32,20 +32,12 @@ bool CvCascadeImageReader::NegReader::create( const string _filename, Size _winS
if ( !file.is_open() )
return false;
size_t pos = _filename.rfind('\\');
char dlmrt = '\\';
if (pos == string::npos)
{
pos = _filename.rfind('/');
dlmrt = '/';
}
dirname = pos == string::npos ? "" : _filename.substr(0, pos) + dlmrt;
while( !file.eof() )
{
std::getline(file, str);
if (str.empty()) break;
if (str.at(0) == '#' ) continue; /* comment */
imgFilenames.push_back(dirname + str);
imgFilenames.push_back(str);
}
file.close();
+3 -2
View File
@@ -1,10 +1,11 @@
#ifndef _OPENCV_IMAGESTORAGE_H_
#define _OPENCV_IMAGESTORAGE_H_
#include <stdio.h>
#include <string>
#include <vector>
#include "highgui.h"
class CvCascadeImageReader
{
public:
+10 -3
View File
@@ -14,9 +14,10 @@ int main( int argc, char* argv[] )
int numPos = 2000;
int numNeg = 1000;
int numStages = 20;
int precalcValBufSize = 256,
precalcIdxBufSize = 256;
int precalcValBufSize = 1024,
precalcIdxBufSize = 1024;
bool baseFormatSave = false;
double acceptanceRatioBreakValue = -1.0;
CvCascadeParams cascadeParams;
CvCascadeBoostParams stageParams;
@@ -37,6 +38,7 @@ int main( int argc, char* argv[] )
cout << " [-precalcValBufSize <precalculated_vals_buffer_size_in_Mb = " << precalcValBufSize << ">]" << endl;
cout << " [-precalcIdxBufSize <precalculated_idxs_buffer_size_in_Mb = " << precalcIdxBufSize << ">]" << endl;
cout << " [-baseFormatSave]" << endl;
cout << " [-acceptanceRatioBreakValue <value> = " << acceptanceRatioBreakValue << ">]" << endl;
cascadeParams.printDefaults();
stageParams.printDefaults();
for( int fi = 0; fi < fc; fi++ )
@@ -83,6 +85,10 @@ int main( int argc, char* argv[] )
{
baseFormatSave = true;
}
else if( !strcmp( argv[i], "-acceptanceRatioBreakValue" ) )
{
acceptanceRatioBreakValue = atof(argv[++i]);
}
else if ( cascadeParams.scanAttr( argv[i], argv[i+1] ) ) { i++; }
else if ( stageParams.scanAttr( argv[i], argv[i+1] ) ) { i++; }
else if ( !set )
@@ -108,6 +114,7 @@ int main( int argc, char* argv[] )
cascadeParams,
*featureParams[cascadeParams.featureType],
stageParams,
baseFormatSave );
baseFormatSave,
acceptanceRatioBreakValue );
return 0;
}
+35
View File
@@ -0,0 +1,35 @@
SET(OPENCV_VISUALISATION_DEPS opencv_core opencv_highgui opencv_imgproc)
ocv_check_dependencies(${OPENCV_VISUALISATION_DEPS})
if(NOT OCV_DEPENDENCIES_FOUND)
return()
endif()
project(visualisation)
ocv_include_directories("${CMAKE_CURRENT_SOURCE_DIR}" "${OpenCV_SOURCE_DIR}/include/opencv")
ocv_include_modules(${OPENCV_VISUALISATION_DEPS})
set(visualisation_files opencv_visualisation.cpp)
set(the_target opencv_visualisation)
add_executable(${the_target} ${visualisation_files})
target_link_libraries(${the_target} ${OPENCV_VISUALISATION_DEPS})
set_target_properties(${the_target} PROPERTIES
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
OUTPUT_NAME "opencv_visualisation")
if(ENABLE_SOLUTION_FOLDERS)
set_target_properties(${the_target} PROPERTIES FOLDER "applications")
endif()
if(INSTALL_CREATE_DISTRIB)
if(BUILD_SHARED_LIBS)
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 dev)
endif()
+350
View File
@@ -0,0 +1,350 @@
////////////////////////////////////////////////////////////////////////////////////////
//
// 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.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
// Copyright (C) 2013, OpenCV Foundation, all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// 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.
//
// 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,
// 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
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
////////////////////////////////////////////////////////////////////////////////////////
/*****************************************************************************************************
Software for visualising cascade classifier models trained by OpenCV and to get a better
understanding of the used features.
USAGE:
./visualise_models -model <model.xml> -image <ref.png> -data <output folder>
LIMITS
- Use an absolute path for the output folder to ensure the tool works
- Only handles cascade classifier models
- Handles stumps only for the moment
- Needs a valid training/test sample window with the original model dimensions, passed as `ref.png`
- Can handle HAAR and LBP features
Created by: Puttemans Steven - April 2016
*****************************************************************************************************/
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <fstream>
#include <iostream>
using namespace std;
using namespace cv;
struct rect_data{
int x;
int y;
int w;
int h;
float weight;
};
int main( int argc, const char** argv )
{
// Read in the input arguments
string model = "";
string output_folder = "";
string image_ref = "";
for(int i = 1; i < argc; ++i )
{
if( !strcmp( argv[i], "-model" ) )
{
model = argv[++i];
}else if( !strcmp( argv[i], "-image" ) ){
image_ref = argv[++i];
}else if( !strcmp( argv[i], "-data" ) ){
output_folder = argv[++i];
}
}
// Value for timing
// You can increase this to have a better visualisation during the generation
int timing = 1;
// Value for cols of storing elements
int cols_prefered = 5;
// Open the XML model
FileStorage fs;
fs.open(model, FileStorage::READ);
// Get a the required information
// First decide which feature type we are using
FileNode cascade = fs["cascade"];
string feature_type = cascade["featureType"];
bool haar = false, lbp = false;
if (feature_type.compare("HAAR") == 0){
haar = true;
}
if (feature_type.compare("LBP") == 0){
lbp = true;
}
if ( feature_type.compare("HAAR") != 0 && feature_type.compare("LBP")){
cerr << "The model is not an HAAR or LBP feature based model!" << endl;
cerr << "Please select a model that can be visualized by the software." << endl;
return -1;
}
// We make a visualisation mask - which increases the window to make it at least a bit more visible
int resize_factor = 10;
int resize_storage_factor = 10;
Mat reference_image = imread(image_ref, IMREAD_GRAYSCALE );
Mat visualization;
resize(reference_image, visualization, Size(reference_image.cols * resize_factor, reference_image.rows * resize_factor));
// First recover for each stage the number of weak features and their index
// Important since it is NOT sequential when using LBP features
vector< vector<int> > stage_features;
FileNode stages = cascade["stages"];
FileNodeIterator it_stages = stages.begin(), it_stages_end = stages.end();
int idx = 0;
for( ; it_stages != it_stages_end; it_stages++, idx++ ){
vector<int> current_feature_indexes;
FileNode weak_classifiers = (*it_stages)["weakClassifiers"];
FileNodeIterator it_weak = weak_classifiers.begin(), it_weak_end = weak_classifiers.end();
vector<int> values;
for(int idy = 0; it_weak != it_weak_end; it_weak++, idy++ ){
(*it_weak)["internalNodes"] >> values;
current_feature_indexes.push_back( (int)values[2] );
}
stage_features.push_back(current_feature_indexes);
}
// If the output option has been chosen than we will store a combined image plane for
// each stage, containing all weak classifiers for that stage.
bool draw_planes = false;
stringstream output_video;
output_video << output_folder << "model_visualization.avi";
VideoWriter result_video;
if( output_folder.compare("") != 0 ){
draw_planes = true;
result_video.open(output_video.str(), CV_FOURCC('X','V','I','D'), 15, Size(reference_image.cols * resize_factor, reference_image.rows * resize_factor), false);
}
if(haar){
// Grab the corresponding features dimensions and weights
FileNode features = cascade["features"];
vector< vector< rect_data > > feature_data;
FileNodeIterator it_features = features.begin(), it_features_end = features.end();
for(int idf = 0; it_features != it_features_end; it_features++, idf++ ){
vector< rect_data > current_feature_rectangles;
FileNode rectangles = (*it_features)["rects"];
int nrects = (int)rectangles.size();
for(int k = 0; k < nrects; k++){
rect_data current_data;
FileNode single_rect = rectangles[k];
current_data.x = (int)single_rect[0];
current_data.y = (int)single_rect[1];
current_data.w = (int)single_rect[2];
current_data.h = (int)single_rect[3];
current_data.weight = (float)single_rect[4];
current_feature_rectangles.push_back(current_data);
}
feature_data.push_back(current_feature_rectangles);
}
// Loop over each possible feature on its index, visualise on the mask and wait a bit,
// then continue to the next feature.
// If visualisations should be stored then do the in between calculations
Mat image_plane;
Mat metadata = Mat::zeros(150, 1000, CV_8UC1);
vector< rect_data > current_rects;
for(int sid = 0; sid < (int)stage_features.size(); sid ++){
if(draw_planes){
int features_nmbr = (int)stage_features[sid].size();
int cols = cols_prefered;
int rows = features_nmbr / cols;
if( (features_nmbr % cols) > 0){
rows++;
}
image_plane = Mat::zeros(reference_image.rows * resize_storage_factor * rows, reference_image.cols * resize_storage_factor * cols, CV_8UC1);
}
for(int fid = 0; fid < (int)stage_features[sid].size(); fid++){
stringstream meta1, meta2;
meta1 << "Stage " << sid << " / Feature " << fid;
meta2 << "Rectangles: ";
Mat temp_window = visualization.clone();
Mat temp_metadata = metadata.clone();
int current_feature_index = stage_features[sid][fid];
current_rects = feature_data[current_feature_index];
Mat single_feature = reference_image.clone();
resize(single_feature, single_feature, Size(), resize_storage_factor, resize_storage_factor);
for(int i = 0; i < (int)current_rects.size(); i++){
rect_data local = current_rects[i];
if(draw_planes){
if(local.weight >= 0){
rectangle(single_feature, Rect(local.x * resize_storage_factor, local.y * resize_storage_factor, local.w * resize_storage_factor, local.h * resize_storage_factor), Scalar(0), CV_FILLED);
}else{
rectangle(single_feature, Rect(local.x * resize_storage_factor, local.y * resize_storage_factor, local.w * resize_storage_factor, local.h * resize_storage_factor), Scalar(255), CV_FILLED);
}
}
Rect part(local.x * resize_factor, local.y * resize_factor, local.w * resize_factor, local.h * resize_factor);
meta2 << part << " (w " << local.weight << ") ";
if(local.weight >= 0){
rectangle(temp_window, part, Scalar(0), CV_FILLED);
}else{
rectangle(temp_window, part, Scalar(255), CV_FILLED);
}
}
imshow("features", temp_window);
putText(temp_window, meta1.str(), Point(15,15), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(255));
result_video.write(temp_window);
// Copy the feature image if needed
if(draw_planes){
single_feature.copyTo(image_plane(Rect(0 + (fid%cols_prefered)*single_feature.cols, 0 + (fid/cols_prefered) * single_feature.rows, single_feature.cols, single_feature.rows)));
}
putText(temp_metadata, meta1.str(), Point(15,15), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(255));
putText(temp_metadata, meta2.str(), Point(15,40), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(255));
imshow("metadata", temp_metadata);
waitKey(timing);
}
//Store the stage image if needed
if(draw_planes){
stringstream save_location;
save_location << output_folder << "stage_" << sid << ".png";
imwrite(save_location.str(), image_plane);
}
}
}
if(lbp){
// Grab the corresponding features dimensions and weights
FileNode features = cascade["features"];
vector<Rect> feature_data;
FileNodeIterator it_features = features.begin(), it_features_end = features.end();
for(int idf = 0; it_features != it_features_end; it_features++, idf++ ){
FileNode rectangle = (*it_features)["rect"];
Rect current_feature ((int)rectangle[0], (int)rectangle[1], (int)rectangle[2], (int)rectangle[3]);
feature_data.push_back(current_feature);
}
// Loop over each possible feature on its index, visualise on the mask and wait a bit,
// then continue to the next feature.
Mat image_plane;
Mat metadata = Mat::zeros(150, 1000, CV_8UC1);
for(int sid = 0; sid < (int)stage_features.size(); sid ++){
if(draw_planes){
int features_nmbr = (int)stage_features[sid].size();
int cols = cols_prefered;
int rows = features_nmbr / cols;
if( (features_nmbr % cols) > 0){
rows++;
}
image_plane = Mat::zeros(reference_image.rows * resize_storage_factor * rows, reference_image.cols * resize_storage_factor * cols, CV_8UC1);
}
for(int fid = 0; fid < (int)stage_features[sid].size(); fid++){
stringstream meta1, meta2;
meta1 << "Stage " << sid << " / Feature " << fid;
meta2 << "Rectangle: ";
Mat temp_window = visualization.clone();
Mat temp_metadata = metadata.clone();
int current_feature_index = stage_features[sid][fid];
Rect current_rect = feature_data[current_feature_index];
Mat single_feature = reference_image.clone();
resize(single_feature, single_feature, Size(), resize_storage_factor, resize_storage_factor);
// VISUALISATION
// The rectangle is the top left one of a 3x3 block LBP constructor
Rect resized(current_rect.x * resize_factor, current_rect.y * resize_factor, current_rect.width * resize_factor, current_rect.height * resize_factor);
meta2 << resized;
// Top left
rectangle(temp_window, resized, Scalar(255), 1);
// Top middle
rectangle(temp_window, Rect(resized.x + resized.width, resized.y, resized.width, resized.height), Scalar(255), 1);
// Top right
rectangle(temp_window, Rect(resized.x + 2*resized.width, resized.y, resized.width, resized.height), Scalar(255), 1);
// Middle left
rectangle(temp_window, Rect(resized.x, resized.y + resized.height, resized.width, resized.height), Scalar(255), 1);
// Middle middle
rectangle(temp_window, Rect(resized.x + resized.width, resized.y + resized.height, resized.width, resized.height), Scalar(255), CV_FILLED);
// Middle right
rectangle(temp_window, Rect(resized.x + 2*resized.width, resized.y + resized.height, resized.width, resized.height), Scalar(255), 1);
// Bottom left
rectangle(temp_window, Rect(resized.x, resized.y + 2*resized.height, resized.width, resized.height), Scalar(255), 1);
// Bottom middle
rectangle(temp_window, Rect(resized.x + resized.width, resized.y + 2*resized.height, resized.width, resized.height), Scalar(255), 1);
// Bottom right
rectangle(temp_window, Rect(resized.x + 2*resized.width, resized.y + 2*resized.height, resized.width, resized.height), Scalar(255), 1);
if(draw_planes){
Rect resized_inner(current_rect.x * resize_storage_factor, current_rect.y * resize_storage_factor, current_rect.width * resize_storage_factor, current_rect.height * resize_storage_factor);
// Top left
rectangle(single_feature, resized_inner, Scalar(255), 1);
// Top middle
rectangle(single_feature, Rect(resized_inner.x + resized_inner.width, resized_inner.y, resized_inner.width, resized_inner.height), Scalar(255), 1);
// Top right
rectangle(single_feature, Rect(resized_inner.x + 2*resized_inner.width, resized_inner.y, resized_inner.width, resized_inner.height), Scalar(255), 1);
// Middle left
rectangle(single_feature, Rect(resized_inner.x, resized_inner.y + resized_inner.height, resized_inner.width, resized_inner.height), Scalar(255), 1);
// Middle middle
rectangle(single_feature, Rect(resized_inner.x + resized_inner.width, resized_inner.y + resized_inner.height, resized_inner.width, resized_inner.height), Scalar(255), CV_FILLED);
// Middle right
rectangle(single_feature, Rect(resized_inner.x + 2*resized_inner.width, resized_inner.y + resized_inner.height, resized_inner.width, resized_inner.height), Scalar(255), 1);
// Bottom left
rectangle(single_feature, Rect(resized_inner.x, resized_inner.y + 2*resized_inner.height, resized_inner.width, resized_inner.height), Scalar(255), 1);
// Bottom middle
rectangle(single_feature, Rect(resized_inner.x + resized_inner.width, resized_inner.y + 2*resized_inner.height, resized_inner.width, resized_inner.height), Scalar(255), 1);
// Bottom right
rectangle(single_feature, Rect(resized_inner.x + 2*resized_inner.width, resized_inner.y + 2*resized_inner.height, resized_inner.width, resized_inner.height), Scalar(255), 1);
single_feature.copyTo(image_plane(Rect(0 + (fid%cols_prefered)*single_feature.cols, 0 + (fid/cols_prefered) * single_feature.rows, single_feature.cols, single_feature.rows)));
}
putText(temp_metadata, meta1.str(), Point(15,15), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(255));
putText(temp_metadata, meta2.str(), Point(15,40), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(255));
imshow("metadata", temp_metadata);
imshow("features", temp_window);
putText(temp_window, meta1.str(), Point(15,15), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(255));
result_video.write(temp_window);
waitKey(timing);
}
//Store the stage image if needed
if(draw_planes){
stringstream save_location;
save_location << output_folder << "stage_" << sid << ".png";
imwrite(save_location.str(), image_plane);
}
}
}
return 0;
}
+160 -241
View File
@@ -31,10 +31,8 @@
# The following variables affect the behavior of the macros in the
# script (in alphebetical order). Note that any of these flags can be
# changed multiple times in the same directory before calling
# CUDA_ADD_EXECUTABLE, CUDA_ADD_LIBRARY, CUDA_COMPILE, CUDA_COMPILE_PTX
# or CUDA_WRAP_SRCS.
#
# ::
# CUDA_ADD_EXECUTABLE, CUDA_ADD_LIBRARY, CUDA_COMPILE, CUDA_COMPILE_PTX,
# CUDA_COMPILE_FATBIN, CUDA_COMPILE_CUBIN or CUDA_WRAP_SRCS::
#
# CUDA_64_BIT_DEVICE_CODE (Default matches host bit size)
# -- Set to ON to compile for 64 bit device code, OFF for 32 bit device code.
@@ -43,19 +41,11 @@
# nvcc in the generated source. If you compile to PTX and then load the
# file yourself, you can mix bit sizes between device and host.
#
#
#
# ::
#
# CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE (Default ON)
# -- Set to ON if you want the custom build rule to be attached to the source
# file in Visual Studio. Turn OFF if you add the same cuda file to multiple
# targets.
#
#
#
# ::
#
# This allows the user to build the target from the CUDA file; however, bad
# things can happen if the CUDA source file is added to multiple targets.
# When performing parallel builds it is possible for the custom build
@@ -68,44 +58,24 @@
# this script could detect the reuse of source files across multiple targets
# and turn the option off for the user, but no good solution could be found.
#
#
#
# ::
#
# CUDA_BUILD_CUBIN (Default OFF)
# -- Set to ON to enable and extra compilation pass with the -cubin option in
# Device mode. The output is parsed and register, shared memory usage is
# printed during build.
#
#
#
# ::
#
# CUDA_BUILD_EMULATION (Default OFF for device mode)
# -- Set to ON for Emulation mode. -D_DEVICEEMU is defined for CUDA C files
# when CUDA_BUILD_EMULATION is TRUE.
#
#
#
# ::
#
# CUDA_GENERATED_OUTPUT_DIR (Default CMAKE_CURRENT_BINARY_DIR)
# -- Set to the path you wish to have the generated files placed. If it is
# blank output files will be placed in CMAKE_CURRENT_BINARY_DIR.
# Intermediate files will always be placed in
# CMAKE_CURRENT_BINARY_DIR/CMakeFiles.
#
#
#
# ::
#
# CUDA_HOST_COMPILATION_CPP (Default ON)
# -- Set to OFF for C compilation of host code.
#
#
#
# ::
#
# CUDA_HOST_COMPILER (Default CMAKE_C_COMPILER, $(VCInstallDir)/bin for VS)
# -- Set the host compiler to be used by nvcc. Ignored if -ccbin or
# --compiler-bindir is already present in the CUDA_NVCC_FLAGS or
@@ -113,19 +83,11 @@
# $(VCInstallDir)/bin is a special value that expands out to the path when
# the command is run from withing VS.
#
#
#
# ::
#
# CUDA_NVCC_FLAGS
# CUDA_NVCC_FLAGS_<CONFIG>
# -- Additional NVCC command line arguments. NOTE: multiple arguments must be
# semi-colon delimited (e.g. --compiler-options;-Wall)
#
#
#
# ::
#
# CUDA_PROPAGATE_HOST_FLAGS (Default ON)
# -- Set to ON to propagate CMAKE_{C,CXX}_FLAGS and their configuration
# dependent counterparts (e.g. CMAKE_C_FLAGS_DEBUG) automatically to the
@@ -137,10 +99,6 @@
# CUDA_ADD_LIBRARY, CUDA_ADD_EXECUTABLE, or CUDA_WRAP_SRCS. Flags used for
# shared library compilation are not affected by this flag.
#
#
#
# ::
#
# CUDA_SEPARABLE_COMPILATION (Default OFF)
# -- If set this will enable separable compilation for all CUDA runtime object
# files. If used outside of CUDA_ADD_EXECUTABLE and CUDA_ADD_LIBRARY
@@ -148,38 +106,22 @@
# CUDA_COMPUTE_SEPARABLE_COMPILATION_OBJECT_FILE_NAME and
# CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS should be called.
#
#
#
# ::
#
# CUDA_VERBOSE_BUILD (Default OFF)
# -- Set to ON to see all the commands used when building the CUDA file. When
# using a Makefile generator the value defaults to VERBOSE (run make
# VERBOSE=1 to see output), although setting CUDA_VERBOSE_BUILD to ON will
# always print the output.
#
#
#
# The script creates the following macros (in alphebetical order):
#
# ::
# The script creates the following macros (in alphebetical order)::
#
# CUDA_ADD_CUFFT_TO_TARGET( cuda_target )
# -- Adds the cufft library to the target (can be any target). Handles whether
# you are in emulation mode or not.
#
#
#
# ::
#
# CUDA_ADD_CUBLAS_TO_TARGET( cuda_target )
# -- Adds the cublas library to the target (can be any target). Handles
# whether you are in emulation mode or not.
#
#
#
# ::
#
# CUDA_ADD_EXECUTABLE( cuda_target file0 file1 ...
# [WIN32] [MACOSX_BUNDLE] [EXCLUDE_FROM_ALL] [OPTIONS ...] )
# -- Creates an executable "cuda_target" which is made up of the files
@@ -193,42 +135,28 @@
# nvcc. Such flags should be modified before calling CUDA_ADD_EXECUTABLE,
# CUDA_ADD_LIBRARY or CUDA_WRAP_SRCS.
#
#
#
# ::
#
# CUDA_ADD_LIBRARY( cuda_target file0 file1 ...
# [STATIC | SHARED | MODULE] [EXCLUDE_FROM_ALL] [OPTIONS ...] )
# -- Same as CUDA_ADD_EXECUTABLE except that a library is created.
#
#
#
# ::
#
# CUDA_BUILD_CLEAN_TARGET()
# -- Creates a convience target that deletes all the dependency files
# generated. You should make clean after running this target to ensure the
# dependency files get regenerated.
#
#
#
# ::
#
# CUDA_COMPILE( generated_files file0 file1 ... [STATIC | SHARED | MODULE]
# [OPTIONS ...] )
# -- Returns a list of generated files from the input source files to be used
# with ADD_LIBRARY or ADD_EXECUTABLE.
#
#
#
# ::
#
# CUDA_COMPILE_PTX( generated_files file0 file1 ... [OPTIONS ...] )
# -- Returns a list of PTX files generated from the input source files.
#
# CUDA_COMPILE_FATBIN( generated_files file0 file1 ... [OPTIONS ...] )
# -- Returns a list of FATBIN files generated from the input source files.
#
#
# ::
# CUDA_COMPILE_CUBIN( generated_files file0 file1 ... [OPTIONS ...] )
# -- Returns a list of CUBIN files generated from the input source files.
#
# CUDA_COMPUTE_SEPARABLE_COMPILATION_OBJECT_FILE_NAME( output_file_var
# cuda_target
@@ -242,10 +170,6 @@
# automatically for CUDA_ADD_LIBRARY and CUDA_ADD_EXECUTABLE. Note that
# this is a function and not a macro.
#
#
#
# ::
#
# CUDA_INCLUDE_DIRECTORIES( path0 path1 ... )
# -- Sets the directories that should be passed to nvcc
# (e.g. nvcc -Ipath0 -Ipath1 ... ). These paths usually contain other .cu
@@ -253,17 +177,9 @@
#
#
#
#
#
# ::
#
# CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS( output_file_var cuda_target
# nvcc_flags object_files)
#
#
#
# ::
#
# -- Generates the link object required by separable compilation from the given
# object files. This is called automatically for CUDA_ADD_EXECUTABLE and
# CUDA_ADD_LIBRARY, but can be called manually when using CUDA_WRAP_SRCS
@@ -273,91 +189,51 @@
# specified by CUDA_64_BIT_DEVICE_CODE. Note that this is a function
# instead of a macro.
#
#
#
# ::
#
# CUDA_WRAP_SRCS ( cuda_target format generated_files file0 file1 ...
# [STATIC | SHARED | MODULE] [OPTIONS ...] )
# -- This is where all the magic happens. CUDA_ADD_EXECUTABLE,
# CUDA_ADD_LIBRARY, CUDA_COMPILE, and CUDA_COMPILE_PTX all call this
# function under the hood.
#
#
#
# ::
#
# Given the list of files (file0 file1 ... fileN) this macro generates
# custom commands that generate either PTX or linkable objects (use "PTX" or
# "OBJ" for the format argument to switch). Files that don't end with .cu
# or have the HEADER_FILE_ONLY property are ignored.
#
#
#
# ::
#
# The arguments passed in after OPTIONS are extra command line options to
# give to nvcc. You can also specify per configuration options by
# specifying the name of the configuration followed by the options. General
# options must preceed configuration specific options. Not all
# configurations need to be specified, only the ones provided will be used.
#
#
#
# ::
#
# OPTIONS -DFLAG=2 "-DFLAG_OTHER=space in flag"
# DEBUG -g
# RELEASE --use_fast_math
# RELWITHDEBINFO --use_fast_math;-g
# MINSIZEREL --use_fast_math
#
#
#
# ::
#
# For certain configurations (namely VS generating object files with
# CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE set to ON), no generated file will
# be produced for the given cuda file. This is because when you add the
# cuda file to Visual Studio it knows that this file produces an object file
# and will link in the resulting object file automatically.
#
#
#
# ::
#
# This script will also generate a separate cmake script that is used at
# build time to invoke nvcc. This is for several reasons.
#
#
#
# ::
#
# 1. nvcc can return negative numbers as return values which confuses
# Visual Studio into thinking that the command succeeded. The script now
# checks the error codes and produces errors when there was a problem.
#
#
#
# ::
#
# 2. nvcc has been known to not delete incomplete results when it
# encounters problems. This confuses build systems into thinking the
# target was generated when in fact an unusable file exists. The script
# now deletes the output files if there was an error.
#
#
#
# ::
#
# 3. By putting all the options that affect the build into a file and then
# make the build rule dependent on the file, the output files will be
# regenerated when the options change.
#
#
#
# ::
#
# This script also looks at optional arguments STATIC, SHARED, or MODULE to
# determine when to target the object compilation for a shared library.
# BUILD_SHARED_LIBS is ignored in CUDA_WRAP_SRCS, but it is respected in
@@ -366,27 +242,17 @@
# <target_name>_EXPORTS is defined when a shared library compilation is
# detected.
#
#
#
# ::
#
# Flags passed into add_definitions with -D or /D are passed along to nvcc.
#
#
#
# The script defines the following variables:
#
# ::
# The script defines the following variables::
#
# CUDA_VERSION_MAJOR -- The major version of cuda as reported by nvcc.
# CUDA_VERSION_MINOR -- The minor version.
# CUDA_VERSION
# CUDA_VERSION_STRING -- CUDA_VERSION_MAJOR.CUDA_VERSION_MINOR
#
#
#
# ::
#
# CUDA_TOOLKIT_ROOT_DIR -- Path to the CUDA Toolkit (defined if not set).
# CUDA_SDK_ROOT_DIR -- Path to the CUDA SDK. Use this to find files in the
# SDK. This script will not directly support finding
@@ -412,13 +278,13 @@
# Only available for CUDA version 3.2+.
# CUDA_cusparse_LIBRARY -- CUDA Sparse Matrix library.
# Only available for CUDA version 3.2+.
# CUDA_npp_LIBRARY -- NVIDIA Performance Primitives library.
# CUDA_npp_LIBRARY -- NVIDIA Performance Primitives lib.
# Only available for CUDA version 4.0+.
# CUDA_nppc_LIBRARY -- NVIDIA Performance Primitives library (core).
# CUDA_nppc_LIBRARY -- NVIDIA Performance Primitives lib (core).
# Only available for CUDA version 5.5+.
# CUDA_nppi_LIBRARY -- NVIDIA Performance Primitives library (image processing).
# CUDA_nppi_LIBRARY -- NVIDIA Performance Primitives lib (image processing).
# Only available for CUDA version 5.5+.
# CUDA_npps_LIBRARY -- NVIDIA Performance Primitives library (signal processing).
# CUDA_npps_LIBRARY -- NVIDIA Performance Primitives lib (signal processing).
# Only available for CUDA version 5.5+.
# CUDA_nvcuvenc_LIBRARY -- CUDA Video Encoder library.
# Only available for CUDA version 3.2+.
@@ -427,32 +293,15 @@
# Only available for CUDA version 3.2+.
# Windows only.
#
#
#
#
#
# ::
#
# James Bigler, NVIDIA Corp (nvidia.com - jbigler)
# Abe Stephens, SCI Institute -- http://www.sci.utah.edu/~abe/FindCuda.html
#
#
#
# ::
#
# Copyright (c) 2008 - 2009 NVIDIA Corporation. All rights reserved.
#
#
#
# ::
#
# Copyright (c) 2007-2009
# Scientific Computing and Imaging Institute, University of Utah
#
#
#
# ::
#
# This code is licensed under the MIT License. See the FindCUDA.cmake script
# for the text of the license.
@@ -481,11 +330,6 @@
# FindCUDA.cmake
# We need to have at least this version to support the VERSION_LESS argument to 'if' (2.6.2) and unset (2.6.3)
cmake_policy(PUSH)
cmake_minimum_required(VERSION 2.6.3)
cmake_policy(POP)
# This macro helps us find the location of helper files we will need the full path to
macro(CUDA_FIND_HELPER_FILE _name _extension)
set(_full_name "${_name}.${_extension}")
@@ -608,7 +452,17 @@ set(CUDA_NVCC_FLAGS "" CACHE STRING "Semi-colon delimit multiple arguments.")
if(CMAKE_GENERATOR MATCHES "Visual Studio")
set(CUDA_HOST_COMPILER "$(VCInstallDir)bin" CACHE FILEPATH "Host side compiler used by NVCC")
else()
set(CUDA_HOST_COMPILER "${CMAKE_C_COMPILER}" CACHE FILEPATH "Host side compiler used by NVCC")
# Using cc which is symlink to clang may let NVCC think it is GCC and issue
# unhandled -dumpspecs option to clang. Also in case neither
# CMAKE_C_COMPILER is defined (project does not use C language) nor
# CUDA_HOST_COMPILER is specified manually we should skip -ccbin and let
# nvcc use its own default C compiler.
if(DEFINED CMAKE_C_COMPILER AND NOT DEFINED CUDA_HOST_COMPILER)
get_filename_component(c_compiler_realpath "${CMAKE_C_COMPILER}" REALPATH)
else()
set(c_compiler_realpath "")
endif()
set(CUDA_HOST_COMPILER "${c_compiler_realpath}" CACHE FILEPATH "Host side compiler used by NVCC")
endif()
# Propagate the host flags to the host compiler via -Xcompiler
@@ -675,14 +529,16 @@ endmacro()
# Check to see if the CUDA_TOOLKIT_ROOT_DIR and CUDA_SDK_ROOT_DIR have changed,
# if they have then clear the cache variables, so that will be detected again.
if(NOT "${CUDA_TOOLKIT_ROOT_DIR}" STREQUAL "${CUDA_TOOLKIT_ROOT_DIR_INTERNAL}")
if(DEFINED CUDA_TOOLKIT_ROOT_DIR_INTERNAL AND (NOT "${CUDA_TOOLKIT_ROOT_DIR}" STREQUAL "${CUDA_TOOLKIT_ROOT_DIR_INTERNAL}"))
unset(CUDA_TARGET_TRIPLET CACHE)
unset(CUDA_TOOLKIT_TARGET_DIR CACHE)
unset(CUDA_NVCC_EXECUTABLE CACHE)
unset(CUDA_VERSION CACHE)
cuda_unset_include_and_libraries()
endif()
if(NOT "${CUDA_TOOLKIT_TARGET_DIR}" STREQUAL "${CUDA_TOOLKIT_TARGET_DIR_INTERNAL}")
if(DEFINED CUDA_TARGET_TRIPLET_INTERNAL AND (NOT "${CUDA_TARGET_TRIPLET}" STREQUAL "${CUDA_TARGET_TRIPLET_INTERNAL}") OR
(DEFINED CUDA_TOOLKIT_TARGET_DIR AND DEFINED CUDA_TOOLKIT_TARGET_DIR_INTERNAL AND NOT "${CUDA_TOOLKIT_TARGET_DIR}" STREQUAL "${CUDA_TOOLKIT_TARGET_DIR_INTERNAL}"))
cuda_unset_include_and_libraries()
endif()
@@ -758,27 +614,54 @@ endif()
# Always set this convenience variable
set(CUDA_VERSION_STRING "${CUDA_VERSION}")
# Support for arm cross compilation with CUDA 5.5
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
if(CUDA_VERSION VERSION_GREATER "5.0" AND CMAKE_CROSSCOMPILING AND ${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm")
if(DEFINED CUDA_TARGET_CPU_ARCH)
set(_cuda_target_cpu_arch_initial "${CUDA_TARGET_CPU_ARCH}")
elseif(CUDA_VERSION VERSION_GREATER "5.0" AND CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm|ARM)")
set(_cuda_target_cpu_arch_initial "ARM")
elseif(CUDA_VERSION VERSION_GREATER "6.5" AND CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|AARCH64)")
set(_cuda_target_cpu_arch_initial "AARCH64")
else()
set(_cuda_target_cpu_arch_initial "")
endif()
set(CUDA_TARGET_CPU_ARCH ${_cuda_target_cpu_arch_initial} CACHE STRING "Specify the name of the class of CPU architecture for which the input files must be compiled.")
set(CUDA_TARGET_CPU_ARCH "${_cuda_target_cpu_arch_initial}" CACHE STRING "Specify the name of the class of CPU architecture for which the input files must be compiled.")
mark_as_advanced(CUDA_TARGET_CPU_ARCH)
# Target OS variant
if(DEFINED CUDA_TARGET_OS_VARIANT)
set(_cuda_target_os_variant_initial "${CUDA_TARGET_OS_VARIANT}")
else()
set(_cuda_target_os_variant_initial "")
endif()
set(CUDA_TARGET_OS_VARIANT "${_cuda_target_os_variant_initial}" CACHE STRING "Specify the name of the class of OS for which the input files must be compiled.")
mark_as_advanced(CUDA_TARGET_OS_VARIANT)
# Target triplet
if(DEFINED CUDA_TARGET_TRIPLET)
set(_cuda_target_triplet_initial "${CUDA_TARGET_TRIPLET}")
elseif(CUDA_VERSION VERSION_GREATER "5.0" AND CMAKE_CROSSCOMPILING AND "x${CUDA_TARGET_CPU_ARCH}" STREQUAL "xARM")
if("${CUDA_TARGET_OS_VARIANT}" STREQUAL "Android" AND EXISTS "${CUDA_TOOLKIT_ROOT_DIR}/targets/armv7-linux-androideabi")
set(_cuda_target_triplet_initial "armv7-linux-androideabi")
elseif(EXISTS "${CUDA_TOOLKIT_ROOT_DIR}/targets/armv7-linux-gnueabihf")
set(_cuda_target_triplet_initial "armv7-linux-gnueabihf")
endif()
elseif(CUDA_VERSION VERSION_GREATER "6.5" AND CMAKE_CROSSCOMPILING AND "x${CUDA_TARGET_CPU_ARCH}" STREQUAL "xAARCH64")
if("${CUDA_TARGET_OS_VARIANT}" STREQUAL "Android" AND EXISTS "${CUDA_TOOLKIT_ROOT_DIR}/targets/aarch64-linux-androideabi")
set(_cuda_target_triplet_initial "aarch64-linux-androideabi")
elseif(EXISTS "${CUDA_TOOLKIT_ROOT_DIR}/targets/aarch64-linux-gnueabihf")
set(_cuda_target_triplet_initial "aarch64-linux-gnueabihf")
endif()
endif()
set(CUDA_TARGET_TRIPLET "${_cuda_target_triplet_initial}" CACHE STRING "Specify the target triplet for which the input files must be compiled.")
file(GLOB __cuda_available_target_tiplets RELATIVE "${CUDA_TOOLKIT_ROOT_DIR}/targets" "${CUDA_TOOLKIT_ROOT_DIR}/targets/*" )
set_property(CACHE CUDA_TARGET_TRIPLET PROPERTY STRINGS ${__cuda_available_target_tiplets})
mark_as_advanced(CUDA_TARGET_TRIPLET)
# Target directory
if(NOT DEFINED CUDA_TOOLKIT_TARGET_DIR AND CUDA_TARGET_TRIPLET AND EXISTS "${CUDA_TOOLKIT_ROOT_DIR}/targets/${CUDA_TARGET_TRIPLET}")
set(CUDA_TOOLKIT_TARGET_DIR "${CUDA_TOOLKIT_ROOT_DIR}/targets/${CUDA_TARGET_TRIPLET}")
endif()
# CUDA_TOOLKIT_INCLUDE
find_path(CUDA_TOOLKIT_INCLUDE
device_functions.h # Header included in toolkit
@@ -802,10 +685,16 @@ macro(cuda_find_library_local_first_with_path_ext _var _names _doc _path_ext )
# and old paths.
set(_cuda_64bit_lib_dir "${_path_ext}lib/x64" "${_path_ext}lib64" "${_path_ext}libx64" )
endif()
if(CUDA_VERSION VERSION_GREATER "6.0")
set(_cuda_static_lib_names "")
foreach(name ${_names})
list(APPEND _cuda_static_lib_names "${name}_static")
endforeach()
endif()
# CUDA 3.2+ on Windows moved the library directories, so we need to new
# (lib/Win32) and the old path (lib).
find_library(${_var}
NAMES ${_names}
NAMES ${_names} ${_cuda_static_lib_names}
PATHS "${CUDA_TOOLKIT_TARGET_DIR}" "${CUDA_TOOLKIT_ROOT_DIR}"
ENV CUDA_PATH
ENV CUDA_LIB_PATH
@@ -815,7 +704,7 @@ macro(cuda_find_library_local_first_with_path_ext _var _names _doc _path_ext )
)
# Search default search paths, after we search our own set of paths.
find_library(${_var}
NAMES ${_names}
NAMES ${_names} ${_cuda_static_lib_names}
PATHS "/usr/lib/nvidia-current"
DOC ${_doc}
)
@@ -853,18 +742,6 @@ if(CUDA_BUILD_EMULATION AND CUDA_CUDARTEMU_LIBRARY)
else()
set(CUDA_LIBRARIES ${CUDA_CUDART_LIBRARY})
endif()
if(APPLE)
# We need to add the path to cudart to the linker using rpath, since the
# library name for the cuda libraries is prepended with @rpath.
if(CUDA_BUILD_EMULATION AND CUDA_CUDARTEMU_LIBRARY)
get_filename_component(_cuda_path_to_cudart "${CUDA_CUDARTEMU_LIBRARY}" PATH)
else()
get_filename_component(_cuda_path_to_cudart "${CUDA_CUDART_LIBRARY}" PATH)
endif()
if(_cuda_path_to_cudart)
list(APPEND CUDA_LIBRARIES -Wl,-rpath "-Wl,${_cuda_path_to_cudart}")
endif()
endif()
# 1.1 toolkit on linux doesn't appear to have a separate library on
# some platforms.
@@ -997,6 +874,8 @@ set(CUDA_FOUND TRUE)
set(CUDA_TOOLKIT_ROOT_DIR_INTERNAL "${CUDA_TOOLKIT_ROOT_DIR}" CACHE INTERNAL
"This is the value of the last time CUDA_TOOLKIT_ROOT_DIR was set successfully." FORCE)
set(CUDA_TARGET_TRIPLET_INTERNAL "${CUDA_TARGET_TRIPLET}" CACHE INTERNAL
"This is the value of the last time CUDA_TARGET_TRIPLET was set successfully." FORCE)
set(CUDA_TOOLKIT_TARGET_DIR_INTERNAL "${CUDA_TOOLKIT_TARGET_DIR}" CACHE INTERNAL
"This is the value of the last time CUDA_TOOLKIT_TARGET_DIR was set successfully." FORCE)
set(CUDA_SDK_ROOT_DIR_INTERNAL "${CUDA_SDK_ROOT_DIR}" CACHE INTERNAL
@@ -1044,15 +923,15 @@ macro(CUDA_GET_SOURCES_AND_OPTIONS _sources _cmake_options _options)
set( ${_options} )
set( _found_options FALSE )
foreach(arg ${ARGN})
if(arg STREQUAL "OPTIONS")
if("x${arg}" STREQUAL "xOPTIONS")
set( _found_options TRUE )
elseif(
arg STREQUAL "WIN32" OR
arg STREQUAL "MACOSX_BUNDLE" OR
arg STREQUAL "EXCLUDE_FROM_ALL" OR
arg STREQUAL "STATIC" OR
arg STREQUAL "SHARED" OR
arg STREQUAL "MODULE"
"x${arg}" STREQUAL "xWIN32" OR
"x${arg}" STREQUAL "xMACOSX_BUNDLE" OR
"x${arg}" STREQUAL "xEXCLUDE_FROM_ALL" OR
"x${arg}" STREQUAL "xSTATIC" OR
"x${arg}" STREQUAL "xSHARED" OR
"x${arg}" STREQUAL "xMODULE"
)
list(APPEND ${_cmake_options} ${arg})
else()
@@ -1148,7 +1027,7 @@ function(CUDA_COMPUTE_BUILD_PATH path build_path)
endif()
endif()
# This recipie is from cmLocalGenerator::CreateSafeUniqueObjectFileName in the
# This recipe is from cmLocalGenerator::CreateSafeUniqueObjectFileName in the
# CMake source.
# Remove leading /
@@ -1177,7 +1056,7 @@ endfunction()
# a .cpp or .ptx file.
# INPUT:
# cuda_target - Target name
# format - PTX or OBJ
# format - PTX, CUBIN, FATBIN or OBJ
# FILE1 .. FILEN - The remaining arguments are the sources to be wrapped.
# OPTIONS - Extra options to NVCC
# OUTPUT:
@@ -1223,8 +1102,14 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
set(nvcc_flags ${nvcc_flags} -m32)
endif()
if(CUDA_TARGET_CPU_ARCH)
set(nvcc_flags ${nvcc_flags} "--target-cpu-architecture=${CUDA_TARGET_CPU_ARCH}")
if(CUDA_TARGET_CPU_ARCH AND CUDA_VERSION VERSION_LESS "7.0")
# CPU architecture is either ARM or X86. Patch AARCH64 to be ARM
string(REPLACE "AARCH64" "ARM" CUDA_TARGET_CPU_ARCH_patched ${CUDA_TARGET_CPU_ARCH})
set(nvcc_flags ${nvcc_flags} "--target-cpu-architecture=${CUDA_TARGET_CPU_ARCH_patched}")
endif()
if(CUDA_TARGET_OS_VARIANT AND CUDA_VERSION VERSION_LESS "7.0")
set(nvcc_flags ${nvcc_flags} "-target-os-variant=${CUDA_TARGET_OS_VARIANT}")
endif()
# This needs to be passed in at this stage, because VS needs to fill out the
@@ -1355,7 +1240,7 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
foreach(file ${ARGN})
# Ignore any file marked as a HEADER_FILE_ONLY
get_source_file_property(_is_header ${file} HEADER_FILE_ONLY)
if(${file} MATCHES ".*\\.cu$" AND NOT _is_header)
if(${file} MATCHES "\\.cu$" AND NOT _is_header)
# Allow per source file overrides of the format.
get_source_file_property(_cuda_source_format ${file} CUDA_SOURCE_PROPERTY_FORMAT)
@@ -1363,16 +1248,22 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
set(_cuda_source_format ${format})
endif()
if( ${_cuda_source_format} MATCHES "PTX" )
set( compile_to_ptx ON )
elseif( ${_cuda_source_format} MATCHES "OBJ")
set( compile_to_ptx OFF )
if( ${_cuda_source_format} MATCHES "OBJ")
set( cuda_compile_to_external_module OFF )
else()
message( FATAL_ERROR "Invalid format flag passed to CUDA_WRAP_SRCS for file '${file}': '${_cuda_source_format}'. Use OBJ or PTX.")
set( cuda_compile_to_external_module ON )
if( ${_cuda_source_format} MATCHES "PTX" )
set( cuda_compile_to_external_module_type "ptx" )
elseif( ${_cuda_source_format} MATCHES "CUBIN")
set( cuda_compile_to_external_module_type "cubin" )
elseif( ${_cuda_source_format} MATCHES "FATBIN")
set( cuda_compile_to_external_module_type "fatbin" )
else()
message( FATAL_ERROR "Invalid format flag passed to CUDA_WRAP_SRCS for file '${file}': '${_cuda_source_format}'. Use OBJ, PTX, CUBIN or FATBIN.")
endif()
endif()
if(compile_to_ptx)
if(cuda_compile_to_external_module)
# Don't use any of the host compilation flags for PTX targets.
set(CUDA_HOST_FLAGS)
set(CUDA_NVCC_FLAGS_CONFIG)
@@ -1387,7 +1278,7 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
if(CUDA_GENERATED_OUTPUT_DIR)
set(cuda_compile_output_dir "${CUDA_GENERATED_OUTPUT_DIR}")
else()
if ( compile_to_ptx )
if ( cuda_compile_to_external_module )
set(cuda_compile_output_dir "${CMAKE_CURRENT_BINARY_DIR}")
else()
set(cuda_compile_output_dir "${cuda_compile_intermediate_directory}")
@@ -1397,10 +1288,10 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
# Add a custom target to generate a c or ptx file. ######################
get_filename_component( basename ${file} NAME )
if( compile_to_ptx )
if( cuda_compile_to_external_module )
set(generated_file_path "${cuda_compile_output_dir}")
set(generated_file_basename "${cuda_target}_generated_${basename}.ptx")
set(format_flag "-ptx")
set(generated_file_basename "${cuda_target}_generated_${basename}.${cuda_compile_to_external_module_type}")
set(format_flag "-${cuda_compile_to_external_module_type}")
file(MAKE_DIRECTORY "${cuda_compile_output_dir}")
else()
set(generated_file_path "${cuda_compile_output_dir}/${CMAKE_CFG_INTDIR}")
@@ -1423,7 +1314,7 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
set(custom_target_script "${cuda_compile_intermediate_directory}/${generated_file_basename}.cmake")
# Setup properties for obj files:
if( NOT compile_to_ptx )
if( NOT cuda_compile_to_external_module )
set_source_files_properties("${generated_file}"
PROPERTIES
EXTERNAL_OBJECT true # This is an object file not to be compiled, but only be linked.
@@ -1438,7 +1329,7 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
set(source_file "${CMAKE_CURRENT_SOURCE_DIR}/${file}")
endif()
if( NOT compile_to_ptx AND CUDA_SEPARABLE_COMPILATION)
if( NOT cuda_compile_to_external_module AND CUDA_SEPARABLE_COMPILATION)
list(APPEND ${cuda_target}_SEPARABLE_COMPILATION_OBJECTS "${generated_file}")
endif()
@@ -1455,7 +1346,7 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
# Build the NVCC made dependency file ###################################
set(build_cubin OFF)
if ( NOT CUDA_BUILD_EMULATION AND CUDA_BUILD_CUBIN )
if ( NOT compile_to_ptx )
if ( NOT cuda_compile_to_external_module )
set ( build_cubin ON )
endif()
endif()
@@ -1482,8 +1373,8 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
# Create up the comment string
file(RELATIVE_PATH generated_file_relative_path "${CMAKE_BINARY_DIR}" "${generated_file}")
if(compile_to_ptx)
set(cuda_build_comment_string "Building NVCC ptx file ${generated_file_relative_path}")
if(cuda_compile_to_external_module)
set(cuda_build_comment_string "Building NVCC ${cuda_compile_to_external_module_type} file ${generated_file_relative_path}")
else()
set(cuda_build_comment_string "Building NVCC (${cuda_build_type}) object ${generated_file_relative_path}")
endif()
@@ -1576,18 +1467,27 @@ function(CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS output_file cuda_target options
# If -ccbin, --compiler-bindir has been specified, don't do anything. Otherwise add it here.
list( FIND nvcc_flags "-ccbin" ccbin_found0 )
list( FIND nvcc_flags "--compiler-bindir" ccbin_found1 )
if( ccbin_found0 LESS 0 AND ccbin_found1 LESS 0 )
if( ccbin_found0 LESS 0 AND ccbin_found1 LESS 0 AND CUDA_HOST_COMPILER )
list(APPEND nvcc_flags -ccbin "\"${CUDA_HOST_COMPILER}\"")
endif()
# Create a list of flags specified by CUDA_NVCC_FLAGS_${CONFIG}
set(config_specific_flags)
set(flags)
foreach(config ${CUDA_configuration_types})
string(TOUPPER ${config} config_upper)
# Add config specific flags
foreach(f ${CUDA_NVCC_FLAGS_${config_upper}})
list(APPEND config_specific_flags $<$<CONFIG:${config}>:${f}>)
endforeach()
set(important_host_flags)
_cuda_get_important_host_flags(important_host_flags ${CMAKE_${CUDA_C_OR_CXX}_FLAGS_${config_upper}})
foreach(f ${important_host_flags})
list(APPEND flags $<$<CONFIG:${config}>:-Xcompiler> $<$<CONFIG:${config}>:${f}>)
endforeach()
endforeach()
# Add our general CUDA_NVCC_FLAGS with the configuration specifig flags
set(nvcc_flags ${CUDA_NVCC_FLAGS} ${config_specific_flags} ${nvcc_flags})
file(RELATIVE_PATH output_file_relative_path "${CMAKE_BINARY_DIR}" "${output_file}")
# Some generators don't handle the multiple levels of custom command
@@ -1713,21 +1613,29 @@ endmacro()
###############################################################################
###############################################################################
# CUDA COMPILE
# (Internal) helper for manually added cuda source files with specific targets
###############################################################################
###############################################################################
macro(CUDA_COMPILE generated_files)
macro(cuda_compile_base cuda_target format generated_files)
# Separate the sources from the options
CUDA_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _options ${ARGN})
# Create custom commands and targets for each file.
CUDA_WRAP_SRCS( cuda_compile OBJ _generated_files ${_sources} ${_cmake_options}
CUDA_WRAP_SRCS( ${cuda_target} ${format} _generated_files ${_sources} ${_cmake_options}
OPTIONS ${_options} )
set( ${generated_files} ${_generated_files})
endmacro()
###############################################################################
###############################################################################
# CUDA COMPILE
###############################################################################
###############################################################################
macro(CUDA_COMPILE generated_files)
cuda_compile_base(cuda_compile OBJ ${generated_files} ${ARGN})
endmacro()
###############################################################################
###############################################################################
@@ -1735,17 +1643,28 @@ endmacro()
###############################################################################
###############################################################################
macro(CUDA_COMPILE_PTX generated_files)
# Separate the sources from the options
CUDA_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _options ${ARGN})
# Create custom commands and targets for each file.
CUDA_WRAP_SRCS( cuda_compile_ptx PTX _generated_files ${_sources} ${_cmake_options}
OPTIONS ${_options} )
set( ${generated_files} ${_generated_files})
cuda_compile_base(cuda_compile_ptx PTX ${generated_files} ${ARGN})
endmacro()
###############################################################################
###############################################################################
# CUDA COMPILE FATBIN
###############################################################################
###############################################################################
macro(CUDA_COMPILE_FATBIN generated_files)
cuda_compile_base(cuda_compile_fatbin FATBIN ${generated_files} ${ARGN})
endmacro()
###############################################################################
###############################################################################
# CUDA COMPILE CUBIN
###############################################################################
###############################################################################
macro(CUDA_COMPILE_CUBIN generated_files)
cuda_compile_base(cuda_compile_cubin CUBIN ${generated_files} ${ARGN})
endmacro()
###############################################################################
###############################################################################
# CUDA ADD CUFFT TO TARGET
+2 -3
View File
@@ -37,12 +37,11 @@
file(READ ${input_file} depend_text)
if (${depend_text} MATCHES ".+")
if (NOT "${depend_text}" STREQUAL "")
# message("FOUND DEPENDS")
# Remember, four backslashes is escaped to one backslash in the string.
string(REGEX REPLACE "\\\\ " " " depend_text ${depend_text})
string(REPLACE "\\ " " " depend_text ${depend_text})
# This works for the nvcc -M generated dependency files.
string(REGEX REPLACE "^.* : " "" depend_text ${depend_text})
+7 -8
View File
@@ -37,11 +37,10 @@
file(READ ${input_file} file_text)
if (${file_text} MATCHES ".+")
if (NOT "${file_text}" STREQUAL "")
# Remember, four backslashes is escaped to one backslash in the string.
string(REGEX REPLACE ";" "\\\\;" file_text ${file_text})
string(REGEX REPLACE "\ncode" ";code" file_text ${file_text})
string(REPLACE ";" "\\;" file_text ${file_text})
string(REPLACE "\ncode" ";code" file_text ${file_text})
list(LENGTH file_text len)
@@ -57,7 +56,7 @@ if (${file_text} MATCHES ".+")
# Extract kernel names.
if (${entry} MATCHES "[^g]name = ([^ ]+)")
string(REGEX REPLACE ".* = ([^ ]+)" "\\1" entry ${entry})
set(entry "${CMAKE_MATCH_1}")
# Check to see if the kernel name starts with "_"
set(skip FALSE)
@@ -76,19 +75,19 @@ if (${file_text} MATCHES ".+")
# Registers
if (${entry} MATCHES "reg([ ]+)=([ ]+)([^ ]+)")
string(REGEX REPLACE ".*([ ]+)=([ ]+)([^ ]+)" "\\3" entry ${entry})
set(entry "${CMAKE_MATCH_3}")
message("Registers: ${entry}")
endif()
# Local memory
if (${entry} MATCHES "lmem([ ]+)=([ ]+)([^ ]+)")
string(REGEX REPLACE ".*([ ]+)=([ ]+)([^ ]+)" "\\3" entry ${entry})
set(entry "${CMAKE_MATCH_3}")
message("Local: ${entry}")
endif()
# Shared memory
if (${entry} MATCHES "smem([ ]+)=([ ]+)([^ ]+)")
string(REGEX REPLACE ".*([ ]+)=([ ]+)([^ ]+)" "\\3" entry ${entry})
set(entry "${CMAKE_MATCH_3}")
message("Shared: ${entry}")
endif()
+3 -3
View File
@@ -62,7 +62,7 @@ set(cmake_dependency_file "@cmake_dependency_file@") # path
set(CUDA_make2cmake "@CUDA_make2cmake@") # path
set(CUDA_parse_cubin "@CUDA_parse_cubin@") # path
set(build_cubin @build_cubin@) # bool
set(CUDA_HOST_COMPILER "@CUDA_HOST_COMPILER@") # bool
set(CUDA_HOST_COMPILER "@CUDA_HOST_COMPILER@") # path
# We won't actually use these variables for now, but we need to set this, in
# order to force this file to be run again if it changes.
set(generated_file_path "@generated_file_path@") # path
@@ -106,7 +106,7 @@ list(APPEND CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS_${build_configuration}})
# Any -ccbin existing in CUDA_NVCC_FLAGS gets highest priority
list( FIND CUDA_NVCC_FLAGS "-ccbin" ccbin_found0 )
list( FIND CUDA_NVCC_FLAGS "--compiler-bindir" ccbin_found1 )
if( ccbin_found0 LESS 0 AND ccbin_found1 LESS 0 )
if( ccbin_found0 LESS 0 AND ccbin_found1 LESS 0 AND CUDA_HOST_COMPILER )
if (CUDA_HOST_COMPILER STREQUAL "$(VCInstallDir)bin" AND DEFINED CCBIN)
set(CCBIN -ccbin "${CCBIN}")
else()
@@ -126,7 +126,7 @@ endif()
# and other return variables are present after executing the process.
macro(cuda_execute_process status command)
set(_command ${command})
if(NOT _command STREQUAL "COMMAND")
if(NOT "x${_command}" STREQUAL "xCOMMAND")
message(FATAL_ERROR "Malformed call to cuda_execute_process. Missing COMMAND as second argument. (command = ${command})")
endif()
if(verbose)
+43 -15
View File
@@ -6,34 +6,62 @@ endif()
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 "")
set(HAVE_MSPDK FALSE)
message(STATUS "Windows Platform SDK 8.0 was not found")
# search Windows (Phone) Platform SDK
message(STATUS "Checking for Windows (Phone) Platform SDK 8.0/8.1")
unset(WINDOWS_SDK_PATH CACHE)
GET_FILENAME_COMPONENT(WINDOWS_SDK_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\WindowsPhoneApp\\v8.1;InstallationFolder]" ABSOLUTE CACHE)
if((NOT ENABLE_WINPHONESDK81) OR (NOT (MSVC_VERSION EQUAL 1800)) OR (WINDOWS_SDK_PATH STREQUAL ""))
unset(WINDOWS_SDK_PATH CACHE)
GET_FILENAME_COMPONENT(WINDOWS_SDK_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\WindowsPhone\\v8.0;InstallationFolder]" ABSOLUTE CACHE)
if((NOT ENABLE_WINPHONESDK80) OR (MSVC_VERSION LESS 1700) OR (WINDOWS_SDK_PATH STREQUAL ""))
unset(WINDOWS_SDK_PATH CACHE)
GET_FILENAME_COMPONENT(WINDOWS_SDK_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v8.1;InstallationFolder]" ABSOLUTE CACHE)
if((NOT ENABLE_WINSDK81) OR (NOT (MSVC_VERSION EQUAL 1800)) OR (WINDOWS_SDK_PATH STREQUAL ""))
set(HAVE_MSPDK FALSE)
unset(WINDOWS_SDK_PATH CACHE)
GET_FILENAME_COMPONENT(WINDOWS_SDK_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v8.0;InstallationFolder]" ABSOLUTE CACHE)
if(WINDOWS_SDK_PATH STREQUAL "")
set(HAVE_MSPDK FALSE)
message(STATUS "Windows (Phone) Platform SDK 8.0/8.1 was not found")
else()
set(HAVE_MSPDK TRUE)
endif()
else()
set(HAVE_MSPDK TRUE)
endif()
else()
set(HAVE_MSPDK TRUE)
endif()
else()
set(HAVE_MSPDK TRUE)
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 "")
set(HAVE_MSVC2012 FALSE)
message(STATUS "Visual Studio 2012 was not found")
#search for Visual Studio 11.0/12.0 install directory
message(STATUS "Checking for Visual Studio 2012/2013")
unset(VISUAL_STUDIO_PATH CACHE)
GET_FILENAME_COMPONENT(VISUAL_STUDIO_PATH [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\12.0\\Setup\\VS;ProductDir] REALPATH CACHE)
if((NOT ENABLE_LIBVS2013) OR (NOT (MSVC_VERSION EQUAL 1800)) OR (VISUAL_STUDIO_PATH STREQUAL ""))
set(HAVE_MSVC2013 FALSE)
unset(VISUAL_STUDIO_PATH CACHE)
GET_FILENAME_COMPONENT(VISUAL_STUDIO_PATH [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0\\Setup\\VS;ProductDir] REALPATH CACHE)
if(VISUAL_STUDIO_PATH STREQUAL "")
set(HAVE_MSVC2012 FALSE)
message(STATUS "Visual Studio 2012/2013 not found")
else()
set(HAVE_MSVC2012 TRUE)
endif()
else()
set(HAVE_MSVC2012 TRUE)
set(HAVE_MSVC2013 TRUE)
endif()
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 OR HAVE_MSVC2013) 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)
elseif(ENABLE_WINRT_MODE_NATIVE AND HAVE_WINRT_SDK AND (HAVE_MSVC2012 OR HAVE_MSVC2013) AND HAVE_MSPDK)
set(HAVE_WINRT TRUE)
set(HAVE_WINRT_CX FALSE)
endif()
+25 -7
View File
@@ -63,6 +63,10 @@ if(OPENCV_CAN_BREAK_BINARY_COMPATIBILITY)
add_definitions(-DOPENCV_CAN_BREAK_BINARY_COMPATIBILITY)
endif()
if(BUILD_TINY_GPU_MODULE)
add_definitions(-DOPENCV_TINY_GPU_MODULE)
endif()
if(CMAKE_COMPILER_IS_GNUCXX)
# High level of warnings.
add_extra_compiler_option(-W)
@@ -91,6 +95,8 @@ if(CMAKE_COMPILER_IS_GNUCXX)
add_extra_compiler_option(-Wno-narrowing)
add_extra_compiler_option(-Wno-delete-non-virtual-dtor)
add_extra_compiler_option(-Wno-unnamed-type-template-args)
add_extra_compiler_option(-Wno-array-bounds)
add_extra_compiler_option(-Wno-aggressive-loop-optimizations)
endif()
add_extra_compiler_option(-fdiagnostics-show-option)
@@ -112,6 +118,10 @@ if(CMAKE_COMPILER_IS_GNUCXX)
add_extra_compiler_option(-march=i686)
endif()
if(APPLE)
add_extra_compiler_option(-Wno-semicolon-before-method-body)
endif()
# Other optimizations
if(ENABLE_OMIT_FRAME_POINTER)
add_extra_compiler_option(-fomit-frame-pointer)
@@ -140,7 +150,11 @@ if(CMAKE_COMPILER_IS_GNUCXX)
# SSE3 and further should be disabled under MingW because it generates compiler errors
if(NOT MINGW)
if(ENABLE_AVX)
add_extra_compiler_option(-mavx)
add_extra_compiler_option("-mavx")
endif()
if(ENABLE_AVX2)
add_extra_compiler_option("-mavx2")
endif()
# GCC depresses SSEx instructions when -mavx is used. Instead, it generates new AVX instructions or AVX equivalence for all SSEx instructions when needed.
@@ -216,10 +230,6 @@ if(MSVC)
set(OPENCV_EXTRA_FLAGS_RELEASE "${OPENCV_EXTRA_FLAGS_RELEASE} /Zi")
endif()
if(ENABLE_AVX AND NOT MSVC_VERSION LESS 1600)
set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /arch:AVX")
endif()
if(ENABLE_SSE4_1 AND CV_ICC AND NOT OPENCV_EXTRA_FLAGS MATCHES "/arch:")
set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /arch:SSE4.1")
endif()
@@ -238,7 +248,7 @@ if(MSVC)
endif()
endif()
if(ENABLE_SSE OR ENABLE_SSE2 OR ENABLE_SSE3 OR ENABLE_SSE4_1 OR ENABLE_AVX)
if(ENABLE_SSE OR ENABLE_SSE2 OR ENABLE_SSE3 OR ENABLE_SSE4_1 OR ENABLE_AVX OR ENABLE_AVX2)
set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /Oi")
endif()
@@ -253,8 +263,13 @@ if(MSVC)
endif()
endif()
if(MSVC12 AND NOT CMAKE_GENERATOR MATCHES "Visual Studio")
set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} /FS")
set(OPENCV_EXTRA_CXX_FLAGS "${OPENCV_EXTRA_CXX_FLAGS} /FS")
endif()
# Extra link libs if the user selects building static libs:
if(NOT BUILD_SHARED_LIBS AND CMAKE_COMPILER_IS_GNUCXX AND NOT ANDROID)
if(NOT BUILD_SHARED_LIBS AND ((CMAKE_COMPILER_IS_GNUCXX AND NOT ANDROID) OR QNX))
# Android does not need these settings because they are already set by toolchain file
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} stdc++)
set(OPENCV_EXTRA_FLAGS "-fPIC ${OPENCV_EXTRA_FLAGS}")
@@ -305,5 +320,8 @@ if(MSVC)
if(NOT ENABLE_NOISY_WARNINGS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4251") #class 'std::XXX' needs to have dll-interface to be used by clients of YYY
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4275") # non dll-interface class 'std::exception' used as base for dll-interface class 'cv::Exception'
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4589") # Constructor of abstract class ... ignores initializer for virtual base class 'cv::Algorithm'
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4359") # Alignment specifier is less than actual alignment (4), and will be ignored
endif()
endif()
+3 -1
View File
@@ -79,6 +79,8 @@ if(MSVC)
set(OpenCV_RUNTIME vc11)
elseif(MSVC_VERSION EQUAL 1800)
set(OpenCV_RUNTIME vc12)
elseif(MSVC_VERSION EQUAL 1900)
set(OpenCV_RUNTIME vc14)
endif()
elseif(MINGW)
set(OpenCV_RUNTIME mingw)
@@ -86,7 +88,7 @@ elseif(MINGW)
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpmachine
OUTPUT_VARIABLE OPENCV_GCC_TARGET_MACHINE
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(CMAKE_OPENCV_GCC_TARGET_MACHINE MATCHES "64")
if(OPENCV_GCC_TARGET_MACHINE MATCHES "amd64|x86_64|AMD64")
set(MINGW64 1)
set(OpenCV_ARCH x64)
else()
+2 -2
View File
@@ -349,7 +349,7 @@ macro(add_android_project target path)
if(android_proj_IGNORE_JAVA)
add_custom_command(
OUTPUT "${android_proj_bin_dir}/bin/${target}-debug.apk"
COMMAND ${ANT_EXECUTABLE} -q -noinput -k debug
COMMAND ${ANT_EXECUTABLE} -q -noinput -k debug -Djava.target=1.6 -Djava.source=1.6
COMMAND ${CMAKE_COMMAND} -E touch "${android_proj_bin_dir}/bin/${target}-debug.apk" # needed because ant does not update the timestamp of updated apk
WORKING_DIRECTORY "${android_proj_bin_dir}"
MAIN_DEPENDENCY "${android_proj_bin_dir}/${ANDROID_MANIFEST_FILE}"
@@ -357,7 +357,7 @@ macro(add_android_project target path)
else()
add_custom_command(
OUTPUT "${android_proj_bin_dir}/bin/${target}-debug.apk"
COMMAND ${ANT_EXECUTABLE} -q -noinput -k debug
COMMAND ${ANT_EXECUTABLE} -q -noinput -k debug -Djava.target=1.6 -Djava.source=1.6
COMMAND ${CMAKE_COMMAND} -E touch "${android_proj_bin_dir}/bin/${target}-debug.apk" # needed because ant does not update the timestamp of updated apk
WORKING_DIRECTORY "${android_proj_bin_dir}"
MAIN_DEPENDENCY "${android_proj_bin_dir}/${ANDROID_MANIFEST_FILE}"
+31 -45
View File
@@ -15,19 +15,10 @@ endif()
set(CMAKE_MODULE_PATH "${OpenCV_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
foreach(var INCLUDE LIBRARY PROGRAM)
set(__old_frpm_${var} "${CMAKE_FIND_ROOT_PATH_MODE_${var}}")
endforeach()
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER)
find_package(CUDA 4.2 QUIET)
foreach(var INCLUDE LIBRARY PROGRAM)
set(CMAKE_FIND_ROOT_PATH_MODE_${var} "${__old_frpm_${var}}")
endforeach()
if(ANDROID AND "${CUDA_VERSION}" VERSION_LESS "7.0")
set(CUDA_TARGET_OS_VARIANT "Android")
endif()
find_host_package(CUDA 4.2 QUIET)
list(REMOVE_AT CMAKE_MODULE_PATH 0)
@@ -44,7 +35,18 @@ if(CUDA_FOUND)
if(WITH_NVCUVID)
find_cuda_helper_libs(nvcuvid)
set(HAVE_NVCUVID 1)
if(WIN32)
find_cuda_helper_libs(nvcuvenc)
endif()
if(CUDA_nvcuvid_LIBRARY)
set(HAVE_NVCUVID 1)
endif()
if(CUDA_nvcuvenc_LIBRARY)
set(HAVE_NVCUVENC 1)
endif()
endif()
message(STATUS "CUDA detected: " ${CUDA_VERSION})
@@ -91,11 +93,18 @@ if(CUDA_FOUND)
if(NOT DEFINED __cuda_arch_bin)
if(ANDROID)
set(__cuda_arch_bin "3.2")
set(__cuda_arch_ptx "")
if (ARM)
set(__cuda_arch_bin "3.2")
set(__cuda_arch_ptx "")
elseif(AARCH64)
set(__cuda_arch_bin "5.3")
set(__cuda_arch_ptx "")
endif()
else()
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")
elseif(${CUDA_VERSION} VERSION_GREATER "6.5")
set(__cuda_arch_bin "2.0 2.1(2.0) 3.0 3.5")
else()
set(__cuda_arch_bin "1.1 1.2 1.3 2.0 2.1(2.0) 3.0 3.5")
endif()
@@ -154,7 +163,6 @@ if(CUDA_FOUND)
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}")
@@ -221,40 +229,18 @@ else()
endif()
if(HAVE_CUDA)
set(CUDA_LIBS_PATH "")
foreach(p ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY})
get_filename_component(_tmp ${p} PATH)
list(APPEND CUDA_LIBS_PATH ${_tmp})
endforeach()
if(HAVE_CUBLAS)
foreach(p ${CUDA_cublas_LIBRARY})
get_filename_component(_tmp ${p} PATH)
list(APPEND CUDA_LIBS_PATH ${_tmp})
endforeach()
endif()
if(HAVE_CUFFT)
foreach(p ${CUDA_cufft_LIBRARY})
get_filename_component(_tmp ${p} PATH)
list(APPEND CUDA_LIBS_PATH ${_tmp})
endforeach()
endif()
list(REMOVE_DUPLICATES CUDA_LIBS_PATH)
link_directories(${CUDA_LIBS_PATH})
set(CUDA_LIBRARIES_ABS ${CUDA_LIBRARIES})
ocv_convert_to_lib_name(CUDA_LIBRARIES ${CUDA_LIBRARIES})
ocv_create_imported_targets(CUDA_LIBRARIES ${CUDA_LIBRARIES})
set(CUDA_npp_LIBRARY_ABS ${CUDA_npp_LIBRARY})
ocv_convert_to_lib_name(CUDA_npp_LIBRARY ${CUDA_npp_LIBRARY})
ocv_create_imported_targets(CUDA_npp_LIBRARY ${CUDA_npp_LIBRARY})
if(HAVE_CUBLAS)
set(CUDA_cublas_LIBRARY_ABS ${CUDA_cublas_LIBRARY})
ocv_convert_to_lib_name(CUDA_cublas_LIBRARY ${CUDA_cublas_LIBRARY})
ocv_create_imported_targets(CUDA_cublas_LIBRARY ${CUDA_cublas_LIBRARY})
endif()
if(HAVE_CUFFT)
set(CUDA_cufft_LIBRARY_ABS ${CUDA_cufft_LIBRARY})
ocv_convert_to_lib_name(CUDA_cufft_LIBRARY ${CUDA_cufft_LIBRARY})
ocv_create_imported_targets(CUDA_cufft_LIBRARY ${CUDA_cufft_LIBRARY})
endif()
endif()
endif()
+8 -8
View File
@@ -91,9 +91,9 @@ elseif(CMAKE_COMPILER_IS_GNUCXX)
if(WIN32)
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpmachine
OUTPUT_VARIABLE CMAKE_OPENCV_GCC_TARGET_MACHINE
OUTPUT_VARIABLE OPENCV_GCC_TARGET_MACHINE
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(CMAKE_OPENCV_GCC_TARGET_MACHINE MATCHES "amd64|x86_64|AMD64")
if(OPENCV_GCC_TARGET_MACHINE MATCHES "amd64|x86_64|AMD64")
set(MINGW64 1)
endif()
endif()
@@ -109,10 +109,12 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i686.*|i386.*|x86.*|amd64.*|AMD64.*")
set(X86 1)
elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "arm.*|ARM.*")
set(ARM 1)
elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64.*|AARCH64.*")
set(AARCH64 1)
endif()
# Similar code is existed in OpenCVConfig.cmake
# Similar code exists in OpenCVConfig.cmake
if(NOT DEFINED OpenCV_STATIC)
# look for global setting
if(NOT DEFINED BUILD_SHARED_LIBS OR BUILD_SHARED_LIBS)
@@ -138,15 +140,13 @@ if(MSVC)
set(OpenCV_RUNTIME vc11)
elseif(MSVC_VERSION EQUAL 1800)
set(OpenCV_RUNTIME vc12)
elseif(MSVC_VERSION EQUAL 1900)
set(OpenCV_RUNTIME vc14)
endif()
elseif(MINGW)
set(OpenCV_RUNTIME mingw)
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpmachine
OUTPUT_VARIABLE OPENCV_GCC_TARGET_MACHINE
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(CMAKE_OPENCV_GCC_TARGET_MACHINE MATCHES "64")
set(MINGW64 1)
if(MINGW64)
set(OpenCV_ARCH x64)
else()
set(OpenCV_ARCH x86)
+5 -3
View File
@@ -38,10 +38,12 @@ if(PYTHON_EXECUTABLE)
if(NOT ANDROID AND NOT IOS)
ocv_check_environment_variables(PYTHON_LIBRARY PYTHON_INCLUDE_DIR)
if(CMAKE_VERSION VERSION_GREATER 2.8.8 AND PYTHON_VERSION_FULL)
find_host_package(PythonLibs ${PYTHON_VERSION_FULL} EXACT)
if(CMAKE_CROSSCOMPILING)
find_package(PythonLibs ${PYTHON_VERSION_MAJOR_MINOR})
elseif(CMAKE_VERSION VERSION_GREATER 2.8.8 AND PYTHON_VERSION_FULL)
find_package(PythonLibs ${PYTHON_VERSION_FULL} EXACT)
else()
find_host_package(PythonLibs ${PYTHON_VERSION_FULL})
find_package(PythonLibs ${PYTHON_VERSION_FULL})
endif()
# cmake 2.4 (at least on Ubuntu 8.04 (hardy)) don't define PYTHONLIBS_FOUND
if(NOT PYTHONLIBS_FOUND AND PYTHON_INCLUDE_PATH)
+4
View File
@@ -63,6 +63,10 @@ if(NOT HAVE_TBB)
set(_TBB_LIB_PATH "${_TBB_LIB_PATH}/vc10")
elseif(MSVC11)
set(_TBB_LIB_PATH "${_TBB_LIB_PATH}/vc11")
elseif(MSVC12)
set(_TBB_LIB_PATH "${_TBB_LIB_PATH}/vc12")
elseif(MSVC14)
set(_TBB_LIB_PATH "${_TBB_LIB_PATH}/vc14")
endif()
set(TBB_LIB_DIR "${_TBB_LIB_PATH}" CACHE PATH "Full path of TBB library directory")
link_directories("${TBB_LIB_DIR}")
+9 -2
View File
@@ -1,9 +1,16 @@
if(NOT WITH_VTK OR ANDROID OR IOS)
if(NOT WITH_VTK)
return()
endif()
# VTK 6.x components
find_package(VTK QUIET COMPONENTS vtkRenderingOpenGL vtkInteractionStyle vtkRenderingLOD vtkIOPLY vtkFiltersTexture vtkRenderingFreeType vtkIOExport NO_MODULE)
find_package(VTK QUIET COMPONENTS vtkInteractionStyle vtkRenderingLOD vtkIOPLY vtkFiltersTexture vtkRenderingFreeType vtkIOExport NO_MODULE)
IF(VTK_FOUND)
IF(VTK_RENDERING_BACKEND) #in vtk 7, the rendering backend is exported as a var.
find_package(VTK QUIET COMPONENTS vtkRendering${VTK_RENDERING_BACKEND} vtkInteractionStyle vtkRenderingLOD vtkIOPLY vtkFiltersTexture vtkRenderingFreeType vtkIOExport NO_MODULE)
ELSE(VTK_RENDERING_BACKEND)
find_package(VTK QUIET COMPONENTS vtkRenderingOpenGL vtkInteractionStyle vtkRenderingLOD vtkIOPLY vtkFiltersTexture vtkRenderingFreeType vtkIOExport NO_MODULE)
ENDIF(VTK_RENDERING_BACKEND)
ENDIF(VTK_FOUND)
# VTK 5.x components
if(NOT VTK_FOUND)
+2 -1
View File
@@ -8,7 +8,8 @@ if(BUILD_ZLIB)
else()
include(FindZLIB)
if(ZLIB_FOUND AND ANDROID)
if(ZLIB_LIBRARY STREQUAL "${ANDROID_SYSROOT}/usr/lib/libz.so")
if(ZLIB_LIBRARIES STREQUAL "${ANDROID_SYSROOT}/usr/lib/libz.so" OR
ZLIB_LIBRARIES STREQUAL "${ANDROID_SYSROOT}/usr/lib64/libz.so")
set(ZLIB_LIBRARY z)
set(ZLIB_LIBRARIES z)
endif()
+12 -12
View File
@@ -46,25 +46,15 @@ else()
set(HAVE_CSTRIPES 0)
endif()
# --- OpenMP ---
if(WITH_OPENMP AND NOT HAVE_TBB AND NOT HAVE_CSTRIPES)
find_package(OpenMP)
if(OPENMP_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()
set(HAVE_OPENMP "${OPENMP_FOUND}")
endif()
# --- GCD ---
if(APPLE AND NOT HAVE_TBB AND NOT HAVE_CSTRIPES AND NOT HAVE_OPENMP)
if(APPLE AND NOT HAVE_TBB AND NOT HAVE_CSTRIPES)
set(HAVE_GCD 1)
else()
set(HAVE_GCD 0)
endif()
# --- Concurrency ---
if(MSVC AND NOT HAVE_TBB AND NOT HAVE_CSTRIPES AND NOT HAVE_OPENMP)
if(MSVC AND NOT HAVE_TBB AND NOT HAVE_CSTRIPES)
set(_fname "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/concurrencytest.cpp")
file(WRITE "${_fname}" "#if _MSC_VER < 1600\n#error\n#endif\nint main() { return 0; }\n")
try_compile(HAVE_CONCURRENCY "${CMAKE_BINARY_DIR}" "${_fname}")
@@ -72,3 +62,13 @@ if(MSVC AND NOT HAVE_TBB AND NOT HAVE_CSTRIPES AND NOT HAVE_OPENMP)
else()
set(HAVE_CONCURRENCY 0)
endif()
# --- OpenMP ---
if(WITH_OPENMP)
find_package(OpenMP)
if(OPENMP_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()
set(HAVE_OPENMP "${OPENMP_FOUND}")
endif()
+78 -42
View File
@@ -12,15 +12,50 @@ endif(WITH_VFW)
# --- GStreamer ---
ocv_clear_vars(HAVE_GSTREAMER)
if(WITH_GSTREAMER)
CHECK_MODULE(gstreamer-base-0.10 HAVE_GSTREAMER)
if(HAVE_GSTREAMER)
CHECK_MODULE(gstreamer-app-0.10 HAVE_GSTREAMER)
# try to find gstreamer 1.x first if 0.10 was not requested
if(WITH_GSTREAMER AND NOT WITH_GSTREAMER_0_10)
CHECK_MODULE(gstreamer-base-1.0 HAVE_GSTREAMER_BASE)
CHECK_MODULE(gstreamer-video-1.0 HAVE_GSTREAMER_VIDEO)
CHECK_MODULE(gstreamer-app-1.0 HAVE_GSTREAMER_APP)
CHECK_MODULE(gstreamer-riff-1.0 HAVE_GSTREAMER_RIFF)
CHECK_MODULE(gstreamer-pbutils-1.0 HAVE_GSTREAMER_PBUTILS)
if(HAVE_GSTREAMER_BASE AND HAVE_GSTREAMER_VIDEO AND HAVE_GSTREAMER_APP AND HAVE_GSTREAMER_RIFF AND HAVE_GSTREAMER_PBUTILS)
set(HAVE_GSTREAMER TRUE)
set(GSTREAMER_BASE_VERSION ${ALIASOF_gstreamer-base-1.0_VERSION})
set(GSTREAMER_VIDEO_VERSION ${ALIASOF_gstreamer-video-1.0_VERSION})
set(GSTREAMER_APP_VERSION ${ALIASOF_gstreamer-app-1.0_VERSION})
set(GSTREAMER_RIFF_VERSION ${ALIASOF_gstreamer-riff-1.0_VERSION})
set(GSTREAMER_PBUTILS_VERSION ${ALIASOF_gstreamer-pbutils-1.0_VERSION})
endif()
if(HAVE_GSTREAMER)
CHECK_MODULE(gstreamer-video-0.10 HAVE_GSTREAMER)
endif()
# gstreamer support was requested but could not find gstreamer 1.x,
# so fallback/try to find gstreamer 0.10
if(WITH_GSTREAMER AND NOT HAVE_GSTREAMER)
set(WITH_GSTREAMER_0_10 ON)
endif()
# if gstreamer 1.x was not found (fallback on gstreamer 0.10), or we specified
# we wanted gstreamer 0.10 support,
# then try to find it if not gstreamer support has not been found so far.
if(WITH_GSTREAMER_0_10 AND NOT HAVE_GSTREAMER)
CHECK_MODULE(gstreamer-base-0.10 HAVE_GSTREAMER_BASE)
CHECK_MODULE(gstreamer-video-0.10 HAVE_GSTREAMER_VIDEO)
CHECK_MODULE(gstreamer-app-0.10 HAVE_GSTREAMER_APP)
CHECK_MODULE(gstreamer-riff-0.10 HAVE_GSTREAMER_RIFF)
CHECK_MODULE(gstreamer-pbutils-0.10 HAVE_GSTREAMER_PBUTILS)
if(HAVE_GSTREAMER_BASE AND HAVE_GSTREAMER_VIDEO AND HAVE_GSTREAMER_APP AND HAVE_GSTREAMER_RIFF AND HAVE_GSTREAMER_PBUTILS)
set(HAVE_GSTREAMER TRUE)
set(GSTREAMER_BASE_VERSION ${ALIASOF_gstreamer-base-0.10_VERSION})
set(GSTREAMER_VIDEO_VERSION ${ALIASOF_gstreamer-video-0.10_VERSION})
set(GSTREAMER_APP_VERSION ${ALIASOF_gstreamer-app-0.10_VERSION})
set(GSTREAMER_RIFF_VERSION ${ALIASOF_gstreamer-riff-0.10_VERSION})
set(GSTREAMER_PBUTILS_VERSION ${ALIASOF_gstreamer-pbutils-0.10_VERSION})
endif()
endif(WITH_GSTREAMER)
endif(WITH_GSTREAMER_0_10 AND NOT HAVE_GSTREAMER)
# --- unicap ---
ocv_clear_vars(HAVE_UNICAP)
@@ -126,7 +161,13 @@ endif(WITH_XINE)
ocv_clear_vars(HAVE_LIBV4L HAVE_CAMV4L HAVE_CAMV4L2 HAVE_VIDEOIO)
if(WITH_V4L)
if(WITH_LIBV4L)
CHECK_MODULE(libv4l1 HAVE_LIBV4L)
CHECK_MODULE(libv4l1 HAVE_LIBV4L1)
CHECK_MODULE(libv4l2 HAVE_LIBV4L2)
if(HAVE_LIBV4L1 AND HAVE_LIBV4L2)
set(HAVE_LIBV4L YES)
else()
set(HAVE_LIBV4L NO)
endif()
endif()
CHECK_INCLUDE_FILE(linux/videodev.h HAVE_CAMV4L)
CHECK_INCLUDE_FILE(linux/videodev2.h HAVE_CAMV4L2)
@@ -149,7 +190,7 @@ if(WITH_XIMEA)
endif(WITH_XIMEA)
# --- FFMPEG ---
ocv_clear_vars(HAVE_FFMPEG HAVE_FFMPEG_CODEC HAVE_FFMPEG_FORMAT HAVE_FFMPEG_UTIL HAVE_FFMPEG_SWSCALE HAVE_GENTOO_FFMPEG HAVE_FFMPEG_FFMPEG)
ocv_clear_vars(HAVE_FFMPEG HAVE_FFMPEG_CODEC HAVE_FFMPEG_FORMAT HAVE_FFMPEG_UTIL HAVE_FFMPEG_SWSCALE HAVE_FFMPEG_RESAMPLE HAVE_GENTOO_FFMPEG HAVE_FFMPEG_FFMPEG)
if(WITH_FFMPEG)
if(WIN32 AND NOT ARM)
include("${OpenCV_SOURCE_DIR}/3rdparty/ffmpeg/ffmpeg_version.cmake")
@@ -158,6 +199,7 @@ if(WITH_FFMPEG)
CHECK_MODULE(libavformat HAVE_FFMPEG_FORMAT)
CHECK_MODULE(libavutil HAVE_FFMPEG_UTIL)
CHECK_MODULE(libswscale HAVE_FFMPEG_SWSCALE)
CHECK_MODULE(libavresample HAVE_FFMPEG_RESAMPLE)
CHECK_INCLUDE_FILE(libavformat/avformat.h HAVE_GENTOO_FFMPEG)
CHECK_INCLUDE_FILE(ffmpeg/avformat.h HAVE_FFMPEG_FFMPEG)
@@ -177,42 +219,35 @@ if(WITH_FFMPEG)
# Do an other trial
FIND_FILE(BZIP2_LIBRARIES NAMES libbz2.so.1 PATHS /lib)
endif()
endif(HAVE_FFMPEG)
endif()
if(APPLE)
find_path(FFMPEG_INCLUDE_DIR "libavformat/avformat.h"
PATHS /usr/local /usr /opt
PATH_SUFFIXES include
DOC "The path to FFMPEG headers")
if(FFMPEG_INCLUDE_DIR)
set(HAVE_GENTOO_FFMPEG TRUE)
set(FFMPEG_LIB_DIR "${FFMPEG_INCLUDE_DIR}/../lib" CACHE PATH "Full path of FFMPEG library directory")
if(EXISTS "${FFMPEG_LIB_DIR}/libavcodec.a")
set(HAVE_FFMPEG_CODEC 1)
set(ALIASOF_libavcodec_VERSION "Unknown")
if(EXISTS "${FFMPEG_LIB_DIR}/libavformat.a")
set(HAVE_FFMPEG_FORMAT 1)
else()
find_path(FFMPEG_INCLUDE_DIR "libavformat/avformat.h"
PATHS /usr/local /usr /opt
PATH_SUFFIXES include
DOC "The path to FFMPEG headers")
if(FFMPEG_INCLUDE_DIR)
set(HAVE_GENTOO_FFMPEG TRUE)
set(FFMPEG_LIB_DIR "${FFMPEG_INCLUDE_DIR}/../lib" CACHE PATH "Full path of FFMPEG library directory")
find_library(FFMPEG_CODEC_LIB "avcodec" HINTS "${FFMPEG_LIB_DIR}")
find_library(FFMPEG_FORMAT_LIB "avformat" HINTS "${FFMPEG_LIB_DIR}")
find_library(FFMPEG_UTIL_LIB "avutil" HINTS "${FFMPEG_LIB_DIR}")
find_library(FFMPEG_SWSCALE_LIB "swscale" HINTS "${FFMPEG_LIB_DIR}")
if(FFMPEG_CODEC_LIB AND FFMPEG_FORMAT_LIB AND
FFMPEG_UTIL_LIB AND FFMPEG_SWSCALE_LIB)
set(ALIASOF_libavcodec_VERSION "Unknown")
set(ALIASOF_libavformat_VERSION "Unknown")
if(EXISTS "${FFMPEG_LIB_DIR}/libavutil.a")
set(HAVE_FFMPEG_UTIL 1)
set(ALIASOF_libavutil_VERSION "Unknown")
if(EXISTS "${FFMPEG_LIB_DIR}/libswscale.a")
set(HAVE_FFMPEG_SWSCALE 1)
set(ALIASOF_libswscale_VERSION "Unknown")
set(HAVE_FFMPEG 1)
endif()
endif()
set(ALIASOF_libavutil_VERSION "Unknown")
set(ALIASOF_libswscale_VERSION "Unknown")
set(HAVE_FFMPEG 1)
endif()
endif()
endif(FFMPEG_INCLUDE_DIR)
if(HAVE_FFMPEG)
set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES} "${FFMPEG_LIB_DIR}/libavcodec.a"
"${FFMPEG_LIB_DIR}/libavformat.a" "${FFMPEG_LIB_DIR}/libavutil.a"
"${FFMPEG_LIB_DIR}/libswscale.a")
ocv_include_directories(${FFMPEG_INCLUDE_DIR})
endif(FFMPEG_INCLUDE_DIR)
if(HAVE_FFMPEG)
set(HIGHGUI_LIBRARIES ${HIGHGUI_LIBRARIES}
${FFMPEG_CODEC_LIB} ${FFMPEG_FORMAT_LIB}
${FFMPEG_UTIL_LIB} ${FFMPEG_SWSCALE_LIB})
ocv_include_directories(${FFMPEG_INCLUDE_DIR})
endif(HAVE_FFMPEG)
endif()
endif(APPLE)
endif()
endif(WITH_FFMPEG)
# --- VideoInput/DirectShow ---
@@ -222,6 +257,7 @@ if(WITH_DSHOW)
endif(WITH_DSHOW)
# --- VideoInput/Microsoft Media Foundation ---
ocv_clear_vars(HAVE_MSMF)
if(WITH_MSMF)
check_include_file(Mfapi.h HAVE_MSMF)
endif(WITH_MSMF)
+6
View File
@@ -31,6 +31,12 @@ if(WIN32)
else()
set(XIMEA_FOUND 0)
endif()
elseif(APPLE)
if(EXISTS /Library/Frameworks/m3api.framework)
set(XIMEA_FOUND 1)
else()
set(XIMEA_FOUND 0)
endif()
else()
if(EXISTS /opt/XIMEA)
set(XIMEA_FOUND 1)
+20 -1
View File
@@ -19,8 +19,26 @@ if(ANDROID)
set(OPENCV_STATIC_LIBTYPE_CONFIGMAKE ${OPENCV_LIBTYPE_CONFIGMAKE})
endif()
if (NOT COMMAND ANDROID_GET_ABI_RAWNAME)
macro( ANDROID_GET_ABI_RAWNAME TOOLCHAIN_FLAG VAR )
if( " ${TOOLCHAIN_FLAG}" STREQUAL " ARMEABI" )
set( ${VAR} "armeabi" )
elseif( " ${TOOLCHAIN_FLAG}" STREQUAL " ARMEABI_V7A" )
set( ${VAR} "armeabi-v7a" )
elseif( " ${TOOLCHAIN_FLAG}" STREQUAL " ARM64_V8A" )
set( ${VAR} "arm64-v8a" )
elseif( " ${TOOLCHAIN_FLAG}" STREQUAL " X86" )
set( ${VAR} "x86" )
elseif( " ${TOOLCHAIN_FLAG}" STREQUAL " MIPS" )
set( ${VAR} "mips" )
else()
set( ${VAR} "unknown" )
endif()
endmacro()
endif()
# setup lists of camera libs
foreach(abi ARMEABI ARMEABI_V7A X86 MIPS)
foreach(abi ARMEABI ARMEABI_V7A ARM64_V8A X86 MIPS)
ANDROID_GET_ABI_RAWNAME(${abi} ndkabi)
if(BUILD_ANDROID_CAMERA_WRAPPER)
if(ndkabi STREQUAL ANDROID_NDK_ABI_NAME)
@@ -30,6 +48,7 @@ if(ANDROID)
endif()
elseif(HAVE_opencv_androidcamera)
set(OPENCV_CAMERA_LIBS_${abi}_CONFIGCMAKE "")
# TODO: add prebuild camera libs for arm64-v8a
file(GLOB OPENCV_CAMERA_LIBS "${OpenCV_SOURCE_DIR}/3rdparty/lib/${ndkabi}/libnative_camera_r*.so")
if(OPENCV_CAMERA_LIBS)
list(SORT OPENCV_CAMERA_LIBS)
+2 -2
View File
@@ -140,6 +140,6 @@ if(WIN32)
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}" COMPONENT dev)
install(FILES "${OpenCV_SOURCE_DIR}/cmake/OpenCVConfig.cmake" DESTINATION "${CMAKE_INSTALL_PREFIX}/" COMPONENT dev)
install(FILES "${CMAKE_BINARY_DIR}/win-install/OpenCVConfig-version.cmake" DESTINATION "." COMPONENT dev)
install(FILES "${OpenCV_SOURCE_DIR}/cmake/OpenCVConfig.cmake" DESTINATION "." COMPONENT dev)
endif()
+45 -24
View File
@@ -8,10 +8,6 @@
#
# ${BIN_DIR}/unix-install/opencv.pc -> For use *with* "make install"
# -------------------------------------------------------------------------------------------
set(prefix "${CMAKE_INSTALL_PREFIX}")
set(exec_prefix "\${prefix}")
set(libdir "") #TODO: need link paths for OpenCV_EXTRA_COMPONENTS
set(includedir "\${prefix}/${OPENCV_INCLUDE_INSTALL_PATH}")
if(CMAKE_BUILD_TYPE MATCHES "Release")
set(ocv_optkind OPT)
@@ -35,42 +31,67 @@ ocv_list_reverse(OpenCV_LIB_COMPONENTS)
ocv_list_reverse(OpenCV_EXTRA_COMPONENTS)
#build the list of components
set(OpenCV_LIB_COMPONENTS_ "")
# Note:
# when linking against static libraries, if libfoo depends on libbar, then
# libfoo must come first in the linker flags.
# world is a special target whose library should come first, especially for
# static link.
if(OpenCV_LIB_COMPONENTS MATCHES "opencv_world")
list(REMOVE_ITEM OpenCV_LIB_COMPONENTS "opencv_world")
list(INSERT OpenCV_LIB_COMPONENTS 0 "opencv_world")
endif()
set(OpenCV_LIB_COMPONENTS_)
foreach(CVLib ${OpenCV_LIB_COMPONENTS})
get_target_property(libpath ${CVLib} LOCATION_${CMAKE_BUILD_TYPE})
get_filename_component(libname "${libpath}" NAME)
if(INSTALL_TO_MANGLED_PATHS)
set(libname "${libname}.${OPENCV_VERSION}")
endif()
#need better solution....
if(libpath MATCHES "3rdparty")
set(installDir "share/OpenCV/3rdparty/${OPENCV_LIB_INSTALL_PATH}")
get_target_property(libloc ${CVLib} LOCATION_${CMAKE_BUILD_TYPE})
if(libloc MATCHES "3rdparty")
set(libpath "\${exec_prefix}/share/OpenCV/3rdparty/${OPENCV_LIB_INSTALL_PATH}")
else()
set(installDir "${OPENCV_LIB_INSTALL_PATH}")
set(libpath "\${exec_prefix}/${OPENCV_LIB_INSTALL_PATH}")
endif()
list(APPEND OpenCV_LIB_COMPONENTS_ "-L${libpath}")
get_filename_component(libname ${CVLib} NAME_WE)
string(REGEX REPLACE "^lib" "" libname "${libname}")
list(APPEND OpenCV_LIB_COMPONENTS_ "-l${libname}")
set(OpenCV_LIB_COMPONENTS_ "${OpenCV_LIB_COMPONENTS_} \${exec_prefix}/${installDir}/${libname}")
endforeach()
# add extra dependencies required for OpenCV
set(OpenCV_LIB_COMPONENTS ${OpenCV_LIB_COMPONENTS_})
if(OpenCV_EXTRA_COMPONENTS)
foreach(extra_component ${OpenCV_EXTRA_COMPONENTS})
if(extra_component MATCHES "^-[lL]" OR extra_component MATCHES "[\\/]")
set(maybe_l_prefix "")
else()
set(maybe_l_prefix "-l")
if(TARGET "${extra_component}")
get_target_property(extra_component_is_imported "${extra_component}" IMPORTED)
if(extra_component_is_imported)
get_target_property(extra_component "${extra_component}" LOCATION)
endif()
endif()
set(OpenCV_LIB_COMPONENTS "${OpenCV_LIB_COMPONENTS} ${maybe_l_prefix}${extra_component}")
if(extra_component MATCHES "^-l")
list(APPEND OpenCV_LIB_COMPONENTS_ "${extra_component}")
elseif(extra_component MATCHES "[\\/]")
get_filename_component(libdir "${extra_component}" PATH)
get_filename_component(libname "${extra_component}" NAME_WE)
string(REGEX REPLACE "^lib" "" libname "${libname}")
list(APPEND OpenCV_LIB_COMPONENTS_ "-L${libdir}" "-l${libname}")
else()
list(APPEND OpenCV_LIB_COMPONENTS_ "-l${extra_component}")
endif()
endforeach()
endif()
list(REMOVE_DUPLICATES OpenCV_LIB_COMPONENTS_)
string(REPLACE ";" " " OpenCV_LIB_COMPONENTS "${OpenCV_LIB_COMPONENTS_}")
#generate the .pc file
set(prefix "${CMAKE_INSTALL_PREFIX}")
set(exec_prefix "\${prefix}")
set(libdir "\${exec_prefix}/${OPENCV_LIB_INSTALL_PATH}")
set(includedir "\${prefix}/${OPENCV_INCLUDE_INSTALL_PATH}")
if(INSTALL_TO_MANGLED_PATHS)
set(OPENCV_PC_FILE_NAME "opencv-${OPENCV_VERSION}.pc")
else()
+87 -25
View File
@@ -49,6 +49,8 @@ foreach(mod ${OPENCV_MODULES_BUILD} ${OPENCV_MODULES_DISABLED_USER} ${OPENCV_MOD
if(HAVE_${mod})
unset(HAVE_${mod} CACHE)
endif()
unset(OPENCV_MODULE_${mod}_DEPS CACHE)
unset(OPENCV_MODULE_${mod}_DEPS_EXT CACHE)
unset(OPENCV_MODULE_${mod}_REQ_DEPS CACHE)
unset(OPENCV_MODULE_${mod}_OPT_DEPS CACHE)
unset(OPENCV_MODULE_${mod}_PRIVATE_REQ_DEPS CACHE)
@@ -106,7 +108,6 @@ endmacro()
# ocv_add_module(yaom INTERNAL opencv_core opencv_highgui opencv_flann OPTIONAL opencv_gpu)
macro(ocv_add_module _name)
string(TOLOWER "${_name}" name)
string(REGEX REPLACE "^opencv_" "" ${name} "${name}")
set(the_module opencv_${name})
# the first pass - collect modules info, the second pass - create targets
@@ -489,7 +490,7 @@ macro(ocv_glob_module_sources)
file(GLOB_RECURSE lib_srcs "src/*.cpp")
file(GLOB_RECURSE lib_int_hdrs "src/*.hpp" "src/*.h")
file(GLOB lib_hdrs "include/opencv2/${name}/*.hpp" "include/opencv2/${name}/*.h")
file(GLOB lib_hdrs "include/opencv2/*.hpp" "include/opencv2/${name}/*.hpp" "include/opencv2/${name}/*.h")
file(GLOB lib_hdrs_detail "include/opencv2/${name}/detail/*.hpp" "include/opencv2/${name}/detail/*.h")
file(GLOB_RECURSE lib_srcs_apple "src/*.mm")
if (APPLE)
@@ -526,6 +527,28 @@ macro(ocv_glob_module_sources)
list(APPEND lib_srcs ${cl_kernels} "${CMAKE_CURRENT_BINARY_DIR}/opencl_kernels.cpp" "${CMAKE_CURRENT_BINARY_DIR}/opencl_kernels.hpp")
endif()
if(ENABLE_AVX)
file(GLOB avx_srcs "src/avx/*.cpp")
foreach(src ${avx_srcs})
if(CMAKE_COMPILER_IS_GNUCXX)
set_source_files_properties(${src} PROPERTIES COMPILE_FLAGS -mavx)
elseif(MSVC AND NOT MSVC_VERSION LESS 1600)
set_source_files_properties(${src} PROPERTIES COMPILE_FLAGS /arch:AVX)
endif()
endforeach()
endif()
if(ENABLE_AVX2)
file(GLOB avx2_srcs "src/avx2/*.cpp")
foreach(src ${avx2_srcs})
if(CMAKE_COMPILER_IS_GNUCXX)
set_source_files_properties(${src} PROPERTIES COMPILE_FLAGS -mavx2)
elseif(MSVC AND NOT MSVC_VERSION LESS 1800)
set_source_files_properties(${src} PROPERTIES COMPILE_FLAGS /arch:AVX2)
endif()
endforeach()
endif()
source_group("Include" FILES ${lib_hdrs})
source_group("Include\\detail" FILES ${lib_hdrs_detail})
@@ -553,7 +576,10 @@ macro(ocv_create_module)
if(NOT "${ARGN}" STREQUAL "SKIP_LINK")
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})
set(extra_deps ${OPENCV_MODULE_${the_module}_DEPS_EXT} ${OPENCV_LINKER_LIBS} ${IPP_LIBS} ${ARGN})
ocv_extract_simple_libs(extra_deps _simple_deps _other_deps)
target_link_libraries(${the_module} LINK_INTERFACE_LIBRARIES ${_simple_deps}) # this list goes to "export"
target_link_libraries(${the_module} ${extra_deps})
endif()
add_dependencies(opencv_modules ${the_module})
@@ -568,7 +594,6 @@ macro(ocv_create_module)
ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
INSTALL_NAME_DIR lib
)
# For dynamic link numbering convenions
@@ -595,15 +620,20 @@ macro(ocv_create_module)
ocv_install_target(${the_module} EXPORT OpenCVModules
RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT libs
LIBRARY DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT libs
LIBRARY DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT libs NAMELINK_SKIP
ARCHIVE DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT dev
)
get_target_property(_target_type ${the_module} TYPE)
if("${_target_type}" STREQUAL "SHARED_LIBRARY")
install(TARGETS ${the_module}
LIBRARY DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT dev NAMELINK_ONLY)
endif()
# only "public" headers need to be installed
if(OPENCV_MODULE_${the_module}_HEADERS AND ";${OPENCV_MODULES_PUBLIC};" MATCHES ";${the_module};")
foreach(hdr ${OPENCV_MODULE_${the_module}_HEADERS})
string(REGEX REPLACE "^.*opencv2/" "opencv2/" hdr2 "${hdr}")
if(hdr2 MATCHES "^(opencv2/.*)/[^/]+.h(..)?$")
if(hdr2 MATCHES "^(opencv2/?.*)/[^/]+.h(..)?$")
install(FILES ${hdr} DESTINATION "${OPENCV_INCLUDE_INSTALL_PATH}/${CMAKE_MATCH_1}" COMPONENT dev)
endif()
endforeach()
@@ -680,7 +710,7 @@ macro(__ocv_parse_test_sources tests_type)
set(__file_group_sources "")
elseif(arg STREQUAL "DEPENDS_ON")
set(__currentvar "OPENCV_TEST_${the_module}_DEPS")
elseif("${__currentvar}" STREQUAL "__file_group_sources" AND NOT __file_group_name)
elseif(" ${__currentvar}" STREQUAL " __file_group_sources" AND NOT __file_group_name) # spaces to avoid CMP0054
set(__file_group_name "${arg}")
else()
list(APPEND ${__currentvar} "${arg}")
@@ -734,6 +764,22 @@ function(ocv_add_perf_tests)
ocv_add_precompiled_headers(${the_target})
if(CMAKE_VERSION VERSION_GREATER "2.8" AND OPENCV_TEST_DATA_PATH)
add_test(NAME ${the_target} COMMAND ${the_target} --perf_min_samples=1 --perf_force_samples=1 --perf_verify_sanity)
get_filename_component(cur_modules_loc "${CMAKE_CURRENT_SOURCE_DIR}/.." ABSOLUTE)
get_filename_component(default_modules_loc "${CMAKE_SOURCE_DIR}/modules" ABSOLUTE)
if("${cur_modules_loc}" STREQUAL "${default_modules_loc}")
set(test_category "Public")
else()
set(test_category "Extra")
endif()
set_tests_properties(${the_target} PROPERTIES
LABELS "${test_category};Sanity"
ENVIRONMENT "OPENCV_TEST_DATA_PATH=${OPENCV_TEST_DATA_PATH}")
endif()
else(OCV_DEPENDENCIES_FOUND)
# TODO: warn about unsatisfied dependencies
endif(OCV_DEPENDENCIES_FOUND)
@@ -785,11 +831,24 @@ function(ocv_add_accuracy_tests)
set_target_properties(${the_target} PROPERTIES FOLDER "tests accuracy")
endif()
enable_testing()
get_target_property(LOC ${the_target} LOCATION)
add_test(${the_target} "${LOC}")
ocv_add_precompiled_headers(${the_target})
if(CMAKE_VERSION VERSION_GREATER "2.8" AND OPENCV_TEST_DATA_PATH AND NOT "${the_target}" MATCHES "opencv_test_viz")
add_test(NAME ${the_target} COMMAND ${the_target})
get_filename_component(cur_modules_loc "${CMAKE_CURRENT_SOURCE_DIR}/.." ABSOLUTE)
get_filename_component(default_modules_loc "${CMAKE_SOURCE_DIR}/modules" ABSOLUTE)
if("${cur_modules_loc}" STREQUAL "${default_modules_loc}")
set(test_category "Public")
else()
set(test_category "Extra")
endif()
set_tests_properties(${the_target} PROPERTIES
LABELS "${test_category};Accuracy"
ENVIRONMENT "OPENCV_TEST_DATA_PATH=${OPENCV_TEST_DATA_PATH}")
endif()
else(OCV_DEPENDENCIES_FOUND)
# TODO: warn about unsatisfied dependencies
endif(OCV_DEPENDENCIES_FOUND)
@@ -838,7 +897,7 @@ function(ocv_add_samples)
file(GLOB sample_files "${samples_path}/*")
install(FILES ${sample_files}
DESTINATION ${OPENCV_SAMPLES_SRC_INSTALL_PATH}/${module_id}
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ COMPONENT samples)
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ COMPONENT samples)
endif()
endfunction()
@@ -864,25 +923,28 @@ macro(__ocv_track_module_link_dependencies the_module optkind)
list(REMOVE_AT __mod_depends 0)
if(__dep STREQUAL the_module)
set(__has_cycle TRUE)
else()#if("${OPENCV_MODULES_BUILD}" MATCHES "(^|;)${__dep}(;|$)")
else()
ocv_regex_escape(__rdep "${__dep}")
if(__resolved_deps MATCHES "(^|;)${__rdep}(;|$)")
#all dependencies of this module are already resolved
list(APPEND ${the_module}_MODULE_DEPS_${optkind} "${__dep}")
else()
get_target_property(__module_type ${__dep} TYPE)
if(__module_type STREQUAL "STATIC_LIBRARY")
if(NOT DEFINED ${__dep}_LIB_DEPENDS_${optkind})
ocv_split_libs_list(${__dep}_LIB_DEPENDS ${__dep}_LIB_DEPENDS_DBG ${__dep}_LIB_DEPENDS_OPT)
elseif(TARGET ${__dep})
get_target_property(__dep_imported ${__dep} IMPORTED)
if(__dep_imported)
list(APPEND ${the_module}_EXTRA_DEPS_${optkind} "${__dep}")
else()
get_target_property(__module_type ${__dep} TYPE)
if(__module_type STREQUAL "STATIC_LIBRARY")
if(NOT DEFINED ${__dep}_LIB_DEPENDS_${optkind})
ocv_split_libs_list(${__dep}_LIB_DEPENDS ${__dep}_LIB_DEPENDS_DBG ${__dep}_LIB_DEPENDS_OPT)
endif()
list(INSERT __mod_depends 0 ${${__dep}_LIB_DEPENDS_${optkind}} ${__dep})
list(APPEND __resolved_deps "${__dep}")
endif()
list(INSERT __mod_depends 0 ${${__dep}_LIB_DEPENDS_${optkind}} ${__dep})
list(APPEND __resolved_deps "${__dep}")
elseif(NOT __module_type)
list(APPEND ${the_module}_EXTRA_DEPS_${optkind} "${__dep}")
endif()
else()
list(APPEND ${the_module}_EXTRA_DEPS_${optkind} "${__dep}")
endif()
#else()
# get_target_property(__dep_location "${__dep}" LOCATION)
endif()
endwhile()
@@ -896,7 +958,7 @@ macro(__ocv_track_module_link_dependencies the_module optkind)
list(APPEND ${the_module}_MODULE_DEPS_${optkind} "${the_module}")
endif()
unset(__dep_location)
unset(__dep_imported)
unset(__mod_depends)
unset(__resolved_deps)
unset(__has_cycle)
+37 -12
View File
@@ -41,12 +41,30 @@ MACRO(_PCH_GET_COMPILE_FLAGS _out_compile_flags)
STRING(TOUPPER "CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}" _flags_var_name)
SET(${_out_compile_flags} ${${_flags_var_name}} )
GET_TARGET_PROPERTY(_targetPIC ${_PCH_current_target} POSITION_INDEPENDENT_CODE)
if (_targetPIC AND CMAKE_CXX_COMPILE_OPTIONS_PIC)
LIST(APPEND ${_out_compile_flags} "${CMAKE_CXX_COMPILE_OPTIONS_PIC}")
elseif(CMAKE_COMPILER_IS_GNUCXX)
GET_TARGET_PROPERTY(_targetType ${_PCH_current_target} TYPE)
IF(${_targetType} STREQUAL SHARED_LIBRARY AND NOT WIN32)
LIST(APPEND ${_out_compile_flags} "-fPIC")
ENDIF()
endif()
IF(CMAKE_COMPILER_IS_GNUCXX)
GET_TARGET_PROPERTY(_targetType ${_PCH_current_target} TYPE)
IF(${_targetType} STREQUAL SHARED_LIBRARY AND NOT WIN32)
LIST(APPEND ${_out_compile_flags} "-fPIC")
ENDIF()
GET_PROPERTY(_definitions DIRECTORY PROPERTY COMPILE_DEFINITIONS)
if(_definitions)
foreach(_def ${_definitions})
LIST(APPEND ${_out_compile_flags} "\"-D${_def}\"")
endforeach()
endif()
GET_TARGET_PROPERTY(_target_definitions ${_PCH_current_target} COMPILE_DEFINITIONS)
if(_target_definitions)
foreach(_def ${_target_definitions})
LIST(APPEND ${_out_compile_flags} "\"-D${_def}\"")
endforeach()
endif()
ELSE()
## TODO ... ? or does it work out of the box
@@ -61,11 +79,15 @@ MACRO(_PCH_GET_COMPILE_FLAGS _out_compile_flags)
endif()
ENDFOREACH(item)
GET_DIRECTORY_PROPERTY(_directory_flags DEFINITIONS)
GET_DIRECTORY_PROPERTY(_global_definitions DIRECTORY ${OpenCV_SOURCE_DIR} DEFINITIONS)
#MESSAGE("_directory_flags ${_directory_flags} ${_global_definitions}" )
LIST(APPEND ${_out_compile_flags} ${_directory_flags})
LIST(APPEND ${_out_compile_flags} ${_global_definitions})
get_target_property(DIRINC ${_PCH_current_target} INCLUDE_DIRECTORIES )
FOREACH(item ${DIRINC})
if(item MATCHES "^${OpenCV_SOURCE_DIR}/modules/")
LIST(APPEND ${_out_compile_flags} "${_PCH_include_prefix}\"${item}\"")
else()
LIST(APPEND ${_out_compile_flags} "${_PCH_isystem_prefix}\"${item}\"")
endif()
ENDFOREACH(item)
LIST(APPEND ${_out_compile_flags} ${CMAKE_CXX_FLAGS})
SEPARATE_ARGUMENTS(${_out_compile_flags})
@@ -147,9 +169,9 @@ MACRO(_PCH_GET_TARGET_COMPILE_FLAGS _cflags _header_name _pch_path _dowarn )
# if you have different versions of the headers for different build types
# you may set _pch_dowarn
IF (_dowarn)
SET(${_cflags} "${PCH_ADDITIONAL_COMPILER_FLAGS} -include \"${CMAKE_CURRENT_BINARY_DIR}/${_header_name}\" -Winvalid-pch " )
SET(${_cflags} "${PCH_ADDITIONAL_COMPILER_FLAGS} -Winvalid-pch " )
ELSE (_dowarn)
SET(${_cflags} "${PCH_ADDITIONAL_COMPILER_FLAGS} -include \"${CMAKE_CURRENT_BINARY_DIR}/${_header_name}\" " )
SET(${_cflags} "${PCH_ADDITIONAL_COMPILER_FLAGS} " )
ENDIF (_dowarn)
ELSE(CMAKE_COMPILER_IS_GNUCXX)
@@ -247,12 +269,15 @@ MACRO(ADD_PRECOMPILED_HEADER _targetName _input)
endif()
endif()
get_target_property(DIRINC ${_targetName} INCLUDE_DIRECTORIES)
set_target_properties(${_targetName}_pch_dephelp PROPERTIES INCLUDE_DIRECTORIES "${DIRINC}")
#MESSAGE("_compile_FLAGS: ${_compile_FLAGS}")
#message("COMMAND ${CMAKE_CXX_COMPILER} ${_compile_FLAGS} -x c++-header -o ${_output} ${_input}")
ADD_CUSTOM_COMMAND(
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_name}"
COMMAND ${CMAKE_COMMAND} -E copy "${_input}" "${CMAKE_CURRENT_BINARY_DIR}/${_name}" # ensure same directory! Required by gcc
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${_input}" "${CMAKE_CURRENT_BINARY_DIR}/${_name}" # ensure same directory! Required by gcc
DEPENDS "${_input}"
)
+282 -38
View File
@@ -1,3 +1,6 @@
# Use patched version of CPACK to build accurate set of Debian packages
# https://github.com/asmorkalov/CMake/tree/deb_generator_improvement
if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
set(CPACK_set_DESTDIR "on")
@@ -11,30 +14,39 @@ 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_CONTACT "OpenCV Developers <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}")
if (NOT "${OPENCV_VCSVERSION}" MATCHES "^${OPENCV_VERSION}.*")
message(WARNING "CPACK_PACKAGE_VERSION does not match version provided by version.hpp header!")
endif()
set(OPENCV_DEBIAN_COPYRIGHT_FILE "")
endif(NOT OPENCV_CUSTOM_PACKAGE_INFO)
set(CPACK_STRIP_FILES 1)
#arch
if(X86)
set(CPACK_DEBIAN_ARCHITECTURE "i386")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "i386")
set(CPACK_RPM_PACKAGE_ARCHITECTURE "i686")
elseif(X86_64)
set(CPACK_DEBIAN_ARCHITECTURE "amd64")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
set(CPACK_RPM_PACKAGE_ARCHITECTURE "x86_64")
elseif(ARM)
set(CPACK_DEBIAN_ARCHITECTURE "armhf")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "armhf")
set(CPACK_RPM_PACKAGE_ARCHITECTURE "armhf")
elseif(AARCH64)
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "arm64")
set(CPACK_RPM_PACKAGE_ARCHITECTURE "aarch64")
else()
set(CPACK_DEBIAN_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})
set(CPACK_DEBIAN_PACKAGE_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})
set(OPENCV_PACKAGE_ARCH_SUFFIX ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE})
elseif(CPACK_GENERATOR STREQUAL "RPM")
set(OPENCV_PACKAGE_ARCH_SUFFIX ${CPACK_RPM_PACKAGE_ARCHITECTURE})
else()
@@ -57,54 +69,286 @@ set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
set(CPACK_DEBIAN_PACKAGE_SECTION "libs")
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://opencv.org")
#display names
set(CPACK_COMPONENT_DEV_DISPLAY_NAME "Development files")
set(CPACK_COMPONENT_DOCS_DISPLAY_NAME "Documentation")
set(CPACK_COMPONENT_JAVA_DISPLAY_NAME "Java bindings")
set(CPACK_COMPONENT_LIBS_DISPLAY_NAME "Libraries and data")
set(CPACK_COMPONENT_PYTHON_DISPLAY_NAME "Python bindings")
set(CPACK_COMPONENT_SAMPLES_DISPLAY_NAME "Samples")
set(CPACK_COMPONENT_TESTS_DISPLAY_NAME "Tests")
#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)
set(CPACK_COMPONENT_LIBS_REQUIRED TRUE)
set(CPACK_COMPONENT_SAMPLES_DEPENDS libs dev)
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_DEB_PYTHON_PACKAGE_DEPENDS "python-numpy (>=${PYTHON_NUMPY_VERSION}), python${PYTHON_VERSION_MAJOR_MINOR}")
set(CPACK_COMPONENT_TESTS_DEPENDS libs)
if (HAVE_opencv_python)
set(CPACK_DEB_TESTS_PACKAGE_DEPENDS "python-numpy (>=${PYTHON_NUMPY_VERSION}), python${PYTHON_VERSION_MAJOR_MINOR}")
endif()
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}")
if(CUDA_VERSION VERSION_LESS "6.5")
set(CPACK_DEB_LIBS_PACKAGE_DEPENDS "cuda-core-libs-${cuda_version_suffix}, cuda-extra-libs-${cuda_version_suffix}")
set(CPACK_DEB_DEV_PACKAGE_DEPENDS "cuda-headers-${cuda_version_suffix}")
else()
set(CPACK_DEB_LIBS_PACKAGE_DEPENDS "cuda-cudart-${cuda_version_suffix}, cuda-npp-${cuda_version_suffix}")
set(CPACK_DEB_DEV_PACKAGE_DEPENDS "cuda-cudart-dev-${cuda_version_suffix}, cuda-npp-dev-${cuda_version_suffix}")
if(HAVE_CUFFT)
set(CPACK_DEB_LIBS_PACKAGE_DEPENDS "${CPACK_DEB_LIBS_PACKAGE_DEPENDS}, cuda-cufft-${cuda_version_suffix}")
set(CPACK_DEB_DEV_PACKAGE_DEPENDS "${CPACK_DEB_DEV_PACKAGE_DEPENDS}, cuda-cufft-dev-${cuda_version_suffix}")
endif()
if(HAVE_HAVE_CUBLAS)
set(CPACK_DEB_LIBS_PACKAGE_DEPENDS "${CPACK_DEB_LIBS_PACKAGE_DEPENDS}, cuda-cublas-${cuda_version_suffix}")
set(CPACK_DEB_DEV_PACKAGE_DEPENDS "${CPACK_DEB_DEV_PACKAGE_DEPENDS}, cuda-cublas-dev-${cuda_version_suffix}")
endif()
endif()
endif()
if(HAVE_TBB AND NOT BUILD_TBB)
if(CPACK_DEB_DEV_PACKAGE_DEPENDS)
set(CPACK_DEB_DEV_PACKAGE_DEPENDS "${CPACK_DEB_DEV_PACKAGE_DEPENDS}, libtbb-dev")
else()
set(CPACK_DEB_DEV_PACKAGE_DEPENDS "libtbb-dev")
endif()
endif()
set(STD_OPENCV_LIBS opencv-data)
set(STD_OPENCV_DEV libopencv-dev)
foreach(module calib3d contrib core features2d flann gpu highgui imgproc legacy
ml objdetect ocl photo stitching superres ts video videostab)
if(HAVE_opencv_${module})
list(APPEND STD_OPENCV_LIBS "libopencv-${module}2.4")
list(APPEND STD_OPENCV_DEV "libopencv-${module}-dev")
endif()
endforeach()
list(APPEND STD_OPENCV_DEV "libhighgui-dev" "libcv-dev" "libcvaux-dev")
string(REPLACE ";" ", " CPACK_COMPONENT_LIBS_CONFLICTS "${STD_OPENCV_LIBS}")
string(REPLACE ";" ", " CPACK_COMPONENT_LIBS_PROVIDES "${STD_OPENCV_LIBS}")
string(REPLACE ";" ", " CPACK_COMPONENT_LIBS_REPLACES "${STD_OPENCV_LIBS}")
string(REPLACE ";" ", " CPACK_COMPONENT_DEV_CONFLICTS "${STD_OPENCV_DEV}")
string(REPLACE ";" ", " CPACK_COMPONENT_DEV_PROVIDES "${STD_OPENCV_DEV}")
string(REPLACE ";" ", " CPACK_COMPONENT_DEV_REPLACES "${STD_OPENCV_DEV}")
set(CPACK_COMPONENT_PYTHON_CONFLICTS python-opencv)
set(CPACK_COMPONENT_PYTHON_PROVIDES python-opencv)
set(CPACK_COMPONENT_PYTHON_REPLACES python-opencv)
set(CPACK_COMPONENT_JAVA_CONFLICTS "libopencv2.4-java, libopencv2.4-jni")
set(CPACK_COMPONENT_JAVA_PROVIDES "libopencv2.4-java, libopencv2.4-jni")
set(CPACK_COMPONENT_JAVA_REPLACES "libopencv2.4-java, libopencv2.4-jni")
set(CPACK_COMPONENT_DOCS_CONFLICTS opencv-doc)
set(CPACK_COMPONENT_SAMPLES_CONFLICTS opencv-doc)
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_LIBS_DESCRIPTION "Open Computer Vision Library")
set(CPACK_DEBIAN_COMPONENT_LIBS_NAME "libopencv")
set(CPACK_DEBIAN_COMPONENT_LIBS_SECTION "libs")
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_PYTHON_DESCRIPTION "Python bindings for Open Source Computer Vision Library")
set(CPACK_DEBIAN_COMPONENT_PYTHON_NAME "libopencv-python")
set(CPACK_DEBIAN_COMPONENT_PYTHON_SECTION "python")
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_JAVA_DESCRIPTION "Java bindings for Open Source Computer Vision Library")
set(CPACK_DEBIAN_COMPONENT_JAVA_NAME "libopencv-java")
set(CPACK_DEBIAN_COMPONENT_JAVA_SECTION "java")
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_DEV_DESCRIPTION "Development files for Open Source Computer Vision Library")
set(CPACK_DEBIAN_COMPONENT_DEV_NAME "libopencv-dev")
set(CPACK_DEBIAN_COMPONENT_DEV_SECTION "libdevel")
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_DOCS_DESCRIPTION "Documentation for Open Source Computer Vision Library")
set(CPACK_DEBIAN_COMPONENT_DOCS_NAME "libopencv-docs")
set(CPACK_DEBIAN_COMPONENT_DOCS_SECTION "doc")
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_SAMPLES_DESCRIPTION "Samples for Open Source Computer Vision Library")
set(CPACK_DEBIAN_COMPONENT_SAMPLES_NAME "libopencv-samples")
set(CPACK_DEBIAN_COMPONENT_SAMPLES_SECTION "devel")
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")
set(CPACK_COMPONENT_TESTS_DESCRIPTION "Accuracy and performance tests for Open Source Computer Vision Library")
set(CPACK_DEBIAN_COMPONENT_TESTS_NAME "libopencv-tests")
set(CPACK_DEBIAN_COMPONENT_TESTS_SECTION "misc")
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)
set(CPACK_DEBIAN_COMPONENT_DOCS_ARCHITECTURE "all")
# lintian stuff
#
# ocv_generate_lintian_overrides_file: generates lintian overrides file for
# the specified component (deb-package). It's assumed that <comp>_LINTIAN_OVERRIDES
# variable with suppressed tags is defined.
#
# Usage: ocv_generate_lintian_overrides_file(<component name>)
#
function(ocv_generate_lintian_overrides_file comp)
string(TOUPPER ${comp} comp_upcase)
set(package_name ${CPACK_DEBIAN_COMPONENT_${comp_upcase}_NAME})
set(suppressions ${${comp_upcase}_LINTIAN_OVERRIDES})
if(suppressions)
if(NOT package_name)
message(FATAL_ERROR "Package name for the ${comp} component is not defined")
endif()
# generate content of lintian overrides file
foreach(suppression ${suppressions})
set(line "${package_name}: ${suppression}")
if(content)
set(content "${content}\n${line}")
else()
set(content "${line}")
endif()
endforeach()
# create file and install it
set(cpack_tmp_dir "${CMAKE_BINARY_DIR}/deb-packages-gen/${comp}")
set(overrides_filename "${cpack_tmp_dir}/${package_name}")
file(WRITE "${overrides_filename}" "${content}")
# install generated file
install(FILES "${overrides_filename}"
DESTINATION share/lintian/overrides/
COMPONENT ${comp})
unset(content)
endif()
endfunction()
function(ocv_get_lintian_version version)
find_program(LINTIAN_EXECUTABLE lintian)
if(NOT LINTIAN_EXECUTABLE)
return()
endif()
execute_process(COMMAND ${LINTIAN_EXECUTABLE} --version
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
RESULT_VARIABLE LINTIAN_EXITCODE
OUTPUT_VARIABLE LINTIAN_VERSION
ERROR_QUIET)
if(NOT LINTIAN_EXITCODE EQUAL 0)
return()
endif()
if(LINTIAN_VERSION MATCHES "([0-9]+\\.[0-9]+\\.[0-9]+)")
set(LINTIAN_VERSION "${CMAKE_MATCH_1}" CACHE INTERNAL "Lintian version")
endif()
set("${version}" "${LINTIAN_VERSION}" PARENT_SCOPE)
endfunction()
ocv_get_lintian_version(LINTIAN_VERSION)
set(LIBS_LINTIAN_OVERRIDES "binary-or-shlib-defines-rpath" # usr/lib/libopencv_core.so.2.4.12
"package-name-doesnt-match-sonames") # libopencv-calib3d2.4 libopencv-contrib2.4
if(HAVE_opencv_python)
set(PYTHON_LINTIAN_OVERRIDES "binary-or-shlib-defines-rpath" # usr/lib/python2.7/dist-packages/cv2.so
"missing-dependency-on-numpy-abi")
else()
set(PYTHON_LINTIAN_OVERRIDES "empty-binary-package") # python module is off
endif()
if(NOT HAVE_opencv_java)
set(JAVA_LINTIAN_OVERRIDES "empty-binary-package") # Java is off
else()
# TODO: add smht here
endif()
set(DEV_LINTIAN_OVERRIDES "binary-or-shlib-defines-rpath" # usr/bin/opencv_traincascade
"binary-without-manpage") # usr/bin/opencv_traincascade
if(LINTIAN_VERSION VERSION_GREATER "2.5.30" OR
LINTIAN_VERSION VERSION_EQUAL "2.5.30")
list(APPEND DEV_LINTIAN_OVERRIDES "pkg-config-bad-directive") # usr/lib/pkgconfig/opencv.pc -L/usr/local/cuda-7.0/lib64
endif()
if(NOT INSTALL_C_EXAMPLES)
set(SAMPLES_LINTIAN_OVERRIDES "empty-binary-package") # samples are not installed
endif()
if(INSTALL_TESTS)
set(TESTS_LINTIAN_OVERRIDES "arch-dependent-file-in-usr-share" # usr/share/OpenCV/bin/opencv_test_ml
"binary-or-shlib-defines-rpath" # usr/share/OpenCV/bin/opencv_test_ml
"python-script-but-no-python-dep") # usr/share/OpenCV/bin/calchist.py
else()
set(TESTS_LINTIAN_OVERRIDES "empty-binary-package") # there is no tests
endif()
set(ALL_COMPONENTS "libs" "dev" "docs" "python" "java" "samples" "tests")
foreach (comp ${ALL_COMPONENTS})
string(TOUPPER ${comp} comp_upcase)
list(APPEND ${comp_upcase}_LINTIAN_OVERRIDES "misplaced-extra-member-in-deb") # for signed packages
endforeach()
if(CPACK_GENERATOR STREQUAL "DEB")
find_program(GZIP_TOOL NAMES "gzip" PATHS "/bin" "/usr/bin" "/usr/local/bin")
if(NOT GZIP_TOOL)
message(FATAL_ERROR "Unable to find 'gzip' program")
endif()
execute_process(COMMAND "date" "-R"
OUTPUT_VARIABLE CHANGELOG_PACKAGE_DATE
OUTPUT_STRIP_TRAILING_WHITESPACE)
set(CHANGELOG_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}")
foreach (comp ${ALL_COMPONENTS})
string(TOUPPER "${comp}" comp_upcase)
set(DEBIAN_CHANGELOG_OUT_FILE "${CMAKE_BINARY_DIR}/deb-packages-gen/${comp}/changelog.Debian")
set(DEBIAN_CHANGELOG_OUT_FILE_GZ "${CMAKE_BINARY_DIR}/deb-packages-gen/${comp}/changelog.Debian.gz")
set(CHANGELOG_PACKAGE_NAME "${CPACK_DEBIAN_COMPONENT_${comp_upcase}_NAME}")
configure_file("${CMAKE_SOURCE_DIR}/cmake/templates/changelog.Debian.in" "${DEBIAN_CHANGELOG_OUT_FILE}" @ONLY)
execute_process(COMMAND "${GZIP_TOOL}" "-cf9" "${DEBIAN_CHANGELOG_OUT_FILE}"
OUTPUT_FILE "${DEBIAN_CHANGELOG_OUT_FILE_GZ}"
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}")
install(FILES "${DEBIAN_CHANGELOG_OUT_FILE_GZ}"
DESTINATION "share/doc/${CPACK_DEBIAN_COMPONENT_${comp_upcase}_NAME}"
COMPONENT "${comp}")
set(CHANGELOG_OUT_FILE "${CMAKE_BINARY_DIR}/deb-packages-gen/${comp}/changelog")
set(CHANGELOG_OUT_FILE_GZ "${CMAKE_BINARY_DIR}/deb-packages-gen/${comp}/changelog.gz")
file(WRITE ${CHANGELOG_OUT_FILE} "Upstream changelog stub. See https://github.com/Itseez/opencv/wiki/ChangeLog")
execute_process(COMMAND "${GZIP_TOOL}" "-cf9" "${CHANGELOG_OUT_FILE}"
OUTPUT_FILE "${CHANGELOG_OUT_FILE_GZ}"
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}")
install(FILES "${CHANGELOG_OUT_FILE_GZ}"
DESTINATION "share/doc/${CPACK_DEBIAN_COMPONENT_${comp_upcase}_NAME}"
COMPONENT "${comp}")
if(OPENCV_DEBIAN_COPYRIGHT_FILE)
install(FILES "${OPENCV_DEBIAN_COPYRIGHT_FILE}"
DESTINATION "share/doc/${CPACK_DEBIAN_COMPONENT_${comp_upcase}_NAME}"
COMPONENT "${comp}")
endif()
ocv_generate_lintian_overrides_file("${comp}")
endforeach()
endif()
include(CPack)
ENDif(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
ENDif(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
+40 -11
View File
@@ -200,12 +200,12 @@ macro(OCV_OPTION variable description value)
endif()
endforeach()
unset(__varname)
if("${__condition}" STREQUAL "")
if(__condition STREQUAL "")
set(__condition 2 GREATER 1)
endif()
if(${__condition})
if("${__value}" MATCHES ";")
if(__value MATCHES ";")
if(${__value})
option(${variable} "${description}" ON)
else()
@@ -449,18 +449,29 @@ endmacro()
# convert list of paths to libraries names without lib prefix
macro(ocv_convert_to_lib_name var)
set(__tmp "")
function(ocv_convert_to_lib_name var)
set(tmp "")
foreach(path ${ARGN})
get_filename_component(__tmp_name "${path}" NAME_WE)
string(REGEX REPLACE "^lib" "" __tmp_name ${__tmp_name})
list(APPEND __tmp "${__tmp_name}")
get_filename_component(tmp_name "${path}" NAME_WE)
string(REGEX REPLACE "^lib" "" tmp_name "${tmp_name}")
list(APPEND tmp "${tmp_name}")
endforeach()
set(${var} ${__tmp})
unset(__tmp)
unset(__tmp_name)
endmacro()
set(${var} ${tmp} PARENT_SCOPE)
endfunction()
# create imported targets for a list of external libraries
function(ocv_create_imported_targets var)
set(target_list "")
foreach(library ${ARGN})
ocv_convert_to_lib_name(libname "${library}")
add_library("opencv_dep_${libname}" UNKNOWN IMPORTED)
set_target_properties("opencv_dep_${libname}" PROPERTIES IMPORTED_LOCATION "${library}")
list(APPEND target_list "opencv_dep_${libname}")
endforeach()
set("${var}" "${target_list}" PARENT_SCOPE)
endfunction()
# add install command
function(ocv_install_target)
@@ -619,3 +630,21 @@ function(ocv_source_group group)
file(GLOB srcs ${OCV_SOURCE_GROUP_GLOB})
source_group(${group} FILES ${srcs})
endfunction()
# build the list of simple dependencies, that links via "-l"
# _all_libs - name of variable with input list
# _simple - name of variable with output list of simple libs
# _other - name of variable with _all_libs - _simple
macro(ocv_extract_simple_libs _all_libs _simple _other)
set(${_simple} "")
set(${_other} "")
foreach(_l ${${_all_libs}})
if(TARGET ${_l})
list(APPEND ${_other} ${_l})
elseif(EXISTS "${_l}")
list(APPEND ${_other} ${_l})
else()
list(APPEND ${_simple} ${_l})
endif()
endforeach()
endmacro()
+28 -3
View File
@@ -31,7 +31,16 @@ ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
endif
OPENCV_DYNAMICUDA_MODULE:=@OPENCV_DYNAMICUDA_MODULE_CONFIGMAKE@
else
OPENCV_DYNAMICUDA_MODULE:=
ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
ifeq ($(OPENCV_HAVE_GPU_MODULE),on)
ifneq ($(CUDA_TOOLKIT_DIR),)
OPENCV_USE_GPU_MODULE:=on
endif
endif
OPENCV_DYNAMICUDA_MODULE:=@OPENCV_DYNAMICUDA_MODULE_CONFIGMAKE@
else
OPENCV_DYNAMICUDA_MODULE:=
endif
endif
CUDA_RUNTIME_LIBS:=@CUDA_RUNTIME_LIBS_CONFIGMAKE@
@@ -56,6 +65,10 @@ else
OPENCV_3RDPARTY_COMPONENTS:=@OPENCV_3RDPARTY_COMPONENTS_CONFIGMAKE@
OPENCV_EXTRA_COMPONENTS:=@OPENCV_EXTRA_COMPONENTS_CONFIGMAKE@
endif
ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
OPENCV_3RDPARTY_COMPONENTS:=@OPENCV_3RDPARTY_COMPONENTS_CONFIGMAKE@
OPENCV_EXTRA_COMPONENTS:=@OPENCV_EXTRA_COMPONENTS_CONFIGMAKE@
endif
ifeq ($(TARGET_ARCH_ABI),x86)
OPENCV_3RDPARTY_COMPONENTS:=@OPENCV_3RDPARTY_COMPONENTS_CONFIGMAKE@
OPENCV_EXTRA_COMPONENTS:=@OPENCV_EXTRA_COMPONENTS_CONFIGMAKE@
@@ -77,6 +90,9 @@ ifeq ($(OPENCV_CAMERA_MODULES),on)
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
OPENCV_CAMERA_MODULES:=@OPENCV_CAMERA_LIBS_ARMEABI_V7A_CONFIGCMAKE@
endif
ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
OPENCV_CAMERA_MODULES:=@OPENCV_CAMERA_LIBS_ARM64_V8A_CONFIGCMAKE@
endif
ifeq ($(TARGET_ARCH_ABI),x86)
OPENCV_CAMERA_MODULES:=@OPENCV_CAMERA_LIBS_X86_CONFIGCMAKE@
endif
@@ -101,10 +117,18 @@ define add_opencv_module
include $(PREBUILT_$(OPENCV_LIB_TYPE)_LIBRARY)
endef
ifndef CUDA_LIBS_DIR
ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
CUDA_LIBS_DIR := $(CUDA_TOOLKIT_DIR)/targets/aarch64-linux-androideabi/lib
else
CUDA_LIBS_DIR := $(CUDA_TOOLKIT_DIR)/targets/armv7-linux-androideabi/lib
endif
endif
define add_cuda_module
include $(CLEAR_VARS)
LOCAL_MODULE:=$1
LOCAL_SRC_FILES:=$(CUDA_TOOLKIT_DIR)/targets/armv7-linux-androideabi/lib/lib$1.so
LOCAL_SRC_FILES:=$(CUDA_LIBS_DIR)/lib$(1:opencv_dep_%=%).so
include $(PREBUILT_SHARED_LIBRARY)
endef
@@ -202,7 +226,8 @@ ifeq ($(OPENCV_USE_GPU_MODULE),on)
ifeq ($(INSTALL_CUDA_LIBRARIES),on)
LOCAL_SHARED_LIBRARIES += $(foreach mod, $(CUDA_RUNTIME_LIBS), $(mod))
else
LOCAL_LDLIBS += -L$(CUDA_TOOLKIT_DIR)/targets/armv7-linux-androideabi/lib $(foreach lib, $(CUDA_RUNTIME_LIBS), -l$(lib))
LOCAL_LDLIBS += -L$(CUDA_LIBS_DIR) \
$(foreach lib, $(CUDA_RUNTIME_LIBS), -l$(lib:opencv_dep_%=%))
endif
LOCAL_STATIC_LIBRARIES+=libopencv_gpu
endif
+69 -47
View File
@@ -37,6 +37,21 @@
#
# ===================================================================================
# Search packages for host system instead of packages for target system.
# in case of cross compilation thess macro should be defined by toolchain file
if(NOT COMMAND find_host_package)
macro(find_host_package)
find_package(${ARGN})
endmacro()
endif()
if(NOT COMMAND find_host_program)
macro(find_host_program)
find_program(${ARGN})
endmacro()
endif()
if(NOT DEFINED OpenCV_MODULES_SUFFIX)
if(ANDROID)
string(REPLACE - _ OpenCV_MODULES_SUFFIX "_${ANDROID_NDK_ABI_NAME}")
@@ -46,6 +61,13 @@ if(NOT DEFINED OpenCV_MODULES_SUFFIX)
endif()
if(NOT TARGET opencv_core)
# Extract directory name from full path of the file currently being processed.
# Note that CMake 2.8.3 introduced CMAKE_CURRENT_LIST_DIR. We reimplement it
# for older versions of CMake to support these as well.
if(CMAKE_VERSION VERSION_LESS "2.8.3")
get_filename_component(CMAKE_CURRENT_LIST_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
endif()
include(${CMAKE_CURRENT_LIST_DIR}/OpenCVModules${OpenCV_MODULES_SUFFIX}.cmake)
endif()
@@ -212,55 +234,55 @@ endif()
foreach(__opttype OPT DBG)
SET(OpenCV_LIBS_${__opttype} "${OpenCV_LIBS}")
SET(OpenCV_EXTRA_LIBS_${__opttype} "")
# CUDA
if(OpenCV_CUDA_VERSION)
if(NOT CUDA_FOUND)
find_package(CUDA ${OpenCV_CUDA_VERSION} EXACT REQUIRED)
else()
if(NOT CUDA_VERSION_STRING VERSION_EQUAL OpenCV_CUDA_VERSION)
message(FATAL_ERROR "OpenCV static library was compiled with CUDA ${OpenCV_CUDA_VERSION} support. Please, use the same version or rebuild OpenCV with CUDA ${CUDA_VERSION_STRING}")
endif()
endif()
set(OpenCV_CUDA_LIBS_ABSPATH ${CUDA_LIBRARIES})
if(${CUDA_VERSION} VERSION_LESS "5.5")
list(APPEND OpenCV_CUDA_LIBS_ABSPATH ${CUDA_npp_LIBRARY})
else()
find_cuda_helper_libs(nppc)
find_cuda_helper_libs(nppi)
find_cuda_helper_libs(npps)
list(APPEND OpenCV_CUDA_LIBS_ABSPATH ${CUDA_nppc_LIBRARY} ${CUDA_nppi_LIBRARY} ${CUDA_npps_LIBRARY})
endif()
if(OpenCV_USE_CUBLAS)
list(APPEND OpenCV_CUDA_LIBS_ABSPATH ${CUDA_CUBLAS_LIBRARIES})
endif()
if(OpenCV_USE_CUFFT)
list(APPEND OpenCV_CUDA_LIBS_ABSPATH ${CUDA_CUFFT_LIBRARIES})
endif()
if(OpenCV_USE_NVCUVID)
list(APPEND OpenCV_CUDA_LIBS_ABSPATH ${CUDA_nvcuvid_LIBRARIES})
endif()
if(WIN32)
list(APPEND OpenCV_CUDA_LIBS_ABSPATH ${CUDA_nvcuvenc_LIBRARIES})
endif()
set(OpenCV_CUDA_LIBS_RELPATH "")
foreach(l ${OpenCV_CUDA_LIBS_ABSPATH})
get_filename_component(_tmp ${l} PATH)
list(APPEND OpenCV_CUDA_LIBS_RELPATH ${_tmp})
endforeach()
list(REMOVE_DUPLICATES OpenCV_CUDA_LIBS_RELPATH)
link_directories(${OpenCV_CUDA_LIBS_RELPATH})
endif()
endforeach()
# Configure CUDA targets
if(OpenCV_CUDA_VERSION)
if(NOT CUDA_FOUND)
find_host_package(CUDA ${OpenCV_CUDA_VERSION} EXACT REQUIRED)
else()
if(NOT CUDA_VERSION_STRING VERSION_EQUAL OpenCV_CUDA_VERSION)
message(FATAL_ERROR "OpenCV static library was compiled with CUDA ${OpenCV_CUDA_VERSION} support. Please, use the same version or rebuild OpenCV with CUDA ${CUDA_VERSION_STRING}")
endif()
endif()
set(OpenCV_CUDA_LIBS_ABSPATH ${CUDA_LIBRARIES})
if(${CUDA_VERSION} VERSION_LESS "5.5")
list(APPEND OpenCV_CUDA_LIBS_ABSPATH ${CUDA_npp_LIBRARY})
else()
find_cuda_helper_libs(nppc)
find_cuda_helper_libs(nppi)
find_cuda_helper_libs(npps)
list(APPEND OpenCV_CUDA_LIBS_ABSPATH ${CUDA_nppc_LIBRARY} ${CUDA_nppi_LIBRARY} ${CUDA_npps_LIBRARY})
endif()
if(OpenCV_USE_CUBLAS)
list(APPEND OpenCV_CUDA_LIBS_ABSPATH ${CUDA_CUBLAS_LIBRARIES})
endif()
if(OpenCV_USE_CUFFT)
list(APPEND OpenCV_CUDA_LIBS_ABSPATH ${CUDA_CUFFT_LIBRARIES})
endif()
if(OpenCV_USE_NVCUVID)
list(APPEND OpenCV_CUDA_LIBS_ABSPATH ${CUDA_nvcuvid_LIBRARIES})
endif()
if(WIN32)
list(APPEND OpenCV_CUDA_LIBS_ABSPATH ${CUDA_nvcuvenc_LIBRARIES})
endif()
foreach(l ${OpenCV_CUDA_LIBS_ABSPATH})
get_filename_component(_tmp "${l}" NAME_WE)
string(REGEX REPLACE "^lib" "" _tmp "${_tmp}")
if(NOT TARGET "opencv_dep_${_tmp}") # protect against repeated inclusions
add_library("opencv_dep_${_tmp}" UNKNOWN IMPORTED)
set_target_properties("opencv_dep_${_tmp}" PROPERTIES IMPORTED_LOCATION "${l}")
endif()
endforeach()
endif()
# ==============================================================
# Android camera helper macro
# ==============================================================
+5
View File
@@ -0,0 +1,5 @@
@CHANGELOG_PACKAGE_NAME@ (@CPACK_PACKAGE_VERSION@) unstable; urgency=low
* Debian changelog stub. See https://github.com/Itseez/opencv/wiki/ChangeLog
or release notes in user
documentation for more details.
-- @CPACK_PACKAGE_CONTACT@ @CHANGELOG_PACKAGE_DATE@
+43
View File
@@ -0,0 +1,43 @@
Format: http://dep.debian.net/deps/dep5
Files: *
Copyright: 2000-2015, Intel Corporation
2009-2011, Willow Garage Inc.
2009-2015, NVIDIA Corporation
2010-2013, Advanced Micro Devices, Inc.
2015, OpenCV Foundation
2015, Itseez Inc.
License: BSD-3-clause
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
(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:
.
\* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
.
\* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
.
\* 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 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
and on any theory of liability, whether in contract, strict liability,
or tort (including negligence or otherwise) arising in any way out of
the use of this software, even if advised of the possibility of such damage.
+3
View File
@@ -109,6 +109,9 @@
/* NVidia Video Decoding API*/
#cmakedefine HAVE_NVCUVID
/* NVidia Video Encoding API*/
#cmakedefine HAVE_NVCUVENC
/* OpenCL Support */
#cmakedefine HAVE_OPENCL
#cmakedefine HAVE_OPENCL_STATIC
@@ -18,11 +18,14 @@ if [ -z `which adb` ]; then
return 1
fi
accuracy=`find "$OPENCV_TEST_PATH/$TARGET_ARCH" -maxdepth 1 -executable -name "opencv_test_*" -not -name opencv_test_ocl`
performance=`find "$OPENCV_TEST_PATH/$TARGET_ARCH" -maxdepth 1 -executable -name "opencv_perf_*" -not -name opencv_perf_ocl`
adb push $OPENCV_TEST_DATA_PATH /sdcard/opencv_testdata
adb shell "mkdir -p /data/local/tmp/opencv_test"
SUMMARY_STATUS=0
for t in "$OPENCV_TEST_PATH/$TARGET_ARCH/"opencv_test_* "$OPENCV_TEST_PATH/$TARGET_ARCH/"opencv_perf_*;
for t in $accuracy $performance;
do
test_name=`basename "$t"`
report="$test_name-`date --rfc-3339=date`.xml"
+134 -10
View File
@@ -1,25 +1,149 @@
#!/bin/sh
#!/bin/bash
# Usage info
usage()
{
cat << EOF
usage: $0 [options]
This script runs the OpenCV tests on linux device.
OPTIONS:
-h Show this message
-c Color output
EOF
}
# Parse options
COLOR_OUTPUT=0
while getopts “hc” OPTION
do
case $OPTION in
h)
usage
exit 0
;;
c)
COLOR_OUTPUT=1
;;
?)
usage
exit 1
;;
esac
done
# Text style
if [ $COLOR_OUTPUT -eq 1 ]; then
TEXT_RED="$(tput setaf 1)"
TEXT_GREEN="$(tput setaf 2)"
TEXT_CYAN="$(tput setaf 6)"
TEXT_RESET="$(tput sgr0)"
else
TEXT_RED=""
TEXT_GREEN=""
TEXT_CYAN=""
TEXT_RESET=""
fi
# Test binaries and data paths
OPENCV_TEST_PATH=@CMAKE_INSTALL_PREFIX@/@OPENCV_TEST_INSTALL_PATH@
OPENCV_PYTHON_TESTS=@OPENCV_PYTHON_TESTS_LIST@
export OPENCV_TEST_DATA_PATH=@CMAKE_INSTALL_PREFIX@/share/OpenCV/testdata
CUR_DIR=`pwd`
if [ -d "$CUR_DIR" -a -w "$CUR_DIR" ]; then
echo "${TEXT_CYAN}CUR_DIR : $CUR_DIR${TEXT_RESET}"
else
echo "${TEXT_RED}Error: Do not have permissions to write to $CUR_DIR${TEXT_RESET}"
echo "${TEXT_RED}Please run the script from directory with write access${TEXT_RESET}"
exit 1
fi
# Run tests
SUMMARY_STATUS=0
FAILED_TESTS=""
PASSED_TESTS=""
for t in "$OPENCV_TEST_PATH/"opencv_test_* "$OPENCV_TEST_PATH/"opencv_perf_*;
do
report="`basename "$t"`-`date --rfc-3339=date`.xml"
"$t" --perf_min_samples=1 --perf_force_samples=1 --gtest_output=xml:"$report"
TEST_STATUS=$?
if [ $TEST_STATUS -ne 0 ]; then
SUMMARY_STATUS=$TEST_STATUS
fi
test_name=`basename "$t"`
cmd="$t --perf_min_samples=1 --perf_force_samples=1 --gtest_output=xml:$test_name.xml"
seg_reg="s/^/${TEXT_CYAN}[$test_name]${TEXT_RESET} /" # append test name
if [ $COLOR_OUTPUT -eq 1 ]; then
seg_reg="${seg_reg};s/\[==========\]/${TEXT_GREEN}&${TEXT_RESET}/g" # green for [==========]
seg_reg="${seg_reg};s/\[----------\]/${TEXT_GREEN}&${TEXT_RESET}/g" # green for [----------]
seg_reg="${seg_reg};s/\[ RUN \]/${TEXT_GREEN}&${TEXT_RESET}/g" # green for [ RUN ]
seg_reg="${seg_reg};s/\[ OK \]/${TEXT_GREEN}&${TEXT_RESET}/g" # green for [ OK ]
seg_reg="${seg_reg};s/\[ FAILED \]/${TEXT_RED}&${TEXT_RESET}/g" # red for [ FAILED ]
seg_reg="${seg_reg};s/\[ PASSED \]/${TEXT_GREEN}&${TEXT_RESET}/g" # green for [ PASSED ]
fi
echo "${TEXT_CYAN}[$test_name]${TEXT_RESET} RUN : $cmd"
eval "$cmd" | tee "$test_name.log" | sed -r "$seg_reg"
ret=${PIPESTATUS[0]}
echo "${TEXT_CYAN}[$test_name]${TEXT_RESET} RETURN_CODE : $ret"
if [ $ret -ne 0 ]; then
echo "${TEXT_CYAN}[$test_name]${TEXT_RESET} ${TEXT_RED}FAILED${TEXT_RESET}"
SUMMARY_STATUS=1
FAILED_TESTS="$FAILED_TESTS $test_name"
else
echo "${TEXT_CYAN}[$test_name]${TEXT_RESET} ${TEXT_GREEN}OK${TEXT_RESET}"
PASSED_TESTS="$PASSED_TESTS $test_name"
fi
echo ""
done
for t in $OPENCV_PYTHON_TESTS;
do
test_name=`basename "$t"`
cmd="python \"$OPENCV_TEST_PATH\"/$t -v"
seg_reg="s/^/${TEXT_CYAN}[$test_name]${TEXT_RESET} /" # append test name
echo "${TEXT_CYAN}[$test_name]${TEXT_RESET} RUN : $cmd"
eval "$cmd" | tee "$test_name.log" | sed -r "$seg_reg"
ret=${PIPESTATUS[0]}
echo "${TEXT_CYAN}[$test_name]${TEXT_RESET} RETURN_CODE : $ret"
if [ $ret -ne 0 ]; then
echo "${TEXT_CYAN}[$test_name]${TEXT_RESET} ${TEXT_RED}FAILED${TEXT_RESET}"
SUMMARY_STATUS=1
FAILED_TESTS="$FAILED_TESTS $test_name"
else
echo "${TEXT_CYAN}[$test_name]${TEXT_RESET} ${TEXT_GREEN}OK${TEXT_RESET}"
PASSED_TESTS="$PASSED_TESTS $test_name"
fi
echo ""
done
# Remove temporary test files
rm -f /tmp/__opencv_temp.*
# Report final status
echo "${TEXT_CYAN}===============================================================${TEXT_RESET}"
echo "${TEXT_CYAN}PASSED TESTS : $PASSED_TESTS${TEXT_RESET}"
echo "${TEXT_CYAN}FAILED TESTS : $FAILED_TESTS${TEXT_RESET}"
if [ $SUMMARY_STATUS -eq 0 ]; then
echo "All OpenCV tests finished successfully"
echo "${TEXT_GREEN}STATUS : OK${TEXT_RESET}"
echo "${TEXT_GREEN}STATUS : All OpenCV tests finished successfully${TEXT_RESET}"
else
echo "OpenCV tests finished with status $SUMMARY_STATUS"
echo "${TEXT_RED}STATUS : FAIL${TEXT_RESET}"
echo "${TEXT_RED}STATUS : OpenCV tests finished with status $SUMMARY_STATUS${TEXT_RESET}"
fi
return $SUMMARY_STATUS
exit $SUMMARY_STATUS
@@ -0,0 +1,74 @@
@echo OFF
setlocal ENABLEDELAYEDEXPANSION
rem Process command line
rem This script is designed to allow situations when the tests are installed in
rem a different directory from the library.
set OPENCV_DIR=%~1
if "%OPENCV_DIR%" == "" (
echo>&2 This script runs the OpenCV tests on Windows.
echo>&2
echo>&2 usage: %0 ^<OpenCV install directory^>
exit /B 1
)
if NOT EXIST "%OPENCV_DIR%" (
echo>&2 error: "%OPENCV_DIR%" doesn't exist
)
rem Set up paths
set PATH=%OPENCV_DIR%\@OPENCV_BIN_INSTALL_PATH@;%PATH%
set OPENCV_TEST_PATH=%~dp0
set OPENCV_TEST_DATA_PATH=%OPENCV_TEST_PATH%\..\testdata
rem Run tests
set SUMMARY_STATUS=0
set FAILED_TESTS=
set PASSED_TESTS=
for %%t IN ("%OPENCV_TEST_PATH%\opencv_test_*.exe" "%OPENCV_TEST_PATH%\opencv_perf_*.exe") DO (
set test_name=%%~nt
set report=!test_name!.xml
set cmd="%%t" --perf_min_samples=1 --perf_force_samples=1 "--gtest_output=xml:!report!"
echo [!test_name!] RUN : !cmd!
!cmd!
set ret=!errorlevel!
echo [!test_name!] RETURN_CODE : !ret!
if !ret! EQU 0 (
echo [!test_name!] OK
set PASSED_TESTS=!PASSED_TESTS! !test_name!
) ELSE (
echo [!test_name!] FAILED
set SUMMARY_STATUS=1
set FAILED_TESTS=!FAILED_TESTS! !test_name!
)
echo.
)
rem Remove temporary test files
del /F /Q "%TMP%\ocv*.tmp*"
rem Report final status
echo ===============================================================
echo PASSED TESTS : %PASSED_TESTS%
echo FAILED TESTS : %FAILED_TESTS%
if %SUMMARY_STATUS% EQU 0 (
echo STATUS : OK
echo STATUS : All OpenCV tests finished successfully
) ELSE (
echo STATUS : FAIL
echo STATUS : OpenCV tests finished with status %SUMMARY_STATUS%
)
exit /B %SUMMARY_STATUS%
-2
View File
@@ -1,2 +0,0 @@
# Environment setup for OpenCV testing
export OPENCV_TEST_DATA_PATH=@CMAKE_INSTALL_PREFIX@/share/OpenCV/testdata
+34 -2
View File
@@ -4,7 +4,7 @@ file(GLOB LBP_CASCADES lbpcascades/*.xml)
if(ANDROID)
install(FILES ${HAAR_CASCADES} DESTINATION sdk/etc/haarcascades COMPONENT libs)
install(FILES ${LBP_CASCADES} DESTINATION sdk/etc/lbpcascades COMPONENT libs)
elseif(NOT WIN32)
else()
install(FILES ${HAAR_CASCADES} DESTINATION share/OpenCV/haarcascades COMPONENT libs)
install(FILES ${LBP_CASCADES} DESTINATION share/OpenCV/lbpcascades COMPONENT libs)
endif()
@@ -12,11 +12,43 @@ 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)
else()
# CPack does not set correct permissions by default, so we do it explicitly.
install(DIRECTORY ${OPENCV_TEST_DATA_PATH}
DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
DESTINATION share/OpenCV/testdata COMPONENT tests)
if(BUILD_opencv_python)
file(GLOB DATAFILES_CPP ../samples/cpp/left*.jpg)
list(APPEND DATAFILES_CPP
"../samples/cpp/board.jpg"
"../samples/cpp/pic1.png"
"../samples/cpp/pic6.png"
"../samples/cpp/right01.jpg"
"../samples/cpp/right02.jpg"
"../samples/cpp/building.jpg"
"../samples/cpp/tsukuba_l.png"
"../samples/cpp/tsukuba_r.png"
"../samples/cpp/letter-recognition.data")
install(FILES ${DATAFILES_CPP} DESTINATION share/OpenCV/testdata/samples/cpp COMPONENT tests)
set(DATAFILES_C
"../samples/c/lena.jpg"
"../samples/c/box.png")
install(FILES ${DATAFILES_C} DESTINATION share/OpenCV/testdata/samples/c COMPONENT tests)
set(DATAFILES_GPU
"../samples/gpu/basketball1.png"
"../samples/gpu/basketball2.png"
"../samples/gpu/rubberwhale1.png")
install(FILES ${DATAFILES_GPU} DESTINATION share/OpenCV/testdata/samples/gpu COMPONENT tests)
set(DATAFILES_PYTHON
"../samples/python2/data/graf1.png"
"../samples/python2/data/pca_test1.jpg"
"../samples/python2/data/digits.png")
install(FILES ${DATAFILES_PYTHON} DESTINATION share/OpenCV/testdata/samples/python2/data COMPONENT tests)
set(DATAFILES_CASCADES
"haarcascades/haarcascade_frontalface_alt.xml"
"haarcascades/haarcascade_eye.xml")
install(FILES ${DATAFILES_CASCADES} DESTINATION share/OpenCV/testdata/data/haarcascades COMPONENT tests)
endif()
endif()
endif()
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+7 -7
View File
@@ -1,11 +1,11 @@
<!--
This is 20x34 detector of profile faces using LBP features.
It was created by Attila Novak during GSoC 2012.
Note that the detector only detects faces rotated to the right,
so you may want to run it on the original and on
the flipped image to detect different profile faces.
-->
<?xml version="1.0"?>
<!--
This is 20x34 detector of profile faces using LBP features.
It was created by Attila Novak during GSoC 2012.
Note that the detector only detects faces rotated to the right,
so you may want to run it on the original and on
the flipped image to detect different profile faces.
-->
<opencv_storage>
<cascade>
<stageType>BOOST</stageType>

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