Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
2acfb263
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,发现更多精彩内容 >>
提交
2acfb263
编写于
7月 20, 2016
作者:
A
Alexander Alekhin
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #6910 from ilya-lavrenov:clone
上级
c4cc54e5
87ae4e05
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
12 addition
and
12 deletion
+12
-12
modules/core/src/array.cpp
modules/core/src/array.cpp
+4
-3
modules/core/src/copy.cpp
modules/core/src/copy.cpp
+0
-6
modules/core/src/persistence.cpp
modules/core/src/persistence.cpp
+0
-2
modules/core/test/test_io.cpp
modules/core/test/test_io.cpp
+0
-1
modules/core/test/test_mat.cpp
modules/core/test/test_mat.cpp
+8
-0
未找到文件。
modules/core/src/array.cpp
浏览文件 @
2acfb263
...
...
@@ -115,12 +115,13 @@ cvCreateMatHeader( int rows, int cols, int type )
{
type
=
CV_MAT_TYPE
(
type
);
if
(
rows
<
0
||
cols
<
=
0
)
if
(
rows
<
0
||
cols
<
0
)
CV_Error
(
CV_StsBadSize
,
"Non-positive width or height"
);
int
min_step
=
CV_ELEM_SIZE
(
type
)
*
cols
;
int
min_step
=
CV_ELEM_SIZE
(
type
);
if
(
min_step
<=
0
)
CV_Error
(
CV_StsUnsupportedFormat
,
"Invalid matrix type"
);
min_step
*=
cols
;
CvMat
*
arr
=
(
CvMat
*
)
cvAlloc
(
sizeof
(
*
arr
));
...
...
@@ -148,7 +149,7 @@ cvInitMatHeader( CvMat* arr, int rows, int cols,
if
(
(
unsigned
)
CV_MAT_DEPTH
(
type
)
>
CV_DEPTH_MAX
)
CV_Error
(
CV_BadNumChannels
,
""
);
if
(
rows
<
0
||
cols
<
=
0
)
if
(
rows
<
0
||
cols
<
0
)
CV_Error
(
CV_StsBadSize
,
"Non-positive cols or rows"
);
type
=
CV_MAT_TYPE
(
type
);
...
...
modules/core/src/copy.cpp
浏览文件 @
2acfb263
...
...
@@ -259,12 +259,6 @@ void Mat::copyTo( OutputArray _dst ) const
return
;
}
if
(
empty
()
)
{
_dst
.
release
();
return
;
}
if
(
_dst
.
isUMat
()
)
{
_dst
.
create
(
dims
,
size
.
p
,
type
()
);
...
...
modules/core/src/persistence.cpp
浏览文件 @
2acfb263
...
...
@@ -3909,8 +3909,6 @@ icvReadMat( CvFileStorage* fs, CvFileNode* node )
mat
=
cvCreateMat
(
rows
,
cols
,
elem_type
);
cvReadRawData
(
fs
,
data
,
mat
->
data
.
ptr
,
dt
);
}
else
if
(
rows
==
0
&&
cols
==
0
)
mat
=
cvCreateMatHeader
(
0
,
1
,
elem_type
);
else
mat
=
cvCreateMatHeader
(
rows
,
cols
,
elem_type
);
...
...
modules/core/test/test_io.cpp
浏览文件 @
2acfb263
...
...
@@ -706,7 +706,6 @@ protected:
EXPECT_EQ
(
_em_in
.
rows
,
_em_out
.
rows
);
EXPECT_EQ
(
_em_in
.
cols
,
_em_out
.
cols
);
EXPECT_EQ
(
_em_in
.
dims
,
_em_out
.
dims
);
EXPECT_EQ
(
_em_in
.
depth
(),
_em_out
.
depth
());
EXPECT_TRUE
(
_em_in
.
empty
());
...
...
modules/core/test/test_mat.cpp
浏览文件 @
2acfb263
...
...
@@ -1538,3 +1538,11 @@ TEST(Mat, push_back_vector)
ASSERT_EQ
(
6
,
result
.
rows
);
}
TEST
(
Mat
,
regression_5917_clone_empty
)
{
Mat
cloned
;
Mat_
<
Point2f
>
source
(
5
,
0
);
ASSERT_NO_THROW
(
cloned
=
source
.
clone
());
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录