@@ -61,22 +61,22 @@ namespace ppf_match_3d
61
61
* and whether it should be loaded or not
62
62
* @return Returns the matrix on successfull load
63
63
*/
64
- CV_EXPORTS Mat loadPLYSimple (const char * fileName, int withNormals = 0 );
64
+ CV_EXPORTS_W Mat loadPLYSimple (const char * fileName, int withNormals = 0 );
65
65
66
66
/* *
67
67
* @brief Write a point cloud to PLY file
68
68
* @param [in] PC Input point cloud
69
69
* @param [in] fileName The PLY model file to write
70
70
*/
71
- CV_EXPORTS void writePLY (Mat PC, const char * fileName);
71
+ CV_EXPORTS_W void writePLY (Mat PC, const char * fileName);
72
72
73
73
/* *
74
74
* @brief Used for debbuging pruposes, writes a point cloud to a PLY file with the tip
75
75
* of the normal vectors as visible red points
76
76
* @param [in] PC Input point cloud
77
77
* @param [in] fileName The PLY model file to write
78
78
*/
79
- CV_EXPORTS void writePLYVisibleNormals (Mat PC, const char * fileName);
79
+ CV_EXPORTS_W void writePLYVisibleNormals (Mat PC, const char * fileName);
80
80
81
81
Mat samplePCUniform (Mat PC, int sampleStep);
82
82
Mat samplePCUniformInd (Mat PC, int sampleStep, std::vector<int >& indices);
@@ -94,26 +94,15 @@ Mat samplePCUniformInd(Mat PC, int sampleStep, std::vector<int>& indices);
94
94
* by the distance to the origin. This parameter enables/disables the use of weighting.
95
95
* @return Sampled point cloud
96
96
*/
97
- CV_EXPORTS Mat samplePCByQuantization (Mat pc, float xrange[ 2 ], float yrange[ 2 ], float zrange[ 2 ] , float sample_step_relative, int weightByCenter=0 );
97
+ CV_EXPORTS_W Mat samplePCByQuantization (Mat pc, Vec2f& xrange, Vec2f& yrange, Vec2f& zrange, float sample_step_relative, int weightByCenter=0 );
98
98
99
- void computeBboxStd (Mat pc, float xRange[ 2 ], float yRange[ 2 ], float zRange[ 2 ] );
99
+ void computeBboxStd (Mat pc, Vec2f& xRange, Vec2f& yRange, Vec2f& zRange);
100
100
101
101
void * indexPCFlann (Mat pc);
102
102
void destroyFlann (void * flannIndex);
103
103
void queryPCFlann (void * flannIndex, Mat& pc, Mat& indices, Mat& distances);
104
104
void queryPCFlann (void * flannIndex, Mat& pc, Mat& indices, Mat& distances, const int numNeighbors);
105
105
106
- /* *
107
- * Mostly for visualization purposes. Normalizes the point cloud in a Hartley-Zissermann
108
- * fashion. In other words, the point cloud is centered, and scaled such that the largest
109
- * distance from the origin is sqrt(2). Finally a rescaling is applied.
110
- * @param [in] pc Input point cloud (CV_32F family). Point clouds with 3 or 6 elements per
111
- * row are expected.
112
- * @param [in] scale The scale after normalization. Default to 1.
113
- * @return Normalized point cloud
114
- */
115
- CV_EXPORTS Mat normalize_pc (Mat pc, float scale);
116
-
117
106
Mat normalizePCCoeff (Mat pc, float scale, float * Cx, float * Cy, float * Cz, float * MinVal, float * MaxVal);
118
107
Mat transPCCoeff (Mat pc, float scale, float Cx, float Cy, float Cz, float MinVal, float MaxVal);
119
108
@@ -125,20 +114,20 @@ Mat transPCCoeff(Mat pc, float scale, float Cx, float Cy, float Cz, float MinVal
125
114
* @param [in] Pose 4x4 pose matrix, but linearized in row-major form.
126
115
* @return Transformed point cloud
127
116
*/
128
- CV_EXPORTS Mat transformPCPose (Mat pc, const double Pose[ 16 ] );
117
+ CV_EXPORTS_W Mat transformPCPose (Mat pc, const Matx44d& Pose);
129
118
130
119
/* *
131
120
* Generate a random 4x4 pose matrix
132
121
* @param [out] Pose The random pose
133
122
*/
134
- CV_EXPORTS void getRandomPose (double Pose[ 16 ] );
123
+ CV_EXPORTS_W void getRandomPose (Matx44d& Pose);
135
124
136
125
/* *
137
126
* Adds a uniform noise in the given scale to the input point cloud
138
127
* @param [in] pc Input point cloud (CV_32F family).
139
128
* @param [in] scale Input scale of the noise. The larger the scale, the more noisy the output
140
129
*/
141
- CV_EXPORTS Mat addNoisePC (Mat pc, double scale);
130
+ CV_EXPORTS_W Mat addNoisePC (Mat pc, double scale);
142
131
143
132
/* *
144
133
* @brief Compute the normals of an arbitrary point cloud
@@ -154,7 +143,7 @@ CV_EXPORTS Mat addNoisePC(Mat pc, double scale);
154
143
* @param [in] viewpoint
155
144
* @return Returns 0 on success
156
145
*/
157
- CV_EXPORTS_W int computeNormalsPC3d (const Mat& PC, CV_OUT Mat& PCNormals, const int NumNeighbors, const bool FlipViewpoint, const Vec3d & viewpoint);
146
+ CV_EXPORTS_W int computeNormalsPC3d (const Mat& PC, CV_OUT Mat& PCNormals, const int NumNeighbors, const bool FlipViewpoint, const Vec3f & viewpoint);
158
147
159
148
// ! @}
160
149
0 commit comments