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
a392d11d
Commit
a392d11d
authored
Sep 02, 2014
by
Bence Magyar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cv::Mat -> Mat
parent
9d6fc048
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
20 deletions
+20
-20
ppf_helpers.hpp
...matching/include/opencv2/surface_matching/ppf_helpers.hpp
+14
-14
ppf_helpers.cpp
modules/surface_matching/src/ppf_helpers.cpp
+6
-6
No files found.
modules/surface_matching/include/opencv2/surface_matching/ppf_helpers.hpp
View file @
a392d11d
...
...
@@ -56,16 +56,16 @@ namespace ppf_match_3d
* and whether it should be loaded or not
* \return Returns the matrix on successfull load
*/
CV_EXPORTS
cv
::
Mat
loadPLYSimple
(
const
char
*
fileName
,
int
withNormals
);
CV_EXPORTS
Mat
loadPLYSimple
(
const
char
*
fileName
,
int
withNormals
);
/**
* \brief Write a point cloud to PLY file
* \param [in] fileName The PLY model file to write
*/
CV_EXPORTS
void
writePLY
(
cv
::
Mat
PC
,
const
char
*
fileName
);
CV_EXPORTS
void
writePLY
(
Mat
PC
,
const
char
*
fileName
);
cv
::
Mat
samplePCUniform
(
cv
::
Mat
PC
,
int
sampleStep
);
cv
::
Mat
samplePCUniformInd
(
cv
::
Mat
PC
,
int
sampleStep
,
std
::
vector
<
int
>&
indices
);
Mat
samplePCUniform
(
Mat
PC
,
int
sampleStep
);
Mat
samplePCUniformInd
(
Mat
PC
,
int
sampleStep
,
std
::
vector
<
int
>&
indices
);
/**
* Sample a point cloud using uniform steps
...
...
@@ -79,13 +79,13 @@ cv::Mat samplePCUniformInd(cv::Mat PC, int sampleStep, std::vector<int>& indices
* by the distance to the origin. This parameter enables/disables the use of weighting.
* \return Sampled point cloud
*/
CV_EXPORTS
cv
::
Mat
samplePCByQuantization
(
cv
::
Mat
pc
,
float
xrange
[
2
],
float
yrange
[
2
],
float
zrange
[
2
],
float
sample_step_relative
,
int
weightByCenter
=
0
);
CV_EXPORTS
Mat
samplePCByQuantization
(
Mat
pc
,
float
xrange
[
2
],
float
yrange
[
2
],
float
zrange
[
2
],
float
sample_step_relative
,
int
weightByCenter
=
0
);
void
computeBboxStd
(
cv
::
Mat
pc
,
float
xRange
[
2
],
float
yRange
[
2
],
float
zRange
[
2
]);
void
computeBboxStd
(
Mat
pc
,
float
xRange
[
2
],
float
yRange
[
2
],
float
zRange
[
2
]);
void
*
indexPCFlann
(
cv
::
Mat
pc
);
void
*
indexPCFlann
(
Mat
pc
);
void
destroyFlann
(
void
*
flannIndex
);
void
queryPCFlann
(
void
*
flannIndex
,
cv
::
Mat
&
pc
,
cv
::
Mat
&
indices
,
cv
::
Mat
&
distances
);
void
queryPCFlann
(
void
*
flannIndex
,
Mat
&
pc
,
Mat
&
indices
,
Mat
&
distances
);
/**
* Mostly for visualization purposes. Normalizes the point cloud in a Hartley-Zissermann
...
...
@@ -96,10 +96,10 @@ void queryPCFlann(void* flannIndex, cv::Mat& pc, cv::Mat& indices, cv::Mat& dist
* @param [in] scale The scale after normalization. Default to 1.
* \return Normalized point cloud
*/
CV_EXPORTS
cv
::
Mat
normalize_pc
(
cv
::
Mat
pc
,
float
scale
);
CV_EXPORTS
Mat
normalize_pc
(
Mat
pc
,
float
scale
);
cv
::
Mat
normalizePCCoeff
(
cv
::
Mat
pc
,
float
scale
,
float
*
Cx
,
float
*
Cy
,
float
*
Cz
,
float
*
MinVal
,
float
*
MaxVal
);
cv
::
Mat
transPCCoeff
(
cv
::
Mat
pc
,
float
scale
,
float
Cx
,
float
Cy
,
float
Cz
,
float
MinVal
,
float
MaxVal
);
Mat
normalizePCCoeff
(
Mat
pc
,
float
scale
,
float
*
Cx
,
float
*
Cy
,
float
*
Cz
,
float
*
MinVal
,
float
*
MaxVal
);
Mat
transPCCoeff
(
Mat
pc
,
float
scale
,
float
Cx
,
float
Cy
,
float
Cz
,
float
MinVal
,
float
MaxVal
);
/**
* Transforms the point cloud with a given a homogeneous 4x4 pose matrix (in double precision)
...
...
@@ -109,7 +109,7 @@ cv::Mat transPCCoeff(cv::Mat pc, float scale, float Cx, float Cy, float Cz, floa
* @param [in] Pose 4x4 pose matrix, but linearized in row-major form.
* \return Transformed point cloud
*/
CV_EXPORTS
cv
::
Mat
transformPCPose
(
cv
::
Mat
pc
,
double
Pose
[
16
]);
CV_EXPORTS
Mat
transformPCPose
(
Mat
pc
,
double
Pose
[
16
]);
/**
* Generate a random 4x4 pose matrix
...
...
@@ -123,7 +123,7 @@ CV_EXPORTS void getRandomPose(double Pose[16]);
* @param [in] scale Input scale of the noise. The larger the scale, the more
* noisy the output
*/
CV_EXPORTS
cv
::
Mat
addNoisePC
(
cv
::
Mat
pc
,
double
scale
);
CV_EXPORTS
Mat
addNoisePC
(
Mat
pc
,
double
scale
);
/**
* \brief Compute the normals of an arbitrary point cloud
...
...
@@ -140,7 +140,7 @@ CV_EXPORTS cv::Mat addNoisePC(cv::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.
*/
CV_EXPORTS
int
computeNormalsPC3d
(
const
cv
::
Mat
&
PC
,
cv
::
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
double
viewpoint
[
3
]);
}
// namespace ppf_match_3d
}
// namespace cv
...
...
modules/surface_matching/src/ppf_helpers.cpp
View file @
a392d11d
...
...
@@ -206,7 +206,7 @@ void destroyFlann(void* flannIndex)
}
// For speed purposes this function assumes that PC, Indices and Distances are created with continuous structures
void
queryPCFlann
(
void
*
flannIndex
,
cv
::
Mat
&
pc
,
cv
::
Mat
&
indices
,
cv
::
Mat
&
distances
)
void
queryPCFlann
(
void
*
flannIndex
,
Mat
&
pc
,
Mat
&
indices
,
Mat
&
distances
)
{
Mat
obj_32f
;
pc
.
colRange
(
0
,
3
).
copyTo
(
obj_32f
);
...
...
@@ -518,11 +518,11 @@ Mat transformPCPose(Mat pc, double Pose[16])
Mat
genRandomMat
(
int
rows
,
int
cols
,
double
mean
,
double
stddev
,
int
type
)
{
cv
::
Mat
meanMat
=
mean
*
cv
::
Mat
::
ones
(
1
,
1
,
type
);
cv
::
Mat
sigmaMat
=
stddev
*
cv
::
Mat
::
ones
(
1
,
1
,
type
);
cv
::
RNG
rng
(
time
(
0
));
cv
::
Mat
matr
(
rows
,
cols
,
type
);
rng
.
fill
(
matr
,
cv
::
RNG
::
NORMAL
,
meanMat
,
sigmaMat
);
Mat
meanMat
=
mean
*
Mat
::
ones
(
1
,
1
,
type
);
Mat
sigmaMat
=
stddev
*
Mat
::
ones
(
1
,
1
,
type
);
RNG
rng
(
time
(
0
));
Mat
matr
(
rows
,
cols
,
type
);
rng
.
fill
(
matr
,
RNG
::
NORMAL
,
meanMat
,
sigmaMat
);
return
matr
;
}
...
...
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