Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
7fd1d757
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,发现更多精彩内容 >>
提交
7fd1d757
编写于
3月 04, 2013
作者:
V
Vadim Pisarevsky
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
some more minor fixes
上级
8a6d2bbd
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
20 addition
and
25 deletion
+20
-25
modules/calib3d/src/fundam.cpp
modules/calib3d/src/fundam.cpp
+18
-21
modules/calib3d/src/ptsetreg.cpp
modules/calib3d/src/ptsetreg.cpp
+2
-4
未找到文件。
modules/calib3d/src/fundam.cpp
浏览文件 @
7fd1d757
...
...
@@ -130,12 +130,8 @@ public:
const
Point2f
*
M
=
m1
.
ptr
<
Point2f
>
();
const
Point2f
*
m
=
m2
.
ptr
<
Point2f
>
();
double
LtL
[
9
][
9
],
W
[
9
][
1
],
V
[
9
][
9
];
Mat
_LtL
(
9
,
9
,
CV_64F
,
&
LtL
[
0
][
0
]
);
Mat
matW
(
9
,
1
,
CV_64F
,
W
);
Mat
matV
(
9
,
9
,
CV_64F
,
V
);
Mat
_H0
(
3
,
3
,
CV_64F
,
V
[
8
]
);
Mat
_Htemp
(
3
,
3
,
CV_64F
,
V
[
7
]
);
Matx
<
double
,
9
,
9
>
LtL
,
V
;
Vec
<
double
,
9
>
W
;
Point2d
cM
(
0
,
0
),
cm
(
0
,
0
),
sM
(
0
,
0
),
sm
(
0
,
0
);
for
(
i
=
0
;
i
<
count
;
i
++
)
...
...
@@ -163,12 +159,9 @@ public:
sm
.
x
=
count
/
sm
.
x
;
sm
.
y
=
count
/
sm
.
y
;
sM
.
x
=
count
/
sM
.
x
;
sM
.
y
=
count
/
sM
.
y
;
double
invHnorm
[
9
]
=
{
1.
/
sm
.
x
,
0
,
cm
.
x
,
0
,
1.
/
sm
.
y
,
cm
.
y
,
0
,
0
,
1
};
double
Hnorm2
[
9
]
=
{
sM
.
x
,
0
,
-
cM
.
x
*
sM
.
x
,
0
,
sM
.
y
,
-
cM
.
y
*
sM
.
y
,
0
,
0
,
1
};
Mat
_invHnorm
(
3
,
3
,
CV_64FC1
,
invHnorm
);
Mat
_Hnorm2
(
3
,
3
,
CV_64FC1
,
Hnorm2
);
Matx33d
invHnorm
(
1.
/
sm
.
x
,
0
,
cm
.
x
,
0
,
1.
/
sm
.
y
,
cm
.
y
,
0
,
0
,
1
);
Matx33d
Hnorm2
(
sM
.
x
,
0
,
-
cM
.
x
*
sM
.
x
,
0
,
sM
.
y
,
-
cM
.
y
*
sM
.
y
,
0
,
0
,
1
);
_LtL
.
setTo
(
Scalar
::
all
(
0
));
for
(
i
=
0
;
i
<
count
;
i
++
)
{
double
x
=
(
m
[
i
].
x
-
cm
.
x
)
*
sm
.
x
,
y
=
(
m
[
i
].
y
-
cm
.
y
)
*
sm
.
y
;
...
...
@@ -178,14 +171,14 @@ public:
int
j
,
k
;
for
(
j
=
0
;
j
<
9
;
j
++
)
for
(
k
=
j
;
k
<
9
;
k
++
)
LtL
[
j
][
k
]
+=
Lx
[
j
]
*
Lx
[
k
]
+
Ly
[
j
]
*
Ly
[
k
];
LtL
(
j
,
k
)
+=
Lx
[
j
]
*
Lx
[
k
]
+
Ly
[
j
]
*
Ly
[
k
];
}
completeSymm
(
_
LtL
);
eigen
(
_LtL
,
matW
,
matV
);
_Htemp
=
_invHnorm
*
_H0
;
_H0
=
_Htemp
*
_
Hnorm2
;
_H0
.
convertTo
(
_model
,
_H0
.
type
(),
1.
/
_H0
.
at
<
double
>
(
2
,
2
)
);
completeSymm
(
LtL
);
eigen
(
LtL
,
W
,
V
);
Matx33d
Htemp
=
invHnorm
*
Matx33d
(
&
V
(
8
,
0
))
;
Matx33d
H0
=
Htemp
*
Hnorm2
;
Mat
(
H0
).
convertTo
(
_model
,
CV_64F
,
1.
/
H0
(
2
,
2
)
);
return
1
;
}
...
...
@@ -197,7 +190,12 @@ public:
const
Point2f
*
M
=
m1
.
ptr
<
Point2f
>
();
const
Point2f
*
m
=
m2
.
ptr
<
Point2f
>
();
const
double
*
H
=
model
.
ptr
<
double
>
();
float
Hf
[]
=
{
(
float
)
H
[
0
],
(
float
)
H
[
1
],
(
float
)
H
[
2
],
(
float
)
H
[
3
],
(
float
)
H
[
4
],
(
float
)
H
[
5
],
(
float
)
H
[
6
],
(
float
)
H
[
7
]
};
float
Hf
[]
=
{
(
float
)
H
[
0
],
(
float
)
H
[
1
],
(
float
)
H
[
2
],
(
float
)
H
[
3
],
(
float
)
H
[
4
],
(
float
)
H
[
5
],
(
float
)
H
[
6
],
(
float
)
H
[
7
]
};
_err
.
create
(
count
,
1
,
CV_32F
);
float
*
err
=
_err
.
getMat
().
ptr
<
float
>
();
...
...
@@ -692,8 +690,7 @@ cv::Mat cv::findFundamentalMat( InputArray _points1, InputArray _points2,
result
=
cb
->
runKernel
(
m1
,
m2
,
F
);
if
(
_mask
.
needed
()
)
{
if
(
!
_mask
.
fixedSize
()
)
_mask
.
create
(
npoints
,
1
,
CV_8U
);
_mask
.
create
(
npoints
,
1
,
CV_8U
,
-
1
,
true
);
Mat
mask
=
_mask
.
getMat
();
CV_Assert
(
(
mask
.
cols
==
1
||
mask
.
rows
==
1
)
&&
(
int
)
mask
.
total
()
==
npoints
);
mask
.
setTo
(
Scalar
::
all
(
1
));
...
...
modules/calib3d/src/ptsetreg.cpp
浏览文件 @
7fd1d757
...
...
@@ -182,8 +182,7 @@ public:
if
(
_mask
.
needed
()
)
{
if
(
!
_mask
.
fixedSize
()
)
_mask
.
create
(
count
,
1
,
CV_8U
);
_mask
.
create
(
count
,
1
,
CV_8U
,
-
1
,
true
);
bestMask0
=
bestMask
=
_mask
.
getMat
();
CV_Assert
(
(
bestMask
.
cols
==
1
||
bestMask
.
rows
==
1
)
&&
(
int
)
bestMask
.
total
()
==
count
);
}
...
...
@@ -301,8 +300,7 @@ public:
if
(
_mask
.
needed
()
)
{
if
(
!
_mask
.
fixedSize
()
)
_mask
.
create
(
count
,
1
,
CV_8U
);
_mask
.
create
(
count
,
1
,
CV_8U
,
-
1
,
true
);
mask0
=
mask
=
_mask
.
getMat
();
CV_Assert
(
(
mask
.
cols
==
1
||
mask
.
rows
==
1
)
&&
(
int
)
mask
.
total
()
==
count
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录