Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
77f2d945
Commit
77f2d945
authored
Jul 18, 2013
by
Roman Donchenko
Committed by
OpenCV Buildbot
Jul 18, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1144 from prclibo:master
parents
4b234fa0
27a0ed00
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
five-point.cpp
modules/calib3d/src/five-point.cpp
+12
-2
No files found.
modules/calib3d/src/five-point.cpp
View file @
77f2d945
...
@@ -529,16 +529,25 @@ int cv::recoverPose( InputArray E, InputArray _points1, InputArray _points2, Out
...
@@ -529,16 +529,25 @@ int cv::recoverPose( InputArray E, InputArray _points1, InputArray _points2, Out
mask4
=
(
Q
.
row
(
2
)
>
0
)
&
mask4
;
mask4
=
(
Q
.
row
(
2
)
>
0
)
&
mask4
;
mask4
=
(
Q
.
row
(
2
)
<
dist
)
&
mask4
;
mask4
=
(
Q
.
row
(
2
)
<
dist
)
&
mask4
;
mask1
=
mask1
.
t
();
mask2
=
mask2
.
t
();
mask3
=
mask3
.
t
();
mask4
=
mask4
.
t
();
// If _mask is given, then use it to filter outliers.
// If _mask is given, then use it to filter outliers.
if
(
_mask
.
needed
())
if
(
!
_mask
.
empty
())
{
{
_mask
.
create
(
1
,
npoints
,
CV_8U
,
-
1
,
true
);
Mat
mask
=
_mask
.
getMat
();
Mat
mask
=
_mask
.
getMat
();
CV_Assert
(
mask
.
size
()
==
mask1
.
size
());
bitwise_and
(
mask
,
mask1
,
mask1
);
bitwise_and
(
mask
,
mask1
,
mask1
);
bitwise_and
(
mask
,
mask2
,
mask2
);
bitwise_and
(
mask
,
mask2
,
mask2
);
bitwise_and
(
mask
,
mask3
,
mask3
);
bitwise_and
(
mask
,
mask3
,
mask3
);
bitwise_and
(
mask
,
mask4
,
mask4
);
bitwise_and
(
mask
,
mask4
,
mask4
);
}
}
if
(
_mask
.
empty
()
&&
_mask
.
needed
())
{
_mask
.
create
(
mask1
.
size
(),
CV_8U
);
}
CV_Assert
(
_R
.
needed
()
&&
_t
.
needed
());
CV_Assert
(
_R
.
needed
()
&&
_t
.
needed
());
_R
.
create
(
3
,
3
,
R1
.
type
());
_R
.
create
(
3
,
3
,
R1
.
type
());
...
@@ -548,6 +557,7 @@ int cv::recoverPose( InputArray E, InputArray _points1, InputArray _points2, Out
...
@@ -548,6 +557,7 @@ int cv::recoverPose( InputArray E, InputArray _points1, InputArray _points2, Out
int
good2
=
countNonZero
(
mask2
);
int
good2
=
countNonZero
(
mask2
);
int
good3
=
countNonZero
(
mask3
);
int
good3
=
countNonZero
(
mask3
);
int
good4
=
countNonZero
(
mask4
);
int
good4
=
countNonZero
(
mask4
);
if
(
good1
>=
good2
&&
good1
>=
good3
&&
good1
>=
good4
)
if
(
good1
>=
good2
&&
good1
>=
good3
&&
good1
>=
good4
)
{
{
R1
.
copyTo
(
_R
);
R1
.
copyTo
(
_R
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment