Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
04d5ba26
O
Opencv
项目概览
Greenplum
/
Opencv
10 个月 前同步成功
通知
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,体验更适合开发者的 AI 搜索 >>
提交
04d5ba26
编写于
6月 30, 2021
作者:
A
Alexander Alekhin
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #20330 from Wovchena:fix-arg-for-calcHist-in-demos
上级
828304d5
90be83ae
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
8 addition
and
8 deletion
+8
-8
samples/cpp/tutorial_code/Histograms_Matching/MatchTemplate_Demo.cpp
.../tutorial_code/Histograms_Matching/MatchTemplate_Demo.cpp
+1
-1
samples/cpp/tutorial_code/Histograms_Matching/calcBackProject_Demo1.cpp
...torial_code/Histograms_Matching/calcBackProject_Demo1.cpp
+3
-3
samples/cpp/tutorial_code/Histograms_Matching/calcHist_Demo.cpp
...s/cpp/tutorial_code/Histograms_Matching/calcHist_Demo.cpp
+4
-4
未找到文件。
samples/cpp/tutorial_code/Histograms_Matching/MatchTemplate_Demo.cpp
浏览文件 @
04d5ba26
...
...
@@ -89,7 +89,7 @@ void MatchingMethod( int, void* )
//! [create_result_matrix]
/// Create the result matrix
int
result_cols
=
img
.
cols
-
templ
.
cols
+
1
;
int
result_cols
=
img
.
cols
-
templ
.
cols
+
1
;
int
result_rows
=
img
.
rows
-
templ
.
rows
+
1
;
result
.
create
(
result_rows
,
result_cols
,
CV_32FC1
);
...
...
samples/cpp/tutorial_code/Histograms_Matching/calcBackProject_Demo1.cpp
浏览文件 @
04d5ba26
...
...
@@ -72,18 +72,18 @@ void Hist_and_Backproj(int, void* )
//! [initialize]
int
histSize
=
MAX
(
bins
,
2
);
float
hue_range
[]
=
{
0
,
180
};
const
float
*
ranges
=
{
hue_range
};
const
float
*
ranges
[]
=
{
hue_range
};
//! [initialize]
//! [Get the Histogram and normalize it]
Mat
hist
;
calcHist
(
&
hue
,
1
,
0
,
Mat
(),
hist
,
1
,
&
histSize
,
&
ranges
,
true
,
false
);
calcHist
(
&
hue
,
1
,
0
,
Mat
(),
hist
,
1
,
&
histSize
,
ranges
,
true
,
false
);
normalize
(
hist
,
hist
,
0
,
255
,
NORM_MINMAX
,
-
1
,
Mat
()
);
//! [Get the Histogram and normalize it]
//! [Get Backprojection]
Mat
backproj
;
calcBackProject
(
&
hue
,
1
,
0
,
hist
,
backproj
,
&
ranges
,
1
,
true
);
calcBackProject
(
&
hue
,
1
,
0
,
hist
,
backproj
,
ranges
,
1
,
true
);
//! [Get Backprojection]
//! [Draw the backproj]
...
...
samples/cpp/tutorial_code/Histograms_Matching/calcHist_Demo.cpp
浏览文件 @
04d5ba26
...
...
@@ -37,7 +37,7 @@ int main(int argc, char** argv)
//! [Set the ranges ( for B,G,R) )]
float
range
[]
=
{
0
,
256
};
//the upper boundary is exclusive
const
float
*
histRange
=
{
range
};
const
float
*
histRange
[]
=
{
range
};
//! [Set the ranges ( for B,G,R) )]
//! [Set histogram param]
...
...
@@ -46,9 +46,9 @@ int main(int argc, char** argv)
//! [Compute the histograms]
Mat
b_hist
,
g_hist
,
r_hist
;
calcHist
(
&
bgr_planes
[
0
],
1
,
0
,
Mat
(),
b_hist
,
1
,
&
histSize
,
&
histRange
,
uniform
,
accumulate
);
calcHist
(
&
bgr_planes
[
1
],
1
,
0
,
Mat
(),
g_hist
,
1
,
&
histSize
,
&
histRange
,
uniform
,
accumulate
);
calcHist
(
&
bgr_planes
[
2
],
1
,
0
,
Mat
(),
r_hist
,
1
,
&
histSize
,
&
histRange
,
uniform
,
accumulate
);
calcHist
(
&
bgr_planes
[
0
],
1
,
0
,
Mat
(),
b_hist
,
1
,
&
histSize
,
histRange
,
uniform
,
accumulate
);
calcHist
(
&
bgr_planes
[
1
],
1
,
0
,
Mat
(),
g_hist
,
1
,
&
histSize
,
histRange
,
uniform
,
accumulate
);
calcHist
(
&
bgr_planes
[
2
],
1
,
0
,
Mat
(),
r_hist
,
1
,
&
histSize
,
histRange
,
uniform
,
accumulate
);
//! [Compute the histograms]
//! [Draw the histograms for B, G and R]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录