Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
948d9664
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,发现更多精彩内容 >>
提交
948d9664
编写于
10月 21, 2010
作者:
V
Vadim Pisarevsky
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
change at<double> => at<float>, since the histogram is cv_32f, not cv_64f
上级
25919884
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
5 addition
and
5 deletion
+5
-5
modules/contrib/src/quadsubpix.cpp
modules/contrib/src/quadsubpix.cpp
+5
-5
未找到文件。
modules/contrib/src/quadsubpix.cpp
浏览文件 @
948d9664
...
...
@@ -62,7 +62,7 @@ void drawCircles(Mat& img, const vector<Point2f>& corners, const vector<float>&
}
}
int
histQuantile
(
const
Mat
ND
&
hist
,
float
quantile
)
int
histQuantile
(
const
Mat
&
hist
,
float
quantile
)
{
if
(
hist
.
dims
>
1
)
return
-
1
;
// works for 1D histograms only
...
...
@@ -71,7 +71,7 @@ int histQuantile(const MatND& hist, float quantile)
float
quantile_sum
=
total_sum
*
quantile
;
for
(
int
j
=
0
;
j
<
hist
.
size
[
0
];
j
++
)
{
cur_sum
+=
(
float
)
hist
.
at
<
double
>
(
j
);
cur_sum
+=
(
float
)
hist
.
at
<
float
>
(
j
);
if
(
cur_sum
>
quantile_sum
)
{
return
j
;
...
...
@@ -173,7 +173,7 @@ void findCorner(const vector<Point2f>& contour, Point2f point, Point2f& corner)
return
;
}
int
segment_hist_max
(
const
Mat
ND
&
hist
,
int
&
low_thresh
,
int
&
high_thresh
)
int
segment_hist_max
(
const
Mat
&
hist
,
int
&
low_thresh
,
int
&
high_thresh
)
{
Mat
bw
;
//const double max_bell_width = 20; // we expect two bells with width bounded above
...
...
@@ -194,7 +194,7 @@ int segment_hist_max(const MatND& hist, int& low_thresh, int& high_thresh)
const
double
out_of_bells_fraction
=
0.1
;
for
(
int
x
=
0
;
x
<
hist
.
size
[
0
];
x
++
)
{
quantile_sum
+=
hist
.
at
<
double
>
(
x
);
quantile_sum
+=
hist
.
at
<
float
>
(
x
);
if
(
quantile_sum
<
0.2
*
total_sum
)
continue
;
if
(
quantile_sum
-
low_sum
>
out_of_bells_fraction
*
total_sum
)
...
...
@@ -228,7 +228,7 @@ bool find4QuadCornerSubpix(const Mat& img, std::vector<Point2f>& corners, Size r
const
int
nbins
=
256
;
float
ranges
[]
=
{
0
,
256
};
const
float
*
_ranges
=
ranges
;
Mat
ND
hist
;
Mat
hist
;
#if defined(_SUBPIX_VERBOSE)
vector
<
float
>
radius
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录