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
93ff1fb2
Commit
93ff1fb2
authored
Mar 28, 2016
by
Прун Виктор
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct image borders and principal point computation in cv::stereoRectify
parent
fbc221d3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
calibration.cpp
modules/calib3d/src/calibration.cpp
+4
-4
No files found.
modules/calib3d/src/calibration.cpp
View file @
93ff1fb2
...
...
@@ -2289,8 +2289,8 @@ void cvStereoRectify( const CvMat* _cameraMatrix1, const CvMat* _cameraMatrix2,
for
(
i
=
0
;
i
<
4
;
i
++
)
{
int
j
=
(
i
<
2
)
?
0
:
1
;
_pts
[
i
].
x
=
(
float
)((
i
%
2
)
*
(
nx
-
1
));
_pts
[
i
].
y
=
(
float
)(
j
*
(
ny
-
1
));
_pts
[
i
].
x
=
(
float
)((
i
%
2
)
*
(
nx
));
_pts
[
i
].
y
=
(
float
)(
j
*
(
ny
));
}
cvUndistortPoints
(
&
pts
,
&
pts
,
A
,
Dk
,
0
,
0
);
cvConvertPointsHomogeneous
(
&
pts
,
&
pts_3
);
...
...
@@ -2304,8 +2304,8 @@ void cvStereoRectify( const CvMat* _cameraMatrix1, const CvMat* _cameraMatrix2,
_a_tmp
[
1
][
2
]
=
0.0
;
cvProjectPoints2
(
&
pts_3
,
k
==
0
?
_R1
:
_R2
,
&
Z
,
&
A_tmp
,
0
,
&
pts
);
CvScalar
avg
=
cvAvg
(
&
pts
);
cc_new
[
k
].
x
=
(
nx
-
1
)
/
2
-
avg
.
val
[
0
];
cc_new
[
k
].
y
=
(
ny
-
1
)
/
2
-
avg
.
val
[
1
];
cc_new
[
k
].
x
=
(
nx
)
/
2
-
avg
.
val
[
0
];
cc_new
[
k
].
y
=
(
ny
)
/
2
-
avg
.
val
[
1
];
}
// vertical focal length must be the same for both images to keep the epipolar constraint
...
...
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