Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
ef3d0221
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,发现更多精彩内容 >>
提交
ef3d0221
编写于
10月 17, 2014
作者:
M
Maksim Shabunin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixing iOS clang warnings, part 2
上级
d3821e8c
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
31 addition
and
29 deletion
+31
-29
cmake/OpenCVUtils.cmake
cmake/OpenCVUtils.cmake
+2
-2
modules/core/src/parallel.cpp
modules/core/src/parallel.cpp
+1
-1
modules/core/src/persistence.cpp
modules/core/src/persistence.cpp
+2
-2
modules/objdetect/src/haar.cpp
modules/objdetect/src/haar.cpp
+1
-1
modules/videoio/src/cap_avfoundation.mm
modules/videoio/src/cap_avfoundation.mm
+20
-20
modules/videoio/src/cap_ios_abstract_camera.mm
modules/videoio/src/cap_ios_abstract_camera.mm
+2
-0
modules/videoio/src/cap_ios_video_camera.mm
modules/videoio/src/cap_ios_video_camera.mm
+2
-2
platforms/ios/cmake/Modules/Platform/iOS.cmake
platforms/ios/cmake/Modules/Platform/iOS.cmake
+1
-1
未找到文件。
cmake/OpenCVUtils.cmake
浏览文件 @
ef3d0221
...
...
@@ -249,9 +249,9 @@ macro(add_apple_compiler_options the_module)
if
(
"
${
source
}
"
MATCHES
"
\\
.mm$"
)
get_source_file_property
(
flags
"
${
source
}
"
COMPILE_FLAGS
)
if
(
flags
)
set
(
flags
"
${
_flags
}
-fobjc-exceptions"
)
set
(
flags
"
${
_flags
}
-fobjc-exceptions
-Wno-semicolon-before-method-body
"
)
else
()
set
(
flags
"-fobjc-exceptions"
)
set
(
flags
"-fobjc-exceptions
-Wno-semicolon-before-method-body
"
)
endif
()
set_source_files_properties
(
"
${
source
}
"
PROPERTIES COMPILE_FLAGS
"
${
flags
}
"
)
...
...
modules/core/src/parallel.cpp
浏览文件 @
ef3d0221
...
...
@@ -177,7 +177,7 @@ namespace
static
void
block_function
(
void
*
context
,
size_t
index
)
{
ProxyLoopBody
*
ptr_body
=
static_cast
<
ProxyLoopBody
*>
(
context
);
(
*
ptr_body
)(
cv
::
Range
(
index
,
index
+
1
));
(
*
ptr_body
)(
cv
::
Range
(
(
int
)
index
,
(
int
)
index
+
1
));
}
#elif defined HAVE_CONCURRENCY
class
ProxyLoopBody
:
public
ParallelLoopBodyWrapper
...
...
modules/core/src/persistence.cpp
浏览文件 @
ef3d0221
...
...
@@ -1177,7 +1177,7 @@ force_int:
int
val
,
is_hex
=
d
==
'x'
;
c
=
ptr
[
3
];
ptr
[
3
]
=
'\0'
;
val
=
strtol
(
ptr
+
is_hex
,
&
endptr
,
is_hex
?
8
:
16
);
val
=
(
int
)
strtol
(
ptr
+
is_hex
,
&
endptr
,
is_hex
?
8
:
16
);
ptr
[
3
]
=
c
;
if
(
endptr
==
ptr
+
is_hex
)
buf
[
len
++
]
=
'x'
;
...
...
@@ -2787,7 +2787,7 @@ cvOpenFileStorage( const char* filename, CvMemStorage* dststorage, int flags, co
// find the last occurence of </opencv_storage>
for
(;;)
{
int
line_offset
=
ftell
(
fs
->
file
);
int
line_offset
=
(
int
)
ftell
(
fs
->
file
);
char
*
ptr0
=
icvGets
(
fs
,
xml_buf
,
xml_buf_size
),
*
ptr
;
if
(
!
ptr0
)
break
;
...
...
modules/objdetect/src/haar.cpp
浏览文件 @
ef3d0221
...
...
@@ -1979,7 +1979,7 @@ cvLoadHaarClassifierCascade( const char* directory, CvSize orig_window_size )
if
(
!
f
)
CV_Error
(
CV_StsError
,
""
);
fseek
(
f
,
0
,
SEEK_END
);
size
=
ftell
(
f
);
size
=
(
int
)
ftell
(
f
);
fseek
(
f
,
0
,
SEEK_SET
);
size_t
elements_read
=
fread
(
ptr
,
1
,
size
,
f
);
CV_Assert
(
elements_read
==
(
size_t
)(
size
));
...
...
modules/videoio/src/cap_avfoundation.mm
浏览文件 @
ef3d0221
...
...
@@ -711,26 +711,26 @@ fromConnection:(AVCaptureConnection *)connection{
memcpy
(
imagedata
,
baseaddress
,
currSize
);
if
(
image
==
NULL
)
{
image
=
cvCreateImageHeader
(
cvSize
(
width
,
height
),
IPL_DEPTH_8U
,
4
);
image
=
cvCreateImageHeader
(
cvSize
(
(
int
)
width
,(
int
)
height
),
IPL_DEPTH_8U
,
4
);
}
image
->
width
=
width
;
image
->
height
=
height
;
image
->
width
=
(
int
)
width
;
image
->
height
=
(
int
)
height
;
image
->
nChannels
=
4
;
image
->
depth
=
IPL_DEPTH_8U
;
image
->
widthStep
=
(
int
)
rowBytes
;
image
->
imageData
=
imagedata
;
image
->
imageSize
=
currSize
;
image
->
imageSize
=
(
int
)
currSize
;
if
(
bgr_image
==
NULL
)
{
bgr_image
=
cvCreateImageHeader
(
cvSize
(
width
,
height
),
IPL_DEPTH_8U
,
3
);
bgr_image
=
cvCreateImageHeader
(
cvSize
(
(
int
)
width
,(
int
)
height
),
IPL_DEPTH_8U
,
3
);
}
bgr_image
->
width
=
width
;
bgr_image
->
height
=
height
;
bgr_image
->
width
=
(
int
)
width
;
bgr_image
->
height
=
(
int
)
height
;
bgr_image
->
nChannels
=
3
;
bgr_image
->
depth
=
IPL_DEPTH_8U
;
bgr_image
->
widthStep
=
(
int
)
rowBytes
;
bgr_image
->
imageData
=
bgr_imagedata
;
bgr_image
->
imageSize
=
currSize
;
bgr_image
->
imageSize
=
(
int
)
currSize
;
cvCvtColor
(
image
,
bgr_image
,
CV_BGRA2BGR
);
...
...
@@ -739,7 +739,7 @@ fromConnection:(AVCaptureConnection *)connection{
// iOS provides hardware accelerated rotation through AVCaptureConnection class
// I can't get it work.
if
(
bgr_image_r90
==
NULL
){
bgr_image_r90
=
cvCreateImage
(
cvSize
(
height
,
width
),
IPL_DEPTH_8U
,
3
);
bgr_image_r90
=
cvCreateImage
(
cvSize
(
(
int
)
height
,
(
int
)
width
),
IPL_DEPTH_8U
,
3
);
}
cvTranspose
(
bgr_image
,
bgr_image_r90
);
cvFlip
(
bgr_image_r90
,
NULL
,
1
);
...
...
@@ -939,29 +939,29 @@ IplImage* CvCaptureFile::retrieveFramePixelBuffer() {
memcpy
(
imagedata
,
baseaddress
,
currSize
);
if
(
image
==
NULL
)
{
image
=
cvCreateImageHeader
(
cvSize
(
width
,
height
),
IPL_DEPTH_8U
,
4
);
image
=
cvCreateImageHeader
(
cvSize
(
(
int
)
width
,(
int
)
height
),
IPL_DEPTH_8U
,
4
);
}
image
->
width
=
width
;
image
->
height
=
height
;
image
->
width
=
(
int
)
width
;
image
->
height
=
(
int
)
height
;
image
->
nChannels
=
4
;
image
->
depth
=
IPL_DEPTH_8U
;
image
->
widthStep
=
rowBytes
;
image
->
widthStep
=
(
int
)
rowBytes
;
image
->
imageData
=
imagedata
;
image
->
imageSize
=
currSize
;
image
->
imageSize
=
(
int
)
currSize
;
if
(
bgr_image
==
NULL
)
{
bgr_image
=
cvCreateImageHeader
(
cvSize
(
width
,
height
),
IPL_DEPTH_8U
,
3
);
bgr_image
=
cvCreateImageHeader
(
cvSize
(
(
int
)
width
,(
int
)
height
),
IPL_DEPTH_8U
,
3
);
}
bgr_image
->
width
=
width
;
bgr_image
->
height
=
height
;
bgr_image
->
width
=
(
int
)
width
;
bgr_image
->
height
=
(
int
)
height
;
bgr_image
->
nChannels
=
3
;
bgr_image
->
depth
=
IPL_DEPTH_8U
;
bgr_image
->
widthStep
=
rowBytes
;
bgr_image
->
widthStep
=
(
int
)
rowBytes
;
bgr_image
->
imageData
=
bgr_imagedata
;
bgr_image
->
imageSize
=
currSize
;
bgr_image
->
imageSize
=
(
int
)
currSize
;
cvCvtColor
(
image
,
bgr_image
,
CV_BGRA2BGR
);
...
...
@@ -1262,7 +1262,7 @@ bool CvVideoWriter_AVFoundation::writeFrame(const IplImage* iplimage) {
// writer status check
if
(
!
[
mMovieWriterInput
isReadyForMoreMediaData
]
||
mMovieWriter
.
status
!=
AVAssetWriterStatusWriting
)
{
NSLog
(
@"[mMovieWriterInput isReadyForMoreMediaData] Not ready for media data or ..."
);
NSLog
(
@"mMovieWriter.status: %d. Error: %@"
,
mMovieWriter
.
status
,
[
mMovieWriter
.
error
localizedDescription
]);
NSLog
(
@"mMovieWriter.status: %d. Error: %@"
,
(
int
)
mMovieWriter
.
status
,
[
mMovieWriter
.
error
localizedDescription
]);
[
localpool
drain
];
return
false
;
}
...
...
modules/videoio/src/cap_ios_abstract_camera.mm
浏览文件 @
ef3d0221
...
...
@@ -150,6 +150,7 @@
{
[[
NSNotificationCenter
defaultCenter
]
removeObserver
:
self
];
[[
UIDevice
currentDevice
]
endGeneratingDeviceOrientationNotifications
];
[
super
dealloc
]
}
...
...
@@ -226,6 +227,7 @@
-
(
void
)
deviceOrientationDidChange
:(
NSNotification
*
)
notification
{
(
void
)
notification
;
UIDeviceOrientation
orientation
=
[
UIDevice
currentDevice
].
orientation
;
switch
(
orientation
)
...
...
modules/videoio/src/cap_ios_video_camera.mm
浏览文件 @
ef3d0221
...
...
@@ -474,7 +474,7 @@ static CGFloat DegreesToRadians(CGFloat degrees) {return degrees * M_PI / 180;}
// check if matrix data pointer or dimensions were changed by the delegate
bool
iOSimage
=
false
;
if
(
height
==
image
.
rows
&&
width
==
image
.
cols
&&
format_opencv
==
image
.
type
()
&&
bufferAddress
==
image
.
data
&&
bytesPerRow
==
image
.
step
)
{
if
(
height
==
(
size_t
)
image
.
rows
&&
width
==
(
size_t
)
image
.
cols
&&
format_opencv
==
image
.
type
()
&&
bufferAddress
==
image
.
data
&&
bytesPerRow
==
image
.
step
)
{
iOSimage
=
true
;
}
...
...
@@ -592,7 +592,7 @@ static CGFloat DegreesToRadians(CGFloat degrees) {return degrees * M_PI / 180;}
ALAssetsLibrary
*
library
=
[[
ALAssetsLibrary
alloc
]
init
];
if
([
library
videoAtPathIsCompatibleWithSavedPhotosAlbum
:[
self
videoFileURL
]])
{
[
library
writeVideoAtPathToSavedPhotosAlbum
:[
self
videoFileURL
]
completionBlock:
^
(
NSURL
*
assetURL
,
NSError
*
error
){}];
completionBlock:
^
(
NSURL
*
assetURL
,
NSError
*
error
){
(
void
)
assetURL
;
(
void
)
error
;
}];
}
}
...
...
platforms/ios/cmake/Modules/Platform/iOS.cmake
浏览文件 @
ef3d0221
...
...
@@ -44,7 +44,7 @@ set (CMAKE_CXX_FLAGS "-stdlib=libc++ -fvisibility=hidden -fvisibility-inlines-hi
set
(
CMAKE_CXX_FLAGS_RELEASE
"-DNDEBUG -O3 -fomit-frame-pointer -ffast-math"
)
# Silence some warnings
set
(
no_warn
"-Wno-
semicolon-before-method-body -Wno-
unused-function -Wno-unused-parameter -Wno-strict-prototypes -Wno-missing-prototypes -Wno-missing-declarations -Wno-unused-const-variable -Wno-overloaded-virtual"
)
set
(
no_warn
"-Wno-unused-function -Wno-unused-parameter -Wno-strict-prototypes -Wno-missing-prototypes -Wno-missing-declarations -Wno-unused-const-variable -Wno-overloaded-virtual"
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
${
no_warn
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
no_warn
}
"
)
# Additional linker flag
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录