Compare commits
223 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| dc15187f1b | |||
| ae1a249a0a | |||
| 171fbf879f | |||
| 8a1caa0d16 | |||
| cdcf7e62f3 | |||
| 083727b0a6 | |||
| 718dd9f170 | |||
| 6c218c7b0f | |||
| e87a0baa4b | |||
| 8ee5f2ad89 | |||
| ee76cef1ff | |||
| 6da05f7086 | |||
| e24b1629a0 | |||
| d9ea9bedb2 | |||
| 1546b9bf99 | |||
| 62b5d37b6b | |||
| d78d9bf151 | |||
| a5f0fb6008 | |||
| f2bb3d0d80 | |||
| 037a72debd | |||
| 1ef4b7ae5a | |||
| b314cc4c23 | |||
| 644de8f22a | |||
| 36f61f3879 | |||
| aa11f7d8a3 | |||
| f30aafc3cc | |||
| 2f065b8b4c | |||
| aece3e732e | |||
| ebe9327a92 | |||
| 102d8f67cd | |||
| a00fe15abd | |||
| 3acf8cfd63 | |||
| d34717d8c9 | |||
| a5b8f163d7 | |||
| 6add3b9161 | |||
| 1ddd61f98a | |||
| 3503a36e5e | |||
| 2ea7269450 | |||
| a968eadbf1 | |||
| c6b63e0e28 | |||
| 7bd8ddc8fa | |||
| 14e264f646 | |||
| 969b55036f | |||
| cbf978d1f7 | |||
| 94e0ac7d9f | |||
| 08b36e4f48 | |||
| d62d880316 | |||
| 361b5e0ebf | |||
| c16e2e6234 | |||
| c08f29c803 | |||
| ecb6d03ccd | |||
| e59793cc75 | |||
| 236ad4aeda | |||
| 97bb91d5fa | |||
| 233030e417 | |||
| 6256e425f3 | |||
| 48368dc9a1 | |||
| 691c655630 | |||
| b88ad7f2d9 | |||
| b300b6b3bd | |||
| 234117800f | |||
| ac58b2f857 | |||
| 220b37144b | |||
| 74c8ccb45b | |||
| 9cfe981e1f | |||
| 2f9072efdc | |||
| 5e90802b1a | |||
| 45fee13f3d | |||
| 261ad78122 | |||
| 4fa82809df | |||
| 3e3787ecb6 | |||
| a723aaedd8 | |||
| ebb528976f | |||
| f77c2d700f | |||
| 8c44b8306b | |||
| e668cff573 | |||
| fa953e4205 | |||
| 540982cc9d | |||
| a61546680b | |||
| 8cb7eae5c9 | |||
| 18440c1faf | |||
| 9f69ca503a | |||
| 49ba744130 | |||
| 4b24ddd70d | |||
| 1612db5f91 | |||
| 7dfe68cac6 | |||
| 83807811cd | |||
| 23e71d1aa2 | |||
| b542a1804c | |||
| 2dff2f36bf | |||
| 6b674709b8 | |||
| f56445d7ca | |||
| 03bee14372 | |||
| 50ff40d684 | |||
| c31164bf1e | |||
| 3835ab394e | |||
| 20b23da8e2 | |||
| f6795d75a6 | |||
| fa11b98800 | |||
| 64c67a93d3 | |||
| 154380ccf5 | |||
| 1f2c83845d | |||
| 2349a09736 | |||
| 1df533c914 | |||
| 44bf748479 | |||
| f9fbd29c14 | |||
| 31dc3e9256 | |||
| 698b2bf729 | |||
| 1d42560018 | |||
| efcf307b4c | |||
| 6876f3b91d | |||
| 7495a4722f | |||
| 7ce56b3a47 | |||
| 5376863c0c | |||
| a86e036594 | |||
| 01324b02e7 | |||
| 792722865f | |||
| 9aa401a7d0 | |||
| a160e4fb6b | |||
| c7422e4d90 | |||
| 485d2b593c | |||
| 1bea537731 | |||
| 75e88d613f | |||
| 379b83e946 | |||
| dda1bf1887 | |||
| f7e524cbe6 | |||
| e503ac508e | |||
| f5ba3f51ce | |||
| d392b11dfb | |||
| cd01ee9a54 | |||
| 8c1af09989 | |||
| f53ff0d01c | |||
| 4f48dab023 | |||
| a7ffcaab28 | |||
| f617f18e46 | |||
| 4372d75b26 | |||
| 885fb703cf | |||
| cd00d8f3f0 | |||
| b3755e617c | |||
| fc0f9da7a7 | |||
| 277961fa25 | |||
| 14a9103fc0 | |||
| 6d1f7c2b1b | |||
| 2c1f3487a4 | |||
| acc6189da0 | |||
| ac177b849c | |||
| 29aeebf5bc | |||
| cc769ff19d | |||
| 1834eed809 | |||
| b34234ac14 | |||
| 7ec9f52509 | |||
| 68f527267b | |||
| 7f22b34c78 | |||
| ad63d24dba | |||
| 3b5813c035 | |||
| 339b963e6b | |||
| 00890aecdf | |||
| 2171cae8ff | |||
| 3f55152ca0 | |||
| f3cebb3e1b | |||
| 2b227f00f2 | |||
| 98de57c6c4 | |||
| e231be86b7 | |||
| 7ec221e734 | |||
| fe9ff64d64 | |||
| 3f65c12d0c | |||
| 336627a776 | |||
| 6226ea0085 | |||
| 1067cd0649 | |||
| 1537ecd931 | |||
| 5b5c42d2c7 | |||
| 161890dad4 | |||
| 35846fe735 | |||
| 96ce65f021 | |||
| 8457e471fd | |||
| 246de2b7f5 | |||
| e8c26963e9 | |||
| 793e7c0d9f | |||
| 3b337a12c9 | |||
| 2c32cb743c | |||
| 883b995fd6 | |||
| a28533933f | |||
| d695208727 | |||
| 613ff61de7 | |||
| 65b02cc8f2 | |||
| 1c8ee3f957 | |||
| 922108060d | |||
| ce74285c5e | |||
| c262eea84a | |||
| f2ca7e664a | |||
| cf8f65d806 | |||
| bc221bdb90 | |||
| 6bed5c181b | |||
| f162c08cda | |||
| 0d1d452b79 | |||
| 3c3e131c38 | |||
| a218cf3c61 | |||
| 866468cc3e | |||
| f66fc199a2 | |||
| 11ac26bfb4 | |||
| 2241bfb0df | |||
| d92af2aa85 | |||
| e4d573a080 | |||
| f86c8656a3 | |||
| 6697f0ea86 | |||
| e935f06f16 | |||
| 1e18004bdd | |||
| 19646ad049 | |||
| 7e943808b6 | |||
| 88dbee3589 | |||
| 5bfa43f7d5 | |||
| 7ed37b3fa5 | |||
| f0271e54d9 | |||
| 0ac2f0e04c | |||
| ef1690ef45 | |||
| 0fa06b1db0 | |||
| abceef74e0 | |||
| 5444a6b11c | |||
| 9411cd6c07 | |||
| a35d4f9029 | |||
| 17c430da88 | |||
| 96a501c08b | |||
| 05fbd1e5bc |
@@ -1,8 +1,15 @@
|
||||
<!--
|
||||
If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses.
|
||||
If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute).
|
||||
|
||||
This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library.
|
||||
-->
|
||||
|
||||
##### System information (version)
|
||||
<!-- Example
|
||||
- OpenCV => 4.2
|
||||
- OpenCV => 3.1
|
||||
- Operating System / Platform => Windows 64 Bit
|
||||
- Compiler => Visual Studio 2017
|
||||
- Compiler => Visual Studio 2015
|
||||
-->
|
||||
|
||||
- OpenCV => :grey_question:
|
||||
@@ -20,43 +27,4 @@
|
||||
// C++ code example
|
||||
```
|
||||
or attach as .txt or .zip file
|
||||
-->
|
||||
|
||||
##### Issue submission checklist
|
||||
|
||||
- [ ] I report the issue, it's not a question
|
||||
<!--
|
||||
OpenCV team works with answers.opencv.org, Stack Overflow and other communities
|
||||
to discuss problems. Tickets with question without real issue statement will be
|
||||
closed.
|
||||
-->
|
||||
- [ ] I checked the problem with documentation, FAQ, open issues,
|
||||
answers.opencv.org, Stack Overflow, etc and have not found solution
|
||||
<!--
|
||||
Places to check:
|
||||
* OpenCV documentation: https://docs.opencv.org
|
||||
* FAQ page: https://github.com/opencv/opencv/wiki/FAQ
|
||||
* OpenCV forum: https://answers.opencv.org
|
||||
* OpenCV issue tracker: https://github.com/opencv/opencv/issues?q=is%3Aissue
|
||||
* Stack Overflow branch: https://stackoverflow.com/questions/tagged/opencv
|
||||
-->
|
||||
- [ ] I updated to latest OpenCV version and the issue is still there
|
||||
<!--
|
||||
master branch for OpenCV 4.x and 3.4 branch for OpenCV 3.x releases.
|
||||
OpenCV team supports only latest release for each branch.
|
||||
The ticket is closed, if the problem is not reproduced with modern version.
|
||||
-->
|
||||
- [ ] There is reproducer code and related data files: videos, images, onnx, etc
|
||||
<!--
|
||||
The best reproducer -- test case for OpenCV that we can add to the library.
|
||||
Recommendations for media files and binary files:
|
||||
* Try to reproduce the issue with images and videos in opencv_extra repository
|
||||
to reduce attachment size
|
||||
* Use PNG for images, if you report some CV related bug, but not image reader
|
||||
issue
|
||||
* Attach the image as archite to the ticket, if you report some reader issue.
|
||||
Image hosting services compress images and it breaks the repro code.
|
||||
* Provide ONNX file for some public model or ONNX file with with random weights,
|
||||
if you report ONNX parsing or handling issue. Architecture details diagram
|
||||
from netron tool can be very useful too. See https://lutzroeder.github.io/netron/
|
||||
-->
|
||||
-->
|
||||
@@ -1,11 +1,9 @@
|
||||
### Pull Request Readiness Checklist
|
||||
<!-- Please use this line to close one or multiple issues when this pullrequest gets merged
|
||||
You can add another line right under the first one:
|
||||
resolves #1234
|
||||
resolves #1235
|
||||
-->
|
||||
|
||||
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
|
||||
### This pullrequest changes
|
||||
|
||||
- [ ] I agree to contribute to the project under OpenCV (BSD) License.
|
||||
- [ ] To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
|
||||
- [ ] The PR is proposed to proper branch
|
||||
- [ ] There is reference to original bug report and related work
|
||||
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
|
||||
Patch to opencv_extra has the same branch name.
|
||||
- [ ] The feature is well documented and sample code can be built with the project CMake
|
||||
<!-- Please describe what your pullrequest is changing -->
|
||||
|
||||
@@ -24,4 +24,3 @@ bin/
|
||||
build
|
||||
node_modules
|
||||
CMakeSettings.json
|
||||
xcuserdata/
|
||||
|
||||
@@ -40,4 +40,5 @@ if(WITH_NEON)
|
||||
target_compile_definitions(carotene_objs PRIVATE "-DWITH_NEON")
|
||||
endif()
|
||||
|
||||
add_library(carotene STATIC EXCLUDE_FROM_ALL "$<TARGET_OBJECTS:carotene_objs>")
|
||||
# we add dummy file to fix XCode build
|
||||
add_library(carotene STATIC EXCLUDE_FROM_ALL "$<TARGET_OBJECTS:carotene_objs>" "${CAROTENE_SOURCE_DIR}/dummy.cpp")
|
||||
|
||||
@@ -12,8 +12,6 @@ elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64.*|AARCH64.*")
|
||||
set(AARCH64 TRUE)
|
||||
endif()
|
||||
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wunused-function)
|
||||
|
||||
set(TEGRA_COMPILER_FLAGS "")
|
||||
|
||||
if(CV_GCC OR CV_CLANG)
|
||||
@@ -82,7 +80,8 @@ set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS ${carotene_defs})
|
||||
# set_source_files_properties(impl.cpp $<TARGET_OBJECTS:carotene_objs> COMPILE_FLAGS "--param ipcp-unit-growth=100000 --param inline-unit-growth=100000 --param large-stack-frame-growth=5000")
|
||||
endif()
|
||||
|
||||
add_library(tegra_hal STATIC $<TARGET_OBJECTS:carotene_objs>)
|
||||
# we add dummy file to fix XCode build
|
||||
add_library(tegra_hal STATIC $<TARGET_OBJECTS:carotene_objs> "dummy.cpp")
|
||||
set_target_properties(tegra_hal PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${3P_LIBRARY_OUTPUT_PATH})
|
||||
set(OPENCV_SRC_DIR "${CMAKE_SOURCE_DIR}")
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
// This file is needed for compilation on some platforms e.g. with XCode generator
|
||||
// Related issue: https://gitlab.kitware.com/cmake/cmake/-/issues/17457
|
||||
@@ -49,12 +49,12 @@ namespace {
|
||||
|
||||
enum
|
||||
{
|
||||
SHIFT = 15,
|
||||
SHIFT = 14,
|
||||
SHIFT_DELTA = 1 << (SHIFT - 1),
|
||||
|
||||
R2Y_BT601 = 9798,
|
||||
G2Y_BT601 = 19235,
|
||||
B2Y_BT601 = 3735,
|
||||
R2Y_BT601 = 4899,
|
||||
G2Y_BT601 = 9617,
|
||||
B2Y_BT601 = 1868,
|
||||
|
||||
R2Y_BT709 = 3483,
|
||||
G2Y_BT709 = 11718,
|
||||
|
||||
@@ -151,10 +151,6 @@ void div(const Size2D &size,
|
||||
typedef typename internal::VecTraits<T>::vec128 vec128;
|
||||
typedef typename internal::VecTraits<T>::vec64 vec64;
|
||||
|
||||
#if defined(__GNUC__) && (defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L)
|
||||
static_assert(std::numeric_limits<T>::is_integer, "template implementation is for integer types only");
|
||||
#endif
|
||||
|
||||
if (scale == 0.0f ||
|
||||
(std::numeric_limits<T>::is_integer &&
|
||||
(scale * std::numeric_limits<T>::max()) < 1.0f &&
|
||||
@@ -315,10 +311,6 @@ void recip(const Size2D &size,
|
||||
typedef typename internal::VecTraits<T>::vec128 vec128;
|
||||
typedef typename internal::VecTraits<T>::vec64 vec64;
|
||||
|
||||
#if defined(__GNUC__) && (defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L)
|
||||
static_assert(std::numeric_limits<T>::is_integer, "template implementation is for integer types only");
|
||||
#endif
|
||||
|
||||
if (scale == 0.0f ||
|
||||
(std::numeric_limits<T>::is_integer &&
|
||||
scale < 1.0f &&
|
||||
@@ -471,6 +463,8 @@ void div(const Size2D &size,
|
||||
return;
|
||||
}
|
||||
|
||||
float32x4_t v_zero = vdupq_n_f32(0.0f);
|
||||
|
||||
size_t roiw128 = size.width >= 3 ? size.width - 3 : 0;
|
||||
size_t roiw64 = size.width >= 1 ? size.width - 1 : 0;
|
||||
|
||||
@@ -491,7 +485,9 @@ void div(const Size2D &size,
|
||||
float32x4_t v_src0 = vld1q_f32(src0 + j);
|
||||
float32x4_t v_src1 = vld1q_f32(src1 + j);
|
||||
|
||||
vst1q_f32(dst + j, vmulq_f32(v_src0, internal::vrecpq_f32(v_src1)));
|
||||
uint32x4_t v_mask = vceqq_f32(v_src1,v_zero);
|
||||
vst1q_f32(dst + j, vreinterpretq_f32_u32(vbicq_u32(
|
||||
vreinterpretq_u32_f32(vmulq_f32(v_src0, internal::vrecpq_f32(v_src1))), v_mask)));
|
||||
}
|
||||
|
||||
for (; j < roiw64; j += 2)
|
||||
@@ -499,12 +495,14 @@ void div(const Size2D &size,
|
||||
float32x2_t v_src0 = vld1_f32(src0 + j);
|
||||
float32x2_t v_src1 = vld1_f32(src1 + j);
|
||||
|
||||
vst1_f32(dst + j, vmul_f32(v_src0, internal::vrecp_f32(v_src1)));
|
||||
uint32x2_t v_mask = vceq_f32(v_src1,vget_low_f32(v_zero));
|
||||
vst1_f32(dst + j, vreinterpret_f32_u32(vbic_u32(
|
||||
vreinterpret_u32_f32(vmul_f32(v_src0, internal::vrecp_f32(v_src1))), v_mask)));
|
||||
}
|
||||
|
||||
for (; j < size.width; j++)
|
||||
{
|
||||
dst[j] = src0[j] / src1[j];
|
||||
dst[j] = src1[j] ? src0[j] / src1[j] : 0.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -525,8 +523,10 @@ void div(const Size2D &size,
|
||||
float32x4_t v_src0 = vld1q_f32(src0 + j);
|
||||
float32x4_t v_src1 = vld1q_f32(src1 + j);
|
||||
|
||||
vst1q_f32(dst + j, vmulq_f32(vmulq_n_f32(v_src0, scale),
|
||||
internal::vrecpq_f32(v_src1)));
|
||||
uint32x4_t v_mask = vceqq_f32(v_src1,v_zero);
|
||||
vst1q_f32(dst + j, vreinterpretq_f32_u32(vbicq_u32(
|
||||
vreinterpretq_u32_f32(vmulq_f32(vmulq_n_f32(v_src0, scale),
|
||||
internal::vrecpq_f32(v_src1))), v_mask)));
|
||||
}
|
||||
|
||||
for (; j < roiw64; j += 2)
|
||||
@@ -534,13 +534,15 @@ void div(const Size2D &size,
|
||||
float32x2_t v_src0 = vld1_f32(src0 + j);
|
||||
float32x2_t v_src1 = vld1_f32(src1 + j);
|
||||
|
||||
vst1_f32(dst + j, vmul_f32(vmul_n_f32(v_src0, scale),
|
||||
internal::vrecp_f32(v_src1)));
|
||||
uint32x2_t v_mask = vceq_f32(v_src1,vget_low_f32(v_zero));
|
||||
vst1_f32(dst + j, vreinterpret_f32_u32(vbic_u32(
|
||||
vreinterpret_u32_f32(vmul_f32(vmul_n_f32(v_src0, scale),
|
||||
internal::vrecp_f32(v_src1))), v_mask)));
|
||||
}
|
||||
|
||||
for (; j < size.width; j++)
|
||||
{
|
||||
dst[j] = src0[j] * scale / src1[j];
|
||||
dst[j] = src1[j] ? src0[j] * scale / src1[j] : 0.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -618,6 +620,8 @@ void reciprocal(const Size2D &size,
|
||||
return;
|
||||
}
|
||||
|
||||
float32x4_t v_zero = vdupq_n_f32(0.0f);
|
||||
|
||||
size_t roiw128 = size.width >= 3 ? size.width - 3 : 0;
|
||||
size_t roiw64 = size.width >= 1 ? size.width - 1 : 0;
|
||||
|
||||
@@ -635,19 +639,23 @@ void reciprocal(const Size2D &size,
|
||||
|
||||
float32x4_t v_src1 = vld1q_f32(src1 + j);
|
||||
|
||||
vst1q_f32(dst + j, internal::vrecpq_f32(v_src1));
|
||||
uint32x4_t v_mask = vceqq_f32(v_src1,v_zero);
|
||||
vst1q_f32(dst + j, vreinterpretq_f32_u32(vbicq_u32(
|
||||
vreinterpretq_u32_f32(internal::vrecpq_f32(v_src1)), v_mask)));
|
||||
}
|
||||
|
||||
for (; j < roiw64; j += 2)
|
||||
{
|
||||
float32x2_t v_src1 = vld1_f32(src1 + j);
|
||||
|
||||
vst1_f32(dst + j, internal::vrecp_f32(v_src1));
|
||||
uint32x2_t v_mask = vceq_f32(v_src1,vget_low_f32(v_zero));
|
||||
vst1_f32(dst + j, vreinterpret_f32_u32(vbic_u32(
|
||||
vreinterpret_u32_f32(internal::vrecp_f32(v_src1)), v_mask)));
|
||||
}
|
||||
|
||||
for (; j < size.width; j++)
|
||||
{
|
||||
dst[j] = 1.0f / src1[j];
|
||||
dst[j] = src1[j] ? 1.0f / src1[j] : 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -665,19 +673,25 @@ void reciprocal(const Size2D &size,
|
||||
|
||||
float32x4_t v_src1 = vld1q_f32(src1 + j);
|
||||
|
||||
vst1q_f32(dst + j, vmulq_n_f32(internal::vrecpq_f32(v_src1), scale));
|
||||
uint32x4_t v_mask = vceqq_f32(v_src1,v_zero);
|
||||
vst1q_f32(dst + j, vreinterpretq_f32_u32(vbicq_u32(
|
||||
vreinterpretq_u32_f32(vmulq_n_f32(internal::vrecpq_f32(v_src1),
|
||||
scale)),v_mask)));
|
||||
}
|
||||
|
||||
for (; j < roiw64; j += 2)
|
||||
{
|
||||
float32x2_t v_src1 = vld1_f32(src1 + j);
|
||||
|
||||
vst1_f32(dst + j, vmul_n_f32(internal::vrecp_f32(v_src1), scale));
|
||||
uint32x2_t v_mask = vceq_f32(v_src1,vget_low_f32(v_zero));
|
||||
vst1_f32(dst + j, vreinterpret_f32_u32(vbic_u32(
|
||||
vreinterpret_u32_f32(vmul_n_f32(internal::vrecp_f32(v_src1),
|
||||
scale)), v_mask)));
|
||||
}
|
||||
|
||||
for (; j < size.width; j++)
|
||||
{
|
||||
dst[j] = scale / src1[j];
|
||||
dst[j] = src1[j] ? scale / src1[j] : 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
// This file is needed for compilation on some platforms e.g. with XCode generator
|
||||
// Related issue: https://gitlab.kitware.com/cmake/cmake/-/issues/17457
|
||||
@@ -30,7 +30,6 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
$url = "https://raw.githubusercontent.com/opencv/opencv_3rdparty/@FFMPEG_BINARIES_COMMIT@/ffmpeg/opencv_videoio_ffmpeg_64.dll"
|
||||
$url = "https://raw.githubusercontent.com/opencv/opencv_3rdparty/@FFMPEG_BINARIES_COMMIT@/ffmpeg/opencv_ffmpeg_64.dll"
|
||||
$expected_md5 = "@FFMPEG_FILE_HASH_BIN64@"
|
||||
$output = "$PSScriptRoot\@OPENCV_BIN_INSTALL_PATH@\opencv_videoio_ffmpeg@OPENCV_DLLVERSION@_64.dll"
|
||||
$output = "$PSScriptRoot\@OPENCV_BIN_INSTALL_PATH@\opencv_ffmpeg@OPENCV_DLLVERSION@_64.dll"
|
||||
|
||||
Write-Output ("=" * 120)
|
||||
try {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
# Binaries branch name: ffmpeg/master_20200609
|
||||
# Binaries were created for OpenCV: 5f3012fc9afbffbf53a38f1468523d3454b3e2f6
|
||||
ocv_update(FFMPEG_BINARIES_COMMIT "1df9bf0c0c6c2cf225bd3d8e4cf5985198352454")
|
||||
ocv_update(FFMPEG_FILE_HASH_BIN32 "854b3460c435d04277e1f1ecc06cb809")
|
||||
ocv_update(FFMPEG_FILE_HASH_BIN64 "3a46d6356220796e044817ae3a21cc31")
|
||||
ocv_update(FFMPEG_FILE_HASH_CMAKE "ad57c038ba34b868277ccbe6dd0f9602")
|
||||
# Binaries branch name: ffmpeg/3.4_20200907
|
||||
# Binaries were created for OpenCV: 03bee14372f5537daa56c62e771ec16181ca1f98
|
||||
ocv_update(FFMPEG_BINARIES_COMMIT "2a96257b743695a47f8012aab1ffb995a1dee8b4")
|
||||
ocv_update(FFMPEG_FILE_HASH_BIN32 "5e68a3ff82f43ac6524e50e448a34c9c")
|
||||
ocv_update(FFMPEG_FILE_HASH_BIN64 "205db629d893e7d4865fd1459807ff47")
|
||||
ocv_update(FFMPEG_FILE_HASH_CMAKE "3b90f67f4b429e77d3da36698cef700c")
|
||||
|
||||
function(download_win_ffmpeg script_var)
|
||||
set(${script_var} "" PARENT_SCOPE)
|
||||
|
||||
set(ids BIN32 BIN64 CMAKE)
|
||||
set(name_BIN32 "opencv_videoio_ffmpeg.dll")
|
||||
set(name_BIN64 "opencv_videoio_ffmpeg_64.dll")
|
||||
set(name_BIN32 "opencv_ffmpeg.dll")
|
||||
set(name_BIN64 "opencv_ffmpeg_64.dll")
|
||||
set(name_CMAKE "ffmpeg_version.cmake")
|
||||
|
||||
set(FFMPEG_DOWNLOAD_DIR "${OpenCV_BINARY_DIR}/3rdparty/ffmpeg")
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
|
||||
* On Windows OpenCV uses pre-built ffmpeg binaries, built with proper flags (without GPL components) and
|
||||
wrapped with simple, stable OpenCV-compatible API.
|
||||
The binaries are opencv_videoio_ffmpeg.dll (version for 32-bit Windows) and
|
||||
opencv_videoio_ffmpeg_64.dll (version for 64-bit Windows).
|
||||
The binaries are opencv_ffmpeg.dll (version for 32-bit Windows) and
|
||||
opencv_ffmpeg_64.dll (version for 64-bit Windows).
|
||||
|
||||
The pre-built opencv_videoio_ffmpeg*.dll is:
|
||||
The pre-built opencv_ffmpeg*.dll is:
|
||||
* LGPL library, not BSD libraries.
|
||||
* Loaded at runtime by opencv_videoio module.
|
||||
If it succeeds, ffmpeg can be used to decode/encode videos;
|
||||
@@ -30,7 +30,7 @@
|
||||
Or you can specify location of binary file via OPENH264_LIBRARY environment variable.
|
||||
|
||||
If LGPL/GPL software can not be supplied with your OpenCV-based product, simply exclude
|
||||
opencv_videoio_ffmpeg*.dll from your distribution; OpenCV will stay fully functional except for the ability to
|
||||
opencv_ffmpeg*.dll from your distribution; OpenCV will stay fully functional except for the ability to
|
||||
decode/encode videos using FFMPEG (though, it may still be able to do that using other API,
|
||||
such as Video for Windows, Windows Media Foundation or our self-contained motion jpeg codec).
|
||||
|
||||
|
||||
@@ -1,92 +0,0 @@
|
||||
//
|
||||
// File: vk_platform.h
|
||||
//
|
||||
/*
|
||||
** Copyright (c) 2014-2017 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef VK_PLATFORM_H_
|
||||
#define VK_PLATFORM_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif // __cplusplus
|
||||
|
||||
/*
|
||||
***************************************************************************************************
|
||||
* Platform-specific directives and type declarations
|
||||
***************************************************************************************************
|
||||
*/
|
||||
|
||||
/* Platform-specific calling convention macros.
|
||||
*
|
||||
* Platforms should define these so that Vulkan clients call Vulkan commands
|
||||
* with the same calling conventions that the Vulkan implementation expects.
|
||||
*
|
||||
* VKAPI_ATTR - Placed before the return type in function declarations.
|
||||
* Useful for C++11 and GCC/Clang-style function attribute syntax.
|
||||
* VKAPI_CALL - Placed after the return type in function declarations.
|
||||
* Useful for MSVC-style calling convention syntax.
|
||||
* VKAPI_PTR - Placed between the '(' and '*' in function pointer types.
|
||||
*
|
||||
* Function declaration: VKAPI_ATTR void VKAPI_CALL vkCommand(void);
|
||||
* Function pointer type: typedef void (VKAPI_PTR *PFN_vkCommand)(void);
|
||||
*/
|
||||
#if defined(_WIN32)
|
||||
// On Windows, Vulkan commands use the stdcall convention
|
||||
#define VKAPI_ATTR
|
||||
#define VKAPI_CALL __stdcall
|
||||
#define VKAPI_PTR VKAPI_CALL
|
||||
#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH < 7
|
||||
#error "Vulkan isn't supported for the 'armeabi' NDK ABI"
|
||||
#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7 && defined(__ARM_32BIT_STATE)
|
||||
// On Android 32-bit ARM targets, Vulkan functions use the "hardfloat"
|
||||
// calling convention, i.e. float parameters are passed in registers. This
|
||||
// is true even if the rest of the application passes floats on the stack,
|
||||
// as it does by default when compiling for the armeabi-v7a NDK ABI.
|
||||
#define VKAPI_ATTR __attribute__((pcs("aapcs-vfp")))
|
||||
#define VKAPI_CALL
|
||||
#define VKAPI_PTR VKAPI_ATTR
|
||||
#else
|
||||
// On other platforms, use the default calling convention
|
||||
#define VKAPI_ATTR
|
||||
#define VKAPI_CALL
|
||||
#define VKAPI_PTR
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#if !defined(VK_NO_STDINT_H)
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1600)
|
||||
typedef signed __int8 int8_t;
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef signed __int16 int16_t;
|
||||
typedef unsigned __int16 uint16_t;
|
||||
typedef signed __int32 int32_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef signed __int64 int64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
#endif // !defined(VK_NO_STDINT_H)
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif
|
||||
@@ -1,83 +0,0 @@
|
||||
#ifndef VULKAN_H_
|
||||
#define VULKAN_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2018 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
|
||||
#include "vk_platform.h"
|
||||
#include "vulkan_core.h"
|
||||
|
||||
#ifdef VK_USE_PLATFORM_ANDROID_KHR
|
||||
#include "vulkan_android.h"
|
||||
#endif
|
||||
|
||||
#ifdef VK_USE_PLATFORM_FUCHSIA
|
||||
#include <zircon/types.h>
|
||||
#include "vulkan_fuchsia.h"
|
||||
#endif
|
||||
|
||||
#ifdef VK_USE_PLATFORM_IOS_MVK
|
||||
#include "vulkan_ios.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_MACOS_MVK
|
||||
#include "vulkan_macos.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_MIR_KHR
|
||||
#include <mir_toolkit/client_types.h>
|
||||
#include "vulkan_mir.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_VI_NN
|
||||
#include "vulkan_vi.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_WAYLAND_KHR
|
||||
#include <wayland-client.h>
|
||||
#include "vulkan_wayland.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_WIN32_KHR
|
||||
#include <windows.h>
|
||||
#include "vulkan_win32.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_XCB_KHR
|
||||
#include <xcb/xcb.h>
|
||||
#include "vulkan_xcb.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_XLIB_KHR
|
||||
#include <X11/Xlib.h>
|
||||
#include "vulkan_xlib.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/extensions/Xrandr.h>
|
||||
#include "vulkan_xlib_xrandr.h"
|
||||
#endif
|
||||
|
||||
#endif // VULKAN_H_
|
||||
@@ -1,126 +0,0 @@
|
||||
#ifndef VULKAN_ANDROID_H_
|
||||
#define VULKAN_ANDROID_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2018 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define VK_KHR_android_surface 1
|
||||
struct ANativeWindow;
|
||||
|
||||
#define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6
|
||||
#define VK_KHR_ANDROID_SURFACE_EXTENSION_NAME "VK_KHR_android_surface"
|
||||
|
||||
typedef VkFlags VkAndroidSurfaceCreateFlagsKHR;
|
||||
|
||||
typedef struct VkAndroidSurfaceCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkAndroidSurfaceCreateFlagsKHR flags;
|
||||
struct ANativeWindow* window;
|
||||
} VkAndroidSurfaceCreateInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateAndroidSurfaceKHR)(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR(
|
||||
VkInstance instance,
|
||||
const VkAndroidSurfaceCreateInfoKHR* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
#endif
|
||||
|
||||
#define VK_ANDROID_external_memory_android_hardware_buffer 1
|
||||
struct AHardwareBuffer;
|
||||
|
||||
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION 3
|
||||
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME "VK_ANDROID_external_memory_android_hardware_buffer"
|
||||
|
||||
typedef struct VkAndroidHardwareBufferUsageANDROID {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
uint64_t androidHardwareBufferUsage;
|
||||
} VkAndroidHardwareBufferUsageANDROID;
|
||||
|
||||
typedef struct VkAndroidHardwareBufferPropertiesANDROID {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkDeviceSize allocationSize;
|
||||
uint32_t memoryTypeBits;
|
||||
} VkAndroidHardwareBufferPropertiesANDROID;
|
||||
|
||||
typedef struct VkAndroidHardwareBufferFormatPropertiesANDROID {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkFormat format;
|
||||
uint64_t externalFormat;
|
||||
VkFormatFeatureFlags formatFeatures;
|
||||
VkComponentMapping samplerYcbcrConversionComponents;
|
||||
VkSamplerYcbcrModelConversion suggestedYcbcrModel;
|
||||
VkSamplerYcbcrRange suggestedYcbcrRange;
|
||||
VkChromaLocation suggestedXChromaOffset;
|
||||
VkChromaLocation suggestedYChromaOffset;
|
||||
} VkAndroidHardwareBufferFormatPropertiesANDROID;
|
||||
|
||||
typedef struct VkImportAndroidHardwareBufferInfoANDROID {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
struct AHardwareBuffer* buffer;
|
||||
} VkImportAndroidHardwareBufferInfoANDROID;
|
||||
|
||||
typedef struct VkMemoryGetAndroidHardwareBufferInfoANDROID {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkDeviceMemory memory;
|
||||
} VkMemoryGetAndroidHardwareBufferInfoANDROID;
|
||||
|
||||
typedef struct VkExternalFormatANDROID {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
uint64_t externalFormat;
|
||||
} VkExternalFormatANDROID;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetAndroidHardwareBufferPropertiesANDROID)(VkDevice device, const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryAndroidHardwareBufferANDROID)(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetAndroidHardwareBufferPropertiesANDROID(
|
||||
VkDevice device,
|
||||
const struct AHardwareBuffer* buffer,
|
||||
VkAndroidHardwareBufferPropertiesANDROID* pProperties);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryAndroidHardwareBufferANDROID(
|
||||
VkDevice device,
|
||||
const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo,
|
||||
struct AHardwareBuffer** pBuffer);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,58 +0,0 @@
|
||||
#ifndef VULKAN_FUCHSIA_H_
|
||||
#define VULKAN_FUCHSIA_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2018 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define VK_FUCHSIA_imagepipe_surface 1
|
||||
#define VK_FUCHSIA_IMAGEPIPE_SURFACE_SPEC_VERSION 1
|
||||
#define VK_FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME "VK_FUCHSIA_imagepipe_surface"
|
||||
|
||||
typedef VkFlags VkImagePipeSurfaceCreateFlagsFUCHSIA;
|
||||
|
||||
typedef struct VkImagePipeSurfaceCreateInfoFUCHSIA {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkImagePipeSurfaceCreateFlagsFUCHSIA flags;
|
||||
zx_handle_t imagePipeHandle;
|
||||
} VkImagePipeSurfaceCreateInfoFUCHSIA;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateImagePipeSurfaceFUCHSIA)(VkInstance instance, const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateImagePipeSurfaceFUCHSIA(
|
||||
VkInstance instance,
|
||||
const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,58 +0,0 @@
|
||||
#ifndef VULKAN_IOS_H_
|
||||
#define VULKAN_IOS_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2018 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define VK_MVK_ios_surface 1
|
||||
#define VK_MVK_IOS_SURFACE_SPEC_VERSION 2
|
||||
#define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface"
|
||||
|
||||
typedef VkFlags VkIOSSurfaceCreateFlagsMVK;
|
||||
|
||||
typedef struct VkIOSSurfaceCreateInfoMVK {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkIOSSurfaceCreateFlagsMVK flags;
|
||||
const void* pView;
|
||||
} VkIOSSurfaceCreateInfoMVK;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateIOSSurfaceMVK)(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateIOSSurfaceMVK(
|
||||
VkInstance instance,
|
||||
const VkIOSSurfaceCreateInfoMVK* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,58 +0,0 @@
|
||||
#ifndef VULKAN_MACOS_H_
|
||||
#define VULKAN_MACOS_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2018 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define VK_MVK_macos_surface 1
|
||||
#define VK_MVK_MACOS_SURFACE_SPEC_VERSION 2
|
||||
#define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface"
|
||||
|
||||
typedef VkFlags VkMacOSSurfaceCreateFlagsMVK;
|
||||
|
||||
typedef struct VkMacOSSurfaceCreateInfoMVK {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkMacOSSurfaceCreateFlagsMVK flags;
|
||||
const void* pView;
|
||||
} VkMacOSSurfaceCreateInfoMVK;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateMacOSSurfaceMVK)(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateMacOSSurfaceMVK(
|
||||
VkInstance instance,
|
||||
const VkMacOSSurfaceCreateInfoMVK* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,65 +0,0 @@
|
||||
#ifndef VULKAN_MIR_H_
|
||||
#define VULKAN_MIR_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2018 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define VK_KHR_mir_surface 1
|
||||
#define VK_KHR_MIR_SURFACE_SPEC_VERSION 4
|
||||
#define VK_KHR_MIR_SURFACE_EXTENSION_NAME "VK_KHR_mir_surface"
|
||||
|
||||
typedef VkFlags VkMirSurfaceCreateFlagsKHR;
|
||||
|
||||
typedef struct VkMirSurfaceCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkMirSurfaceCreateFlagsKHR flags;
|
||||
MirConnection* connection;
|
||||
MirSurface* mirSurface;
|
||||
} VkMirSurfaceCreateInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateMirSurfaceKHR)(VkInstance instance, const VkMirSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceMirPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, MirConnection* connection);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateMirSurfaceKHR(
|
||||
VkInstance instance,
|
||||
const VkMirSurfaceCreateInfoKHR* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
|
||||
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceMirPresentationSupportKHR(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
uint32_t queueFamilyIndex,
|
||||
MirConnection* connection);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,58 +0,0 @@
|
||||
#ifndef VULKAN_VI_H_
|
||||
#define VULKAN_VI_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2018 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define VK_NN_vi_surface 1
|
||||
#define VK_NN_VI_SURFACE_SPEC_VERSION 1
|
||||
#define VK_NN_VI_SURFACE_EXTENSION_NAME "VK_NN_vi_surface"
|
||||
|
||||
typedef VkFlags VkViSurfaceCreateFlagsNN;
|
||||
|
||||
typedef struct VkViSurfaceCreateInfoNN {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkViSurfaceCreateFlagsNN flags;
|
||||
void* window;
|
||||
} VkViSurfaceCreateInfoNN;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateViSurfaceNN)(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateViSurfaceNN(
|
||||
VkInstance instance,
|
||||
const VkViSurfaceCreateInfoNN* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,65 +0,0 @@
|
||||
#ifndef VULKAN_WAYLAND_H_
|
||||
#define VULKAN_WAYLAND_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2018 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define VK_KHR_wayland_surface 1
|
||||
#define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 6
|
||||
#define VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME "VK_KHR_wayland_surface"
|
||||
|
||||
typedef VkFlags VkWaylandSurfaceCreateFlagsKHR;
|
||||
|
||||
typedef struct VkWaylandSurfaceCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkWaylandSurfaceCreateFlagsKHR flags;
|
||||
struct wl_display* display;
|
||||
struct wl_surface* surface;
|
||||
} VkWaylandSurfaceCreateInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateWaylandSurfaceKHR)(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateWaylandSurfaceKHR(
|
||||
VkInstance instance,
|
||||
const VkWaylandSurfaceCreateInfoKHR* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
|
||||
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWaylandPresentationSupportKHR(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
uint32_t queueFamilyIndex,
|
||||
struct wl_display* display);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,276 +0,0 @@
|
||||
#ifndef VULKAN_WIN32_H_
|
||||
#define VULKAN_WIN32_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2018 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define VK_KHR_win32_surface 1
|
||||
#define VK_KHR_WIN32_SURFACE_SPEC_VERSION 6
|
||||
#define VK_KHR_WIN32_SURFACE_EXTENSION_NAME "VK_KHR_win32_surface"
|
||||
|
||||
typedef VkFlags VkWin32SurfaceCreateFlagsKHR;
|
||||
|
||||
typedef struct VkWin32SurfaceCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkWin32SurfaceCreateFlagsKHR flags;
|
||||
HINSTANCE hinstance;
|
||||
HWND hwnd;
|
||||
} VkWin32SurfaceCreateInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateWin32SurfaceKHR)(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateWin32SurfaceKHR(
|
||||
VkInstance instance,
|
||||
const VkWin32SurfaceCreateInfoKHR* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
|
||||
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
uint32_t queueFamilyIndex);
|
||||
#endif
|
||||
|
||||
#define VK_KHR_external_memory_win32 1
|
||||
#define VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
|
||||
#define VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_KHR_external_memory_win32"
|
||||
|
||||
typedef struct VkImportMemoryWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkExternalMemoryHandleTypeFlagBits handleType;
|
||||
HANDLE handle;
|
||||
LPCWSTR name;
|
||||
} VkImportMemoryWin32HandleInfoKHR;
|
||||
|
||||
typedef struct VkExportMemoryWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
const SECURITY_ATTRIBUTES* pAttributes;
|
||||
DWORD dwAccess;
|
||||
LPCWSTR name;
|
||||
} VkExportMemoryWin32HandleInfoKHR;
|
||||
|
||||
typedef struct VkMemoryWin32HandlePropertiesKHR {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
uint32_t memoryTypeBits;
|
||||
} VkMemoryWin32HandlePropertiesKHR;
|
||||
|
||||
typedef struct VkMemoryGetWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkDeviceMemory memory;
|
||||
VkExternalMemoryHandleTypeFlagBits handleType;
|
||||
} VkMemoryGetWin32HandleInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleKHR)(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandlePropertiesKHR)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleKHR(
|
||||
VkDevice device,
|
||||
const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo,
|
||||
HANDLE* pHandle);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandlePropertiesKHR(
|
||||
VkDevice device,
|
||||
VkExternalMemoryHandleTypeFlagBits handleType,
|
||||
HANDLE handle,
|
||||
VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties);
|
||||
#endif
|
||||
|
||||
#define VK_KHR_win32_keyed_mutex 1
|
||||
#define VK_KHR_WIN32_KEYED_MUTEX_SPEC_VERSION 1
|
||||
#define VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_KHR_win32_keyed_mutex"
|
||||
|
||||
typedef struct VkWin32KeyedMutexAcquireReleaseInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t acquireCount;
|
||||
const VkDeviceMemory* pAcquireSyncs;
|
||||
const uint64_t* pAcquireKeys;
|
||||
const uint32_t* pAcquireTimeouts;
|
||||
uint32_t releaseCount;
|
||||
const VkDeviceMemory* pReleaseSyncs;
|
||||
const uint64_t* pReleaseKeys;
|
||||
} VkWin32KeyedMutexAcquireReleaseInfoKHR;
|
||||
|
||||
|
||||
|
||||
#define VK_KHR_external_semaphore_win32 1
|
||||
#define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION 1
|
||||
#define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME "VK_KHR_external_semaphore_win32"
|
||||
|
||||
typedef struct VkImportSemaphoreWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkSemaphore semaphore;
|
||||
VkSemaphoreImportFlags flags;
|
||||
VkExternalSemaphoreHandleTypeFlagBits handleType;
|
||||
HANDLE handle;
|
||||
LPCWSTR name;
|
||||
} VkImportSemaphoreWin32HandleInfoKHR;
|
||||
|
||||
typedef struct VkExportSemaphoreWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
const SECURITY_ATTRIBUTES* pAttributes;
|
||||
DWORD dwAccess;
|
||||
LPCWSTR name;
|
||||
} VkExportSemaphoreWin32HandleInfoKHR;
|
||||
|
||||
typedef struct VkD3D12FenceSubmitInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t waitSemaphoreValuesCount;
|
||||
const uint64_t* pWaitSemaphoreValues;
|
||||
uint32_t signalSemaphoreValuesCount;
|
||||
const uint64_t* pSignalSemaphoreValues;
|
||||
} VkD3D12FenceSubmitInfoKHR;
|
||||
|
||||
typedef struct VkSemaphoreGetWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkSemaphore semaphore;
|
||||
VkExternalSemaphoreHandleTypeFlagBits handleType;
|
||||
} VkSemaphoreGetWin32HandleInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreWin32HandleKHR)(VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreWin32HandleKHR)(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreWin32HandleKHR(
|
||||
VkDevice device,
|
||||
const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreWin32HandleKHR(
|
||||
VkDevice device,
|
||||
const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo,
|
||||
HANDLE* pHandle);
|
||||
#endif
|
||||
|
||||
#define VK_KHR_external_fence_win32 1
|
||||
#define VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION 1
|
||||
#define VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME "VK_KHR_external_fence_win32"
|
||||
|
||||
typedef struct VkImportFenceWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkFence fence;
|
||||
VkFenceImportFlags flags;
|
||||
VkExternalFenceHandleTypeFlagBits handleType;
|
||||
HANDLE handle;
|
||||
LPCWSTR name;
|
||||
} VkImportFenceWin32HandleInfoKHR;
|
||||
|
||||
typedef struct VkExportFenceWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
const SECURITY_ATTRIBUTES* pAttributes;
|
||||
DWORD dwAccess;
|
||||
LPCWSTR name;
|
||||
} VkExportFenceWin32HandleInfoKHR;
|
||||
|
||||
typedef struct VkFenceGetWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkFence fence;
|
||||
VkExternalFenceHandleTypeFlagBits handleType;
|
||||
} VkFenceGetWin32HandleInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkImportFenceWin32HandleKHR)(VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetFenceWin32HandleKHR)(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkImportFenceWin32HandleKHR(
|
||||
VkDevice device,
|
||||
const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceWin32HandleKHR(
|
||||
VkDevice device,
|
||||
const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo,
|
||||
HANDLE* pHandle);
|
||||
#endif
|
||||
|
||||
#define VK_NV_external_memory_win32 1
|
||||
#define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
|
||||
#define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32"
|
||||
|
||||
typedef struct VkImportMemoryWin32HandleInfoNV {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkExternalMemoryHandleTypeFlagsNV handleType;
|
||||
HANDLE handle;
|
||||
} VkImportMemoryWin32HandleInfoNV;
|
||||
|
||||
typedef struct VkExportMemoryWin32HandleInfoNV {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
const SECURITY_ATTRIBUTES* pAttributes;
|
||||
DWORD dwAccess;
|
||||
} VkExportMemoryWin32HandleInfoNV;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleNV)(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleNV(
|
||||
VkDevice device,
|
||||
VkDeviceMemory memory,
|
||||
VkExternalMemoryHandleTypeFlagsNV handleType,
|
||||
HANDLE* pHandle);
|
||||
#endif
|
||||
|
||||
#define VK_NV_win32_keyed_mutex 1
|
||||
#define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 1
|
||||
#define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex"
|
||||
|
||||
typedef struct VkWin32KeyedMutexAcquireReleaseInfoNV {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t acquireCount;
|
||||
const VkDeviceMemory* pAcquireSyncs;
|
||||
const uint64_t* pAcquireKeys;
|
||||
const uint32_t* pAcquireTimeoutMilliseconds;
|
||||
uint32_t releaseCount;
|
||||
const VkDeviceMemory* pReleaseSyncs;
|
||||
const uint64_t* pReleaseKeys;
|
||||
} VkWin32KeyedMutexAcquireReleaseInfoNV;
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,66 +0,0 @@
|
||||
#ifndef VULKAN_XCB_H_
|
||||
#define VULKAN_XCB_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2018 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define VK_KHR_xcb_surface 1
|
||||
#define VK_KHR_XCB_SURFACE_SPEC_VERSION 6
|
||||
#define VK_KHR_XCB_SURFACE_EXTENSION_NAME "VK_KHR_xcb_surface"
|
||||
|
||||
typedef VkFlags VkXcbSurfaceCreateFlagsKHR;
|
||||
|
||||
typedef struct VkXcbSurfaceCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkXcbSurfaceCreateFlagsKHR flags;
|
||||
xcb_connection_t* connection;
|
||||
xcb_window_t window;
|
||||
} VkXcbSurfaceCreateInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateXcbSurfaceKHR)(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateXcbSurfaceKHR(
|
||||
VkInstance instance,
|
||||
const VkXcbSurfaceCreateInfoKHR* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
|
||||
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXcbPresentationSupportKHR(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
uint32_t queueFamilyIndex,
|
||||
xcb_connection_t* connection,
|
||||
xcb_visualid_t visual_id);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,66 +0,0 @@
|
||||
#ifndef VULKAN_XLIB_H_
|
||||
#define VULKAN_XLIB_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2018 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define VK_KHR_xlib_surface 1
|
||||
#define VK_KHR_XLIB_SURFACE_SPEC_VERSION 6
|
||||
#define VK_KHR_XLIB_SURFACE_EXTENSION_NAME "VK_KHR_xlib_surface"
|
||||
|
||||
typedef VkFlags VkXlibSurfaceCreateFlagsKHR;
|
||||
|
||||
typedef struct VkXlibSurfaceCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkXlibSurfaceCreateFlagsKHR flags;
|
||||
Display* dpy;
|
||||
Window window;
|
||||
} VkXlibSurfaceCreateInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateXlibSurfaceKHR)(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateXlibSurfaceKHR(
|
||||
VkInstance instance,
|
||||
const VkXlibSurfaceCreateInfoKHR* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
|
||||
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXlibPresentationSupportKHR(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
uint32_t queueFamilyIndex,
|
||||
Display* dpy,
|
||||
VisualID visualID);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,54 +0,0 @@
|
||||
#ifndef VULKAN_XLIB_XRANDR_H_
|
||||
#define VULKAN_XLIB_XRANDR_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2018 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#define VK_EXT_acquire_xlib_display 1
|
||||
#define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1
|
||||
#define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display"
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkAcquireXlibDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetRandROutputDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkAcquireXlibDisplayEXT(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
Display* dpy,
|
||||
VkDisplayKHR display);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetRandROutputDisplayEXT(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
Display* dpy,
|
||||
RROutput rrOutput,
|
||||
VkDisplayKHR* pDisplay);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -188,8 +188,8 @@ int ovx_hal_mul(const T *a, size_t astep, const T *b, size_t bstep, T *c, size_t
|
||||
refineStep(w, h, ivx::TypeToEnum<T>::imgType, astep);
|
||||
refineStep(w, h, ivx::TypeToEnum<T>::imgType, bstep);
|
||||
refineStep(w, h, ivx::TypeToEnum<T>::imgType, cstep);
|
||||
#ifdef _WIN32
|
||||
const float MAGIC_SCALE = 0x0.01010102p0;
|
||||
#ifdef _MSC_VER
|
||||
const float MAGIC_SCALE = 0x0.01010102;
|
||||
#else
|
||||
const float MAGIC_SCALE = 0x1.010102p-8;
|
||||
#endif
|
||||
@@ -431,7 +431,7 @@ int ovx_hal_warpAffine(int atype, const uchar *a, size_t astep, int aw, int ah,
|
||||
return CV_HAL_ERROR_OK;
|
||||
}
|
||||
|
||||
int ovx_hal_warpPerspective(int atype, const uchar *a, size_t astep, int aw, int ah, uchar *b, size_t bstep, int bw, int bh, const double M[9], int interpolation, int borderType, const double borderValue[4])
|
||||
int ovx_hal_warpPerspectve(int atype, const uchar *a, size_t astep, int aw, int ah, uchar *b, size_t bstep, int bw, int bh, const double M[9], int interpolation, int borderType, const double borderValue[4])
|
||||
{
|
||||
if (skipSmallImages<VX_KERNEL_WARP_PERSPECTIVE>(aw, ah))
|
||||
return CV_HAL_ERROR_NOT_IMPLEMENTED;
|
||||
|
||||
@@ -27,7 +27,7 @@ int ovx_hal_mul(const T *a, size_t astep, const T *b, size_t bstep, T *c, size_t
|
||||
int ovx_hal_merge8u(const uchar **src_data, uchar *dst_data, int len, int cn);
|
||||
int ovx_hal_resize(int atype, const uchar *a, size_t astep, int aw, int ah, uchar *b, size_t bstep, int bw, int bh, double inv_scale_x, double inv_scale_y, int interpolation);
|
||||
int ovx_hal_warpAffine(int atype, const uchar *a, size_t astep, int aw, int ah, uchar *b, size_t bstep, int bw, int bh, const double M[6], int interpolation, int borderType, const double borderValue[4]);
|
||||
int ovx_hal_warpPerspective(int atype, const uchar *a, size_t astep, int aw, int ah, uchar *b, size_t bstep, int bw, int bh, const double M[9], int interpolation, int borderType, const double borderValue[4]);
|
||||
int ovx_hal_warpPerspectve(int atype, const uchar *a, size_t astep, int aw, int ah, uchar *b, size_t bstep, int bw, int bh, const double M[9], int interpolation, int borderType, const double borderValue[4]);
|
||||
|
||||
struct cvhalFilter2D;
|
||||
int ovx_hal_filterInit(cvhalFilter2D **filter_context, uchar *kernel_data, size_t kernel_step, int kernel_type, int kernel_width, int kernel_height,
|
||||
@@ -97,7 +97,7 @@ int ovx_hal_integral(int depth, int sdepth, int, const uchar * a, size_t astep,
|
||||
//#undef cv_hal_warpAffine
|
||||
//#define cv_hal_warpAffine ovx_hal_warpAffine
|
||||
//#undef cv_hal_warpPerspective
|
||||
//#define cv_hal_warpPerspective ovx_hal_warpPerspective
|
||||
//#define cv_hal_warpPerspective ovx_hal_warpPerspectve
|
||||
|
||||
#undef cv_hal_filterInit
|
||||
#define cv_hal_filterInit ovx_hal_filterInit
|
||||
|
||||
@@ -1718,7 +1718,8 @@ static const vx_enum
|
||||
}
|
||||
|
||||
#ifdef IVX_USE_OPENCV
|
||||
/// Convert image format (fourcc) to cv::Mat type, throws WrapperError if not possible
|
||||
/// Convert image format (fourcc) to cv::Mat type
|
||||
/// \return CV_USRTYPE1 for unknown image formats
|
||||
static int formatToMatType(vx_df_image format, vx_uint32 planeIdx = 0)
|
||||
{
|
||||
switch (format)
|
||||
@@ -1738,7 +1739,7 @@ static const vx_enum
|
||||
case VX_DF_IMAGE_YUYV: return CV_8UC2;
|
||||
case VX_DF_IMAGE_NV12:
|
||||
case VX_DF_IMAGE_NV21: return planeIdx == 0 ? CV_8UC1 : CV_8UC2;
|
||||
default: throw WrapperError(std::string(__func__)+"(): unsupported image format");
|
||||
default: return CV_USRTYPE1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -154,6 +154,7 @@ endif()
|
||||
# ----------------------------------------------------------------------------
|
||||
# Detect compiler and target platform architecture
|
||||
# ----------------------------------------------------------------------------
|
||||
OCV_OPTION(ENABLE_CXX11 "Enable C++11 compilation mode" "${OPENCV_CXX11}")
|
||||
include(cmake/OpenCVDetectCXXCompiler.cmake)
|
||||
ocv_cmake_hook(POST_DETECT_COMPILER)
|
||||
|
||||
@@ -225,13 +226,13 @@ OCV_OPTION(BUILD_ITT "Build Intel ITT from source"
|
||||
# ===================================================
|
||||
OCV_OPTION(WITH_1394 "Include IEEE1394 support" ON
|
||||
VISIBLE_IF NOT ANDROID AND NOT IOS AND NOT WINRT
|
||||
VERIFY HAVE_DC1394_2)
|
||||
VERIFY HAVE_DC1394)
|
||||
OCV_OPTION(WITH_AVFOUNDATION "Use AVFoundation for Video I/O (iOS/Mac)" ON
|
||||
VISIBLE_IF APPLE
|
||||
VERIFY HAVE_AVFOUNDATION)
|
||||
OCV_OPTION(WITH_CAP_IOS "Enable iOS video capture" ON
|
||||
VISIBLE_IF IOS
|
||||
VERIFY HAVE_CAP_IOS)
|
||||
OCV_OPTION(WITH_CARBON "Use Carbon for UI instead of Cocoa (OBSOLETE)" OFF
|
||||
VISIBLE_IF (APPLE OR HAVE_COCOA)
|
||||
VERIFY HAVE_CARBON)
|
||||
OCV_OPTION(WITH_CAROTENE "Use NVidia carotene acceleration library for ARM platform" ON
|
||||
VISIBLE_IF (ARM OR AARCH64) AND NOT IOS AND NOT (CMAKE_VERSION VERSION_LESS "2.8.11"))
|
||||
OCV_OPTION(WITH_CPUFEATURES "Use cpufeatures Android library" ON
|
||||
@@ -249,21 +250,24 @@ OCV_OPTION(WITH_CUFFT "Include NVidia Cuda Fast Fourier Transform (FFT) library
|
||||
OCV_OPTION(WITH_CUBLAS "Include NVidia Cuda Basic Linear Algebra Subprograms (BLAS) library support" WITH_CUDA
|
||||
VISIBLE_IF WITH_CUDA
|
||||
VERIFY HAVE_CUBLAS)
|
||||
OCV_OPTION(WITH_CUDNN "Include NVIDIA CUDA Deep Neural Network (cuDNN) library support" WITH_CUDA
|
||||
VISIBLE_IF WITH_CUDA
|
||||
VERIFY HAVE_CUDNN)
|
||||
OCV_OPTION(WITH_NVCUVID "Include NVidia Video Decoding library support" OFF # disabled, details: https://github.com/opencv/opencv/issues/14850
|
||||
OCV_OPTION(WITH_NVCUVID "Include NVidia Video Decoding library support" WITH_CUDA
|
||||
VISIBLE_IF WITH_CUDA
|
||||
VERIFY HAVE_NVCUVID)
|
||||
OCV_OPTION(WITH_EIGEN "Include Eigen2/Eigen3 support" (NOT CV_DISABLE_OPTIMIZATION AND NOT CMAKE_CROSSCOMPILING)
|
||||
VISIBLE_IF NOT WINRT
|
||||
VERIFY HAVE_EIGEN)
|
||||
OCV_OPTION(WITH_VFW "Include Video for Windows support (deprecated, consider using MSMF)" OFF
|
||||
VISIBLE_IF WIN32
|
||||
VERIFY HAVE_VFW)
|
||||
OCV_OPTION(WITH_FFMPEG "Include FFMPEG support" (NOT ANDROID)
|
||||
VISIBLE_IF NOT IOS AND NOT WINRT
|
||||
VERIFY HAVE_FFMPEG)
|
||||
OCV_OPTION(WITH_GSTREAMER "Include Gstreamer support" ON
|
||||
VISIBLE_IF NOT ANDROID AND NOT IOS AND NOT WINRT
|
||||
VERIFY HAVE_GSTREAMER AND GSTREAMER_VERSION VERSION_GREATER "0.99")
|
||||
VERIFY HAVE_GSTREAMER AND GSTREAMER_BASE_VERSION VERSION_GREATER "0.99")
|
||||
OCV_OPTION(WITH_GSTREAMER_0_10 "Enable Gstreamer 0.10 support (instead of 1.x)" OFF
|
||||
VISIBLE_IF TRUE
|
||||
VERIFY HAVE_GSTREAMER AND GSTREAMER_BASE_VERSION VERSION_LESS "1.0")
|
||||
OCV_OPTION(WITH_GTK "Include GTK support" ON
|
||||
VISIBLE_IF UNIX AND NOT APPLE AND NOT ANDROID
|
||||
VERIFY HAVE_GTK)
|
||||
@@ -276,21 +280,15 @@ OCV_OPTION(WITH_IPP "Include Intel IPP support" (NOT MINGW AND NOT CV_DISABLE_OP
|
||||
OCV_OPTION(WITH_HALIDE "Include Halide support" OFF
|
||||
VISIBLE_IF TRUE
|
||||
VERIFY HAVE_HALIDE)
|
||||
OCV_OPTION(WITH_VULKAN "Include Vulkan support" OFF
|
||||
VISIBLE_IF TRUE
|
||||
VERIFY HAVE_VULKAN)
|
||||
OCV_OPTION(WITH_INF_ENGINE "Include Intel Inference Engine support" OFF
|
||||
VISIBLE_IF TRUE
|
||||
VERIFY INF_ENGINE_TARGET)
|
||||
OCV_OPTION(WITH_NGRAPH "Include nGraph support" WITH_INF_ENGINE
|
||||
VISIBLE_IF TRUE
|
||||
VERIFY TARGET ngraph::ngraph)
|
||||
OCV_OPTION(WITH_JASPER "Include JPEG2K support (Jasper)" ON
|
||||
OCV_OPTION(WITH_JASPER "Include JPEG2K support" ON
|
||||
VISIBLE_IF NOT IOS
|
||||
VERIFY HAVE_JASPER)
|
||||
OCV_OPTION(WITH_OPENJPEG "Include JPEG2K support (OpenJPEG)" ON
|
||||
VISIBLE_IF NOT IOS
|
||||
VERIFY HAVE_OPENJPEG)
|
||||
OCV_OPTION(WITH_JPEG "Include JPEG support" ON
|
||||
VISIBLE_IF TRUE
|
||||
VERIFY HAVE_JPEG)
|
||||
@@ -321,6 +319,9 @@ OCV_OPTION(WITH_GDCM "Include DICOM support" OFF
|
||||
OCV_OPTION(WITH_PVAPI "Include Prosilica GigE support" OFF
|
||||
VISIBLE_IF NOT ANDROID AND NOT IOS AND NOT WINRT
|
||||
VERIFY HAVE_PVAPI)
|
||||
OCV_OPTION(WITH_GIGEAPI "Include Smartek GigE support" OFF
|
||||
VISIBLE_IF NOT ANDROID AND NOT IOS AND NOT WINRT
|
||||
VERIFY HAVE_GIGE_API)
|
||||
OCV_OPTION(WITH_ARAVIS "Include Aravis GigE support" OFF
|
||||
VISIBLE_IF NOT ANDROID AND NOT IOS AND NOT WINRT AND NOT WIN32
|
||||
VERIFY HAVE_ARAVIS_API)
|
||||
@@ -330,24 +331,36 @@ OCV_OPTION(WITH_QT "Build with Qt Backend support" OFF
|
||||
OCV_OPTION(WITH_WIN32UI "Build with Win32 UI Backend support" ON
|
||||
VISIBLE_IF WIN32 AND NOT WINRT
|
||||
VERIFY HAVE_WIN32UI)
|
||||
OCV_OPTION(WITH_QUICKTIME "Use QuickTime for Video I/O (OBSOLETE)" OFF
|
||||
VISIBLE_IF APPLE
|
||||
VERIFY HAVE_QUICKTIME)
|
||||
OCV_OPTION(WITH_QTKIT "Use QTKit Video I/O backend" OFF
|
||||
VISIBLE_IF APPLE
|
||||
VERIFY HAVE_QTKIT)
|
||||
OCV_OPTION(WITH_TBB "Include Intel TBB support" OFF
|
||||
VISIBLE_IF NOT IOS AND NOT WINRT
|
||||
VERIFY HAVE_TBB)
|
||||
OCV_OPTION(WITH_HPX "Include Ste||ar Group HPX support" OFF
|
||||
VISIBLE_IF TRUE
|
||||
VERIFY HAVE_HPX)
|
||||
OCV_OPTION(WITH_OPENMP "Include OpenMP support" OFF
|
||||
VISIBLE_IF TRUE
|
||||
VERIFY HAVE_OPENMP)
|
||||
OCV_OPTION(WITH_CSTRIPES "Include C= support" OFF
|
||||
VISIBLE_IF WIN32 AND NOT WINRT
|
||||
VERIFY HAVE_CSTRIPES)
|
||||
OCV_OPTION(WITH_PTHREADS_PF "Use pthreads-based parallel_for" ON
|
||||
VISIBLE_IF NOT WIN32 OR MINGW
|
||||
VERIFY HAVE_PTHREADS_PF)
|
||||
OCV_OPTION(WITH_TIFF "Include TIFF support" ON
|
||||
VISIBLE_IF NOT IOS
|
||||
VERIFY HAVE_TIFF)
|
||||
OCV_OPTION(WITH_UNICAP "Include Unicap support (GPL)" OFF
|
||||
VISIBLE_IF UNIX AND NOT APPLE AND NOT ANDROID
|
||||
VERIFY HAVE_UNICAP)
|
||||
OCV_OPTION(WITH_V4L "Include Video 4 Linux support" ON
|
||||
VISIBLE_IF UNIX AND NOT ANDROID AND NOT APPLE
|
||||
VERIFY HAVE_CAMV4L OR HAVE_CAMV4L2 OR HAVE_VIDEOIO)
|
||||
OCV_OPTION(WITH_LIBV4L "Use libv4l for Video 4 Linux support" OFF
|
||||
VISIBLE_IF UNIX AND NOT ANDROID AND NOT APPLE
|
||||
VERIFY HAVE_LIBV4L)
|
||||
OCV_OPTION(WITH_DSHOW "Build VideoIO with DirectShow support" ON
|
||||
VISIBLE_IF WIN32 AND NOT ARM AND NOT WINRT
|
||||
VERIFY HAVE_DSHOW)
|
||||
@@ -384,9 +397,9 @@ OCV_OPTION(WITH_DIRECTX "Include DirectX support" ON
|
||||
OCV_OPTION(WITH_OPENCL_D3D11_NV "Include NVIDIA OpenCL D3D11 support" WITH_DIRECTX
|
||||
VISIBLE_IF WIN32 AND NOT WINRT
|
||||
VERIFY HAVE_OPENCL_D3D11_NV)
|
||||
OCV_OPTION(WITH_LIBREALSENSE "Include Intel librealsense support" OFF
|
||||
VISIBLE_IF NOT WITH_INTELPERC
|
||||
VERIFY HAVE_LIBREALSENSE)
|
||||
OCV_OPTION(WITH_INTELPERC "Include Intel Perceptual Computing support" OFF
|
||||
VISIBLE_IF WIN32 AND NOT WINRT
|
||||
VERIFY HAVE_INTELPERC)
|
||||
OCV_OPTION(WITH_VA "Include VA support" OFF
|
||||
VISIBLE_IF UNIX AND NOT ANDROID
|
||||
VERIFY HAVE_VA)
|
||||
@@ -420,15 +433,9 @@ OCV_OPTION(WITH_IMGCODEC_SUNRASTER "Include SUNRASTER support" ON
|
||||
OCV_OPTION(WITH_IMGCODEC_PXM "Include PNM (PBM,PGM,PPM) and PAM formats support" ON
|
||||
VISIBLE_IF TRUE
|
||||
VERIFY HAVE_IMGCODEC_PXM)
|
||||
OCV_OPTION(WITH_IMGCODEC_PFM "Include PFM formats support" ON
|
||||
VISIBLE_IF TRUE
|
||||
VERIFY HAVE_IMGCODEC_PFM)
|
||||
OCV_OPTION(WITH_QUIRC "Include library QR-code decoding" ON
|
||||
VISIBLE_IF TRUE
|
||||
VERIFY HAVE_QUIRC)
|
||||
OCV_OPTION(WITH_ANDROID_MEDIANDK "Use Android Media NDK for Video I/O (Android)" (ANDROID_NATIVE_API_LEVEL GREATER 20)
|
||||
VISIBLE_IF ANDROID
|
||||
VERIFY HAVE_ANDROID_MEDIANDK)
|
||||
OCV_OPTION(WITH_TENGINE "Include Arm Inference Tengine support" OFF
|
||||
VISIBLE_IF (ARM OR AARCH64) AND (UNIX OR ANDROID) AND NOT IOS
|
||||
VERIFY HAVE_TENGINE)
|
||||
@@ -452,11 +459,11 @@ OCV_OPTION(BUILD_FAT_JAVA_LIB "Create Java wrapper exporting all functions
|
||||
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 APPLE_FRAMEWORK) )
|
||||
OCV_OPTION(BUILD_JAVA "Enable Java support" (ANDROID OR NOT CMAKE_CROSSCOMPILING) IF (ANDROID OR (NOT APPLE_FRAMEWORK AND NOT WINRT)) )
|
||||
OCV_OPTION(BUILD_OBJC "Enable Objective-C support" ON IF APPLE_FRAMEWORK )
|
||||
|
||||
# OpenCV installation options
|
||||
# ===================================================
|
||||
OCV_OPTION(INSTALL_CREATE_DISTRIB "Change install rules to build the distribution package" OFF )
|
||||
OCV_OPTION(INSTALL_BIN_EXAMPLES "Install prebuilt examples" WIN32 IF BUILD_EXAMPLES)
|
||||
OCV_OPTION(INSTALL_C_EXAMPLES "Install C examples" OFF )
|
||||
OCV_OPTION(INSTALL_PYTHON_EXAMPLES "Install Python examples" OFF )
|
||||
OCV_OPTION(INSTALL_ANDROID_EXAMPLES "Install Android examples" OFF IF ANDROID )
|
||||
@@ -474,7 +481,7 @@ OCV_OPTION(OPENCV_ENABLE_MEMORY_SANITIZER "Better support for memory/address san
|
||||
OCV_OPTION(ENABLE_OMIT_FRAME_POINTER "Enable -fomit-frame-pointer for GCC" ON IF CV_GCC )
|
||||
OCV_OPTION(ENABLE_POWERPC "Enable PowerPC for GCC" ON IF (CV_GCC AND CMAKE_SYSTEM_PROCESSOR MATCHES powerpc.*) )
|
||||
OCV_OPTION(ENABLE_FAST_MATH "Enable compiler options for fast math optimizations on FP computations (not recommended)" OFF)
|
||||
if(NOT IOS AND (NOT ANDROID OR OPENCV_ANDROID_USE_LEGACY_FLAGS)) # Use CPU_BASELINE instead
|
||||
if(NOT IOS) # Use CPU_BASELINE instead
|
||||
OCV_OPTION(ENABLE_NEON "Enable NEON instructions" (NEON OR ANDROID_ARM_NEON OR AARCH64) IF (CV_GCC OR CV_CLANG) AND (ARM OR AARCH64 OR IOS) )
|
||||
OCV_OPTION(ENABLE_VFPV3 "Enable VFPv3-D32 instructions" OFF IF (CV_GCC OR CV_CLANG) AND (ARM OR AARCH64 OR IOS) )
|
||||
endif()
|
||||
@@ -488,7 +495,7 @@ OCV_OPTION(ENABLE_BUILD_HARDENING "Enable hardening of the resulting binarie
|
||||
OCV_OPTION(ENABLE_LTO "Enable Link Time Optimization" OFF IF CV_GCC OR MSVC)
|
||||
OCV_OPTION(ENABLE_THIN_LTO "Enable Thin LTO" OFF IF CV_CLANG)
|
||||
OCV_OPTION(GENERATE_ABI_DESCRIPTOR "Generate XML file for abi_compliance_checker tool" OFF IF UNIX)
|
||||
OCV_OPTION(OPENCV_GENERATE_PKGCONFIG "Generate .pc file for pkg-config build tool (deprecated)" OFF)
|
||||
OCV_OPTION(OPENCV_GENERATE_PKGCONFIG "Generate .pc file for pkg-config build tool (deprecated)" ON IF (UNIX AND NOT MSVC AND NOT IOS AND NOT ANDROID) )
|
||||
OCV_OPTION(CV_ENABLE_INTRINSICS "Use intrinsic-based optimized code" ON )
|
||||
OCV_OPTION(CV_DISABLE_OPTIMIZATION "Disable explicit optimized code (dispatched code/intrinsics/loop unrolling/etc)" OFF )
|
||||
OCV_OPTION(CV_TRACE "Enable OpenCV code trace" ON)
|
||||
@@ -740,11 +747,6 @@ if(WITH_HALIDE)
|
||||
include(cmake/OpenCVDetectHalide.cmake)
|
||||
endif()
|
||||
|
||||
# --- VkCom ---
|
||||
if(WITH_VULKAN)
|
||||
include(cmake/OpenCVDetectVulkan.cmake)
|
||||
endif()
|
||||
|
||||
# --- Inference Engine ---
|
||||
if(WITH_INF_ENGINE)
|
||||
include(cmake/OpenCVDetectInferenceEngine.cmake)
|
||||
@@ -831,6 +833,27 @@ configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/custom_hal.hpp.in" "${CMAKE
|
||||
unset(_hal_includes)
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Add CUDA libraries (needed for apps/tools, samples)
|
||||
# ----------------------------------------------------------------------------
|
||||
if(HAVE_CUDA)
|
||||
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY})
|
||||
if(HAVE_CUBLAS)
|
||||
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${CUDA_cublas_LIBRARY})
|
||||
endif()
|
||||
if(HAVE_CUFFT)
|
||||
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${CUDA_cufft_LIBRARY})
|
||||
endif()
|
||||
foreach(p ${CUDA_LIBS_PATH})
|
||||
if(MSVC AND CMAKE_GENERATOR MATCHES "Ninja|JOM")
|
||||
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${CMAKE_LIBRARY_PATH_FLAG}"${p}")
|
||||
else()
|
||||
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${CMAKE_LIBRARY_PATH_FLAG}${p})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Code trace support
|
||||
# ----------------------------------------------------------------------------
|
||||
@@ -877,7 +900,7 @@ if(BUILD_opencv_apps)
|
||||
endif()
|
||||
|
||||
# examples
|
||||
if(BUILD_EXAMPLES OR BUILD_ANDROID_EXAMPLES OR INSTALL_ANDROID_EXAMPLES OR INSTALL_PYTHON_EXAMPLES OR INSTALL_C_EXAMPLES)
|
||||
if(BUILD_EXAMPLES OR BUILD_ANDROID_EXAMPLES OR INSTALL_PYTHON_EXAMPLES OR INSTALL_C_EXAMPLES)
|
||||
add_subdirectory(samples)
|
||||
endif()
|
||||
|
||||
@@ -895,7 +918,9 @@ ocv_cmake_hook(PRE_FINALIZE)
|
||||
include(cmake/OpenCVGenHeaders.cmake)
|
||||
|
||||
# Generate opencv.pc for pkg-config command
|
||||
if(OPENCV_GENERATE_PKGCONFIG)
|
||||
if(NOT OPENCV_SKIP_PKGCONFIG_GENERATION
|
||||
AND OPENCV_GENERATE_PKGCONFIG
|
||||
AND NOT CMAKE_GENERATOR MATCHES "Xcode")
|
||||
include(cmake/OpenCVGenPkgconfig.cmake)
|
||||
endif()
|
||||
|
||||
@@ -1063,8 +1088,8 @@ string(STRIP "${OPENCV_COMPILER_STR}" OPENCV_COMPILER_STR)
|
||||
status("")
|
||||
status(" C/C++:")
|
||||
status(" Built as dynamic libs?:" BUILD_SHARED_LIBS THEN YES ELSE NO)
|
||||
if(DEFINED CMAKE_CXX_STANDARD AND CMAKE_CXX_STANDARD)
|
||||
status(" C++ standard:" "${CMAKE_CXX_STANDARD}")
|
||||
if(ENABLE_CXX11 OR HAVE_CXX11)
|
||||
status(" C++11:" HAVE_CXX11 THEN YES ELSE NO)
|
||||
endif()
|
||||
status(" C++ Compiler:" ${OPENCV_COMPILER_STR})
|
||||
status(" C++ flags (Release):" ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE})
|
||||
@@ -1115,7 +1140,7 @@ ocv_build_features_string(apps_status
|
||||
IF BUILD_EXAMPLES THEN "examples"
|
||||
IF BUILD_opencv_apps THEN "apps"
|
||||
IF BUILD_ANDROID_SERVICE THEN "android_service"
|
||||
IF (BUILD_ANDROID_EXAMPLES OR INSTALL_ANDROID_EXAMPLES) AND CAN_BUILD_ANDROID_PROJECTS THEN "android_examples"
|
||||
IF BUILD_ANDROID_EXAMPLES AND CAN_BUILD_ANDROID_PROJECTS THEN "android_examples"
|
||||
ELSE "-")
|
||||
status(" Applications:" "${apps_status}")
|
||||
ocv_build_features_string(docs_status
|
||||
@@ -1200,8 +1225,12 @@ if(WITH_WIN32UI)
|
||||
status(" Win32 UI:" HAVE_WIN32UI THEN YES ELSE NO)
|
||||
endif()
|
||||
|
||||
if(HAVE_COCOA) # APPLE
|
||||
status(" Cocoa:" YES)
|
||||
if(APPLE)
|
||||
if(WITH_CARBON)
|
||||
status(" Carbon:" YES)
|
||||
else()
|
||||
status(" Cocoa:" YES)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_GTK OR HAVE_GTK)
|
||||
@@ -1253,12 +1282,8 @@ if(WITH_TIFF OR HAVE_TIFF)
|
||||
status(" TIFF:" TIFF_FOUND THEN "${TIFF_LIBRARY} (ver ${TIFF_VERSION} / ${TIFF_VERSION_STRING})" ELSE "build (ver ${TIFF_VERSION} - ${TIFF_VERSION_STRING})")
|
||||
endif()
|
||||
|
||||
if(HAVE_OPENJPEG)
|
||||
status(" JPEG 2000:" "OpenJPEG (ver ${OPENJPEG_MAJOR_VERSION}.${OPENJPEG_MINOR_VERSION}.${OPENJPEG_BUILD_VERSION})")
|
||||
elseif(HAVE_JASPER)
|
||||
status(" JPEG 2000:" JASPER_FOUND THEN "${JASPER_LIBRARY} (ver ${JASPER_VERSION_STRING})" ELSE "build Jasper (ver ${JASPER_VERSION_STRING})")
|
||||
elseif(WITH_OPENJPEG OR WITH_JASPER)
|
||||
status(" JPEG 2000:" "NO")
|
||||
if(WITH_JASPER OR HAVE_JASPER)
|
||||
status(" JPEG 2000:" JASPER_FOUND THEN "${JASPER_LIBRARY} (ver ${JASPER_VERSION_STRING})" ELSE "build (ver ${JASPER_VERSION_STRING})")
|
||||
endif()
|
||||
|
||||
if(WITH_OPENEXR OR HAVE_OPENEXR)
|
||||
@@ -1274,7 +1299,7 @@ if(WITH_GDAL OR HAVE_GDAL)
|
||||
endif()
|
||||
|
||||
if(WITH_GDCM OR HAVE_GDCM)
|
||||
status(" GDCM:" HAVE_GDCM THEN "YES (${GDCM_VERSION})" ELSE "NO")
|
||||
status(" GDCM:" HAVE_GDCM THEN "YES (ver ${GDCM_VERSION})" ELSE "NO")
|
||||
endif()
|
||||
|
||||
if(WITH_IMGCODEC_HDR OR DEFINED HAVE_IMGCODEC_HDR)
|
||||
@@ -1289,16 +1314,22 @@ if(WITH_IMGCODEC_PXM OR DEFINED HAVE_IMGCODEC_PXM)
|
||||
status(" PXM:" HAVE_IMGCODEC_PXM THEN "YES" ELSE "NO")
|
||||
endif()
|
||||
|
||||
if(WITH_IMGCODEC_PFM OR DEFINED HAVE_IMGCODEC_PFM)
|
||||
status(" PFM:" HAVE_IMGCODEC_PFM THEN "YES" ELSE "NO")
|
||||
endif()
|
||||
|
||||
# ========================== VIDEO IO ==========================
|
||||
status("")
|
||||
status(" Video I/O:")
|
||||
|
||||
if(WITH_1394 OR HAVE_DC1394_2)
|
||||
status(" DC1394:" HAVE_DC1394_2 THEN "YES (${DC1394_2_VERSION})" ELSE NO)
|
||||
if(WITH_VFW OR HAVE_VFW)
|
||||
status(" Video for Windows:" HAVE_VFW THEN YES ELSE NO)
|
||||
endif()
|
||||
|
||||
if(WITH_1394 OR HAVE_DC1394)
|
||||
if (HAVE_DC1394_2)
|
||||
status(" DC1394:" "YES (ver ${DC1394_2_VERSION})")
|
||||
elseif (HAVE_DC1394)
|
||||
status(" DC1394:" "YES (ver ${DC1394_VERSION})")
|
||||
else()
|
||||
status(" DC1394:" "NO")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_FFMPEG OR HAVE_FFMPEG)
|
||||
@@ -1309,64 +1340,89 @@ if(WITH_FFMPEG OR HAVE_FFMPEG)
|
||||
else()
|
||||
status(" FFMPEG:" HAVE_FFMPEG THEN YES ELSE NO)
|
||||
endif()
|
||||
status(" avcodec:" FFMPEG_libavcodec_VERSION THEN "YES (${FFMPEG_libavcodec_VERSION})" ELSE NO)
|
||||
status(" avformat:" FFMPEG_libavformat_VERSION THEN "YES (${FFMPEG_libavformat_VERSION})" ELSE NO)
|
||||
status(" avutil:" FFMPEG_libavutil_VERSION THEN "YES (${FFMPEG_libavutil_VERSION})" ELSE NO)
|
||||
status(" swscale:" FFMPEG_libswscale_VERSION THEN "YES (${FFMPEG_libswscale_VERSION})" ELSE NO)
|
||||
status(" avresample:" FFMPEG_libavresample_VERSION THEN "YES (${FFMPEG_libavresample_VERSION})" ELSE NO)
|
||||
status(" avcodec:" FFMPEG_libavcodec_FOUND THEN "YES (ver ${FFMPEG_libavcodec_VERSION})" ELSE NO)
|
||||
status(" avformat:" FFMPEG_libavformat_FOUND THEN "YES (ver ${FFMPEG_libavformat_VERSION})" ELSE NO)
|
||||
status(" avutil:" FFMPEG_libavutil_FOUND THEN "YES (ver ${FFMPEG_libavutil_VERSION})" ELSE NO)
|
||||
status(" swscale:" FFMPEG_libswscale_FOUND THEN "YES (ver ${FFMPEG_libswscale_VERSION})" ELSE NO)
|
||||
status(" avresample:" FFMPEG_libavresample_FOUND THEN "YES (ver ${FFMPEG_libavresample_VERSION})" ELSE NO)
|
||||
endif()
|
||||
|
||||
if(WITH_GSTREAMER OR HAVE_GSTREAMER)
|
||||
status(" GStreamer:" HAVE_GSTREAMER THEN "YES (${GSTREAMER_VERSION})" ELSE NO)
|
||||
status(" GStreamer:" HAVE_GSTREAMER THEN "YES" ELSE NO)
|
||||
if(HAVE_GSTREAMER)
|
||||
status(" base:" "YES (ver ${GSTREAMER_BASE_VERSION})")
|
||||
status(" video:" "YES (ver ${GSTREAMER_VIDEO_VERSION})")
|
||||
status(" app:" "YES (ver ${GSTREAMER_APP_VERSION})")
|
||||
status(" riff:" "YES (ver ${GSTREAMER_RIFF_VERSION})")
|
||||
status(" pbutils:" "YES (ver ${GSTREAMER_PBUTILS_VERSION})")
|
||||
endif(HAVE_GSTREAMER)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENNI OR HAVE_OPENNI)
|
||||
status(" OpenNI:" HAVE_OPENNI THEN "YES (ver ${OPENNI_VERSION_STRING}, build ${OPENNI_VERSION_BUILD})" ELSE NO)
|
||||
status(" OpenNI PrimeSensor Modules:" HAVE_OPENNI_PRIME_SENSOR_MODULE THEN "YES (${OPENNI_PRIME_SENSOR_MODULE})" ELSE NO)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENNI2 OR HAVE_OPENNI2)
|
||||
status(" OpenNI2:" HAVE_OPENNI2 THEN "YES (${OPENNI2_VERSION})" ELSE NO)
|
||||
status(" OpenNI2:" HAVE_OPENNI2 THEN "YES (ver ${OPENNI2_VERSION_STRING}, build ${OPENNI2_VERSION_BUILD})" ELSE NO)
|
||||
endif()
|
||||
|
||||
if(WITH_PVAPI OR HAVE_PVAPI)
|
||||
status(" PvAPI:" HAVE_PVAPI THEN YES ELSE NO)
|
||||
status(" PvAPI:" HAVE_PVAPI THEN YES ELSE NO)
|
||||
endif()
|
||||
|
||||
if(WITH_GIGEAPI OR HAVE_GIGE_API)
|
||||
status(" GigEVisionSDK:" HAVE_GIGE_API THEN YES ELSE NO)
|
||||
endif()
|
||||
|
||||
if(WITH_ARAVIS OR HAVE_ARAVIS_API)
|
||||
status(" Aravis SDK:" HAVE_ARAVIS_API THEN "YES (${ARAVIS_VERSION})" ELSE NO)
|
||||
status(" Aravis SDK:" HAVE_ARAVIS_API THEN "YES (${ARAVIS_LIBRARIES})" ELSE NO)
|
||||
endif()
|
||||
|
||||
if(WITH_AVFOUNDATION OR HAVE_AVFOUNDATION)
|
||||
status(" AVFoundation:" HAVE_AVFOUNDATION THEN YES ELSE NO)
|
||||
if(APPLE)
|
||||
status(" AVFoundation:" HAVE_AVFOUNDATION THEN YES ELSE NO)
|
||||
if(WITH_QUICKTIME OR HAVE_QUICKTIME)
|
||||
status(" QuickTime:" HAVE_QUICKTIME THEN YES ELSE NO)
|
||||
endif()
|
||||
if(WITH_QTKIT OR HAVE_QTKIT)
|
||||
status(" QTKit:" HAVE_QTKIT THEN "YES (deprecated)" ELSE NO)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(HAVE_CAP_IOS)
|
||||
status(" iOS capture:" YES)
|
||||
if(WITH_UNICAP OR HAVE_UNICAP)
|
||||
status(" UniCap:" HAVE_UNICAP THEN "YES (ver ${UNICAP_libunicap_VERSION})" ELSE NO)
|
||||
status(" UniCap ucil:" HAVE_UNICAP THEN "YES (ver ${UNICAP_libucil_VERSION})" ELSE NO)
|
||||
endif()
|
||||
|
||||
if(WITH_V4L OR HAVE_V4L)
|
||||
if(WITH_V4L OR WITH_LIBV4L OR HAVE_LIBV4L OR HAVE_CAMV4L OR HAVE_CAMV4L2 OR HAVE_VIDEOIO)
|
||||
status(" libv4l/libv4l2:" HAVE_LIBV4L THEN "${LIBV4L_libv4l1_VERSION} / ${LIBV4L_libv4l2_VERSION}" ELSE "NO")
|
||||
ocv_build_features_string(v4l_status
|
||||
IF HAVE_CAMV4L THEN "linux/videodev.h"
|
||||
IF HAVE_CAMV4L2 THEN "linux/videodev2.h"
|
||||
IF HAVE_VIDEOIO THEN "sys/videoio.h"
|
||||
ELSE "NO")
|
||||
status(" v4l/v4l2:" HAVE_V4L THEN "YES (${v4l_status})" ELSE NO)
|
||||
status(" v4l/v4l2:" "${v4l_status}")
|
||||
endif()
|
||||
|
||||
if(WITH_DSHOW OR HAVE_DSHOW)
|
||||
status(" DirectShow:" HAVE_DSHOW THEN YES ELSE NO)
|
||||
status(" DirectShow:" HAVE_DSHOW THEN YES ELSE NO)
|
||||
endif()
|
||||
|
||||
if(WITH_MSMF OR HAVE_MSMF)
|
||||
status(" Media Foundation:" HAVE_MSMF THEN YES ELSE NO)
|
||||
status(" DXVA:" HAVE_MSMF_DXVA THEN YES ELSE NO)
|
||||
status(" Media Foundation:" HAVE_MSMF THEN YES ELSE NO)
|
||||
status(" DXVA:" HAVE_MSMF_DXVA THEN YES ELSE NO)
|
||||
endif()
|
||||
|
||||
if(WITH_XIMEA OR HAVE_XIMEA)
|
||||
status(" XIMEA:" HAVE_XIMEA THEN YES ELSE NO)
|
||||
status(" XIMEA:" HAVE_XIMEA THEN YES ELSE NO)
|
||||
endif()
|
||||
|
||||
if(WITH_XINE OR HAVE_XINE)
|
||||
status(" Xine:" HAVE_XINE THEN "YES (ver ${XINE_VERSION})" ELSE NO)
|
||||
endif()
|
||||
|
||||
if(WITH_LIBREALSENSE OR HAVE_LIBREALSENSE)
|
||||
status(" Intel RealSense:" HAVE_LIBREALSENSE THEN "YES (${LIBREALSENSE_VERSION})" ELSE NO)
|
||||
if(WITH_INTELPERC OR HAVE_INTELPERC)
|
||||
status(" Intel PerC:" HAVE_INTELPERC THEN "YES" ELSE NO)
|
||||
endif()
|
||||
|
||||
if(WITH_MFX OR HAVE_MFX)
|
||||
@@ -1380,7 +1436,7 @@ endif()
|
||||
# Order is similar to CV_PARALLEL_FRAMEWORK in core/src/parallel.cpp
|
||||
ocv_build_features_string(parallel_status EXCLUSIVE
|
||||
IF HAVE_TBB THEN "TBB (ver ${TBB_VERSION_MAJOR}.${TBB_VERSION_MINOR} interface ${TBB_INTERFACE_VERSION})"
|
||||
IF HAVE_HPX THEN "HPX"
|
||||
IF HAVE_CSTRIPES THEN "C="
|
||||
IF HAVE_OPENMP THEN "OpenMP"
|
||||
IF HAVE_GCD THEN "GCD"
|
||||
IF WINRT OR HAVE_CONCURRENCY THEN "Concurrency"
|
||||
@@ -1517,20 +1573,6 @@ if(WITH_CUDA OR HAVE_CUDA)
|
||||
status(" NVIDIA GPU arch:" ${OPENCV_CUDA_ARCH_BIN})
|
||||
status(" NVIDIA PTX archs:" ${OPENCV_CUDA_ARCH_PTX})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_CUDNN OR HAVE_CUDNN)
|
||||
status("")
|
||||
status(" cuDNN:" HAVE_CUDNN THEN "YES (ver ${CUDNN_VERSION})" ELSE NO)
|
||||
endif()
|
||||
|
||||
if(WITH_VULKAN OR HAVE_VULKAN)
|
||||
status("")
|
||||
status(" Vulkan:" HAVE_VULKAN THEN "YES" ELSE "NO")
|
||||
if(HAVE_VULKAN)
|
||||
status(" Include path:" VULKAN_INCLUDE_DIRS THEN "${VULKAN_INCLUDE_DIRS}" ELSE "NO")
|
||||
status(" Link libraries:" VULKAN_LIBRARIES THEN "${VULKAN_LIBRARIES}" ELSE "Dynamic load")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_OPENCL OR HAVE_OPENCL)
|
||||
@@ -1596,12 +1638,6 @@ if(BUILD_JAVA)
|
||||
status(" Java tests:" BUILD_TESTS AND opencv_test_java_BINARY_DIR THEN YES ELSE NO)
|
||||
endif()
|
||||
|
||||
# ========================== Objective-C =======================
|
||||
if(BUILD_OBJC)
|
||||
status("")
|
||||
status(" Objective-C wrappers:" HAVE_opencv_objc THEN YES ELSE NO)
|
||||
endif()
|
||||
|
||||
ocv_cmake_hook(STATUS_DUMP_EXTRA)
|
||||
|
||||
# ========================== auxiliary ==========================
|
||||
|
||||
@@ -2,13 +2,11 @@
|
||||
|
||||
### Resources
|
||||
|
||||
* Homepage: <https://opencv.org>
|
||||
* Courses: <https://opencv.org/courses>
|
||||
* Docs: <https://docs.opencv.org/master/>
|
||||
* Homepage: <http://opencv.org>
|
||||
* Docs: <http://docs.opencv.org/3.4/>
|
||||
* Q&A forum: <http://answers.opencv.org>
|
||||
* Issue tracking: <https://github.com/opencv/opencv/issues>
|
||||
|
||||
|
||||
### Contributing
|
||||
|
||||
Please read the [contribution guidelines](https://github.com/opencv/opencv/wiki/How_to_contribute) before starting work on a pull request.
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
# Security Policy
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
If you have information about a security issue or vulnerability in OpenCV, please send an e-mail to security@opencv.org.
|
||||
|
||||
Please provide as much information as possible:
|
||||
|
||||
- A detailed description of the vulnerability we can use to reproduce your findings.
|
||||
|
||||
- Who can exploit this vulnerability and what would they gain. An attack scenario.
|
||||
|
||||
- Information about known exploits if any.
|
||||
|
||||
A member of the Security Team will review your e-mail and contact you to collaborate on resolving the issue.
|
||||
|
||||
## PGP Key
|
||||
|
||||
If a security vulnerability report has extremely sensitive information you may encrypt it using our PGP public key:
|
||||
|
||||
```
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQINBF3D4kMBEADMujKXgYtH1RFA25OTz+AFVZJlsQj8vC9WqKxvx7lluU33J8H0
|
||||
QUTwqysupVKmeLLdhWLrhMdN22qV33rn/Ba4VaosIkjBs6TSJg752J9qK07C+ps5
|
||||
4a8DDiqUV5B5aOO1ZI82rcw0EB4uTyJdsynY2zs1ylfNA3UothN30nSmv8HK22wO
|
||||
rt7R0/W29AoREihDWiGsTm6PxPA/jGN9WawqzVZF4Iv5kC6jFSojoyj1vVDn/55l
|
||||
JcjjRD88tSvjLeJE4vVgoN5LzvaNnwHOv8z+wDakt7cc/BLO0GdUOZvo5iBqv9sF
|
||||
y/6G4SULEY+LD1ByTEjajZCkfzURq7qVdRehseplOO5qPLDYU1PumzFYMqhkGRcu
|
||||
yH0q1bnqzKilARYCDUjlfPinQR6ko1CZ6aFCVPXHjs6btJ3kiP7SohjO8maO8IXD
|
||||
DvHS/qzxQ4NiqunSd8/Nh54WhckV3t+u1UUY7sesN+BDFHcpPOwvjubSpmoBT1TC
|
||||
lSduVUfR754uxiZTkNB19+J8omWCg6lJsXysZjRwypGv5cUUFiv+HM+4m2Th4Hpx
|
||||
hVvTwzwkhWDq91DkuHwtfpyikhSaCqMrvZ+cJ6QCUSssYwR3unPbhJ7E7HVUA114
|
||||
KgBHBcx9ZBJXcuYeztC4sRPOcvPc7s9ODzT1zSJpyqxJ1XMwjH4tir311QARAQAB
|
||||
tCVPcGVuQ1YgU2VjdXJpdHkgPHNlY3VyaXR5QG9wZW5jdi5vcmc+iQJOBBMBCgA4
|
||||
FiEEWsPgWpOWlzgrzgzn8YQhBPGCecsFAl3D4kMCGwMFCwkIBwIGFQoJCAsCBBYC
|
||||
AwECHgECF4AACgkQ8YQhBPGCecsweBAAl2dWcAJuLvLFDrQsTfYy8SgUvr88SZai
|
||||
uxOkAfdmYeuttE6pONb9/u4zngZM9cVkDAKP4M8C852QaO4TryKT4q5LGwYtAIjF
|
||||
OBFVUebAuf+huL/e6YCI9FDWy3hj4aeMdWg8lphNe7niNfICYJ5nTSIvly3rWFUm
|
||||
aWTV9kVJVT0oH9Cw96+XLahOdAWsFDurBy0prLcqjYuNd6bO/j3hqm+GCrMZTbKG
|
||||
21oNYoKO4+6T12Fy9ZCxnQWcguNdIpeDJ93O18R3A92zwxQlYchcyzqcSAXzQZGs
|
||||
nctYrxqTOcrOV0HoYRTQSct5hoUPK6v9gOP9CJ1rzHf5l88/mD0cqT12IbpYPXYg
|
||||
/AldZBUljTatjDy74v2GX4wktkuDhT2NN0sJJ6deFQuqoBbG8ODo8XemOKENc/kA
|
||||
VvUeroI7Jc6P1eIfTM9rOCR6w/wCl9YM+2v3pV0eQ/yn2SLEYH6uT/fCzCEYY+Kh
|
||||
G/uw5e4BjKjMgqIyDO/QiFaQIcTgpxgt8hze6U2lHTEoNvVbd7Xw99x+aN9BYeNz
|
||||
DGNao+gwDAo+jZrcg99+nwW/+ecFRAmHZ0iCDRJISR55j4CKLMaGKvnNF4P43FqU
|
||||
Ug++9lv7gPWFU96o+p58omfkamVT6lp+LgZHr+YTBgCOMjD1ljaIES4rvVolCNLv
|
||||
3pXe63k8J5y5Ag0EXcPiQwEQALkUn+px7kTTKdHY8HRTakgoj1FD0sRS8O1r8Y1b
|
||||
UJ2lZCkHlJc1zsyR0EnZascsW3IMlzeU1mcogR9HPogFkotd0pmkwheXKPWfwhfJ
|
||||
EQ48p8oYwtTzwcd6+Fd6nYs9Uj1fSlnkQ7aAxSOhxZsUwYuAUMZPTK4caFENneGO
|
||||
8lsjrC8aS3/DE1QMdafxd2mYDqigMarVU7UfZi5db5rb6NwUOhE65qmXC7cCrGRw
|
||||
uC7AMr/xybND0pWgWMWFPNOdKKS0Vsx6Wm3uJANXHz/28d4ozhn+midht+BBHFLa
|
||||
kzs0eA2dygVNoVqthjWZoT7fDQJ1t9BGH6oQQVJIhPNkM0LZt0Egpq3K025F9GW7
|
||||
JMlUG78ptKogroaVqQcFBGOxMS6J2axHXyd7NFulzucH48y0HCkJi2CyavNabHAF
|
||||
Nr5d+1M1az4AzFHoeMD1OcUSO2klnZqSR5X4JJm4gBeNAAPOJ9nNyo7lQOgG50Kq
|
||||
buwwEY1rBFDfi55pF+RzvqbKUxPyvaz5LoK7ZJWWlYmf7r61c7IeE+vmXGLcqbRh
|
||||
IViJMCh+l22EdjYyX/A4QW6fuYDPgJR9CD97mMK5SsTZnxGAKO+qOqD/D7SWh7sR
|
||||
MV3dJ0M+230kykA0Rdb3COOFmrw4oae9yUVFUN90hklB7ulK0uBXWfrvHmporD/z
|
||||
/AK3ABEBAAGJAjYEGAEKACAWIQRaw+Bak5aXOCvODOfxhCEE8YJ5ywUCXcPiQwIb
|
||||
DAAKCRDxhCEE8YJ5y0AqD/97VKV3aLihstSfZtnDo1kiafEmmoRX4uFRh2pqcuVn
|
||||
Ex8bqKTljy0jHCZfS4W+/imB2o6mubfygdjB/sKCUAknehyuuPTTFGIMUTvx5WJe
|
||||
S3c3Gdg9r3zCIge3lXw2lhGIn+obo2Y069/8CBVKSEoFl9mtoyXIVHe/E6tqzkb4
|
||||
3xPnjXbUt0jsWGqDJf5qPN4kjcwBpYXs6ayZy8LCm1i4IwMj1PtbkKPmXAGe6wJi
|
||||
5aGBxtMFiNcEH3+bW8vE8RIe/7dy3G/1n/VfhEBL05HCwxmM6I6S6tgZ1vE0k101
|
||||
3jL5a/9RDEYk9abHb1eXEwWUk2FVrzC87qH76OU6TXU8pV8Xp8dLv4U3meA5aNqm
|
||||
vkAv1If6/TR1yTqMDVD1mRkBL+dawRAUWtSed4QZeJf83AF+zFPGRn5TMB98AvTg
|
||||
QE3FDdxdkygOb9jx5reJ4SO1N0pMy8Enb8Xoe/dHIYmTncceQkMlQWMaBvYEzuVh
|
||||
mZd5GRHeogRx14tGxlRSc95wW9o0UN4fXxFBDDJDjrJVQQ3DqzK2Ca7Y53DzGODK
|
||||
d++Epc3Ef7lPex4eIIbqyup8X0SNiQelV91j3IyUEi3NZxSX9LQzSzG705gohpCz
|
||||
9va7NjxWCjwrE3x9PJD6KYdgcaNlbPaeQMLt2/fJKEBraJDHTU8buBaJJaC4psIj
|
||||
7Q==
|
||||
=Mdna
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
```
|
||||
@@ -53,8 +53,8 @@ macro(ocv_add_app directory)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
#ocv_add_app(traincascade)
|
||||
#ocv_add_app(createsamples)
|
||||
ocv_add_app(traincascade)
|
||||
ocv_add_app(createsamples)
|
||||
ocv_add_app(annotation)
|
||||
ocv_add_app(visualisation)
|
||||
ocv_add_app(interactive-calibration)
|
||||
|
||||
@@ -210,7 +210,7 @@ void calib::calibDataController::filterFrames()
|
||||
worstElemIndex = i;
|
||||
}
|
||||
}
|
||||
showOverlayMessage(cv::format("Frame %zu is worst", worstElemIndex + 1));
|
||||
showOverlayMessage(cv::format("Frame %d is worst", worstElemIndex + 1));
|
||||
|
||||
if(mCalibData->imagePoints.size()) {
|
||||
mCalibData->imagePoints.erase(mCalibData->imagePoints.begin() + worstElemIndex);
|
||||
|
||||
@@ -318,7 +318,7 @@ cv::Mat CalibProcessor::processFrame(const cv::Mat &frame)
|
||||
saveFrameData();
|
||||
bool isFrameBad = checkLastFrame();
|
||||
if (!isFrameBad) {
|
||||
std::string displayMessage = cv::format("Frame # %zu captured", std::max(mCalibData->imagePoints.size(),
|
||||
std::string displayMessage = cv::format("Frame # %d captured", std::max(mCalibData->imagePoints.size(),
|
||||
mCalibData->allCharucoCorners.size()));
|
||||
if(!showOverlayMessage(displayMessage))
|
||||
showCaptureMessage(frame, displayMessage);
|
||||
|
||||
@@ -30,6 +30,7 @@ using cv::ParallelLoopBody;
|
||||
#include "boost.h"
|
||||
#include "cascadeclassifier.h"
|
||||
#include <queue>
|
||||
#include "cxmisc.h"
|
||||
|
||||
#include "cvconfig.h"
|
||||
|
||||
|
||||
@@ -144,8 +144,8 @@ public:
|
||||
CV_WRAP virtual void save( const char* filename, const char* name=0 ) const;
|
||||
CV_WRAP virtual void load( const char* filename, const char* name=0 );
|
||||
|
||||
virtual void write( cv::FileStorage& storage, const char* name ) const;
|
||||
virtual void read( const cv::FileNode& node );
|
||||
virtual void write( CvFileStorage* storage, const char* name ) const;
|
||||
virtual void read( CvFileStorage* storage, CvFileNode* node );
|
||||
|
||||
protected:
|
||||
const char* default_model_name;
|
||||
@@ -210,8 +210,8 @@ public:
|
||||
bool update=false );
|
||||
CV_WRAP virtual float predict( const cv::Mat& samples, CV_OUT cv::Mat* results=0, CV_OUT cv::Mat* results_prob=0 ) const;
|
||||
|
||||
virtual void write( cv::FileStorage& storage, const char* name ) const;
|
||||
virtual void read( const cv::FileNode& node );
|
||||
virtual void write( CvFileStorage* storage, const char* name ) const;
|
||||
virtual void read( CvFileStorage* storage, CvFileNode* node );
|
||||
|
||||
protected:
|
||||
int var_count, var_all;
|
||||
@@ -521,8 +521,8 @@ public:
|
||||
|
||||
static CvParamGrid get_default_grid( int param_id );
|
||||
|
||||
virtual void write( cv::FileStorage& storage, const char* name ) const;
|
||||
virtual void read( const cv::FileNode& node );
|
||||
virtual void write( CvFileStorage* storage, const char* name ) const;
|
||||
virtual void read( CvFileStorage* storage, CvFileNode* node );
|
||||
CV_WRAP int get_var_count() const { return var_idx ? var_idx->cols : var_all; }
|
||||
|
||||
protected:
|
||||
@@ -538,8 +538,8 @@ protected:
|
||||
|
||||
virtual float predict( const float* row_sample, int row_len, bool returnDFVal=false ) const;
|
||||
|
||||
virtual void write_params( cv::FileStorage& fs ) const;
|
||||
virtual void read_params( const cv::FileNode& node );
|
||||
virtual void write_params( CvFileStorage* fs ) const;
|
||||
virtual void read_params( CvFileStorage* fs, CvFileNode* node );
|
||||
|
||||
void optimize_linear_svm();
|
||||
|
||||
@@ -673,8 +673,8 @@ struct CvDTreeTrainData
|
||||
|
||||
virtual CvDTreeNode* subsample_data( const CvMat* _subsample_idx );
|
||||
|
||||
virtual void write_params( cv::FileStorage& fs ) const;
|
||||
virtual void read_params( const cv::FileNode& node );
|
||||
virtual void write_params( CvFileStorage* fs ) const;
|
||||
virtual void read_params( CvFileStorage* fs, CvFileNode* node );
|
||||
|
||||
// release all the data
|
||||
virtual void clear();
|
||||
@@ -1738,7 +1738,7 @@ protected:
|
||||
// Read parameters of the gtb model and data.
|
||||
//
|
||||
// API
|
||||
// virtual void read_params( const cv::FileStorage& fs );
|
||||
// virtual void read_params( CvFileStorage* fs );
|
||||
//
|
||||
// INPUT
|
||||
// fs - file storage to read parameters from.
|
||||
@@ -2033,8 +2033,7 @@ typedef CvANN_MLP NeuralNet_MLP;
|
||||
typedef CvGBTreesParams GradientBoostingTreeParams;
|
||||
typedef CvGBTrees GradientBoostingTrees;
|
||||
|
||||
template<> struct DefaultDeleter<CvDTreeSplit>{ void operator ()(CvDTreeSplit* obj) const; };
|
||||
|
||||
template<> void DefaultDeleter<CvDTreeSplit>::operator ()(CvDTreeSplit* obj) const;
|
||||
}
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -1880,7 +1880,10 @@ double CvDTree::calc_node_dir( CvDTreeNode* node )
|
||||
namespace cv
|
||||
{
|
||||
|
||||
void DefaultDeleter<CvDTreeSplit>::operator ()(CvDTreeSplit* obj) const { fastFree(obj); }
|
||||
template<> void DefaultDeleter<CvDTreeSplit>::operator ()(CvDTreeSplit* obj) const
|
||||
{
|
||||
fastFree(obj);
|
||||
}
|
||||
|
||||
DTreeBestSplitFinder::DTreeBestSplitFinder( CvDTree* _tree, CvDTreeNode* _node)
|
||||
{
|
||||
|
||||
@@ -1,109 +0,0 @@
|
||||
# template taken from https://cmake.org/cmake/help/v3.14/manual/cmake-developer.7.html
|
||||
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
#[=======================================================================[.rst:
|
||||
FindCUDNN
|
||||
---------
|
||||
|
||||
Finds the cuDNN library.
|
||||
|
||||
Requires:
|
||||
^^^^^^^^^
|
||||
|
||||
find_cuda_helper_libs from FindCUDA.cmake
|
||||
i.e. CUDA module should be found using FindCUDA.cmake before attempting to find cuDNN
|
||||
|
||||
Result Variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This will define the following variables:
|
||||
|
||||
``CUDNN_FOUND``
|
||||
``CUDNN_INCLUDE_DIRS`` location of cudnn.h
|
||||
``CUDNN_LIBRARIES`` location of cudnn library
|
||||
|
||||
Cache Variables
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
The following cache variables will be set if cuDNN was found. They may also be set on failure.
|
||||
|
||||
``CUDNN_LIBRARY``
|
||||
``CUDNN_INCLUDE_DIR``
|
||||
``CUDNN_VERSION``
|
||||
|
||||
``CUDNN_VERSION_MAJOR`` INTERNAL
|
||||
``CUDNN_VERSION_MINOR`` INTERNAL
|
||||
``CUDNN_VERSION_PATCH`` INTERNAL
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# find the library
|
||||
if(CUDA_FOUND)
|
||||
find_cuda_helper_libs(cudnn)
|
||||
set(CUDNN_LIBRARY ${CUDA_cudnn_LIBRARY} CACHE FILEPATH "location of the cuDNN library")
|
||||
unset(CUDA_cudnn_LIBRARY CACHE)
|
||||
endif()
|
||||
|
||||
# find the include
|
||||
if(CUDNN_LIBRARY)
|
||||
find_path(CUDNN_INCLUDE_DIR
|
||||
cudnn.h
|
||||
PATHS ${CUDA_TOOLKIT_INCLUDE}
|
||||
DOC "location of cudnn.h"
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
if(NOT CUDNN_INCLUDE_DIR)
|
||||
find_path(CUDNN_INCLUDE_DIR
|
||||
cudnn.h
|
||||
DOC "location of cudnn.h"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# extract version from the include
|
||||
if(CUDNN_INCLUDE_DIR)
|
||||
if(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn_version.h")
|
||||
file(READ "${CUDNN_INCLUDE_DIR}/cudnn_version.h" CUDNN_H_CONTENTS)
|
||||
else()
|
||||
file(READ "${CUDNN_INCLUDE_DIR}/cudnn.h" CUDNN_H_CONTENTS)
|
||||
endif()
|
||||
|
||||
string(REGEX MATCH "define CUDNN_MAJOR ([0-9]+)" _ "${CUDNN_H_CONTENTS}")
|
||||
set(CUDNN_MAJOR_VERSION ${CMAKE_MATCH_1} CACHE INTERNAL "")
|
||||
string(REGEX MATCH "define CUDNN_MINOR ([0-9]+)" _ "${CUDNN_H_CONTENTS}")
|
||||
set(CUDNN_MINOR_VERSION ${CMAKE_MATCH_1} CACHE INTERNAL "")
|
||||
string(REGEX MATCH "define CUDNN_PATCHLEVEL ([0-9]+)" _ "${CUDNN_H_CONTENTS}")
|
||||
set(CUDNN_PATCH_VERSION ${CMAKE_MATCH_1} CACHE INTERNAL "")
|
||||
|
||||
set(CUDNN_VERSION
|
||||
"${CUDNN_MAJOR_VERSION}.${CUDNN_MINOR_VERSION}.${CUDNN_PATCH_VERSION}"
|
||||
CACHE
|
||||
STRING
|
||||
"cuDNN version"
|
||||
)
|
||||
|
||||
unset(CUDNN_H_CONTENTS)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(CUDNN
|
||||
FOUND_VAR CUDNN_FOUND
|
||||
REQUIRED_VARS
|
||||
CUDNN_LIBRARY
|
||||
CUDNN_INCLUDE_DIR
|
||||
VERSION_VAR CUDNN_VERSION
|
||||
)
|
||||
|
||||
if(CUDNN_FOUND)
|
||||
set(CUDNN_LIBRARIES ${CUDNN_LIBRARY})
|
||||
set(CUDNN_INCLUDE_DIRS ${CUDNN_INCLUDE_DIR})
|
||||
endif()
|
||||
|
||||
mark_as_advanced(
|
||||
CUDNN_LIBRARY
|
||||
CUDNN_INCLUDE_DIR
|
||||
CUDNN_VERSION
|
||||
)
|
||||
@@ -0,0 +1,139 @@
|
||||
FILE(TO_CMAKE_PATH "$ENV{GSTREAMER_DIR}" TRY1_DIR)
|
||||
FILE(TO_CMAKE_PATH "${GSTREAMER_DIR}" TRY2_DIR)
|
||||
FILE(GLOB GSTREAMER_DIR ${TRY1_DIR} ${TRY2_DIR})
|
||||
|
||||
FIND_PATH(GSTREAMER_gst_INCLUDE_DIR gst/gst.h
|
||||
PATHS ${GSTREAMER_DIR}/include/gstreamer-1.0 ${GSTREAMER_DIR}/include /usr/local/include/gstreamer-1.0 /usr/include/gstreamer-1.0
|
||||
ENV INCLUDE DOC "Directory containing gst/gst.h include file")
|
||||
|
||||
FIND_PATH(GSTREAMER_glib_INCLUDE_DIR glib.h
|
||||
PATHS ${GSTREAMER_DIR}/include/glib-2.0/
|
||||
ENV INCLUDE DOC "Directory containing glib.h include file")
|
||||
|
||||
FIND_PATH(GSTREAMER_glibconfig_INCLUDE_DIR glibconfig.h
|
||||
PATHS ${GSTREAMER_DIR}/lib/glib-2.0/include
|
||||
ENV INCLUDE DOC "Directory containing glibconfig.h include file")
|
||||
|
||||
FIND_PATH(GSTREAMER_gstconfig_INCLUDE_DIR gst/gstconfig.h
|
||||
PATHS ${GSTREAMER_DIR}/lib/gstreamer-1.0/include ${GSTREAMER_DIR}/include ${GSTREAMER_DIR}/include/gstreamer-1.0 ${GSTREAMER_DIR}/lib/include /usr/local/include/gstreamer-1.0 /usr/include/gstreamer-1.0 /usr/local/lib/include/gstreamer-1.0 /usr/lib/include/gstreamer-1.0
|
||||
ENV INCLUDE DOC "Directory containing gst/gstconfig.h include file")
|
||||
|
||||
FIND_LIBRARY(GSTREAMER_gstaudio_LIBRARY NAMES gstaudio libgstaudio-1.0 gstaudio-1.0
|
||||
PATHS ${GSTREMAER_DIR}/lib ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
|
||||
ENV LIB
|
||||
DOC "gstaudio library to link with"
|
||||
NO_SYSTEM_ENVIRONMENT_PATH)
|
||||
|
||||
FIND_LIBRARY(GSTREAMER_gstapp_LIBRARY NAMES gstapp libgstapp-1.0 gstapp-1.0
|
||||
PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
|
||||
ENV LIB
|
||||
DOC "gstapp library to link with"
|
||||
NO_SYSTEM_ENVIRONMENT_PATH)
|
||||
|
||||
FIND_LIBRARY(GSTREAMER_gstbase_LIBRARY NAMES gstbase libgstbase-1.0 gstbase-1.0
|
||||
PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
|
||||
ENV LIB
|
||||
DOC "gstbase library to link with"
|
||||
NO_SYSTEM_ENVIRONMENT_PATH)
|
||||
|
||||
FIND_LIBRARY(GLIB_gstcdda_LIBRARY NAMES gstcdda libgstcdda-1.0 gstcdda-1.0
|
||||
PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
|
||||
ENV LIB
|
||||
DOC "gstcdda library to link with"
|
||||
NO_SYSTEM_ENVIRONMENT_PATH)
|
||||
|
||||
FIND_LIBRARY(GSTREAMER_gstcontroller_LIBRARY NAMES gstcontroller libgstcontroller-1.0 gstcontroller-1.0
|
||||
PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
|
||||
ENV LIB
|
||||
DOC "gstcontroller library to link with"
|
||||
NO_SYSTEM_ENVIRONMENT_PATH)
|
||||
|
||||
|
||||
FIND_LIBRARY(GSTREAMER_gstnet_LIBRARY NAMES gstnet libgstnet-1.0 gstnet-1.0
|
||||
PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
|
||||
ENV LIB
|
||||
DOC "gstnet library to link with"
|
||||
NO_SYSTEM_ENVIRONMENT_PATH)
|
||||
|
||||
FIND_LIBRARY(GSTREAMER_gstpbutils_LIBRARY NAMES gstpbutils libgstpbutils-1.0 gstpbutils-1.0
|
||||
PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
|
||||
ENV LIB
|
||||
DOC "gstpbutils library to link with"
|
||||
NO_SYSTEM_ENVIRONMENT_PATH)
|
||||
|
||||
FIND_LIBRARY(GSTREAMER_gstreamer_LIBRARY NAMES gstreamer libgstreamer-1.0 gstreamer-1.0
|
||||
PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
|
||||
ENV LIB
|
||||
DOC "gstreamer library to link with"
|
||||
NO_SYSTEM_ENVIRONMENT_PATH)
|
||||
|
||||
FIND_LIBRARY(GSTREAMER_gstriff_LIBRARY NAMES gstriff libgstriff-1.0 gstriff-1.0
|
||||
PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
|
||||
ENV LIB
|
||||
DOC "gstriff library to link with"
|
||||
NO_SYSTEM_ENVIRONMENT_PATH)
|
||||
|
||||
FIND_LIBRARY(GSTREAMER_gstrtp_LIBRARY NAMES gstrtp libgstrtp-1.0 gstrtp-1.0
|
||||
PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
|
||||
ENV LIB
|
||||
DOC "gstrtp library to link with"
|
||||
NO_SYSTEM_ENVIRONMENT_PATH)
|
||||
|
||||
FIND_LIBRARY(GSTREAMER_gstrtsp_LIBRARY NAMES gstrtsp libgstrtsp-1.0 gstrtsp-1.0
|
||||
PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
|
||||
ENV LIB
|
||||
DOC "gstrtsp library to link with"
|
||||
NO_SYSTEM_ENVIRONMENT_PATH)
|
||||
|
||||
FIND_LIBRARY(GSTREAMER_gstsdp_LIBRARY NAMES gstsdp libgstsdp-1.0 gstsdp-1.0
|
||||
PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
|
||||
ENV LIB
|
||||
DOC "gstsdp library to link with"
|
||||
NO_SYSTEM_ENVIRONMENT_PATH)
|
||||
|
||||
FIND_LIBRARY(GSTREAMER_gsttag_LIBRARY NAMES gsttag libgsttag-1.0 gsttag-1.0
|
||||
PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
|
||||
ENV LIB
|
||||
DOC "gsttag library to link with"
|
||||
NO_SYSTEM_ENVIRONMENT_PATH)
|
||||
|
||||
FIND_LIBRARY(GSTREAMER_gstvideo_LIBRARY NAMES gstvideo libgstvideo-1.0 gstvideo-1.0
|
||||
PATHS ${GSTREAMER_DIR}/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/bin ${GSTREAMER_DIR}/bin/bin C:/gstreamer/bin ${GSTREAMER_DIR}/lib ${GSTREAMER_DIR}/win32/lib /usr/local/lib /usr/lib
|
||||
ENV LIB
|
||||
DOC "gstvideo library to link with"
|
||||
NO_SYSTEM_ENVIRONMENT_PATH)
|
||||
|
||||
FIND_LIBRARY(GLIB_LIBRARY NAMES libglib-2.0 glib-2.0
|
||||
PATHS ${GSTREAMER_DIR}/lib
|
||||
ENV LIB
|
||||
DOC "Glib library"
|
||||
NO_SYSTEM_ENVIRONMENT_PATH)
|
||||
|
||||
FIND_LIBRARY(GOBJECT_LIBRARY NAMES libobject-2.0 gobject-2.0
|
||||
PATHS ${GSTREAMER_DIR}/lib
|
||||
ENV LIB
|
||||
DOC "Glib library"
|
||||
NO_SYSTEM_ENVIRONMENT_PATH)
|
||||
|
||||
IF (GSTREAMER_gst_INCLUDE_DIR AND GSTREAMER_gstconfig_INCLUDE_DIR AND
|
||||
GSTREAMER_gstaudio_LIBRARY AND GSTREAMER_gstbase_LIBRARY AND GSTREAMER_gstcontroller_LIBRARY AND GSTREAMER_gstnet_LIBRARY
|
||||
AND GSTREAMER_gstpbutils_LIBRARY AND GSTREAMER_gstreamer_LIBRARY AND
|
||||
GSTREAMER_gstriff_LIBRARY AND GSTREAMER_gstrtp_LIBRARY AND GSTREAMER_gstrtsp_LIBRARY AND GSTREAMER_gstsdp_LIBRARY AND
|
||||
GSTREAMER_gsttag_LIBRARY AND GSTREAMER_gstvideo_LIBRARY AND GLIB_LIBRARY AND GSTREAMER_gstapp_LIBRARY AND GOBJECT_LIBRARY)
|
||||
SET(GSTREAMER_INCLUDE_DIR ${GSTREAMER_gst_INCLUDE_DIR} ${GSTREAMER_gstconfig_INCLUDE_DIR} ${GSTREAMER_glib_INCLUDE_DIR} ${GSTREAMER_glibconfig_INCLUDE_DIR})
|
||||
|
||||
list(REMOVE_DUPLICATES GSTREAMER_INCLUDE_DIR)
|
||||
SET(GSTREAMER_LIBRARIES ${GSTREAMER_gstaudio_LIBRARY} ${GSTREAMER_gstbase_LIBRARY}
|
||||
${GSTREAMER_gstcontroller_LIBRARY} ${GSTREAMER_gstdataprotocol_LIBRARY} ${GSTREAMER_gstinterfaces_LIBRARY}
|
||||
${GSTREAMER_gstnet_LIBRARY} ${GSTREAMER_gstpbutils_LIBRARY}
|
||||
${GSTREAMER_gstreamer_LIBRARY} ${GSTREAMER_gstriff_LIBRARY} ${GSTREAMER_gstrtp_LIBRARY}
|
||||
${GSTREAMER_gstrtsp_LIBRARY} ${GSTREAMER_gstsdp_LIBRARY} ${GSTREAMER_gsttag_LIBRARY} ${GSTREAMER_gstvideo_LIBRARY} ${GLIB_LIBRARY}
|
||||
${GSTREAMER_gstapp_LIBRARY} ${GOBJECT_LIBRARY})
|
||||
|
||||
list(REMOVE_DUPLICATES GSTREAMER_LIBRARIES)
|
||||
SET(GSTREAMER_FOUND TRUE)
|
||||
ENDIF (GSTREAMER_gst_INCLUDE_DIR AND GSTREAMER_gstconfig_INCLUDE_DIR AND
|
||||
GSTREAMER_gstaudio_LIBRARY AND GSTREAMER_gstbase_LIBRARY AND GSTREAMER_gstcontroller_LIBRARY
|
||||
AND GSTREAMER_gstnet_LIBRARY AND GSTREAMER_gstpbutils_LIBRARY AND GSTREAMER_gstreamer_LIBRARY AND
|
||||
GSTREAMER_gstriff_LIBRARY AND GSTREAMER_gstrtp_LIBRARY AND GSTREAMER_gstrtsp_LIBRARY AND GSTREAMER_gstsdp_LIBRARY AND
|
||||
GSTREAMER_gsttag_LIBRARY AND GSTREAMER_gstvideo_LIBRARY AND GLIB_LIBRARY AND GSTREAMER_gstapp_LIBRARY AND GOBJECT_LIBRARY)
|
||||
@@ -1,27 +0,0 @@
|
||||
# Find Vulkan
|
||||
#
|
||||
# Vulkan_INCLUDE_DIRS
|
||||
# Vulkan_LIBRARIES
|
||||
# Vulkan_FOUND
|
||||
if (WIN32)
|
||||
find_path(Vulkan_INCLUDE_DIRS NAMES vulkan/vulkan.h HINTS
|
||||
"$ENV{VULKAN_SDK}/Include"
|
||||
"$ENV{VK_SDK_PATH}/Include")
|
||||
if (CMAKE_CL_64)
|
||||
find_library(Vulkan_LIBRARIES NAMES vulkan-1 HINTS
|
||||
"$ENV{VULKAN_SDK}/Bin"
|
||||
"$ENV{VK_SDK_PATH}/Bin")
|
||||
else()
|
||||
find_library(Vulkan_LIBRARIES NAMES vulkan-1 HINTS
|
||||
"$ENV{VULKAN_SDK}/Bin32"
|
||||
"$ENV{VK_SDK_PATH}/Bin32")
|
||||
endif()
|
||||
else()
|
||||
find_path(Vulkan_INCLUDE_DIRS NAMES vulkan/vulkan.h HINTS
|
||||
"$ENV{VULKAN_SDK}/include")
|
||||
find_library(Vulkan_LIBRARIES NAMES vulkan HINTS
|
||||
"$ENV{VULKAN_SDK}/lib")
|
||||
endif()
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Vulkan DEFAULT_MSG Vulkan_LIBRARIES Vulkan_INCLUDE_DIRS)
|
||||
mark_as_advanced(Vulkan_INCLUDE_DIRS Vulkan_LIBRARIES)
|
||||
@@ -117,9 +117,7 @@ if(CV_GCC OR CV_CLANG)
|
||||
add_extra_compiler_option(-Wundef)
|
||||
add_extra_compiler_option(-Winit-self)
|
||||
add_extra_compiler_option(-Wpointer-arith)
|
||||
if(NOT (CV_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0"))
|
||||
add_extra_compiler_option(-Wshadow) # old GCC emits warnings for variables + methods combination
|
||||
endif()
|
||||
add_extra_compiler_option(-Wshadow)
|
||||
add_extra_compiler_option(-Wsign-promo)
|
||||
add_extra_compiler_option(-Wuninitialized)
|
||||
add_extra_compiler_option(-Winit-self)
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
if(WIN32)
|
||||
find_path( CSTRIPES_LIB_DIR
|
||||
NAMES "C=.lib"
|
||||
DOC "The path to C= lib and dll")
|
||||
if(CSTRIPES_LIB_DIR)
|
||||
ocv_include_directories("${CSTRIPES_LIB_DIR}/..")
|
||||
link_directories("${CSTRIPES_LIB_DIR}")
|
||||
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} "C=")
|
||||
set(HAVE_CSTRIPES 1)
|
||||
endif()
|
||||
endif()
|
||||
@@ -43,16 +43,6 @@ if(CUDA_FOUND)
|
||||
set(HAVE_CUBLAS 1)
|
||||
endif()
|
||||
|
||||
if(WITH_CUDNN)
|
||||
set(CMAKE_MODULE_PATH "${OpenCV_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
|
||||
find_host_package(CUDNN "${MIN_VER_CUDNN}")
|
||||
list(REMOVE_AT CMAKE_MODULE_PATH 0)
|
||||
|
||||
if(CUDNN_FOUND)
|
||||
set(HAVE_CUDNN 1)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_NVCUVID)
|
||||
macro(ocv_cuda_SEARCH_NVCUVID_HEADER _filename _result)
|
||||
# place header file under CUDA_TOOLKIT_TARGET_DIR or CUDA_TOOLKIT_ROOT_DIR
|
||||
@@ -88,14 +78,19 @@ if(CUDA_FOUND)
|
||||
|
||||
message(STATUS "CUDA detected: " ${CUDA_VERSION})
|
||||
|
||||
set(_generations "Fermi" "Kepler" "Maxwell" "Pascal" "Volta" "Turing" "Ampere")
|
||||
OCV_OPTION(CUDA_ENABLE_DEPRECATED_GENERATION "Enable deprecated generations in the list" OFF)
|
||||
set(_generations "Maxwell" "Pascal" "Volta" "Turing" "Ampere")
|
||||
if(CUDA_ENABLE_DEPRECATED_GENERATION)
|
||||
set(_generations "Fermi" "${_generations}")
|
||||
set(_generations "Kepler" "${_generations}")
|
||||
endif()
|
||||
set(_arch_fermi "2.0")
|
||||
set(_arch_kepler "3.0;3.5;3.7")
|
||||
set(_arch_maxwell "5.0;5.2")
|
||||
set(_arch_pascal "6.0;6.1")
|
||||
set(_arch_volta "7.0")
|
||||
set(_arch_turing "7.5")
|
||||
set(_arch_ampere "8.0")
|
||||
set(_arch_ampere "8.0;8.6")
|
||||
if(NOT CMAKE_CROSSCOMPILING)
|
||||
list(APPEND _generations "Auto")
|
||||
endif()
|
||||
@@ -203,16 +198,12 @@ if(CUDA_FOUND)
|
||||
|
||||
if(${status} EQUAL 0)
|
||||
# cache detected values
|
||||
set(OPENCV_CACHE_CUDA_ACTIVE_CC ${${result_list}} CACHE INTERNAL "")
|
||||
set(OPENCV_CACHE_CUDA_ACTIVE_CC ${${output}} CACHE INTERNAL "")
|
||||
set(OPENCV_CACHE_CUDA_ACTIVE_CC_check "${__cache_key_check}" CACHE INTERNAL "")
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(ocv_wipeout_deprecated _arch_bin_list)
|
||||
string(REPLACE "2.1" "2.1(2.0)" ${_arch_bin_list} "${${_arch_bin_list}}")
|
||||
endmacro()
|
||||
|
||||
set(__cuda_arch_ptx "")
|
||||
if(CUDA_GENERATION STREQUAL "Fermi")
|
||||
set(__cuda_arch_bin ${_arch_fermi})
|
||||
@@ -275,7 +266,6 @@ if(CUDA_FOUND)
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
ocv_wipeout_deprecated(__cuda_arch_bin)
|
||||
|
||||
set(CUDA_ARCH_BIN ${__cuda_arch_bin} CACHE STRING "Specify 'real' GPU architectures to build binaries for, BIN(PTX) format is supported")
|
||||
set(CUDA_ARCH_PTX ${__cuda_arch_ptx} CACHE STRING "Specify 'virtual' PTX architectures to build PTX intermediate code for")
|
||||
@@ -283,10 +273,14 @@ if(CUDA_FOUND)
|
||||
string(REGEX REPLACE "\\." "" ARCH_BIN_NO_POINTS "${CUDA_ARCH_BIN}")
|
||||
string(REGEX REPLACE "\\." "" ARCH_PTX_NO_POINTS "${CUDA_ARCH_PTX}")
|
||||
|
||||
# Check if user specified 1.0 compute capability: we don't support it
|
||||
if(" ${CUDA_ARCH_BIN} ${CUDA_ARCH_PTX}" MATCHES " 1.0")
|
||||
message(SEND_ERROR "CUDA: 1.0 compute capability is not supported - exclude it from ARCH/PTX list are re-run CMake")
|
||||
endif()
|
||||
# Check if user specified 1.0/2.1 compute capability: we don't support it
|
||||
macro(ocv_wipeout_deprecated_cc target_cc)
|
||||
if(" ${CUDA_ARCH_BIN} ${CUDA_ARCH_PTX}" MATCHES " ${target_cc}")
|
||||
message(SEND_ERROR "CUDA: ${target_cc} compute capability is not supported - exclude it from ARCH/PTX list and re-run CMake")
|
||||
endif()
|
||||
endmacro()
|
||||
ocv_wipeout_deprecated_cc("1.0")
|
||||
ocv_wipeout_deprecated_cc("2.1")
|
||||
|
||||
# NVCC flags to be set
|
||||
set(NVCC_FLAGS_EXTRA "")
|
||||
@@ -396,7 +390,10 @@ if(CUDA_FOUND)
|
||||
|
||||
if(UNIX OR APPLE)
|
||||
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -Xcompiler -fPIC)
|
||||
if(NOT " ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_DEBUG} ${CUDA_NVCC_FLAGS}" MATCHES "-std=")
|
||||
if(
|
||||
ENABLE_CXX11
|
||||
AND NOT " ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_DEBUG} ${CUDA_NVCC_FLAGS}" MATCHES "-std="
|
||||
)
|
||||
if(CUDA_VERSION VERSION_LESS "11.0")
|
||||
list(APPEND CUDA_NVCC_FLAGS "--std=c++11")
|
||||
else()
|
||||
@@ -443,13 +440,6 @@ if(HAVE_CUDA)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(HAVE_CUDNN)
|
||||
foreach(p ${CUDNN_LIBRARIES})
|
||||
get_filename_component(_tmp ${p} PATH)
|
||||
list(APPEND CUDA_LIBS_PATH ${_tmp})
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(HAVE_CUFFT)
|
||||
foreach(p ${CUDA_cufft_LIBRARY})
|
||||
get_filename_component(_tmp ${p} PATH)
|
||||
@@ -468,10 +458,7 @@ if(HAVE_CUDA)
|
||||
set(CUDA_cublas_LIBRARY_ABS ${CUDA_cublas_LIBRARY})
|
||||
ocv_convert_to_lib_name(CUDA_cublas_LIBRARY ${CUDA_cublas_LIBRARY})
|
||||
endif()
|
||||
if(HAVE_CUDNN)
|
||||
set(CUDNN_LIBRARIES_ABS ${CUDNN_LIBRARIES})
|
||||
ocv_convert_to_lib_name(CUDNN_LIBRARIES ${CUDNN_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(HAVE_CUFFT)
|
||||
set(CUDA_cufft_LIBRARY_ABS ${CUDA_cufft_LIBRARY})
|
||||
ocv_convert_to_lib_name(CUDA_cufft_LIBRARY ${CUDA_cufft_LIBRARY})
|
||||
@@ -519,9 +506,6 @@ if(HAVE_CUDA)
|
||||
if(HAVE_CUBLAS)
|
||||
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${CUDA_cublas_LIBRARY})
|
||||
endif()
|
||||
if(HAVE_CUDNN)
|
||||
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${CUDNN_LIBRARIES})
|
||||
endif()
|
||||
if(HAVE_CUFFT)
|
||||
set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${CUDA_cufft_LIBRARY})
|
||||
endif()
|
||||
|
||||
@@ -98,8 +98,6 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64")
|
||||
set(PPC64 1)
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(mips.*|MIPS.*)")
|
||||
set(MIPS 1)
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(riscv.*|RISCV.*)")
|
||||
set(RISCV 1)
|
||||
else()
|
||||
if(NOT OPENCV_SUPPRESS_MESSAGE_UNRECOGNIZED_SYSTEM_PROCESSOR)
|
||||
message(WARNING "OpenCV: unrecognized target processor configuration")
|
||||
@@ -194,17 +192,18 @@ if(CMAKE_VERSION VERSION_LESS "3.1")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(NOT OPENCV_SKIP_CMAKE_CXX_STANDARD)
|
||||
ocv_update(CMAKE_CXX_STANDARD 11)
|
||||
ocv_update(CMAKE_CXX_STANDARD_REQUIRED TRUE)
|
||||
ocv_update(CMAKE_CXX_EXTENSIONS OFF) # use -std=c++11 instead of -std=gnu++11
|
||||
if(ENABLE_CXX11)
|
||||
#cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF) # use -std=c++11 instead of -std=gnu++11
|
||||
if(CMAKE_CXX11_COMPILE_FEATURES)
|
||||
set(HAVE_CXX11 ON)
|
||||
endif()
|
||||
endif()
|
||||
if(NOT HAVE_CXX11)
|
||||
ocv_check_compiler_flag(CXX "" HAVE_CXX11 "${OpenCV_SOURCE_DIR}/cmake/checks/cxx11.cpp")
|
||||
if(NOT HAVE_CXX11)
|
||||
if(NOT HAVE_CXX11 AND ENABLE_CXX11)
|
||||
ocv_check_compiler_flag(CXX "-std=c++11" HAVE_STD_CXX11 "${OpenCV_SOURCE_DIR}/cmake/checks/cxx11.cpp")
|
||||
if(HAVE_STD_CXX11)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
@@ -213,10 +212,6 @@ if(NOT HAVE_CXX11)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT HAVE_CXX11)
|
||||
message(FATAL_ERROR "OpenCV 4.x requires C++11")
|
||||
endif()
|
||||
|
||||
set(__OPENCV_ENABLE_ATOMIC_LONG_LONG OFF)
|
||||
if(HAVE_CXX11 AND (X86 OR X86_64))
|
||||
set(__OPENCV_ENABLE_ATOMIC_LONG_LONG ON)
|
||||
|
||||
@@ -17,6 +17,12 @@
|
||||
# INF_ENGINE_TARGET - set to name of imported library target representing InferenceEngine
|
||||
#
|
||||
|
||||
if(NOT HAVE_CXX11)
|
||||
message(WARNING "DL Inference engine requires C++11. You can turn it on via ENABLE_CXX11=ON CMake flag.")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# =======================
|
||||
|
||||
macro(ocv_ie_find_extra_libraries find_prefix find_suffix)
|
||||
file(GLOB libraries "${INF_ENGINE_LIB_DIRS}/${find_prefix}inference_engine*${find_suffix}")
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
set(HAVE_MFX 0)
|
||||
|
||||
if (UNIX)
|
||||
set(root "$ENV{MFX_HOME}")
|
||||
elseif(WIN32)
|
||||
set(root "$ENV{INTELMEDIASDKROOT}")
|
||||
endif()
|
||||
|
||||
# TODO: ICC? MINGW? ARM? IOS?
|
||||
if(WIN32)
|
||||
if(X86_64)
|
||||
set(arch "x64")
|
||||
else()
|
||||
set(arch "win32")
|
||||
endif()
|
||||
elseif(UNIX)
|
||||
set(arch "lin_x64")
|
||||
else()
|
||||
# ???
|
||||
endif()
|
||||
|
||||
find_path(MFX_INCLUDE mfxdefs.h PATHS "${root}/include" NO_DEFAULT_PATH)
|
||||
message(STATUS "MFX_INCLUDE: ${MFX_INCLUDE} (${root}/include)")
|
||||
find_library(MFX_LIBRARY NAMES mfx PATHS "${root}/lib/${arch}" NO_DEFAULT_PATH)
|
||||
if(MSVC)
|
||||
if(MSVC14)
|
||||
find_library(MFX_LIBRARY NAMES libmfx_vs2015.lib PATHS "${root}/lib/${arch}" NO_DEFAULT_PATH)
|
||||
else()
|
||||
find_library(MFX_LIBRARY NAMES libmfx.lib PATHS "${root}/lib/${arch}" NO_DEFAULT_PATH)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT MFX_INCLUDE OR NOT MFX_LIBRARY)
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(deps)
|
||||
|
||||
if (UNIX)
|
||||
find_library(MFX_VA_LIBRARY va)
|
||||
find_library(MFX_VA_DRM_LIBRARY va-drm)
|
||||
if (NOT MFX_VA_LIBRARY OR NOT MFX_VA_DRM_LIBRARY)
|
||||
return()
|
||||
endif()
|
||||
add_library(mfx-va UNKNOWN IMPORTED)
|
||||
set_target_properties(mfx-va PROPERTIES IMPORTED_LOCATION "${MFX_VA_LIBRARY}")
|
||||
add_library(mfx-va-drm UNKNOWN IMPORTED)
|
||||
set_target_properties(mfx-va-drm PROPERTIES IMPORTED_LOCATION "${MFX_VA_DRM_LIBRARY}")
|
||||
list(APPEND deps mfx-va mfx-va-drm "-Wl,--exclude-libs=libmfx")
|
||||
endif()
|
||||
|
||||
add_library(mfx UNKNOWN IMPORTED)
|
||||
set_target_properties(mfx PROPERTIES
|
||||
IMPORTED_LOCATION "${MFX_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${MFX_INCLUDE}"
|
||||
INTERFACE_LINK_LIBRARIES "${deps}"
|
||||
)
|
||||
|
||||
set(HAVE_MFX 1)
|
||||
@@ -1,30 +1,12 @@
|
||||
# VTK 9.0
|
||||
if(NOT VTK_FOUND)
|
||||
find_package(VTK 9 QUIET NAMES vtk COMPONENTS
|
||||
FiltersExtraction
|
||||
FiltersSources
|
||||
FiltersTexture
|
||||
IOExport
|
||||
IOGeometry
|
||||
IOPLY
|
||||
InteractionStyle
|
||||
RenderingCore
|
||||
RenderingLOD
|
||||
RenderingOpenGL2
|
||||
NO_MODULE)
|
||||
endif()
|
||||
|
||||
# VTK 6.x components
|
||||
if(NOT VTK_FOUND)
|
||||
find_package(VTK QUIET COMPONENTS vtkInteractionStyle vtkRenderingLOD vtkIOPLY vtkFiltersTexture vtkRenderingFreeType vtkIOExport NO_MODULE)
|
||||
IF(VTK_FOUND)
|
||||
IF(VTK_RENDERING_BACKEND) #in vtk 7, the rendering backend is exported as a var.
|
||||
find_package(VTK QUIET COMPONENTS vtkInteractionStyle vtkRenderingLOD vtkIOPLY vtkFiltersTexture vtkRenderingFreeType vtkIOExport NO_MODULE)
|
||||
IF(VTK_FOUND)
|
||||
IF(VTK_RENDERING_BACKEND) #in vtk 7, the rendering backend is exported as a var.
|
||||
find_package(VTK QUIET COMPONENTS vtkRendering${VTK_RENDERING_BACKEND} vtkInteractionStyle vtkRenderingLOD vtkIOPLY vtkFiltersTexture vtkRenderingFreeType vtkIOExport vtkIOGeometry NO_MODULE)
|
||||
ELSE(VTK_RENDERING_BACKEND)
|
||||
ELSE(VTK_RENDERING_BACKEND)
|
||||
find_package(VTK QUIET COMPONENTS vtkRenderingOpenGL vtkInteractionStyle vtkRenderingLOD vtkIOPLY vtkFiltersTexture vtkRenderingFreeType vtkIOExport NO_MODULE)
|
||||
ENDIF(VTK_RENDERING_BACKEND)
|
||||
ENDIF(VTK_FOUND)
|
||||
endif()
|
||||
ENDIF(VTK_RENDERING_BACKEND)
|
||||
ENDIF(VTK_FOUND)
|
||||
|
||||
# VTK 5.x components
|
||||
if(NOT VTK_FOUND)
|
||||
@@ -70,18 +52,5 @@ if(HAVE_QT AND VTK_VERSION VERSION_GREATER "6.0.0" AND NOT ${VTK_QT_VERSION} STR
|
||||
endif()
|
||||
endif()
|
||||
|
||||
try_compile(VTK_COMPILE_STATUS
|
||||
"${OpenCV_BINARY_DIR}"
|
||||
"${OpenCV_SOURCE_DIR}/cmake/checks/vtk_test.cpp"
|
||||
CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${VTK_INCLUDE_DIRS}"
|
||||
LINK_LIBRARIES ${VTK_LIBRARIES}
|
||||
OUTPUT_VARIABLE OUTPUT
|
||||
)
|
||||
|
||||
if(NOT ${VTK_COMPILE_STATUS})
|
||||
message(STATUS "VTK support is disabled. Compilation of the sample code has failed.")
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(HAVE_VTK ON)
|
||||
message(STATUS "Found VTK ${VTK_VERSION} (${VTK_USE_FILE})")
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
set(VULKAN_INCLUDE_DIRS "${OpenCV_SOURCE_DIR}/3rdparty/include" CACHE PATH "Vulkan include directory")
|
||||
set(VULKAN_LIBRARIES "")
|
||||
|
||||
try_compile(VALID_VULKAN
|
||||
"${OpenCV_BINARY_DIR}"
|
||||
"${OpenCV_SOURCE_DIR}/cmake/checks/vulkan.cpp"
|
||||
CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${VULKAN_INCLUDE_DIRS}"
|
||||
OUTPUT_VARIABLE TRY_OUT
|
||||
)
|
||||
if(NOT ${VALID_VULKAN})
|
||||
message(WARNING "Can't use Vulkan")
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(HAVE_VULKAN 1)
|
||||
|
||||
if(HAVE_VULKAN)
|
||||
add_definitions(-DVK_NO_PROTOTYPES)
|
||||
include_directories(${VULKAN_INCLUDE_DIRS})
|
||||
endif()
|
||||
@@ -2,22 +2,22 @@
|
||||
# Detect frameworks that may be used by 3rd-party libraries as well as OpenCV
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
# --- HPX ---
|
||||
if(WITH_HPX)
|
||||
find_package(HPX REQUIRED)
|
||||
ocv_include_directories(${HPX_INCLUDE_DIRS})
|
||||
set(HAVE_HPX TRUE)
|
||||
endif(WITH_HPX)
|
||||
# --- C= ---
|
||||
if(WITH_CSTRIPES AND NOT HAVE_TBB)
|
||||
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVDetectCStripes.cmake")
|
||||
else()
|
||||
set(HAVE_CSTRIPES 0)
|
||||
endif()
|
||||
|
||||
# --- GCD ---
|
||||
if(APPLE AND NOT HAVE_TBB)
|
||||
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)
|
||||
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}")
|
||||
|
||||
@@ -252,6 +252,7 @@ if(NOT DEFINED IPPROOT)
|
||||
else()
|
||||
ocv_install_3rdparty_licenses(ippicv "${ICV_PACKAGE_ROOT}/EULA.txt")
|
||||
endif()
|
||||
ocv_install_3rdparty_licenses(ippicv "${ICV_PACKAGE_ROOT}/third-party-programs.txt")
|
||||
endif()
|
||||
|
||||
file(TO_CMAKE_PATH "${IPPROOT}" __IPPROOT)
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# Main variables:
|
||||
# INTELPERC_LIBRARIES and INTELPERC_INCLUDE to link Intel Perceptial Computing SDK modules
|
||||
# HAVE_INTELPERC for conditional compilation OpenCV with/without Intel Perceptial Computing SDK
|
||||
|
||||
if(X86_64)
|
||||
find_path(INTELPERC_INCLUDE_DIR "pxcsession.h" PATHS "$ENV{PCSDK_DIR}include" DOC "Path to Intel Perceptual Computing SDK interface headers")
|
||||
find_file(INTELPERC_LIBRARIES "libpxc.lib" PATHS "$ENV{PCSDK_DIR}lib/x64" DOC "Path to Intel Perceptual Computing SDK interface libraries")
|
||||
else()
|
||||
find_path(INTELPERC_INCLUDE_DIR "pxcsession.h" PATHS "$ENV{PCSDK_DIR}include" DOC "Path to Intel Perceptual Computing SDK interface headers")
|
||||
find_file(INTELPERC_LIBRARIES "libpxc.lib" PATHS "$ENV{PCSDK_DIR}lib/Win32" DOC "Path to Intel Perceptual Computing SDK interface libraries")
|
||||
endif()
|
||||
|
||||
if(INTELPERC_INCLUDE_DIR AND INTELPERC_LIBRARIES)
|
||||
set(HAVE_INTELPERC TRUE)
|
||||
else()
|
||||
set(HAVE_INTELPERC FALSE)
|
||||
message(WARNING "Intel Perceptual Computing SDK library directory (set by INTELPERC_LIB_DIR variable) is not found or does not have Intel Perceptual Computing SDK libraries.")
|
||||
endif() #if(INTELPERC_INCLUDE_DIR AND INTELPERC_LIBRARIES)
|
||||
|
||||
mark_as_advanced(FORCE INTELPERC_LIBRARIES INTELPERC_INCLUDE_DIR)
|
||||
@@ -86,9 +86,11 @@ if(WITH_OPENGL)
|
||||
endif()
|
||||
endif(WITH_OPENGL)
|
||||
|
||||
# --- Cocoa ---
|
||||
# --- Carbon & Cocoa ---
|
||||
if(APPLE)
|
||||
if(NOT IOS AND CV_CLANG)
|
||||
if(WITH_CARBON)
|
||||
set(HAVE_CARBON YES)
|
||||
elseif(NOT IOS AND CV_CLANG)
|
||||
set(HAVE_COCOA YES)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -153,23 +153,8 @@ if(NOT WEBP_VERSION AND WEBP_INCLUDE_DIR)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# --- libopenjp2 (optional, check before libjasper) ---
|
||||
if(WITH_OPENJPEG)
|
||||
find_package(OpenJPEG QUIET)
|
||||
|
||||
if(NOT OpenJPEG_FOUND OR OPENJPEG_MAJOR_VERSION LESS 2)
|
||||
set(HAVE_OPENJPEG NO)
|
||||
ocv_clear_vars(OPENJPEG_MAJOR_VERSION OPENJPEG_MINOR_VERSION OPENJPEG_BUILD_VERSION OPENJPEG_LIBRARIES OPENJPEG_INCLUDE_DIRS)
|
||||
message(STATUS "Could NOT find OpenJPEG (minimal suitable version: 2.0, recommended version >= 2.3.1)")
|
||||
else()
|
||||
set(HAVE_OPENJPEG YES)
|
||||
message(STATUS "Found OpenJPEG: ${OPENJPEG_LIBRARIES} "
|
||||
"(found version \"${OPENJPEG_MAJOR_VERSION}.${OPENJPEG_MINOR_VERSION}.${OPENJPEG_BUILD_VERSION}\")")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# --- libjasper (optional, should be searched after libjpeg) ---
|
||||
if(WITH_JASPER AND NOT HAVE_OPENJPEG)
|
||||
if(WITH_JASPER)
|
||||
if(BUILD_JASPER)
|
||||
ocv_clear_vars(JASPER_FOUND)
|
||||
else()
|
||||
@@ -284,8 +269,3 @@ if(WITH_IMGCODEC_PXM)
|
||||
elseif(DEFINED WITH_IMGCODEC_PXM)
|
||||
set(HAVE_IMGCODEC_PXM OFF)
|
||||
endif()
|
||||
if(WITH_IMGCODEC_PFM)
|
||||
set(HAVE_IMGCODEC_PFM ON)
|
||||
elseif(DEFINED WITH_IMGCODEC_PFM)
|
||||
set(HAVE_IMGCODEC_PFM OFF)
|
||||
endif()
|
||||
|
||||
@@ -1,8 +1,333 @@
|
||||
# ----------------------------------------------------------------------------
|
||||
# Detect 3rd-party video IO libraries
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
ocv_clear_vars(HAVE_VFW)
|
||||
if(WITH_VFW)
|
||||
try_compile(HAVE_VFW
|
||||
"${OpenCV_BINARY_DIR}"
|
||||
"${OpenCV_SOURCE_DIR}/cmake/checks/vfwtest.cpp"
|
||||
CMAKE_FLAGS "-DLINK_LIBRARIES:STRING=vfw32")
|
||||
endif(WITH_VFW)
|
||||
|
||||
# --- GStreamer ---
|
||||
ocv_clear_vars(HAVE_GSTREAMER)
|
||||
# try to find gstreamer 1.x first if 0.10 was not requested
|
||||
if(WITH_GSTREAMER AND NOT WITH_GSTREAMER_0_10)
|
||||
if(WIN32)
|
||||
SET(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_CURRENT_LIST_DIR}")
|
||||
FIND_PACKAGE(GstreamerWindows)
|
||||
IF(GSTREAMER_gstbase_LIBRARY AND GSTREAMER_gstvideo_LIBRARY AND GSTREAMER_gstapp_LIBRARY AND GSTREAMER_gstpbutils_LIBRARY AND GSTREAMER_gstriff_LIBRARY)
|
||||
set(HAVE_GSTREAMER TRUE)
|
||||
set(GSTREAMER_BASE_VERSION 1.0)
|
||||
set(GSTREAMER_VIDEO_VERSION 1.0)
|
||||
set(GSTREAMER_APP_VERSION 1.0)
|
||||
set(GSTREAMER_RIFF_VERSION 1.0)
|
||||
set(GSTREAMER_PBUTILS_VERSION 1.0)
|
||||
ENDIF(GSTREAMER_gstbase_LIBRARY AND GSTREAMER_gstvideo_LIBRARY AND GSTREAMER_gstapp_LIBRARY AND GSTREAMER_gstpbutils_LIBRARY AND GSTREAMER_gstriff_LIBRARY)
|
||||
|
||||
else(WIN32)
|
||||
ocv_check_modules(GSTREAMER-1.0 gstreamer-base-1.0 gstreamer-video-1.0 gstreamer-app-1.0 gstreamer-riff-1.0 gstreamer-pbutils-1.0)
|
||||
if(HAVE_GSTREAMER-1.0)
|
||||
set(HAVE_GSTREAMER TRUE)
|
||||
ocv_append_build_options(VIDEOIO GSTREAMER-1.0)
|
||||
set(GSTREAMER_BASE_VERSION ${GSTREAMER-1.0_gstreamer-base-1.0_VERSION})
|
||||
set(GSTREAMER_VIDEO_VERSION ${GSTREAMER-1.0_gstreamer-video-1.0_VERSION})
|
||||
set(GSTREAMER_APP_VERSION ${GSTREAMER-1.0_gstreamer-app-1.0_VERSION})
|
||||
set(GSTREAMER_RIFF_VERSION ${GSTREAMER-1.0_gstreamer-riff-1.0_VERSION})
|
||||
set(GSTREAMER_PBUTILS_VERSION ${GSTREAMER-1.0_gstreamer-pbutils-1.0_VERSION})
|
||||
endif()
|
||||
endif(WIN32)
|
||||
endif()
|
||||
|
||||
# if gstreamer 1.x was not found, or we specified we wanted 0.10, try to find it
|
||||
if(WITH_GSTREAMER AND NOT HAVE_GSTREAMER OR WITH_GSTREAMER_0_10)
|
||||
ocv_check_modules(GSTREAMER-0.10 gstreamer-base-0.10 gstreamer-video-0.10 gstreamer-app-0.10 gstreamer-riff-0.10 gstreamer-pbutils-0.10)
|
||||
if(HAVE_GSTREAMER-0.10)
|
||||
set(HAVE_GSTREAMER TRUE)
|
||||
ocv_append_build_options(VIDEOIO GSTREAMER-0.10)
|
||||
set(GSTREAMER_BASE_VERSION ${GSTREAMER-0.10_gstreamer-base-0.10_VERSION})
|
||||
set(GSTREAMER_VIDEO_VERSION ${GSTREAMER-0.10_gstreamer-video-0.10_VERSION})
|
||||
set(GSTREAMER_APP_VERSION ${GSTREAMER-0.10_gstreamer-app-0.10_VERSION})
|
||||
set(GSTREAMER_RIFF_VERSION ${GSTREAMER-0.10_gstreamer-riff-0.10_VERSION})
|
||||
set(GSTREAMER_PBUTILS_VERSION ${GSTREAMER-0.10_gstreamer-pbutils-0.10_VERSION})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# --- unicap ---
|
||||
ocv_clear_vars(HAVE_UNICAP)
|
||||
if(WITH_UNICAP)
|
||||
ocv_check_modules(HAVE_UNICAP libunicap libucil)
|
||||
if(HAVE_UNICAP)
|
||||
ocv_append_build_options(VIDEOIO UNICAP)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# --- PvApi ---
|
||||
ocv_clear_vars(HAVE_PVAPI)
|
||||
if(WITH_PVAPI)
|
||||
find_path(PVAPI_INCLUDE_PATH "PvApi.h"
|
||||
PATHS /usr/local /opt /usr ENV ProgramFiles ENV ProgramW6432
|
||||
PATH_SUFFIXES include "Allied Vision Technologies/GigESDK/inc-pc" "AVT GigE SDK/inc-pc" "GigESDK/inc-pc"
|
||||
DOC "The path to PvAPI header")
|
||||
|
||||
if(PVAPI_INCLUDE_PATH)
|
||||
if(X86 AND NOT WIN32)
|
||||
set(PVAPI_SDK_SUBDIR x86)
|
||||
elseif(X86_64)
|
||||
set(PVAPI_SDK_SUBDIR x64)
|
||||
elseif(ARM)
|
||||
set(PVAPI_SDK_SUBDIR arm)
|
||||
endif()
|
||||
|
||||
get_filename_component(_PVAPI_LIBRARY_HINT "${PVAPI_INCLUDE_PATH}/../lib-pc" ABSOLUTE)
|
||||
|
||||
find_library(PVAPI_LIBRARY NAMES "PvAPI" PATHS "${_PVAPI_LIBRARY_HINT}")
|
||||
|
||||
if(PVAPI_LIBRARY)
|
||||
if(WIN32)
|
||||
if(MINGW)
|
||||
set(PVAPI_DEFINITIONS "-DPVDECL=__stdcall")
|
||||
endif(MINGW)
|
||||
endif()
|
||||
set(HAVE_PVAPI TRUE)
|
||||
endif()
|
||||
endif(PVAPI_INCLUDE_PATH)
|
||||
endif(WITH_PVAPI)
|
||||
|
||||
# --- GigEVisionSDK ---
|
||||
ocv_clear_vars(HAVE_GIGE_API)
|
||||
if(WITH_GIGEAPI)
|
||||
find_path(GIGEAPI_INCLUDE_PATH "GigEVisionSDK.h"
|
||||
PATHS /usr/local /var /opt /usr ENV ProgramFiles ENV ProgramW6432
|
||||
PATH_SUFFIXES include "Smartek Vision Technologies/GigEVisionSDK/gige_cpp" "GigEVisionSDK/gige_cpp" "GigEVisionSDK/gige_c"
|
||||
DOC "The path to Smartek GigEVisionSDK header")
|
||||
FIND_LIBRARY(GIGEAPI_LIBRARIES NAMES GigEVisionSDK)
|
||||
if(GIGEAPI_LIBRARIES AND GIGEAPI_INCLUDE_PATH)
|
||||
set(HAVE_GIGE_API TRUE)
|
||||
endif()
|
||||
endif(WITH_GIGEAPI)
|
||||
|
||||
# --- Aravis SDK ---
|
||||
ocv_clear_vars(HAVE_ARAVIS_API)
|
||||
if(WITH_ARAVIS)
|
||||
ocv_check_modules(ARAVIS_GLIB glib-2.0)
|
||||
if(HAVE_ARAVIS_GLIB)
|
||||
find_path(ARAVIS_INCLUDE_PATH "arv.h"
|
||||
PATHS /usr/local /var /opt /usr ENV ProgramFiles ENV ProgramW6432
|
||||
PATH_SUFFIXES include "aravis-0.6" "aravis-0.4"
|
||||
DOC "The path to Aravis SDK headers")
|
||||
find_library(ARAVIS_LIBRARIES NAMES "aravis-0.6" "aravis-0.4" )
|
||||
if(ARAVIS_LIBRARIES AND ARAVIS_INCLUDE_PATH)
|
||||
ocv_append_build_options(VIDEOIO ARAVIS_GLIB)
|
||||
set(HAVE_ARAVIS_API TRUE)
|
||||
endif()
|
||||
else()
|
||||
message("Can not build Aravis support without glib2")
|
||||
endif()
|
||||
endif(WITH_ARAVIS)
|
||||
|
||||
# --- Dc1394 ---
|
||||
ocv_clear_vars(HAVE_DC1394 HAVE_DC1394_2)
|
||||
if(WITH_1394)
|
||||
if(WIN32 AND MINGW)
|
||||
# TODO remove this, use pkgconfig from MinGW instead
|
||||
find_path(CMU1394_INCLUDE_PATH "/1394common.h"
|
||||
PATH_SUFFIXES include
|
||||
DOC "The path to cmu1394 headers")
|
||||
find_path(DC1394_2_INCLUDE_PATH "/dc1394/dc1394.h"
|
||||
PATH_SUFFIXES include
|
||||
DOC "The path to DC1394 2.x headers")
|
||||
if(CMU1394_INCLUDE_PATH AND DC1394_2_INCLUDE_PATH)
|
||||
set(CMU1394_LIB_DIR "${CMU1394_INCLUDE_PATH}/../lib" CACHE PATH "Full path of CMU1394 library directory")
|
||||
set(DC1394_2_LIB_DIR "${DC1394_2_INCLUDE_PATH}/../lib" CACHE PATH "Full path of DC1394 2.x library directory")
|
||||
if(EXISTS "${CMU1394_LIB_DIR}/lib1394camera.a" AND EXISTS "${DC1394_2_LIB_DIR}/libdc1394.a")
|
||||
set(HAVE_DC1394_2 TRUE)
|
||||
endif()
|
||||
endif()
|
||||
if(HAVE_DC1394_2)
|
||||
ocv_parse_pkg(DC1394_2_VERSION "libdc1394-2" "${DC1394_2_LIB_DIR}/pkgconfig")
|
||||
ocv_include_directories(${DC1394_2_INCLUDE_PATH})
|
||||
set(VIDEOIO_LIBRARIES ${VIDEOIO_LIBRARIES}
|
||||
"${DC1394_2_LIB_DIR}/libdc1394.a"
|
||||
"${CMU1394_LIB_DIR}/lib1394camera.a")
|
||||
endif()
|
||||
endif()
|
||||
if(NOT HAVE_DC1394_2)
|
||||
ocv_check_modules(DC1394_2 libdc1394-2)
|
||||
if(HAVE_DC1394_2)
|
||||
ocv_append_build_options(VIDEOIO DC1394_2)
|
||||
else()
|
||||
ocv_check_modules(DC1394 libdc1394)
|
||||
if(HAVE_DC1394)
|
||||
ocv_append_build_options(VIDEOIO DC1394)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# --- xine ---
|
||||
ocv_clear_vars(HAVE_XINE)
|
||||
if(WITH_XINE)
|
||||
ocv_check_modules(XINE libxine)
|
||||
if(HAVE_XINE)
|
||||
ocv_append_build_options(VIDEOIO XINE)
|
||||
endif()
|
||||
endif(WITH_XINE)
|
||||
|
||||
# --- V4L ---
|
||||
ocv_clear_vars(HAVE_LIBV4L HAVE_CAMV4L HAVE_CAMV4L2 HAVE_VIDEOIO)
|
||||
if(WITH_V4L)
|
||||
if(WITH_LIBV4L)
|
||||
ocv_check_modules(LIBV4L libv4l1 libv4l2)
|
||||
if(HAVE_LIBV4L)
|
||||
ocv_append_build_options(VIDEOIO LIBV4L)
|
||||
endif()
|
||||
endif()
|
||||
CHECK_INCLUDE_FILE(linux/videodev.h HAVE_CAMV4L)
|
||||
CHECK_INCLUDE_FILE(linux/videodev2.h HAVE_CAMV4L2)
|
||||
CHECK_INCLUDE_FILE(sys/videoio.h HAVE_VIDEOIO)
|
||||
endif(WITH_V4L)
|
||||
|
||||
# --- OpenNI ---
|
||||
ocv_clear_vars(HAVE_OPENNI HAVE_OPENNI_PRIME_SENSOR_MODULE)
|
||||
if(WITH_OPENNI)
|
||||
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindOpenNI.cmake")
|
||||
endif(WITH_OPENNI)
|
||||
|
||||
ocv_clear_vars(HAVE_OPENNI2)
|
||||
if(WITH_OPENNI2)
|
||||
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindOpenNI2.cmake")
|
||||
endif(WITH_OPENNI2)
|
||||
|
||||
# --- XIMEA ---
|
||||
ocv_clear_vars(HAVE_XIMEA)
|
||||
if(WITH_XIMEA)
|
||||
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindXimea.cmake")
|
||||
if(XIMEA_FOUND)
|
||||
set(HAVE_XIMEA TRUE)
|
||||
endif()
|
||||
endif(WITH_XIMEA)
|
||||
|
||||
# --- FFMPEG ---
|
||||
ocv_clear_vars(HAVE_FFMPEG)
|
||||
if(WITH_FFMPEG) # try FFmpeg autodetection
|
||||
if(OPENCV_FFMPEG_USE_FIND_PACKAGE)
|
||||
if(OPENCV_FFMPEG_USE_FIND_PACKAGE STREQUAL "1" OR OPENCV_FFMPEG_USE_FIND_PACKAGE STREQUAL "ON")
|
||||
set(OPENCV_FFMPEG_USE_FIND_PACKAGE "FFMPEG")
|
||||
endif()
|
||||
find_package(${OPENCV_FFMPEG_USE_FIND_PACKAGE}) # Required components: AVCODEC AVFORMAT AVUTIL SWSCALE
|
||||
if(FFMPEG_FOUND OR FFmpeg_FOUND)
|
||||
set(HAVE_FFMPEG TRUE)
|
||||
else()
|
||||
message(STATUS "Can't find FFmpeg via find_package(${OPENCV_FFMPEG_USE_FIND_PACKAGE})")
|
||||
endif()
|
||||
elseif(WIN32 AND NOT ARM AND NOT OPENCV_FFMPEG_SKIP_DOWNLOAD)
|
||||
include("${OpenCV_SOURCE_DIR}/3rdparty/ffmpeg/ffmpeg.cmake")
|
||||
download_win_ffmpeg(FFMPEG_CMAKE_SCRIPT)
|
||||
if(FFMPEG_CMAKE_SCRIPT)
|
||||
set(HAVE_FFMPEG TRUE)
|
||||
set(HAVE_FFMPEG_WRAPPER 1)
|
||||
include("${FFMPEG_CMAKE_SCRIPT}")
|
||||
endif()
|
||||
elseif(PKG_CONFIG_FOUND)
|
||||
ocv_check_modules(FFMPEG libavcodec libavformat libavutil libswscale)
|
||||
ocv_check_modules(FFMPEG_libavresample libavresample)
|
||||
if(FFMPEG_libavresample_FOUND)
|
||||
ocv_append_build_options(FFMPEG FFMPEG_libavresample)
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "Can't find ffmpeg - 'pkg-config' utility is missing")
|
||||
endif()
|
||||
endif()
|
||||
if(HAVE_FFMPEG
|
||||
AND NOT HAVE_FFMPEG_WRAPPER
|
||||
)
|
||||
try_compile(__VALID_FFMPEG
|
||||
"${OpenCV_BINARY_DIR}"
|
||||
"${OpenCV_SOURCE_DIR}/cmake/checks/ffmpeg_test.cpp"
|
||||
CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${FFMPEG_INCLUDE_DIRS}"
|
||||
"-DLINK_DIRECTORIES:STRING=${FFMPEG_LIBRARY_DIRS}"
|
||||
"-DLINK_LIBRARIES:STRING=${FFMPEG_LIBRARIES}"
|
||||
OUTPUT_VARIABLE TRY_OUT
|
||||
)
|
||||
if(NOT __VALID_FFMPEG)
|
||||
#message(FATAL_ERROR "FFMPEG: test check build log:\n${TRY_OUT}")
|
||||
message(STATUS "WARNING: Can't build ffmpeg test code")
|
||||
set(HAVE_FFMPEG FALSE)
|
||||
else()
|
||||
ocv_append_build_options(VIDEOIO FFMPEG)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# --- VideoInput/DirectShow ---
|
||||
if(WITH_DSHOW)
|
||||
if(MSVC_VERSION GREATER 1499)
|
||||
set(HAVE_DSHOW 1)
|
||||
elseif(NOT HAVE_DSHOW)
|
||||
check_include_file(DShow.h HAVE_DSHOW)
|
||||
endif()
|
||||
endif(WITH_DSHOW)
|
||||
|
||||
# --- VideoInput/Microsoft Media Foundation ---
|
||||
ocv_clear_vars(HAVE_MSMF)
|
||||
if(WITH_MSMF)
|
||||
check_include_file(Mfapi.h HAVE_MSMF)
|
||||
set(HAVE_MSMF_DXVA "")
|
||||
if(WITH_MSMF_DXVA)
|
||||
check_include_file(D3D11.h D3D11_found)
|
||||
check_include_file(D3d11_4.h D3D11_4_found)
|
||||
if(D3D11_found AND D3D11_4_found)
|
||||
set(HAVE_MSMF_DXVA YES)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# --- Extra HighGUI and VideoIO libs on Windows ---
|
||||
if(WIN32)
|
||||
list(APPEND HIGHGUI_LIBRARIES comctl32 gdi32 ole32 setupapi ws2_32)
|
||||
if(HAVE_VFW)
|
||||
list(APPEND VIDEOIO_LIBRARIES vfw32)
|
||||
endif()
|
||||
if(MINGW AND CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
list(APPEND VIDEOIO_LIBRARIES avifil32 avicap32 winmm msvfw32)
|
||||
list(REMOVE_ITEM VIDEOIO_LIBRARIES vfw32)
|
||||
elseif(MINGW)
|
||||
list(APPEND VIDEOIO_LIBRARIES winmm)
|
||||
endif()
|
||||
endif(WIN32)
|
||||
|
||||
if(APPLE)
|
||||
if(WITH_AVFOUNDATION)
|
||||
set(HAVE_AVFOUNDATION YES)
|
||||
endif()
|
||||
if(NOT IOS)
|
||||
if(WITH_QUICKTIME)
|
||||
set(HAVE_QUICKTIME YES)
|
||||
elseif(WITH_QTKIT)
|
||||
set(HAVE_QTKIT YES)
|
||||
endif()
|
||||
endif()
|
||||
endif(APPLE)
|
||||
|
||||
# --- Intel Perceptual Computing SDK ---
|
||||
if(WITH_INTELPERC)
|
||||
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindIntelPerCSDK.cmake")
|
||||
endif(WITH_INTELPERC)
|
||||
|
||||
if(WITH_MFX)
|
||||
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVDetectMediaSDK.cmake")
|
||||
endif()
|
||||
|
||||
# --- gPhoto2 ---
|
||||
ocv_clear_vars(HAVE_GPHOTO2)
|
||||
if(WITH_GPHOTO2)
|
||||
ocv_check_modules(GPHOTO2 libgphoto2)
|
||||
if(HAVE_GPHOTO2)
|
||||
ocv_append_build_options(VIDEOIO GPHOTO2)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# --- VA & VA_INTEL ---
|
||||
if(WITH_VA_INTEL)
|
||||
include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindVA_INTEL.cmake")
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
# Main variables:
|
||||
# OPENNI_LIBRARY and OPENNI_INCLUDES to link OpenCV modules with OpenNI
|
||||
# HAVE_OPENNI for conditional compilation OpenCV with/without OpenNI
|
||||
|
||||
if(NOT "${OPENNI_LIB_DIR}" STREQUAL "${OPENNI_LIB_DIR_INTERNAL}")
|
||||
unset(OPENNI_LIBRARY CACHE)
|
||||
unset(OPENNI_LIB_DIR CACHE)
|
||||
endif()
|
||||
|
||||
if(NOT "${OPENNI_INCLUDE_DIR}" STREQUAL "${OPENNI_INCLUDE_DIR_INTERNAL}")
|
||||
unset(OPENNI_INCLUDES CACHE)
|
||||
unset(OPENNI_INCLUDE_DIR CACHE)
|
||||
endif()
|
||||
|
||||
if(NOT "${OPENNI_PRIME_SENSOR_MODULE_BIN_DIR}" STREQUAL "${OPENNI_PRIME_SENSOR_MODULE_BIN_DIR_INTERNAL}")
|
||||
unset(OPENNI_PRIME_SENSOR_MODULE CACHE)
|
||||
unset(OPENNI_PRIME_SENSOR_MODULE_BIN_DIR CACHE)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
find_file(OPENNI_INCLUDES "XnCppWrapper.h" PATHS "$ENV{OPEN_NI_INSTALL_PATH}Include" DOC "OpenNI c++ interface header")
|
||||
find_library(OPENNI_LIBRARY "OpenNI" PATHS $ENV{OPEN_NI_LIB} DOC "OpenNI library")
|
||||
else()
|
||||
find_file(OPENNI_INCLUDES "XnCppWrapper.h" PATHS "$ENV{OPEN_NI_INSTALL_PATH64}Include" DOC "OpenNI c++ interface header")
|
||||
find_library(OPENNI_LIBRARY "OpenNI64" PATHS $ENV{OPEN_NI_LIB64} DOC "OpenNI library")
|
||||
endif()
|
||||
elseif(UNIX OR APPLE)
|
||||
find_file(OPENNI_INCLUDES "XnCppWrapper.h" PATHS "/usr/include/ni" "/usr/include/openni" DOC "OpenNI c++ interface header")
|
||||
find_library(OPENNI_LIBRARY "OpenNI" PATHS "/usr/lib" DOC "OpenNI library")
|
||||
endif()
|
||||
|
||||
if(OPENNI_LIBRARY AND OPENNI_INCLUDES)
|
||||
set(HAVE_OPENNI TRUE)
|
||||
# the check: are PrimeSensor Modules for OpenNI installed
|
||||
if(WIN32)
|
||||
if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
find_file(OPENNI_PRIME_SENSOR_MODULE "XnCore.dll" PATHS "$ENV{OPEN_NI_INSTALL_PATH}../PrimeSense/Sensor/Bin" "$ENV{OPEN_NI_INSTALL_PATH}../PrimeSense/SensorKinect/Bin" DOC "Core library of PrimeSensor Modules for OpenNI")
|
||||
else()
|
||||
find_file(OPENNI_PRIME_SENSOR_MODULE "XnCore64.dll" PATHS "$ENV{OPEN_NI_INSTALL_PATH64}../PrimeSense/Sensor/Bin64" "$ENV{OPEN_NI_INSTALL_PATH64}../PrimeSense/SensorKinect/Bin64" DOC "Core library of PrimeSensor Modules for OpenNI")
|
||||
endif()
|
||||
elseif(UNIX OR APPLE)
|
||||
find_library(OPENNI_PRIME_SENSOR_MODULE "XnCore" PATHS "/usr/lib" DOC "Core library of PrimeSensor Modules for OpenNI")
|
||||
endif()
|
||||
|
||||
if(OPENNI_PRIME_SENSOR_MODULE)
|
||||
set(HAVE_OPENNI_PRIME_SENSOR_MODULE TRUE)
|
||||
endif()
|
||||
endif() #if(OPENNI_LIBRARY AND OPENNI_INCLUDES)
|
||||
|
||||
get_filename_component(OPENNI_LIB_DIR "${OPENNI_LIBRARY}" PATH)
|
||||
get_filename_component(OPENNI_INCLUDE_DIR ${OPENNI_INCLUDES} PATH)
|
||||
get_filename_component(OPENNI_PRIME_SENSOR_MODULE_BIN_DIR "${OPENNI_PRIME_SENSOR_MODULE}" PATH)
|
||||
|
||||
if(HAVE_OPENNI)
|
||||
set(OPENNI_LIB_DIR "${OPENNI_LIB_DIR}" CACHE PATH "Path to OpenNI libraries" FORCE)
|
||||
set(OPENNI_INCLUDE_DIR "${OPENNI_INCLUDE_DIR}" CACHE PATH "Path to OpenNI headers" FORCE)
|
||||
set(OPENNI_PRIME_SENSOR_MODULE_BIN_DIR "${OPENNI_PRIME_SENSOR_MODULE_BIN_DIR}" CACHE PATH "Path to OpenNI PrimeSensor Module binaries" FORCE)
|
||||
endif()
|
||||
|
||||
if(OPENNI_LIBRARY)
|
||||
set(OPENNI_LIB_DIR_INTERNAL "${OPENNI_LIB_DIR}" CACHE INTERNAL "This is the value of the last time OPENNI_LIB_DIR was set successfully." FORCE)
|
||||
else()
|
||||
message( WARNING, " OpenNI library directory (set by OPENNI_LIB_DIR variable) is not found or does not have OpenNI libraries." )
|
||||
endif()
|
||||
|
||||
if(OPENNI_INCLUDES)
|
||||
set(OPENNI_INCLUDE_DIR_INTERNAL "${OPENNI_INCLUDE_DIR}" CACHE INTERNAL "This is the value of the last time OPENNI_INCLUDE_DIR was set successfully." FORCE)
|
||||
else()
|
||||
message( WARNING, " OpenNI include directory (set by OPENNI_INCLUDE_DIR variable) is not found or does not have OpenNI include files." )
|
||||
endif()
|
||||
|
||||
if(OPENNI_PRIME_SENSOR_MODULE)
|
||||
set(OPENNI_PRIME_SENSOR_MODULE_BIN_DIR_INTERNAL "${OPENNI_PRIME_SENSOR_MODULE_BIN_DIR}" CACHE INTERNAL "This is the value of the last time OPENNI_PRIME_SENSOR_MODULE_BIN_DIR was set successfully." FORCE)
|
||||
else()
|
||||
message( WARNING, " PrimeSensor Module binaries directory (set by OPENNI_PRIME_SENSOR_MODULE_BIN_DIR variable) is not found or does not have PrimeSensor Module binaries." )
|
||||
endif()
|
||||
|
||||
mark_as_advanced(FORCE OPENNI_PRIME_SENSOR_MODULE)
|
||||
mark_as_advanced(FORCE OPENNI_LIBRARY)
|
||||
mark_as_advanced(FORCE OPENNI_INCLUDES)
|
||||
|
||||
if(HAVE_OPENNI)
|
||||
ocv_parse_header("${OPENNI_INCLUDE_DIR}/XnVersion.h" OPENNI_VERSION_LINES XN_MAJOR_VERSION XN_MINOR_VERSION XN_MAINTENANCE_VERSION XN_BUILD_VERSION)
|
||||
if(XN_MAJOR_VERSION)
|
||||
set(OPENNI_VERSION_STRING ${XN_MAJOR_VERSION}.${XN_MINOR_VERSION}.${XN_MAINTENANCE_VERSION} CACHE INTERNAL "OpenNI version")
|
||||
set(OPENNI_VERSION_BUILD ${XN_BUILD_VERSION} CACHE INTERNAL "OpenNI build version")
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,61 @@
|
||||
# Main variables:
|
||||
# OPENNI2_LIBRARY and OPENNI2_INCLUDES to link OpenCV modules with OpenNI2
|
||||
# HAVE_OPENNI2 for conditional compilation OpenCV with/without OpenNI2
|
||||
|
||||
if(NOT "${OPENNI2_LIB_DIR}" STREQUAL "${OPENNI2_LIB_DIR_INTERNAL}")
|
||||
unset(OPENNI2_LIBRARY CACHE)
|
||||
unset(OPENNI2_LIB_DIR CACHE)
|
||||
endif()
|
||||
|
||||
if(NOT "${OPENNI2_INCLUDE_DIR}" STREQUAL "${OPENNI2_INCLUDE_DIR_INTERNAL}")
|
||||
unset(OPENNI2_INCLUDES CACHE)
|
||||
unset(OPENNI2_INCLUDE_DIR CACHE)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
find_file(OPENNI2_INCLUDES "OpenNI.h" PATHS $ENV{OPENNI2_INCLUDE} "$ENV{OPEN_NI_INSTALL_PATH}Include" DOC "OpenNI2 c++ interface header")
|
||||
find_library(OPENNI2_LIBRARY "OpenNI2" PATHS $ENV{OPENNI2_LIB} DOC "OpenNI2 library")
|
||||
else()
|
||||
find_file(OPENNI2_INCLUDES "OpenNI.h" PATHS $ENV{OPENNI2_INCLUDE64} "$ENV{OPEN_NI_INSTALL_PATH64}Include" DOC "OpenNI2 c++ interface header")
|
||||
find_library(OPENNI2_LIBRARY "OpenNI2" PATHS $ENV{OPENNI2_LIB64} DOC "OpenNI2 library")
|
||||
endif()
|
||||
elseif(UNIX OR APPLE)
|
||||
find_file(OPENNI2_INCLUDES "OpenNI.h" PATHS "/usr/include/ni2" "/usr/include/openni2" $ENV{OPENNI2_INCLUDE} DOC "OpenNI2 c++ interface header")
|
||||
find_library(OPENNI2_LIBRARY "OpenNI2" PATHS "/usr/lib" $ENV{OPENNI2_REDIST} DOC "OpenNI2 library")
|
||||
endif()
|
||||
|
||||
if(OPENNI2_LIBRARY AND OPENNI2_INCLUDES)
|
||||
set(HAVE_OPENNI2 TRUE)
|
||||
endif() #if(OPENNI2_LIBRARY AND OPENNI2_INCLUDES)
|
||||
|
||||
get_filename_component(OPENNI2_LIB_DIR "${OPENNI2_LIBRARY}" PATH)
|
||||
get_filename_component(OPENNI2_INCLUDE_DIR ${OPENNI2_INCLUDES} PATH)
|
||||
|
||||
if(HAVE_OPENNI2)
|
||||
set(OPENNI2_LIB_DIR "${OPENNI2_LIB_DIR}" CACHE PATH "Path to OpenNI2 libraries" FORCE)
|
||||
set(OPENNI2_INCLUDE_DIR "${OPENNI2_INCLUDE_DIR}" CACHE PATH "Path to OpenNI2 headers" FORCE)
|
||||
endif()
|
||||
|
||||
if(OPENNI2_LIBRARY)
|
||||
set(OPENNI2_LIB_DIR_INTERNAL "${OPENNI2_LIB_DIR}" CACHE INTERNAL "This is the value of the last time OPENNI_LIB_DIR was set successfully." FORCE)
|
||||
else()
|
||||
message( WARNING, " OpenNI2 library directory (set by OPENNI2_LIB_DIR variable) is not found or does not have OpenNI2 libraries." )
|
||||
endif()
|
||||
|
||||
if(OPENNI2_INCLUDES)
|
||||
set(OPENNI2_INCLUDE_DIR_INTERNAL "${OPENNI2_INCLUDE_DIR}" CACHE INTERNAL "This is the value of the last time OPENNI2_INCLUDE_DIR was set successfully." FORCE)
|
||||
else()
|
||||
message( WARNING, " OpenNI2 include directory (set by OPENNI2_INCLUDE_DIR variable) is not found or does not have OpenNI2 include files." )
|
||||
endif()
|
||||
|
||||
mark_as_advanced(FORCE OPENNI2_LIBRARY)
|
||||
mark_as_advanced(FORCE OPENNI2_INCLUDES)
|
||||
|
||||
if(HAVE_OPENNI2)
|
||||
ocv_parse_header("${OPENNI2_INCLUDE_DIR}/OniVersion.h" ONI_VERSION_LINE ONI_VERSION_MAJOR ONI_VERSION_MINOR ONI_VERSION_MAINTENANCE ONI_VERSION_BUILD)
|
||||
if(ONI_VERSION_MAJOR)
|
||||
set(OPENNI2_VERSION_STRING ${ONI_VERSION_MAJOR}.${ONI_VERSION_MINOR}.${ONI_VERSION_MAINTENANCE} CACHE INTERNAL "OpenNI2 version")
|
||||
set(OPENNI2_VERSION_BUILD ${ONI_VERSION_BUILD} CACHE INTERNAL "OpenNI2 build version")
|
||||
endif()
|
||||
endif()
|
||||
@@ -0,0 +1,52 @@
|
||||
# - Find XIMEA
|
||||
# This module finds if XIMEA Software package is installed
|
||||
# and determines where the binaries and header files are.
|
||||
# This code sets the following variables:
|
||||
#
|
||||
# XIMEA_FOUND - True if XIMEA API found
|
||||
# XIMEA_PATH: - Path to the XIMEA API folder
|
||||
# XIMEA_LIBRARY_DIR - XIMEA libraries folder
|
||||
#
|
||||
# Created: 5 Aug 2011 by Marian Zajko (marian.zajko@ximea.com)
|
||||
# Updated: 25 June 2012 by Igor Kuzmin (parafin@ximea.com)
|
||||
# Updated: 22 October 2012 by Marian Zajko (marian.zajko@ximea.com)
|
||||
#
|
||||
|
||||
set(XIMEA_FOUND)
|
||||
set(XIMEA_PATH)
|
||||
set(XIMEA_LIBRARY_DIR)
|
||||
|
||||
if(WIN32)
|
||||
# Try to find the XIMEA API path in registry.
|
||||
GET_FILENAME_COMPONENT(XIMEA_PATH "[HKEY_CURRENT_USER\\Software\\XIMEA\\CamSupport\\API;Path]" ABSOLUTE)
|
||||
|
||||
if(EXISTS ${XIMEA_PATH})
|
||||
set(XIMEA_FOUND 1)
|
||||
# set LIB folders
|
||||
if(X86_64)
|
||||
set(XIMEA_LIBRARY_DIR "${XIMEA_PATH}/x64")
|
||||
else()
|
||||
set(XIMEA_LIBRARY_DIR "${XIMEA_PATH}/x86")
|
||||
endif()
|
||||
else()
|
||||
set(XIMEA_FOUND 0)
|
||||
endif()
|
||||
elseif(APPLE)
|
||||
if(EXISTS /Library/Frameworks/m3api.framework)
|
||||
set(XIMEA_FOUND 1)
|
||||
else()
|
||||
set(XIMEA_FOUND 0)
|
||||
endif()
|
||||
else()
|
||||
if(EXISTS /opt/XIMEA)
|
||||
set(XIMEA_FOUND 1)
|
||||
# set folders
|
||||
set(XIMEA_PATH /opt/XIMEA/include)
|
||||
else()
|
||||
set(XIMEA_FOUND 0)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
mark_as_advanced(FORCE XIMEA_FOUND)
|
||||
mark_as_advanced(FORCE XIMEA_PATH)
|
||||
mark_as_advanced(FORCE XIMEA_LIBRARY_DIR)
|
||||
|
||||
@@ -24,6 +24,8 @@ set(OPENCV_ABI_HEADERS "{RELPATH}/${OPENCV_INCLUDE_INSTALL_PATH}")
|
||||
# Libraries
|
||||
set(OPENCV_ABI_LIBRARIES "{RELPATH}/${OPENCV_LIB_INSTALL_PATH}")
|
||||
|
||||
set(OPENCV_ABI_SKIP_HEADERS "")
|
||||
set(OPENCV_ABI_SKIP_LIBRARIES "")
|
||||
foreach(mod ${OPENCV_MODULES_BUILD})
|
||||
string(REGEX REPLACE "^opencv_" "" mod "${mod}")
|
||||
if(NOT OPENCV_MODULE_opencv_${mod}_CLASS STREQUAL "PUBLIC"
|
||||
@@ -45,7 +47,7 @@ string(REPLACE ";" "\n " OPENCV_ABI_SKIP_HEADERS "${OPENCV_ABI_SKIP_HEADERS}"
|
||||
string(REPLACE ";" "\n " OPENCV_ABI_SKIP_LIBRARIES "${OPENCV_ABI_SKIP_LIBRARIES}")
|
||||
|
||||
# Options
|
||||
set(OPENCV_ABI_GCC_OPTIONS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} -DOPENCV_ABI_CHECK=1 -DCV_DNN_DONT_ADD_INLINE_NS=1")
|
||||
set(OPENCV_ABI_GCC_OPTIONS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} -DOPENCV_ABI_CHECK=1")
|
||||
string(REGEX REPLACE "([^ ]) +([^ ])" "\\1\\n \\2" OPENCV_ABI_GCC_OPTIONS "${OPENCV_ABI_GCC_OPTIONS}")
|
||||
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/templates/opencv_abi.xml.in" "${path1}.base")
|
||||
|
||||
@@ -48,7 +48,7 @@ if(ANDROID)
|
||||
string(REPLACE "opencv_" "" OPENCV_MODULES_CONFIGMAKE "${OPENCV_MODULES_CONFIGMAKE}")
|
||||
|
||||
if(BUILD_FAT_JAVA_LIB)
|
||||
set(OPENCV_LIBS_CONFIGMAKE java4)
|
||||
set(OPENCV_LIBS_CONFIGMAKE java3)
|
||||
else()
|
||||
set(OPENCV_LIBS_CONFIGMAKE "${OPENCV_MODULES_CONFIGMAKE}")
|
||||
endif()
|
||||
|
||||
@@ -30,15 +30,10 @@ if(BUILD_FAT_JAVA_LIB AND HAVE_opencv_java)
|
||||
list(APPEND OPENCV_MODULES_CONFIGCMAKE opencv_java)
|
||||
endif()
|
||||
|
||||
if(BUILD_OBJC AND HAVE_opencv_objc)
|
||||
list(APPEND OPENCV_MODULES_CONFIGCMAKE opencv_objc)
|
||||
endif()
|
||||
|
||||
|
||||
# -------------------------------------------------------------------------------------------
|
||||
# Part 1/3: ${BIN_DIR}/OpenCVConfig.cmake -> For use *without* "make install"
|
||||
# -------------------------------------------------------------------------------------------
|
||||
set(OpenCV_INCLUDE_DIRS_CONFIGCMAKE "\"${OPENCV_CONFIG_FILE_INCLUDE_DIR}\" \"${OpenCV_SOURCE_DIR}/include\"")
|
||||
set(OpenCV_INCLUDE_DIRS_CONFIGCMAKE "\"${OPENCV_CONFIG_FILE_INCLUDE_DIR}\" \"${OpenCV_SOURCE_DIR}/include\" \"${OpenCV_SOURCE_DIR}/include/opencv\"")
|
||||
|
||||
foreach(m ${OPENCV_MODULES_BUILD})
|
||||
if(EXISTS "${OPENCV_MODULE_${m}_LOCATION}/include")
|
||||
@@ -46,7 +41,7 @@ foreach(m ${OPENCV_MODULES_BUILD})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
export(EXPORT OpenCVModules FILE "${CMAKE_BINARY_DIR}/OpenCVModules.cmake")
|
||||
export(TARGETS ${OpenCVModules_TARGETS} FILE "${CMAKE_BINARY_DIR}/OpenCVModules.cmake")
|
||||
|
||||
if(TARGET ippicv AND NOT BUILD_SHARED_LIBS)
|
||||
set(USE_IPPICV TRUE)
|
||||
@@ -74,9 +69,9 @@ configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/OpenCVConfig-version.cmake.
|
||||
# -------------------------------------------------------------------------------------------
|
||||
file(RELATIVE_PATH OpenCV_INSTALL_PATH_RELATIVE_CONFIGCMAKE "${CMAKE_INSTALL_PREFIX}/${OPENCV_CONFIG_INSTALL_PATH}/" ${CMAKE_INSTALL_PREFIX})
|
||||
if (IS_ABSOLUTE ${OPENCV_INCLUDE_INSTALL_PATH})
|
||||
set(OpenCV_INCLUDE_DIRS_CONFIGCMAKE "\"${OPENCV_INCLUDE_INSTALL_PATH}\"")
|
||||
set(OpenCV_INCLUDE_DIRS_CONFIGCMAKE "\"${OPENCV_INCLUDE_INSTALL_PATH}\" \"${OPENCV_INCLUDE_INSTALL_PATH}/opencv\"")
|
||||
else()
|
||||
set(OpenCV_INCLUDE_DIRS_CONFIGCMAKE "\"\${OpenCV_INSTALL_PATH}/${OPENCV_INCLUDE_INSTALL_PATH}\"")
|
||||
set(OpenCV_INCLUDE_DIRS_CONFIGCMAKE "\"\${OpenCV_INSTALL_PATH}/${OPENCV_INCLUDE_INSTALL_PATH}\" \"\${OpenCV_INSTALL_PATH}/${OPENCV_INCLUDE_INSTALL_PATH}/opencv\"")
|
||||
endif()
|
||||
|
||||
if(USE_IPPICV)
|
||||
|
||||
@@ -2,7 +2,7 @@ set(OPENCV_APPLE_BUNDLE_NAME "OpenCV")
|
||||
set(OPENCV_APPLE_BUNDLE_ID "org.opencv")
|
||||
|
||||
if(IOS)
|
||||
if (APPLE_FRAMEWORK AND DYNAMIC_PLIST)
|
||||
if (APPLE_FRAMEWORK AND BUILD_SHARED_LIBS)
|
||||
configure_file("${OpenCV_SOURCE_DIR}/platforms/ios/Info.Dynamic.plist.in"
|
||||
"${CMAKE_BINARY_DIR}/ios/Info.plist")
|
||||
else()
|
||||
|
||||
@@ -43,9 +43,9 @@ endmacro()
|
||||
if(NOT DEFINED CMAKE_HELPER_SCRIPT)
|
||||
|
||||
if(INSTALL_TO_MANGLED_PATHS)
|
||||
ocv_update(OPENCV_PC_FILE_NAME "opencv-${OPENCV_VERSION}.pc")
|
||||
set(OPENCV_PC_FILE_NAME "opencv-${OPENCV_VERSION}.pc")
|
||||
else()
|
||||
ocv_update(OPENCV_PC_FILE_NAME opencv4.pc)
|
||||
set(OPENCV_PC_FILE_NAME opencv.pc)
|
||||
endif()
|
||||
|
||||
# build the list of opencv libs and dependencies for all modules
|
||||
|
||||
@@ -15,7 +15,7 @@ endif()
|
||||
if(INSTALL_TO_MANGLED_PATHS)
|
||||
ocv_update(OPENCV_SETUPVARS_FILENAME "setup_vars_opencv-${OPENCV_VERSION}${OPENCV_SCRIPT_EXTENSION}")
|
||||
else()
|
||||
ocv_update(OPENCV_SETUPVARS_FILENAME setup_vars_opencv4${OPENCV_SCRIPT_EXTENSION})
|
||||
ocv_update(OPENCV_SETUPVARS_FILENAME setup_vars_opencv3${OPENCV_SCRIPT_EXTENSION})
|
||||
endif()
|
||||
|
||||
##### build directory
|
||||
|
||||
@@ -14,7 +14,7 @@ if(ANDROID)
|
||||
ocv_update(OPENCV_OTHER_INSTALL_PATH "sdk/etc")
|
||||
ocv_update(OPENCV_SAMPLES_SRC_INSTALL_PATH "samples/native")
|
||||
ocv_update(OPENCV_LICENSES_INSTALL_PATH "${OPENCV_OTHER_INSTALL_PATH}/licenses")
|
||||
ocv_update(OPENCV_TEST_DATA_INSTALL_PATH "${OPENCV_OTHER_INSTALL_PATH}/testdata")
|
||||
ocv_update(OPENCV_TEST_DATA_INSTALL_PATH "sdk/etc/testdata")
|
||||
ocv_update(OPENCV_DOC_INSTALL_PATH "doc")
|
||||
ocv_update(OPENCV_JAR_INSTALL_PATH ".")
|
||||
ocv_update(OPENCV_JNI_INSTALL_PATH "${OPENCV_LIB_INSTALL_PATH}")
|
||||
@@ -53,7 +53,7 @@ elseif(WIN32 AND CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
|
||||
ocv_update(OPENCV_TEST_DATA_INSTALL_PATH "testdata")
|
||||
ocv_update(OPENCV_DOC_INSTALL_PATH "doc")
|
||||
ocv_update(OPENCV_JAR_INSTALL_PATH "java")
|
||||
ocv_update(OPENCV_JNI_INSTALL_PATH "java${_jni_suffix}")
|
||||
ocv_update(OPENCV_JNI_INSTALL_PATH "${OPENCV_JAR_INSTALL_PATH}${_jni_suffix}")
|
||||
ocv_update(OPENCV_JNI_BIN_INSTALL_PATH "${OPENCV_JNI_INSTALL_PATH}")
|
||||
|
||||
else() # UNIX
|
||||
@@ -64,15 +64,15 @@ else() # UNIX
|
||||
ocv_update(OPENCV_SAMPLES_BIN_INSTALL_PATH "${OPENCV_BIN_INSTALL_PATH}")
|
||||
ocv_update(OPENCV_LIB_INSTALL_PATH "${CMAKE_INSTALL_LIBDIR}")
|
||||
ocv_update(OPENCV_LIB_ARCHIVE_INSTALL_PATH "${OPENCV_LIB_INSTALL_PATH}")
|
||||
ocv_update(OPENCV_3P_LIB_INSTALL_PATH "${OPENCV_LIB_INSTALL_PATH}/opencv4/3rdparty")
|
||||
ocv_update(OPENCV_CONFIG_INSTALL_PATH "${OPENCV_LIB_INSTALL_PATH}/cmake/opencv4")
|
||||
ocv_update(OPENCV_INCLUDE_INSTALL_PATH "${CMAKE_INSTALL_INCLUDEDIR}/opencv4")
|
||||
ocv_update(OPENCV_OTHER_INSTALL_PATH "${CMAKE_INSTALL_DATAROOTDIR}/opencv4")
|
||||
ocv_update(OPENCV_SAMPLES_SRC_INSTALL_PATH "${OPENCV_OTHER_INSTALL_PATH}/samples")
|
||||
ocv_update(OPENCV_LICENSES_INSTALL_PATH "${CMAKE_INSTALL_DATAROOTDIR}/licenses/opencv4")
|
||||
ocv_update(OPENCV_TEST_DATA_INSTALL_PATH "${OPENCV_OTHER_INSTALL_PATH}/testdata")
|
||||
ocv_update(OPENCV_DOC_INSTALL_PATH "${CMAKE_INSTALL_DATAROOTDIR}/doc/opencv4")
|
||||
ocv_update(OPENCV_JAR_INSTALL_PATH "${CMAKE_INSTALL_DATAROOTDIR}/java/opencv4")
|
||||
ocv_update(OPENCV_3P_LIB_INSTALL_PATH "share/OpenCV/3rdparty/${OPENCV_LIB_INSTALL_PATH}")
|
||||
ocv_update(OPENCV_CONFIG_INSTALL_PATH "share/OpenCV")
|
||||
ocv_update(OPENCV_INCLUDE_INSTALL_PATH "include")
|
||||
ocv_update(OPENCV_OTHER_INSTALL_PATH "share/OpenCV")
|
||||
ocv_update(OPENCV_SAMPLES_SRC_INSTALL_PATH "share/OpenCV/samples")
|
||||
ocv_update(OPENCV_LICENSES_INSTALL_PATH "${CMAKE_INSTALL_DATAROOTDIR}/licenses/opencv3")
|
||||
ocv_update(OPENCV_TEST_DATA_INSTALL_PATH "share/OpenCV/testdata")
|
||||
ocv_update(OPENCV_DOC_INSTALL_PATH "share/OpenCV/doc")
|
||||
ocv_update(OPENCV_JAR_INSTALL_PATH "share/OpenCV/java")
|
||||
ocv_update(OPENCV_JNI_INSTALL_PATH "${OPENCV_JAR_INSTALL_PATH}")
|
||||
ocv_update(OPENCV_JNI_BIN_INSTALL_PATH "${OPENCV_JNI_INSTALL_PATH}")
|
||||
|
||||
@@ -82,18 +82,18 @@ ocv_update(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${OPENCV_LIB_INSTALL_PAT
|
||||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
|
||||
if(INSTALL_TO_MANGLED_PATHS)
|
||||
set(OPENCV_INCLUDE_INSTALL_PATH ${OPENCV_INCLUDE_INSTALL_PATH}/opencv-${OPENCV_VERSION})
|
||||
foreach(v
|
||||
OPENCV_INCLUDE_INSTALL_PATH
|
||||
# file names include version (.so/.dll): OPENCV_LIB_INSTALL_PATH
|
||||
OPENCV_CONFIG_INSTALL_PATH
|
||||
OPENCV_3P_LIB_INSTALL_PATH
|
||||
OPENCV_SAMPLES_SRC_INSTALL_PATH
|
||||
OPENCV_DOC_INSTALL_PATH
|
||||
# JAR file name includes version: OPENCV_JAR_INSTALL_PATH
|
||||
OPENCV_JAR_INSTALL_PATH
|
||||
OPENCV_TEST_DATA_INSTALL_PATH
|
||||
OPENCV_OTHER_INSTALL_PATH
|
||||
)
|
||||
string(REGEX REPLACE "opencv[0-9]*" "opencv-${OPENCV_VERSION}" ${v} "${${v}}")
|
||||
string(REPLACE "OpenCV" "OpenCV-${OPENCV_VERSION}" ${v} "${${v}}")
|
||||
string(REPLACE "opencv" "opencv-${OPENCV_VERSION}" ${v} "${${v}}")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
if(NOT DEFINED MIN_VER_CMAKE)
|
||||
set(MIN_VER_CMAKE 3.5.1)
|
||||
set(MIN_VER_CMAKE 2.8.12.2)
|
||||
endif()
|
||||
set(MIN_VER_CUDA 6.5)
|
||||
set(MIN_VER_CUDNN 7.5)
|
||||
set(MIN_VER_PYTHON2 2.7)
|
||||
set(MIN_VER_PYTHON3 3.2)
|
||||
set(MIN_VER_ZLIB 1.2.3)
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
# The verbose template for OpenCV module:
|
||||
#
|
||||
# ocv_add_module(modname <dependencies>)
|
||||
# ocv_glob_module_sources(([EXCLUDE_OPENCL] [EXCLUDE_CUDA] <extra sources&headers>)
|
||||
# ocv_glob_module_sources(([EXCLUDE_CUDA] <extra sources&headers>)
|
||||
# or glob them manually and ocv_set_module_sources(...)
|
||||
# ocv_module_include_directories(<extra include directories>)
|
||||
# ocv_create_module()
|
||||
@@ -184,7 +184,6 @@ macro(ocv_add_module _name)
|
||||
# add self to the world dependencies
|
||||
if((NOT DEFINED OPENCV_MODULE_IS_PART_OF_WORLD
|
||||
AND NOT OPENCV_MODULE_${the_module}_CLASS STREQUAL "BINDINGS"
|
||||
AND (NOT DEFINED OPENCV_MODULE_${the_module}_IS_PART_OF_WORLD OR OPENCV_MODULE_${the_module}_IS_PART_OF_WORLD)
|
||||
AND (NOT OPENCV_PROCESSING_EXTRA_MODULES OR NOT OPENCV_WORLD_EXCLUDE_EXTRA_MODULES)
|
||||
AND (NOT BUILD_SHARED_LIBS OR NOT "x${OPENCV_MODULE_TYPE}" STREQUAL "xSTATIC"))
|
||||
OR OPENCV_MODULE_IS_PART_OF_WORLD
|
||||
@@ -779,7 +778,6 @@ macro(ocv_glob_module_sources)
|
||||
"${CMAKE_CURRENT_LIST_DIR}/include/opencv2/${name}/hal/*.h"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/include/opencv2/${name}/utils/*.hpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/include/opencv2/${name}/utils/*.h"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/include/opencv2/${name}/legacy/*.h"
|
||||
)
|
||||
file(GLOB lib_hdrs_detail
|
||||
"${CMAKE_CURRENT_LIST_DIR}/include/opencv2/${name}/detail/*.hpp"
|
||||
@@ -788,7 +786,6 @@ macro(ocv_glob_module_sources)
|
||||
if (APPLE)
|
||||
file(GLOB_RECURSE lib_srcs_apple
|
||||
"${CMAKE_CURRENT_LIST_DIR}/src/*.mm"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/src/*.swift"
|
||||
)
|
||||
list(APPEND lib_srcs ${lib_srcs_apple})
|
||||
endif()
|
||||
@@ -1021,8 +1018,6 @@ macro(_ocv_create_module)
|
||||
string(REGEX REPLACE "^.*opencv2/" "opencv2/" hdr2 "${hdr}")
|
||||
if(NOT hdr2 MATCHES "private" AND hdr2 MATCHES "^(opencv2/?.*)/[^/]+.h(..)?$" )
|
||||
install(FILES ${hdr} OPTIONAL DESTINATION "${OPENCV_INCLUDE_INSTALL_PATH}/${CMAKE_MATCH_1}" COMPONENT dev)
|
||||
else()
|
||||
#message("Header file will be NOT installed: ${hdr}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
@@ -1175,15 +1170,6 @@ function(ocv_add_perf_tests)
|
||||
ocv_target_link_libraries(${the_target} PRIVATE ${perf_deps} ${OPENCV_MODULE_${the_module}_DEPS} ${OPENCV_LINKER_LIBS} ${OPENCV_PERF_${the_module}_DEPS})
|
||||
add_dependencies(opencv_perf_tests ${the_target})
|
||||
|
||||
if(TARGET opencv_videoio_plugins)
|
||||
add_dependencies(${the_target} opencv_videoio_plugins)
|
||||
endif()
|
||||
|
||||
if(HAVE_HPX)
|
||||
message("Linking HPX to Perf test of module ${name}")
|
||||
ocv_target_link_libraries(${the_target} LINK_PRIVATE "${HPX_LIBRARIES}")
|
||||
endif()
|
||||
|
||||
set_target_properties(${the_target} PROPERTIES LABELS "${OPENCV_MODULE_${the_module}_LABEL};PerfTest")
|
||||
set_source_files_properties(${OPENCV_PERF_${the_module}_SOURCES} ${${the_target}_pch}
|
||||
PROPERTIES LABELS "${OPENCV_MODULE_${the_module}_LABEL};PerfTest")
|
||||
@@ -1270,15 +1256,6 @@ function(ocv_add_accuracy_tests)
|
||||
ocv_target_link_libraries(${the_target} PRIVATE ${test_deps} ${OPENCV_MODULE_${the_module}_DEPS} ${OPENCV_LINKER_LIBS} ${OPENCV_TEST_${the_module}_DEPS})
|
||||
add_dependencies(opencv_tests ${the_target})
|
||||
|
||||
if(TARGET opencv_videoio_plugins)
|
||||
add_dependencies(${the_target} opencv_videoio_plugins)
|
||||
endif()
|
||||
|
||||
if(HAVE_HPX)
|
||||
message("Linking HPX to Perf test of module ${name}")
|
||||
ocv_target_link_libraries(${the_target} LINK_PRIVATE "${HPX_LIBRARIES}")
|
||||
endif()
|
||||
|
||||
set_target_properties(${the_target} PROPERTIES LABELS "${OPENCV_MODULE_${the_module}_LABEL};AccuracyTest")
|
||||
set_source_files_properties(${OPENCV_TEST_${the_module}_SOURCES} ${${the_target}_pch}
|
||||
PROPERTIES LABELS "${OPENCV_MODULE_${the_module}_LABEL};AccuracyTest")
|
||||
@@ -1360,12 +1337,8 @@ function(ocv_add_samples)
|
||||
endif()
|
||||
add_dependencies(${parent_target} ${the_target})
|
||||
|
||||
if(TARGET opencv_videoio_plugins)
|
||||
add_dependencies(${the_target} opencv_videoio_plugins)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
install(TARGETS ${the_target} RUNTIME DESTINATION "samples/${module_id}" COMPONENT samples)
|
||||
if(INSTALL_BIN_EXAMPLES)
|
||||
install(TARGETS ${the_target} RUNTIME DESTINATION "${OPENCV_SAMPLES_BIN_INSTALL_PATH}/${module_id}" COMPONENT samples)
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
@@ -99,15 +99,10 @@ if(HAVE_CUDA)
|
||||
set(CPACK_DEB_libs_PACKAGE_DEPENDS "${CPACK_DEB_libs_PACKAGE_DEPENDS}, cuda-cufft-${cuda_version_suffix}")
|
||||
set(CPACK_DEB_dev_PACKAGE_DEPENDS "${CPACK_DEB_dev_PACKAGE_DEPENDS}, cuda-cufft-dev-${cuda_version_suffix}")
|
||||
endif()
|
||||
if(HAVE_CUBLAS)
|
||||
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()
|
||||
if(HAVE_CUDNN)
|
||||
# TODO
|
||||
#ex: libcudnn7_7.5.1.10-1+cuda10.1_amd64
|
||||
#ex: libcudnn7-dev_7.5.1.10-1+cuda10.1_amd64
|
||||
endif()
|
||||
endif()
|
||||
set(CPACK_COMPONENT_dev_DEPENDS libs)
|
||||
endif()
|
||||
@@ -123,11 +118,12 @@ endif()
|
||||
set(STD_OPENCV_LIBS opencv-data)
|
||||
set(STD_OPENCV_DEV libopencv-dev)
|
||||
|
||||
foreach(module calib3d core dnn features2d flann gapi highgui
|
||||
imgcodecs imgproc ml objdetect
|
||||
photo stitching ts video videoio)
|
||||
foreach(module calib3d core cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters
|
||||
cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping
|
||||
cudev features2d flann hal highgui imgcodecs imgproc ml objdetect ocl
|
||||
photo shape stitching superres ts video videoio videostab viz)
|
||||
if(HAVE_opencv_${module})
|
||||
list(APPEND STD_OPENCV_LIBS "libopencv-${module}4.0")
|
||||
list(APPEND STD_OPENCV_LIBS "libopencv-${module}3.0")
|
||||
list(APPEND STD_OPENCV_DEV "libopencv-${module}-dev")
|
||||
endif()
|
||||
endforeach()
|
||||
@@ -144,9 +140,9 @@ set(CPACK_COMPONENT_PYTHON_CONFLICTS python-opencv)
|
||||
set(CPACK_COMPONENT_PYTHON_PROVIDES python-opencv)
|
||||
set(CPACK_COMPONENT_PYTHON_REPLACES python-opencv)
|
||||
|
||||
set(CPACK_COMPONENT_JAVA_CONFLICTS "libopencv4.0-java, libopencv4.0-jni")
|
||||
set(CPACK_COMPONENT_JAVA_PROVIDES "libopencv4.0-java, libopencv4.0-jni")
|
||||
set(CPACK_COMPONENT_JAVA_REPLACES "libopencv4.0-java, libopencv4.0-jni")
|
||||
set(CPACK_COMPONENT_JAVA_CONFLICTS "libopencv3.0-java, libopencv3.0-jni")
|
||||
set(CPACK_COMPONENT_JAVA_PROVIDES "libopencv3.0-java, libopencv3.0-jni")
|
||||
set(CPACK_COMPONENT_JAVA_REPLACES "libopencv3.0-java, libopencv3.0-jni")
|
||||
|
||||
set(CPACK_COMPONENT_DOCS_CONFLICTS opencv-doc)
|
||||
set(CPACK_COMPONENT_SAMPLES_CONFLICTS opencv-doc)
|
||||
|
||||
@@ -1378,6 +1378,15 @@ macro(ocv_parse_header2 LIBNAME HDR_PATH VARNAME)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# TODO remove this
|
||||
# read single version info from the pkg file
|
||||
macro(ocv_parse_pkg ver_varname LIBNAME PKG_PATH)
|
||||
if(EXISTS "${PKG_PATH}/${LIBNAME}.pc")
|
||||
file(STRINGS "${PKG_PATH}/${LIBNAME}.pc" line_to_parse REGEX "^Version:[ \t]+[0-9.]*.*$" LIMIT_COUNT 1)
|
||||
STRING(REGEX REPLACE ".*Version: ([^ ]+).*" "\\1" ${ver_varname} "${line_to_parse}" )
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
################################################################################################
|
||||
# short command to setup source group
|
||||
function(ocv_source_group group)
|
||||
|
||||
@@ -8,25 +8,6 @@ if(DEFINED ANDROID_NDK_REVISION AND ANDROID_NDK_REVISION MATCHES "(1[56])([0-9]+
|
||||
set(ANDROID_NDK_REVISION "${ANDROID_NDK_REVISION}" CACHE INTERNAL "Android NDK revision")
|
||||
endif()
|
||||
|
||||
# fixup -g option: https://github.com/opencv/opencv/issues/8460#issuecomment-434249750
|
||||
if(INSTALL_CREATE_DISTRIB
|
||||
AND (NOT BUILD_WITH_DEBUG_INFO AND NOT CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||
AND NOT OPENCV_SKIP_ANDROID_G_OPTION_FIX
|
||||
)
|
||||
if(" ${CMAKE_CXX_FLAGS} " MATCHES " -g ")
|
||||
message(STATUS "Android: fixup -g compiler option from Android toolchain")
|
||||
endif()
|
||||
string(REPLACE " -g " " " CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} ")
|
||||
string(REPLACE " -g " " " CMAKE_C_FLAGS " ${CMAKE_C_FLAGS} ")
|
||||
string(REPLACE " -g " " " CMAKE_ASM_FLAGS " ${CMAKE_ASM_FLAGS} ")
|
||||
if(NOT " ${CMAKE_CXX_FLAGS_DEBUG}" MATCHES " -g")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g")
|
||||
endif()
|
||||
if(NOT " ${CMAKE_C_FLAGS_DEBUG}" MATCHES " -g")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# https://developer.android.com/studio/command-line/variables.html
|
||||
ocv_check_environment_variables(ANDROID_SDK_ROOT ANDROID_HOME ANDROID_SDK)
|
||||
|
||||
|
||||
@@ -201,8 +201,8 @@ macro(add_android_project target path)
|
||||
LIBRARY_OUTPUT_DIRECTORY "${android_proj_bin_dir}/libs/${ANDROID_NDK_ABI_NAME}"
|
||||
)
|
||||
|
||||
if(NOT BUILD_WITH_DEBUG_INFO AND NOT CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||
add_custom_command(TARGET ${JNI_LIB_NAME} POST_BUILD COMMAND ${CMAKE_STRIP} --strip-unneeded "$<TARGET_FILE:${JNI_LIB_NAME}>")
|
||||
if (NOT (CMAKE_BUILD_TYPE MATCHES "debug"))
|
||||
add_custom_command(TARGET ${JNI_LIB_NAME} POST_BUILD COMMAND ${CMAKE_STRIP} --strip-unneeded "$<TARGET_FILE:${JNI_LIB_NAME}>")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -1,163 +1,5 @@
|
||||
# https://developer.android.com/studio/releases/gradle-plugin
|
||||
set(ANDROID_GRADLE_PLUGIN_VERSION "3.2.1" CACHE STRING "Android Gradle Plugin version (3.0+)")
|
||||
message(STATUS "Android Gradle Plugin version: ${ANDROID_GRADLE_PLUGIN_VERSION}")
|
||||
|
||||
set(ANDROID_COMPILE_SDK_VERSION "26" CACHE STRING "Android compileSdkVersion")
|
||||
set(ANDROID_MIN_SDK_VERSION "21" CACHE STRING "Android minSdkVersion")
|
||||
set(ANDROID_TARGET_SDK_VERSION "26" CACHE STRING "Android minSdkVersion")
|
||||
|
||||
set(ANDROID_BUILD_BASE_DIR "${OpenCV_BINARY_DIR}/opencv_android" CACHE INTERNAL "")
|
||||
set(ANDROID_TMP_INSTALL_BASE_DIR "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/install/opencv_android")
|
||||
|
||||
set(ANDROID_INSTALL_SAMPLES_DIR "samples")
|
||||
|
||||
set(ANDROID_BUILD_ABI_FILTER "
|
||||
reset()
|
||||
include '${ANDROID_ABI}'
|
||||
message(FATAL_ERROR "
|
||||
Android gradle-based build/projects are not supported in this version of OpenCV.
|
||||
You need to downgrade Android SDK Tools to version 25.2.5.
|
||||
Details: https://github.com/opencv/opencv/issues/8460
|
||||
")
|
||||
|
||||
set(ANDROID_INSTALL_ABI_FILTER "
|
||||
//reset()
|
||||
//include 'armeabi-v7a'
|
||||
//include 'arm64-v8a'
|
||||
//include 'x86'
|
||||
//include 'x86_64'
|
||||
")
|
||||
if(NOT INSTALL_CREATE_DISTRIB)
|
||||
set(ANDROID_INSTALL_ABI_FILTER "${ANDROID_BUILD_ABI_FILTER}")
|
||||
endif()
|
||||
|
||||
# BUG: Ninja generator generates broken targets with ANDROID_ABI_FILTER name (CMake 3.11.2)
|
||||
#set(__spaces " ")
|
||||
#string(REPLACE "\n" "\n${__spaces}" ANDROID_ABI_FILTER "${__spaces}${ANDROID_BUILD_ABI_FILTER}")
|
||||
#string(REPLACE REGEX "[ ]+$" "" ANDROID_ABI_FILTER "${ANDROID_ABI_FILTER}")
|
||||
set(ANDROID_ABI_FILTER "${ANDROID_BUILD_ABI_FILTER}")
|
||||
configure_file("${OpenCV_SOURCE_DIR}/samples/android/build.gradle.in" "${ANDROID_BUILD_BASE_DIR}/build.gradle" @ONLY)
|
||||
|
||||
set(ANDROID_ABI_FILTER "${ANDROID_INSTALL_ABI_FILTER}")
|
||||
configure_file("${OpenCV_SOURCE_DIR}/samples/android/build.gradle.in" "${ANDROID_TMP_INSTALL_BASE_DIR}/${ANDROID_INSTALL_SAMPLES_DIR}/build.gradle" @ONLY)
|
||||
install(FILES "${ANDROID_TMP_INSTALL_BASE_DIR}/${ANDROID_INSTALL_SAMPLES_DIR}/build.gradle" DESTINATION "${ANDROID_INSTALL_SAMPLES_DIR}" COMPONENT samples)
|
||||
|
||||
set(GRADLE_WRAPPER_FILES
|
||||
"gradle/wrapper/gradle-wrapper.jar"
|
||||
"gradle/wrapper/gradle-wrapper.properties"
|
||||
"gradlew.bat"
|
||||
"gradlew"
|
||||
"gradle.properties"
|
||||
)
|
||||
foreach(fname ${GRADLE_WRAPPER_FILES})
|
||||
get_filename_component(__dir "${fname}" DIRECTORY)
|
||||
set(__permissions "")
|
||||
set(__permissions_prefix "")
|
||||
if(fname STREQUAL "gradlew")
|
||||
set(__permissions FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
endif()
|
||||
file(COPY "${OpenCV_SOURCE_DIR}/platforms/android/gradle-wrapper/${fname}" DESTINATION "${ANDROID_BUILD_BASE_DIR}/${__dir}" ${__permissions})
|
||||
string(REPLACE "FILE_PERMISSIONS" "PERMISSIONS" __permissions "${__permissions}")
|
||||
if("${__dir}" STREQUAL "")
|
||||
set(__dir ".")
|
||||
endif()
|
||||
install(FILES "${OpenCV_SOURCE_DIR}/platforms/android/gradle-wrapper/${fname}" DESTINATION "${ANDROID_INSTALL_SAMPLES_DIR}/${__dir}" COMPONENT samples ${__permissions})
|
||||
endforeach()
|
||||
|
||||
file(WRITE "${ANDROID_BUILD_BASE_DIR}/settings.gradle" "
|
||||
include ':opencv'
|
||||
")
|
||||
|
||||
file(WRITE "${ANDROID_TMP_INSTALL_BASE_DIR}/settings.gradle" "
|
||||
rootProject.name = 'opencv_samples'
|
||||
|
||||
def opencvsdk='../'
|
||||
//def opencvsdk='/<path to OpenCV-android-sdk>'
|
||||
//println opencvsdk
|
||||
include ':opencv'
|
||||
project(':opencv').projectDir = new File(opencvsdk + '/sdk')
|
||||
")
|
||||
|
||||
|
||||
macro(add_android_project target path)
|
||||
get_filename_component(__dir "${path}" NAME)
|
||||
|
||||
set(OPENCV_ANDROID_CMAKE_EXTRA_ARGS "")
|
||||
if(DEFINED ANDROID_TOOLCHAIN)
|
||||
set(OPENCV_ANDROID_CMAKE_EXTRA_ARGS "${OPENCV_ANDROID_CMAKE_EXTRA_ARGS},\n\"-DANDROID_TOOLCHAIN=${ANDROID_TOOLCHAIN}\"")
|
||||
endif()
|
||||
if(DEFINED ANDROID_STL)
|
||||
set(OPENCV_ANDROID_CMAKE_EXTRA_ARGS "${OPENCV_ANDROID_CMAKE_EXTRA_ARGS},\n\"-DANDROID_STL=${ANDROID_STL}\"")
|
||||
endif()
|
||||
|
||||
#
|
||||
# Build
|
||||
#
|
||||
set(ANDROID_SAMPLE_JNI_PATH "${path}/jni")
|
||||
set(ANDROID_SAMPLE_JAVA_PATH "${path}/src")
|
||||
set(ANDROID_SAMPLE_RES_PATH "${path}/res")
|
||||
set(ANDROID_SAMPLE_MANIFEST_PATH "${path}/gradle/AndroidManifest.xml")
|
||||
|
||||
set(ANDROID_ABI_FILTER "${ANDROID_BUILD_ABI_FILTER}")
|
||||
set(ANDROID_PROJECT_JNI_PATH "../../")
|
||||
|
||||
string(REPLACE ";" "', '" ANDROID_SAMPLE_JAVA_PATH "['${ANDROID_SAMPLE_JAVA_PATH}']")
|
||||
string(REPLACE ";" "', '" ANDROID_SAMPLE_RES_PATH "['${ANDROID_SAMPLE_RES_PATH}']")
|
||||
configure_file("${path}/build.gradle.in" "${ANDROID_BUILD_BASE_DIR}/${__dir}/build.gradle" @ONLY)
|
||||
|
||||
file(APPEND "${ANDROID_BUILD_BASE_DIR}/settings.gradle" "
|
||||
include ':${__dir}'
|
||||
")
|
||||
|
||||
if (BUILD_ANDROID_EXAMPLES)
|
||||
# build apk
|
||||
set(APK_FILE "${ANDROID_BUILD_BASE_DIR}/${__dir}/build/outputs/apk/release/${__dir}-${ANDROID_ABI}-release-unsigned.apk")
|
||||
ocv_update(OPENCV_GRADLE_VERBOSE_OPTIONS "-i")
|
||||
add_custom_command(
|
||||
OUTPUT "${APK_FILE}" "${OPENCV_DEPHELPER}/android_sample_${__dir}"
|
||||
COMMAND ./gradlew ${OPENCV_GRADLE_VERBOSE_OPTIONS} "${__dir}:assemble"
|
||||
COMMAND ${CMAKE_COMMAND} -E touch "${OPENCV_DEPHELPER}/android_sample_${__dir}"
|
||||
WORKING_DIRECTORY "${ANDROID_BUILD_BASE_DIR}"
|
||||
DEPENDS ${depends} opencv_java_android
|
||||
COMMENT "Building OpenCV Android sample project: ${__dir}"
|
||||
)
|
||||
else() # install only
|
||||
# copy samples
|
||||
add_custom_command(
|
||||
OUTPUT "${OPENCV_DEPHELPER}/android_sample_${__dir}"
|
||||
COMMAND ${CMAKE_COMMAND} -E touch "${OPENCV_DEPHELPER}/android_sample_${__dir}"
|
||||
WORKING_DIRECTORY "${ANDROID_BUILD_BASE_DIR}"
|
||||
DEPENDS ${depends} opencv_java_android
|
||||
COMMENT "Copying OpenCV Android sample project: ${__dir}"
|
||||
)
|
||||
endif()
|
||||
|
||||
file(REMOVE "${OPENCV_DEPHELPER}/android_sample_${__dir}") # force rebuild after CMake run
|
||||
|
||||
add_custom_target(android_sample_${__dir} ALL DEPENDS "${OPENCV_DEPHELPER}/android_sample_${__dir}" SOURCES "${ANDROID_SAMPLE_MANIFEST_PATH}")
|
||||
|
||||
#
|
||||
# Install
|
||||
#
|
||||
set(ANDROID_SAMPLE_JNI_PATH "jni")
|
||||
set(ANDROID_SAMPLE_JAVA_PATH "src")
|
||||
set(ANDROID_SAMPLE_RES_PATH "res")
|
||||
set(ANDROID_SAMPLE_MANIFEST_PATH "AndroidManifest.xml")
|
||||
|
||||
install(DIRECTORY "${path}/res" DESTINATION "${ANDROID_INSTALL_SAMPLES_DIR}/${__dir}" COMPONENT samples OPTIONAL)
|
||||
install(DIRECTORY "${path}/src" DESTINATION "${ANDROID_INSTALL_SAMPLES_DIR}/${__dir}" COMPONENT samples)
|
||||
install(DIRECTORY "${path}/jni" DESTINATION "${ANDROID_INSTALL_SAMPLES_DIR}/${__dir}" COMPONENT samples OPTIONAL)
|
||||
|
||||
install(FILES "${path}/gradle/AndroidManifest.xml" DESTINATION "${ANDROID_INSTALL_SAMPLES_DIR}/${__dir}" COMPONENT samples)
|
||||
|
||||
set(ANDROID_ABI_FILTER "${ANDROID_INSTALL_ABI_FILTER}")
|
||||
set(ANDROID_PROJECT_JNI_PATH "native/jni")
|
||||
|
||||
string(REPLACE ";" "', '" ANDROID_SAMPLE_JAVA_PATH "['${ANDROID_SAMPLE_JAVA_PATH}']")
|
||||
string(REPLACE ";" "', '" ANDROID_SAMPLE_RES_PATH "['${ANDROID_SAMPLE_RES_PATH}']")
|
||||
configure_file("${path}/build.gradle.in" "${ANDROID_TMP_INSTALL_BASE_DIR}/${__dir}/build.gradle" @ONLY)
|
||||
install(FILES "${ANDROID_TMP_INSTALL_BASE_DIR}/${__dir}/build.gradle" DESTINATION "${ANDROID_INSTALL_SAMPLES_DIR}/${__dir}" COMPONENT samples)
|
||||
|
||||
file(APPEND "${ANDROID_TMP_INSTALL_BASE_DIR}/settings.gradle" "
|
||||
include ':${__dir}'
|
||||
")
|
||||
|
||||
endmacro()
|
||||
|
||||
install(FILES "${ANDROID_TMP_INSTALL_BASE_DIR}/settings.gradle" DESTINATION "${ANDROID_INSTALL_SAMPLES_DIR}" COMPONENT samples)
|
||||
|
||||
@@ -1,25 +1,14 @@
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <list>
|
||||
|
||||
#include <stdio.h>
|
||||
int main()
|
||||
{
|
||||
std::ostringstream arch;
|
||||
std::list<std::string> archs;
|
||||
|
||||
int count = 0;
|
||||
if (cudaSuccess != cudaGetDeviceCount(&count)){ return -1; }
|
||||
if (count == 0) { return -1; }
|
||||
if (cudaSuccess != cudaGetDeviceCount(&count)){return -1;}
|
||||
if (count == 0) {return -1;}
|
||||
for (int device = 0; device < count; ++device)
|
||||
{
|
||||
cudaDeviceProp prop;
|
||||
if (cudaSuccess != cudaGetDeviceProperties(&prop, device)){ continue; }
|
||||
arch << prop.major << "." << prop.minor;
|
||||
archs.push_back(arch.str());
|
||||
arch.str("");
|
||||
if (cudaSuccess != cudaGetDeviceProperties(&prop, device)){ continue;}
|
||||
printf("%d.%d ", prop.major, prop.minor);
|
||||
}
|
||||
archs.unique(); // Some devices might have the same arch
|
||||
for (std::list<std::string>::iterator it=archs.begin(); it!=archs.end(); ++it)
|
||||
std::cout << *it << " ";
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
#include <windows.h>
|
||||
#include <vfw.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
AVIFileInit();
|
||||
AVIFileExit();
|
||||
return 0;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
#include <vtkSmartPointer.h>
|
||||
#include <vtkTransform.h>
|
||||
#include <vtkMath.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
vtkSmartPointer<vtkTransform> transform = vtkSmartPointer<vtkTransform>::New();
|
||||
return 0;
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
#include <vulkan/vulkan.h>
|
||||
|
||||
int main(int /*argc*/, char** /*argv*/)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -6,9 +6,6 @@ set(OpenCV_USE_CUBLAS "@HAVE_CUBLAS@")
|
||||
set(OpenCV_USE_CUFFT "@HAVE_CUFFT@")
|
||||
set(OpenCV_USE_NVCUVID "@HAVE_NVCUVID@")
|
||||
|
||||
set(OpenCV_CUDNN_VERSION "@CUDNN_VERSION@")
|
||||
set(OpenCV_USE_CUDNN "@HAVE_CUDNN@")
|
||||
|
||||
if(NOT CUDA_FOUND)
|
||||
find_host_package(CUDA ${OpenCV_CUDA_VERSION} EXACT REQUIRED)
|
||||
else()
|
||||
|
||||
@@ -273,32 +273,6 @@ endif()
|
||||
# ==============================================================
|
||||
set(OpenCV_LIBRARIES ${OpenCV_LIBS})
|
||||
|
||||
# Require C++11 features for OpenCV modules
|
||||
if(CMAKE_VERSION VERSION_LESS "3.1")
|
||||
if(NOT OpenCV_FIND_QUIETLY AND NOT OPENCV_HIDE_WARNING_COMPILE_FEATURES)
|
||||
message(STATUS "OpenCV: CMake version is low (${CMAKE_VERSION}, required 3.1+). Can't enable C++11 features: https://github.com/opencv/opencv/issues/13000")
|
||||
endif()
|
||||
else()
|
||||
set(__target opencv_core)
|
||||
if(TARGET opencv_world)
|
||||
set(__target opencv_world)
|
||||
endif()
|
||||
set(__compile_features cxx_std_11) # CMake 3.8+
|
||||
if(DEFINED OPENCV_COMPILE_FEATURES)
|
||||
set(__compile_features ${OPENCV_COMPILE_FEATURES}) # custom override
|
||||
elseif(CMAKE_VERSION VERSION_LESS "3.8")
|
||||
set(__compile_features cxx_auto_type cxx_rvalue_references cxx_lambdas)
|
||||
endif()
|
||||
if(__compile_features)
|
||||
# Simulate exported result of target_compile_features(opencv_core PUBLIC ...)
|
||||
set_target_properties(${__target} PROPERTIES
|
||||
INTERFACE_COMPILE_FEATURES "${__compile_features}"
|
||||
)
|
||||
endif()
|
||||
unset(__target)
|
||||
unset(__compile_features)
|
||||
endif()
|
||||
|
||||
#
|
||||
# Some macros for samples
|
||||
#
|
||||
|
||||
@@ -19,6 +19,18 @@
|
||||
/* Compile for 'virtual' NVIDIA PTX architectures */
|
||||
#define CUDA_ARCH_PTX "${OPENCV_CUDA_ARCH_PTX}"
|
||||
|
||||
/* AVFoundation video libraries */
|
||||
#cmakedefine HAVE_AVFOUNDATION
|
||||
|
||||
/* V4L capturing support */
|
||||
#cmakedefine HAVE_CAMV4L
|
||||
|
||||
/* V4L2 capturing support */
|
||||
#cmakedefine HAVE_CAMV4L2
|
||||
|
||||
/* Carbon windowing environment */
|
||||
#cmakedefine HAVE_CARBON
|
||||
|
||||
/* AMD's Basic Linear Algebra Subprograms Library*/
|
||||
#cmakedefine HAVE_CLAMDBLAS
|
||||
|
||||
@@ -31,18 +43,24 @@
|
||||
/* Cocoa API */
|
||||
#cmakedefine HAVE_COCOA
|
||||
|
||||
/* NVIDIA CUDA Runtime API*/
|
||||
#cmakedefine HAVE_CUDA
|
||||
/* C= */
|
||||
#cmakedefine HAVE_CSTRIPES
|
||||
|
||||
/* NVIDIA CUDA Basic Linear Algebra Subprograms (BLAS) API*/
|
||||
#cmakedefine HAVE_CUBLAS
|
||||
|
||||
/* NVIDIA CUDA Deep Neural Network (cuDNN) API*/
|
||||
#cmakedefine HAVE_CUDNN
|
||||
/* NVIDIA CUDA Runtime API*/
|
||||
#cmakedefine HAVE_CUDA
|
||||
|
||||
/* NVIDIA CUDA Fast Fourier Transform (FFT) API*/
|
||||
#cmakedefine HAVE_CUFFT
|
||||
|
||||
/* IEEE1394 capturing support */
|
||||
#cmakedefine HAVE_DC1394
|
||||
|
||||
/* IEEE1394 capturing support - libdc1394 v2.x */
|
||||
#cmakedefine HAVE_DC1394_2
|
||||
|
||||
/* DirectX */
|
||||
#cmakedefine HAVE_DIRECTX
|
||||
#cmakedefine HAVE_DIRECTX_NV12
|
||||
@@ -50,12 +68,21 @@
|
||||
#cmakedefine HAVE_D3D10
|
||||
#cmakedefine HAVE_D3D9
|
||||
|
||||
/* DirectShow Video Capture library */
|
||||
#cmakedefine HAVE_DSHOW
|
||||
|
||||
/* Eigen Matrix & Linear Algebra Library */
|
||||
#cmakedefine HAVE_EIGEN
|
||||
|
||||
/* FFMpeg video library */
|
||||
#cmakedefine HAVE_FFMPEG
|
||||
|
||||
/* Geospatial Data Abstraction Library */
|
||||
#cmakedefine HAVE_GDAL
|
||||
|
||||
/* GStreamer multimedia framework */
|
||||
#cmakedefine HAVE_GSTREAMER
|
||||
|
||||
/* GTK+ 2.0 Thread support */
|
||||
#cmakedefine HAVE_GTHREAD
|
||||
|
||||
@@ -65,12 +92,12 @@
|
||||
/* Halide support */
|
||||
#cmakedefine HAVE_HALIDE
|
||||
|
||||
/* Vulkan support */
|
||||
#cmakedefine HAVE_VULKAN
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#cmakedefine HAVE_INTTYPES_H 1
|
||||
|
||||
/* Intel Perceptual Computing SDK library */
|
||||
#cmakedefine HAVE_INTELPERC
|
||||
|
||||
/* Intel Integrated Performance Primitives */
|
||||
#cmakedefine HAVE_IPP
|
||||
#cmakedefine HAVE_IPP_ICV
|
||||
@@ -78,7 +105,6 @@
|
||||
#cmakedefine HAVE_IPP_IW_LL
|
||||
|
||||
/* JPEG-2000 codec */
|
||||
#cmakedefine HAVE_OPENJPEG
|
||||
#cmakedefine HAVE_JASPER
|
||||
|
||||
/* IJG JPEG codec */
|
||||
@@ -90,6 +116,12 @@
|
||||
/* GDCM DICOM codec */
|
||||
#cmakedefine HAVE_GDCM
|
||||
|
||||
/* V4L/V4L2 capturing support via libv4l */
|
||||
#cmakedefine HAVE_LIBV4L
|
||||
|
||||
/* Microsoft Media Foundation Capture library */
|
||||
#cmakedefine HAVE_MSMF
|
||||
|
||||
/* NVIDIA Video Decoding API*/
|
||||
#cmakedefine HAVE_NVCUVID
|
||||
#cmakedefine HAVE_NVCUVID_HEADER
|
||||
@@ -112,6 +144,12 @@
|
||||
/* OpenGL support*/
|
||||
#cmakedefine HAVE_OPENGL
|
||||
|
||||
/* OpenNI library */
|
||||
#cmakedefine HAVE_OPENNI
|
||||
|
||||
/* OpenNI library */
|
||||
#cmakedefine HAVE_OPENNI2
|
||||
|
||||
/* PNG codec */
|
||||
#cmakedefine HAVE_PNG
|
||||
|
||||
@@ -127,28 +165,52 @@
|
||||
/* Qt OpenGL support */
|
||||
#cmakedefine HAVE_QT_OPENGL
|
||||
|
||||
/* QuickTime video libraries */
|
||||
#cmakedefine HAVE_QUICKTIME
|
||||
|
||||
/* QTKit video libraries */
|
||||
#cmakedefine HAVE_QTKIT
|
||||
|
||||
/* Intel Threading Building Blocks */
|
||||
#cmakedefine HAVE_TBB
|
||||
|
||||
/* Ste||ar Group High Performance ParallelX */
|
||||
#cmakedefine HAVE_HPX
|
||||
|
||||
/* TIFF codec */
|
||||
#cmakedefine HAVE_TIFF
|
||||
|
||||
/* Unicap video capture library */
|
||||
#cmakedefine HAVE_UNICAP
|
||||
|
||||
/* Video for Windows support */
|
||||
#cmakedefine HAVE_VFW
|
||||
|
||||
/* V4L2 capturing support in videoio.h */
|
||||
#cmakedefine HAVE_VIDEOIO
|
||||
|
||||
/* Win32 UI */
|
||||
#cmakedefine HAVE_WIN32UI
|
||||
|
||||
/* XIMEA camera support */
|
||||
#cmakedefine HAVE_XIMEA
|
||||
|
||||
/* Xine video library */
|
||||
#cmakedefine HAVE_XINE
|
||||
|
||||
/* Define if your processor stores words with the most significant byte
|
||||
first (like Motorola and SPARC, unlike Intel and VAX). */
|
||||
#cmakedefine WORDS_BIGENDIAN
|
||||
|
||||
/* gPhoto2 library */
|
||||
#cmakedefine HAVE_GPHOTO2
|
||||
|
||||
/* VA library (libva) */
|
||||
#cmakedefine HAVE_VA
|
||||
|
||||
/* Intel VA-API/OpenCL */
|
||||
#cmakedefine HAVE_VA_INTEL
|
||||
|
||||
/* Intel Media SDK */
|
||||
#cmakedefine HAVE_MFX
|
||||
|
||||
/* Lapack */
|
||||
#cmakedefine HAVE_LAPACK
|
||||
|
||||
@@ -158,6 +220,27 @@
|
||||
/* OpenVX */
|
||||
#cmakedefine HAVE_OPENVX
|
||||
|
||||
#if defined(HAVE_XINE) || \
|
||||
defined(HAVE_GSTREAMER) || \
|
||||
defined(HAVE_QUICKTIME) || \
|
||||
defined(HAVE_QTKIT) || \
|
||||
defined(HAVE_AVFOUNDATION) || \
|
||||
/*defined(HAVE_OPENNI) || too specialized */ \
|
||||
defined(HAVE_FFMPEG) || \
|
||||
defined(HAVE_MSMF)
|
||||
#define HAVE_VIDEO_INPUT
|
||||
#endif
|
||||
|
||||
#if /*defined(HAVE_XINE) || */\
|
||||
defined(HAVE_GSTREAMER) || \
|
||||
defined(HAVE_QUICKTIME) || \
|
||||
defined(HAVE_QTKIT) || \
|
||||
defined(HAVE_AVFOUNDATION) || \
|
||||
defined(HAVE_FFMPEG) || \
|
||||
defined(HAVE_MSMF)
|
||||
#define HAVE_VIDEO_OUTPUT
|
||||
#endif
|
||||
|
||||
/* OpenCV trace utilities */
|
||||
#cmakedefine OPENCV_TRACE
|
||||
|
||||
|
||||
@@ -3,11 +3,12 @@
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
includedir_old=@includedir@/opencv
|
||||
includedir_new=@includedir@
|
||||
|
||||
Name: OpenCV
|
||||
Description: Open Source Computer Vision Library
|
||||
Version: @OPENCV_VERSION_PLAIN@
|
||||
Libs: @OPENCV_PC_LIBS@
|
||||
Libs.private: @OPENCV_PC_LIBS_PRIVATE@
|
||||
Cflags: -I${includedir}
|
||||
Cflags: -I${includedir_old} -I${includedir_new}
|
||||
|
||||
@@ -30,9 +30,7 @@
|
||||
opencv/cxeigen.hpp
|
||||
opencv2/core/eigen.hpp
|
||||
opencv2/flann/hdf5.h
|
||||
opencv2/imgcodecs/imgcodecs_c.h
|
||||
opencv2/imgcodecs/ios.h
|
||||
opencv2/videoio/videoio_c.h
|
||||
opencv2/videoio/cap_ios.h
|
||||
opencv2/xobjdetect/private.hpp
|
||||
@OPENCV_ABI_SKIP_HEADERS@
|
||||
@@ -43,7 +41,6 @@
|
||||
</skip_libs>
|
||||
|
||||
<gcc_options>
|
||||
-std=c++11
|
||||
@OPENCV_ABI_GCC_OPTIONS@
|
||||
</gcc_options>
|
||||
|
||||
|
||||
@@ -19,12 +19,6 @@ if(DOXYGEN_FOUND)
|
||||
unset(CMAKE_DOXYGEN_TUTORIAL_CONTRIB_ROOT)
|
||||
unset(CMAKE_DOXYGEN_TUTORIAL_JS_ROOT)
|
||||
|
||||
set(OPENCV_DOCS_EXCLUDE_CUDA ON)
|
||||
if(";${OPENCV_MODULES_EXTRA};" MATCHES ";cudev;")
|
||||
set(OPENCV_DOCS_EXCLUDE_CUDA OFF)
|
||||
list(APPEND CMAKE_DOXYGEN_ENABLED_SECTIONS "CUDA_MODULES")
|
||||
endif()
|
||||
|
||||
# gathering headers
|
||||
set(paths_include)
|
||||
set(paths_doc)
|
||||
@@ -53,15 +47,6 @@ if(DOXYGEN_FOUND)
|
||||
if(EXISTS "${header_dir}")
|
||||
list(APPEND paths_include "${header_dir}")
|
||||
list(APPEND deps ${header_dir})
|
||||
if(OPENCV_DOCS_EXCLUDE_CUDA)
|
||||
if(EXISTS "${OPENCV_MODULE_opencv_${m}_LOCATION}/include/opencv2/${m}/cuda")
|
||||
list(APPEND CMAKE_DOXYGEN_EXCLUDE_LIST "${OPENCV_MODULE_opencv_${m}_LOCATION}/include/opencv2/${m}/cuda")
|
||||
endif()
|
||||
file(GLOB list_cuda_files "${OPENCV_MODULE_opencv_${m}_LOCATION}/include/opencv2/${m}/*cuda*.hpp")
|
||||
if(list_cuda_files)
|
||||
list(APPEND CMAKE_DOXYGEN_EXCLUDE_LIST ${list_cuda_files})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
# doc folder
|
||||
set(docs_dir "${OPENCV_MODULE_opencv_${m}_LOCATION}/doc")
|
||||
|
||||
@@ -106,7 +106,7 @@ FILE_PATTERNS =
|
||||
RECURSIVE = YES
|
||||
EXCLUDE = @CMAKE_DOXYGEN_EXCLUDE_LIST@
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXCLUDE_PATTERNS = *.inl.hpp *.impl.hpp *_detail.hpp */cudev/**/detail/*.hpp *.m */opencl/runtime/* */legacy/* *_c.h @DOXYGEN_EXCLUDE_PATTERNS@
|
||||
EXCLUDE_PATTERNS = *.inl.hpp *.impl.hpp *_detail.hpp */cudev/**/detail/*.hpp *.m */opencl/runtime/*
|
||||
EXCLUDE_SYMBOLS = cv::DataType<*> cv::traits::* int void CV__* T __CV*
|
||||
EXAMPLE_PATH = @CMAKE_DOXYGEN_EXAMPLE_PATH@
|
||||
EXAMPLE_PATTERNS = *
|
||||
@@ -234,17 +234,12 @@ PREDEFINED = __cplusplus=1 \
|
||||
CV_EXPORTS_W_SIMPLE= \
|
||||
CV_EXPORTS_AS(x)= \
|
||||
CV_EXPORTS_W_MAP= \
|
||||
GAPI_EXPORTS= \
|
||||
GAPI_EXPORTS_W= \
|
||||
CV_IN_OUT= \
|
||||
CV_OUT= \
|
||||
CV_PROP= \
|
||||
CV_PROP_RW= \
|
||||
CV_WRAP= \
|
||||
CV_WRAP_AS(x)= \
|
||||
CV_WRAP_MAPPABLE(x)= \
|
||||
CV_WRAP_PHANTOM(x)= \
|
||||
CV_WRAP_DEFAULT(x)= \
|
||||
CV_CDECL= \
|
||||
CV_Func= \
|
||||
CV_DO_PRAGMA(x)= \
|
||||
|
||||
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 5.2 KiB |
@@ -9,6 +9,9 @@ MathJax.Hub.Config(
|
||||
forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
|
||||
vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
|
||||
vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
|
||||
cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
|
||||
distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
|
||||
distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
|
||||
hdotsfor: ["\\dots", 1],
|
||||
mathbbm: ["\\mathbb{#1}", 1],
|
||||
bordermatrix: ["\\matrix{#1}", 1]
|
||||
|
||||
@@ -51,3 +51,20 @@
|
||||
#7 & #8 & #9
|
||||
\end{bmatrix}
|
||||
}
|
||||
|
||||
\newcommand{\cameramatrix}[1]{
|
||||
#1 =
|
||||
\begin{bmatrix}
|
||||
f_x & 0 & c_x\\
|
||||
0 & f_y & c_y\\
|
||||
0 & 0 & 1
|
||||
\end{bmatrix}
|
||||
}
|
||||
|
||||
\newcommand{\distcoeffs}[]{
|
||||
(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \tau_x, \tau_y]]]]) \text{ of 4, 5, 8, 12 or 14 elements}
|
||||
}
|
||||
|
||||
\newcommand{\distcoeffsfisheye}[]{
|
||||
(k_1, k_2, k_3, k_4)
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 9.5 KiB |
@@ -0,0 +1,9 @@
|
||||
OpenCV logo has been originally designed and contributed to OpenCV by Adi Shavit in 2006. The graphical part consists of three stylized letters O, C, V, colored in the primary R, G, B color components, used by humans and computers to perceive the world. It is shaped in a way to mimic the famous [Kanizsa's triangle](https://en.wikipedia.org/wiki/Illusory_contours) to emphasize that the prior knowledge and internal processing are at least as important as the actually acquired "raw" data.
|
||||
|
||||
The restyled version of the logo has been designed and contributed by [xperience.ai](https://xperience.ai/) in July 2020 for the [20th anniversary](https://opencv.org/anniversary/) of OpenCV.
|
||||
|
||||
The logo uses [Exo 2](https://fonts.google.com/specimen/Exo+2#about) font by Natanael Gama distributed under OFL license.
|
||||
|
||||
Higher-resolution version of the logo, as well as SVG version of it, can be obtained at OpenCV [Media Kit](https://opencv.org/resources/media-kit/).
|
||||
|
||||

|
||||
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 42 KiB |
@@ -584,6 +584,16 @@
|
||||
pages = {1033--1040},
|
||||
publisher = {IEEE}
|
||||
}
|
||||
@article{YM11,
|
||||
author = {Yu, Guoshen and Morel, Jean-Michel},
|
||||
title = {ASIFT: An Algorithm for Fully Affine Invariant Comparison},
|
||||
year = {2011},
|
||||
pages = {11--38},
|
||||
journal = {Image Processing On Line},
|
||||
volume = {1},
|
||||
doi = {10.5201/ipol.2011.my-asift},
|
||||
url = {http://www.ipol.im/pub/algo/my_affine_sift/}
|
||||
}
|
||||
@inproceedings{LCS11,
|
||||
author = {Leutenegger, Stefan and Chli, Margarita and Siegwart, Roland Yves},
|
||||
title = {BRISK: Binary robust invariant scalable keypoints},
|
||||
@@ -1215,3 +1225,23 @@
|
||||
year = {1996},
|
||||
publisher = {Elsevier}
|
||||
}
|
||||
@Article{Wu2009,
|
||||
author={Wu, Kesheng
|
||||
and Otoo, Ekow
|
||||
and Suzuki, Kenji},
|
||||
title={Optimizing two-pass connected-component labeling algorithms},
|
||||
journal={Pattern Analysis and Applications},
|
||||
year={2009},
|
||||
month={Jun},
|
||||
day={01},
|
||||
volume={12},
|
||||
number={2},
|
||||
pages={117-135},
|
||||
}
|
||||
@inproceedings{forstner1987fast,
|
||||
title={A fast operator for detection and precise location of distincs points, corners and center of circular features},
|
||||
author={FORSTNER, W},
|
||||
booktitle={Proc. of the Intercommission Conference on Fast Processing of Photogrammetric Data, Interlaken, Switzerland, 1987},
|
||||
pages={281--305},
|
||||
year={1987}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.2 KiB |
@@ -36,18 +36,27 @@ class PatternMaker:
|
||||
def make_circles_pattern(self):
|
||||
spacing = self.square_size
|
||||
r = spacing / self.radius_rate
|
||||
for x in range(1, self.cols + 1):
|
||||
for y in range(1, self.rows + 1):
|
||||
dot = SVG("circle", cx=x * spacing, cy=y * spacing, r=r, fill="black", stroke="none")
|
||||
pattern_width = ((self.cols - 1.0) * spacing) + (2.0 * r)
|
||||
pattern_height = ((self.rows - 1.0) * spacing) + (2.0 * r)
|
||||
x_spacing = (self.width - pattern_width) / 2.0
|
||||
y_spacing = (self.height - pattern_height) / 2.0
|
||||
for x in range(0, self.cols):
|
||||
for y in range(0, self.rows):
|
||||
dot = SVG("circle", cx=(x * spacing) + x_spacing + r,
|
||||
cy=(y * spacing) + y_spacing + r, r=r, fill="black", stroke="none")
|
||||
self.g.append(dot)
|
||||
|
||||
def make_acircles_pattern(self):
|
||||
spacing = self.square_size
|
||||
r = spacing / self.radius_rate
|
||||
for i in range(0, self.rows):
|
||||
for j in range(0, self.cols):
|
||||
dot = SVG("circle", cx=((j * 2 + i % 2) * spacing) + spacing, cy=self.height - (i * spacing + spacing),
|
||||
r=r, fill="black", stroke="none")
|
||||
pattern_width = ((self.cols-1.0) * 2 * spacing) + spacing + (2.0 * r)
|
||||
pattern_height = ((self.rows-1.0) * spacing) + (2.0 * r)
|
||||
x_spacing = (self.width - pattern_width) / 2.0
|
||||
y_spacing = (self.height - pattern_height) / 2.0
|
||||
for x in range(0, self.cols):
|
||||
for y in range(0, self.rows):
|
||||
dot = SVG("circle", cx=(2 * x * spacing) + (y % 2)*spacing + x_spacing + r,
|
||||
cy=(y * spacing) + y_spacing + r, r=r, fill="black", stroke="none")
|
||||
self.g.append(dot)
|
||||
|
||||
def make_checkerboard_pattern(self):
|
||||
@@ -84,9 +93,9 @@ def main():
|
||||
parser.add_argument("-R", "--radius_rate", help="circles_radius = square_size/radius_rate", default="5.0",
|
||||
action="store", dest="radius_rate", type=float)
|
||||
parser.add_argument("-w", "--page_width", help="page width in units", default="216", action="store",
|
||||
dest="page_width", type=int)
|
||||
dest="page_width", type=float)
|
||||
parser.add_argument("-h", "--page_height", help="page height in units", default="279", action="store",
|
||||
dest="page_width", type=int)
|
||||
dest="page_width", type=float)
|
||||
parser.add_argument("-a", "--page_size", help="page size, supersedes -h -w arguments", default="A4", action="store",
|
||||
dest="page_size", choices=["A0", "A1", "A2", "A3", "A4", "A5"])
|
||||
args = parser.parse_args()
|
||||
|
||||
@@ -20,20 +20,20 @@ A simple example on extending C++ functions to Python can be found in official P
|
||||
documentation[1]. So extending all functions in OpenCV to Python by writing their wrapper functions
|
||||
manually is a time-consuming task. So OpenCV does it in a more intelligent way. OpenCV generates
|
||||
these wrapper functions automatically from the C++ headers using some Python scripts which are
|
||||
located in `modules/python/src2`. We will look into what they do.
|
||||
located in modules/python/src2. We will look into what they do.
|
||||
|
||||
First, `modules/python/CMakeFiles.txt` is a CMake script which checks the modules to be extended to
|
||||
First, modules/python/CMakeFiles.txt is a CMake script which checks the modules to be extended to
|
||||
Python. It will automatically check all the modules to be extended and grab their header files.
|
||||
These header files contain list of all classes, functions, constants etc. for that particular
|
||||
modules.
|
||||
|
||||
Second, these header files are passed to a Python script, `modules/python/src2/gen2.py`. This is the
|
||||
Python bindings generator script. It calls another Python script `modules/python/src2/hdr_parser.py`.
|
||||
Second, these header files are passed to a Python script, modules/python/src2/gen2.py. This is the
|
||||
Python bindings generator script. It calls another Python script modules/python/src2/hdr_parser.py.
|
||||
This is the header parser script. This header parser splits the complete header file into small
|
||||
Python lists. So these lists contain all details about a particular function, class etc. For
|
||||
example, a function will be parsed to get a list containing function name, return type, input
|
||||
arguments, argument types etc. Final list contains details of all the functions, enums, structs,
|
||||
classes etc. in that header file.
|
||||
arguments, argument types etc. Final list contains details of all the functions, structs, classes
|
||||
etc. in that header file.
|
||||
|
||||
But header parser doesn't parse all the functions/classes in the header file. The developer has to
|
||||
specify which functions should be exported to Python. For that, there are certain macros added to
|
||||
@@ -44,15 +44,15 @@ macros will be given in next session.
|
||||
|
||||
So header parser returns a final big list of parsed functions. Our generator script (gen2.py) will
|
||||
create wrapper functions for all the functions/classes/enums/structs parsed by header parser (You
|
||||
can find these header files during compilation in the `build/modules/python/` folder as
|
||||
can find these header files during compilation in the build/modules/python/ folder as
|
||||
pyopencv_generated_\*.h files). But there may be some basic OpenCV datatypes like Mat, Vec4i,
|
||||
Size. They need to be extended manually. For example, a Mat type should be extended to Numpy array,
|
||||
Size should be extended to a tuple of two integers etc. Similarly, there may be some complex
|
||||
structs/classes/functions etc. which need to be extended manually. All such manual wrapper functions
|
||||
are placed in `modules/python/src2/cv2.cpp`.
|
||||
are placed in modules/python/src2/cv2.cpp.
|
||||
|
||||
So now only thing left is the compilation of these wrapper files which gives us **cv2** module. So
|
||||
when you call a function, say `res = equalizeHist(img1,img2)` in Python, you pass two numpy arrays and
|
||||
when you call a function, say res = equalizeHist(img1,img2) in Python, you pass two numpy arrays and
|
||||
you expect another numpy array as the output. So these numpy arrays are converted to cv::Mat and
|
||||
then calls the equalizeHist() function in C++. Final result, res will be converted back into a Numpy
|
||||
array. So in short, almost all operations are done in C++ which gives us almost same speed as that
|
||||
@@ -67,19 +67,19 @@ Header parser parse the header files based on some wrapper macros added to funct
|
||||
Enumeration constants don't need any wrapper macros. They are automatically wrapped. But remaining
|
||||
functions, classes etc. need wrapper macros.
|
||||
|
||||
Functions are extended using `CV_EXPORTS_W` macro. An example is shown below.
|
||||
Functions are extended using CV_EXPORTS_W macro. An example is shown below.
|
||||
@code{.cpp}
|
||||
CV_EXPORTS_W void equalizeHist( InputArray src, OutputArray dst );
|
||||
@endcode
|
||||
Header parser can understand the input and output arguments from keywords like
|
||||
InputArray, OutputArray etc. But sometimes, we may need to hardcode inputs and outputs. For that,
|
||||
macros like `CV_OUT`, `CV_IN_OUT` etc. are used.
|
||||
macros like CV_OUT, CV_IN_OUT etc. are used.
|
||||
@code{.cpp}
|
||||
CV_EXPORTS_W void minEnclosingCircle( InputArray points,
|
||||
CV_OUT Point2f& center, CV_OUT float& radius );
|
||||
@endcode
|
||||
For large classes also, `CV_EXPORTS_W` is used. To extend class methods, `CV_WRAP` is used.
|
||||
Similarly, `CV_PROP` is used for class fields.
|
||||
For large classes also, CV_EXPORTS_W is used. To extend class methods, CV_WRAP is used.
|
||||
Similarly, CV_PROP is used for class fields.
|
||||
@code{.cpp}
|
||||
class CV_EXPORTS_W CLAHE : public Algorithm
|
||||
{
|
||||
@@ -90,9 +90,9 @@ public:
|
||||
CV_WRAP virtual double getClipLimit() const = 0;
|
||||
}
|
||||
@endcode
|
||||
Overloaded functions can be extended using `CV_EXPORTS_AS`. But we need to pass a new name so that
|
||||
Overloaded functions can be extended using CV_EXPORTS_AS. But we need to pass a new name so that
|
||||
each function will be called by that name in Python. Take the case of integral function below. Three
|
||||
functions are available, so each one is named with a suffix in Python. Similarly `CV_WRAP_AS` can be
|
||||
functions are available, so each one is named with a suffix in Python. Similarly CV_WRAP_AS can be
|
||||
used to wrap overloaded methods.
|
||||
@code{.cpp}
|
||||
//! computes the integral image
|
||||
@@ -107,9 +107,9 @@ CV_EXPORTS_AS(integral3) void integral( InputArray src, OutputArray sum,
|
||||
OutputArray sqsum, OutputArray tilted,
|
||||
int sdepth = -1, int sqdepth = -1 );
|
||||
@endcode
|
||||
Small classes/structs are extended using `CV_EXPORTS_W_SIMPLE`. These structs are passed by value
|
||||
to C++ functions. Examples are `KeyPoint`, `Match` etc. Their methods are extended by `CV_WRAP` and
|
||||
fields are extended by `CV_PROP_RW`.
|
||||
Small classes/structs are extended using CV_EXPORTS_W_SIMPLE. These structs are passed by value
|
||||
to C++ functions. Examples are KeyPoint, Match etc. Their methods are extended by CV_WRAP and
|
||||
fields are extended by CV_PROP_RW.
|
||||
@code{.cpp}
|
||||
class CV_EXPORTS_W_SIMPLE DMatch
|
||||
{
|
||||
@@ -125,8 +125,8 @@ public:
|
||||
CV_PROP_RW float distance;
|
||||
};
|
||||
@endcode
|
||||
Some other small classes/structs can be exported using `CV_EXPORTS_W_MAP` where it is exported to a
|
||||
Python native dictionary. `Moments()` is an example of it.
|
||||
Some other small classes/structs can be exported using CV_EXPORTS_W_MAP where it is exported to a
|
||||
Python native dictionary. Moments() is an example of it.
|
||||
@code{.cpp}
|
||||
class CV_EXPORTS_W_MAP Moments
|
||||
{
|
||||
@@ -142,41 +142,6 @@ public:
|
||||
So these are the major extension macros available in OpenCV. Typically, a developer has to put
|
||||
proper macros in their appropriate positions. Rest is done by generator scripts. Sometimes, there
|
||||
may be an exceptional cases where generator scripts cannot create the wrappers. Such functions need
|
||||
to be handled manually, to do this write your own `pyopencv_*.hpp` extending headers and put them into
|
||||
to be handled manually, to do this write your own pyopencv_*.hpp extending headers and put them into
|
||||
misc/python subdirectory of your module. But most of the time, a code written according to OpenCV
|
||||
coding guidelines will be automatically wrapped by generator scripts.
|
||||
|
||||
More advanced cases involves providing Python with additional features that does not exist
|
||||
in the C++ interface such as extra methods, type mappings, or to provide default arguments.
|
||||
We will take `UMat` datatype as an example of such cases later on.
|
||||
First, to provide Python-specific methods, `CV_WRAP_PHANTOM` is utilized in a similar manner to
|
||||
`CV_WRAP`, except that it takes the method header as its argument, and you would need to provide
|
||||
the method body in your own `pyopencv_*.hpp` extension. `UMat::queue()` and `UMat::context()` are
|
||||
an example of such phantom methods that does not exist in C++ interface, but are needed to handle
|
||||
OpenCL functionalities at the Python side.
|
||||
Second, if an already-existing datatype(s) is mappable to your class, it is highly preferable to
|
||||
indicate such capacity using `CV_WRAP_MAPPABLE` with the source type as its argument,
|
||||
rather than crafting your own binding function(s). This is the case of `UMat` which maps from `Mat`.
|
||||
Finally, if a default argument is needed, but it is not provided in the native C++ interface,
|
||||
you can provide it for Python side as the argument of `CV_WRAP_DEFAULT`. As per the `UMat::getMat`
|
||||
example below:
|
||||
@code{.cpp}
|
||||
class CV_EXPORTS_W UMat
|
||||
{
|
||||
public:
|
||||
//! Mat is mappable to UMat.
|
||||
// You would need to provide `static bool cv_mappable_to(const Ptr<Mat>& src, Ptr<UMat>& dst)`
|
||||
CV_WRAP_MAPPABLE(Ptr<Mat>);
|
||||
|
||||
/! returns the OpenCL queue used by OpenCV UMat.
|
||||
// You would need to provide the method body in the binder code
|
||||
CV_WRAP_PHANTOM(static void* queue());
|
||||
|
||||
//! returns the OpenCL context used by OpenCV UMat
|
||||
// You would need to provide the method body in the binder code
|
||||
CV_WRAP_PHANTOM(static void* context());
|
||||
|
||||
//! The wrapped method become equivalent to `get(int flags = ACCESS_RW)`
|
||||
CV_WRAP_AS(get) Mat getMat(int flags CV_WRAP_DEFAULT(ACCESS_RW)) const;
|
||||
};
|
||||
@endcode
|
||||
coding guidelines will be automatically wrapped by generator scripts.
|
||||
@@ -23,7 +23,7 @@ import cv2 as cv
|
||||
|
||||
img = cv.imread('star.jpg',0)
|
||||
ret,thresh = cv.threshold(img,127,255,0)
|
||||
contours,hierarchy = cv.findContours(thresh, 1, 2)
|
||||
im2,contours,hierarchy = cv.findContours(thresh, 1, 2)
|
||||
|
||||
cnt = contours[0]
|
||||
M = cv.moments(cnt)
|
||||
|
||||
@@ -78,7 +78,7 @@ pixelpoints = np.transpose(np.nonzero(mask))
|
||||
Here, two methods, one using Numpy functions, next one using OpenCV function (last commented line)
|
||||
are given to do the same. Results are also same, but with a slight difference. Numpy gives
|
||||
coordinates in **(row, column)** format, while OpenCV gives coordinates in **(x,y)** format. So
|
||||
basically the answers will be interchanged. Note that, **row = x** and **column = y**.
|
||||
basically the answers will be interchanged. Note that, **row = y** and **column = x**.
|
||||
|
||||
7. Maximum Value, Minimum Value and their locations
|
||||
---------------------------------------------------
|
||||
|
||||
@@ -17,7 +17,7 @@ detection and recognition.
|
||||
|
||||
- For better accuracy, use binary images. So before finding contours, apply threshold or canny
|
||||
edge detection.
|
||||
- Since OpenCV 3.2, findContours() no longer modifies the source image.
|
||||
- Since OpenCV 3.2, findContours() no longer modifies the source image but returns a modified image as the first of three return parameters.
|
||||
- In OpenCV, finding contours is like finding white object from black background. So remember,
|
||||
object to be found should be white and background should be black.
|
||||
|
||||
@@ -29,11 +29,11 @@ import cv2 as cv
|
||||
im = cv.imread('test.jpg')
|
||||
imgray = cv.cvtColor(im, cv.COLOR_BGR2GRAY)
|
||||
ret, thresh = cv.threshold(imgray, 127, 255, 0)
|
||||
contours, hierarchy = cv.findContours(thresh, cv.RETR_TREE, cv.CHAIN_APPROX_SIMPLE)
|
||||
im2, contours, hierarchy = cv.findContours(thresh, cv.RETR_TREE, cv.CHAIN_APPROX_SIMPLE)
|
||||
@endcode
|
||||
See, there are three arguments in **cv.findContours()** function, first one is source image, second
|
||||
is contour retrieval mode, third is contour approximation method. And it outputs the contours and hierarchy.
|
||||
Contours is a Python list of all the contours in the image. Each individual contour is a
|
||||
is contour retrieval mode, third is contour approximation method. And it outputs a modified image, the contours and
|
||||
hierarchy. contours is a Python list of all the contours in the image. Each individual contour is a
|
||||
Numpy array of (x,y) coordinates of boundary points of the object.
|
||||
|
||||
@note We will discuss second and third arguments and about hierarchy in details later. Until then,
|
||||
|
||||
@@ -39,7 +39,7 @@ import numpy as np
|
||||
img = cv.imread('star.jpg')
|
||||
img_gray = cv.cvtColor(img,cv.COLOR_BGR2GRAY)
|
||||
ret,thresh = cv.threshold(img_gray, 127, 255,0)
|
||||
contours,hierarchy = cv.findContours(thresh,2,1)
|
||||
im2,contours,hierarchy = cv.findContours(thresh,2,1)
|
||||
cnt = contours[0]
|
||||
|
||||
hull = cv.convexHull(cnt,returnPoints = False)
|
||||
@@ -93,9 +93,9 @@ img2 = cv.imread('star2.jpg',0)
|
||||
|
||||
ret, thresh = cv.threshold(img1, 127, 255,0)
|
||||
ret, thresh2 = cv.threshold(img2, 127, 255,0)
|
||||
contours,hierarchy = cv.findContours(thresh,2,1)
|
||||
im2,contours,hierarchy = cv.findContours(thresh,2,1)
|
||||
cnt1 = contours[0]
|
||||
contours,hierarchy = cv.findContours(thresh2,2,1)
|
||||
im2,contours,hierarchy = cv.findContours(thresh2,2,1)
|
||||
cnt2 = contours[0]
|
||||
|
||||
ret = cv.matchShapes(cnt1,cnt2,1,0.0)
|
||||
|
||||