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
cbaf0eca
Commit
cbaf0eca
authored
May 13, 2015
by
Christian Richardt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed triangulation bug
http://code.opencv.org/issues/4334
.
parent
47431840
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
triangulate.cpp
modules/calib3d/src/triangulate.cpp
+4
-5
No files found.
modules/calib3d/src/triangulate.cpp
View file @
cbaf0eca
...
...
@@ -82,8 +82,8 @@ cvTriangulatePoints(CvMat* projMatr1, CvMat* projMatr2, CvMat* projPoints1, CvMa
CV_Error
(
CV_StsUnmatchedSizes
,
"Size of projection matrices must be 3x4"
);
// preallocate SVD matrices on stack
cv
::
Matx
<
double
,
6
,
4
>
matrA
;
cv
::
Matx
<
double
,
6
,
4
>
matrU
;
cv
::
Matx
<
double
,
4
,
4
>
matrA
;
cv
::
Matx
<
double
,
4
,
4
>
matrU
;
cv
::
Matx
<
double
,
4
,
1
>
matrW
;
cv
::
Matx
<
double
,
4
,
4
>
matrV
;
...
...
@@ -101,9 +101,8 @@ cvTriangulatePoints(CvMat* projMatr1, CvMat* projMatr2, CvMat* projPoints1, CvMa
y
=
cvmGet
(
projPoints
[
j
],
1
,
i
);
for
(
int
k
=
0
;
k
<
4
;
k
++
)
{
matrA
(
j
*
3
+
0
,
k
)
=
x
*
cvmGet
(
projMatrs
[
j
],
2
,
k
)
-
cvmGet
(
projMatrs
[
j
],
0
,
k
);
matrA
(
j
*
3
+
1
,
k
)
=
y
*
cvmGet
(
projMatrs
[
j
],
2
,
k
)
-
cvmGet
(
projMatrs
[
j
],
1
,
k
);
matrA
(
j
*
3
+
2
,
k
)
=
x
*
cvmGet
(
projMatrs
[
j
],
1
,
k
)
-
y
*
cvmGet
(
projMatrs
[
j
],
0
,
k
);
matrA
(
j
*
2
+
0
,
k
)
=
x
*
cvmGet
(
projMatrs
[
j
],
2
,
k
)
-
cvmGet
(
projMatrs
[
j
],
0
,
k
);
matrA
(
j
*
2
+
1
,
k
)
=
y
*
cvmGet
(
projMatrs
[
j
],
2
,
k
)
-
cvmGet
(
projMatrs
[
j
],
1
,
k
);
}
}
/* Solve system for current point */
...
...
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