Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
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_contrib
Commits
595c6b21
Commit
595c6b21
authored
Jun 20, 2015
by
felix
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Computing eigenvectors with cv::eigen(). Infinitely faster since it works.
parent
b3782363
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
ppf_helpers.cpp
modules/surface_matching/src/ppf_helpers.cpp
+19
-1
No files found.
modules/surface_matching/src/ppf_helpers.cpp
View file @
595c6b21
...
...
@@ -716,7 +716,25 @@ CV_EXPORTS int computeNormalsPC3d(const Mat& PC, Mat& PCNormals, const int NumNe
meanCovLocalPCInd
(
dataset
,
indLocal
,
3
,
NumNeighbors
,
C
,
mu
);
// eigenvectors of covariance matrix
eigenLowest33
(
C
,
nr
);
Mat
cov
(
3
,
3
,
CV_64F
),
eigVect
,
eigVal
;
double
*
covData
=
(
double
*
)
cov
.
data
;
covData
[
0
]
=
C
[
0
][
0
];
covData
[
1
]
=
C
[
0
][
1
];
covData
[
2
]
=
C
[
0
][
2
];
covData
[
3
]
=
C
[
1
][
0
];
covData
[
4
]
=
C
[
1
][
1
];
covData
[
5
]
=
C
[
1
][
2
];
covData
[
6
]
=
C
[
2
][
0
];
covData
[
7
]
=
C
[
2
][
1
];
covData
[
8
]
=
C
[
2
][
2
];
eigen
(
cov
,
eigVal
,
eigVect
);
Mat
lowestEigVec
;
//the eigenvector for the lowest eigenvalue is in the last row
eigVect
.
row
(
eigVect
.
rows
-
1
).
copyTo
(
lowestEigVec
);
double
*
eigData
=
(
double
*
)
lowestEigVec
.
data
;
nr
[
0
]
=
eigData
[
0
];
nr
[
1
]
=
eigData
[
1
];
nr
[
2
]
=
eigData
[
2
];
pcr
[
0
]
=
pci
[
0
];
pcr
[
1
]
=
pci
[
1
];
...
...
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