Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
59ba3365
O
Opencv
项目概览
Greenplum
/
Opencv
11 个月 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
59ba3365
编写于
6月 25, 2020
作者:
G
Giles Payne
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Dynamic build for Objective-C/Swift wrapper
上级
085bd5f5
变更
57
隐藏空白更改
内联
并排
Showing
57 changed file
with
183 addition
and
73 deletion
+183
-73
cmake/OpenCVGenInfoPlist.cmake
cmake/OpenCVGenInfoPlist.cmake
+1
-1
modules/core/misc/objc/common/ByteVector.h
modules/core/misc/objc/common/ByteVector.h
+2
-1
modules/core/misc/objc/common/CVObjcUtil.h
modules/core/misc/objc/common/CVObjcUtil.h
+8
-0
modules/core/misc/objc/common/Converters.h
modules/core/misc/objc/common/Converters.h
+3
-1
modules/core/misc/objc/common/CvType.h
modules/core/misc/objc/common/CvType.h
+3
-1
modules/core/misc/objc/common/DMatch.h
modules/core/misc/objc/common/DMatch.h
+3
-1
modules/core/misc/objc/common/Double2.h
modules/core/misc/objc/common/Double2.h
+3
-6
modules/core/misc/objc/common/Double3.h
modules/core/misc/objc/common/Double3.h
+3
-1
modules/core/misc/objc/common/DoubleVector.h
modules/core/misc/objc/common/DoubleVector.h
+2
-1
modules/core/misc/objc/common/Float4.h
modules/core/misc/objc/common/Float4.h
+3
-1
modules/core/misc/objc/common/Float6.h
modules/core/misc/objc/common/Float6.h
+3
-1
modules/core/misc/objc/common/FloatVector.h
modules/core/misc/objc/common/FloatVector.h
+2
-1
modules/core/misc/objc/common/Int4.h
modules/core/misc/objc/common/Int4.h
+3
-1
modules/core/misc/objc/common/IntVector.h
modules/core/misc/objc/common/IntVector.h
+2
-1
modules/core/misc/objc/common/KeyPoint.h
modules/core/misc/objc/common/KeyPoint.h
+3
-1
modules/core/misc/objc/common/Mat.h
modules/core/misc/objc/common/Mat.h
+3
-1
modules/core/misc/objc/common/MatOfByte.h
modules/core/misc/objc/common/MatOfByte.h
+1
-1
modules/core/misc/objc/common/MatOfDMatch.h
modules/core/misc/objc/common/MatOfDMatch.h
+1
-1
modules/core/misc/objc/common/MatOfDouble.h
modules/core/misc/objc/common/MatOfDouble.h
+1
-1
modules/core/misc/objc/common/MatOfFloat.h
modules/core/misc/objc/common/MatOfFloat.h
+1
-1
modules/core/misc/objc/common/MatOfFloat4.h
modules/core/misc/objc/common/MatOfFloat4.h
+1
-1
modules/core/misc/objc/common/MatOfFloat6.h
modules/core/misc/objc/common/MatOfFloat6.h
+1
-1
modules/core/misc/objc/common/MatOfInt.h
modules/core/misc/objc/common/MatOfInt.h
+1
-1
modules/core/misc/objc/common/MatOfInt4.h
modules/core/misc/objc/common/MatOfInt4.h
+1
-1
modules/core/misc/objc/common/MatOfKeyPoint.h
modules/core/misc/objc/common/MatOfKeyPoint.h
+1
-1
modules/core/misc/objc/common/MatOfPoint2f.h
modules/core/misc/objc/common/MatOfPoint2f.h
+1
-1
modules/core/misc/objc/common/MatOfPoint2i.h
modules/core/misc/objc/common/MatOfPoint2i.h
+1
-1
modules/core/misc/objc/common/MatOfPoint3.h
modules/core/misc/objc/common/MatOfPoint3.h
+1
-1
modules/core/misc/objc/common/MatOfPoint3f.h
modules/core/misc/objc/common/MatOfPoint3f.h
+1
-1
modules/core/misc/objc/common/MatOfRect2d.h
modules/core/misc/objc/common/MatOfRect2d.h
+1
-1
modules/core/misc/objc/common/MatOfRect2i.h
modules/core/misc/objc/common/MatOfRect2i.h
+1
-1
modules/core/misc/objc/common/MatOfRotatedRect.h
modules/core/misc/objc/common/MatOfRotatedRect.h
+1
-1
modules/core/misc/objc/common/MinMaxLocResult.h
modules/core/misc/objc/common/MinMaxLocResult.h
+3
-1
modules/core/misc/objc/common/Point2d.h
modules/core/misc/objc/common/Point2d.h
+3
-1
modules/core/misc/objc/common/Point2f.h
modules/core/misc/objc/common/Point2f.h
+3
-1
modules/core/misc/objc/common/Point2i.h
modules/core/misc/objc/common/Point2i.h
+3
-1
modules/core/misc/objc/common/Point3d.h
modules/core/misc/objc/common/Point3d.h
+3
-1
modules/core/misc/objc/common/Point3f.h
modules/core/misc/objc/common/Point3f.h
+3
-1
modules/core/misc/objc/common/Point3i.h
modules/core/misc/objc/common/Point3i.h
+3
-1
modules/core/misc/objc/common/Range.h
modules/core/misc/objc/common/Range.h
+3
-1
modules/core/misc/objc/common/Rect2d.h
modules/core/misc/objc/common/Rect2d.h
+3
-1
modules/core/misc/objc/common/Rect2f.h
modules/core/misc/objc/common/Rect2f.h
+3
-1
modules/core/misc/objc/common/Rect2i.h
modules/core/misc/objc/common/Rect2i.h
+3
-1
modules/core/misc/objc/common/RotatedRect.h
modules/core/misc/objc/common/RotatedRect.h
+3
-1
modules/core/misc/objc/common/Scalar.h
modules/core/misc/objc/common/Scalar.h
+3
-1
modules/core/misc/objc/common/Size2d.h
modules/core/misc/objc/common/Size2d.h
+3
-1
modules/core/misc/objc/common/Size2f.h
modules/core/misc/objc/common/Size2f.h
+3
-1
modules/core/misc/objc/common/Size2i.h
modules/core/misc/objc/common/Size2i.h
+3
-1
modules/core/misc/objc/common/TermCriteria.h
modules/core/misc/objc/common/TermCriteria.h
+3
-1
modules/imgcodecs/misc/objc/ios/Mat+Converters.h
modules/imgcodecs/misc/objc/ios/Mat+Converters.h
+3
-1
modules/imgproc/misc/objc/common/Moments.h
modules/imgproc/misc/objc/common/Moments.h
+3
-1
modules/objc/generator/templates/cmakelists.template
modules/objc/generator/templates/cmakelists.template
+1
-1
modules/objc/generator/templates/objc_class_header.template
modules/objc/generator/templates/objc_class_header.template
+3
-1
modules/objc/generator/templates/objc_module_header.template
modules/objc/generator/templates/objc_module_header.template
+3
-1
modules/videoio/misc/objc/ios/CvCamera2.h
modules/videoio/misc/objc/ios/CvCamera2.h
+4
-3
platforms/ios/Info.Dynamic.plist.in
platforms/ios/Info.Dynamic.plist.in
+1
-1
platforms/ios/build_framework.py
platforms/ios/build_framework.py
+51
-11
未找到文件。
cmake/OpenCVGenInfoPlist.cmake
浏览文件 @
59ba3365
...
...
@@ -2,7 +2,7 @@ set(OPENCV_APPLE_BUNDLE_NAME "OpenCV")
set
(
OPENCV_APPLE_BUNDLE_ID
"org.opencv"
)
if
(
IOS
)
if
(
APPLE_FRAMEWORK AND
BUILD_SHARED_LIBS
)
if
(
APPLE_FRAMEWORK AND
DYNAMIC_PLIST
)
configure_file
(
"
${
OpenCV_SOURCE_DIR
}
/platforms/ios/Info.Dynamic.plist.in"
"
${
CMAKE_BINARY_DIR
}
/ios/Info.plist"
)
else
()
...
...
modules/core/misc/objc/common/ByteVector.h
浏览文件 @
59ba3365
...
...
@@ -10,13 +10,14 @@
#ifdef __cplusplus
#import <vector>
#endif
#import "CVObjcUtil.h"
NS_ASSUME_NONNULL_BEGIN
/**
* Utility class to wrap a `std::vector<char>`
*/
@interface
ByteVector
:
NSObject
CV_EXPORTS
@interface
ByteVector
:
NSObject
#pragma mark - Constructors
...
...
modules/core/misc/objc/common/CVObjcUtil.h
浏览文件 @
59ba3365
...
...
@@ -12,6 +12,14 @@ typedef union { float f; int32_t i; } V32;
#define DOUBLE_TO_BITS(x) ((V64){ .d = x }).l
#define FLOAT_TO_BITS(x) ((V32){ .f = x }).i
#ifndef CV_EXPORTS
#ifdef __cplusplus
#define CV_EXPORTS __attribute__ ((visibility ("default")))
#else
#define CV_EXPORTS
#endif
#endif
#ifdef __cplusplus
#import <vector>
...
...
modules/core/misc/objc/common/Converters.h
浏览文件 @
59ba3365
...
...
@@ -8,6 +8,8 @@
#ifdef __cplusplus
#import <opencv2/opencv.hpp>
#else
#define CV_EXPORTS
#endif
#import <Foundation/Foundation.h>
...
...
@@ -27,7 +29,7 @@
NS_ASSUME_NONNULL_BEGIN
@interface
Converters
:
NSObject
CV_EXPORTS
@interface
Converters
:
NSObject
+
(
Mat
*
)
vector_Point_to_Mat
:(
NSArray
<
Point2i
*>*
)
pts
NS_SWIFT_NAME
(
vector_Point_to_Mat
(
_
:
));
...
...
modules/core/misc/objc/common/CvType.h
浏览文件 @
59ba3365
...
...
@@ -6,6 +6,8 @@
#ifdef __cplusplus
#import "opencv.hpp"
#else
#define CV_EXPORTS
#endif
#import <Foundation/Foundation.h>
...
...
@@ -15,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Utility functions for handling CvType values
*/
@interface
CvType
:
NSObject
CV_EXPORTS
@interface
CvType
:
NSObject
#pragma mark - Type Utility functions
...
...
modules/core/misc/objc/common/DMatch.h
浏览文件 @
59ba3365
...
...
@@ -8,6 +8,8 @@
#ifdef __cplusplus
#import "opencv.hpp"
#else
#define CV_EXPORTS
#endif
#import <Foundation/Foundation.h>
...
...
@@ -18,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
* Structure for matching: query descriptor index, train descriptor index, train
* image index and distance between descriptors.
*/
@interface
DMatch
:
NSObject
CV_EXPORTS
@interface
DMatch
:
NSObject
/**
* Query descriptor index.
...
...
modules/core/misc/objc/common/Double2.h
浏览文件 @
59ba3365
...
...
@@ -8,6 +8,8 @@
#ifdef __cplusplus
#import "opencv.hpp"
#else
#define CV_EXPORTS
#endif
#import <Foundation/Foundation.h>
...
...
@@ -19,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Simple wrapper for a vector of two `double`
*/
@interface
Double2
:
NSObject
CV_EXPORTS
@interface
Double2
:
NSObject
#pragma mark - Properties
...
...
@@ -33,11 +35,6 @@ NS_ASSUME_NONNULL_BEGIN
*/
@property
double
v1
;
/**
* Third vector element
*/
@property
double
v2
;
#ifdef __cplusplus
/**
...
...
modules/core/misc/objc/common/Double3.h
浏览文件 @
59ba3365
...
...
@@ -8,6 +8,8 @@
#ifdef __cplusplus
#import "opencv.hpp"
#else
#define CV_EXPORTS
#endif
#import <Foundation/Foundation.h>
...
...
@@ -19,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Simple wrapper for a vector of three `double`
*/
@interface
Double3
:
NSObject
CV_EXPORTS
@interface
Double3
:
NSObject
#pragma mark - Properties
...
...
modules/core/misc/objc/common/DoubleVector.h
浏览文件 @
59ba3365
...
...
@@ -10,13 +10,14 @@
#ifdef __cplusplus
#import <vector>
#endif
#import "CVObjcUtil.h"
NS_ASSUME_NONNULL_BEGIN
/**
* Utility class to wrap a `std::vector<double>`
*/
@interface
DoubleVector
:
NSObject
CV_EXPORTS
@interface
DoubleVector
:
NSObject
#pragma mark - Constructors
...
...
modules/core/misc/objc/common/Float4.h
浏览文件 @
59ba3365
...
...
@@ -8,6 +8,8 @@
#ifdef __cplusplus
#import "opencv.hpp"
#else
#define CV_EXPORTS
#endif
#import <Foundation/Foundation.h>
...
...
@@ -19,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Simple wrapper for a vector of four `float`
*/
@interface
Float4
:
NSObject
CV_EXPORTS
@interface
Float4
:
NSObject
#pragma mark - Properties
...
...
modules/core/misc/objc/common/Float6.h
浏览文件 @
59ba3365
...
...
@@ -8,6 +8,8 @@
#ifdef __cplusplus
#import "opencv.hpp"
#else
#define CV_EXPORTS
#endif
#import <Foundation/Foundation.h>
...
...
@@ -19,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Simple wrapper for a vector of six `float`
*/
@interface
Float6
:
NSObject
CV_EXPORTS
@interface
Float6
:
NSObject
#pragma mark - Properties
...
...
modules/core/misc/objc/common/FloatVector.h
浏览文件 @
59ba3365
...
...
@@ -10,13 +10,14 @@
#ifdef __cplusplus
#import <vector>
#endif
#import "CVObjcUtil.h"
NS_ASSUME_NONNULL_BEGIN
/**
* Utility class to wrap a `std::vector<float>`
*/
@interface
FloatVector
:
NSObject
CV_EXPORTS
@interface
FloatVector
:
NSObject
#pragma mark - Constructors
...
...
modules/core/misc/objc/common/Int4.h
浏览文件 @
59ba3365
...
...
@@ -8,6 +8,8 @@
#ifdef __cplusplus
#import "opencv.hpp"
#else
#define CV_EXPORTS
#endif
#import <Foundation/Foundation.h>
...
...
@@ -19,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Simple wrapper for a vector of four `int`
*/
@interface
Int4
:
NSObject
CV_EXPORTS
@interface
Int4
:
NSObject
#pragma mark - Properties
...
...
modules/core/misc/objc/common/IntVector.h
浏览文件 @
59ba3365
...
...
@@ -10,13 +10,14 @@
#ifdef __cplusplus
#import <vector>
#endif
#import "CVObjcUtil.h"
NS_ASSUME_NONNULL_BEGIN
/**
* Utility class to wrap a `std::vector<int>`
*/
@interface
IntVector
:
NSObject
CV_EXPORTS
@interface
IntVector
:
NSObject
#pragma mark - Constructors
...
...
modules/core/misc/objc/common/KeyPoint.h
浏览文件 @
59ba3365
...
...
@@ -8,6 +8,8 @@
#ifdef __cplusplus
#import "opencv.hpp"
#else
#define CV_EXPORTS
#endif
#import <Foundation/Foundation.h>
...
...
@@ -18,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Object representing a point feature found by one of many available keypoint detectors, such as Harris corner detector, FAST, StarDetector, SURF, SIFT etc.
*/
@interface
KeyPoint
:
NSObject
CV_EXPORTS
@interface
KeyPoint
:
NSObject
#pragma mark - Properties
...
...
modules/core/misc/objc/common/Mat.h
浏览文件 @
59ba3365
...
...
@@ -8,6 +8,8 @@
#ifdef __cplusplus
#import "opencv.hpp"
#else
#define CV_EXPORTS
#endif
#import <Foundation/Foundation.h>
...
...
@@ -23,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* The class Mat represents an n-dimensional dense numerical single-channel or multi-channel array.
*/
@interface
Mat
:
NSObject
CV_EXPORTS
@interface
Mat
:
NSObject
#ifdef __cplusplus
@property
(
readonly
)
cv
::
Ptr
<
cv
::
Mat
>
nativePtr
;
...
...
modules/core/misc/objc/common/MatOfByte.h
浏览文件 @
59ba3365
...
...
@@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Mat representation of an array of bytes
*/
@interface
MatOfByte
:
Mat
CV_EXPORTS
@interface
MatOfByte
:
Mat
#pragma mark - Constructors
...
...
modules/core/misc/objc/common/MatOfDMatch.h
浏览文件 @
59ba3365
...
...
@@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Mat representation of an array of DMatch objects
*/
@interface
MatOfDMatch
:
Mat
CV_EXPORTS
@interface
MatOfDMatch
:
Mat
#pragma mark - Constructors
...
...
modules/core/misc/objc/common/MatOfDouble.h
浏览文件 @
59ba3365
...
...
@@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Mat representation of an array of doubles
*/
@interface
MatOfDouble
:
Mat
CV_EXPORTS
@interface
MatOfDouble
:
Mat
#pragma mark - Constructors
...
...
modules/core/misc/objc/common/MatOfFloat.h
浏览文件 @
59ba3365
...
...
@@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Mat representation of an array of floats
*/
@interface
MatOfFloat
:
Mat
CV_EXPORTS
@interface
MatOfFloat
:
Mat
#ifdef __cplusplus
-
(
instancetype
)
initWithNativeMat
:(
cv
::
Mat
*
)
nativeMat
;
...
...
modules/core/misc/objc/common/MatOfFloat4.h
浏览文件 @
59ba3365
...
...
@@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Mat representation of an array of vectors of four floats
*/
@interface
MatOfFloat4
:
Mat
CV_EXPORTS
@interface
MatOfFloat4
:
Mat
#pragma mark - Constructors
...
...
modules/core/misc/objc/common/MatOfFloat6.h
浏览文件 @
59ba3365
...
...
@@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Mat representation of an array of vectors of six floats
*/
@interface
MatOfFloat6
:
Mat
CV_EXPORTS
@interface
MatOfFloat6
:
Mat
#pragma mark - Constructors
...
...
modules/core/misc/objc/common/MatOfInt.h
浏览文件 @
59ba3365
...
...
@@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Mat representation of an array of ints
*/
@interface
MatOfInt
:
Mat
CV_EXPORTS
@interface
MatOfInt
:
Mat
#pragma mark - Constructors
...
...
modules/core/misc/objc/common/MatOfInt4.h
浏览文件 @
59ba3365
...
...
@@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Mat representation of an array of vectors of four ints
*/
@interface
MatOfInt4
:
Mat
CV_EXPORTS
@interface
MatOfInt4
:
Mat
#pragma mark - Constructors
...
...
modules/core/misc/objc/common/MatOfKeyPoint.h
浏览文件 @
59ba3365
...
...
@@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Mat representation of an array of KeyPoint objects
*/
@interface
MatOfKeyPoint
:
Mat
CV_EXPORTS
@interface
MatOfKeyPoint
:
Mat
#pragma mark - Constructors
...
...
modules/core/misc/objc/common/MatOfPoint2f.h
浏览文件 @
59ba3365
...
...
@@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Mat representation of an array of Point2f objects
*/
@interface
MatOfPoint2f
:
Mat
CV_EXPORTS
@interface
MatOfPoint2f
:
Mat
#pragma mark - Constructors
...
...
modules/core/misc/objc/common/MatOfPoint2i.h
浏览文件 @
59ba3365
...
...
@@ -16,7 +16,7 @@ NS_ASSUME_NONNULL_BEGIN
* Mat representation of an array of Point objects
*/
NS_SWIFT_NAME
(
MatOfPoint
)
@interface
MatOfPoint2i
:
Mat
CV_EXPORTS
@interface
MatOfPoint2i
:
Mat
#pragma mark - Constructors
...
...
modules/core/misc/objc/common/MatOfPoint3.h
浏览文件 @
59ba3365
...
...
@@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Mat representation of an array of Point3i objects
*/
@interface
MatOfPoint3
:
Mat
CV_EXPORTS
@interface
MatOfPoint3
:
Mat
#pragma mark - Constructors
...
...
modules/core/misc/objc/common/MatOfPoint3f.h
浏览文件 @
59ba3365
...
...
@@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Mat representation of an array of Point3f objects
*/
@interface
MatOfPoint3f
:
Mat
CV_EXPORTS
@interface
MatOfPoint3f
:
Mat
#pragma mark - Constructors
...
...
modules/core/misc/objc/common/MatOfRect2d.h
浏览文件 @
59ba3365
...
...
@@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Mat representation of an array of Rect2d objects
*/
@interface
MatOfRect2d
:
Mat
CV_EXPORTS
@interface
MatOfRect2d
:
Mat
#pragma mark - Constructors
...
...
modules/core/misc/objc/common/MatOfRect2i.h
浏览文件 @
59ba3365
...
...
@@ -16,7 +16,7 @@ NS_ASSUME_NONNULL_BEGIN
* Mat representation of an array of Rect objects
*/
NS_SWIFT_NAME
(
MatOfRect
)
@interface
MatOfRect2i
:
Mat
CV_EXPORTS
@interface
MatOfRect2i
:
Mat
#pragma mark - Constructors
...
...
modules/core/misc/objc/common/MatOfRotatedRect.h
浏览文件 @
59ba3365
...
...
@@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Mat representation of an array of RotatedRect objects
*/
@interface
MatOfRotatedRect
:
Mat
CV_EXPORTS
@interface
MatOfRotatedRect
:
Mat
#pragma mark - Constructors
...
...
modules/core/misc/objc/common/MinMaxLocResult.h
浏览文件 @
59ba3365
...
...
@@ -8,6 +8,8 @@
#ifdef __cplusplus
#import "opencv.hpp"
#else
#define CV_EXPORTS
#endif
#import <Foundation/Foundation.h>
...
...
@@ -19,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Result of operation to determine global minimum and maximum of an array
*/
@interface
MinMaxLocResult
:
NSObject
CV_EXPORTS
@interface
MinMaxLocResult
:
NSObject
#pragma mark - Properties
...
...
modules/core/misc/objc/common/Point2d.h
浏览文件 @
59ba3365
...
...
@@ -8,6 +8,8 @@
#ifdef __cplusplus
#import "opencv.hpp"
#else
#define CV_EXPORTS
#endif
#import <Foundation/Foundation.h>
...
...
@@ -19,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Represents a two dimensional point the coordinate values of which are of type `double`
*/
@interface
Point2d
:
NSObject
CV_EXPORTS
@interface
Point2d
:
NSObject
# pragma mark - Properties
...
...
modules/core/misc/objc/common/Point2f.h
浏览文件 @
59ba3365
...
...
@@ -8,6 +8,8 @@
#ifdef __cplusplus
#import "opencv.hpp"
#else
#define CV_EXPORTS
#endif
#import <Foundation/Foundation.h>
...
...
@@ -19,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Represents a two dimensional point the coordinate values of which are of type `float`
*/
@interface
Point2f
:
NSObject
CV_EXPORTS
@interface
Point2f
:
NSObject
# pragma mark - Properties
...
...
modules/core/misc/objc/common/Point2i.h
浏览文件 @
59ba3365
...
...
@@ -8,6 +8,8 @@
#ifdef __cplusplus
#import "opencv.hpp"
#else
#define CV_EXPORTS
#endif
#import <Foundation/Foundation.h>
...
...
@@ -20,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN
* Represents a two dimensional point the coordinate values of which are of type `int`
*/
NS_SWIFT_NAME
(
Point
)
@interface
Point2i
:
NSObject
CV_EXPORTS
@interface
Point2i
:
NSObject
# pragma mark - Properties
...
...
modules/core/misc/objc/common/Point3d.h
浏览文件 @
59ba3365
...
...
@@ -8,6 +8,8 @@
#ifdef __cplusplus
#import "opencv.hpp"
#else
#define CV_EXPORTS
#endif
#import <Foundation/Foundation.h>
...
...
@@ -19,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Represents a three dimensional point the coordinate values of which are of type `double`
*/
@interface
Point3d
:
NSObject
CV_EXPORTS
@interface
Point3d
:
NSObject
# pragma mark - Properties
...
...
modules/core/misc/objc/common/Point3f.h
浏览文件 @
59ba3365
...
...
@@ -8,6 +8,8 @@
#ifdef __cplusplus
#import "opencv.hpp"
#else
#define CV_EXPORTS
#endif
#import <Foundation/Foundation.h>
...
...
@@ -19,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Represents a three dimensional point the coordinate values of which are of type `float`
*/
@interface
Point3f
:
NSObject
CV_EXPORTS
@interface
Point3f
:
NSObject
# pragma mark - Properties
...
...
modules/core/misc/objc/common/Point3i.h
浏览文件 @
59ba3365
...
...
@@ -8,6 +8,8 @@
#ifdef __cplusplus
#import "opencv.hpp"
#else
#define CV_EXPORTS
#endif
#import <Foundation/Foundation.h>
...
...
@@ -19,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Represents a three dimensional point the coordinate values of which are of type `int`
*/
@interface
Point3i
:
NSObject
CV_EXPORTS
@interface
Point3i
:
NSObject
# pragma mark - Properties
...
...
modules/core/misc/objc/common/Range.h
浏览文件 @
59ba3365
...
...
@@ -8,6 +8,8 @@
#ifdef __cplusplus
#import "opencv.hpp"
#else
#define CV_EXPORTS
#endif
#import <Foundation/Foundation.h>
...
...
@@ -17,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Represents a range of dimension indices
*/
@interface
Range
:
NSObject
CV_EXPORTS
@interface
Range
:
NSObject
#pragma mark - Properties
...
...
modules/core/misc/objc/common/Rect2d.h
浏览文件 @
59ba3365
...
...
@@ -8,6 +8,8 @@
#ifdef __cplusplus
#import "opencv.hpp"
#else
#define CV_EXPORTS
#endif
@class
Point2d
;
...
...
@@ -20,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Represents a rectange the coordinate and dimension values of which are of type `double`
*/
@interface
Rect2d
:
NSObject
CV_EXPORTS
@interface
Rect2d
:
NSObject
#pragma mark - Properties
...
...
modules/core/misc/objc/common/Rect2f.h
浏览文件 @
59ba3365
...
...
@@ -8,6 +8,8 @@
#ifdef __cplusplus
#import "opencv.hpp"
#else
#define CV_EXPORTS
#endif
@class
Point2f
;
...
...
@@ -20,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Represents a rectange the coordinate and dimension values of which are of type `float`
*/
@interface
Rect2f
:
NSObject
CV_EXPORTS
@interface
Rect2f
:
NSObject
#pragma mark - Properties
...
...
modules/core/misc/objc/common/Rect2i.h
浏览文件 @
59ba3365
...
...
@@ -8,6 +8,8 @@
#ifdef __cplusplus
#import "opencv.hpp"
#else
#define CV_EXPORTS
#endif
@class
Point2i
;
...
...
@@ -21,7 +23,7 @@ NS_ASSUME_NONNULL_BEGIN
* Represents a rectange the coordinate and dimension values of which are of type `int`
*/
NS_SWIFT_NAME
(
Rect
)
@interface
Rect2i
:
NSObject
CV_EXPORTS
@interface
Rect2i
:
NSObject
#pragma mark - Properties
...
...
modules/core/misc/objc/common/RotatedRect.h
浏览文件 @
59ba3365
...
...
@@ -8,6 +8,8 @@
#ifdef __cplusplus
#import "opencv.hpp"
#else
#define CV_EXPORTS
#endif
@class
Point2f
;
...
...
@@ -21,7 +23,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Represents a rotated rectangle on a plane
*/
@interface
RotatedRect
:
NSObject
CV_EXPORTS
@interface
RotatedRect
:
NSObject
#pragma mark - Properties
...
...
modules/core/misc/objc/common/Scalar.h
浏览文件 @
59ba3365
...
...
@@ -8,6 +8,8 @@
#ifdef __cplusplus
#import "opencv.hpp"
#else
#define CV_EXPORTS
#endif
#import <Foundation/Foundation.h>
...
...
@@ -17,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Represents a four element vector
*/
@interface
Scalar
:
NSObject
CV_EXPORTS
@interface
Scalar
:
NSObject
#pragma mark - Properties
...
...
modules/core/misc/objc/common/Size2d.h
浏览文件 @
59ba3365
...
...
@@ -8,6 +8,8 @@
#ifdef __cplusplus
#import "opencv.hpp"
#else
#define CV_EXPORTS
#endif
@class
Point2d
;
...
...
@@ -19,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Represents the dimensions of a rectangle the values of which are of type `double`
*/
@interface
Size2d
:
NSObject
CV_EXPORTS
@interface
Size2d
:
NSObject
#pragma mark - Properties
...
...
modules/core/misc/objc/common/Size2f.h
浏览文件 @
59ba3365
...
...
@@ -8,6 +8,8 @@
#ifdef __cplusplus
#import "opencv.hpp"
#else
#define CV_EXPORTS
#endif
@class
Point2f
;
...
...
@@ -19,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Represents the dimensions of a rectangle the values of which are of type `float`
*/
@interface
Size2f
:
NSObject
CV_EXPORTS
@interface
Size2f
:
NSObject
#pragma mark - Properties
...
...
modules/core/misc/objc/common/Size2i.h
浏览文件 @
59ba3365
...
...
@@ -8,6 +8,8 @@
#ifdef __cplusplus
#import "opencv.hpp"
#else
#define CV_EXPORTS
#endif
@class
Point2i
;
...
...
@@ -20,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN
* Represents the dimensions of a rectangle the values of which are of type `int`
*/
NS_SWIFT_NAME
(
Size
)
@interface
Size2i
:
NSObject
CV_EXPORTS
@interface
Size2i
:
NSObject
#pragma mark - Properties
...
...
modules/core/misc/objc/common/TermCriteria.h
浏览文件 @
59ba3365
...
...
@@ -8,6 +8,8 @@
#ifdef __cplusplus
#import "opencv.hpp"
#else
#define CV_EXPORTS
#endif
#import <Foundation/Foundation.h>
...
...
@@ -17,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Class representing termination criteria for iterative algorithms.
*/
@interface
TermCriteria
:
NSObject
CV_EXPORTS
@interface
TermCriteria
:
NSObject
#pragma mark - Properties
...
...
modules/imgcodecs/misc/objc/ios/Mat+Converters.h
浏览文件 @
59ba3365
...
...
@@ -8,6 +8,8 @@
#ifdef __cplusplus
#import "opencv.hpp"
#else
#define CV_EXPORTS
#endif
#import <Foundation/Foundation.h>
...
...
@@ -16,7 +18,7 @@
NS_ASSUME_NONNULL_BEGIN
@interface
Mat
(
Converters
)
CV_EXPORTS
@interface
Mat
(
Converters
)
-
(
UIImage
*
)
toUIImage
;
-
(
instancetype
)
initWithUIImage
:(
UIImage
*
)
image
;
...
...
modules/imgproc/misc/objc/common/Moments.h
浏览文件 @
59ba3365
...
...
@@ -8,13 +8,15 @@
#ifdef __cplusplus
#import "opencv.hpp"
#else
#define CV_EXPORTS
#endif
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface
Moments
:
NSObject
CV_EXPORTS
@interface
Moments
:
NSObject
@property
double
m00
;
@property
double
m10
;
...
...
modules/objc/generator/templates/cmakelists.template
浏览文件 @
59ba3365
...
...
@@ -8,7 +8,7 @@ set(MODULES "$modules")
set (CMAKE_CXX_STANDARD 11)
set (CMAKE_CXX_STANDARD_REQUIRED TRUE)
set (OBJC_COMPILE_FLAGS "-fobjc-arc -fobjc-weak -fvisibility=hidden -D__OPENCV_BUILD=1")
set (OBJC_COMPILE_FLAGS "-fobjc-arc -fobjc-weak -fvisibility=hidden -
fPIC -
D__OPENCV_BUILD=1")
set (SUPPRESS_WARNINGS_FLAGS "-Wno-incomplete-umbrella")
set (CMAKE_CXX_FLAGS "$${CMAKE_CXX_FLAGS} $${OBJC_COMPILE_FLAGS} $${SUPPRESS_WARNINGS_FLAGS}")
...
...
modules/objc/generator/templates/objc_class_header.template
浏览文件 @
59ba3365
...
...
@@ -6,6 +6,8 @@
#ifdef __cplusplus
#import "opencv.hpp"
$additionalImports
#else
#define CV_EXPORTS
#endif
#import <Foundation/Foundation.h>
...
...
@@ -18,7 +20,7 @@ $enumDeclarations
NS_ASSUME_NONNULL_BEGIN
$docs
@interface $objcName : $base
CV_EXPORTS
@interface $objcName : $base
$nativePointerHandling
...
...
modules/objc/generator/templates/objc_module_header.template
浏览文件 @
59ba3365
...
...
@@ -6,6 +6,8 @@
#ifdef __cplusplus
#import "opencv.hpp"
$additionalImports
#else
#define CV_EXPORTS
#endif
#import <Foundation/Foundation.h>
...
...
@@ -17,7 +19,7 @@ $enumDeclarations
NS_ASSUME_NONNULL_BEGIN
$docs
@interface $module : $base
CV_EXPORTS
@interface $module : $base
$methodDeclarations
...
...
modules/videoio/misc/objc/ios/CvCamera2.h
浏览文件 @
59ba3365
...
...
@@ -8,12 +8,13 @@
#import <Accelerate/Accelerate.h>
#import <AVFoundation/AVFoundation.h>
#import <ImageIO/ImageIO.h>
#import "CVObjcUtil.h"
@class
Mat
;
@class
CvAbstractCamera2
;
@interface
CvAbstractCamera2
:
NSObject
CV_EXPORTS
@interface
CvAbstractCamera2
:
NSObject
@property
UIDeviceOrientation
currentDeviceOrientation
;
@property
BOOL
cameraAvailable
;
...
...
@@ -55,7 +56,7 @@
-
(
void
)
processImage
:(
Mat
*
)
image
;
@end
@interface
CvVideoCamera2
:
CvAbstractCamera2
<
AVCaptureVideoDataOutputSampleBufferDelegate
>
CV_EXPORTS
@interface
CvVideoCamera2
:
CvAbstractCamera2
<
AVCaptureVideoDataOutputSampleBufferDelegate
>
@property
(
nonatomic
,
weak
)
id
<
CvVideoCameraDelegate2
>
delegate
;
@property
(
nonatomic
,
assign
)
BOOL
grayscaleMode
;
@property
(
nonatomic
,
assign
)
BOOL
recordVideo
;
...
...
@@ -78,7 +79,7 @@
-
(
void
)
photoCameraCancel
:(
CvPhotoCamera2
*
)
photoCamera
;
@end
@interface
CvPhotoCamera2
:
CvAbstractCamera2
<
AVCapturePhotoCaptureDelegate
>
CV_EXPORTS
@interface
CvPhotoCamera2
:
CvAbstractCamera2
<
AVCapturePhotoCaptureDelegate
>
@property
(
nonatomic
,
weak
)
id
<
CvPhotoCameraDelegate2
>
delegate
;
-
(
void
)
takePicture
;
@end
platforms/ios/Info.Dynamic.plist.in
浏览文件 @
59ba3365
...
...
@@ -5,7 +5,7 @@
<key>
CFBundleDevelopmentRegion
</key>
<string>
en
</string>
<key>
CFBundleExecutable
</key>
<string>
opencv2
</string>
<string>
${FRAMEWORK_NAME}
</string>
<key>
CFBundleName
</key>
<string>
${OPENCV_APPLE_BUNDLE_NAME}
</string>
<key>
CFBundleIdentifier
</key>
...
...
platforms/ios/build_framework.py
浏览文件 @
59ba3365
...
...
@@ -49,6 +49,14 @@ def getXCodeMajor():
else
:
raise
Exception
(
"Failed to parse Xcode version"
)
def
getXCodeSetting
(
var
,
projectdir
):
ret
=
check_output
([
"xcodebuild"
,
"-showBuildSettings"
],
cwd
=
projectdir
)
m
=
re
.
search
(
"\s"
+
var
+
" = (.*)"
,
ret
)
if
m
:
return
m
.
group
(
1
)
else
:
raise
Exception
(
"Failed to parse Xcode settings"
)
class
Builder
:
def
__init__
(
self
,
opencv
,
contrib
,
dynamic
,
bitcodedisabled
,
exclude
,
disable
,
enablenonfree
,
targets
,
debug
,
debug_info
,
framework_name
):
self
.
opencv
=
os
.
path
.
abspath
(
opencv
)
...
...
@@ -90,7 +98,7 @@ class Builder:
xcode_ver
=
getXCodeMajor
()
if
self
.
dynamic
:
if
self
.
dynamic
and
not
self
.
build_objc_wrapper
:
alltargets
=
self
.
targets
else
:
# if we are building a static library, we must build each architecture separately
...
...
@@ -114,8 +122,10 @@ class Builder:
cmake_flags
.
append
(
"-DCMAKE_CXX_FLAGS=-fembed-bitcode"
)
self
.
buildOne
(
t
[
0
],
t
[
1
],
mainBD
,
cmake_flags
)
if
self
.
dynamic
==
False
:
if
not
self
.
dynamic
:
self
.
mergeLibs
(
mainBD
)
elif
self
.
dynamic
and
self
.
build_objc_wrapper
:
self
.
makeDynamicLib
(
mainBD
)
self
.
makeFramework
(
outdir
,
dirs
)
if
self
.
build_objc_wrapper
:
print
(
"To run tests call:"
)
...
...
@@ -153,6 +163,8 @@ class Builder:
"-DBUILD_SHARED_LIBS=ON"
,
"-DCMAKE_MACOSX_BUNDLE=ON"
,
"-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=NO"
,
]
if
self
.
dynamic
and
not
self
.
build_objc_wrapper
else
[])
+
([
"-DDYNAMIC_PLIST=ON"
]
if
self
.
dynamic
else
[])
+
([
"-DOPENCV_ENABLE_NONFREE=ON"
]
if
self
.
enablenonfree
else
[])
+
([
...
...
@@ -160,7 +172,7 @@ class Builder:
]
if
self
.
debug_info
else
[])
if
len
(
self
.
exclude
)
>
0
:
args
+=
[
"-DBUILD_opencv_world=OFF"
]
if
not
self
.
dynamic
else
[]
args
+=
[
"-DBUILD_opencv_world=OFF"
]
if
not
(
self
.
dynamic
and
not
self
.
build_objc_wrapper
)
else
[]
args
+=
[
"-DBUILD_opencv_%s=OFF"
%
m
for
m
in
self
.
exclude
]
if
len
(
self
.
disable
)
>
0
:
...
...
@@ -174,15 +186,15 @@ class Builder:
"xcodebuild"
,
]
if
self
.
dynamic
:
if
(
self
.
dynamic
or
self
.
build_objc_wrapper
)
and
not
self
.
bitcodedisabled
and
target
==
"iPhoneOS"
:
buildcmd
.
append
(
"BITCODE_GENERATION_MODE=bitcode"
)
if
self
.
dynamic
and
not
self
.
build_objc_wrapper
:
buildcmd
+=
[
"IPHONEOS_DEPLOYMENT_TARGET="
+
os
.
environ
[
'IPHONEOS_DEPLOYMENT_TARGET'
],
"ONLY_ACTIVE_ARCH=NO"
,
]
if
not
self
.
bitcodedisabled
:
buildcmd
.
append
(
"BITCODE_GENERATION_MODE=bitcode"
)
for
arch
in
archs
:
buildcmd
.
append
(
"-arch"
)
buildcmd
.
append
(
arch
.
lower
())
...
...
@@ -198,7 +210,7 @@ class Builder:
"-configuration"
,
self
.
getConfiguration
(),
"-parallelizeTargets"
,
"-jobs"
,
str
(
multiprocessing
.
cpu_count
()),
]
+
([
"-target"
,
"ALL_BUILD"
]
if
self
.
dynamic
else
[])
]
+
([
"-target"
,
"ALL_BUILD"
]
if
self
.
dynamic
and
not
self
.
build_objc_wrapper
else
[])
return
buildcmd
...
...
@@ -253,6 +265,32 @@ class Builder:
print
(
"Merging libraries:
\n\t
%s"
%
"
\n\t
"
.
join
(
libs
+
libs3
+
module
),
file
=
sys
.
stderr
)
execute
([
"libtool"
,
"-static"
,
"-o"
,
res
]
+
libs
+
libs3
+
module
)
def
makeDynamicLib
(
self
,
builddir
):
target
=
builddir
[(
builddir
.
rfind
(
"build-"
)
+
6
):]
target_platform
=
target
[(
target
.
rfind
(
"-"
)
+
1
):]
is_device
=
target_platform
==
"iphoneos"
res
=
os
.
path
.
join
(
builddir
,
"install"
,
"lib"
,
self
.
framework_name
+
".framework"
,
self
.
framework_name
)
libs
=
glob
.
glob
(
os
.
path
.
join
(
builddir
,
"install"
,
"lib"
,
"*.a"
))
module
=
[
os
.
path
.
join
(
builddir
,
"lib"
,
self
.
getConfiguration
(),
self
.
framework_name
+
".framework"
,
self
.
framework_name
)]
libs3
=
glob
.
glob
(
os
.
path
.
join
(
builddir
,
"install"
,
"lib"
,
"3rdparty"
,
"*.a"
))
link_target
=
target
[:
target
.
find
(
"-"
)]
+
"-apple-ios"
+
os
.
environ
[
'IPHONEOS_DEPLOYMENT_TARGET'
]
+
(
"-simulator"
if
target
.
endswith
(
"simulator"
)
else
""
)
bitcode_flags
=
[
"-fembed-bitcode"
,
"-Xlinker"
,
"-bitcode_verify"
]
if
is_device
and
not
self
.
bitcodedisabled
else
[]
toolchain_dir
=
getXCodeSetting
(
"TOOLCHAIN_DIR"
,
builddir
)
swift_link_dirs
=
[
"-L"
+
toolchain_dir
+
"/usr/lib/swift/"
+
target_platform
,
"-L/usr/lib/swift"
]
sdk_dir
=
getXCodeSetting
(
"SDK_DIR"
,
builddir
)
execute
([
"clang++"
,
"-Xlinker"
,
"-rpath"
,
"-Xlinker"
,
"/usr/lib/swift"
,
"-target"
,
link_target
,
"-isysroot"
,
sdk_dir
,
"-install_name"
,
(
"@executable_path/Frameworks/"
+
self
.
framework_name
+
".framework/"
+
self
.
framework_name
)
if
is_device
else
res
,
"-dynamiclib"
,
"-dead_strip"
,
"-fobjc-link-runtime"
,
"-all_load"
,
"-o"
,
res
]
+
swift_link_dirs
+
bitcode_flags
+
module
+
libs
+
libs3
)
def
makeFramework
(
self
,
outdir
,
builddirs
):
name
=
self
.
framework_name
...
...
@@ -264,10 +302,8 @@ class Builder:
if
self
.
dynamic
:
dstdir
=
framework_dir
libname
=
name
+
".framework/"
+
name
else
:
dstdir
=
os
.
path
.
join
(
framework_dir
,
"Versions"
,
"A"
)
libname
=
"libopencv_merged.a"
# copy headers from one of build folders
shutil
.
copytree
(
os
.
path
.
join
(
builddirs
[
0
],
"install"
,
"include"
,
"opencv2"
),
os
.
path
.
join
(
dstdir
,
"Headers"
))
...
...
@@ -301,7 +337,10 @@ class Builder:
os
.
rename
(
os
.
path
.
join
(
dirname
,
filename
),
os
.
path
.
join
(
dirname
,
platform_name_map
[
filestem
]
+
fileext
))
# make universal static lib
libs
=
[
os
.
path
.
join
(
d
,
"lib"
,
self
.
getConfiguration
(),
libname
)
for
d
in
builddirs
]
if
self
.
dynamic
:
libs
=
[
os
.
path
.
join
(
d
,
"install"
,
"lib"
,
name
+
".framework"
,
name
)
for
d
in
builddirs
]
else
:
libs
=
[
os
.
path
.
join
(
d
,
"lib"
,
self
.
getConfiguration
(),
"libopencv_merged.a"
)
for
d
in
builddirs
]
lipocmd
=
[
"lipo"
,
"-create"
]
lipocmd
.
extend
(
libs
)
lipocmd
.
extend
([
"-o"
,
os
.
path
.
join
(
dstdir
,
name
)])
...
...
@@ -412,4 +451,5 @@ if __name__ == "__main__":
(
iphoneos_archs
,
"iPhoneOS"
),
(
iphonesimulator_archs
,
"iPhoneSimulator"
),
],
args
.
debug
,
args
.
debug_info
,
args
.
framework_name
)
b
.
build
(
args
.
out
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录