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
242e64c0
Commit
242e64c0
authored
9 years ago
by
Christian Richardt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed triangulation bug
http://code.opencv.org/issues/4334
.
parent
cc94b393
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
triangulate.cpp
modules/calib3d/src/triangulate.cpp
+6
-7
No files found.
modules/calib3d/src/triangulate.cpp
View file @
242e64c0
...
...
@@ -82,18 +82,18 @@ cvTriangulatePoints(CvMat* projMatr1, CvMat* projMatr2, CvMat* projPoints1, CvMa
CV_Error
(
CV_StsUnmatchedSizes
,
"Size of projection matrices must be 3x4"
);
CvMat
matrA
;
double
matrA_dat
[
24
];
matrA
=
cvMat
(
6
,
4
,
CV_64F
,
matrA_dat
);
double
matrA_dat
[
16
];
matrA
=
cvMat
(
4
,
4
,
CV_64F
,
matrA_dat
);
//CvMat matrU;
CvMat
matrW
;
CvMat
matrV
;
//double matrU_dat[9*9];
double
matrW_dat
[
6
*
4
];
double
matrW_dat
[
4
*
4
];
double
matrV_dat
[
4
*
4
];
//matrU = cvMat(6,6,CV_64F,matrU_dat);
matrW
=
cvMat
(
6
,
4
,
CV_64F
,
matrW_dat
);
matrW
=
cvMat
(
4
,
4
,
CV_64F
,
matrW_dat
);
matrV
=
cvMat
(
4
,
4
,
CV_64F
,
matrV_dat
);
CvMat
*
projPoints
[
2
];
...
...
@@ -117,9 +117,8 @@ cvTriangulatePoints(CvMat* projMatr1, CvMat* projMatr2, CvMat* projPoints1, CvMa
y
=
cvmGet
(
projPoints
[
j
],
1
,
i
);
for
(
int
k
=
0
;
k
<
4
;
k
++
)
{
cvmSet
(
&
matrA
,
j
*
3
+
0
,
k
,
x
*
cvmGet
(
projMatrs
[
j
],
2
,
k
)
-
cvmGet
(
projMatrs
[
j
],
0
,
k
)
);
cvmSet
(
&
matrA
,
j
*
3
+
1
,
k
,
y
*
cvmGet
(
projMatrs
[
j
],
2
,
k
)
-
cvmGet
(
projMatrs
[
j
],
1
,
k
)
);
cvmSet
(
&
matrA
,
j
*
3
+
2
,
k
,
x
*
cvmGet
(
projMatrs
[
j
],
1
,
k
)
-
y
*
cvmGet
(
projMatrs
[
j
],
0
,
k
)
);
cvmSet
(
&
matrA
,
j
*
2
+
0
,
k
,
x
*
cvmGet
(
projMatrs
[
j
],
2
,
k
)
-
cvmGet
(
projMatrs
[
j
],
0
,
k
)
);
cvmSet
(
&
matrA
,
j
*
2
+
1
,
k
,
y
*
cvmGet
(
projMatrs
[
j
],
2
,
k
)
-
cvmGet
(
projMatrs
[
j
],
1
,
k
)
);
}
}
/* Solve system for current point */
...
...
This diff is collapsed.
Click to expand it.
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