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
b527ab99
Commit
b527ab99
authored
Feb 21, 2017
by
Alexander Alekhin
Committed by
GitHub
Feb 21, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1008 from Sahloul:features/python_wrapper/surface_matching
Wrap `computeNormalsPC3d()` for python
parents
b11ce40e
1df961cd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
ppf_helpers.hpp
...matching/include/opencv2/surface_matching/ppf_helpers.hpp
+4
-4
ppf_normal_computation.cpp
modules/surface_matching/samples/ppf_normal_computation.cpp
+1
-1
ppf_helpers.cpp
modules/surface_matching/src/ppf_helpers.cpp
+1
-1
No files found.
modules/surface_matching/include/opencv2/surface_matching/ppf_helpers.hpp
View file @
b527ab99
...
...
@@ -89,7 +89,7 @@ Mat samplePCUniformInd(Mat PC, int sampleStep, std::vector<int>& indices);
* @param [in] zrange Z components (min and max) of the bounding box of the model
* @param [in] sample_step_relative The point cloud is sampled such that all points
* have a certain minimum distance. This minimum distance is determined relatively using
* the parameter sample_step_relative.
* the parameter sample_step_relative.
* @param [in] weightByCenter The contribution of the quantized data points can be weighted
* by the distance to the origin. This parameter enables/disables the use of weighting.
* @return Sampled point cloud
...
...
@@ -135,7 +135,7 @@ CV_EXPORTS void getRandomPose(double Pose[16]);
/**
* Adds a uniform noise in the given scale to the input point cloud
* @param [in] pc Input point cloud (CV_32F family).
* @param [in] pc Input point cloud (CV_32F family).
* @param [in] scale Input scale of the noise. The larger the scale, the more noisy the output
*/
CV_EXPORTS
Mat
addNoisePC
(
Mat
pc
,
double
scale
);
...
...
@@ -148,13 +148,13 @@ CV_EXPORTS Mat addNoisePC(Mat pc, double scale);
* If PCNormals is provided to be an Nx6 matrix, then no new allocation
* is made, instead the existing memory is overwritten.
* @param [in] PC Input point cloud to compute the normals for.
* @param [
in
] PCNormals Output point cloud
* @param [
out
] PCNormals Output point cloud
* @param [in] NumNeighbors Number of neighbors to take into account in a local region
* @param [in] FlipViewpoint Should normals be flipped to a viewing direction?
* @param [in] viewpoint
* @return Returns 0 on success
*/
CV_EXPORTS
int
computeNormalsPC3d
(
const
Mat
&
PC
,
Mat
&
PCNormals
,
const
int
NumNeighbors
,
const
bool
FlipViewpoint
,
const
double
viewpoint
[
3
]
);
CV_EXPORTS
_W
int
computeNormalsPC3d
(
const
Mat
&
PC
,
CV_OUT
Mat
&
PCNormals
,
const
int
NumNeighbors
,
const
bool
FlipViewpoint
,
const
Vec3d
&
viewpoint
);
//! @}
...
...
modules/surface_matching/samples/ppf_normal_computation.cpp
View file @
b527ab99
...
...
@@ -65,7 +65,7 @@ int main(int argc, char** argv)
cv
::
ppf_match_3d
::
loadPLYSimple
(
modelFileName
.
c_str
(),
1
).
copyTo
(
points
);
cout
<<
"Computing normals
\n
"
;
double
viewpoint
[
3
]
=
{
0.0
,
0.0
,
0.0
}
;
cv
::
Vec3d
viewpoint
(
0
,
0
,
0
)
;
cv
::
ppf_match_3d
::
computeNormalsPC3d
(
points
,
pointsAndNormals
,
6
,
false
,
viewpoint
);
std
::
cout
<<
"Writing points
\n
"
;
...
...
modules/surface_matching/src/ppf_helpers.cpp
View file @
b527ab99
...
...
@@ -720,7 +720,7 @@ void meanCovLocalPCInd(const float* pc, const int* Indices, const int ws, const
}
CV_EXPORTS
int
computeNormalsPC3d
(
const
Mat
&
PC
,
Mat
&
PCNormals
,
const
int
NumNeighbors
,
const
bool
FlipViewpoint
,
const
double
viewpoint
[
3
]
)
CV_EXPORTS
int
computeNormalsPC3d
(
const
Mat
&
PC
,
Mat
&
PCNormals
,
const
int
NumNeighbors
,
const
bool
FlipViewpoint
,
const
Vec3d
&
viewpoint
)
{
int
i
;
...
...
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