8 |
9 |
--------------------------------------------------------------------------------
/OpenCV45Test/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/OpenCV45Test/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'com.android.application'
3 | id 'kotlin-android'
4 | }
5 |
6 | android {
7 | compileSdkVersion 30
8 | buildToolsVersion "29.0.3"
9 |
10 | defaultConfig {
11 | applicationId "lib.vaccae.opencv"
12 | minSdkVersion 22
13 | targetSdkVersion 30
14 | versionCode 1
15 | versionName "1.0"
16 |
17 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
18 | externalNativeBuild {
19 | cmake {
20 | cppFlags "-std=c++11"
21 | //我们的APP要支持的CPU架构
22 | abiFilters 'arm64-v8a','armeabi-v7a'
23 | //OpenCV动态库放在默认的libs文件夹下,这里要加上这句才能打包进来
24 | arguments "-DANDROID_STL=c++_shared"
25 | }
26 | }
27 | ndk{
28 | //找了个Android5.1的armeabi-v7a架构的平板运行时发现启动不了,搜索了一下
29 | //在这里加上NDK的CPU架构后才能运行
30 | abiFilters 'arm64-v8a','armeabi-v7a'
31 | }
32 | }
33 |
34 |
35 | buildTypes {
36 | release {
37 | minifyEnabled false
38 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
39 | }
40 | }
41 | externalNativeBuild {
42 | cmake {
43 | path "src/main/cpp/CMakeLists.txt"
44 | }
45 | }
46 | compileOptions {
47 | sourceCompatibility JavaVersion.VERSION_1_8
48 | targetCompatibility JavaVersion.VERSION_1_8
49 | }
50 | kotlinOptions {
51 | jvmTarget = '1.8'
52 | }
53 | }
54 |
55 | dependencies {
56 |
57 | implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
58 | implementation 'androidx.core:core-ktx:1.3.2'
59 | implementation 'androidx.appcompat:appcompat:1.2.0'
60 | implementation 'com.google.android.material:material:1.2.1'
61 | implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
62 |
63 | implementation "androidx.camera:camera-camera2:1.0.0-beta12"
64 | implementation "androidx.camera:camera-view:1.0.0-alpha19"
65 | implementation "androidx.camera:camera-extensions:1.0.0-alpha19"
66 | implementation "androidx.camera:camera-lifecycle:1.0.0-beta12"
67 |
68 | testImplementation 'junit:junit:4.13.1'
69 | androidTestImplementation 'androidx.test.ext:junit:1.1.2'
70 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
71 | }
--------------------------------------------------------------------------------
/OpenCV45Test/app/libs/arm64-v8a/libopencv_java4.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Vaccae/AndroidCameraXNDKOpenCV/003e5fd07f9b4ff2f5ce4ded7b0816e4d879c4e7/OpenCV45Test/app/libs/arm64-v8a/libopencv_java4.so
--------------------------------------------------------------------------------
/OpenCV45Test/app/libs/armeabi-v7a/libopencv_java4.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Vaccae/AndroidCameraXNDKOpenCV/003e5fd07f9b4ff2f5ce4ded7b0816e4d879c4e7/OpenCV45Test/app/libs/armeabi-v7a/libopencv_java4.so
--------------------------------------------------------------------------------
/OpenCV45Test/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/androidTest/java/lib/vaccae/opencv/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package lib.vaccae.opencv
2 |
3 | import androidx.test.platform.app.InstrumentationRegistry
4 | import androidx.test.ext.junit.runners.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22 | assertEquals("lib.vaccae.opencv", appContext.packageName)
23 | }
24 | }
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # For more information about using CMake with Android Studio, read the
2 | # documentation: https://d.android.com/studio/projects/add-native-code.html
3 |
4 | # Sets the minimum version of CMake required to build the native library.
5 |
6 | cmake_minimum_required(VERSION 3.10.2)
7 |
8 | # Declares and names the project.
9 |
10 | project("opencv")
11 |
12 | #该变量为真时会创建完整版本的Makefile
13 | set(CMAKE_VERBOSE_MAKEFILE on)
14 |
15 | #定义变量ocvlibs使后面的命令可以使用定位具体的库文件
16 | set(opencvlibs ${CMAKE_CURRENT_SOURCE_DIR}/../../../libs)
17 |
18 | #调用头文件的具体路径
19 | include_directories(${CMAKE_CURRENT_SOURCE_DIR})
20 |
21 | #增加我们的动态库
22 | add_library(libopencv_java45 SHARED IMPORTED)
23 |
24 | #建立链接
25 | set_target_properties(libopencv_java45 PROPERTIES IMPORTED_LOCATION
26 | "${opencvlibs}/${ANDROID_ABI}/libopencv_java4.so")
27 |
28 |
29 | # Creates and names a library, sets it as either STATIC
30 | # or SHARED, and provides the relative paths to its source code.
31 | # You can define multiple libraries, and CMake builds them for you.
32 | # Gradle automatically packages shared libraries with your APK.
33 |
34 | file(GLOB native_srcs "*.cpp")
35 |
36 | add_library( # Sets the name of the library.
37 | opencv-lib
38 |
39 | # Sets the library as a shared library.
40 | SHARED
41 |
42 | # Provides a relative path to your source file(s).
43 | ${native_srcs})
44 |
45 | # Searches for a specified prebuilt library and stores the path as a
46 | # variable. Because CMake includes system libraries in the search path by
47 | # default, you only need to specify the name of the public NDK library
48 | # you want to add. CMake verifies that the library exists before
49 | # completing its build.
50 |
51 | find_library( # Sets the name of the path variable.
52 | log-lib
53 |
54 | # Specifies the name of the NDK library that
55 | # you want CMake to locate.
56 | log)
57 |
58 | # Specifies libraries CMake should link to your target library. You
59 | # can link multiple libraries, such as libraries you define in this
60 | # build script, prebuilt third-party libraries, or system libraries.
61 |
62 | target_link_libraries( # Specifies the target library.
63 | opencv-lib
64 | jnigraphics
65 | libopencv_java45
66 |
67 | # Links the target library to the log library
68 | # included in the NDK.
69 | ${log-lib})
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/facedetect.h:
--------------------------------------------------------------------------------
1 | //
2 | // Created by 36574 on 2020-12-04.
3 | //
4 |
5 | #ifndef OPENCV45TEST_FACEDETECT_H
6 | #define OPENCV45TEST_FACEDETECT_H
7 |
8 | #include
9 |
10 | using namespace cv;
11 | using namespace std;
12 |
13 | class facedetect {
14 | private:
15 | string _modelbinary, _modeldesc;
16 | dnn::Net _net;
17 | public:
18 | //置信阈值
19 | float confidenceThreshold;
20 | double inScaleFactor;
21 | int inWidth;
22 | int inHeight;
23 | Scalar meanVal;
24 | //初始化Dnn
25 | bool InitDnnNet(string modelbinary, string modeldesc);
26 |
27 | //人脸检测
28 | vector DetectToRect(Mat frame);
29 |
30 | vector> Detect(Mat frame);
31 |
32 | };
33 |
34 |
35 | #endif //OPENCV45TEST_FACEDETECT_H
36 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/calib3d/calib3d.hpp:
--------------------------------------------------------------------------------
1 | /*M///////////////////////////////////////////////////////////////////////////////////////
2 | //
3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
4 | //
5 | // By downloading, copying, installing or using the software you agree to this license.
6 | // If you do not agree to this license, do not download, install,
7 | // copy or use the software.
8 | //
9 | //
10 | // License Agreement
11 | // For Open Source Computer Vision Library
12 | //
13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved.
15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved.
16 | // Third party copyrights are property of their respective owners.
17 | //
18 | // Redistribution and use in source and binary forms, with or without modification,
19 | // are permitted provided that the following conditions are met:
20 | //
21 | // * Redistribution's of source code must retain the above copyright notice,
22 | // this list of conditions and the following disclaimer.
23 | //
24 | // * Redistribution's in binary form must reproduce the above copyright notice,
25 | // this list of conditions and the following disclaimer in the documentation
26 | // and/or other materials provided with the distribution.
27 | //
28 | // * The name of the copyright holders may not be used to endorse or promote products
29 | // derived from this software without specific prior written permission.
30 | //
31 | // This software is provided by the copyright holders and contributors "as is" and
32 | // any express or implied warranties, including, but not limited to, the implied
33 | // warranties of merchantability and fitness for a particular purpose are disclaimed.
34 | // In no event shall the Intel Corporation or contributors be liable for any direct,
35 | // indirect, incidental, special, exemplary, or consequential damages
36 | // (including, but not limited to, procurement of substitute goods or services;
37 | // loss of use, data, or profits; or business interruption) however caused
38 | // and on any theory of liability, whether in contract, strict liability,
39 | // or tort (including negligence or otherwise) arising in any way out of
40 | // the use of this software, even if advised of the possibility of such damage.
41 | //
42 | //M*/
43 |
44 | #ifdef __OPENCV_BUILD
45 | #error this is a compatibility header which should not be used inside the OpenCV library
46 | #endif
47 |
48 | #include "opencv2/calib3d.hpp"
49 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/core/async.hpp:
--------------------------------------------------------------------------------
1 | // This file is part of OpenCV project.
2 | // It is subject to the license terms in the LICENSE file found in the top-level directory
3 | // of this distribution and at http://opencv.org/license.html.
4 |
5 | #ifndef OPENCV_CORE_ASYNC_HPP
6 | #define OPENCV_CORE_ASYNC_HPP
7 |
8 | #include
9 |
10 | #ifdef CV_CXX11
11 | //#include
12 | #include
13 | #endif
14 |
15 | namespace cv {
16 |
17 | /** @addtogroup core_async
18 |
19 | @{
20 | */
21 |
22 |
23 | /** @brief Returns result of asynchronous operations
24 |
25 | Object has attached asynchronous state.
26 | Assignment operator doesn't clone asynchronous state (it is shared between all instances).
27 |
28 | Result can be fetched via get() method only once.
29 |
30 | */
31 | class CV_EXPORTS_W AsyncArray
32 | {
33 | public:
34 | ~AsyncArray() CV_NOEXCEPT;
35 | CV_WRAP AsyncArray() CV_NOEXCEPT;
36 | AsyncArray(const AsyncArray& o) CV_NOEXCEPT;
37 | AsyncArray& operator=(const AsyncArray& o) CV_NOEXCEPT;
38 | CV_WRAP void release() CV_NOEXCEPT;
39 |
40 | /** Fetch the result.
41 | @param[out] dst destination array
42 |
43 | Waits for result until container has valid result.
44 | Throws exception if exception was stored as a result.
45 |
46 | Throws exception on invalid container state.
47 |
48 | @note Result or stored exception can be fetched only once.
49 | */
50 | CV_WRAP void get(OutputArray dst) const;
51 |
52 | /** Retrieving the result with timeout
53 | @param[out] dst destination array
54 | @param[in] timeoutNs timeout in nanoseconds, -1 for infinite wait
55 |
56 | @returns true if result is ready, false if the timeout has expired
57 |
58 | @note Result or stored exception can be fetched only once.
59 | */
60 | bool get(OutputArray dst, int64 timeoutNs) const;
61 |
62 | CV_WRAP inline
63 | bool get(OutputArray dst, double timeoutNs) const { return get(dst, (int64)timeoutNs); }
64 |
65 | bool wait_for(int64 timeoutNs) const;
66 |
67 | CV_WRAP inline
68 | bool wait_for(double timeoutNs) const { return wait_for((int64)timeoutNs); }
69 |
70 | CV_WRAP bool valid() const CV_NOEXCEPT;
71 |
72 | #ifdef CV_CXX11
73 | inline AsyncArray(AsyncArray&& o) { p = o.p; o.p = NULL; }
74 | inline AsyncArray& operator=(AsyncArray&& o) CV_NOEXCEPT { std::swap(p, o.p); return *this; }
75 |
76 | template
77 | inline bool get(OutputArray dst, const std::chrono::duration<_Rep, _Period>& timeout)
78 | {
79 | return get(dst, (int64)(std::chrono::nanoseconds(timeout).count()));
80 | }
81 |
82 | template
83 | inline bool wait_for(const std::chrono::duration<_Rep, _Period>& timeout)
84 | {
85 | return wait_for((int64)(std::chrono::nanoseconds(timeout).count()));
86 | }
87 |
88 | #if 0
89 | std::future getFutureMat() const;
90 | std::future getFutureUMat() const;
91 | #endif
92 | #endif
93 |
94 |
95 | // PImpl
96 | struct Impl; friend struct Impl;
97 | inline void* _getImpl() const CV_NOEXCEPT { return p; }
98 | protected:
99 | Impl* p;
100 | };
101 |
102 |
103 | //! @}
104 | } // namespace
105 | #endif // OPENCV_CORE_ASYNC_HPP
106 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/core/bindings_utils.hpp:
--------------------------------------------------------------------------------
1 | // This file is part of OpenCV project.
2 | // It is subject to the license terms in the LICENSE file found in the top-level directory
3 | // of this distribution and at http://opencv.org/license.html.
4 |
5 | #ifndef OPENCV_CORE_BINDINGS_UTILS_HPP
6 | #define OPENCV_CORE_BINDINGS_UTILS_HPP
7 |
8 | #include
9 | #include
10 |
11 | namespace cv { namespace utils {
12 | //! @addtogroup core_utils
13 | //! @{
14 |
15 | CV_EXPORTS_W String dumpInputArray(InputArray argument);
16 |
17 | CV_EXPORTS_W String dumpInputArrayOfArrays(InputArrayOfArrays argument);
18 |
19 | CV_EXPORTS_W String dumpInputOutputArray(InputOutputArray argument);
20 |
21 | CV_EXPORTS_W String dumpInputOutputArrayOfArrays(InputOutputArrayOfArrays argument);
22 |
23 | CV_WRAP static inline
24 | String dumpBool(bool argument)
25 | {
26 | return (argument) ? String("Bool: True") : String("Bool: False");
27 | }
28 |
29 | CV_WRAP static inline
30 | String dumpInt(int argument)
31 | {
32 | return cv::format("Int: %d", argument);
33 | }
34 |
35 | CV_WRAP static inline
36 | String dumpSizeT(size_t argument)
37 | {
38 | std::ostringstream oss("size_t: ", std::ios::ate);
39 | oss << argument;
40 | return oss.str();
41 | }
42 |
43 | CV_WRAP static inline
44 | String dumpFloat(float argument)
45 | {
46 | return cv::format("Float: %.2f", argument);
47 | }
48 |
49 | CV_WRAP static inline
50 | String dumpDouble(double argument)
51 | {
52 | return cv::format("Double: %.2f", argument);
53 | }
54 |
55 | CV_WRAP static inline
56 | String dumpCString(const char* argument)
57 | {
58 | return cv::format("String: %s", argument);
59 | }
60 |
61 | CV_WRAP static inline
62 | AsyncArray testAsyncArray(InputArray argument)
63 | {
64 | AsyncPromise p;
65 | p.setValue(argument);
66 | return p.getArrayResult();
67 | }
68 |
69 | CV_WRAP static inline
70 | AsyncArray testAsyncException()
71 | {
72 | AsyncPromise p;
73 | try
74 | {
75 | CV_Error(Error::StsOk, "Test: Generated async error");
76 | }
77 | catch (const cv::Exception& e)
78 | {
79 | p.setException(e);
80 | }
81 | return p.getArrayResult();
82 | }
83 |
84 | //! @}
85 | }} // namespace
86 |
87 | #endif // OPENCV_CORE_BINDINGS_UTILS_HPP
88 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/core/bufferpool.hpp:
--------------------------------------------------------------------------------
1 | // This file is part of OpenCV project.
2 | // It is subject to the license terms in the LICENSE file found in the top-level directory
3 | // of this distribution and at http://opencv.org/license.html.
4 | //
5 | // Copyright (C) 2014, Advanced Micro Devices, Inc., all rights reserved.
6 |
7 | #ifndef OPENCV_CORE_BUFFER_POOL_HPP
8 | #define OPENCV_CORE_BUFFER_POOL_HPP
9 |
10 | #ifdef _MSC_VER
11 | #pragma warning(push)
12 | #pragma warning(disable: 4265)
13 | #endif
14 |
15 | namespace cv
16 | {
17 |
18 | //! @addtogroup core
19 | //! @{
20 |
21 | class BufferPoolController
22 | {
23 | protected:
24 | ~BufferPoolController() { }
25 | public:
26 | virtual size_t getReservedSize() const = 0;
27 | virtual size_t getMaxReservedSize() const = 0;
28 | virtual void setMaxReservedSize(size_t size) = 0;
29 | virtual void freeAllReservedBuffers() = 0;
30 | };
31 |
32 | //! @}
33 |
34 | }
35 |
36 | #ifdef _MSC_VER
37 | #pragma warning(pop)
38 | #endif
39 |
40 | #endif // OPENCV_CORE_BUFFER_POOL_HPP
41 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/core/core.hpp:
--------------------------------------------------------------------------------
1 | /*M///////////////////////////////////////////////////////////////////////////////////////
2 | //
3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
4 | //
5 | // By downloading, copying, installing or using the software you agree to this license.
6 | // If you do not agree to this license, do not download, install,
7 | // copy or use the software.
8 | //
9 | //
10 | // License Agreement
11 | // For Open Source Computer Vision Library
12 | //
13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved.
15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved.
16 | // Third party copyrights are property of their respective owners.
17 | //
18 | // Redistribution and use in source and binary forms, with or without modification,
19 | // are permitted provided that the following conditions are met:
20 | //
21 | // * Redistribution's of source code must retain the above copyright notice,
22 | // this list of conditions and the following disclaimer.
23 | //
24 | // * Redistribution's in binary form must reproduce the above copyright notice,
25 | // this list of conditions and the following disclaimer in the documentation
26 | // and/or other materials provided with the distribution.
27 | //
28 | // * The name of the copyright holders may not be used to endorse or promote products
29 | // derived from this software without specific prior written permission.
30 | //
31 | // This software is provided by the copyright holders and contributors "as is" and
32 | // any express or implied warranties, including, but not limited to, the implied
33 | // warranties of merchantability and fitness for a particular purpose are disclaimed.
34 | // In no event shall the Intel Corporation or contributors be liable for any direct,
35 | // indirect, incidental, special, exemplary, or consequential damages
36 | // (including, but not limited to, procurement of substitute goods or services;
37 | // loss of use, data, or profits; or business interruption) however caused
38 | // and on any theory of liability, whether in contract, strict liability,
39 | // or tort (including negligence or otherwise) arising in any way out of
40 | // the use of this software, even if advised of the possibility of such damage.
41 | //
42 | //M*/
43 |
44 | #ifdef __OPENCV_BUILD
45 | #error this is a compatibility header which should not be used inside the OpenCV library
46 | #endif
47 |
48 | #include "opencv2/core.hpp"
49 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/core/cuda/funcattrib.hpp:
--------------------------------------------------------------------------------
1 | /*M///////////////////////////////////////////////////////////////////////////////////////
2 | //
3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
4 | //
5 | // By downloading, copying, installing or using the software you agree to this license.
6 | // If you do not agree to this license, do not download, install,
7 | // copy or use the software.
8 | //
9 | //
10 | // License Agreement
11 | // For Open Source Computer Vision Library
12 | //
13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved.
15 | // Third party copyrights are property of their respective owners.
16 | //
17 | // Redistribution and use in source and binary forms, with or without modification,
18 | // are permitted provided that the following conditions are met:
19 | //
20 | // * Redistribution's of source code must retain the above copyright notice,
21 | // this list of conditions and the following disclaimer.
22 | //
23 | // * Redistribution's in binary form must reproduce the above copyright notice,
24 | // this list of conditions and the following disclaimer in the documentation
25 | // and/or other materials provided with the distribution.
26 | //
27 | // * The name of the copyright holders may not be used to endorse or promote products
28 | // derived from this software without specific prior written permission.
29 | //
30 | // This software is provided by the copyright holders and contributors "as is" and
31 | // any express or implied warranties, including, but not limited to, the implied
32 | // warranties of merchantability and fitness for a particular purpose are disclaimed.
33 | // In no event shall the Intel Corporation or contributors be liable for any direct,
34 | // indirect, incidental, special, exemplary, or consequential damages
35 | // (including, but not limited to, procurement of substitute goods or services;
36 | // loss of use, data, or profits; or business interruption) however caused
37 | // and on any theory of liability, whether in contract, strict liability,
38 | // or tort (including negligence or otherwise) arising in any way out of
39 | // the use of this software, even if advised of the possibility of such damage.
40 | //
41 | //M*/
42 |
43 | #ifndef OPENCV_CUDA_DEVICE_FUNCATTRIB_HPP
44 | #define OPENCV_CUDA_DEVICE_FUNCATTRIB_HPP
45 |
46 | #include
47 |
48 | /** @file
49 | * @deprecated Use @ref cudev instead.
50 | */
51 |
52 | //! @cond IGNORED
53 |
54 | namespace cv { namespace cuda { namespace device
55 | {
56 | template
57 | void printFuncAttrib(Func& func)
58 | {
59 |
60 | cudaFuncAttributes attrs;
61 | cudaFuncGetAttributes(&attrs, func);
62 |
63 | printf("=== Function stats ===\n");
64 | printf("Name: \n");
65 | printf("sharedSizeBytes = %d\n", attrs.sharedSizeBytes);
66 | printf("constSizeBytes = %d\n", attrs.constSizeBytes);
67 | printf("localSizeBytes = %d\n", attrs.localSizeBytes);
68 | printf("maxThreadsPerBlock = %d\n", attrs.maxThreadsPerBlock);
69 | printf("numRegs = %d\n", attrs.numRegs);
70 | printf("ptxVersion = %d\n", attrs.ptxVersion);
71 | printf("binaryVersion = %d\n", attrs.binaryVersion);
72 | printf("\n");
73 | fflush(stdout);
74 | }
75 | }}} // namespace cv { namespace cuda { namespace cudev
76 |
77 | //! @endcond
78 |
79 | #endif /* OPENCV_CUDA_DEVICE_FUNCATTRIB_HPP */
80 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/core/cuda/warp_reduce.hpp:
--------------------------------------------------------------------------------
1 | /*M///////////////////////////////////////////////////////////////////////////////////////
2 | //
3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
4 | //
5 | // By downloading, copying, installing or using the software you agree to this license.
6 | // If you do not agree to this license, do not download, install,
7 | // copy or use the software.
8 | //
9 | //
10 | // License Agreement
11 | // For Open Source Computer Vision Library
12 | //
13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved.
15 | // Third party copyrights are property of their respective owners.
16 | //
17 | // Redistribution and use in source and binary forms, with or without modification,
18 | // are permitted provided that the following conditions are met:
19 | //
20 | // * Redistribution's of source code must retain the above copyright notice,
21 | // this list of conditions and the following disclaimer.
22 | //
23 | // * Redistribution's in binary form must reproduce the above copyright notice,
24 | // this list of conditions and the following disclaimer in the documentation
25 | // and/or other materials provided with the distribution.
26 | //
27 | // * The name of the copyright holders may not be used to endorse or promote products
28 | // derived from this software without specific prior written permission.
29 | //
30 | // This software is provided by the copyright holders and contributors "as is" and
31 | // any express or implied warranties, including, but not limited to, the implied
32 | // warranties of merchantability and fitness for a particular purpose are disclaimed.
33 | // In no event shall the Intel Corporation or contributors be liable for any direct,
34 | // indirect, incidental, special, exemplary, or consequential damages
35 | // (including, but not limited to, procurement of substitute goods or services;
36 | // loss of use, data, or profits; or business interruption) however caused
37 | // and on any theory of liability, whether in contract, strict liability,
38 | // or tort (including negligence or otherwise) arising in any way out of
39 | // the use of this software, even if advised of the possibility of such damage.
40 | //
41 | //M*/
42 |
43 | #ifndef OPENCV_CUDA_WARP_REDUCE_HPP__
44 | #define OPENCV_CUDA_WARP_REDUCE_HPP__
45 |
46 | /** @file
47 | * @deprecated Use @ref cudev instead.
48 | */
49 |
50 | //! @cond IGNORED
51 |
52 | namespace cv { namespace cuda { namespace device
53 | {
54 | template
55 | __device__ __forceinline__ T warp_reduce(volatile T *ptr , const unsigned int tid = threadIdx.x)
56 | {
57 | const unsigned int lane = tid & 31; // index of thread in warp (0..31)
58 |
59 | if (lane < 16)
60 | {
61 | T partial = ptr[tid];
62 |
63 | ptr[tid] = partial = partial + ptr[tid + 16];
64 | ptr[tid] = partial = partial + ptr[tid + 8];
65 | ptr[tid] = partial = partial + ptr[tid + 4];
66 | ptr[tid] = partial = partial + ptr[tid + 2];
67 | ptr[tid] = partial = partial + ptr[tid + 1];
68 | }
69 |
70 | return ptr[tid - lane];
71 | }
72 | }}} // namespace cv { namespace cuda { namespace cudev {
73 |
74 | //! @endcond
75 |
76 | #endif /* OPENCV_CUDA_WARP_REDUCE_HPP__ */
77 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/core/cuda_stream_accessor.hpp:
--------------------------------------------------------------------------------
1 | /*M///////////////////////////////////////////////////////////////////////////////////////
2 | //
3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
4 | //
5 | // By downloading, copying, installing or using the software you agree to this license.
6 | // If you do not agree to this license, do not download, install,
7 | // copy or use the software.
8 | //
9 | //
10 | // License Agreement
11 | // For Open Source Computer Vision Library
12 | //
13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved.
15 | // Third party copyrights are property of their respective owners.
16 | //
17 | // Redistribution and use in source and binary forms, with or without modification,
18 | // are permitted provided that the following conditions are met:
19 | //
20 | // * Redistribution's of source code must retain the above copyright notice,
21 | // this list of conditions and the following disclaimer.
22 | //
23 | // * Redistribution's in binary form must reproduce the above copyright notice,
24 | // this list of conditions and the following disclaimer in the documentation
25 | // and/or other materials provided with the distribution.
26 | //
27 | // * The name of the copyright holders may not be used to endorse or promote products
28 | // derived from this software without specific prior written permission.
29 | //
30 | // This software is provided by the copyright holders and contributors "as is" and
31 | // any express or implied warranties, including, but not limited to, the implied
32 | // warranties of merchantability and fitness for a particular purpose are disclaimed.
33 | // In no event shall the Intel Corporation or contributors be liable for any direct,
34 | // indirect, incidental, special, exemplary, or consequential damages
35 | // (including, but not limited to, procurement of substitute goods or services;
36 | // loss of use, data, or profits; or business interruption) however caused
37 | // and on any theory of liability, whether in contract, strict liability,
38 | // or tort (including negligence or otherwise) arising in any way out of
39 | // the use of this software, even if advised of the possibility of such damage.
40 | //
41 | //M*/
42 |
43 | #ifndef OPENCV_CORE_CUDA_STREAM_ACCESSOR_HPP
44 | #define OPENCV_CORE_CUDA_STREAM_ACCESSOR_HPP
45 |
46 | #ifndef __cplusplus
47 | # error cuda_stream_accessor.hpp header must be compiled as C++
48 | #endif
49 |
50 | /** @file cuda_stream_accessor.hpp
51 | * This is only header file that depends on CUDA Runtime API. All other headers are independent.
52 | */
53 |
54 | #include
55 | #include "opencv2/core/cuda.hpp"
56 |
57 | namespace cv
58 | {
59 | namespace cuda
60 | {
61 |
62 | //! @addtogroup cudacore_struct
63 | //! @{
64 |
65 | /** @brief Class that enables getting cudaStream_t from cuda::Stream
66 | */
67 | struct StreamAccessor
68 | {
69 | CV_EXPORTS static cudaStream_t getStream(const Stream& stream);
70 | CV_EXPORTS static Stream wrapStream(cudaStream_t stream);
71 | };
72 |
73 | /** @brief Class that enables getting cudaEvent_t from cuda::Event
74 | */
75 | struct EventAccessor
76 | {
77 | CV_EXPORTS static cudaEvent_t getEvent(const Event& event);
78 | CV_EXPORTS static Event wrapEvent(cudaEvent_t event);
79 | };
80 |
81 | //! @}
82 |
83 | }
84 | }
85 |
86 | #endif /* OPENCV_CORE_CUDA_STREAM_ACCESSOR_HPP */
87 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/core/detail/async_promise.hpp:
--------------------------------------------------------------------------------
1 | // This file is part of OpenCV project.
2 | // It is subject to the license terms in the LICENSE file found in the top-level directory
3 | // of this distribution and at http://opencv.org/license.html.
4 |
5 | #ifndef OPENCV_CORE_ASYNC_PROMISE_HPP
6 | #define OPENCV_CORE_ASYNC_PROMISE_HPP
7 |
8 | #include "../async.hpp"
9 |
10 | #include "exception_ptr.hpp"
11 |
12 | namespace cv {
13 |
14 | /** @addtogroup core_async
15 | @{
16 | */
17 |
18 |
19 | /** @brief Provides result of asynchronous operations
20 |
21 | */
22 | class CV_EXPORTS AsyncPromise
23 | {
24 | public:
25 | ~AsyncPromise() CV_NOEXCEPT;
26 | AsyncPromise() CV_NOEXCEPT;
27 | explicit AsyncPromise(const AsyncPromise& o) CV_NOEXCEPT;
28 | AsyncPromise& operator=(const AsyncPromise& o) CV_NOEXCEPT;
29 | void release() CV_NOEXCEPT;
30 |
31 | /** Returns associated AsyncArray
32 | @note Can be called once
33 | */
34 | AsyncArray getArrayResult();
35 |
36 | /** Stores asynchronous result.
37 | @param[in] value result
38 | */
39 | void setValue(InputArray value);
40 |
41 | // TODO "move" setters
42 |
43 | #if CV__EXCEPTION_PTR
44 | /** Stores exception.
45 | @param[in] exception exception to be raised in AsyncArray
46 | */
47 | void setException(std::exception_ptr exception);
48 | #endif
49 |
50 | /** Stores exception.
51 | @param[in] exception exception to be raised in AsyncArray
52 | */
53 | void setException(const cv::Exception& exception);
54 |
55 | #ifdef CV_CXX11
56 | explicit AsyncPromise(AsyncPromise&& o) { p = o.p; o.p = NULL; }
57 | AsyncPromise& operator=(AsyncPromise&& o) CV_NOEXCEPT { std::swap(p, o.p); return *this; }
58 | #endif
59 |
60 |
61 | // PImpl
62 | typedef struct AsyncArray::Impl Impl; friend struct AsyncArray::Impl;
63 | inline void* _getImpl() const CV_NOEXCEPT { return p; }
64 | protected:
65 | Impl* p;
66 | };
67 |
68 |
69 | //! @}
70 | } // namespace
71 | #endif // OPENCV_CORE_ASYNC_PROMISE_HPP
72 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/core/detail/exception_ptr.hpp:
--------------------------------------------------------------------------------
1 | // This file is part of OpenCV project.
2 | // It is subject to the license terms in the LICENSE file found in the top-level directory
3 | // of this distribution and at http://opencv.org/license.html.
4 |
5 | #ifndef OPENCV_CORE_DETAILS_EXCEPTION_PTR_H
6 | #define OPENCV_CORE_DETAILS_EXCEPTION_PTR_H
7 |
8 | #ifndef CV__EXCEPTION_PTR
9 | # if defined(__ANDROID__) && defined(ATOMIC_INT_LOCK_FREE) && ATOMIC_INT_LOCK_FREE < 2
10 | # define CV__EXCEPTION_PTR 0 // Not supported, details: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58938
11 | # elif defined(CV_CXX11)
12 | # define CV__EXCEPTION_PTR 1
13 | # elif defined(_MSC_VER)
14 | # define CV__EXCEPTION_PTR (_MSC_VER >= 1600)
15 | # elif defined(__clang__)
16 | # define CV__EXCEPTION_PTR 0 // C++11 only (see above)
17 | # elif defined(__GNUC__) && defined(__GXX_EXPERIMENTAL_CXX0X__)
18 | # define CV__EXCEPTION_PTR (__GXX_EXPERIMENTAL_CXX0X__ > 0)
19 | # endif
20 | #endif
21 | #ifndef CV__EXCEPTION_PTR
22 | # define CV__EXCEPTION_PTR 0
23 | #elif CV__EXCEPTION_PTR
24 | # include // std::exception_ptr
25 | #endif
26 |
27 | #endif // OPENCV_CORE_DETAILS_EXCEPTION_PTR_H
28 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/core/ocl_genbase.hpp:
--------------------------------------------------------------------------------
1 | /*M///////////////////////////////////////////////////////////////////////////////////////
2 | //
3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
4 | //
5 | // By downloading, copying, installing or using the software you agree to this license.
6 | // If you do not agree to this license, do not download, install,
7 | // copy or use the software.
8 | //
9 | //
10 | // License Agreement
11 | // For Open Source Computer Vision Library
12 | //
13 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved.
14 | // Third party copyrights are property of their respective owners.
15 | //
16 | // Redistribution and use in source and binary forms, with or without modification,
17 | // are permitted provided that the following conditions are met:
18 | //
19 | // * Redistribution's of source code must retain the above copyright notice,
20 | // this list of conditions and the following disclaimer.
21 | //
22 | // * Redistribution's in binary form must reproduce the above copyright notice,
23 | // this list of conditions and the following disclaimer in the documentation
24 | // and/or other materials provided with the distribution.
25 | //
26 | // * The name of the copyright holders may not be used to endorse or promote products
27 | // derived from this software without specific prior written permission.
28 | //
29 | // This software is provided by the copyright holders and contributors "as is" and
30 | // any express or implied warranties, including, but not limited to, the implied
31 | // warranties of merchantability and fitness for a particular purpose are disclaimed.
32 | // In no event shall the OpenCV Foundation or contributors be liable for any direct,
33 | // indirect, incidental, special, exemplary, or consequential damages
34 | // (including, but not limited to, procurement of substitute goods or services;
35 | // loss of use, data, or profits; or business interruption) however caused
36 | // and on any theory of liability, whether in contract, strict liability,
37 | // or tort (including negligence or otherwise) arising in any way out of
38 | // the use of this software, even if advised of the possibility of such damage.
39 | //
40 | //M*/
41 |
42 | #ifndef OPENCV_OPENCL_GENBASE_HPP
43 | #define OPENCV_OPENCL_GENBASE_HPP
44 |
45 | //! @cond IGNORED
46 |
47 | namespace cv {
48 | namespace ocl {
49 |
50 | class ProgramSource;
51 |
52 | namespace internal {
53 |
54 | struct CV_EXPORTS ProgramEntry
55 | {
56 | const char* module;
57 | const char* name;
58 | const char* programCode;
59 | const char* programHash;
60 | ProgramSource* pProgramSource;
61 |
62 | operator ProgramSource& () const;
63 | };
64 |
65 | } } } // namespace
66 |
67 | //! @endcond
68 |
69 | #endif
70 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/core/opencl/opencl_svm.hpp:
--------------------------------------------------------------------------------
1 | /* See LICENSE file in the root OpenCV directory */
2 |
3 | #ifndef OPENCV_CORE_OPENCL_SVM_HPP
4 | #define OPENCV_CORE_OPENCL_SVM_HPP
5 |
6 | //
7 | // Internal usage only (binary compatibility is not guaranteed)
8 | //
9 | #ifndef __OPENCV_BUILD
10 | #error Internal header file
11 | #endif
12 |
13 | #if defined(HAVE_OPENCL) && defined(HAVE_OPENCL_SVM)
14 | #include "runtime/opencl_core.hpp"
15 | #include "runtime/opencl_svm_20.hpp"
16 | #include "runtime/opencl_svm_hsa_extension.hpp"
17 |
18 | namespace cv { namespace ocl { namespace svm {
19 |
20 | struct SVMCapabilities
21 | {
22 | enum Value
23 | {
24 | SVM_COARSE_GRAIN_BUFFER = (1 << 0),
25 | SVM_FINE_GRAIN_BUFFER = (1 << 1),
26 | SVM_FINE_GRAIN_SYSTEM = (1 << 2),
27 | SVM_ATOMICS = (1 << 3),
28 | };
29 | int value_;
30 |
31 | SVMCapabilities(int capabilities = 0) : value_(capabilities) { }
32 | operator int() const { return value_; }
33 |
34 | inline bool isNoSVMSupport() const { return value_ == 0; }
35 | inline bool isSupportCoarseGrainBuffer() const { return (value_ & SVM_COARSE_GRAIN_BUFFER) != 0; }
36 | inline bool isSupportFineGrainBuffer() const { return (value_ & SVM_FINE_GRAIN_BUFFER) != 0; }
37 | inline bool isSupportFineGrainSystem() const { return (value_ & SVM_FINE_GRAIN_SYSTEM) != 0; }
38 | inline bool isSupportAtomics() const { return (value_ & SVM_ATOMICS) != 0; }
39 | };
40 |
41 | CV_EXPORTS const SVMCapabilities getSVMCapabilitites(const ocl::Context& context);
42 |
43 | struct SVMFunctions
44 | {
45 | clSVMAllocAMD_fn fn_clSVMAlloc;
46 | clSVMFreeAMD_fn fn_clSVMFree;
47 | clSetKernelArgSVMPointerAMD_fn fn_clSetKernelArgSVMPointer;
48 | //clSetKernelExecInfoAMD_fn fn_clSetKernelExecInfo;
49 | //clEnqueueSVMFreeAMD_fn fn_clEnqueueSVMFree;
50 | clEnqueueSVMMemcpyAMD_fn fn_clEnqueueSVMMemcpy;
51 | clEnqueueSVMMemFillAMD_fn fn_clEnqueueSVMMemFill;
52 | clEnqueueSVMMapAMD_fn fn_clEnqueueSVMMap;
53 | clEnqueueSVMUnmapAMD_fn fn_clEnqueueSVMUnmap;
54 |
55 | inline SVMFunctions()
56 | : fn_clSVMAlloc(NULL), fn_clSVMFree(NULL),
57 | fn_clSetKernelArgSVMPointer(NULL), /*fn_clSetKernelExecInfo(NULL),*/
58 | /*fn_clEnqueueSVMFree(NULL),*/ fn_clEnqueueSVMMemcpy(NULL), fn_clEnqueueSVMMemFill(NULL),
59 | fn_clEnqueueSVMMap(NULL), fn_clEnqueueSVMUnmap(NULL)
60 | {
61 | // nothing
62 | }
63 |
64 | inline bool isValid() const
65 | {
66 | return fn_clSVMAlloc != NULL && fn_clSVMFree && fn_clSetKernelArgSVMPointer &&
67 | /*fn_clSetKernelExecInfo && fn_clEnqueueSVMFree &&*/ fn_clEnqueueSVMMemcpy &&
68 | fn_clEnqueueSVMMemFill && fn_clEnqueueSVMMap && fn_clEnqueueSVMUnmap;
69 | }
70 | };
71 |
72 | // We should guarantee that SVMFunctions lifetime is not less than context's lifetime
73 | CV_EXPORTS const SVMFunctions* getSVMFunctions(const ocl::Context& context);
74 |
75 | CV_EXPORTS bool useSVM(UMatUsageFlags usageFlags);
76 |
77 | }}} //namespace cv::ocl::svm
78 | #endif
79 |
80 | #endif // OPENCV_CORE_OPENCL_SVM_HPP
81 | /* End of file. */
82 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/core/opencl/runtime/autogenerated/opencl_gl.hpp:
--------------------------------------------------------------------------------
1 | //
2 | // AUTOGENERATED, DO NOT EDIT
3 | //
4 | #ifndef OPENCV_CORE_OCL_RUNTIME_OPENCL_GL_HPP
5 | #error "Invalid usage"
6 | #endif
7 |
8 | // generated by parser_cl.py
9 | #define clCreateFromGLBuffer clCreateFromGLBuffer_
10 | #define clCreateFromGLRenderbuffer clCreateFromGLRenderbuffer_
11 | #define clCreateFromGLTexture clCreateFromGLTexture_
12 | #define clCreateFromGLTexture2D clCreateFromGLTexture2D_
13 | #define clCreateFromGLTexture3D clCreateFromGLTexture3D_
14 | #define clEnqueueAcquireGLObjects clEnqueueAcquireGLObjects_
15 | #define clEnqueueReleaseGLObjects clEnqueueReleaseGLObjects_
16 | #define clGetGLContextInfoKHR clGetGLContextInfoKHR_
17 | #define clGetGLObjectInfo clGetGLObjectInfo_
18 | #define clGetGLTextureInfo clGetGLTextureInfo_
19 |
20 | #if defined __APPLE__
21 | #include
22 | #else
23 | #include
24 | #endif
25 |
26 | // generated by parser_cl.py
27 | #undef clCreateFromGLBuffer
28 | #define clCreateFromGLBuffer clCreateFromGLBuffer_pfn
29 | #undef clCreateFromGLRenderbuffer
30 | #define clCreateFromGLRenderbuffer clCreateFromGLRenderbuffer_pfn
31 | #undef clCreateFromGLTexture
32 | #define clCreateFromGLTexture clCreateFromGLTexture_pfn
33 | #undef clCreateFromGLTexture2D
34 | #define clCreateFromGLTexture2D clCreateFromGLTexture2D_pfn
35 | #undef clCreateFromGLTexture3D
36 | #define clCreateFromGLTexture3D clCreateFromGLTexture3D_pfn
37 | #undef clEnqueueAcquireGLObjects
38 | #define clEnqueueAcquireGLObjects clEnqueueAcquireGLObjects_pfn
39 | #undef clEnqueueReleaseGLObjects
40 | #define clEnqueueReleaseGLObjects clEnqueueReleaseGLObjects_pfn
41 | #undef clGetGLContextInfoKHR
42 | #define clGetGLContextInfoKHR clGetGLContextInfoKHR_pfn
43 | #undef clGetGLObjectInfo
44 | #define clGetGLObjectInfo clGetGLObjectInfo_pfn
45 | #undef clGetGLTextureInfo
46 | #define clGetGLTextureInfo clGetGLTextureInfo_pfn
47 |
48 | #ifdef cl_khr_gl_sharing
49 |
50 | // generated by parser_cl.py
51 | extern CL_RUNTIME_EXPORT cl_mem (CL_API_CALL*clCreateFromGLBuffer)(cl_context, cl_mem_flags, cl_GLuint, int*);
52 | extern CL_RUNTIME_EXPORT cl_mem (CL_API_CALL*clCreateFromGLRenderbuffer)(cl_context, cl_mem_flags, cl_GLuint, cl_int*);
53 | extern CL_RUNTIME_EXPORT cl_mem (CL_API_CALL*clCreateFromGLTexture)(cl_context, cl_mem_flags, cl_GLenum, cl_GLint, cl_GLuint, cl_int*);
54 | extern CL_RUNTIME_EXPORT cl_mem (CL_API_CALL*clCreateFromGLTexture2D)(cl_context, cl_mem_flags, cl_GLenum, cl_GLint, cl_GLuint, cl_int*);
55 | extern CL_RUNTIME_EXPORT cl_mem (CL_API_CALL*clCreateFromGLTexture3D)(cl_context, cl_mem_flags, cl_GLenum, cl_GLint, cl_GLuint, cl_int*);
56 | extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueAcquireGLObjects)(cl_command_queue, cl_uint, const cl_mem*, cl_uint, const cl_event*, cl_event*);
57 | extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueReleaseGLObjects)(cl_command_queue, cl_uint, const cl_mem*, cl_uint, const cl_event*, cl_event*);
58 | extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetGLContextInfoKHR)(const cl_context_properties*, cl_gl_context_info, size_t, void*, size_t*);
59 | extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetGLObjectInfo)(cl_mem, cl_gl_object_type*, cl_GLuint*);
60 | extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetGLTextureInfo)(cl_mem, cl_gl_texture_info, size_t, void*, size_t*);
61 |
62 | #endif // cl_khr_gl_sharing
63 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/core/opencl/runtime/autogenerated/opencl_gl_wrappers.hpp:
--------------------------------------------------------------------------------
1 | //
2 | // AUTOGENERATED, DO NOT EDIT
3 | //
4 | #ifndef OPENCV_CORE_OCL_RUNTIME_OPENCL_GL_WRAPPERS_HPP
5 | #error "Invalid usage"
6 | #endif
7 |
8 | #ifdef cl_khr_gl_sharing
9 |
10 | // generated by parser_cl.py
11 | #undef clCreateFromGLBuffer
12 | #define clCreateFromGLBuffer clCreateFromGLBuffer_fn
13 | inline cl_mem clCreateFromGLBuffer(cl_context p0, cl_mem_flags p1, cl_GLuint p2, int* p3) { return clCreateFromGLBuffer_pfn(p0, p1, p2, p3); }
14 | #undef clCreateFromGLRenderbuffer
15 | #define clCreateFromGLRenderbuffer clCreateFromGLRenderbuffer_fn
16 | inline cl_mem clCreateFromGLRenderbuffer(cl_context p0, cl_mem_flags p1, cl_GLuint p2, cl_int* p3) { return clCreateFromGLRenderbuffer_pfn(p0, p1, p2, p3); }
17 | #undef clCreateFromGLTexture
18 | #define clCreateFromGLTexture clCreateFromGLTexture_fn
19 | inline cl_mem clCreateFromGLTexture(cl_context p0, cl_mem_flags p1, cl_GLenum p2, cl_GLint p3, cl_GLuint p4, cl_int* p5) { return clCreateFromGLTexture_pfn(p0, p1, p2, p3, p4, p5); }
20 | #undef clCreateFromGLTexture2D
21 | #define clCreateFromGLTexture2D clCreateFromGLTexture2D_fn
22 | inline cl_mem clCreateFromGLTexture2D(cl_context p0, cl_mem_flags p1, cl_GLenum p2, cl_GLint p3, cl_GLuint p4, cl_int* p5) { return clCreateFromGLTexture2D_pfn(p0, p1, p2, p3, p4, p5); }
23 | #undef clCreateFromGLTexture3D
24 | #define clCreateFromGLTexture3D clCreateFromGLTexture3D_fn
25 | inline cl_mem clCreateFromGLTexture3D(cl_context p0, cl_mem_flags p1, cl_GLenum p2, cl_GLint p3, cl_GLuint p4, cl_int* p5) { return clCreateFromGLTexture3D_pfn(p0, p1, p2, p3, p4, p5); }
26 | #undef clEnqueueAcquireGLObjects
27 | #define clEnqueueAcquireGLObjects clEnqueueAcquireGLObjects_fn
28 | inline cl_int clEnqueueAcquireGLObjects(cl_command_queue p0, cl_uint p1, const cl_mem* p2, cl_uint p3, const cl_event* p4, cl_event* p5) { return clEnqueueAcquireGLObjects_pfn(p0, p1, p2, p3, p4, p5); }
29 | #undef clEnqueueReleaseGLObjects
30 | #define clEnqueueReleaseGLObjects clEnqueueReleaseGLObjects_fn
31 | inline cl_int clEnqueueReleaseGLObjects(cl_command_queue p0, cl_uint p1, const cl_mem* p2, cl_uint p3, const cl_event* p4, cl_event* p5) { return clEnqueueReleaseGLObjects_pfn(p0, p1, p2, p3, p4, p5); }
32 | #undef clGetGLContextInfoKHR
33 | #define clGetGLContextInfoKHR clGetGLContextInfoKHR_fn
34 | inline cl_int clGetGLContextInfoKHR(const cl_context_properties* p0, cl_gl_context_info p1, size_t p2, void* p3, size_t* p4) { return clGetGLContextInfoKHR_pfn(p0, p1, p2, p3, p4); }
35 | #undef clGetGLObjectInfo
36 | #define clGetGLObjectInfo clGetGLObjectInfo_fn
37 | inline cl_int clGetGLObjectInfo(cl_mem p0, cl_gl_object_type* p1, cl_GLuint* p2) { return clGetGLObjectInfo_pfn(p0, p1, p2); }
38 | #undef clGetGLTextureInfo
39 | #define clGetGLTextureInfo clGetGLTextureInfo_fn
40 | inline cl_int clGetGLTextureInfo(cl_mem p0, cl_gl_texture_info p1, size_t p2, void* p3, size_t* p4) { return clGetGLTextureInfo_pfn(p0, p1, p2, p3, p4); }
41 |
42 | #endif // cl_khr_gl_sharing
43 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/core/opencl/runtime/opencl_clamdblas.hpp:
--------------------------------------------------------------------------------
1 | /*M///////////////////////////////////////////////////////////////////////////////////////
2 | //
3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
4 | //
5 | // By downloading, copying, installing or using the software you agree to this license.
6 | // If you do not agree to this license, do not download, install,
7 | // copy or use the software.
8 | //
9 | //
10 | // License Agreement
11 | // For Open Source Computer Vision Library
12 | //
13 | // Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved.
14 | // Third party copyrights are property of their respective owners.
15 | //
16 | // Redistribution and use in source and binary forms, with or without modification,
17 | // are permitted provided that the following conditions are met:
18 | //
19 | // * Redistribution's of source code must retain the above copyright notice,
20 | // this list of conditions and the following disclaimer.
21 | //
22 | // * Redistribution's in binary form must reproduce the above copyright notice,
23 | // this list of conditions and the following disclaimer in the documentation
24 | // and/or other materials provided with the distribution.
25 | //
26 | // * The name of the copyright holders may not be used to endorse or promote products
27 | // derived from this software without specific prior written permission.
28 | //
29 | // This software is provided by the copyright holders and contributors "as is" and
30 | // any express or implied warranties, including, but not limited to, the implied
31 | // warranties of merchantability and fitness for a particular purpose are disclaimed.
32 | // In no event shall the OpenCV Foundation or contributors be liable for any direct,
33 | // indirect, incidental, special, exemplary, or consequential damages
34 | // (including, but not limited to, procurement of substitute goods or services;
35 | // loss of use, data, or profits; or business interruption) however caused
36 | // and on any theory of liability, whether in contract, strict liability,
37 | // or tort (including negligence or otherwise) arising in any way out of
38 | // the use of this software, even if advised of the possibility of such damage.
39 | //
40 | //M*/
41 |
42 | #ifndef OPENCV_CORE_OCL_RUNTIME_CLAMDBLAS_HPP
43 | #define OPENCV_CORE_OCL_RUNTIME_CLAMDBLAS_HPP
44 |
45 | #ifdef HAVE_CLAMDBLAS
46 |
47 | #include "opencl_core.hpp"
48 |
49 | #include "autogenerated/opencl_clamdblas.hpp"
50 |
51 | #endif // HAVE_CLAMDBLAS
52 |
53 | #endif // OPENCV_CORE_OCL_RUNTIME_CLAMDBLAS_HPP
54 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/core/opencl/runtime/opencl_clamdfft.hpp:
--------------------------------------------------------------------------------
1 | /*M///////////////////////////////////////////////////////////////////////////////////////
2 | //
3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
4 | //
5 | // By downloading, copying, installing or using the software you agree to this license.
6 | // If you do not agree to this license, do not download, install,
7 | // copy or use the software.
8 | //
9 | //
10 | // License Agreement
11 | // For Open Source Computer Vision Library
12 | //
13 | // Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved.
14 | // Third party copyrights are property of their respective owners.
15 | //
16 | // Redistribution and use in source and binary forms, with or without modification,
17 | // are permitted provided that the following conditions are met:
18 | //
19 | // * Redistribution's of source code must retain the above copyright notice,
20 | // this list of conditions and the following disclaimer.
21 | //
22 | // * Redistribution's in binary form must reproduce the above copyright notice,
23 | // this list of conditions and the following disclaimer in the documentation
24 | // and/or other materials provided with the distribution.
25 | //
26 | // * The name of the copyright holders may not be used to endorse or promote products
27 | // derived from this software without specific prior written permission.
28 | //
29 | // This software is provided by the copyright holders and contributors "as is" and
30 | // any express or implied warranties, including, but not limited to, the implied
31 | // warranties of merchantability and fitness for a particular purpose are disclaimed.
32 | // In no event shall the OpenCV Foundation or contributors be liable for any direct,
33 | // indirect, incidental, special, exemplary, or consequential damages
34 | // (including, but not limited to, procurement of substitute goods or services;
35 | // loss of use, data, or profits; or business interruption) however caused
36 | // and on any theory of liability, whether in contract, strict liability,
37 | // or tort (including negligence or otherwise) arising in any way out of
38 | // the use of this software, even if advised of the possibility of such damage.
39 | //
40 | //M*/
41 |
42 | #ifndef OPENCV_CORE_OCL_RUNTIME_CLAMDFFT_HPP
43 | #define OPENCV_CORE_OCL_RUNTIME_CLAMDFFT_HPP
44 |
45 | #ifdef HAVE_CLAMDFFT
46 |
47 | #include "opencl_core.hpp"
48 |
49 | #include "autogenerated/opencl_clamdfft.hpp"
50 |
51 | #endif // HAVE_CLAMDFFT
52 |
53 | #endif // OPENCV_CORE_OCL_RUNTIME_CLAMDFFT_HPP
54 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/core/opencl/runtime/opencl_core_wrappers.hpp:
--------------------------------------------------------------------------------
1 | /*M///////////////////////////////////////////////////////////////////////////////////////
2 | //
3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
4 | //
5 | // By downloading, copying, installing or using the software you agree to this license.
6 | // If you do not agree to this license, do not download, install,
7 | // copy or use the software.
8 | //
9 | //
10 | // License Agreement
11 | // For Open Source Computer Vision Library
12 | //
13 | // Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved.
14 | // Third party copyrights are property of their respective owners.
15 | //
16 | // Redistribution and use in source and binary forms, with or without modification,
17 | // are permitted provided that the following conditions are met:
18 | //
19 | // * Redistribution's of source code must retain the above copyright notice,
20 | // this list of conditions and the following disclaimer.
21 | //
22 | // * Redistribution's in binary form must reproduce the above copyright notice,
23 | // this list of conditions and the following disclaimer in the documentation
24 | // and/or other materials provided with the distribution.
25 | //
26 | // * The name of the copyright holders may not be used to endorse or promote products
27 | // derived from this software without specific prior written permission.
28 | //
29 | // This software is provided by the copyright holders and contributors "as is" and
30 | // any express or implied warranties, including, but not limited to, the implied
31 | // warranties of merchantability and fitness for a particular purpose are disclaimed.
32 | // In no event shall the OpenCV Foundation or contributors be liable for any direct,
33 | // indirect, incidental, special, exemplary, or consequential damages
34 | // (including, but not limited to, procurement of substitute goods or services;
35 | // loss of use, data, or profits; or business interruption) however caused
36 | // and on any theory of liability, whether in contract, strict liability,
37 | // or tort (including negligence or otherwise) arising in any way out of
38 | // the use of this software, even if advised of the possibility of such damage.
39 | //
40 | //M*/
41 |
42 | #ifndef OPENCV_CORE_OCL_RUNTIME_OPENCL_WRAPPERS_HPP
43 | #define OPENCV_CORE_OCL_RUNTIME_OPENCL_WRAPPERS_HPP
44 |
45 | #include "autogenerated/opencl_core_wrappers.hpp"
46 |
47 | #endif // OPENCV_CORE_OCL_RUNTIME_OPENCL_WRAPPERS_HPP
48 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/core/opencl/runtime/opencl_gl.hpp:
--------------------------------------------------------------------------------
1 | /*M///////////////////////////////////////////////////////////////////////////////////////
2 | //
3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
4 | //
5 | // By downloading, copying, installing or using the software you agree to this license.
6 | // If you do not agree to this license, do not download, install,
7 | // copy or use the software.
8 | //
9 | //
10 | // License Agreement
11 | // For Open Source Computer Vision Library
12 | //
13 | // Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved.
14 | // Third party copyrights are property of their respective owners.
15 | //
16 | // Redistribution and use in source and binary forms, with or without modification,
17 | // are permitted provided that the following conditions are met:
18 | //
19 | // * Redistribution's of source code must retain the above copyright notice,
20 | // this list of conditions and the following disclaimer.
21 | //
22 | // * Redistribution's in binary form must reproduce the above copyright notice,
23 | // this list of conditions and the following disclaimer in the documentation
24 | // and/or other materials provided with the distribution.
25 | //
26 | // * The name of the copyright holders may not be used to endorse or promote products
27 | // derived from this software without specific prior written permission.
28 | //
29 | // This software is provided by the copyright holders and contributors "as is" and
30 | // any express or implied warranties, including, but not limited to, the implied
31 | // warranties of merchantability and fitness for a particular purpose are disclaimed.
32 | // In no event shall the OpenCV Foundation or contributors be liable for any direct,
33 | // indirect, incidental, special, exemplary, or consequential damages
34 | // (including, but not limited to, procurement of substitute goods or services;
35 | // loss of use, data, or profits; or business interruption) however caused
36 | // and on any theory of liability, whether in contract, strict liability,
37 | // or tort (including negligence or otherwise) arising in any way out of
38 | // the use of this software, even if advised of the possibility of such damage.
39 | //
40 | //M*/
41 |
42 | #ifndef OPENCV_CORE_OCL_RUNTIME_OPENCL_GL_HPP
43 | #define OPENCV_CORE_OCL_RUNTIME_OPENCL_GL_HPP
44 |
45 | #if defined HAVE_OPENCL && defined HAVE_OPENGL
46 |
47 | #include "opencl_core.hpp"
48 |
49 | #include "autogenerated/opencl_gl.hpp"
50 |
51 | #endif // defined HAVE_OPENCL && defined HAVE_OPENGL
52 |
53 | #endif // OPENCV_CORE_OCL_RUNTIME_OPENCL_GL_HPP
54 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/core/opencl/runtime/opencl_gl_wrappers.hpp:
--------------------------------------------------------------------------------
1 | /*M///////////////////////////////////////////////////////////////////////////////////////
2 | //
3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
4 | //
5 | // By downloading, copying, installing or using the software you agree to this license.
6 | // If you do not agree to this license, do not download, install,
7 | // copy or use the software.
8 | //
9 | //
10 | // License Agreement
11 | // For Open Source Computer Vision Library
12 | //
13 | // Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved.
14 | // Third party copyrights are property of their respective owners.
15 | //
16 | // Redistribution and use in source and binary forms, with or without modification,
17 | // are permitted provided that the following conditions are met:
18 | //
19 | // * Redistribution's of source code must retain the above copyright notice,
20 | // this list of conditions and the following disclaimer.
21 | //
22 | // * Redistribution's in binary form must reproduce the above copyright notice,
23 | // this list of conditions and the following disclaimer in the documentation
24 | // and/or other materials provided with the distribution.
25 | //
26 | // * The name of the copyright holders may not be used to endorse or promote products
27 | // derived from this software without specific prior written permission.
28 | //
29 | // This software is provided by the copyright holders and contributors "as is" and
30 | // any express or implied warranties, including, but not limited to, the implied
31 | // warranties of merchantability and fitness for a particular purpose are disclaimed.
32 | // In no event shall the OpenCV Foundation or contributors be liable for any direct,
33 | // indirect, incidental, special, exemplary, or consequential damages
34 | // (including, but not limited to, procurement of substitute goods or services;
35 | // loss of use, data, or profits; or business interruption) however caused
36 | // and on any theory of liability, whether in contract, strict liability,
37 | // or tort (including negligence or otherwise) arising in any way out of
38 | // the use of this software, even if advised of the possibility of such damage.
39 | //
40 | //M*/
41 |
42 | #ifndef OPENCV_CORE_OCL_RUNTIME_OPENCL_GL_WRAPPERS_HPP
43 | #define OPENCV_CORE_OCL_RUNTIME_OPENCL_GL_WRAPPERS_HPP
44 |
45 | #include "autogenerated/opencl_gl_wrappers.hpp"
46 |
47 | #endif // OPENCV_CORE_OCL_RUNTIME_OPENCL_GL_WRAPPERS_HPP
48 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/core/opencl/runtime/opencl_svm_20.hpp:
--------------------------------------------------------------------------------
1 | /* See LICENSE file in the root OpenCV directory */
2 |
3 | #ifndef OPENCV_CORE_OCL_RUNTIME_OPENCL_SVM_2_0_HPP
4 | #define OPENCV_CORE_OCL_RUNTIME_OPENCL_SVM_2_0_HPP
5 |
6 | #if defined(HAVE_OPENCL_SVM)
7 | #include "opencl_core.hpp"
8 |
9 | #include "opencl_svm_definitions.hpp"
10 |
11 | #undef clSVMAlloc
12 | #define clSVMAlloc clSVMAlloc_pfn
13 | #undef clSVMFree
14 | #define clSVMFree clSVMFree_pfn
15 | #undef clSetKernelArgSVMPointer
16 | #define clSetKernelArgSVMPointer clSetKernelArgSVMPointer_pfn
17 | #undef clSetKernelExecInfo
18 | //#define clSetKernelExecInfo clSetKernelExecInfo_pfn
19 | #undef clEnqueueSVMFree
20 | //#define clEnqueueSVMFree clEnqueueSVMFree_pfn
21 | #undef clEnqueueSVMMemcpy
22 | #define clEnqueueSVMMemcpy clEnqueueSVMMemcpy_pfn
23 | #undef clEnqueueSVMMemFill
24 | #define clEnqueueSVMMemFill clEnqueueSVMMemFill_pfn
25 | #undef clEnqueueSVMMap
26 | #define clEnqueueSVMMap clEnqueueSVMMap_pfn
27 | #undef clEnqueueSVMUnmap
28 | #define clEnqueueSVMUnmap clEnqueueSVMUnmap_pfn
29 |
30 | extern CL_RUNTIME_EXPORT void* (CL_API_CALL *clSVMAlloc)(cl_context context, cl_svm_mem_flags flags, size_t size, unsigned int alignment);
31 | extern CL_RUNTIME_EXPORT void (CL_API_CALL *clSVMFree)(cl_context context, void* svm_pointer);
32 | extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL *clSetKernelArgSVMPointer)(cl_kernel kernel, cl_uint arg_index, const void* arg_value);
33 | //extern CL_RUNTIME_EXPORT void* (CL_API_CALL *clSetKernelExecInfo)(cl_kernel kernel, cl_kernel_exec_info param_name, size_t param_value_size, const void* param_value);
34 | //extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL *clEnqueueSVMFree)(cl_command_queue command_queue, cl_uint num_svm_pointers, void* svm_pointers[],
35 | // void (CL_CALLBACK *pfn_free_func)(cl_command_queue queue, cl_uint num_svm_pointers, void* svm_pointers[], void* user_data), void* user_data,
36 | // cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);
37 | extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL *clEnqueueSVMMemcpy)(cl_command_queue command_queue, cl_bool blocking_copy, void* dst_ptr, const void* src_ptr, size_t size,
38 | cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);
39 | extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL *clEnqueueSVMMemFill)(cl_command_queue command_queue, void* svm_ptr, const void* pattern, size_t pattern_size, size_t size,
40 | cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);
41 | extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL *clEnqueueSVMMap)(cl_command_queue command_queue, cl_bool blocking_map, cl_map_flags map_flags, void* svm_ptr, size_t size,
42 | cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);
43 | extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL *clEnqueueSVMUnmap)(cl_command_queue command_queue, void* svm_ptr,
44 | cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);
45 |
46 | #endif // HAVE_OPENCL_SVM
47 |
48 | #endif // OPENCV_CORE_OCL_RUNTIME_OPENCL_SVM_2_0_HPP
49 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/core/opencl/runtime/opencl_svm_definitions.hpp:
--------------------------------------------------------------------------------
1 | /* See LICENSE file in the root OpenCV directory */
2 |
3 | #ifndef OPENCV_CORE_OCL_RUNTIME_OPENCL_SVM_DEFINITIONS_HPP
4 | #define OPENCV_CORE_OCL_RUNTIME_OPENCL_SVM_DEFINITIONS_HPP
5 |
6 | #if defined(HAVE_OPENCL_SVM)
7 | #if defined(CL_VERSION_2_0)
8 |
9 | // OpenCL 2.0 contains SVM definitions
10 |
11 | #else
12 |
13 | typedef cl_bitfield cl_device_svm_capabilities;
14 | typedef cl_bitfield cl_svm_mem_flags;
15 | typedef cl_uint cl_kernel_exec_info;
16 |
17 | //
18 | // TODO Add real values after OpenCL 2.0 release
19 | //
20 |
21 | #ifndef CL_DEVICE_SVM_CAPABILITIES
22 | #define CL_DEVICE_SVM_CAPABILITIES 0x1053
23 |
24 | #define CL_DEVICE_SVM_COARSE_GRAIN_BUFFER (1 << 0)
25 | #define CL_DEVICE_SVM_FINE_GRAIN_BUFFER (1 << 1)
26 | #define CL_DEVICE_SVM_FINE_GRAIN_SYSTEM (1 << 2)
27 | #define CL_DEVICE_SVM_ATOMICS (1 << 3)
28 | #endif
29 |
30 | #ifndef CL_MEM_SVM_FINE_GRAIN_BUFFER
31 | #define CL_MEM_SVM_FINE_GRAIN_BUFFER (1 << 10)
32 | #endif
33 |
34 | #ifndef CL_MEM_SVM_ATOMICS
35 | #define CL_MEM_SVM_ATOMICS (1 << 11)
36 | #endif
37 |
38 |
39 | #endif // CL_VERSION_2_0
40 | #endif // HAVE_OPENCL_SVM
41 |
42 | #endif // OPENCV_CORE_OCL_RUNTIME_OPENCL_SVM_DEFINITIONS_HPP
43 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/core/ovx.hpp:
--------------------------------------------------------------------------------
1 | // This file is part of OpenCV project.
2 | // It is subject to the license terms in the LICENSE file found in the top-level directory
3 | // of this distribution and at http://opencv.org/license.html.
4 |
5 | // Copyright (C) 2016, Intel Corporation, all rights reserved.
6 | // Third party copyrights are property of their respective owners.
7 |
8 | // OpenVX related definitions and declarations
9 |
10 | #pragma once
11 | #ifndef OPENCV_OVX_HPP
12 | #define OPENCV_OVX_HPP
13 |
14 | #include "cvdef.h"
15 |
16 | namespace cv
17 | {
18 | /// Check if use of OpenVX is possible
19 | CV_EXPORTS_W bool haveOpenVX();
20 |
21 | /// Check if use of OpenVX is enabled
22 | CV_EXPORTS_W bool useOpenVX();
23 |
24 | /// Enable/disable use of OpenVX
25 | CV_EXPORTS_W void setUseOpenVX(bool flag);
26 | } // namespace cv
27 |
28 | #endif // OPENCV_OVX_HPP
29 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/core/simd_intrinsics.hpp:
--------------------------------------------------------------------------------
1 | // This file is part of OpenCV project.
2 | // It is subject to the license terms in the LICENSE file found in the top-level directory
3 | // of this distribution and at http://opencv.org/license.html.
4 |
5 | #ifndef OPENCV_CORE_SIMD_INTRINSICS_HPP
6 | #define OPENCV_CORE_SIMD_INTRINSICS_HPP
7 |
8 | /**
9 | Helper header to support SIMD intrinsics (universal intrinsics) in user code.
10 | Intrinsics documentation: https://docs.opencv.org/master/df/d91/group__core__hal__intrin.html
11 |
12 |
13 | Checks of target CPU instruction set based on compiler definitions don't work well enough.
14 | More reliable solutions require utilization of configuration systems (like CMake).
15 |
16 | So, probably you need to specify your own configuration.
17 |
18 | You can do that via CMake in this way:
19 | add_definitions(/DOPENCV_SIMD_CONFIG_HEADER=opencv_simd_config_custom.hpp)
20 | or
21 | add_definitions(/DOPENCV_SIMD_CONFIG_INCLUDE_DIR=1)
22 |
23 | Additionally you may need to add include directory to your files:
24 | include_directories("${CMAKE_CURRENT_LIST_DIR}/opencv_config_${MYTARGET}")
25 |
26 | These files can be pre-generated for target configurations of your application
27 | or generated by CMake on the fly (use CMAKE_BINARY_DIR for that).
28 |
29 | Notes:
30 | - H/W capability checks are still responsibility of your application
31 | - runtime dispatching is not covered by this helper header
32 | */
33 |
34 | #ifdef __OPENCV_BUILD
35 | #error "Use core/hal/intrin.hpp during OpenCV build"
36 | #endif
37 |
38 | #ifdef OPENCV_HAL_INTRIN_HPP
39 | #error "core/simd_intrinsics.hpp must be included before core/hal/intrin.hpp"
40 | #endif
41 |
42 | #include "opencv2/core/cvdef.h"
43 | #include "opencv2/core/version.hpp"
44 |
45 | #ifdef OPENCV_SIMD_CONFIG_HEADER
46 | #include CVAUX_STR(OPENCV_SIMD_CONFIG_HEADER)
47 | #elif defined(OPENCV_SIMD_CONFIG_INCLUDE_DIR)
48 | #include "opencv_simd_config.hpp" // corresponding directory should be added via -I compiler parameter
49 | #else // custom config headers
50 |
51 | #if (!defined(CV_AVX_512F) || !CV_AVX_512F) && (defined(__AVX512__) || defined(__AVX512F__))
52 | # include
53 | # undef CV_AVX_512F
54 | # define CV_AVX_512F 1
55 | # ifndef OPENCV_SIMD_DONT_ASSUME_SKX // Skylake-X with AVX-512F/CD/BW/DQ/VL
56 | # undef CV_AVX512_SKX
57 | # define CV_AVX512_SKX 1
58 | # undef CV_AVX_512CD
59 | # define CV_AVX_512CD 1
60 | # undef CV_AVX_512BW
61 | # define CV_AVX_512BW 1
62 | # undef CV_AVX_512DQ
63 | # define CV_AVX_512DQ 1
64 | # undef CV_AVX_512VL
65 | # define CV_AVX_512VL 1
66 | # endif
67 | #endif // AVX512
68 |
69 | // GCC/Clang: -mavx2
70 | // MSVC: /arch:AVX2
71 | #if defined __AVX2__
72 | # include
73 | # undef CV_AVX2
74 | # define CV_AVX2 1
75 | # if defined __F16C__
76 | # undef CV_FP16
77 | # define CV_FP16 1
78 | # endif
79 | #endif
80 |
81 | #endif
82 |
83 | // SSE / NEON / VSX is handled by cv_cpu_dispatch.h compatibility block
84 | #include "cv_cpu_dispatch.h"
85 |
86 | #include "hal/intrin.hpp"
87 |
88 | #endif // OPENCV_CORE_SIMD_INTRINSICS_HPP
89 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/core/utils/allocator_stats.hpp:
--------------------------------------------------------------------------------
1 | // This file is part of OpenCV project.
2 | // It is subject to the license terms in the LICENSE file found in the top-level directory
3 | // of this distribution and at http://opencv.org/license.html.
4 |
5 | #ifndef OPENCV_CORE_ALLOCATOR_STATS_HPP
6 | #define OPENCV_CORE_ALLOCATOR_STATS_HPP
7 |
8 | #include "../cvdef.h"
9 |
10 | namespace cv { namespace utils {
11 |
12 | class AllocatorStatisticsInterface
13 | {
14 | protected:
15 | AllocatorStatisticsInterface() {}
16 | virtual ~AllocatorStatisticsInterface() {}
17 | public:
18 | virtual uint64_t getCurrentUsage() const = 0;
19 | virtual uint64_t getTotalUsage() const = 0;
20 | virtual uint64_t getNumberOfAllocations() const = 0;
21 | virtual uint64_t getPeakUsage() const = 0;
22 |
23 | /** set peak usage = current usage */
24 | virtual void resetPeakUsage() = 0;
25 | };
26 |
27 | }} // namespace
28 |
29 | #endif // OPENCV_CORE_ALLOCATOR_STATS_HPP
30 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/core/utils/filesystem.hpp:
--------------------------------------------------------------------------------
1 | // This file is part of OpenCV project.
2 | // It is subject to the license terms in the LICENSE file found in the top-level directory
3 | // of this distribution and at http://opencv.org/license.html.
4 |
5 | #ifndef OPENCV_UTILS_FILESYSTEM_HPP
6 | #define OPENCV_UTILS_FILESYSTEM_HPP
7 |
8 | namespace cv { namespace utils { namespace fs {
9 |
10 |
11 | CV_EXPORTS bool exists(const cv::String& path);
12 | CV_EXPORTS bool isDirectory(const cv::String& path);
13 |
14 | CV_EXPORTS void remove_all(const cv::String& path);
15 |
16 |
17 | CV_EXPORTS cv::String getcwd();
18 |
19 | /** @brief Converts path p to a canonical absolute path
20 | * Symlinks are processed if there is support for them on running platform.
21 | *
22 | * @param path input path. Target file/directory should exist.
23 | */
24 | CV_EXPORTS cv::String canonical(const cv::String& path);
25 |
26 | /** Join path components */
27 | CV_EXPORTS cv::String join(const cv::String& base, const cv::String& path);
28 |
29 | /** Get parent directory */
30 | CV_EXPORTS cv::String getParent(const cv::String &path);
31 | CV_EXPORTS std::wstring getParent(const std::wstring& path);
32 |
33 | /**
34 | * Generate a list of all files that match the globbing pattern.
35 | *
36 | * Result entries are prefixed by base directory path.
37 | *
38 | * @param directory base directory
39 | * @param pattern filter pattern (based on '*'/'?' symbols). Use empty string to disable filtering and return all results
40 | * @param[out] result result of globing.
41 | * @param recursive scan nested directories too
42 | * @param includeDirectories include directories into results list
43 | */
44 | CV_EXPORTS void glob(const cv::String& directory, const cv::String& pattern,
45 | CV_OUT std::vector& result,
46 | bool recursive = false, bool includeDirectories = false);
47 |
48 | /**
49 | * Generate a list of all files that match the globbing pattern.
50 | *
51 | * @param directory base directory
52 | * @param pattern filter pattern (based on '*'/'?' symbols). Use empty string to disable filtering and return all results
53 | * @param[out] result globbing result with relative paths from base directory
54 | * @param recursive scan nested directories too
55 | * @param includeDirectories include directories into results list
56 | */
57 | CV_EXPORTS void glob_relative(const cv::String& directory, const cv::String& pattern,
58 | CV_OUT std::vector& result,
59 | bool recursive = false, bool includeDirectories = false);
60 |
61 |
62 | CV_EXPORTS bool createDirectory(const cv::String& path);
63 | CV_EXPORTS bool createDirectories(const cv::String& path);
64 |
65 | #ifdef __OPENCV_BUILD
66 | // TODO
67 | //CV_EXPORTS cv::String getTempDirectory();
68 |
69 | /**
70 | * @brief Returns directory to store OpenCV cache files
71 | * Create sub-directory in common OpenCV cache directory if it doesn't exist.
72 | * @param sub_directory_name name of sub-directory. NULL or "" value asks to return root cache directory.
73 | * @param configuration_name optional name of configuration parameter name which overrides default behavior.
74 | * @return Path to cache directory. Returns empty string if cache directories support is not available. Returns "disabled" if cache disabled by user.
75 | */
76 | CV_EXPORTS cv::String getCacheDirectory(const char* sub_directory_name, const char* configuration_name = NULL);
77 |
78 | #endif
79 |
80 | }}} // namespace
81 |
82 | #endif // OPENCV_UTILS_FILESYSTEM_HPP
83 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/core/utils/logger.defines.hpp:
--------------------------------------------------------------------------------
1 | // This file is part of OpenCV project.
2 | // It is subject to the license terms in the LICENSE file found in the top-level directory
3 | // of this distribution and at http://opencv.org/license.html.
4 |
5 | #ifndef OPENCV_LOGGER_DEFINES_HPP
6 | #define OPENCV_LOGGER_DEFINES_HPP
7 |
8 | //! @addtogroup core_logging
9 | //! @{
10 |
11 | // Supported logging levels and their semantic
12 | #define CV_LOG_LEVEL_SILENT 0 //!< for using in setLogLevel() call
13 | #define CV_LOG_LEVEL_FATAL 1 //!< Fatal (critical) error (unrecoverable internal error)
14 | #define CV_LOG_LEVEL_ERROR 2 //!< Error message
15 | #define CV_LOG_LEVEL_WARN 3 //!< Warning message
16 | #define CV_LOG_LEVEL_INFO 4 //!< Info message
17 | #define CV_LOG_LEVEL_DEBUG 5 //!< Debug message. Disabled in the "Release" build.
18 | #define CV_LOG_LEVEL_VERBOSE 6 //!< Verbose (trace) messages. Requires verbosity level. Disabled in the "Release" build.
19 |
20 | namespace cv {
21 | namespace utils {
22 | namespace logging {
23 |
24 | //! Supported logging levels and their semantic
25 | enum LogLevel {
26 | LOG_LEVEL_SILENT = 0, //!< for using in setLogVevel() call
27 | LOG_LEVEL_FATAL = 1, //!< Fatal (critical) error (unrecoverable internal error)
28 | LOG_LEVEL_ERROR = 2, //!< Error message
29 | LOG_LEVEL_WARNING = 3, //!< Warning message
30 | LOG_LEVEL_INFO = 4, //!< Info message
31 | LOG_LEVEL_DEBUG = 5, //!< Debug message. Disabled in the "Release" build.
32 | LOG_LEVEL_VERBOSE = 6, //!< Verbose (trace) messages. Requires verbosity level. Disabled in the "Release" build.
33 | #ifndef CV_DOXYGEN
34 | ENUM_LOG_LEVEL_FORCE_INT = INT_MAX
35 | #endif
36 | };
37 |
38 | }}} // namespace
39 |
40 | //! @}
41 |
42 | #endif // OPENCV_LOGGER_DEFINES_HPP
43 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/core/utils/logtag.hpp:
--------------------------------------------------------------------------------
1 | // This file is part of OpenCV project.
2 | // It is subject to the license terms in the LICENSE file found in the top-level directory
3 | // of this distribution and at http://opencv.org/license.html.
4 |
5 | #ifndef OPENCV_CORE_LOGTAG_HPP
6 | #define OPENCV_CORE_LOGTAG_HPP
7 |
8 | #include "opencv2/core/cvstd.hpp"
9 | #include "logger.defines.hpp"
10 |
11 | namespace cv {
12 | namespace utils {
13 | namespace logging {
14 |
15 | struct LogTag
16 | {
17 | const char* name;
18 | LogLevel level;
19 |
20 | inline LogTag(const char* _name, LogLevel _level)
21 | : name(_name)
22 | , level(_level)
23 | {}
24 | };
25 |
26 | }}}
27 |
28 | #endif
29 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/core/va_intel.hpp:
--------------------------------------------------------------------------------
1 | // This file is part of OpenCV project.
2 | // It is subject to the license terms in the LICENSE file found in the top-level directory
3 | // of this distribution and at http://opencv.org/license.html.
4 |
5 | // Copyright (C) 2015, Itseez, Inc., all rights reserved.
6 | // Third party copyrights are property of their respective owners.
7 |
8 | #ifndef OPENCV_CORE_VA_INTEL_HPP
9 | #define OPENCV_CORE_VA_INTEL_HPP
10 |
11 | #ifndef __cplusplus
12 | # error va_intel.hpp header must be compiled as C++
13 | #endif
14 |
15 | #include "opencv2/core.hpp"
16 | #include "ocl.hpp"
17 |
18 | #if defined(HAVE_VA)
19 | # include "va/va.h"
20 | #else // HAVE_VA
21 | # if !defined(_VA_H_)
22 | typedef void* VADisplay;
23 | typedef unsigned int VASurfaceID;
24 | # endif // !_VA_H_
25 | #endif // HAVE_VA
26 |
27 | namespace cv { namespace va_intel {
28 |
29 | /** @addtogroup core_va_intel
30 | This section describes Intel VA-API/OpenCL (CL-VA) interoperability.
31 |
32 | To enable basic VA interoperability build OpenCV with libva library integration enabled: `-DWITH_VA=ON` (corresponding dev package should be installed).
33 |
34 | To enable advanced CL-VA interoperability support on Intel HW, enable option: `-DWITH_VA_INTEL=ON` (OpenCL integration should be enabled which is the default setting). Special runtime environment should be set up in order to use this feature: correct combination of [libva](https://github.com/intel/libva), [OpenCL runtime](https://github.com/intel/compute-runtime) and [media driver](https://github.com/intel/media-driver) should be installed.
35 |
36 | Check usage example for details: samples/va_intel/va_intel_interop.cpp
37 | */
38 | //! @{
39 |
40 | /////////////////// CL-VA Interoperability Functions ///////////////////
41 |
42 | namespace ocl {
43 | using namespace cv::ocl;
44 |
45 | // TODO static functions in the Context class
46 | /** @brief Creates OpenCL context from VA.
47 | @param display - VADisplay for which CL interop should be established.
48 | @param tryInterop - try to set up for interoperability, if true; set up for use slow copy if false.
49 | @return Returns reference to OpenCL Context
50 | */
51 | CV_EXPORTS Context& initializeContextFromVA(VADisplay display, bool tryInterop = true);
52 |
53 | } // namespace cv::va_intel::ocl
54 |
55 | /** @brief Converts InputArray to VASurfaceID object.
56 | @param display - VADisplay object.
57 | @param src - source InputArray.
58 | @param surface - destination VASurfaceID object.
59 | @param size - size of image represented by VASurfaceID object.
60 | */
61 | CV_EXPORTS void convertToVASurface(VADisplay display, InputArray src, VASurfaceID surface, Size size);
62 |
63 | /** @brief Converts VASurfaceID object to OutputArray.
64 | @param display - VADisplay object.
65 | @param surface - source VASurfaceID object.
66 | @param size - size of image represented by VASurfaceID object.
67 | @param dst - destination OutputArray.
68 | */
69 | CV_EXPORTS void convertFromVASurface(VADisplay display, VASurfaceID surface, Size size, OutputArray dst);
70 |
71 | //! @}
72 |
73 | }} // namespace cv::va_intel
74 |
75 | #endif /* OPENCV_CORE_VA_INTEL_HPP */
76 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/core/version.hpp:
--------------------------------------------------------------------------------
1 | // This file is part of OpenCV project.
2 | // It is subject to the license terms in the LICENSE file found in the top-level directory
3 | // of this distribution and at http://opencv.org/license.html.
4 |
5 | #ifndef OPENCV_VERSION_HPP
6 | #define OPENCV_VERSION_HPP
7 |
8 | #define CV_VERSION_MAJOR 4
9 | #define CV_VERSION_MINOR 5
10 | #define CV_VERSION_REVISION 0
11 | #define CV_VERSION_STATUS ""
12 |
13 | #define CVAUX_STR_EXP(__A) #__A
14 | #define CVAUX_STR(__A) CVAUX_STR_EXP(__A)
15 |
16 | #define CVAUX_STRW_EXP(__A) L ## #__A
17 | #define CVAUX_STRW(__A) CVAUX_STRW_EXP(__A)
18 |
19 | #define CV_VERSION CVAUX_STR(CV_VERSION_MAJOR) "." CVAUX_STR(CV_VERSION_MINOR) "." CVAUX_STR(CV_VERSION_REVISION) CV_VERSION_STATUS
20 |
21 | /* old style version constants*/
22 | #define CV_MAJOR_VERSION CV_VERSION_MAJOR
23 | #define CV_MINOR_VERSION CV_VERSION_MINOR
24 | #define CV_SUBMINOR_VERSION CV_VERSION_REVISION
25 |
26 | #endif // OPENCV_VERSION_HPP
27 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/dnn/layer.details.hpp:
--------------------------------------------------------------------------------
1 | // This file is part of OpenCV project.
2 | // It is subject to the license terms in the LICENSE file found in the top-level directory
3 | // of this distribution and at http://opencv.org/license.html.
4 | //
5 | #ifndef OPENCV_DNN_LAYER_DETAILS_HPP
6 | #define OPENCV_DNN_LAYER_DETAILS_HPP
7 |
8 | #include
9 |
10 | namespace cv {
11 | namespace dnn {
12 | CV__DNN_INLINE_NS_BEGIN
13 |
14 | /** @brief Registers layer constructor in runtime.
15 | * @param type string, containing type name of the layer.
16 | * @param constructorFunc pointer to the function of type LayerRegister::Constructor, which creates the layer.
17 | * @details This macros must be placed inside the function code.
18 | */
19 | #define CV_DNN_REGISTER_LAYER_FUNC(type, constructorFunc) \
20 | cv::dnn::LayerFactory::registerLayer(#type, constructorFunc);
21 |
22 | /** @brief Registers layer class in runtime.
23 | * @param type string, containing type name of the layer.
24 | * @param class C++ class, derived from Layer.
25 | * @details This macros must be placed inside the function code.
26 | */
27 | #define CV_DNN_REGISTER_LAYER_CLASS(type, class) \
28 | cv::dnn::LayerFactory::registerLayer(#type, cv::dnn::details::_layerDynamicRegisterer);
29 |
30 | /** @brief Registers layer constructor on module load time.
31 | * @param type string, containing type name of the layer.
32 | * @param constructorFunc pointer to the function of type LayerRegister::Constructor, which creates the layer.
33 | * @details This macros must be placed outside the function code.
34 | */
35 | #define CV_DNN_REGISTER_LAYER_FUNC_STATIC(type, constructorFunc) \
36 | static cv::dnn::details::_LayerStaticRegisterer __LayerStaticRegisterer_##type(#type, constructorFunc);
37 |
38 | /** @brief Registers layer class on module load time.
39 | * @param type string, containing type name of the layer.
40 | * @param class C++ class, derived from Layer.
41 | * @details This macros must be placed outside the function code.
42 | */
43 | #define CV_DNN_REGISTER_LAYER_CLASS_STATIC(type, class) \
44 | Ptr __LayerStaticRegisterer_func_##type(LayerParams ¶ms) \
45 | { return Ptr(new class(params)); } \
46 | static cv::dnn::details::_LayerStaticRegisterer __LayerStaticRegisterer_##type(#type, __LayerStaticRegisterer_func_##type);
47 |
48 | namespace details {
49 |
50 | template
51 | Ptr _layerDynamicRegisterer(LayerParams ¶ms)
52 | {
53 | return Ptr(LayerClass::create(params));
54 | }
55 |
56 | //allows automatically register created layer on module load time
57 | class _LayerStaticRegisterer
58 | {
59 | String type;
60 | public:
61 |
62 | _LayerStaticRegisterer(const String &layerType, LayerFactory::Constructor layerConstructor)
63 | {
64 | this->type = layerType;
65 | LayerFactory::registerLayer(layerType, layerConstructor);
66 | }
67 |
68 | ~_LayerStaticRegisterer()
69 | {
70 | LayerFactory::unregisterLayer(type);
71 | }
72 | };
73 |
74 | } // namespace
75 | CV__DNN_INLINE_NS_END
76 | }} // namespace
77 |
78 | #endif
79 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/dnn/layer.hpp:
--------------------------------------------------------------------------------
1 | /*M///////////////////////////////////////////////////////////////////////////////////////
2 | //
3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
4 | //
5 | // By downloading, copying, installing or using the software you agree to this license.
6 | // If you do not agree to this license, do not download, install,
7 | // copy or use the software.
8 | //
9 | //
10 | // License Agreement
11 | // For Open Source Computer Vision Library
12 | //
13 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved.
14 | // Third party copyrights are property of their respective owners.
15 | //
16 | // Redistribution and use in source and binary forms, with or without modification,
17 | // are permitted provided that the following conditions are met:
18 | //
19 | // * Redistribution's of source code must retain the above copyright notice,
20 | // this list of conditions and the following disclaimer.
21 | //
22 | // * Redistribution's in binary form must reproduce the above copyright notice,
23 | // this list of conditions and the following disclaimer in the documentation
24 | // and/or other materials provided with the distribution.
25 | //
26 | // * The name of the copyright holders may not be used to endorse or promote products
27 | // derived from this software without specific prior written permission.
28 | //
29 | // This software is provided by the copyright holders and contributors "as is" and
30 | // any express or implied warranties, including, but not limited to, the implied
31 | // warranties of merchantability and fitness for a particular purpose are disclaimed.
32 | // In no event shall the Intel Corporation or contributors be liable for any direct,
33 | // indirect, incidental, special, exemplary, or consequential damages
34 | // (including, but not limited to, procurement of substitute goods or services;
35 | // loss of use, data, or profits; or business interruption) however caused
36 | // and on any theory of liability, whether in contract, strict liability,
37 | // or tort (including negligence or otherwise) arising in any way out of
38 | // the use of this software, even if advised of the possibility of such damage.
39 | //
40 | //M*/
41 |
42 | #ifndef OPENCV_DNN_LAYER_HPP
43 | #define OPENCV_DNN_LAYER_HPP
44 | #include
45 |
46 | namespace cv {
47 | namespace dnn {
48 | CV__DNN_INLINE_NS_BEGIN
49 | //! @addtogroup dnn
50 | //! @{
51 | //!
52 | //! @defgroup dnnLayerFactory Utilities for New Layers Registration
53 | //! @{
54 |
55 | /** @brief %Layer factory allows to create instances of registered layers. */
56 | class CV_EXPORTS LayerFactory
57 | {
58 | public:
59 |
60 | //! Each Layer class must provide this function to the factory
61 | typedef Ptr(*Constructor)(LayerParams ¶ms);
62 |
63 | //! Registers the layer class with typename @p type and specified @p constructor. Thread-safe.
64 | static void registerLayer(const String &type, Constructor constructor);
65 |
66 | //! Unregisters registered layer with specified type name. Thread-safe.
67 | static void unregisterLayer(const String &type);
68 |
69 | /** @brief Creates instance of registered layer.
70 | * @param type type name of creating layer.
71 | * @param params parameters which will be used for layer initialization.
72 | * @note Thread-safe.
73 | */
74 | static Ptr createLayerInstance(const String &type, LayerParams& params);
75 |
76 | private:
77 | LayerFactory();
78 | };
79 |
80 | //! @}
81 | //! @}
82 | CV__DNN_INLINE_NS_END
83 | }
84 | }
85 | #endif
86 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/dnn/utils/inference_engine.hpp:
--------------------------------------------------------------------------------
1 | // This file is part of OpenCV project.
2 | // It is subject to the license terms in the LICENSE file found in the top-level directory
3 | // of this distribution and at http://opencv.org/license.html.
4 | //
5 | // Copyright (C) 2018-2019, Intel Corporation, all rights reserved.
6 | // Third party copyrights are property of their respective owners.
7 |
8 | #ifndef OPENCV_DNN_UTILS_INF_ENGINE_HPP
9 | #define OPENCV_DNN_UTILS_INF_ENGINE_HPP
10 |
11 | #include "../dnn.hpp"
12 |
13 | namespace cv { namespace dnn {
14 | CV__DNN_INLINE_NS_BEGIN
15 |
16 |
17 | /* Values for 'OPENCV_DNN_BACKEND_INFERENCE_ENGINE_TYPE' parameter */
18 | #define CV_DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_API "NN_BUILDER"
19 | #define CV_DNN_BACKEND_INFERENCE_ENGINE_NGRAPH "NGRAPH"
20 |
21 | /** @brief Returns Inference Engine internal backend API.
22 | *
23 | * See values of `CV_DNN_BACKEND_INFERENCE_ENGINE_*` macros.
24 | *
25 | * Default value is controlled through `OPENCV_DNN_BACKEND_INFERENCE_ENGINE_TYPE` runtime parameter (environment variable).
26 | */
27 | CV_EXPORTS_W cv::String getInferenceEngineBackendType();
28 |
29 | /** @brief Specify Inference Engine internal backend API.
30 | *
31 | * See values of `CV_DNN_BACKEND_INFERENCE_ENGINE_*` macros.
32 | *
33 | * @returns previous value of internal backend API
34 | */
35 | CV_EXPORTS_W cv::String setInferenceEngineBackendType(const cv::String& newBackendType);
36 |
37 |
38 | /** @brief Release a Myriad device (binded by OpenCV).
39 | *
40 | * Single Myriad device cannot be shared across multiple processes which uses
41 | * Inference Engine's Myriad plugin.
42 | */
43 | CV_EXPORTS_W void resetMyriadDevice();
44 |
45 |
46 | /* Values for 'OPENCV_DNN_IE_VPU_TYPE' parameter */
47 | #define CV_DNN_INFERENCE_ENGINE_VPU_TYPE_UNSPECIFIED ""
48 | /// Intel(R) Movidius(TM) Neural Compute Stick, NCS (USB 03e7:2150), Myriad2 (https://software.intel.com/en-us/movidius-ncs)
49 | #define CV_DNN_INFERENCE_ENGINE_VPU_TYPE_MYRIAD_2 "Myriad2"
50 | /// Intel(R) Neural Compute Stick 2, NCS2 (USB 03e7:2485), MyriadX (https://software.intel.com/ru-ru/neural-compute-stick)
51 | #define CV_DNN_INFERENCE_ENGINE_VPU_TYPE_MYRIAD_X "MyriadX"
52 |
53 |
54 | /** @brief Returns Inference Engine VPU type.
55 | *
56 | * See values of `CV_DNN_INFERENCE_ENGINE_VPU_TYPE_*` macros.
57 | */
58 | CV_EXPORTS_W cv::String getInferenceEngineVPUType();
59 |
60 |
61 | CV__DNN_INLINE_NS_END
62 | }} // namespace
63 |
64 | #endif // OPENCV_DNN_UTILS_INF_ENGINE_HPP
65 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/dnn/version.hpp:
--------------------------------------------------------------------------------
1 | // This file is part of OpenCV project.
2 | // It is subject to the license terms in the LICENSE file found in the top-level directory
3 | // of this distribution and at http://opencv.org/license.html.
4 |
5 | #ifndef OPENCV_DNN_VERSION_HPP
6 | #define OPENCV_DNN_VERSION_HPP
7 |
8 | /// Use with major OpenCV version only.
9 | #define OPENCV_DNN_API_VERSION 20200908
10 |
11 | #if !defined CV_DOXYGEN && !defined CV_STATIC_ANALYSIS && !defined CV_DNN_DONT_ADD_INLINE_NS
12 | #define CV__DNN_INLINE_NS __CV_CAT(dnn4_v, OPENCV_DNN_API_VERSION)
13 | #define CV__DNN_INLINE_NS_BEGIN namespace CV__DNN_INLINE_NS {
14 | #define CV__DNN_INLINE_NS_END }
15 | namespace cv { namespace dnn { namespace CV__DNN_INLINE_NS { } using namespace CV__DNN_INLINE_NS; }}
16 | #else
17 | #define CV__DNN_INLINE_NS_BEGIN
18 | #define CV__DNN_INLINE_NS_END
19 | #endif
20 |
21 | #endif // OPENCV_DNN_VERSION_HPP
22 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/features2d/features2d.hpp:
--------------------------------------------------------------------------------
1 | /*M///////////////////////////////////////////////////////////////////////////////////////
2 | //
3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
4 | //
5 | // By downloading, copying, installing or using the software you agree to this license.
6 | // If you do not agree to this license, do not download, install,
7 | // copy or use the software.
8 | //
9 | //
10 | // License Agreement
11 | // For Open Source Computer Vision Library
12 | //
13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved.
15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved.
16 | // Third party copyrights are property of their respective owners.
17 | //
18 | // Redistribution and use in source and binary forms, with or without modification,
19 | // are permitted provided that the following conditions are met:
20 | //
21 | // * Redistribution's of source code must retain the above copyright notice,
22 | // this list of conditions and the following disclaimer.
23 | //
24 | // * Redistribution's in binary form must reproduce the above copyright notice,
25 | // this list of conditions and the following disclaimer in the documentation
26 | // and/or other materials provided with the distribution.
27 | //
28 | // * The name of the copyright holders may not be used to endorse or promote products
29 | // derived from this software without specific prior written permission.
30 | //
31 | // This software is provided by the copyright holders and contributors "as is" and
32 | // any express or implied warranties, including, but not limited to, the implied
33 | // warranties of merchantability and fitness for a particular purpose are disclaimed.
34 | // In no event shall the Intel Corporation or contributors be liable for any direct,
35 | // indirect, incidental, special, exemplary, or consequential damages
36 | // (including, but not limited to, procurement of substitute goods or services;
37 | // loss of use, data, or profits; or business interruption) however caused
38 | // and on any theory of liability, whether in contract, strict liability,
39 | // or tort (including negligence or otherwise) arising in any way out of
40 | // the use of this software, even if advised of the possibility of such damage.
41 | //
42 | //M*/
43 |
44 | #ifdef __OPENCV_BUILD
45 | #error this is a compatibility header which should not be used inside the OpenCV library
46 | #endif
47 |
48 | #include "opencv2/features2d.hpp"
49 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/features2d/hal/interface.h:
--------------------------------------------------------------------------------
1 | #ifndef OPENCV_FEATURE2D_HAL_INTERFACE_H
2 | #define OPENCV_FEATURE2D_HAL_INTERFACE_H
3 |
4 | #include "opencv2/core/cvdef.h"
5 | //! @addtogroup features2d_hal_interface
6 | //! @{
7 |
8 | //! @name Fast feature detector types
9 | //! @sa cv::FastFeatureDetector
10 | //! @{
11 | #define CV_HAL_TYPE_5_8 0
12 | #define CV_HAL_TYPE_7_12 1
13 | #define CV_HAL_TYPE_9_16 2
14 | //! @}
15 |
16 | //! @name Key point
17 | //! @sa cv::KeyPoint
18 | //! @{
19 | struct CV_EXPORTS cvhalKeyPoint
20 | {
21 | float x;
22 | float y;
23 | float size;
24 | float angle;
25 | float response;
26 | int octave;
27 | int class_id;
28 | };
29 | //! @}
30 |
31 | //! @}
32 |
33 | #endif
34 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/flann/config.h:
--------------------------------------------------------------------------------
1 | /***********************************************************************
2 | * Software License Agreement (BSD License)
3 | *
4 | * Copyright 2008-2011 Marius Muja (mariusm@cs.ubc.ca). All rights reserved.
5 | * Copyright 2008-2011 David G. Lowe (lowe@cs.ubc.ca). All rights reserved.
6 | *
7 | * Redistribution and use in source and binary forms, with or without
8 | * modification, are permitted provided that the following conditions
9 | * are met:
10 | *
11 | * 1. Redistributions of source code must retain the above copyright
12 | * notice, this list of conditions and the following disclaimer.
13 | * 2. Redistributions in binary form must reproduce the above copyright
14 | * notice, this list of conditions and the following disclaimer in the
15 | * documentation and/or other materials provided with the distribution.
16 | *
17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 | *************************************************************************/
28 |
29 |
30 | #ifndef OPENCV_FLANN_CONFIG_H_
31 | #define OPENCV_FLANN_CONFIG_H_
32 |
33 | //! @cond IGNORED
34 |
35 | #ifdef FLANN_VERSION_
36 | #undef FLANN_VERSION_
37 | #endif
38 | #define FLANN_VERSION_ "1.6.10"
39 |
40 | //! @endcond
41 |
42 | #endif /* OPENCV_FLANN_CONFIG_H_ */
43 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/flann/dummy.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef OPENCV_FLANN_DUMMY_H_
3 | #define OPENCV_FLANN_DUMMY_H_
4 |
5 | //! @cond IGNORED
6 |
7 | namespace cvflann
8 | {
9 |
10 | CV_DEPRECATED inline void dummyfunc() {}
11 |
12 | }
13 |
14 | //! @endcond
15 |
16 | #endif /* OPENCV_FLANN_DUMMY_H_ */
17 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/flann/flann.hpp:
--------------------------------------------------------------------------------
1 | /*M///////////////////////////////////////////////////////////////////////////////////////
2 | //
3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
4 | //
5 | // By downloading, copying, installing or using the software you agree to this license.
6 | // If you do not agree to this license, do not download, install,
7 | // copy or use the software.
8 | //
9 | //
10 | // License Agreement
11 | // For Open Source Computer Vision Library
12 | //
13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved.
15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved.
16 | // Third party copyrights are property of their respective owners.
17 | //
18 | // Redistribution and use in source and binary forms, with or without modification,
19 | // are permitted provided that the following conditions are met:
20 | //
21 | // * Redistribution's of source code must retain the above copyright notice,
22 | // this list of conditions and the following disclaimer.
23 | //
24 | // * Redistribution's in binary form must reproduce the above copyright notice,
25 | // this list of conditions and the following disclaimer in the documentation
26 | // and/or other materials provided with the distribution.
27 | //
28 | // * The name of the copyright holders may not be used to endorse or promote products
29 | // derived from this software without specific prior written permission.
30 | //
31 | // This software is provided by the copyright holders and contributors "as is" and
32 | // any express or implied warranties, including, but not limited to, the implied
33 | // warranties of merchantability and fitness for a particular purpose are disclaimed.
34 | // In no event shall the Intel Corporation or contributors be liable for any direct,
35 | // indirect, incidental, special, exemplary, or consequential damages
36 | // (including, but not limited to, procurement of substitute goods or services;
37 | // loss of use, data, or profits; or business interruption) however caused
38 | // and on any theory of liability, whether in contract, strict liability,
39 | // or tort (including negligence or otherwise) arising in any way out of
40 | // the use of this software, even if advised of the possibility of such damage.
41 | //
42 | //M*/
43 |
44 | #ifdef __OPENCV_BUILD
45 | #error this is a compatibility header which should not be used inside the OpenCV library
46 | #endif
47 |
48 | #include "opencv2/flann.hpp"
49 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/flann/general.h:
--------------------------------------------------------------------------------
1 | /***********************************************************************
2 | * Software License Agreement (BSD License)
3 | *
4 | * Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved.
5 | * Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved.
6 | *
7 | * THE BSD LICENSE
8 | *
9 | * Redistribution and use in source and binary forms, with or without
10 | * modification, are permitted provided that the following conditions
11 | * are met:
12 | *
13 | * 1. Redistributions of source code must retain the above copyright
14 | * notice, this list of conditions and the following disclaimer.
15 | * 2. Redistributions in binary form must reproduce the above copyright
16 | * notice, this list of conditions and the following disclaimer in the
17 | * documentation and/or other materials provided with the distribution.
18 | *
19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | *************************************************************************/
30 |
31 | #ifndef OPENCV_FLANN_GENERAL_H_
32 | #define OPENCV_FLANN_GENERAL_H_
33 |
34 | //! @cond IGNORED
35 |
36 | #include "opencv2/core.hpp"
37 |
38 | namespace cvflann
39 | {
40 |
41 | class FLANNException : public cv::Exception
42 | {
43 | public:
44 | FLANNException(const char* message) : cv::Exception(0, message, "", __FILE__, __LINE__) { }
45 |
46 | FLANNException(const cv::String& message) : cv::Exception(0, message, "", __FILE__, __LINE__) { }
47 | };
48 |
49 | }
50 |
51 | //! @endcond
52 |
53 | #endif /* OPENCV_FLANN_GENERAL_H_ */
54 |
--------------------------------------------------------------------------------
/OpenCV45Test/app/src/main/cpp/opencv2/flann/object_factory.h:
--------------------------------------------------------------------------------
1 | /***********************************************************************
2 | * Software License Agreement (BSD License)
3 | *
4 | * Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved.
5 | * Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved.
6 | *
7 | * THE BSD LICENSE
8 | *
9 | * Redistribution and use in source and binary forms, with or without
10 | * modification, are permitted provided that the following conditions
11 | * are met:
12 | *
13 | * 1. Redistributions of source code must retain the above copyright
14 | * notice, this list of conditions and the following disclaimer.
15 | * 2. Redistributions in binary form must reproduce the above copyright
16 | * notice, this list of conditions and the following disclaimer in the
17 | * documentation and/or other materials provided with the distribution.
18 | *
19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 | *************************************************************************/
30 |
31 | #ifndef OPENCV_FLANN_OBJECT_FACTORY_H_
32 | #define OPENCV_FLANN_OBJECT_FACTORY_H_
33 |
34 | //! @cond IGNORED
35 |
36 | #include