Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
d0b2e60e
O
Opencv
项目概览
Greenplum
/
Opencv
大约 1 年 前同步成功
通知
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,发现更多精彩内容 >>
提交
d0b2e60e
编写于
1月 05, 2018
作者:
A
Alexander Alekhin
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #10514 from alalek:build_warnings
上级
8e1f31f5
59c6661d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
25 addition
and
19 deletion
+25
-19
modules/imgcodecs/src/grfmt_pam.cpp
modules/imgcodecs/src/grfmt_pam.cpp
+2
-4
modules/imgproc/src/thresh.cpp
modules/imgproc/src/thresh.cpp
+4
-4
modules/python/bindings/CMakeLists.txt
modules/python/bindings/CMakeLists.txt
+19
-11
未找到文件。
modules/imgcodecs/src/grfmt_pam.cpp
浏览文件 @
d0b2e60e
...
...
@@ -487,7 +487,7 @@ bool PAMDecoder::readData( Mat& img )
bool
res
=
false
,
funcout
;
PaletteEntry
palette
[
256
];
const
struct
pam_format
*
fmt
=
NULL
;
struct
channel_layout
layout
;
struct
channel_layout
layout
=
{
0
,
0
,
0
,
0
};
// normalized to 1-channel grey format
/* setting buffer to max data size so scaling up is possible */
AutoBuffer
<
uchar
>
_src
(
src_elems_per_row
*
2
);
...
...
@@ -506,9 +506,7 @@ bool PAMDecoder::readData( Mat& img )
layout
.
bchan
=
0
;
layout
.
gchan
=
1
;
layout
.
rchan
=
2
;
}
else
layout
.
bchan
=
layout
.
gchan
=
layout
.
rchan
=
0
;
layout
.
graychan
=
0
;
}
}
CV_TRY
...
...
modules/imgproc/src/thresh.cpp
浏览文件 @
d0b2e60e
...
...
@@ -1483,14 +1483,14 @@ double cv::threshold( InputArray _src, OutputArray _dst, double thresh, double m
imaxval
=
saturate_cast
<
ushort
>
(
imaxval
);
int
ushrt_min
=
0
;
if
(
ithresh
<
ushrt_min
||
ithresh
>=
USHRT_MAX
)
if
(
ithresh
<
ushrt_min
||
ithresh
>=
(
int
)
USHRT_MAX
)
{
if
(
type
==
THRESH_BINARY
||
type
==
THRESH_BINARY_INV
||
((
type
==
THRESH_TRUNC
||
type
==
THRESH_TOZERO_INV
)
&&
ithresh
<
ushrt_min
)
||
(
type
==
THRESH_TOZERO
&&
ithresh
>=
USHRT_MAX
))
(
type
==
THRESH_TOZERO
&&
ithresh
>=
(
int
)
USHRT_MAX
))
{
int
v
=
type
==
THRESH_BINARY
?
(
ithresh
>=
USHRT_MAX
?
0
:
imaxval
)
:
type
==
THRESH_BINARY_INV
?
(
ithresh
>=
USHRT_MAX
?
imaxval
:
0
)
:
int
v
=
type
==
THRESH_BINARY
?
(
ithresh
>=
(
int
)
USHRT_MAX
?
0
:
imaxval
)
:
type
==
THRESH_BINARY_INV
?
(
ithresh
>=
(
int
)
USHRT_MAX
?
imaxval
:
0
)
:
/*type == THRESH_TRUNC ? imaxval :*/
0
;
dst
.
setTo
(
v
);
}
...
...
modules/python/bindings/CMakeLists.txt
浏览文件 @
d0b2e60e
...
...
@@ -38,15 +38,12 @@ ocv_list_filterout(opencv_hdrs "modules/.*_inl\\\\.h*")
ocv_list_filterout
(
opencv_hdrs
"modules/.*
\\\\
.details
\\\\
.h*"
)
ocv_list_filterout
(
opencv_hdrs
"modules/.*/detection_based_tracker
\\\\
.hpp"
)
# Conditional compilation
set
(
cv2_generated_
hdr
s
set
(
cv2_generated_
file
s
"
${
CMAKE_CURRENT_BINARY_DIR
}
/pyopencv_generated_include.h"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/pyopencv_generated_funcs.h"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/pyopencv_generated_types.h"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/pyopencv_generated_type_reg.h"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/pyopencv_generated_ns_reg.h"
)
set
(
cv2_generated_files
${
cv2_generated_hdrs
}
"
${
OPENCV_PYTHON_SIGNATURES_FILE
}
"
)
...
...
@@ -54,18 +51,29 @@ string(REPLACE ";" "\n" opencv_hdrs_ "${opencv_hdrs}")
file
(
WRITE
"
${
CMAKE_CURRENT_BINARY_DIR
}
/headers.txt"
"
${
opencv_hdrs_
}
"
)
add_custom_command
(
OUTPUT
${
cv2_generated_files
}
COMMAND
${
PYTHON_DEFAULT_EXECUTABLE
}
"
${
PYTHON_SOURCE_DIR
}
/src2/gen2.py"
${
CMAKE_CURRENT_BINARY_DIR
}
"
${
CMAKE_CURRENT_BINARY_DIR
}
/headers.txt"
DEPENDS
${
PYTHON_SOURCE_DIR
}
/src2/gen2.py
DEPENDS
${
PYTHON_SOURCE_DIR
}
/src2/hdr_parser.py
DEPENDS
${
CMAKE_CURRENT_BINARY_DIR
}
/headers.txt
DEPENDS
${
opencv_hdrs
}
COMMAND
"
${
PYTHON_DEFAULT_EXECUTABLE
}
"
"
${
PYTHON_SOURCE_DIR
}
/src2/gen2.py"
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/headers.txt"
DEPENDS
"
${
PYTHON_SOURCE_DIR
}
/src2/gen2.py"
"
${
PYTHON_SOURCE_DIR
}
/src2/hdr_parser.py"
# not a real build dependency (file(WRITE) result):
${CMAKE_CURRENT_BINARY_DIR}/headers.txt
${
opencv_hdrs
}
COMMENT
"Generate files for Python bindings and documentation"
)
add_custom_target
(
gen_opencv_python_source DEPENDS
${
cv2_generated_files
}
)
set
(
cv2_custom_hdr
"
${
CMAKE_CURRENT_BINARY_DIR
}
/pyopencv_custom_headers.h"
)
file
(
WRITE
${
cv2_custom_hdr
}
"//user-defined headers
\n
"
)
set
(
cv2_custom_hdr_str
"//user-defined headers
\n
"
)
foreach
(
uh
${
opencv_userdef_hdrs
}
)
file
(
APPEND
${
cv2_custom_hdr
}
"
#include
\"
${
uh
}
\"\n
"
)
set
(
cv2_custom_hdr_str
"
${
cv2_custom_hdr_str
}
#include
\"
${
uh
}
\"\n
"
)
endforeach
(
uh
)
if
(
EXISTS
"
${
cv2_custom_hdr
}
"
)
file
(
READ
"
${
cv2_custom_hdr
}
"
__content
)
else
()
set
(
__content
""
)
endif
()
if
(
"
${
__content
}
"
STREQUAL
"
${
cv2_custom_hdr_str
}
"
)
# Up-to-date
else
()
file
(
WRITE
"
${
cv2_custom_hdr
}
"
"
${
cv2_custom_hdr_str
}
"
)
endif
()
unset
(
__content
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录