Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
0af39474
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,发现更多精彩内容 >>
提交
0af39474
编写于
7月 14, 2016
作者:
I
Ilya Lavrenov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
added note about cv::reduce output type for MIN/MAX
上级
9bda0546
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
14 addition
and
3 deletion
+14
-3
modules/core/include/opencv2/core.hpp
modules/core/include/opencv2/core.hpp
+3
-3
modules/core/test/test_mat.cpp
modules/core/test/test_mat.cpp
+11
-0
未找到文件。
modules/core/include/opencv2/core.hpp
浏览文件 @
0af39474
...
...
@@ -826,9 +826,9 @@ CV_EXPORTS void minMaxLoc(const SparseMat& a, double* minVal,
The function reduce reduces the matrix to a vector by treating the matrix rows/columns as a set of
1D vectors and performing the specified operation on the vectors until a single row/column is
obtained. For example, the function can be used to compute horizontal and vertical projections of a
raster image. In case of REDUCE_
SUM and REDUCE_AVG , the output may have a larger element
bit-depth to preserve accuracy. And multi-channel arrays are also supported in these two reduction
modes.
raster image. In case of REDUCE_
MAX and REDUCE_MIN , the output image should have the same type as the source one.
In case of REDUCE_SUM and REDUCE_AVG , the output may have a larger element bit-depth to preserve accuracy.
And multi-channel arrays are also supported in these two reduction
modes.
@param src input 2D matrix.
@param dst output vector. Its size and type is defined by dim and dtype parameters.
@param dim dimension index along which the matrix is reduced. 0 means that the matrix is reduced to
...
...
modules/core/test/test_mat.cpp
浏览文件 @
0af39474
...
...
@@ -1509,3 +1509,14 @@ TEST(Mat, regression_6696_BigData_8Gb)
EXPECT_EQ
(
4
,
destImageBGR
.
at
<
Vec4b
>
(
height
-
1
,
width
-
1
)[
3
]);
}
#endif
TEST
(
Reduce
,
regression_should_fail_bug_4594
)
{
cv
::
Mat
src
=
cv
::
Mat
::
eye
(
4
,
4
,
CV_8U
);
std
::
vector
<
int
>
dst
;
EXPECT_THROW
(
cv
::
reduce
(
src
,
dst
,
0
,
CV_REDUCE_MIN
,
CV_32S
),
cv
::
Exception
);
EXPECT_THROW
(
cv
::
reduce
(
src
,
dst
,
0
,
CV_REDUCE_MAX
,
CV_32S
),
cv
::
Exception
);
EXPECT_NO_THROW
(
cv
::
reduce
(
src
,
dst
,
0
,
CV_REDUCE_SUM
,
CV_32S
));
EXPECT_NO_THROW
(
cv
::
reduce
(
src
,
dst
,
0
,
CV_REDUCE_AVG
,
CV_32S
));
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录