1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-25 13:23:02 +04:00

Compare commits

...

330 Commits

Author SHA1 Message Date
Maksim Shabunin c12243cf4f Version for 3.0.0 release 2015-06-03 20:21:34 +03:00
Maksim Shabunin 39fdcf4df3 Merge pull request #4083 from mshabunin:java-engine 2015-06-03 17:17:36 +00:00
Maksim Shabunin fd1b30fc6f Merge pull request #4089 from alalek:video_mp4 2015-06-03 17:16:52 +00:00
Maksim Shabunin 7ee79b73f6 AndroidMgr: fixed package build 2015-06-03 19:01:48 +03:00
Alexander Alekhin 1f3043f618 videoio: VideoWriter H264/.mp4 support via ffmpeg/libav 2015-06-03 18:35:12 +03:00
Maksim Shabunin 1d7d22e117 AndroidMgr: fixed library version check 2015-06-03 12:47:42 +03:00
Maksim Shabunin 33ab9ea188 AndroidMgr: fixed typos and package name 2015-06-03 11:53:29 +03:00
Vadim Pisarevsky 8ad6ba82fc Merge pull request #4084 from berak:patch-2 2015-06-03 07:25:51 +00:00
berak 737a1e2f12 http://code.opencv.org/issues/4359, for master 2015-06-03 07:44:46 +02:00
Vadim Pisarevsky 850e3c1ca2 Merge pull request #4082 from diogorolo:patch-1 2015-06-02 19:11:54 +00:00
Maksim Shabunin 7541c590e5 AndroidMgr: Reversed file existence checking 2015-06-02 18:34:30 +03:00
Maksim Shabunin caffbaafbe Updated Manager for Android 2015-06-02 17:33:04 +03:00
Diogo Rolo f57fb2375e Update cuda.markdown
Small typo fix in the documentation.
It was written 'devie' instead of 'device' in: 'Switching active device can be done using cuda::setDevice() function'
2015-06-02 14:34:15 +01:00
Vadim Pisarevsky a28c8d002d Merge pull request #4081 from vpisarev:30_small_fixes 2015-06-02 08:36:03 +00:00
Vadim Pisarevsky a4073ed676 made improvements in ECC code (comments from https://github.com/Itseez/opencv/pull/3845), as well as minor tweak in pthread's based parallel for. 2015-06-02 01:30:00 +03:00
Vadim Pisarevsky 78e07d3210 Merge pull request #3845 from ellbur:findTransformECC-mask 2015-06-01 20:35:29 +00:00
Vadim Pisarevsky 41af58d1d5 Merge pull request #4076 from kalistratovag:parallel_pthreads 2015-06-01 16:53:50 +00:00
kalistratovag bf5393ae58 parallel for on pthreads initial commit
removing trailing whitespaces

Compilation error on Mac fix & warning on android

Warnings fixed on iOs
2015-06-01 17:48:21 +03:00
Vadim Pisarevsky b866e2672a Merge pull request #4079 from Dikay900:2_4_to_master 2015-06-01 11:42:18 +00:00
Alexander Smorkalov 1df0f1da97 Precise default CUDA version for Tegra X1 chips. 2015-05-30 23:30:56 +02:00
Vadim Pisarevsky 535dc1e874 Merge pull request #3998 from msandler:master 2015-05-29 21:38:09 +00:00
Vadim Pisarevsky 24dea1c616 Merge pull request #3984 from LaurentBerger:ExampleCppORB 2015-05-29 21:36:43 +00:00
Vadim Pisarevsky 96c3f16a90 Merge pull request #4075 from MSOpenTech:backslash-upd 2015-05-29 13:23:23 +00:00
Evgeny Agafonchikov fd860d7cd0 Adding backslash in macro-based paths
of WINRT samples

This removes requirement to add OPENCV_WINRT_INSTALL_DIR with backslash in the end

in case trailing slash is presented VS handles duplicated slashes w/o issues
2015-05-29 09:36:42 +03:00
Vadim Pisarevsky b46719b093 Merge pull request #4074 from vpisarev:objdetect_fixes 2015-05-28 19:43:51 +00:00
Vadim Pisarevsky 8b8fc9e66b Merge pull request #4070 from techfort:fixpythonsample 2015-05-28 18:06:17 +00:00
Vadim Pisarevsky 882c0321f4 clip the found objects in HOG as well (http://code.opencv.org/issues/3825); added test to check CascadeClassifier on small images (http://code.opencv.org/issues/3710) 2015-05-28 21:02:27 +03:00
Vadim Pisarevsky 8c3c6b31fc make sure the returned rectangles are inside the image (http://code.opencv.org/issues/3136) 2015-05-28 20:15:22 +03:00
Vadim Pisarevsky 5a94a95fbf improvements in Haar CascadeClassifier: 1) use CV_32S instead of CV_32F for the integral of squares (which is more accurate and more efficient); 2) skip the window if its contrast is too low 2015-05-28 19:33:21 +03:00
Vadim Pisarevsky 036c438904 make facedetect.py work when the nested cascade is not specified 2015-05-28 19:01:56 +03:00
Vadim Pisarevsky 5e095c8fbd Merge pull request #4022 from LaurentBerger:ExampleBLOB_MSER 2015-05-28 15:00:36 +00:00
Vadim Pisarevsky 665a317f1c Merge pull request #4056 from apavlenko:java_memory_release 2015-05-28 15:00:07 +00:00
Vadim Pisarevsky f7ad192842 Merge pull request #4063 from Dikay900:2_4_to_master 2015-05-28 14:49:13 +00:00
Vadim Pisarevsky 58cf11bd44 Merge pull request #4069 from MSOpenTech:sample-face-contrib 2015-05-28 14:48:00 +00:00
Vadim Pisarevsky 549ef8f141 Merge pull request #4071 from sergarrido:fix_isContourConvex 2015-05-28 14:44:36 +00:00
Vadim Pisarevsky 176dd96698 Merge pull request #4073 from MSOpenTech:video-sample-face 2015-05-28 14:41:40 +00:00
Vadim Pisarevsky 5f8f56ea0e report an error when trying to load HOG cascade 2015-05-28 17:24:22 +03:00
Joe Minichino 47d8187bc3 fixed outdated params setting 2015-05-28 15:20:08 +01:00
Vadim Pisarevsky 481f786fe7 added simple HAL test; added RHO homography test 2015-05-28 17:05:43 +03:00
Maxim Kostin 3408114602 Added video face detection. Restructured code.
Signed-off-by: Maxim Kostin <v-maxkos@microsoft.com>
2015-05-28 13:42:59 +03:00
S. Garrido bd2c2f3bd1 fix isContourConvex 2015-05-27 20:51:53 +02:00
Joe Minichino a4a2659dff fixed digits.py sample to work with opencv 3 2015-05-27 15:43:52 +01:00
Maxim Kostin aa932eab41 Adding WinRT face tracking sample. Works with asset images. Created by @ericmitt.
Signed-off-by: Maxim Kostin <v-maxkos@microsoft.com>
2015-05-27 14:55:47 +03:00
Vadim Pisarevsky 565d3dde40 Merge pull request #4055 from rajithr:patch-1 2015-05-27 11:50:58 +00:00
Vadim Pisarevsky 85c08dd170 Merge pull request #4065 from gongzg:master 2015-05-27 11:26:57 +00:00
Vadim Pisarevsky 8bc21fc2f0 Merge pull request #4067 from PhilLab:patch-3 2015-05-27 11:24:35 +00:00
Vadim Pisarevsky 57c3e917e2 Merge pull request #4068 from PhilLab:patch-4 2015-05-27 11:24:17 +00:00
rajithr 7658c2e2d5 Fix for a potential data race condition
code changes to handle the failed build
2015-05-27 15:12:04 +05:30
rajithr 993e0b0bf9 Fix for a potential data race condition 2015-05-27 15:00:21 +05:30
Philipp Hasper 9aaa27d46b Adding missing docs for VideoWriter::release 2015-05-27 07:55:41 +02:00
Philipp Hasper 6c55e7c039 Fixed doc typo 2015-05-27 07:34:27 +02:00
Vadim Pisarevsky 1df244b6f4 Merge pull request #4062 from ilya-lavrenov:android_master 2015-05-26 17:24:32 +00:00
Alexander Alekhin 75558ae75c Merge pull request #4058 from mshabunin:latch-sample 2015-05-26 16:26:57 +00:00
Andrew Senin eb40dde688 Fixing XIMEA parameters mapping (issue #4176)
Conflicts:
	modules/highgui/src/cap_ximea.cpp
2015-05-26 18:08:29 +02:00
Ilya Lavrenov bb72206ec5 ability to enable OpenMP simultaneously with other parallel framework 2015-05-26 18:08:28 +02:00
Samyak Datta e9c765ee2c C++ sample code to detect facial features 2015-05-26 18:08:26 +02:00
StevenPuttemans 83723c15be added extra BUFFERSIZE doc and getter
Conflicts:
	modules/highgui/doc/reading_and_writing_images_and_video.rst
	modules/highgui/src/cap_dc1394_v2.cpp
2015-05-26 18:08:25 +02:00
StevenPuttemans 8454a8f2d1 adding extra buffer parameter
Conflicts:
	modules/highgui/include/opencv2/highgui/highgui_c.h
	modules/highgui/src/cap_dc1394_v2.cpp

fix typo
2015-05-26 18:08:22 +02:00
StevenPuttemans 6aedd4f7b0 fixing SVM negative value rounding
Conflicts:
	modules/objdetect/src/hog.cpp

fix android build
2015-05-26 17:26:30 +02:00
Vicente Olivert Riera e96b8ce781 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.
Conflicts:
	modules/superres/src/frame_source.cpp
2015-05-26 16:54:35 +02:00
Ilya Lavrenov b0cbec922b port of MR #4061 to master 2015-05-26 17:47:03 +03:00
Zhigang Gong 0f7de40e66 Fixed the race condition between inc and dec on the l_counter.
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
2015-05-26 22:06:18 +08:00
Maksim Shabunin 5ad4bed70a Added cvconfig.h copy during the build 2015-05-26 15:58:27 +03:00
Maksim Shabunin 330b3e87eb Fixed latch sample build without contrib 2015-05-26 15:57:07 +03:00
Vadim Pisarevsky 8fb37606f6 Merge pull request #4032 from mshabunin:fix-pkg-config 2015-05-26 12:47:14 +00:00
Vadim Pisarevsky dc587992a0 Merge pull request #4053 from vpisarev:calib3d_fixes 2015-05-26 11:23:50 +00:00
Andrey Pavlenko c1c03e16f4 releasing native memory of temp Mat objects in generated Java code 2015-05-26 13:50:56 +03:00
Andrey Pavlenko 6006790c18 releasing native memory in Java converters 2015-05-26 13:10:54 +03:00
Vadim Pisarevsky bb2e40b999 for some reason Calib3d_Homography.fromImages on ARM gives much smaller number of inliers than on x86/x64. Need to investigate more carefully, but let's decrease the tolerance threshold for now 2015-05-26 12:43:18 +03:00
Vadim Pisarevsky b1a8e4f760 Merge pull request #4054 from gongzg:master 2015-05-26 07:46:03 +00:00
Vadim Pisarevsky ca1d8c1737 fixed another compile warning from MSVC 2015-05-26 10:29:13 +03:00
rajithr ff6881efbf Fix for a potential data race condition 2015-05-26 11:31:31 +05:30
Zhigang Gong 3c85200989 Avoid negative index for a local buffer in Canny.cl.
int pix_per_thr = l_counter / LOCAL_TOTAL + ((lid < mod) ? 1 : 0);
The pix_per_thr * LOCAL_TOTAL may be larger than l_counter.
Thus the index of l_stack may be negative which may cause serious
problems. Let's skip the loop when we get negative index and we need
to add back the lcounter to keep its balance and avoid potential
negative counter.

Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
2015-05-26 08:48:05 +08:00
Vadim Pisarevsky e944533f01 fixed compile warnings; reenabled solvePnPRansac.concurrency test 2015-05-26 00:19:58 +03:00
Vadim Pisarevsky 85149f8686 hack solvePoly to finds roots of polynoms with zero higher-order coefficients. The roots are populated in this case, which is not valid, strictly speaking, but good enough for function like correctMatches. This solves http://code.opencv.org/issues/4330 2015-05-25 23:43:39 +03:00
Vadim Pisarevsky a12ec66a04 fixed useExtrinsicGuess=true case with single-precision input (http://code.opencv.org/issues/2734) 2015-05-25 22:40:10 +03:00
Vadim Pisarevsky 9d90b0549c fixed bug http://code.opencv.org/issues/3882 2015-05-25 22:03:25 +03:00
Vadim Pisarevsky 3bc5958c58 added tests for http://code.opencv.org/issues/4011 and http://code.opencv.org/issues/3057; fixed random subset generation in both methods to increase chance for a good subset 2015-05-25 21:46:05 +03:00
Vadim Pisarevsky 2952c10ced Merge pull request #4049 from mshabunin:transition-hint 2015-05-25 17:06:50 +00:00
Maksim Shabunin 55d1f0b7d6 Transition guide: removed one of the version check methods 2015-05-25 18:05:20 +03:00
Vadim Pisarevsky 60064b3de7 Merge pull request #4015 from GilLevi:AddingLATCH 2015-05-25 13:09:49 +00:00
Vadim Pisarevsky 02eb8e7c70 Merge pull request #4052 from ilya-lavrenov:typo 2015-05-25 13:07:34 +00:00
Vadim Pisarevsky 786d62e3e5 Merge pull request #4051 from Dikay900:2_4_to_master_2 2015-05-25 13:06:37 +00:00
Ilya Lavrenov 13cd052990 typo 2015-05-25 11:21:02 +03:00
GilLevi a4e5b09ea4 fixed whitespace issue 2015-05-25 01:28:05 +03:00
Andreas Stührk 3ec0e0943c TIFF loader: Allocate large enough buffer when (bpp * ncn) > 8.
Conflicts:
	modules/highgui/src/grfmt_tiff.cpp

floodfill return value removed
2015-05-24 14:06:33 +02:00
Vladislav Vinogradov 653810e4df 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.
2015-05-24 14:06:32 +02:00
Ilya Lavrenov efa2baed83 TCP instead of UDP
Conflicts:
	modules/highgui/src/cap_ffmpeg_impl.hpp
2015-05-24 14:06:30 +02:00
Andreas Stührk c9481b0fd7 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".

Conflicts:
	modules/highgui/src/grfmt_tiff.cpp
	modules/highgui/test/test_grfmt.cpp

fix whitespace

fix compile error
2015-05-24 14:06:20 +02:00
Niklas Frisk 8138e26163 Fixes #3910, flags in _prepareImgAndDrawKeypoints are now binary OR'ed instead of added.
Conflicts:
	modules/features2d/src/draw.cpp
2015-05-24 13:31:11 +02:00
Alexander Smorkalov a04a0514b9 Turn off superres accuracy tests if video i/o is not supported. 2015-05-24 13:31:09 +02:00
Alexander Smorkalov a9ae0c8e82 Test fisheye.rectify disabled for Tegra. 2015-05-24 13:31:08 +02:00
jormansa 3c2e12a744 bug fixed
Conflicts:
	modules/highgui/src/cap_ffmpeg_impl.hpp
2015-05-24 13:31:07 +02:00
StevenPuttemans cb55d60f98 fixing GT and GE comparison symbol
Conflicts:
	modules/gpu/doc/per_element_operations.rst
2015-05-24 13:31:06 +02:00
Alexander Smorkalov 6e1a595342 GCC 4.8 warning array subscript is above array bounds fixed.
tiff test fixed
2015-05-24 13:31:01 +02:00
Alexander Smorkalov 5141141e2b Deb package build fix for CUDA 6.5 and newer.
(cherry picked from commit e650d87e47)
(cherry picked from commit ca9c52ac97)

Conflicts:
	cmake/OpenCVPackaging.cmake
2015-05-24 11:55:47 +02:00
Martijn Liem 7e6947a940 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.

Conflicts:
	modules/highgui/src/cap_dshow.cpp
2015-05-24 11:55:46 +02:00
Vadim Pisarevsky bb989f2034 Merge pull request #4050 from Dikay900:2_4_to_master 2015-05-24 09:30:46 +00:00
Ruslan Baratov 9c8255feeb Doc: fix definition of macro CV_MAKETYPE
At least this is how it's defined in core/types_c.h

Conflicts:
	modules/core/doc/intro.rst
2015-05-23 19:09:34 +02:00
Leonid Beynenson 4f95e6c70b 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.
2015-05-23 19:09:33 +02:00
Camille 55a5e6be2c bug fix 3696 2015-05-23 19:09:31 +02:00
Mike Maraya 607d3b54ce Fixes resizeWindow() on OS X (Bug #3200) 2015-05-23 17:36:46 +02:00
Dikay900 7ca0557b40 typos in comments 2015-05-23 17:36:45 +02:00
Aleksandr Petrikov 25b4cface0 add NEON realization for StereoBM(findCorrespondence, prefilterXSobel)
Conflicts:
	modules/calib3d/src/stereobm.cpp

Add CV_Assert (ndisp % 8 == 0) to NEON version
2015-05-23 17:36:44 +02:00
Ehren Metcalfe e9bc9c47c2 Fix resource leak with iOS camera due to failure to remove AVCaptureSession input/outputs on stop (Bug #3389)
Conflicts:
	modules/highgui/src/cap_ios_abstract_camera.mm
2015-05-23 17:36:42 +02:00
aletheios 6a50a51b4e Bugfix #3705: params.setRecordingHint(true) breaks camera preview on Samsung Galaxy S2 2015-05-23 17:36:41 +02:00
Jüri Aedla 22c0238bf1 Android camera qcom HAL doesn't like it when no consumer usage bits are set. Set a usage bit for preview BufferQueue. 2015-05-23 17:36:39 +02:00
Alexander Smorkalov acbc7362db Bug #3611 Initializing static cv::Mat with cv::Mat::zeros causes segmentation fault fixed.
fix MatOpInitializer
2015-05-23 17:36:35 +02:00
Vadim Pisarevsky 2466ca02bf removed cameraMatrix modification in the currently disabled uPnP algorithm for SolvePnP problem (http://code.opencv.org/issues/3985) 2015-05-23 14:19:55 +03:00
Vadim Pisarevsky 7fd5b3a0c5 added another triangulation test case from http://code.opencv.org/issues/3461; fixed partial derivative on distortion coefficients, as http://code.opencv.org/issues/4101 suggests 2015-05-23 14:15:11 +03:00
Vadim Pisarevsky a1a35ca5f7 Merge pull request #4010 from cr333:triangulation_fix_master 2015-05-23 10:17:39 +00:00
Vadim Pisarevsky 90a78585fb reproduced test case from http://code.opencv.org/issues/4334 2015-05-23 13:16:32 +03:00
Vadim Pisarevsky f5be8f6c77 Merge pull request #4047 from MSOpenTech:videoio-refactor-contrib 2015-05-23 09:02:11 +00:00
Vadim Pisarevsky 526defab85 Merge pull request #4048 from vpisarev:hal_fixes 2015-05-22 21:19:03 +00:00
Maksim Shabunin 44d1738d47 Transition guide: how to check library version 2015-05-22 18:46:16 +03:00
Vadim Pisarevsky f32f0486e2 trying to eliminate warnings in Android build 2015-05-22 16:53:34 +03:00
Vadim Pisarevsky 8e392251ba Merge pull request #4016 from vladimir-dudnik:directx-opencl-sample 2015-05-22 13:21:36 +00:00
Maksim Shabunin 3863dc5b2b Updated pkg-config generation, added sample makefile 2015-05-22 16:09:07 +03:00
Samuel Martin 671a630f47 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 substitutions for these paths when the
aforementioned environment variables are set.
In such case, since the prefix is the target one, not the sysroot one,
these libraries' absolute 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

This patch is a port of [6] on the master branch.

[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
[6] https://github.com/Itseez/opencv/commit/eceada586bbf18fc267e437522ec4f1f23ddc656

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
2015-05-22 16:09:05 +03:00
Vadim Pisarevsky d2aaa70e93 removed HAL calls from public OpenCV headers; put IPP calls back to hall:sqrt() and such (but they are disabled for now) 2015-05-22 16:04:10 +03:00
Maxim Kostin 4418ee6c77 Refactored internal helpers. Simplified structure. Updated comments. Updates #41
Signed-off-by: Maxim Kostin <v-maxkos@microsoft.com>
2015-05-22 15:41:50 +03:00
Vladimir Dudnik c64a15294d short description moved to the beginning of file 2015-05-22 14:12:00 +03:00
Vadim Pisarevsky ef8182e12a Merge pull request #4025 from vpisarev:features2d_fixes 2015-05-21 19:16:27 +00:00
laurentBerger b204013483 back to #include "opencv2/cvconfig.h" 2015-05-21 20:22:57 +02:00
Vadim Pisarevsky af47b6551f another attempt to make the MSER test pass. removed possible randomization in parameters from run to run 2015-05-21 17:10:35 +03:00
Vladimir Dudnik 892684ebe5 add short description 2015-05-21 17:08:13 +03:00
Vadim Pisarevsky 4c67ae1a0b fixed failure in Features2d_MSER.cases 2015-05-21 16:27:34 +03:00
Vadim Pisarevsky 021473e93e Merge pull request #4040 from dobrypd:libgphoto2-connection 2015-05-21 13:19:22 +00:00
laurentBerger b116d6c6e8 use ifndef HAVE_GTK 2015-05-21 14:57:49 +02:00
Vadim Pisarevsky 6b04c2b904 Merge pull request #4027 from zenev:master 2015-05-21 12:35:17 +00:00
Vadim Pisarevsky 7061bf0000 Merge pull request #4031 from apavlenko:revert_4014 2015-05-21 12:31:48 +00:00
Vadim Pisarevsky dab78c26b1 added reasonable test for MSER (including coverage for http://code.opencv.org/issues/4273, http://code.opencv.org/issues/1723 and http://code.opencv.org/issues/756); also, added some "in-progress" info to the Features2d_Feature2d.no_crash test. 2015-05-21 15:03:17 +03:00
laurentBerger a6a0fc5b21 replace "cvconfig.h" it with "opencv2/cvconfig.h". 2015-05-21 14:01:11 +02:00
Vadim Pisarevsky fede94e979 it's now true MSER algorithm that works well on binary images too 2015-05-21 05:44:14 +03:00
Piotr Dobrowolski 6d0407b65e VideoCapture with digital camera and gPhoto2 library 2015-05-21 00:41:39 +02:00
GilLevi 05a45ef6dc renamed LATCH 2015-05-21 00:04:24 +03:00
Vadim Pisarevsky 298c98ea32 Merge pull request #4026 from mshabunin:install-cvconfig 2015-05-20 09:58:48 +00:00
Andrey Pavlenko ab8afc3bcc Revert of "Merge pull request #4006 from sgjava:opencv-steve" (reverted from commit 4743184078) 2015-05-19 18:55:57 +03:00
Vladimir Dudnik af806bc816 replaced macros with template func 2015-05-19 16:08:25 +03:00
Andrey Pavlenko d67d32af48 Revert of "Merge pull request #4014 from sgjava:opencv-sgjava" (reverted from commit 52fa55a770) 2015-05-19 13:30:18 +03:00
zenev 6ac4a4ceb6 Merge branch 'master' of https://github.com/zenev/opencv 2015-05-18 13:29:54 -07:00
zenev 5cb70d34d7 fixed vector out of range exception in nextImg 2015-05-18 13:29:15 -07:00
Vadim Pisarevsky b5a7122855 added test to do smoke testing of ORB, KAZE, AKAZE and BRISK on images of different size 2015-05-18 21:16:53 +03:00
Maksim Shabunin e936670571 Install cvconfig.h file 2015-05-18 19:19:48 +03:00
Vadim Pisarevsky fc06a2384b added test for batch detection/descriptor extraction (http://code.opencv.org/issues/3943) 2015-05-18 19:01:00 +03:00
Vadim Pisarevsky 432cf1152a added read/write functions for vector<DMatch> + the test (http://code.opencv.org/issues/4308) 2015-05-18 18:59:37 +03:00
Vadim Pisarevsky 3136010e1a Merge pull request #4023 from Dikay900:cleanup_cascadedetect 2015-05-18 14:08:22 +00:00
Vadim Pisarevsky 2fc92448df Merge pull request #4024 from jet47:cuda-minmaxloc-one-row-input 2015-05-18 14:06:37 +00:00
Vladislav Vinogradov e22979f334 fix #4343 : cv::cuda::findMinMaxLoc incorrect output for single row matrix 2015-05-18 14:16:55 +03:00
Dikay900 a5242265d7 cleanup after last PR 2015-05-18 00:31:39 +02:00
Vadim Pisarevsky 8b791477df Merge pull request #3971 from Dikay900:2_4_to_master_3 2015-05-17 00:28:30 +00:00
laurentBerger 268283ff16 suppress android and mac warnings 2015-05-16 22:54:53 +02:00
GilLevi 6613519c2e added sample for LATCH 2015-05-16 22:37:38 +03:00
Vadim Pisarevsky e0136e39f4 Merge pull request #4011 from cr333:parula 2015-05-16 19:11:32 +00:00
laurentBerger 546f70a6f0 some warnings and errors 2015-05-16 21:01:31 +02:00
GilLevi f85eb23c3b sample for LATCH 2015-05-16 21:15:09 +03:00
Vadim Pisarevsky 78e89ba3ff Merge pull request #4001 from LaurentBerger:ExampleBLOB 2015-05-16 18:11:29 +00:00
Vadim Pisarevsky eb41a574b7 Merge pull request #4005 from MSOpenTech:videoio-contrib 2015-05-16 18:08:28 +00:00
laurentBerger 187ab0ca61 include cvconfig.h to use constant HAVE_OPENGL 2015-05-16 19:59:59 +02:00
laurentBerger 7cf5de0ed0 trailing whitespace and some bracket 2015-05-16 19:29:12 +02:00
laurentBerger 68e9d19743 An example how to use features2d for MSER. Data results are visualized in 3D using openglwith mouse or keyboard 2015-05-16 18:59:22 +02:00
Vladimir Dudnik f0197006e0 removed original samples and replace them with new ones. modified new samples (reduce code duplication, add cmd line params and short description) 2015-05-16 00:40:05 +03:00
Vadim Pisarevsky a85bb091c8 Merge pull request #4018 from vpisarev:imgproc_video_fixes 2015-05-15 16:15:01 +00:00
Maxim Kostin 3d20157d4f Added sample Windows Universal application (UAP) using videoio logic for video preview and processing.
Signed-off-by: Maxim Kostin <v-maxkos@microsoft.com>
2015-05-15 18:03:06 +03:00
Maxim Kostin 55f78f8a83 Added configuration changes enabling videoio WinRT support.
Signed-off-by: Maxim Kostin <v-maxkos@microsoft.com>
2015-05-15 16:29:06 +03:00
Maxim Kostin d08cb6b357 Added WinRT support for videoio.
Signed-off-by: Maxim Kostin <v-maxkos@microsoft.com>
2015-05-15 16:28:47 +03:00
Maxim Kostin d40eefd5a4 Moved old WinRT related wrappers from highgui to videoio fixing long broken logic.
Signed-off-by: Maxim Kostin <v-maxkos@microsoft.com>
2015-05-15 16:28:25 +03:00
Vadim Pisarevsky 4a9b244577 hopefully, fixed crash in sparse mat test 2015-05-15 16:15:10 +03:00
Vadim Pisarevsky cc086b9452 Merge pull request #3979 from ruslo:fix.cxx11 2015-05-15 12:32:46 +00:00
Vadim Pisarevsky 35884a7e3f Merge pull request #3982 from patrikhuber:vs2015-support-master 2015-05-15 12:32:27 +00:00
Vadim Pisarevsky 3109c77013 Merge pull request #3983 from ruslo:unify.ios 2015-05-15 12:32:05 +00:00
Vadim Pisarevsky a26ab3ab16 Merge pull request #3917 from yanlend:patch-1 2015-05-14 21:16:24 +00:00
Vadim Pisarevsky 66eb270cf7 significantly reduced sparse matrix footprint:
http://code.opencv.org/issues/2206,
http://code.opencv.org/issues/2924
2015-05-14 23:29:09 +03:00
Vadim Pisarevsky 354ed5c4d6 Merge pull request #4009 from mshabunin:fix-ann-moment 2015-05-14 18:25:16 +00:00
Vadim Pisarevsky c52092e6f8 Merge pull request #3992 from nomarek:master 2015-05-14 18:24:09 +00:00
Vadim Pisarevsky 52fa55a770 Merge pull request #4014 from sgjava:opencv-sgjava 2015-05-14 18:23:28 +00:00
Vadim Pisarevsky a87e1c2f90 Merge pull request #4012 from mshabunin:doc-fixes 2015-05-14 18:22:26 +00:00
Vadim Pisarevsky cc92cd07e8 Merge pull request #4017 from headupinclouds:master 2015-05-14 18:16:23 +00:00
Vadim Pisarevsky 7dd67f4997 use _mm_sad_epu8 instead of _mm_movemask_epi8 in countNonZero. Therefore, we do not need any popcount table and this solves http://code.opencv.org/issues/4333 2015-05-14 20:33:53 +03:00
Vadim Pisarevsky 3c769edea0 added extra check in CalibrateDebevec to make sure the points are within the image:
http://code.opencv.org/issues/4124
2015-05-14 19:54:48 +03:00
Vadim Pisarevsky 3c7f7de477 avoid possible problems with zero values in tone mapping algorithms (http://code.opencv.org/issues/4020) 2015-05-14 19:32:25 +03:00
Vadim Pisarevsky ffabbfa778 added test to prove that remap does not leak memory (http://code.opencv.org/issues/2502). disabled the test for now to save execution time. 2015-05-14 18:21:26 +03:00
Vadim Pisarevsky ca90667723 fixed compile warnings on Linux and Windows 2015-05-14 16:42:51 +03:00
Vadim Pisarevsky 05d888316a added test for http://code.opencv.org/issues/2957 2015-05-14 16:25:18 +03:00
Vadim Pisarevsky b37aaa8303 significantly improved parallel non-local means by using granularity parameter in parallel_for_ loop. Because the algorithm deals with sliding sums, it's essential that each thread has enough work to do, otherwise the algorithm gets higher theoretical complexity and thus there is no speedup comparing to 1-thread code (at best). 2015-05-14 15:39:42 +03:00
Vladimir Dudnik 3cb4954d70 fixed new blank line at EOF 2015-05-14 12:08:14 +03:00
Vadim Pisarevsky feb5b6aa93 increased singularity epsilon in LU decomposition. This solved singular case from http://code.opencv.org/issues/3305. Added the respective test. 2015-05-14 10:42:55 +03:00
Vadim Pisarevsky 2e7e754032 added support for n-channel (n>4) images in warpAffine/warpPerspective/remap: http://code.opencv.org/issues/4190 2015-05-14 08:06:46 +03:00
David Hirvonen cab0ecdf19 Avoid clearing HaarEvaluator::tofs variable (introduced fb8478eb7b) in HaarEvaluator::setImage(...) since it won't be recomputed by HaarEvaluator::computeOptFeatures() for cases where the input image dimensions and requested search scales are the same as the previous. If none of the above change then it should be correct, and if they do change it will be computed correctly inside HaarEvaluator::computeOptFeatures() (in commit 952f9dbe62)
I'm guessing there is a unit test for this that needs to be called 2x with the same image and search parameters (or another image with the same size) to illustrate the problem.
2015-05-13 17:34:16 -04:00
Vadim Pisarevsky d3b0cb878a added test for http://code.opencv.org/issues/2736 2015-05-13 22:16:35 +03:00
Vadim Pisarevsky 71002e0e79 some fixes from http://code.opencv.org/issues/3733 2015-05-13 22:00:02 +03:00
GilLevi a41ac8fd40 added sample code for LATCH 2015-05-13 21:20:28 +03:00
sgjava 8b3b2a52f0 Removed finalize() and added n_delete to release() 2015-05-13 13:45:19 -04:00
sgjava fe0ce9282a Changed delete() modifier to public from protected 2015-05-13 13:44:53 -04:00
Marek Nogacki 25bcca2edb fixed http://code.opencv.org/issues/4276 - set drawing thickness limit to 32767 2015-05-13 18:54:25 +02:00
laurentBerger 31ef944176 remove example_blob.bmp 2015-05-13 18:06:26 +02:00
laurentBerger 06b0fa6fc2 BLOB_MSER avec opengl 2015-05-13 18:03:58 +02:00
Maksim Shabunin 6d1cbc6458 Reorganized user guide 2015-05-13 18:46:21 +03:00
Maksim Shabunin 3f91b0d340 Fixed external link in python colorspace tutorial 2015-05-13 18:46:21 +03:00
Maksim Shabunin a7160d9b12 Docs: fixed _dest type in cv::compare 2015-05-13 18:46:21 +03:00
Maksim Shabunin e22c09c601 Documentation for CommandLineParser 2015-05-13 18:46:21 +03:00
Maksim Shabunin 61293a09ff Fixed RGB-to-HLS conversion formula in documentation 2015-05-13 18:46:21 +03:00
Maksim Shabunin c8cb03fd8f Replaced 'corrected' to 'distorted' in camera calibration tutorials 2015-05-13 18:46:21 +03:00
Christian Richardt 6425ac3b13 Added color map similar to Matlab's new default color map 'parula'. 2015-05-13 17:34:14 +02:00
Christian Richardt cbaf0ecaf6 Fixed triangulation bug http://code.opencv.org/issues/4334. 2015-05-13 16:28:14 +02:00
Maksim Shabunin b95769333c Fixed ANN_MLP dw initialization when moment is not 0 2015-05-13 16:56:34 +03:00
Vadim Pisarevsky 4743184078 Merge pull request #4006 from sgjava:opencv-steve 2015-05-13 11:36:15 +00:00
Vadim Pisarevsky 3f180b0ad9 Merge pull request #4007 from martin-ueding:master 2015-05-13 11:35:09 +00:00
Martin Ueding 1e00a93f97 Fix spelling 2015-05-13 08:16:39 +02:00
Vladimir Dudnik 450a276f87 directx opencl interop samples (with copy from opencl image2d to buffer) 2015-05-13 01:51:54 +03:00
sgjava 0f53526598 Added VideoWriter and changed finalize to delete 2015-05-12 14:18:39 -04:00
laurentBerger 780f4ae7c5 try to implement remark included in message 2015-05-12 19:01:05 +02:00
Vadim Pisarevsky 4af2eb22ab Merge pull request #3974 from StevenPuttemans:fix_RGB_naming_master 2015-05-12 15:12:27 +00:00
Vadim Pisarevsky 5de9d8e6e1 Merge pull request #3994 from mshabunin:fix-gtk-crash 2015-05-12 15:11:07 +00:00
Vadim Pisarevsky d3ef3cff94 Merge pull request #3996 from Ashod:opengl_context_clip 2015-05-12 15:06:31 +00:00
Vadim Pisarevsky 568303ac7f Merge pull request #3993 from vrabaud:master 2015-05-12 15:04:41 +00:00
Vadim Pisarevsky 09c26d6805 Merge pull request #3999 from berak:features2d_tutorial_fix 2015-05-12 15:01:54 +00:00
Vadim Pisarevsky 939c1d2474 Merge pull request #4000 from sdika:HOGSignedGradient 2015-05-12 14:47:36 +00:00
Vadim Pisarevsky b8d40b4ad5 Merge pull request #4002 from marvins:gdal-fix 2015-05-12 14:33:07 +00:00
Marvin Smith ae933db526 Fixing the gdal include error that Macports seems to only mess up. 2015-05-11 20:27:50 -07:00
laurentBerger dfc508bb15 problem float constant and position of > in vector 2015-05-11 13:45:08 +02:00
laurentBerger 05bc7621e6 trailing whitespace 2015-05-11 13:20:52 +02:00
laurentBerger a94fdbe0f0 Example about BLOB with a new image in data folder 2015-05-11 13:13:20 +02:00
laurentBerger e7fcffeead Exxemple MSER et BLOB séparés 2015-05-11 12:48:18 +02:00
msandler 8e82bed459 updated cap_libv4l.cpp to support CV_CAP_PROP_POS_MSEC, CV_CAP_PROP_POS_FRAMES and CV_CAP_PROP_FPS 2015-05-11 03:25:48 -07:00
berak 3fe69f4e67 small fixes for features2d tutorials 2015-05-10 13:44:49 +02:00
Michaël Sdika ab40c2acf7 added the signedGradient varaible to the HOGDescriptor class.
when true, use signed gradient for the angular histogram computation.
default to false for backward compatibility.
2015-05-10 09:23:30 +02:00
Ashod Nakashian 7cd198623e Prevent the parent from drawing over OpenGL context. 2015-05-09 12:23:09 -04:00
laurentBerger 16e20e5c73 An another improvement? 2015-05-09 10:29:53 +02:00
laurentBerger 9e97d7b4db Etude de MSER 2015-05-09 08:44:18 +02:00
laurentBerger 26d7da68fc warning C4101: 'e' line 146 2015-05-08 09:57:05 +02:00
laurentBerger f6f5b6035b trailing whitespace 2015-05-07 22:55:38 +02:00
laurentBerger 966d50762d Try to include comment from @eduardo and @berak
Akaze descriptor with DESCRIPTOR_KAZE_UPRIGHT added
2015-05-07 22:48:13 +02:00
Maksim Shabunin 01c3d491e7 Fixed python crash when both cv2.imshow and gtk module are used 2015-05-07 16:44:45 +03:00
Vincent Rabaud f052b0bc4d get code to compile on Ubuntu Saucy
A define was forgotten for the codecs and there was a typo for
another.
2015-05-07 11:38:59 +00:00
Vadim Pisarevsky a31b29308f Merge pull request #3919 from cbalint13:brisk 2015-05-07 10:38:31 +00:00
laurentBerger 3a53e726dd example BLOB_MSER and fixed bug in blobdetector 2015-05-07 11:52:06 +02:00
Marek Nogacki d59a6b29d5 fixed http://code.opencv.org/issues/4276 - removed drawing thickness upper limit 2015-05-07 11:19:22 +02:00
laurentBerger cfcef3ec98 File was not saved due to wrong file name.
Add a comment about bug 4308
2015-05-06 19:55:16 +02:00
Vadim Pisarevsky f49544f310 Merge pull request #3987 from vpisarev:core_fixes_part_1 2015-05-06 15:49:18 +00:00
laurentBerger 171b58e2ca Example BLOB_MSER 2015-05-06 16:50:22 +02:00
Vadim Pisarevsky 7a3c0cb70e Merge pull request #3991 from mshabunin:python-underscore 2015-05-06 14:48:34 +00:00
Vadim Pisarevsky 1756590117 Merge pull request #3985 from StevenPuttemans:fix_imread_parameters 2015-05-06 14:02:33 +00:00
Maksim Shabunin c137ba53a0 Wrap ANN_MLP class into Python 2015-05-06 15:21:23 +03:00
cbalint13 6b1d5e48b6 Merge branch 'brisk' of https://github.com/cbalint13/opencv into brisk 2015-05-06 11:23:50 +03:00
cbalint13 fb56d5c482 Squash all BRISK commits into one. 2015-05-06 11:21:25 +03:00
Vadim Pisarevsky d280205245 fixed compile errors on ARM, as well as failures in OCL_Dft* regression tests 2015-05-06 10:00:10 +03:00
Vadim Pisarevsky 0ee8634b2f fixed random failures in Core_DFT.complex_output2 test (the case of input_mat.cols == 1) 2015-05-05 20:31:30 +03:00
Vadim Pisarevsky 73f760fdf0 some more compile warnings fixed 2015-05-05 18:03:40 +03:00
Vadim Pisarevsky 931a519969 fixed warning in mathfuncs 2015-05-05 17:49:36 +03:00
StevenPuttemans 0baaf0a60f fixing old variables in documentation and transfering to the new interface 2015-05-05 15:05:39 +02:00
Vadim Pisarevsky 63a63e3eaa extended MinProblemSolver::Function to 1) report the space dimensionality, 2) compute gradient if needed 2015-05-05 15:56:06 +03:00
laurentBerger 6b9e273f92 Essai examleBlob et MSER 2015-05-05 12:06:16 +02:00
cbalint13 2c6114f58d Force newer build over buildbot. 2015-05-05 12:19:35 +03:00
cbalint13 8ba1ec22e4 Force buildbot to rebuild. 2015-05-04 19:54:08 +03:00
Maksim Shabunin 4bf6bd3d37 Merge pull request #3972 from PhilLab:docLineno 2015-05-04 09:48:07 +00:00
laurentBerger 09930938e8 Trailing white space first step 2015-05-04 10:59:43 +02:00
laurentBerger 09e9e8ad9f I have modified source file and add a chart to have distance between keypoint for decriptor function og matching algorithm
My english is not good so you can change some words in my comment
2015-05-04 10:36:24 +02:00
StevenPuttemans 34dacdea32 fixing all RGB instances to BGR where needed 2015-05-04 09:02:46 +02:00
laurentBerger 9ddb8bdb8b Problem with warning: comparison between signed and unsigned integer expressions 2015-05-03 14:08:24 +02:00
laurentBerger 56856a1810 Conversion size-t in int 2015-05-03 13:28:23 +02:00
laurentBerger 341de5d53f trailing whitespace 2015-05-03 12:04:19 +02:00
laurentBerger b28056e3dd Trailing whitespace 2015-05-03 11:58:32 +02:00
laurentBerger 3e25c085ba A sample program : how to use ORB AKAZE BRISK descriptors for matching.
see http://answers.opencv.org/question/61062/features2d-example/
2015-05-03 11:42:27 +02:00
Vadim Pisarevsky 5b9182ba43 reenabled conjugate gradient solver test 2015-05-03 11:36:24 +03:00
Vadim Pisarevsky 5a31f6b4e1 ok, so probably the failure in downhill simplex has been finally solved 2015-05-03 11:31:49 +03:00
Vadim Pisarevsky 2ec92ba440 added test for http://code.opencv.org/issues/1918 2015-05-03 02:46:33 +03:00
Vadim Pisarevsky 01e351de37 refactored downhill simplex implementation a bit; hopefully, fixed the bug with random failures in the tests 2015-05-03 02:29:15 +03:00
Ruslan Baratov 441f93d58d Unify iOS platform check
There is only one place that use condition `CMAKE_SYSTEM_NAME STREQUAL iOS`.
All other `if` command use just IOS.
2015-05-02 23:44:19 +02:00
Vadim Pisarevsky a33d7928a4 Fixed getContinuousSize() to handle huge matrices properly. This should solve http://code.opencv.org/issues/3232 2015-05-02 22:12:12 +03:00
Vadim Pisarevsky 9c0b740b84 improved randShuffle as suggested by John Stark in http://code.opencv.org/issues/3730 2015-05-02 21:31:47 +03:00
Vadim Pisarevsky 96b5ec14d4 fixed bug with simplex initialization in Downhill solver (thanks to Toby Rule for the patch): http://code.opencv.org/issues/3990.
re-enabled Downhill solver test, let's see how it goes
2015-05-02 20:59:57 +03:00
Vadim Pisarevsky 79ac0d05ce added test checking http://code.opencv.org/issues/4050 2015-05-02 20:38:30 +03:00
Patrik Huber 40b765b7c2 Add VS2015 compatibility to CMake scripts 2015-05-02 15:24:14 +01:00
cbalint13 f426778160 Force buildbot rebuild. 2015-05-02 11:25:22 +03:00
Ruslan Baratov f148eaace9 Fix errors while compiling with c++11 flag
Fix errors in file cap_avfoundation.mm.
Compiled with Xcode 6.2, iOS SDK 8.2

Example:

cap_avfoundation.mm:543:54: error: cannot initialize a parameter of
type 'AVCaptureFocusMode' with an rvalue of type 'int'
    if ([mCaptureDevice isFocusModeSupported:(int)value]){
                                             ^~~~~~~~~~
2015-05-01 21:29:20 +02:00
cbalint13 9b87c22e01 Fix bugs in non-max suppression routine. 2015-05-01 22:07:08 +03:00
Vadim Pisarevsky 9fbd1d68ad refactored div & pow funcs; added tests for special cases in pow() function.
fixed http://code.opencv.org/issues/3935
possibly fixed http://code.opencv.org/issues/3594
2015-05-01 21:49:11 +03:00
Roman Donchenko e01b485ac6 Merge pull request #3973 from xsorifc28:patch-1 2015-04-30 12:48:51 +00:00
cbalint13 bbdf21679f Leave AGAST at thresold=10, cosmetic for perf tests. 2015-04-30 02:23:58 +03:00
cbalint13 e2f74309f7 Default AGAST threshold is 40 (as authors recomandation) 2015-04-29 23:54:16 +03:00
cbalint13 0ec5561b4e Adjust AGAST perftest to be at parity (better) with FAST ones. 2015-04-29 23:42:57 +03:00
Vadim Pisarevsky 74e2b8cbcb fixed invalid output of cv::dft when using DFT_ROWS + DFT_COMPLEX_OUTPUT (http://code.opencv.org/issues/3428) 2015-04-29 23:08:22 +03:00
Vadim Pisarevsky 7918267d02 fixed U non-orthogonality in SVD (http://code.opencv.org/issues/3801) 2015-04-29 16:09:58 +03:00
Vadim Pisarevsky 135fa85e8f added vector<bool> support (http://code.opencv.org/issues/3826) 2015-04-29 15:36:45 +03:00
Vadim Pisarevsky d8f360316d fixed http://code.opencv.org/issues/3828, added test. thanks to berak for the patch 2015-04-29 13:12:53 +03:00
lujia b73894b271 bugfix_for_hog_detectMultiScale_with_weights 2015-04-29 11:46:26 +02:00
Vadim Pisarevsky 0746ec7035 fixed http://code.opencv.org/issues/4278 2015-04-29 11:58:49 +03:00
Vadim Pisarevsky a8226814c5 fixed http://code.opencv.org/issues/4189 2015-04-29 11:47:12 +03:00
Vadim Pisarevsky 30a3ff0de6 fixed compile errors on OSX and other systems where ffmpeg is detected manually, not via pkg-config 2015-04-29 11:43:53 +03:00
Philipp Hasper dadf53f17c Doxygen: replaced @includelineno by @include to enable copy-pasting 2015-04-29 09:31:53 +02:00
AfterEight f39d351d04 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)
Conflicts:
	modules/highgui/src/cap_ximea.cpp
2015-04-28 18:07:39 +02:00
cbalint13 0039690f11 Merge branch 'master' of https://github.com/Itseez/opencv into brisk 2015-04-28 18:51:13 +03:00
Vadim Pisarevsky 07e07655d4 Merge pull request #3967 from Belev:fix-typo 2015-04-28 14:47:05 +00:00
Vadim Pisarevsky e60dcc9b3b Merge pull request #3966 from Dikay900:master_diff_to_2_4_2 2015-04-28 11:00:57 +00:00
Vadim Pisarevsky 7245803405 Merge pull request #3954 from martin-ueding:master 2015-04-28 10:55:05 +00:00
Vadim Pisarevsky ce7812fcb0 Merge pull request #3962 from apavlenko:fix_polylines_empty 2015-04-28 10:47:36 +00:00
Maksim Shabunin bcf02ae439 Merge pull request #3678 from mshabunin:explicit-sse-disable 2015-04-28 10:41:14 +00:00
Vadim Pisarevsky 8919c3162d Merge pull request #3964 from Dikay900:master_diff_to_2_4 2015-04-28 10:38:54 +00:00
Belev 2200e0fb7e 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
2015-04-28 13:10:08 +03:00
cbalint13 0ded2984b8 Merge remote-tracking branch 'upstream/master' into brisk 2015-04-28 06:48:52 +03:00
Samed Ozdemir 5e44aa37ff Fixed a typo, "requited" -> "required" 2015-04-27 23:00:39 -04:00
Maksim Shabunin 9efc57f24b Increased perf_imgproc.moments max error 2015-04-27 17:05:55 +03:00
kalistratovag 20156d1eeb Adding 1 to moments to avoid tests fails 2015-04-27 15:36:40 +03:00
Maksim Shabunin 1138a38dbe Use explicit no-sse flags when SSE is off
Also:
- Silence clang warnings about unsupported command line arguments
- Add diagnostic print to calib3d test
- Fixed perf test relative error check
- Fix iOS build problem
2015-04-27 15:36:10 +03:00
Thomas Gabrowski 63dbeeaac5 Fix iOS warnings about implicit conversion precision by changing double literals to float ones
Conflicts:
	modules/contrib/include/opencv2/contrib/retina.hpp
2015-04-26 12:22:41 +02:00
Mansour Moufid 655b28ee0c Use the CMake find_library command to find the FFmpeg libraries.
Conflicts:
	cmake/OpenCVFindLibsVideo.cmake
2015-04-25 19:00:33 +02:00
Roman Donchenko 5455e38e15 cap_msmf.hpp: fix a warning about nNull being unused
The two functions featuring nNull are not particularly needed, so
I simply removed them.

Conflicts:
	modules/highgui/src/cap_msmf.hpp
2015-04-25 18:54:54 +02:00
Mansour Moufid b99f7a29df Cast some image coordinates and sizes to double.
Conflicts:
	modules/gpu/perf/perf_imgproc.cpp

Cast a long integer to double explicitly.

Conflicts:
	modules/python/src2/cv2.cpp

Cast some matrix sizes to type int.

Change some vector mask types to unsigned.

Conflicts:
	modules/core/src/arithm.cpp
2015-04-25 18:54:53 +02:00
Luis Díaz Más b599774e30 Fix a bug that impede to set the trackbar pos using the Qt control panel
Conflicts:
	modules/highgui/src/window_QT.cpp
2015-04-25 18:54:53 +02:00
Luis Díaz Más e6f7e96ff4 Fixing the bug #4244 that I just reported in code.opencv.org 2015-04-25 18:54:52 +02:00
Craig Reynolds b4c7c011b7 In cvAddText, construct QString from "text" using fromUtf8. 2015-04-25 18:54:51 +02:00
Boris Daskalov 3b5530fb67 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-04-25 18:54:51 +02:00
Vladimir Kolesnikov 2c73e49dac 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-25 18:54:50 +02:00
Alexander Nitsch d6c95621e8 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.

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-04-24 23:10:50 +02:00
Milania1 b94c513cee fixed error in hough lines tutorial (the point (9,4) is not on the lines, but the point (4,9) is)
Conflicts:
	doc/tutorials/imgproc/imgtrans/hough_lines/hough_lines.rst
2015-04-24 22:48:44 +02:00
Ilya Lavrenov 614edafe73 typo 2015-04-24 22:38:51 +02:00
Dikay900 9f7548ab89 update openni sample comments referring #81 2015-04-24 18:19:03 +02:00
Andrey Pavlenko d2409d12c6 porting polylines with empty vector<Point> from 2.4 to master 2015-04-24 17:11:51 +03:00
Alexander Alekhin 6a5f413f27 Merge tag '3.0.0-rc1' 2015-04-24 14:56:47 +03:00
Vadim Pisarevsky 755527a90a Merge pull request #3958 from ilya-lavrenov:cuda_aarch64 2015-04-23 17:16:52 +00:00
Vadim Pisarevsky 1e90b2f51d Merge pull request #3957 from dhood:fm-8pt-bug 2015-04-23 17:16:25 +00:00
Ilya Lavrenov f57063efa2 port of aarch64 cuda changes from 2.4 2015-04-23 17:57:29 +03:00
Deanna Hood eee210f3b5 Fix Bug #3441, #4072, #4173: 8-point fundamental matrix calculation error 2015-04-23 10:09:48 -04:00
Deanna Hood 34bc3b8595 Don't relax error level for particular fundamental matrix calculation methods 2015-04-23 10:08:42 -04:00
Martin Ueding 5ffb53f229 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.
2015-04-23 13:30:14 +02:00
cbalint13 dee3a4b528 Add missing opencv_contrib PR #202 patch. 2015-04-11 17:43:28 +03:00
cbalint13 26997f32c6 Fix BRISK detector&descriptor using proper AGAST. 2015-04-11 12:09:13 +03:00
yanlend 443b3157e0 Fix win32 search for same bitness executable
find_package(PythonInterp) calls find_program(PYTHON_EXECUTABLE), i.e. without version number. For the Win32-search before to be effective, the same variable has to be used.
2015-04-10 14:57:31 +02:00
Owen Healy 86fb9f8409 Modify findTransformECC to support a mask of pixels to consider
Tests of the mask are also included.

This is useful for registering a non-square image against a non-square
template.

This also needs to relax a sanity check as per
https://github.com/Itseez/opencv/pull/3851
2015-03-19 22:16:32 -04:00
507 changed files with 90810 additions and 41293 deletions
+1 -1
View File
@@ -54,6 +54,6 @@ if(ENABLE_SOLUTION_FOLDERS)
endif()
if(NOT BUILD_SHARED_LIBS)
ocv_install_target(${WEBP_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT main)
ocv_install_target(${WEBP_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
endif()
+34 -22
View File
@@ -45,6 +45,24 @@ endif(CMAKE_SYSTEM_NAME MATCHES WindowsPhone OR CMAKE_SYSTEM_NAME MATCHES Window
if(WINRT)
add_definitions(-DWINRT -DNO_GETENV)
# Making definitions available to other configurations and
# to filter dependency restrictions at compile time.
if(CMAKE_SYSTEM_NAME MATCHES WindowsPhone)
set(WINRT_PHONE TRUE)
add_definitions(-DWINRT_PHONE)
elseif(CMAKE_SYSTEM_NAME MATCHES WindowsStore)
set(WINRT_STORE TRUE)
add_definitions(-DWINRT_STORE)
endif()
if(CMAKE_SYSTEM_VERSION MATCHES 8.1)
set(WINRT_8_1 TRUE)
add_definitions(-DWINRT_8_1)
elseif(CMAKE_SYSTEM_VERSION MATCHES 8.0)
set(WINRT_8_0 TRUE)
add_definitions(-DWINRT_8_0)
endif()
endif()
if(POLICY CMP0022)
@@ -170,6 +188,7 @@ OCV_OPTION(WITH_QUICKTIME "Use QuickTime for Video I/O insted of QTKit" OFF
OCV_OPTION(WITH_TBB "Include Intel TBB support" OFF IF (NOT IOS AND NOT WINRT) )
OCV_OPTION(WITH_OPENMP "Include OpenMP support" OFF)
OCV_OPTION(WITH_CSTRIPES "Include C= support" OFF IF (WIN32 AND NOT WINRT) )
OCV_OPTION(WITH_PTHREADS_PF "Use pthreads-based parallel_for" OFF IF (NOT WIN32) )
OCV_OPTION(WITH_TIFF "Include TIFF support" ON IF (NOT IOS) )
OCV_OPTION(WITH_UNICAP "Include Unicap support (GPL)" OFF IF (UNIX AND NOT APPLE AND NOT ANDROID) )
OCV_OPTION(WITH_V4L "Include Video 4 Linux support" ON IF (UNIX AND NOT ANDROID) )
@@ -187,6 +206,7 @@ OCV_OPTION(WITH_DIRECTX "Include DirectX support" ON
OCV_OPTION(WITH_INTELPERC "Include Intel Perceptual Computing support" OFF IF (WIN32 AND NOT WINRT) )
OCV_OPTION(WITH_IPP_A "Include Intel IPP_A support" OFF IF (MSVC OR X86 OR X86_64) )
OCV_OPTION(WITH_GDAL "Include GDAL Support" OFF IF (NOT ANDROID AND NOT IOS AND NOT WINRT) )
OCV_OPTION(WITH_GPHOTO2 "Include gPhoto2 library support" ON IF (UNIX AND NOT ANDROID) )
# OpenCV build components
# ===================================================
@@ -202,8 +222,7 @@ OCV_OPTION(BUILD_WITH_DEBUG_INFO "Include debug info into debug libs (not MSC
OCV_OPTION(BUILD_WITH_STATIC_CRT "Enables use of staticaly linked CRT for staticaly linked OpenCV" ON IF MSVC )
OCV_OPTION(BUILD_WITH_DYNAMIC_IPP "Enables dynamic linking of IPP (only for standalone IPP)" OFF )
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_ANDROID_SERVICE "Build OpenCV Manager for Google Play" OFF IF ANDROID )
OCV_OPTION(BUILD_CUDA_STUBS "Build CUDA modules stubs when no CUDA SDK" OFF IF (NOT IOS) )
# 3rd party libs
@@ -488,7 +507,7 @@ include(cmake/OpenCVModule.cmake)
# Detect endianness of build platform
# ----------------------------------------------------------------------------
if(CMAKE_SYSTEM_NAME STREQUAL iOS)
if(IOS)
# test_big_endian needs try_compile, which doesn't work for iOS
# http://public.kitware.com/Bug/view.php?id=12288
set(WORDS_BIGENDIAN 0)
@@ -618,14 +637,6 @@ if(ANDROID)
add_subdirectory(platforms/android/service)
endif()
if(BUILD_ANDROID_PACKAGE)
add_subdirectory(platforms/android/package)
endif()
if (ANDROID)
add_subdirectory(platforms/android/libinfo)
endif()
# ----------------------------------------------------------------------------
# Finalization: generate configuration-based files
# ----------------------------------------------------------------------------
@@ -750,6 +761,11 @@ else()
endif()
status(" Precompiled headers:" PCHSupport_FOUND AND ENABLE_PRECOMPILED_HEADERS THEN YES ELSE NO)
# ========================== Dependencies ============================
ocv_get_all_libs(deps_modules deps_extra deps_3rdparty)
status(" Extra dependencies:" ${deps_extra})
status(" 3rdparty dependencies:" ${deps_3rdparty})
# ========================== OpenCV modules ==========================
status("")
status(" OpenCV modules:")
@@ -792,7 +808,7 @@ if(ANDROID)
status(" Android toolchain:" "${ANDROID_STANDALONE_TOOLCHAIN}")
endif()
status(" android tool:" ANDROID_EXECUTABLE THEN "${ANDROID_EXECUTABLE} (${ANDROID_TOOLS_Pkg_Desc})" ELSE NO)
status(" Google Play package:" BUILD_ANDROID_PACKAGE THEN YES ELSE NO)
status(" Google Play manager:" BUILD_ANDROID_SERVICE THEN YES ELSE NO)
status(" Android examples:" BUILD_ANDROID_EXAMPLES AND CAN_BUILD_ANDROID_PROJECTS THEN YES ELSE NO)
endif()
@@ -890,7 +906,7 @@ else()
endif()
if( WITH_GDAL )
status(" GDAL:" GDAL_FOUND THEN "${GDAL_LIBRARY}")
status(" GDAL:" GDAL_FOUND THEN "${GDAL_LIBRARY}" ELSE "NO")
else()
status(" GDAL:" "NO")
endif()
@@ -908,15 +924,6 @@ if(DEFINED WITH_1394)
status(" DC1394 2.x:" HAVE_DC1394_2 THEN "YES (ver ${ALIASOF_libdc1394-2_VERSION})" ELSE NO)
endif(DEFINED WITH_1394)
if(ANDROID)
if(HAVE_opencv_androidcamera)
status(" AndroidNativeCamera:" BUILD_ANDROID_CAMERA_WRAPPER
THEN "YES, build for Android${ANDROID_VERSION}" ELSE "YES, use prebuilt libraries")
else()
status(" AndroidNativeCamera:" "NO (native camera requires Android API level 8 or higher)")
endif()
endif()
if(DEFINED WITH_AVFOUNDATION)
status(" AVFoundation:" WITH_AVFOUNDATION THEN YES ELSE NO)
endif(DEFINED WITH_AVFOUNDATION)
@@ -1014,6 +1021,10 @@ if(DEFINED WITH_INTELPERC)
status(" Intel PerC:" HAVE_INTELPERC THEN "YES" ELSE NO)
endif(DEFINED WITH_INTELPERC)
if(DEFINED WITH_GPHOTO2)
status(" gPhoto2:" HAVE_GPHOTO2 THEN "YES" ELSE NO)
endif(DEFINED WITH_GPHOTO2)
# ========================== Other third-party libraries ==========================
status("")
@@ -1039,6 +1050,7 @@ status(" Use OpenMP:" HAVE_OPENMP THEN YES ELSE NO)
status(" Use GCD" HAVE_GCD THEN YES ELSE NO)
status(" Use Concurrency" HAVE_CONCURRENCY THEN YES ELSE NO)
status(" Use C=:" HAVE_CSTRIPES THEN YES ELSE NO)
status(" Use pthreads for parallel for:" HAVE_PTHREADS_PF THEN YES ELSE NO)
status(" Use Cuda:" HAVE_CUDA THEN "YES (ver ${CUDA_VERSION_STRING})" ELSE NO)
status(" Use OpenCL:" HAVE_OPENCL THEN YES ELSE NO)
+3 -1
View File
@@ -54,8 +54,10 @@ bool CvCascadeImageReader::NegReader::nextImg()
for( size_t i = 0; i < count; i++ )
{
src = imread( imgFilenames[last++], 0 );
if( src.empty() )
if( src.empty() ){
last %= count;
continue;
}
round += last / count;
round = round % (winSize.width * winSize.height);
last %= count;
+12 -2
View File
@@ -619,6 +619,8 @@ 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()
@@ -643,6 +645,12 @@ elseif(CUDA_VERSION VERSION_GREATER "5.0" AND CMAKE_CROSSCOMPILING AND "${CUDA_T
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 "${CUDA_TARGET_CPU_ARCH}" STREQUAL "AARCH64")
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/*" )
@@ -1094,8 +1102,10 @@ 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")
+21
View File
@@ -98,6 +98,10 @@ if(CMAKE_COMPILER_IS_GNUCXX)
add_extra_compiler_option(-pthread)
endif()
if(CMAKE_COMPILER_IS_CLANGCXX)
add_extra_compiler_option(-Qunused-arguments)
endif()
if(OPENCV_WARNINGS_ARE_ERRORS)
add_extra_compiler_option(-Werror)
endif()
@@ -127,6 +131,8 @@ if(CMAKE_COMPILER_IS_GNUCXX)
endif()
if(ENABLE_SSE2)
add_extra_compiler_option(-msse2)
elseif(X86 OR X86_64)
add_extra_compiler_option(-mno-sse2)
endif()
if(ENABLE_NEON)
add_extra_compiler_option("-mfpu=neon")
@@ -139,6 +145,8 @@ if(CMAKE_COMPILER_IS_GNUCXX)
if(NOT MINGW)
if(ENABLE_AVX)
add_extra_compiler_option(-mavx)
elseif(X86 OR X86_64)
add_extra_compiler_option(-mno-avx)
endif()
if(ENABLE_AVX2)
add_extra_compiler_option(-mavx2)
@@ -152,18 +160,26 @@ if(CMAKE_COMPILER_IS_GNUCXX)
if(NOT OPENCV_EXTRA_CXX_FLAGS MATCHES "-mavx")
if(ENABLE_SSE3)
add_extra_compiler_option(-msse3)
elseif(X86 OR X86_64)
add_extra_compiler_option(-mno-sse3)
endif()
if(ENABLE_SSSE3)
add_extra_compiler_option(-mssse3)
elseif(X86 OR X86_64)
add_extra_compiler_option(-mno-ssse3)
endif()
if(ENABLE_SSE41)
add_extra_compiler_option(-msse4.1)
elseif(X86 OR X86_64)
add_extra_compiler_option(-mno-sse4.1)
endif()
if(ENABLE_SSE42)
add_extra_compiler_option(-msse4.2)
elseif(X86 OR X86_64)
add_extra_compiler_option(-mno-sse4.2)
endif()
if(ENABLE_POPCNT)
@@ -265,6 +281,11 @@ 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)
# Android does not need these settings because they are already set by toolchain file
+2
View File
@@ -82,6 +82,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)
+6 -3
View File
@@ -180,7 +180,7 @@ unset(__android_project_chain CACHE)
# add_android_project(target_name ${path} NATIVE_DEPS opencv_core LIBRARY_DEPS ${OpenCV_BINARY_DIR} SDK_TARGET 11)
macro(add_android_project target path)
# parse arguments
set(android_proj_arglist NATIVE_DEPS LIBRARY_DEPS SDK_TARGET IGNORE_JAVA IGNORE_MANIFEST)
set(android_proj_arglist NATIVE_DEPS LIBRARY_DEPS SDK_TARGET IGNORE_JAVA IGNORE_MANIFEST COPY_LIBS)
set(__varname "android_proj_")
foreach(v ${android_proj_arglist})
set(${__varname}${v} "")
@@ -334,14 +334,17 @@ macro(add_android_project target path)
add_dependencies(${target} ${android_proj_native_deps})
endif()
if(ANDROID_EXAMPLES_WITH_LIBS)
if (android_proj_COPY_LIBS OR ANDROID_EXAMPLES_WITH_LIBS)
message(STATUS "Android project with libs: " ${target})
add_custom_target(
${target}_copy_libs
COMMAND ${CMAKE_COMMAND} -DSRC_DIR=${OpenCV_BINARY_DIR}/lib -DDST_DIR=${android_proj_bin_dir}/libs -P ${OpenCV_SOURCE_DIR}/cmake/copyAndroidLibs.cmake
WORKING_DIRECTORY ${OpenCV_BINARY_DIR}/lib
DEPENDS "${OpenCV_BINARY_DIR}/bin/classes.jar.dephelper" opencv_java
)
add_dependencies(${target} ${target}_copy_libs)
if (ANDROID_EXAMPLES_WITH_LIBS)
add_dependencies(${target}_copy_libs "${OpenCV_BINARY_DIR}/bin/classes.jar.dephelper" opencv_java)
endif()
endif()
if(__android_project_chain)
+1 -1
View File
@@ -84,7 +84,7 @@ if(CUDA_FOUND)
set(__cuda_arch_bin "3.2")
set(__cuda_arch_ptx "")
elseif(AARCH64)
set(__cuda_arch_bin "5.2")
set(__cuda_arch_bin "5.3")
set(__cuda_arch_ptx "")
endif()
else()
+3 -1
View File
@@ -114,7 +114,7 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*)")
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)
@@ -143,6 +143,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)
+1 -1
View File
@@ -37,7 +37,7 @@ function(find_python preferred_version min_version library_env include_dir_env
# standard FindPythonInterp always prefers executable from system path
# this is really important because we are using the interpreter for numpy search and for choosing the install location
foreach(_CURRENT_VERSION ${Python_ADDITIONAL_VERSIONS} "${preferred_version}" "${min_version}")
find_host_program(executable
find_host_program(PYTHON_EXECUTABLE
NAMES python${_CURRENT_VERSION} python
PATHS
[HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Python\\\\PythonCore\\\\${_CURRENT_VERSION}\\\\InstallPath]
+1 -1
View File
@@ -148,7 +148,7 @@ macro(ipp_detect_version)
list(APPEND IPP_LIBRARIES ipp${name})
# CMake doesn't support "install(TARGETS ${IPP_PREFIX}${name} " command with imported targets
install(FILES ${IPP_LIBRARY_DIR}/${IPP_LIB_PREFIX}${IPP_PREFIX}${name}${IPP_SUFFIX}${IPP_LIB_SUFFIX}
DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT main)
DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
string(TOUPPER ${name} uname)
set(IPP${uname}_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/${OPENCV_3P_LIB_INSTALL_PATH}/${IPP_LIB_PREFIX}${IPP_PREFIX}${name}${IPP_SUFFIX}${IPP_LIB_SUFFIX}" CACHE INTERNAL "" FORCE)
set(IPP${uname}_LOCATION_PATH "${IPP_LIBRARY_DIR}/${IPP_LIB_PREFIX}${IPP_PREFIX}${name}${IPP_SUFFIX}${IPP_LIB_SUFFIX}" CACHE INTERNAL "" FORCE)
+1
View File
@@ -208,5 +208,6 @@ if(WITH_GDAL)
set(HAVE_GDAL NO)
else()
set(HAVE_GDAL YES)
ocv_include_directories(${GDAL_INCLUDE_DIR})
endif()
endif()
+23 -13
View File
@@ -93,8 +93,25 @@ else()
set(HAVE_CSTRIPES 0)
endif()
# --- GCD ---
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)
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}")
file(REMOVE "${_fname}")
else()
set(HAVE_CONCURRENCY 0)
endif()
# --- OpenMP ---
if(WITH_OPENMP AND NOT HAVE_TBB AND NOT HAVE_CSTRIPES)
if(WITH_OPENMP)
find_package(OpenMP)
if(OPENMP_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
@@ -103,19 +120,12 @@ if(WITH_OPENMP AND NOT HAVE_TBB AND NOT HAVE_CSTRIPES)
set(HAVE_OPENMP "${OPENMP_FOUND}")
endif()
# --- GCD ---
if(APPLE AND NOT HAVE_TBB AND NOT HAVE_CSTRIPES AND NOT HAVE_OPENMP)
set(HAVE_GCD 1)
if(UNIX OR ANDROID)
if(NOT APPLE AND NOT HAVE_TBB AND NOT HAVE_OPENMP)
set(HAVE_PTHREADS_PF 1)
else()
set(HAVE_GCD 0)
set(HAVE_PTHREADS_PF 0)
endif()
# --- Concurrency ---
if(MSVC AND NOT HAVE_TBB AND NOT HAVE_CSTRIPES AND NOT HAVE_OPENMP)
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}")
file(REMOVE "${_fname}")
else()
set(HAVE_CONCURRENCY 0)
set(HAVE_PTHREADS_PF 0)
endif()
+49 -37
View File
@@ -216,49 +216,55 @@ 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")
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}")
find_library(FFMPEG_RESAMPLE_LIB "avresample" HINTS "${FFMPEG_LIB_DIR}")
if(FFMPEG_CODEC_LIB)
set(HAVE_FFMPEG_CODEC 1)
endif()
if(FFMPEG_FORMAT_LIB)
set(HAVE_FFMPEG_FORMAT 1)
endif()
if(FFMPEG_UTIL_LIB)
set(HAVE_FFMPEG_UTIL 1)
endif()
if(FFMPEG_SWSCALE_LIB)
set(HAVE_FFMPEG_SWSCALE 1)
endif()
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)
if(EXISTS "${FFMPEG_LIB_DIR}/libavresample.a")
set(HAVE_FFMPEG_RESAMPLE 1)
set(ALIASOF_libavresample_VERSION "Unknown")
endif()
endif()
set(ALIASOF_libavutil_VERSION "Unknown")
set(ALIASOF_libswscale_VERSION "Unknown")
set(HAVE_FFMPEG 1)
if(FFMPEG_RESAMPLE_LIB)
set(HAVE_FFMPEG_RESAMPLE 1)
set(ALIASOF_libavresample_VERSION "Unknown")
endif()
endif()
endif()
endif(FFMPEG_INCLUDE_DIR)
if(HAVE_FFMPEG)
set(VIDEOIO_LIBRARIES ${VIDEOIO_LIBRARIES} "${FFMPEG_LIB_DIR}/libavcodec.a"
"${FFMPEG_LIB_DIR}/libavformat.a" "${FFMPEG_LIB_DIR}/libavutil.a"
"${FFMPEG_LIB_DIR}/libswscale.a")
if(HAVE_FFMPEG_RESAMPLE)
endif(FFMPEG_INCLUDE_DIR)
if(HAVE_FFMPEG)
set(VIDEOIO_LIBRARIES ${VIDEOIO_LIBRARIES} "${FFMPEG_LIB_DIR}/libavcodec.a"
"${FFMPEG_LIB_DIR}/libavformat.a" "${FFMPEG_LIB_DIR}/libavutil.a"
"${FFMPEG_LIB_DIR}/libswscale.a")
if(HAVE_FFMPEG_RESAMPLE)
set(VIDEOIO_LIBRARIES ${VIDEOIO_LIBRARIES} "${FFMPEG_LIB_DIR}/libavresample.a")
endif()
ocv_include_directories(${FFMPEG_INCLUDE_DIR})
endif()
ocv_include_directories(${FFMPEG_INCLUDE_DIR})
endif(HAVE_FFMPEG)
endif()
endif(APPLE)
endif()
endif(WITH_FFMPEG)
# --- VideoInput/DirectShow ---
@@ -305,3 +311,9 @@ endif()
if(WITH_INTELPERC)
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindIntelPerCSDK.cmake")
endif(WITH_INTELPERC)
# --- gPhoto2 ---
ocv_clear_vars(HAVE_GPHOTO2)
if(WITH_GPHOTO2)
CHECK_MODULE(libgphoto2 HAVE_GPHOTO2)
endif(WITH_GPHOTO2)
+1 -24
View File
@@ -19,29 +19,6 @@ if(ANDROID)
set(OPENCV_STATIC_LIBTYPE_CONFIGMAKE ${OPENCV_LIBTYPE_CONFIGMAKE})
endif()
# setup lists of camera libs
foreach(abi ARMEABI ARMEABI_V7A X86 MIPS)
ANDROID_GET_ABI_RAWNAME(${abi} ndkabi)
if(BUILD_ANDROID_CAMERA_WRAPPER)
if(ndkabi STREQUAL ANDROID_NDK_ABI_NAME)
set(OPENCV_CAMERA_LIBS_${abi}_CONFIGCMAKE "native_camera_r${ANDROID_VERSION}")
else()
set(OPENCV_CAMERA_LIBS_${abi}_CONFIGCMAKE "")
endif()
elseif(HAVE_opencv_androidcamera)
set(OPENCV_CAMERA_LIBS_${abi}_CONFIGCMAKE "")
file(GLOB OPENCV_CAMERA_LIBS "${OpenCV_SOURCE_DIR}/3rdparty/lib/${ndkabi}/libnative_camera_r*.so")
if(OPENCV_CAMERA_LIBS)
list(SORT OPENCV_CAMERA_LIBS)
endif()
foreach(cam_lib ${OPENCV_CAMERA_LIBS})
get_filename_component(cam_lib "${cam_lib}" NAME)
string(REGEX REPLACE "lib(native_camera_r[0-9]+\\.[0-9]+\\.[0-9]+)\\.so" "\\1" cam_lib "${cam_lib}")
set(OPENCV_CAMERA_LIBS_${abi}_CONFIGCMAKE "${OPENCV_CAMERA_LIBS_${abi}_CONFIGCMAKE} ${cam_lib}")
endforeach()
endif()
endforeach()
# build the list of opencv libs and dependencies for all modules
ocv_get_all_libs(OPENCV_MODULES_CONFIGMAKE OPENCV_EXTRA_COMPONENTS_CONFIGMAKE OPENCV_3RDPARTY_COMPONENTS_CONFIGMAKE)
@@ -61,7 +38,7 @@ if(ANDROID)
endforeach()
if(BUILD_FAT_JAVA_LIB)
set(OPENCV_LIBS_CONFIGMAKE java)
set(OPENCV_LIBS_CONFIGMAKE java3)
else()
set(OPENCV_LIBS_CONFIGMAKE "${OPENCV_MODULES_CONFIGMAKE}")
endif()
+2
View File
@@ -1,5 +1,7 @@
# platform-specific config file
configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/cvconfig.h.in" "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/cvconfig.h")
configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/cvconfig.h.in" "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/opencv2/cvconfig.h")
install(FILES "${OPENCV_CONFIG_FILE_INCLUDE_DIR}/cvconfig.h" DESTINATION ${OPENCV_INCLUDE_INSTALL_PATH}/opencv2 COMPONENT dev)
# ----------------------------------------------------------------------------
# opencv_modules.hpp based on actual modules list
+67 -56
View File
@@ -8,71 +8,82 @@
#
# ${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)
else()
set(ocv_optkind DBG)
endif()
macro(fix_prefix lst isown)
set(_lst)
foreach(item ${${lst}})
if(TARGET ${item})
get_target_property(item "${item}" LOCATION_${CMAKE_BUILD_TYPE})
if("${isown}")
get_filename_component(item "${item}" NAME_WE)
string(REGEX REPLACE "^lib(.*)" "\\1" item "${item}")
endif()
endif()
if(item MATCHES "^-l")
list(APPEND _lst "${item}")
elseif(item MATCHES "[\\/]")
get_filename_component(libdir "${item}" PATH)
get_filename_component(libname "${item}" NAME_WE)
string(REGEX REPLACE "^lib(.*)" "\\1" libname "${libname}")
list(APPEND _lst "-L${libdir}" "-l${libname}")
else()
list(APPEND _lst "-l${item}")
endif()
endforeach()
set(${lst} ${_lst})
unset(_lst)
endmacro()
#build the list of opencv libs and dependencies for all modules
set(OpenCV_LIB_COMPONENTS "")
set(OpenCV_EXTRA_COMPONENTS "")
foreach(m ${OPENCV_MODULES_PUBLIC})
list(INSERT OpenCV_LIB_COMPONENTS 0 ${${m}_MODULE_DEPS_${ocv_optkind}} ${m})
if(${m}_EXTRA_DEPS_${ocv_optkind})
list(INSERT OpenCV_EXTRA_COMPONENTS 0 ${${m}_EXTRA_DEPS_${ocv_optkind}})
endif()
endforeach()
ocv_list_unique(OpenCV_LIB_COMPONENTS)
ocv_list_unique(OpenCV_EXTRA_COMPONENTS)
ocv_list_reverse(OpenCV_LIB_COMPONENTS)
ocv_list_reverse(OpenCV_EXTRA_COMPONENTS)
# build the list of opencv libs and dependencies for all modules
ocv_get_all_libs(_modules _extra _3rdparty)
#build the list of components
set(OpenCV_LIB_COMPONENTS_ "")
foreach(CVLib ${OpenCV_LIB_COMPONENTS})
if (TARGET ${CVLib})
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()
# Note:
# when linking against static libraries, if libfoo depends on libbar, then
# libfoo must come first in the linker flags.
#need better solution....
if(libpath MATCHES "3rdparty")
set(installDir "share/OpenCV/3rdparty/${OPENCV_LIB_INSTALL_PATH}")
else()
set(installDir "${OPENCV_LIB_INSTALL_PATH}")
endif()
set(OpenCV_LIB_COMPONENTS_ "${OpenCV_LIB_COMPONENTS_} \${exec_prefix}/${installDir}/${libname}")
endif()
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")
endif()
set(OpenCV_LIB_COMPONENTS "${OpenCV_LIB_COMPONENTS} ${maybe_l_prefix}${extra_component}")
endforeach()
# world and contrib_world are special targets whose library should come first,
# especially for static link.
if(_modules MATCHES "opencv_world")
set(_modules "opencv_world")
endif()
if(_modules MATCHES "opencv_contrib_world")
list(REMOVE_ITEM _modules "opencv_contrib_world")
list(INSERT _modules 0 "opencv_contrib_world")
endif()
fix_prefix(_modules TRUE)
fix_prefix(_extra FALSE)
fix_prefix(_3rdparty TRUE)
ocv_list_unique(_modules)
ocv_list_unique(_extra)
ocv_list_unique(_3rdparty)
set(OPENCV_PC_LIBS
"-L\${exec_prefix}/${OPENCV_LIB_INSTALL_PATH}"
"${_modules}"
)
if (BUILD_SHARED_LIBS)
set(OPENCV_PC_LIBS_PRIVATE "${_extra}")
else()
set(OPENCV_PC_LIBS_PRIVATE
"-L\${exec_prefix}/${OPENCV_3P_LIB_INSTALL_PATH}"
"${_3rdparty}"
"${_extra}"
)
endif()
string(REPLACE ";" " " OPENCV_PC_LIBS "${OPENCV_PC_LIBS}")
string(REPLACE ";" " " OPENCV_PC_LIBS_PRIVATE "${OPENCV_PC_LIBS_PRIVATE}")
#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()
+6 -1
View File
@@ -782,9 +782,14 @@ macro(_ocv_create_module)
ocv_install_target(${the_module} EXPORT OpenCVModules OPTIONAL
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()
foreach(m ${OPENCV_MODULE_${the_module}_CHILDREN} ${the_module})
# only "public" headers need to be installed
+16 -2
View File
@@ -78,8 +78,22 @@ set(CPACK_COMPONENT_TESTS_DEPENDS libs)
if(HAVE_CUDA)
string(REPLACE "." "-" cuda_version_suffix ${CUDA_VERSION})
set(CPACK_DEB_LIBS_PACKAGE_DEPENDS "cuda-core-libs-${cuda_version_suffix}, cuda-extra-libs-${cuda_version_suffix}")
set(CPACK_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()
set(CPACK_COMPONENT_dev_DEPENDS libs)
endif()
if(NOT OPENCV_CUSTOM_PACKAGE_INFO)
+16 -1
View File
@@ -796,11 +796,19 @@ macro(ocv_get_all_libs _modules _extra _3rdparty)
set(${_3rdparty} "")
foreach(m ${OPENCV_MODULES_PUBLIC})
get_target_property(deps ${m} INTERFACE_LINK_LIBRARIES)
if(NOT deps)
set(deps "")
endif()
list(INSERT ${_modules} 0 ${deps} ${m})
foreach (dep ${deps} ${OPENCV_LINKER_LIBS})
if (NOT DEFINED OPENCV_MODULE_${dep}_LOCATION)
if (TARGET ${dep})
list(INSERT ${_3rdparty} 0 ${dep})
get_target_property(_output ${dep} ARCHIVE_OUTPUT_DIRECTORY)
if ("${_output}" STREQUAL "${3P_LIBRARY_OUTPUT_PATH}")
list(INSERT ${_3rdparty} 0 ${dep})
else()
list(INSERT ${_extra} 0 ${dep})
endif()
else()
list(INSERT ${_extra} 0 ${dep})
endif()
@@ -808,6 +816,13 @@ macro(ocv_get_all_libs _modules _extra _3rdparty)
endforeach()
endforeach()
# ippicv specific handling
list(FIND ${_extra} "ippicv" ippicv_idx)
if (${ippicv_idx} GREATER -1)
list(REMOVE_ITEM ${_extra} "ippicv")
list(INSERT ${_3rdparty} 0 "ippicv")
endif()
# split 3rdparty libs and modules
list(REMOVE_ITEM ${_modules} ${${_3rdparty}} ${${_extra}})
-25
View File
@@ -54,23 +54,6 @@ else
endif
endif
ifeq ($(OPENCV_CAMERA_MODULES),on)
ifeq ($(TARGET_ARCH_ABI),armeabi)
OPENCV_CAMERA_MODULES:=@OPENCV_CAMERA_LIBS_ARMEABI_CONFIGCMAKE@
endif
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
OPENCV_CAMERA_MODULES:=@OPENCV_CAMERA_LIBS_ARMEABI_V7A_CONFIGCMAKE@
endif
ifeq ($(TARGET_ARCH_ABI),x86)
OPENCV_CAMERA_MODULES:=@OPENCV_CAMERA_LIBS_X86_CONFIGCMAKE@
endif
ifeq ($(TARGET_ARCH_ABI),mips)
OPENCV_CAMERA_MODULES:=@OPENCV_CAMERA_LIBS_MIPS_CONFIGCMAKE@
endif
else
OPENCV_CAMERA_MODULES:=
endif
ifeq ($(OPENCV_LIB_TYPE),SHARED)
OPENCV_LIB_SUFFIX:=so
else
@@ -92,20 +75,12 @@ define add_opencv_3rdparty_component
include $(PREBUILT_STATIC_LIBRARY)
endef
define add_opencv_camera_module
include $(CLEAR_VARS)
LOCAL_MODULE:=$1
LOCAL_SRC_FILES:=$(OPENCV_LIBS_DIR)/lib$1.so
include $(PREBUILT_SHARED_LIBRARY)
endef
ifeq ($(OPENCV_MK_$(OPENCV_TARGET_ARCH_ABI)_ALREADY_INCLUDED),)
ifeq ($(OPENCV_INSTALL_MODULES),on)
$(foreach module,$(OPENCV_LIBS),$(eval $(call add_opencv_module,$(module))))
endif
$(foreach module,$(OPENCV_3RDPARTY_COMPONENTS),$(eval $(call add_opencv_3rdparty_component,$(module))))
$(foreach module,$(OPENCV_CAMERA_MODULES),$(eval $(call add_opencv_camera_module,$(module))))
ifneq ($(OPENCV_BASEDIR),)
OPENCV_LOCAL_C_INCLUDES += $(foreach mod, $(OPENCV_MODULES), $(OPENCV_BASEDIR)/modules/$(mod)/include)
+7 -22
View File
@@ -34,7 +34,6 @@
# - OpenCV_LIB_COMPONENTS : Present OpenCV modules list
# - OpenCV_USE_MANGLED_PATHS : Mangled OpenCV path flag
# - OpenCV_MODULES_SUFFIX : The suffix for OpenCVModules-XXX.cmake file
# - OpenCV_HAVE_ANDROID_CAMERA : Presence of Android native camera wrappers
#
# Deprecated variables:
# - OpenCV_VERSION_TWEAK : Always "0"
@@ -77,6 +76,13 @@ if("@USE_IPPICV@" STREQUAL "TRUE") # value is defined by package builder (use ST
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()
@@ -120,9 +126,6 @@ if(NOT WIN32 OR ANDROID)
endif()
endif()
# Presence of Android native camera wrappers
set(OpenCV_HAVE_ANDROID_CAMERA @HAVE_opencv_androidcamera@)
# ======================================================
# Include directories to add to the user project:
# ======================================================
@@ -317,24 +320,6 @@ foreach(__opttype OPT DBG)
endif()
endforeach()
# ==============================================================
# Android camera helper macro
# ==============================================================
if(OpenCV_HAVE_ANDROID_CAMERA)
macro(COPY_NATIVE_CAMERA_LIBS target)
get_target_property(target_location ${target} LOCATION)
get_filename_component(target_location "${target_location}" PATH)
file(GLOB camera_wrappers "${OpenCV_LIB_DIR_OPT}/libnative_camera_r*.so")
foreach(wrapper ${camera_wrappers})
add_custom_command(
TARGET ${target}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy "${wrapper}" "${target_location}"
)
endforeach()
endmacro()
endif()
# ==============================================================
# Compatibility stuff
# ==============================================================
+3
View File
@@ -178,3 +178,6 @@
/* Define if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#cmakedefine WORDS_BIGENDIAN
/* gPhoto2 library */
#cmakedefine HAVE_GPHOTO2
+2 -1
View File
@@ -9,5 +9,6 @@ includedir_new=@includedir@
Name: OpenCV
Description: Open Source Computer Vision Library
Version: @OPENCV_VERSION_PLAIN@
Libs: @OpenCV_LIB_COMPONENTS@
Libs: @OPENCV_PC_LIBS@
Libs.private: @OPENCV_PC_LIBS_PRIVATE@
Cflags: -I${includedir_old} -I${includedir_new}
Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

+2 -3
View File
@@ -111,12 +111,11 @@ if(BUILD_DOCS AND DOXYGEN_FOUND)
set(faqfile "${CMAKE_CURRENT_SOURCE_DIR}/faq.markdown")
set(tutorial_path "${CMAKE_CURRENT_SOURCE_DIR}/tutorials")
set(tutorial_py_path "${CMAKE_CURRENT_SOURCE_DIR}/py_tutorials")
set(user_guide_path "${CMAKE_CURRENT_SOURCE_DIR}/user_guide")
set(example_path "${CMAKE_SOURCE_DIR}/samples")
# set export variables
string(REPLACE ";" " \\\n" CMAKE_DOXYGEN_INPUT_LIST "${rootfile} ; ${faqfile} ; ${paths_include} ; ${paths_doc} ; ${tutorial_path} ; ${tutorial_py_path} ; ${user_guide_path} ; ${paths_tutorial}")
string(REPLACE ";" " \\\n" CMAKE_DOXYGEN_IMAGE_PATH "${paths_doc} ; ${tutorial_path} ; ${tutorial_py_path} ; ${user_guide_path} ; ${paths_tutorial}")
string(REPLACE ";" " \\\n" CMAKE_DOXYGEN_INPUT_LIST "${rootfile} ; ${faqfile} ; ${paths_include} ; ${paths_doc} ; ${tutorial_path} ; ${tutorial_py_path} ; ${paths_tutorial}")
string(REPLACE ";" " \\\n" CMAKE_DOXYGEN_IMAGE_PATH "${paths_doc} ; ${tutorial_path} ; ${tutorial_py_path} ; ${paths_tutorial}")
# TODO: remove paths_doc from EXAMPLE_PATH after face module tutorials/samples moved to separate folders
string(REPLACE ";" " \\\n" CMAKE_DOXYGEN_EXAMPLE_PATH "${example_path} ; ${paths_doc} ; ${paths_sample}")
set(CMAKE_DOXYGEN_LAYOUT "${CMAKE_CURRENT_SOURCE_DIR}/DoxygenLayout.xml")
+8
View File
@@ -625,6 +625,14 @@
pages = {430--443},
publisher = {Springer}
}
@inproceedings{mair2010_agast,
title={Adaptive and Generic Corner Detection Based on the Accelerated Segment Test"},
author={"Elmar Mair and Gregory D. Hager and Darius Burschka and Michael Suppa and Gerhard Hirzinger"},
year={"2010"},
month={"September"},
booktitle={"European Conference on Computer Vision (ECCV'10)"},
url={"http://www6.in.tum.de/Main/ResearchAgast"
}
@ARTICLE{Rubner2000,
author = {Rubner, Yossi and Tomasi, Carlo and Guibas, Leonidas J},
title = {The earth mover's distance as a metric for image retrieval},
@@ -22,17 +22,17 @@ red line. All the expected straight lines are bulged out. Visit [Distortion
![image](images/calib_radial.jpg)
This distortion is solved as follows:
This distortion is represented as follows:
\f[x_{corrected} = x( 1 + k_1 r^2 + k_2 r^4 + k_3 r^6) \\
y_{corrected} = y( 1 + k_1 r^2 + k_2 r^4 + k_3 r^6)\f]
\f[x_{distorted} = x( 1 + k_1 r^2 + k_2 r^4 + k_3 r^6) \\
y_{distorted} = y( 1 + k_1 r^2 + k_2 r^4 + k_3 r^6)\f]
Similarly, another distortion is the tangential distortion which occurs because image taking lense
is not aligned perfectly parallel to the imaging plane. So some areas in image may look nearer than
expected. It is solved as below:
expected. It is represented as below:
\f[x_{corrected} = x + [ 2p_1xy + p_2(r^2+2x^2)] \\
y_{corrected} = y + [ p_1(r^2+ 2y^2)+ 2p_2xy]\f]
\f[x_{distorted} = x + [ 2p_1xy + p_2(r^2+2x^2)] \\
y_{distorted} = y + [ p_1(r^2+ 2y^2)+ 2p_2xy]\f]
In short, we need to find five parameters, known as distortion coefficients given by:
@@ -34,7 +34,7 @@ Object Tracking
---------------
Now we know how to convert BGR image to HSV, we can use this to extract a colored object. In HSV, it
is more easier to represent a color than RGB color-space. In our application, we will try to extract
is more easier to represent a color than in BGR color-space. In our application, we will try to extract
a blue colored object. So here is the method:
- Take each frame of the video
@@ -89,7 +89,7 @@ just by moving your hand in front of camera and many other funny stuffs.
How to find HSV values to track?
--------------------------------
This is a common question found in [stackoverflow.com](www.stackoverflow.com). It is very simple and
This is a common question found in [stackoverflow.com](http://www.stackoverflow.com). It is very simple and
you can use the same function, cv2.cvtColor(). Instead of passing an image, you just pass the BGR
values you want. For example, to find the HSV value of Green, try following commands in Python
terminal:
@@ -85,7 +85,7 @@ Haar-cascade Detection in OpenCV
OpenCV comes with a trainer as well as detector. If you want to train your own classifier for any
object like car, planes etc. you can use OpenCV to create one. Its full details are given here:
[Cascade Classifier Training.](http://docs.opencv.org/doc/user_guide/ug_traincascade.html)
[Cascade Classifier Training](@ref tutorial_traincascade).
Here we will deal with detection. OpenCV already contains many pre-trained classifiers for face,
eyes, smile etc. Those XML files are stored in opencv/data/haarcascades/ folder. Let's create face
@@ -194,15 +194,15 @@ while(1):
mag, ang = cv2.cartToPolar(flow[...,0], flow[...,1])
hsv[...,0] = ang*180/np.pi/2
hsv[...,2] = cv2.normalize(mag,None,0,255,cv2.NORM_MINMAX)
rgb = cv2.cvtColor(hsv,cv2.COLOR_HSV2BGR)
bgr = cv2.cvtColor(hsv,cv2.COLOR_HSV2BGR)
cv2.imshow('frame2',rgb)
cv2.imshow('frame2',bgr)
k = cv2.waitKey(30) & 0xff
if k == 27:
break
elif k == ord('s'):
cv2.imwrite('opticalfb.png',frame2)
cv2.imwrite('opticalhsv.png',rgb)
cv2.imwrite('opticalhsv.png',bgr)
prvs = next
cap.release()
-1
View File
@@ -4,7 +4,6 @@ OpenCV modules {#mainpage}
- @ref intro
- @ref tutorial_root
- @ref tutorial_py_root
- @ref tutorial_user_guide
- @ref faq
- @ref citelist
@@ -14,18 +14,18 @@ Theory
For the distortion OpenCV takes into account the radial and tangential factors. For the radial
factor one uses the following formula:
\f[x_{corrected} = x( 1 + k_1 r^2 + k_2 r^4 + k_3 r^6) \\
y_{corrected} = y( 1 + k_1 r^2 + k_2 r^4 + k_3 r^6)\f]
\f[x_{distorted} = x( 1 + k_1 r^2 + k_2 r^4 + k_3 r^6) \\
y_{distorted} = y( 1 + k_1 r^2 + k_2 r^4 + k_3 r^6)\f]
So for an old pixel point at \f$(x,y)\f$ coordinates in the input image, its position on the corrected
output image will be \f$(x_{corrected} y_{corrected})\f$. The presence of the radial distortion
manifests in form of the "barrel" or "fish-eye" effect.
So for an undistorted pixel point at \f$(x,y)\f$ coordinates, its position on the distorted image
will be \f$(x_{distorted} y_{distorted})\f$. The presence of the radial distortion manifests in form
of the "barrel" or "fish-eye" effect.
Tangential distortion occurs because the image taking lenses are not perfectly parallel to the
imaging plane. It can be corrected via the formulas:
imaging plane. It can be represented via the formulas:
\f[x_{corrected} = x + [ 2p_1xy + p_2(r^2+2x^2)] \\
y_{corrected} = y + [ p_1(r^2+ 2y^2)+ 2p_2xy]\f]
\f[x_{distorted} = x + [ 2p_1xy + p_2(r^2+2x^2)] \\
y_{distorted} = y + [ p_1(r^2+ 2y^2)+ 2p_2xy]\f]
So we have five distortion parameters which in OpenCV are presented as one row matrix with 5
columns:
@@ -22,7 +22,7 @@ From our previous tutorial, we know already a bit of *Pixel operators*. An inter
\f[g(x) = (1 - \alpha)f_{0}(x) + \alpha f_{1}(x)\f]
By varying \f$\alpha\f$ from \f$0 \rightarrow 1\f$ this operator can be used to perform a temporal
*cross-disolve* between two images or videos, as seen in slide shows and film productions (cool,
*cross-dissolve* between two images or videos, as seen in slide shows and film productions (cool,
eh?)
Code
@@ -35,13 +35,13 @@ Point pt = Point(10, 8);
- Represents a 4-element vector. The type Scalar is widely used in OpenCV for passing pixel
values.
- In this tutorial, we will use it extensively to represent RGB color values (3 parameters). It is
- In this tutorial, we will use it extensively to represent BGR color values (3 parameters). It is
not necessary to define the last argument if it is not going to be used.
- Let's see an example, if we are asked for a color argument and we give:
@code{.cpp}
Scalar( a, b, c )
@endcode
We would be defining a RGB color such as: *Red = c*, *Green = b* and *Blue = a*
We would be defining a BGR color such as: *Blue = a*, *Green = b* and *Red = c*
Code
----
@@ -145,7 +145,7 @@ Explanation
of size **(w/4.0, w/16.0)**
- The ellipse is rotated **angle** degrees
- The ellipse extends an arc between **0** and **360** degrees
- The color of the figure will be **Scalar( 255, 255, 0)** which means blue in RGB value.
- The color of the figure will be **Scalar( 255, 0, 0)** which means blue in RGB value.
- The ellipse's **thickness** is 2.
- *MyFilledCircle*
@code{.cpp}
@@ -122,8 +122,8 @@ Explanation
*image.size()* and *image.type()*
-# Now, to perform the operation \f$g(i,j) = \alpha \cdot f(i,j) + \beta\f$ we will access to each
pixel in image. Since we are operating with RGB images, we will have three values per pixel (R,
G and B), so we will also access them separately. Here is the piece of code:
pixel in image. Since we are operating with BGR images, we will have three values per pixel (B,
G and R), so we will also access them separately. Here is the piece of code:
@code{.cpp}
for( int y = 0; y < image.rows; y++ ) {
for( int x = 0; x < image.cols; x++ ) {
@@ -22,7 +22,7 @@ library.
Here's a sample code of how to achieve all the stuff enumerated at the goal list.
@includelineno cpp/tutorial_code/core/file_input_output/file_input_output.cpp
@include cpp/tutorial_code/core/file_input_output/file_input_output.cpp
Explanation
-----------
@@ -57,7 +57,7 @@ the samples directory of OpenCV at the cpp tutorial code for the core section. I
how_to_scan_images imageName.jpg intValueToReduce [G]
@endcode
The final argument is optional. If given the image will be loaded in gray scale format, otherwise
the RGB color way is used. The first thing is to calculate the lookup table.
the BGR color space is used. The first thing is to calculate the lookup table.
@snippet how_to_scan_images.cpp dividewith
@@ -88,7 +88,7 @@ case of a gray scale image we have something like:
![](tutorial_how_matrix_stored_1.png)
For multichannel images the columns contain as many sub columns as the number of channels. For
example in case of an RGB color system:
example in case of an BGR color system:
![](tutorial_how_matrix_stored_2.png)
@@ -18,7 +18,7 @@ You may also find the source code in the
`samples/cpp/tutorial_code/core/ippasync/ippasync_sample.cpp` file of the OpenCV source library or
download it from [here](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/core/ippasync/ippasync_sample.cpp).
@includelineno cpp/tutorial_code/core/ippasync/ippasync_sample.cpp
@include cpp/tutorial_code/core/ippasync/ippasync_sample.cpp
Explanation
-----------
@@ -101,7 +101,7 @@ possible to use the old functions and in the end just transform the result to a
@snippet interoperability_with_OpenCV_1.cpp new
Because, we want to mess around with the images luma component we first convert from the default RGB
Because, we want to mess around with the images luma component we first convert from the default BGR
to the YUV color space and then split the result up into separate planes. Here the program splits:
in the first example it processes each plane using one of the three major image scanning algorithms
in OpenCV (C [] operator, iterator, individual element access). In a second variant we add to the
@@ -1,4 +1,4 @@
Operations with images {#tutorial_ug_mat}
Operations with images {#tutorial_mat_operations}
======================
Input/Output
@@ -27,11 +27,6 @@ If you read a jpg file, a 3 channel image is created by default. If you need a g
@note use imdecode and imencode to read and write image from/to memory rather than a file.
XML/YAML
--------
TBD
Basic operations with images
----------------------------
@@ -118,8 +118,8 @@ added.
There are, however, many other color systems each with their own advantages:
- RGB is the most common as our eyes use something similar, our display systems also compose
colors using these.
- RGB is the most common as our eyes use something similar, however keep in mind that OpenCV standard display
system composes colors using the BGR color space (a switch of the red and blue channel).
- The HSV and HLS decompose colors into their hue, saturation and value/luminance components,
which is a more natural way for us to describe colors. You might, for example, dismiss the last
component, making your algorithm less sensible to the light conditions of the input image.
@@ -111,7 +111,7 @@ Explanation
pt1.y = rng.uniform( y_1, y_2 );
@endcode
- We know that **rng** is a *Random number generator* object. In the code above we are
calling **rng.uniform(a,b)**. This generates a radombly uniformed distribution between
calling **rng.uniform(a,b)**. This generates a randomly uniformed distribution between
the values **a** and **b** (inclusive in **a**, exclusive in **b**).
- From the explanation above, we deduce that the extremes *pt1* and *pt2* will be random
values, so the lines positions will be quite impredictable, giving a nice visual effect
@@ -133,7 +133,7 @@ Explanation
are used as the *R*, *G* and *B* parameters for the line color. Hence, the color of the
lines will be random too!
-# The explanation above applies for the other functions generating circles, ellipses, polygones,
-# The explanation above applies for the other functions generating circles, ellipses, polygons,
etc. The parameters such as *center* and *vertices* are also generated randomly.
-# Before finishing, we also should take a look at the functions *Display_Random_Text* and
*Displaying_Big_End*, since they both have a few interesting features:
@@ -32,6 +32,9 @@ understanding how to manipulate the images on a pixel level.
You'll find out how to scan images with neighbor access and use the @ref cv::filter2D
function to apply kernel filters on images.
- @subpage tutorial_mat_operations
Reading/writing images from file, accessing pixels, primitive operations, visualizing images.
- @subpage tutorial_adding_images
@@ -31,7 +31,7 @@ You can find the images (*graf1.png*, *graf3.png*) and homography (*H1to3p.xml*)
### Source Code
@includelineno cpp/tutorial_code/features2D/AKAZE_match.cpp
@include cpp/tutorial_code/features2D/AKAZE_match.cpp
### Explanation
@@ -36,7 +36,7 @@ To run the code you have to specify input and output video path and object bound
Source Code
-----------
@includelineno cpp/tutorial_code/features2D/AKAZE_tracking/planar_tracking.cpp
@include cpp/tutorial_code/features2D/AKAZE_tracking/planar_tracking.cpp
Explanation
-----------
@@ -49,13 +49,13 @@ int main( int argc, char** argv )
int minHessian = 400;
Ptr<SURF> detector = SURF::create();
detector->setMinHessian(minHessian);
detector->setHessianThreshold(minHessian);
std::vector<KeyPoint> keypoints_1, keypoints_2;
Mat descriptors_1, descriptors_2;
detector->detectAndCompute( img_1, keypoints_1, descriptors_1 );
detector->detectAndCompute( img_2, keypoints_2, descriptors_2 );
detector->detectAndCompute( img_1, Mat(), keypoints_1, descriptors_1 );
detector->detectAndCompute( img_2, Mat(), keypoints_2, descriptors_2 );
//-- Step 2: Matching descriptor vectors with a brute force matcher
BFMatcher matcher(NORM_L2);
@@ -58,13 +58,13 @@ int main( int argc, char** argv )
int minHessian = 400;
Ptr<SURF> detector = SURF::create();
detector->setMinHessian(minHessian);
detector->setHessianThreshold(minHessian);
std::vector<KeyPoint> keypoints_1, keypoints_2;
Mat descriptors_1, descriptors_2;
detector->detectAndCompute( img_1, keypoints_1, descriptors_1 );
detector->detectAndCompute( img_2, keypoints_2, descriptors_2 );
detector->detectAndCompute( img_1, Mat(), keypoints_1, descriptors_1 );
detector->detectAndCompute( img_2, Mat(), keypoints_2, descriptors_2 );
//-- Step 2: Matching descriptor vectors using FLANN matcher
FlannBasedMatcher matcher;
@@ -20,6 +20,7 @@ This tutorial code's is shown lines below.
#include <stdio.h>
#include <iostream>
#include "opencv2/core.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/features2d.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/calib3d.hpp"
@@ -50,8 +51,8 @@ int main( int argc, char** argv )
std::vector<KeyPoint> keypoints_object, keypoints_scene;
Mat descriptors_object, descriptors_scene;
detector->detectAndCompute( img_object, keypoints_object, descriptors_object );
detector->detectAndCompute( img_scene, keypoints_scene, descriptors_scene );
detector->detectAndCompute( img_object, Mat(), keypoints_object, descriptors_object );
detector->detectAndCompute( img_scene, Mat(), keypoints_scene, descriptors_scene );
//-- Step 2: Matching descriptor vectors using FLANN matcher
FlannBasedMatcher matcher;
@@ -81,13 +82,13 @@ int main( int argc, char** argv )
Mat img_matches;
drawMatches( img_object, keypoints_object, img_scene, keypoints_scene,
good_matches, img_matches, Scalar::all(-1), Scalar::all(-1),
vector<char>(), DrawMatchesFlags::NOT_DRAW_SINGLE_POINTS );
std::vector<char>(), DrawMatchesFlags::NOT_DRAW_SINGLE_POINTS );
//-- Localize the object
std::vector<Point2f> obj;
std::vector<Point2f> scene;
for( int i = 0; i < good_matches.size(); i++ )
for( size_t i = 0; i < good_matches.size(); i++ )
{
//-- Get the keypoints from the good matches
obj.push_back( keypoints_object[ good_matches[i].queryIdx ].pt );
@@ -22,7 +22,7 @@ Code
This tutorial code's is shown lines below. You can also download it from
[here](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/TrackingMotion/cornerDetector_Demo.cpp)
@includelineno cpp/tutorial_code/TrackingMotion/cornerDetector_Demo.cpp
@include cpp/tutorial_code/TrackingMotion/cornerDetector_Demo.cpp
Explanation
-----------
@@ -96,7 +96,7 @@ void goodFeaturesToTrack_Demo( int, void* )
/// Draw corners detected
cout<<"** Number of corners detected: "<<corners.size()<<endl;
int r = 4;
for( int i = 0; i < corners.size(); i++ )
for( size_t i = 0; i < corners.size(); i++ )
{ circle( copy, corners[i], r, Scalar(rng.uniform(0,255), rng.uniform(0,255),
rng.uniform(0,255)), -1, 8, 0 ); }
@@ -1,4 +1,4 @@
Using Creative Senz3D and other Intel Perceptual Computing SDK compatible depth sensors {#tutorial_ug_intelperc}
Using Creative Senz3D and other Intel Perceptual Computing SDK compatible depth sensors {#tutorial_intelperc}
=======================================================================================
Depth sensors compatible with Intel Perceptual Computing SDK are supported through VideoCapture
@@ -78,5 +78,5 @@ there are two flags that should be used to set/get property of the needed genera
flag value is assumed by default if neither of the two possible values of the property is set.
For more information please refer to the example of usage
[intelpercccaptureccpp](https://github.com/Itseez/opencv/tree/master/samples/cpp/intelperc_capture.cpp)
[intelperc_capture.cpp](https://github.com/Itseez/opencv/tree/master/samples/cpp/intelperc_capture.cpp)
in opencv/samples/cpp folder.
@@ -1,8 +1,8 @@
Using Kinect and other OpenNI compatible depth sensors {#tutorial_ug_highgui}
Using Kinect and other OpenNI compatible depth sensors {#tutorial_kinect_openni}
======================================================
Depth sensors compatible with OpenNI (Kinect, XtionPRO, ...) are supported through VideoCapture
class. Depth map, RGB image and some other formats of output can be retrieved by using familiar
class. Depth map, BGR image and some other formats of output can be retrieved by using familiar
interface of VideoCapture.
In order to use depth sensor with OpenCV you should do the following preliminary steps:
@@ -46,7 +46,7 @@ VideoCapture can retrieve the following data:
- CAP_OPENNI_VALID_DEPTH_MASK - mask of valid pixels (not ocluded, not shaded etc.)
(CV_8UC1)
-# data given from RGB image generator:
-# data given from BGR image generator:
- CAP_OPENNI_BGR_IMAGE - color image (CV_8UC3)
- CAP_OPENNI_GRAY_IMAGE - gray image (CV_8UC1)
@@ -134,5 +134,5 @@ property. The following properties of cameras available through OpenNI interface
- CAP_OPENNI_DEPTH_GENERATOR_REGISTRATION = CAP_OPENNI_DEPTH_GENERATOR + CAP_PROP_OPENNI_REGISTRATION
For more information please refer to the example of usage
[openniccaptureccpp](https://github.com/Itseez/opencv/tree/master/samples/cpp/openni_capture.cpp) in
[openni_capture.cpp](https://github.com/Itseez/opencv/tree/master/samples/cpp/openni_capture.cpp) in
opencv/samples/cpp folder.
@@ -28,7 +28,7 @@ of the bay rise 10, 50, and 100 meters.
Code
----
@includelineno cpp/tutorial_code/HighGUI/GDAL_IO/gdal-image.cpp
@include cpp/tutorial_code/HighGUI/GDAL_IO/gdal-image.cpp
How to Read Raster Data using GDAL
----------------------------------
@@ -37,3 +37,7 @@ use the built-in graphical user interface of the library.
*Author:* Marvin Smith
Read common GIS Raster and DEM files to display and manipulate geographic data.
- @subpage tutorial_kinect_openni
- @subpage tutorial_intelperc
@@ -25,7 +25,7 @@ version of it ](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutoria
You may also find the source code and these video file in the
`samples/cpp/tutorial_code/HighGUI/video-input-psnr-ssim/` folder of the OpenCV source library.
@includelineno cpp/tutorial_code/HighGUI/video-input-psnr-ssim/video-input-psnr-ssim.cpp
@include cpp/tutorial_code/HighGUI/video-input-psnr-ssim/video-input-psnr-ssim.cpp
How to read a video stream (online-camera or offline-file)?
-----------------------------------------------------------
@@ -12,7 +12,7 @@ class, designed for this.
- What type of video files you can create with OpenCV
- How to extract a given color channel from a video
As a simple demonstration I'll just extract one of the RGB color channels of an input video file
As a simple demonstration I'll just extract one of the BGR color channels of an input video file
into a new video. You can control the flow of the application from its console line arguments:
- The first argument points to the video file to work on
@@ -33,7 +33,7 @@ You may also find the source code and these video file in the
`samples/cpp/tutorial_code/highgui/video-write/` folder of the OpenCV source library or [download it
from here ](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/HighGUI/video-write/video-write.cpp).
@includelineno cpp/tutorial_code/HighGUI/video-write/video-write.cpp
@include cpp/tutorial_code/HighGUI/video-write/video-write.cpp
The structure of a video
------------------------
@@ -134,7 +134,7 @@ the object with success you can send the frames of the video in a sequential ord
outputVideo.write(res); //or
outputVideo << res;
@endcode
Extracting a color channel from an RGB image means to set to zero the RGB values of the other
Extracting a color channel from an BGR image means to set to zero the BGR values of the other
channels. You can either do this with image scanning operations or by using the split and merge
operations. You first split the channels up into different images, set the other channels to zero
images of the same size and type and finally merge them back:
@@ -61,7 +61,7 @@ Code
This tutorial code's is shown lines below. You can also download it from
[here](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/ImgProc/Morphology_1.cpp)
@includelineno samples/cpp/tutorial_code/ImgProc/Morphology_1.cpp
@include samples/cpp/tutorial_code/ImgProc/Morphology_1.cpp
Explanation
-----------
@@ -69,7 +69,7 @@ Explanation
-# Most of the stuff shown is known by you (if you have any doubt, please refer to the tutorials in
previous sections). Let's check the general structure of the program:
- Load an image (can be RGB or grayscale)
- Load an image (can be BGR or grayscale)
- Create two windows (one for dilation output, the other for erosion)
- Create a set of 02 Trackbars for each operation:
- The first trackbar "Element" returns either **erosion_elem** or **dilation_elem**
@@ -80,7 +80,7 @@ Code
in samples.
- **Code at glance:**
@includelineno samples/cpp/tutorial_code/Histograms_Matching/calcBackProject_Demo1.cpp
@include samples/cpp/tutorial_code/Histograms_Matching/calcBackProject_Demo1.cpp
Explanation
-----------
@@ -68,7 +68,7 @@ Code
- **Downloadable code**: Click
[here](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/Histograms_Matching/calcHist_Demo.cpp)
- **Code at glance:**
@includelineno samples/cpp/tutorial_code/Histograms_Matching/calcHist_Demo.cpp
@include samples/cpp/tutorial_code/Histograms_Matching/calcHist_Demo.cpp
Explanation
-----------
@@ -47,13 +47,13 @@ Code
[here](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/Histograms_Matching/compareHist_Demo.cpp)
- **Code at glance:**
@includelineno cpp/tutorial_code/Histograms_Matching/compareHist_Demo.cpp
@include cpp/tutorial_code/Histograms_Matching/compareHist_Demo.cpp
Explanation
-----------
-# Declare variables such as the matrices to store the base image and the two other images to
compare ( RGB and HSV )
compare ( BGR and HSV )
@code{.cpp}
Mat src_base, hsv_base;
Mat src_test1, hsv_test1;
@@ -64,7 +64,7 @@ Code
- **Downloadable code**: Click
[here](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/Histograms_Matching/EqualizeHist_Demo.cpp)
- **Code at glance:**
@includelineno samples/cpp/tutorial_code/Histograms_Matching/EqualizeHist_Demo.cpp
@include samples/cpp/tutorial_code/Histograms_Matching/EqualizeHist_Demo.cpp
Explanation
-----------
@@ -98,7 +98,7 @@ Code
- **Downloadable code**: Click
[here](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/Histograms_Matching/MatchTemplate_Demo.cpp)
- **Code at glance:**
@includelineno samples/cpp/tutorial_code/Histograms_Matching/MatchTemplate_Demo.cpp
@include samples/cpp/tutorial_code/Histograms_Matching/MatchTemplate_Demo.cpp
Explanation
-----------
@@ -75,7 +75,7 @@ Code
-# The tutorial code's is shown lines below. You can also download it from
[here](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/ImgTrans/CannyDetector_Demo.cpp)
@includelineno samples/cpp/tutorial_code/ImgTrans/CannyDetector_Demo.cpp
@include samples/cpp/tutorial_code/ImgTrans/CannyDetector_Demo.cpp
Explanation
-----------
@@ -47,7 +47,7 @@ Code
-# The tutorial code's is shown lines below. You can also download it from
[here](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/ImgTrans/copyMakeBorder_demo.cpp)
@includelineno samples/cpp/tutorial_code/ImgTrans/copyMakeBorder_demo.cpp
@include samples/cpp/tutorial_code/ImgTrans/copyMakeBorder_demo.cpp
Explanation
-----------
@@ -18,7 +18,7 @@ Code
This tutorial code's is shown lines below. You can also download it from
[here](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/ImgTrans/imageSegmentation.cpp).
@includelineno samples/cpp/tutorial_code/ImgTrans/imageSegmentation.cpp
@include samples/cpp/tutorial_code/ImgTrans/imageSegmentation.cpp
Explanation / Result
--------------------
@@ -42,7 +42,7 @@ Code
-# The sample code that we will explain can be downloaded from [here](https://github.com/Itseez/opencv/tree/master/samples/cpp/houghcircles.cpp).
A slightly fancier version (which shows trackbars for
changing the threshold values) can be found [here](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/ImgTrans/HoughCircle_Demo.cpp).
@includelineno samples/cpp/houghcircles.cpp
@include samples/cpp/houghcircles.cpp
Explanation
-----------
@@ -55,7 +55,7 @@ Arranging the terms: \f$r = x \cos \theta + y \sin \theta\f$
-# We can do the same operation above for all the points in an image. If the curves of two
different points intersect in the plane \f$\theta\f$ - \f$r\f$, that means that both points belong to a
same line. For instance, following with the example above and drawing the plot for two more
points: \f$x_{1} = 9\f$, \f$y_{1} = 4\f$ and \f$x_{2} = 12\f$, \f$y_{2} = 3\f$, we get:
points: \f$x_{1} = 4\f$, \f$y_{1} = 9\f$ and \f$x_{2} = 12\f$, \f$y_{2} = 3\f$, we get:
![](images/Hough_Lines_Tutorial_Theory_2.jpg)
@@ -98,7 +98,7 @@ Code
-# The sample code that we will explain can be downloaded from [here](https://github.com/Itseez/opencv/tree/master/samples/cpp/houghlines.cpp). A slightly fancier version
(which shows both Hough standard and probabilistic with trackbars for changing the threshold
values) can be found [here](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/ImgTrans/HoughLines_Demo.cpp).
@includelineno samples/cpp/houghlines.cpp
@include samples/cpp/houghlines.cpp
Explanation
-----------
@@ -52,7 +52,7 @@ Code
-# The tutorial code's is shown lines below. You can also download it from
[here](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/ImgTrans/Laplace_Demo.cpp)
@includelineno samples/cpp/tutorial_code/ImgTrans/Laplace_Demo.cpp
@include samples/cpp/tutorial_code/ImgTrans/Laplace_Demo.cpp
Explanation
-----------
@@ -53,7 +53,7 @@ Code
-# The tutorial code's is shown lines below. You can also download it from
[here](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/ImgTrans/Remap_Demo.cpp)
@includelineno samples/cpp/tutorial_code/ImgTrans/Remap_Demo.cpp
@include samples/cpp/tutorial_code/ImgTrans/Remap_Demo.cpp
Explanation
-----------
@@ -109,7 +109,7 @@ Code
-# The tutorial code's is shown lines below. You can also download it from
[here](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/ImgTrans/Sobel_Demo.cpp)
@includelineno samples/cpp/tutorial_code/ImgTrans/Sobel_Demo.cpp
@include samples/cpp/tutorial_code/ImgTrans/Sobel_Demo.cpp
Explanation
-----------
@@ -90,7 +90,7 @@ Code
-# The tutorial code's is shown lines below. You can also download it from
[here](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/ImgTrans/Geometric_Transforms_Demo.cpp)
@includelineno samples/cpp/tutorial_code/ImgTrans/Geometric_Transforms_Demo.cpp
@include samples/cpp/tutorial_code/ImgTrans/Geometric_Transforms_Demo.cpp
Explanation
-----------
@@ -21,7 +21,7 @@ Morphology is a set of image processing operations that process images based on
Two of the most basic morphological operations are dilation and erosion. Dilation adds pixels to the boundaries of the object in an image, while erosion does exactly the opposite. The amount of pixels added or removed, respectively depends on the size and shape of the structuring element used to process the image. In general the rules followed from these two operations have as follows:
- __Dilation__: The value of the output pixel is the <b><em>maximum</em></b> value of all the pixels that fall within the structuring element's size and shape. For example in a binary image, if any of the pixels of the input image falling within the range of the kernel is set to the value 1, the corresponding pixel of the output image will be set to 1 as well. The latter applies to any type of image (e.g. grayscale, rgb, etc).
- __Dilation__: The value of the output pixel is the <b><em>maximum</em></b> value of all the pixels that fall within the structuring element's size and shape. For example in a binary image, if any of the pixels of the input image falling within the range of the kernel is set to the value 1, the corresponding pixel of the output image will be set to 1 as well. The latter applies to any type of image (e.g. grayscale, bgr, etc).
![Dilation on a Binary Image](images/morph21.gif)
@@ -49,7 +49,7 @@ Code
----
This tutorial code's is shown lines below. You can also download it from [here](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/ImgProc/Morphology_3.cpp).
@includelineno samples/cpp/tutorial_code/ImgProc/Morphology_3.cpp
@include samples/cpp/tutorial_code/ImgProc/Morphology_3.cpp
Explanation / Result
--------------------
@@ -68,7 +68,7 @@ Code
This tutorial code's is shown lines below. You can also download it from
[here](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/ImgProc/Pyramids.cpp)
@includelineno samples/cpp/tutorial_code/ImgProc/Pyramids.cpp
@include samples/cpp/tutorial_code/ImgProc/Pyramids.cpp
Explanation
-----------
@@ -17,7 +17,7 @@ Code
This tutorial code's is shown lines below. You can also download it from
[here](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/ShapeDescriptors/generalContours_demo1.cpp)
@includelineno samples/cpp/tutorial_code/ShapeDescriptors/generalContours_demo1.cpp
@include samples/cpp/tutorial_code/ShapeDescriptors/generalContours_demo1.cpp
Explanation
-----------
@@ -17,7 +17,7 @@ Code
This tutorial code's is shown lines below. You can also download it from
[here](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/ShapeDescriptors/generalContours_demo2.cpp)
@includelineno samples/cpp/tutorial_code/ShapeDescriptors/generalContours_demo2.cpp
@include samples/cpp/tutorial_code/ShapeDescriptors/generalContours_demo2.cpp
Explanation
-----------
@@ -17,7 +17,7 @@ Code
This tutorial code's is shown lines below. You can also download it from
[here](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/ShapeDescriptors/findContours_demo.cpp)
@includelineno samples/cpp/tutorial_code/ShapeDescriptors/findContours_demo.cpp
@include samples/cpp/tutorial_code/ShapeDescriptors/findContours_demo.cpp
Explanation
-----------
@@ -17,7 +17,7 @@ Code
This tutorial code's is shown lines below. You can also download it from
[here](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/ShapeDescriptors/hull_demo.cpp)
@includelineno samples/cpp/tutorial_code/ShapeDescriptors/hull_demo.cpp
@include samples/cpp/tutorial_code/ShapeDescriptors/hull_demo.cpp
Explanation
-----------
@@ -18,7 +18,7 @@ Code
This tutorial code's is shown lines below. You can also download it from
[here](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/ShapeDescriptors/moments_demo.cpp)
@includelineno samples/cpp/tutorial_code/ShapeDescriptors/moments_demo.cpp
@include samples/cpp/tutorial_code/ShapeDescriptors/moments_demo.cpp
Explanation
-----------
@@ -16,7 +16,7 @@ Code
This tutorial code's is shown lines below. You can also download it from
[here](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/ShapeDescriptors/pointPolygonTest_demo.cpp)
@includelineno samples/cpp/tutorial_code/ShapeDescriptors/pointPolygonTest_demo.cpp
@include samples/cpp/tutorial_code/ShapeDescriptors/pointPolygonTest_demo.cpp
Explanation
-----------
@@ -98,19 +98,19 @@ Code
The tutorial code's is shown lines below. You can also download it from
[here](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/ImgProc/Threshold.cpp)
@includelineno samples/cpp/tutorial_code/ImgProc/Threshold.cpp
@include samples/cpp/tutorial_code/ImgProc/Threshold.cpp
Explanation
-----------
-# Let's check the general structure of the program:
- Load an image. If it is RGB we convert it to Grayscale. For this, remember that we can use
- Load an image. If it is BGR we convert it to Grayscale. For this, remember that we can use
the function @ref cv::cvtColor :
@code{.cpp}
src = imread( argv[1], 1 );
/// Convert the image to Gray
cvtColor( src, src_gray, COLOR_RGB2GRAY );
cvtColor( src, src_gray, COLOR_BGR2GRAY );
@endcode
- Create a window to display the result
@code{.cpp}
@@ -185,9 +185,7 @@ corresponding section of @ref tutorial_android_dev_intro.
**warning**
Please consider that some samples use Android Java Camera API, which is accessible
with an AVD. But most of samples use OpenCV Native Camera which **may not work** with an
emulator.
Please consider that some samples use Android Java Camera API, which is accessible with an AVD.
@note Recent *Android SDK tools, revision 19+* can run ARM v7a OS images but they available not for
all Android versions.
@@ -279,7 +279,7 @@ application. It will be capable of accessing camera output, processing it and di
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
@endcode
-# Add OpenCV library initialization to your activity. Fix errors by adding requited imports.
-# Add OpenCV library initialization to your activity. Fix errors by adding required imports.
@code{.java}
private BaseLoaderCallback mLoaderCallback = new BaseLoaderCallback(this) {
@Override
@@ -307,7 +307,7 @@ application. It will be capable of accessing camera output, processing it and di
@endcode
-# Defines that your activity implements CvCameraViewListener2 interface and fix activity related
errors by defining missed methods. For this activity define onCreate, onDestroy and onPause and
implement them according code snippet bellow. Fix errors by adding requited imports.
implement them according code snippet bellow. Fix errors by adding required imports.
@code{.java}
private CameraBridgeViewBase mOpenCvCameraView;
@@ -356,10 +356,7 @@ from camera and implements CvCameraViewListener2 interface to get frames from ca
First of all we create our application view using xml layout. Our layout consists of the only one
full screen component of class org.opencv.android.JavaCameraView. This class is implemented inside
OpenCV library. It is inherited from CameraBridgeViewBase, that extends SurfaceView and uses
standard Android camera API. Alternatively you can use org.opencv.android.NativeCameraView class,
that implements the same interface, but uses VideoCapture class as camera access back-end.
opencv:show_fps="true" and opencv:camera_id="any" options enable FPS message and allow to use any
camera on device. Application tries to use back camera first.
standard Android camera API.
After creating layout we need to implement Activity class. OpenCV initialization process has been
already discussed above. In this sample we use asynchronous initialization. Implementation of
@@ -16,7 +16,7 @@ Source Code
Download the source code from
[here](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/introduction/display_image/display_image.cpp).
@includelineno cpp/tutorial_code/introduction/display_image/display_image.cpp
@include cpp/tutorial_code/introduction/display_image/display_image.cpp
Explanation
-----------
@@ -77,8 +77,7 @@ Following scheme represents common documentation places for _opencv_ repository:
<opencv>
├── doc - doxygen config files, root page (root.markdown.in), BibTeX file (opencv.bib)
│   ├── tutorials - tutorials hierarchy (pages and images)
│   ── py_tutorials - python tutorials hierarchy (pages and images)
│   └── user_guide - old user guide (pages and images)
│   ── py_tutorials - python tutorials hierarchy (pages and images)
├── modules
│   └── <modulename>
│      ├── doc - documentation pages and images for module
@@ -415,7 +414,8 @@ you can manually specify it in curly braces:
To include whole example file into documentation, _include_ and _includelineno_ commands are used.
The file is searched in common samples locations, so you can specify just its name or short part of
the path. The _includelineno_ version also shows line numbers.
the path. The _includelineno_ version also shows line numbers but prevents copy-pasting since
the line numbers are included.
@verbatim
@include samples/cpp/test.cpp
@@ -56,7 +56,7 @@ Explanation
-----------
-# We begin by loading an image using @ref cv::imread , located in the path given by *imageName*.
For this example, assume you are loading a RGB image.
For this example, assume you are loading a BGR image.
-# Now we are going to convert our image from BGR to Grayscale format. OpenCV has a really nice
function to do this kind of transformations:
@code{.cpp}
@@ -257,3 +257,37 @@ _cuda_ module has been split into several smaller pieces:
Documentation format {#tutorial_transition_docs}
--------------------
Documentation has been converted to Doxygen format. You can find updated documentation writing guide in _Tutorials_ section of _OpenCV_ reference documentation (@ref tutorial_documentation).
Support both versions {#tutorial_transition_both}
---------------------
In some cases it is possible to support both versions of OpenCV.
### Source code
To check library major version in your application source code, the following method should be used:
@code{.cpp}
#include "opencv2/core/version.hpp"
#if CV_MAJOR_VERSION == 2
// do opencv 2 code
#elif CV_MAJOR_VERSION == 3
// do opencv 3 code
#endif
@endcode
@note Do not use __CV_VERSION_MAJOR__, it has different meaning for 2.4 and 3.x branches!
### Build system
It is possible to link different modules or enable/disable some of the features in your application by checking library version in the build system. Standard cmake or pkg-config variables can be used for this:
- `OpenCV_VERSION` for cmake will contain full version: "2.4.11" or "3.0.0" for example
- `OpenCV_VERSION_MAJOR` for cmake will contain only major version number: 2 or 3
- pkg-config file has standard field `Version`
Example:
@code{.cmake}
if(OpenCV_VERSION VERSION_LESS "3.0")
# use 2.4 modules
else()
# use 3.x modules
endif()
@endcode
@@ -193,7 +193,7 @@ Now to try this out download our little test [source code
or get it from the sample code folder of the OpenCV sources. Add this to your project and build it.
Here's its content:
@includelineno cpp/tutorial_code/introduction/windows_visual_studio_Opencv/introduction_windows_vs.cpp
@include cpp/tutorial_code/introduction/windows_visual_studio_Opencv/introduction_windows_vs.cpp
You can start a Visual Studio build from two places. Either inside from the *IDE* (keyboard
combination: Control-F5) or by navigating to your build directory and start the application with a
@@ -93,7 +93,7 @@ Source Code
This tutorial code's is shown lines below. You can also download it from
[here](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/ml/introduction_to_pca/introduction_to_pca.cpp).
@includelineno cpp/tutorial_code/ml/introduction_to_pca/introduction_to_pca.cpp
@include cpp/tutorial_code/ml/introduction_to_pca/introduction_to_pca.cpp
@note Another example using PCA for dimensionality reduction while maintaining an amount of variance can be found at [opencv_source_code/samples/cpp/pca.cpp](https://github.com/Itseez/opencv/tree/master/samples/cpp/pca.cpp)
@@ -94,7 +94,7 @@ the weight vector \f$\beta\f$ and the bias \f$\beta_{0}\f$ of the optimal hyperp
Source Code
-----------
@includelineno cpp/tutorial_code/ml/introduction_to_svm/introduction_to_svm.cpp
@include cpp/tutorial_code/ml/introduction_to_svm/introduction_to_svm.cpp
Explanation
-----------
@@ -89,7 +89,7 @@ Source Code
You may also find the source code in `samples/cpp/tutorial_code/ml/non_linear_svms` folder of the OpenCV source library or
[download it from here](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/ml/non_linear_svms/non_linear_svms.cpp).
@includelineno cpp/tutorial_code/ml/non_linear_svms/non_linear_svms.cpp
@include cpp/tutorial_code/ml/non_linear_svms/non_linear_svms.cpp
Explanation
-----------
@@ -10,3 +10,7 @@ Ever wondered how your digital camera detects peoples and faces? Look here to fi
*Author:* Ana Huamán
Here we learn how to use *objdetect* to find objects in our images or videos
- @subpage tutorial_traincascade
This tutorial describes _opencv_traincascade_ application and its parameters.
@@ -1,4 +1,4 @@
Cascade Classifier Training {#tutorial_ug_traincascade}
Cascade Classifier Training {#tutorial_traincascade}
===========================
Introduction
@@ -31,7 +31,7 @@ Exposure sequence
Source Code
-----------
@includelineno cpp/tutorial_code/photo/hdr_imaging/hdr_imaging.cpp
@include cpp/tutorial_code/photo/hdr_imaging/hdr_imaging.cpp
Explanation
-----------
@@ -47,7 +47,7 @@ Two different methods are used to generate two foreground masks:
The results as well as the input data are shown on the screen.
The source file can be downloaded [here ](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/video/bg_sub.cpp).
@includelineno samples/cpp/tutorial_code/video/bg_sub.cpp
@include samples/cpp/tutorial_code/video/bg_sub.cpp
Explanation
-----------
@@ -13,7 +13,7 @@ Code
----
You can download the code from [here ](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/viz/creating_widgets.cpp).
@includelineno samples/cpp/tutorial_code/viz/creating_widgets.cpp
@include samples/cpp/tutorial_code/viz/creating_widgets.cpp
Explanation
-----------
@@ -15,7 +15,7 @@ Code
----
You can download the code from [here ](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/viz/launching_viz.cpp).
@includelineno samples/cpp/tutorial_code/viz/launching_viz.cpp
@include samples/cpp/tutorial_code/viz/launching_viz.cpp
Explanation
-----------
@@ -14,7 +14,7 @@ Code
----
You can download the code from [here ](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/viz/transformations.cpp).
@includelineno samples/cpp/tutorial_code/viz/transformations.cpp
@include samples/cpp/tutorial_code/viz/transformations.cpp
Explanation
-----------
@@ -14,7 +14,7 @@ Code
----
You can download the code from [here ](https://github.com/Itseez/opencv/tree/master/samples/cpp/tutorial_code/viz/widget_pose.cpp).
@includelineno samples/cpp/tutorial_code/viz/widget_pose.cpp
@include samples/cpp/tutorial_code/viz/widget_pose.cpp
Explanation
-----------
-110
View File
@@ -1,110 +0,0 @@
Features2d {#tutorial_ug_features2d}
==========
Detectors
---------
Descriptors
-----------
Matching keypoints
------------------
### The code
We will start with a short sample \`opencv/samples/cpp/matcher_simple.cpp\`:
@code{.cpp}
Mat img1 = imread(argv[1], IMREAD_GRAYSCALE);
Mat img2 = imread(argv[2], IMREAD_GRAYSCALE);
if(img1.empty() || img2.empty())
{
printf("Can't read one of the images\n");
return -1;
}
// detecting keypoints
SurfFeatureDetector detector(400);
vector<KeyPoint> keypoints1, keypoints2;
detector.detect(img1, keypoints1);
detector.detect(img2, keypoints2);
// computing descriptors
SurfDescriptorExtractor extractor;
Mat descriptors1, descriptors2;
extractor.compute(img1, keypoints1, descriptors1);
extractor.compute(img2, keypoints2, descriptors2);
// matching descriptors
BruteForceMatcher<L2<float> > matcher;
vector<DMatch> matches;
matcher.match(descriptors1, descriptors2, matches);
// drawing the results
namedWindow("matches", 1);
Mat img_matches;
drawMatches(img1, keypoints1, img2, keypoints2, matches, img_matches);
imshow("matches", img_matches);
waitKey(0);
@endcode
### The code explained
Let us break the code down.
@code{.cpp}
Mat img1 = imread(argv[1], IMREAD_GRAYSCALE);
Mat img2 = imread(argv[2], IMREAD_GRAYSCALE);
if(img1.empty() || img2.empty())
{
printf("Can't read one of the images\n");
return -1;
}
@endcode
We load two images and check if they are loaded correctly.
@code{.cpp}
// detecting keypoints
Ptr<FeatureDetector> detector = FastFeatureDetector::create(15);
vector<KeyPoint> keypoints1, keypoints2;
detector->detect(img1, keypoints1);
detector->detect(img2, keypoints2);
@endcode
First, we create an instance of a keypoint detector. All detectors inherit the abstract
FeatureDetector interface, but the constructors are algorithm-dependent. The first argument to each
detector usually controls the balance between the amount of keypoints and their stability. The range
of values is different for different detectors (For instance, *FAST* threshold has the meaning of
pixel intensity difference and usually varies in the region *[0,40]*. *SURF* threshold is applied to
a Hessian of an image and usually takes on values larger than *100*), so use defaults in case of
doubt.
@code{.cpp}
// computing descriptors
Ptr<SURF> extractor = SURF::create();
Mat descriptors1, descriptors2;
extractor->compute(img1, keypoints1, descriptors1);
extractor->compute(img2, keypoints2, descriptors2);
@endcode
We create an instance of descriptor extractor. The most of OpenCV descriptors inherit
DescriptorExtractor abstract interface. Then we compute descriptors for each of the keypoints. The
output Mat of the DescriptorExtractor::compute method contains a descriptor in a row *i* for each
*i*-th keypoint. Note that the method can modify the keypoints vector by removing the keypoints such
that a descriptor for them is not defined (usually these are the keypoints near image border). The
method makes sure that the ouptut keypoints and descriptors are consistent with each other (so that
the number of keypoints is equal to the descriptors row count). :
@code{.cpp}
// matching descriptors
BruteForceMatcher<L2<float> > matcher;
vector<DMatch> matches;
matcher.match(descriptors1, descriptors2, matches);
@endcode
Now that we have descriptors for both images, we can match them. First, we create a matcher that for
each descriptor from image 2 does exhaustive search for the nearest descriptor in image 1 using
Euclidean metric. Manhattan distance is also implemented as well as a Hamming distance for Brief
descriptor. The output vector matches contains pairs of corresponding points indices. :
@code{.cpp}
// drawing the results
namedWindow("matches", 1);
Mat img_matches;
drawMatches(img1, keypoints1, img2, keypoints2, matches, img_matches);
imshow("matches", img_matches);
waitKey(0);
@endcode
The final part of the sample is about visualizing the matching results.

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