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
fa42a1cf
Commit
fa42a1cf
authored
Jul 22, 2016
by
Прун Виктор
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix calib3d changes in #6836 plus some others
parent
df912076
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
calibration.cpp
modules/calib3d/src/calibration.cpp
+10
-10
No files found.
modules/calib3d/src/calibration.cpp
View file @
fa42a1cf
...
...
@@ -1210,8 +1210,8 @@ CV_IMPL void cvInitIntrinsicParams2D( const CvMat* objectPoints,
matA
.
reset
(
cvCreateMat
(
2
*
nimages
,
2
,
CV_64F
));
_b
.
reset
(
cvCreateMat
(
2
*
nimages
,
1
,
CV_64F
));
a
[
2
]
=
(
!
imageSize
.
width
)
?
0.5
:
(
imageSize
.
width
-
1
)
*
0.5
;
a
[
5
]
=
(
!
imageSize
.
height
)
?
0.5
:
(
imageSize
.
height
-
1
)
*
0.5
;
a
[
2
]
=
(
!
imageSize
.
width
)
?
0.5
:
(
imageSize
.
width
)
*
0.5
;
a
[
5
]
=
(
!
imageSize
.
height
)
?
0.5
:
(
imageSize
.
height
)
*
0.5
;
_allH
.
reset
(
cvCreateMat
(
nimages
,
9
,
CV_64F
));
// extract vanishing points in order to obtain initial value for the focal length
...
...
@@ -2494,8 +2494,8 @@ void cvGetOptimalNewCameraMatrix( const CvMat* cameraMatrix, const CvMat* distCo
{
double
cx0
=
M
[
0
][
2
];
double
cy0
=
M
[
1
][
2
];
double
cx
=
(
newImgSize
.
width
-
1
)
*
0.5
;
double
cy
=
(
newImgSize
.
height
-
1
)
*
0.5
;
double
cx
=
(
newImgSize
.
width
)
*
0.5
;
double
cy
=
(
newImgSize
.
height
)
*
0.5
;
icvGetRectangles
(
cameraMatrix
,
distCoeffs
,
0
,
cameraMatrix
,
imgSize
,
inner
,
outer
);
double
s0
=
std
::
max
(
std
::
max
(
std
::
max
((
double
)
cx
/
(
cx0
-
inner
.
x
),
(
double
)
cy
/
(
cy0
-
inner
.
y
)),
...
...
@@ -2529,14 +2529,14 @@ void cvGetOptimalNewCameraMatrix( const CvMat* cameraMatrix, const CvMat* distCo
icvGetRectangles
(
cameraMatrix
,
distCoeffs
,
0
,
0
,
imgSize
,
inner
,
outer
);
// Projection mapping inner rectangle to viewport
double
fx0
=
(
newImgSize
.
width
-
1
)
/
inner
.
width
;
double
fy0
=
(
newImgSize
.
height
-
1
)
/
inner
.
height
;
double
fx0
=
(
newImgSize
.
width
)
/
inner
.
width
;
double
fy0
=
(
newImgSize
.
height
)
/
inner
.
height
;
double
cx0
=
-
fx0
*
inner
.
x
;
double
cy0
=
-
fy0
*
inner
.
y
;
// Projection mapping outer rectangle to viewport
double
fx1
=
(
newImgSize
.
width
-
1
)
/
outer
.
width
;
double
fy1
=
(
newImgSize
.
height
-
1
)
/
outer
.
height
;
double
fx1
=
(
newImgSize
.
width
)
/
outer
.
width
;
double
fy1
=
(
newImgSize
.
height
)
/
outer
.
height
;
double
cx1
=
-
fx1
*
outer
.
x
;
double
cy1
=
-
fy1
*
outer
.
y
;
...
...
@@ -2600,8 +2600,8 @@ CV_IMPL int cvStereoRectifyUncalibrated(
cvGEMM
(
&
U
,
&
W
,
1
,
0
,
0
,
&
W
,
CV_GEMM_A_T
);
cvMatMul
(
&
W
,
&
V
,
&
F
);
cx
=
cvRound
(
(
imgSize
.
width
-
1
)
*
0.5
);
cy
=
cvRound
(
(
imgSize
.
height
-
1
)
*
0.5
);
cx
=
cvRound
(
(
imgSize
.
width
)
*
0.5
);
cy
=
cvRound
(
(
imgSize
.
height
)
*
0.5
);
cvZero
(
_H1
);
cvZero
(
_H2
);
...
...
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