1 // This file is part of OpenCV project. 2 // It is subject to the license terms in the LICENSE file found in the top-level directory 3 // of this distribution and at http://opencv.org/license.html 4 5 // This code is also subject to the license terms in the LICENSE_KinectFusion.md file found in this module's directory 6 7 #ifndef __OPENCV_KINFU_FAST_ICP_H__ 8 #define __OPENCV_KINFU_FAST_ICP_H__ 9 10 #include "precomp.hpp" 11 #include "kinfu_frame.hpp" 12 13 namespace cv { 14 namespace kinfu { 15 16 class ICP 17 { 18 public: 19 ICP(const cv::kinfu::Intr _intrinsics, const std::vector<int> &_iterations, float _angleThreshold, float _distanceThreshold); 20 21 virtual bool estimateTransform(cv::Affine3f& transform, 22 InputArray oldPoints, InputArray oldNormals, 23 InputArray newPoints, InputArray newNormals 24 ) const = 0; ~ICP()25 virtual ~ICP() { } 26 27 protected: 28 29 std::vector<int> iterations; 30 float angleThreshold; 31 float distanceThreshold; 32 cv::kinfu::Intr intrinsics; 33 }; 34 35 cv::Ptr<ICP> makeICP(const cv::kinfu::Intr _intrinsics, const std::vector<int> &_iterations, 36 float _angleThreshold, float _distanceThreshold); 37 38 } // namespace kinfu 39 } // namespace cv 40 #endif 41