123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170 |
- #ifndef __OPENCV_SURFACE_MATCHING_ICP_HPP__
- #define __OPENCV_SURFACE_MATCHING_ICP_HPP__
- #include <opencv2/core.hpp>
- #include "pose_3d.hpp"
- #include <vector>
- namespace cv
- {
- namespace ppf_match_3d
- {
- class CV_EXPORTS_W ICP
- {
- public:
- CV_WRAP enum
- {
- ICP_SAMPLING_TYPE_UNIFORM = 0,
- ICP_SAMPLING_TYPE_GELFAND = 1
- };
- CV_WRAP ICP()
- {
- m_tolerance = 0.005f;
- m_rejectionScale = 2.5f;
- m_maxIterations = 250;
- m_numLevels = 6;
- m_sampleType = ICP_SAMPLING_TYPE_UNIFORM;
- m_numNeighborsCorr = 1;
- }
- virtual ~ICP() { }
-
- CV_WRAP ICP(const int iterations, const float tolerence = 0.05f, const float rejectionScale = 2.5f, const int numLevels = 6, const int sampleType = ICP::ICP_SAMPLING_TYPE_UNIFORM, const int numMaxCorr = 1)
- {
- m_tolerance = tolerence;
- m_numNeighborsCorr = numMaxCorr;
- m_rejectionScale = rejectionScale;
- m_maxIterations = iterations;
- m_numLevels = numLevels;
- m_sampleType = sampleType;
- }
-
- CV_WRAP int registerModelToScene(const Mat& srcPC, const Mat& dstPC, CV_OUT double& residual, CV_OUT Matx44d& pose);
-
- int registerModelToScene(const Mat& srcPC, const Mat& dstPC, std::vector<Pose3DPtr>& poses);
- private:
- float m_tolerance;
- int m_maxIterations;
- float m_rejectionScale;
- int m_numNeighborsCorr;
- int m_numLevels;
- int m_sampleType;
- };
- }
- }
- #endif
|