mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-18 17:24:28 +08:00
- Wrap computeNormalsPC3d()
for python
- Update its usage
This commit is contained in:
@@ -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);
|
||||
|
||||
//! @}
|
||||
|
||||
|
@@ -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";
|
||||
|
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user