1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075 |
- #ifndef __OPENCV_RGBD_HPP__
- #define __OPENCV_RGBD_HPP__
- #ifdef __cplusplus
- #include <opencv2/core.hpp>
- #include <limits>
- namespace cv
- {
- namespace rgbd
- {
-
- CV_EXPORTS
- inline bool
- isValidDepth(const float & depth)
- {
- return !cvIsNaN(depth);
- }
- CV_EXPORTS
- inline bool
- isValidDepth(const double & depth)
- {
- return !cvIsNaN(depth);
- }
- CV_EXPORTS
- inline bool
- isValidDepth(const short int & depth)
- {
- return (depth != std::numeric_limits<short int>::min()) && (depth != std::numeric_limits<short int>::max());
- }
- CV_EXPORTS
- inline bool
- isValidDepth(const unsigned short int & depth)
- {
- return (depth != std::numeric_limits<unsigned short int>::min())
- && (depth != std::numeric_limits<unsigned short int>::max());
- }
- CV_EXPORTS
- inline bool
- isValidDepth(const int & depth)
- {
- return (depth != std::numeric_limits<int>::min()) && (depth != std::numeric_limits<int>::max());
- }
- CV_EXPORTS
- inline bool
- isValidDepth(const unsigned int & depth)
- {
- return (depth != std::numeric_limits<unsigned int>::min()) && (depth != std::numeric_limits<unsigned int>::max());
- }
-
- class CV_EXPORTS_W RgbdNormals: public Algorithm
- {
- public:
- enum RGBD_NORMALS_METHOD
- {
- RGBD_NORMALS_METHOD_FALS = 0,
- RGBD_NORMALS_METHOD_LINEMOD = 1,
- RGBD_NORMALS_METHOD_SRI = 2
- };
- RgbdNormals()
- :
- rows_(0),
- cols_(0),
- depth_(0),
- K_(Mat()),
- window_size_(0),
- method_(RGBD_NORMALS_METHOD_FALS),
- rgbd_normals_impl_(0)
- {
- }
-
- RgbdNormals(int rows, int cols, int depth, InputArray K, int window_size = 5, int method =
- RgbdNormals::RGBD_NORMALS_METHOD_FALS);
- ~RgbdNormals();
- CV_WRAP static Ptr<RgbdNormals> create(int rows, int cols, int depth, InputArray K, int window_size = 5, int method =
- RgbdNormals::RGBD_NORMALS_METHOD_FALS);
-
- void
- operator()(InputArray points, OutputArray normals) const;
-
- CV_WRAP void
- initialize() const;
- CV_WRAP int getRows() const
- {
- return rows_;
- }
- CV_WRAP void setRows(int val)
- {
- rows_ = val;
- }
- CV_WRAP int getCols() const
- {
- return cols_;
- }
- CV_WRAP void setCols(int val)
- {
- cols_ = val;
- }
- CV_WRAP int getWindowSize() const
- {
- return window_size_;
- }
- CV_WRAP void setWindowSize(int val)
- {
- window_size_ = val;
- }
- CV_WRAP int getDepth() const
- {
- return depth_;
- }
- CV_WRAP void setDepth(int val)
- {
- depth_ = val;
- }
- CV_WRAP cv::Mat getK() const
- {
- return K_;
- }
- CV_WRAP void setK(const cv::Mat &val)
- {
- K_ = val;
- }
- CV_WRAP int getMethod() const
- {
- return method_;
- }
- CV_WRAP void setMethod(int val)
- {
- method_ = val;
- }
- protected:
- void
- initialize_normals_impl(int rows, int cols, int depth, const Mat & K, int window_size, int method) const;
- int rows_, cols_, depth_;
- Mat K_;
- int window_size_;
- int method_;
- mutable void* rgbd_normals_impl_;
- };
-
- class CV_EXPORTS_W DepthCleaner: public Algorithm
- {
- public:
-
- enum DEPTH_CLEANER_METHOD
- {
- DEPTH_CLEANER_NIL
- };
- DepthCleaner()
- :
- depth_(0),
- window_size_(0),
- method_(DEPTH_CLEANER_NIL),
- depth_cleaner_impl_(0)
- {
- }
-
- DepthCleaner(int depth, int window_size = 5, int method = DepthCleaner::DEPTH_CLEANER_NIL);
- ~DepthCleaner();
- CV_WRAP static Ptr<DepthCleaner> create(int depth, int window_size = 5, int method = DepthCleaner::DEPTH_CLEANER_NIL);
-
- void
- operator()(InputArray points, OutputArray depth) const;
-
- CV_WRAP void
- initialize() const;
- CV_WRAP int getWindowSize() const
- {
- return window_size_;
- }
- CV_WRAP void setWindowSize(int val)
- {
- window_size_ = val;
- }
- CV_WRAP int getDepth() const
- {
- return depth_;
- }
- CV_WRAP void setDepth(int val)
- {
- depth_ = val;
- }
- CV_WRAP int getMethod() const
- {
- return method_;
- }
- CV_WRAP void setMethod(int val)
- {
- method_ = val;
- }
- protected:
- void
- initialize_cleaner_impl() const;
- int depth_;
- int window_size_;
- int method_;
- mutable void* depth_cleaner_impl_;
- };
-
- CV_EXPORTS_W
- void
- registerDepth(InputArray unregisteredCameraMatrix, InputArray registeredCameraMatrix, InputArray registeredDistCoeffs,
- InputArray Rt, InputArray unregisteredDepth, const Size& outputImagePlaneSize,
- OutputArray registeredDepth, bool depthDilation=false);
-
- CV_EXPORTS_W
- void
- depthTo3dSparse(InputArray depth, InputArray in_K, InputArray in_points, OutputArray points3d);
-
- CV_EXPORTS_W
- void
- depthTo3d(InputArray depth, InputArray K, OutputArray points3d, InputArray mask = noArray());
-
- CV_EXPORTS_W
- void
- rescaleDepth(InputArray in, int depth, OutputArray out);
-
- class CV_EXPORTS_W RgbdPlane: public Algorithm
- {
- public:
- enum RGBD_PLANE_METHOD
- {
- RGBD_PLANE_METHOD_DEFAULT
- };
- RgbdPlane(int method = RgbdPlane::RGBD_PLANE_METHOD_DEFAULT)
- :
- method_(method),
- block_size_(40),
- min_size_(block_size_*block_size_),
- threshold_(0.01),
- sensor_error_a_(0),
- sensor_error_b_(0),
- sensor_error_c_(0)
- {
- }
-
- void
- operator()(InputArray points3d, InputArray normals, OutputArray mask,
- OutputArray plane_coefficients);
-
- void
- operator()(InputArray points3d, OutputArray mask, OutputArray plane_coefficients);
- CV_WRAP int getBlockSize() const
- {
- return block_size_;
- }
- CV_WRAP void setBlockSize(int val)
- {
- block_size_ = val;
- }
- CV_WRAP int getMinSize() const
- {
- return min_size_;
- }
- CV_WRAP void setMinSize(int val)
- {
- min_size_ = val;
- }
- CV_WRAP int getMethod() const
- {
- return method_;
- }
- CV_WRAP void setMethod(int val)
- {
- method_ = val;
- }
- CV_WRAP double getThreshold() const
- {
- return threshold_;
- }
- CV_WRAP void setThreshold(double val)
- {
- threshold_ = val;
- }
- CV_WRAP double getSensorErrorA() const
- {
- return sensor_error_a_;
- }
- CV_WRAP void setSensorErrorA(double val)
- {
- sensor_error_a_ = val;
- }
- CV_WRAP double getSensorErrorB() const
- {
- return sensor_error_b_;
- }
- CV_WRAP void setSensorErrorB(double val)
- {
- sensor_error_b_ = val;
- }
- CV_WRAP double getSensorErrorC() const
- {
- return sensor_error_c_;
- }
- CV_WRAP void setSensorErrorC(double val)
- {
- sensor_error_c_ = val;
- }
- private:
-
- int method_;
-
- int block_size_;
-
- int min_size_;
-
- double threshold_;
-
- double sensor_error_a_, sensor_error_b_, sensor_error_c_;
- };
-
- struct CV_EXPORTS_W RgbdFrame
- {
- RgbdFrame();
- RgbdFrame(const Mat& image, const Mat& depth, const Mat& mask=Mat(), const Mat& normals=Mat(), int ID=-1);
- virtual ~RgbdFrame();
- CV_WRAP static Ptr<RgbdFrame> create(const Mat& image=Mat(), const Mat& depth=Mat(), const Mat& mask=Mat(), const Mat& normals=Mat(), int ID=-1);
- CV_WRAP virtual void
- release();
- CV_PROP int ID;
- CV_PROP Mat image;
- CV_PROP Mat depth;
- CV_PROP Mat mask;
- CV_PROP Mat normals;
- };
-
- struct CV_EXPORTS_W OdometryFrame : public RgbdFrame
- {
-
- enum
- {
- CACHE_SRC = 1, CACHE_DST = 2, CACHE_ALL = CACHE_SRC + CACHE_DST
- };
- OdometryFrame();
- OdometryFrame(const Mat& image, const Mat& depth, const Mat& mask=Mat(), const Mat& normals=Mat(), int ID=-1);
- CV_WRAP static Ptr<OdometryFrame> create(const Mat& image=Mat(), const Mat& depth=Mat(), const Mat& mask=Mat(), const Mat& normals=Mat(), int ID=-1);
- CV_WRAP virtual void
- release();
- CV_WRAP void
- releasePyramids();
- CV_PROP std::vector<Mat> pyramidImage;
- CV_PROP std::vector<Mat> pyramidDepth;
- CV_PROP std::vector<Mat> pyramidMask;
- CV_PROP std::vector<Mat> pyramidCloud;
- CV_PROP std::vector<Mat> pyramid_dI_dx;
- CV_PROP std::vector<Mat> pyramid_dI_dy;
- CV_PROP std::vector<Mat> pyramidTexturedMask;
- CV_PROP std::vector<Mat> pyramidNormals;
- CV_PROP std::vector<Mat> pyramidNormalsMask;
- };
-
- class CV_EXPORTS_W Odometry: public Algorithm
- {
- public:
-
- enum
- {
- ROTATION = 1, TRANSLATION = 2, RIGID_BODY_MOTION = 4
- };
- CV_WRAP static inline float
- DEFAULT_MIN_DEPTH()
- {
- return 0.f;
- }
- CV_WRAP static inline float
- DEFAULT_MAX_DEPTH()
- {
- return 4.f;
- }
- CV_WRAP static inline float
- DEFAULT_MAX_DEPTH_DIFF()
- {
- return 0.07f;
- }
- CV_WRAP static inline float
- DEFAULT_MAX_POINTS_PART()
- {
- return 0.07f;
- }
- CV_WRAP static inline float
- DEFAULT_MAX_TRANSLATION()
- {
- return 0.15f;
- }
- CV_WRAP static inline float
- DEFAULT_MAX_ROTATION()
- {
- return 15;
- }
-
- CV_WRAP bool
- compute(const Mat& srcImage, const Mat& srcDepth, const Mat& srcMask, const Mat& dstImage, const Mat& dstDepth,
- const Mat& dstMask, OutputArray Rt, const Mat& initRt = Mat()) const;
-
- CV_WRAP_AS(compute2) bool
- compute(Ptr<OdometryFrame>& srcFrame, Ptr<OdometryFrame>& dstFrame, OutputArray Rt, const Mat& initRt = Mat()) const;
-
- CV_WRAP virtual Size prepareFrameCache(Ptr<OdometryFrame>& frame, int cacheType) const;
- CV_WRAP static Ptr<Odometry> create(const String & odometryType);
-
- CV_WRAP virtual cv::Mat getCameraMatrix() const = 0;
-
- CV_WRAP virtual void setCameraMatrix(const cv::Mat &val) = 0;
-
- CV_WRAP virtual int getTransformType() const = 0;
-
- CV_WRAP virtual void setTransformType(int val) = 0;
- protected:
- virtual void
- checkParams() const = 0;
- virtual bool
- computeImpl(const Ptr<OdometryFrame>& srcFrame, const Ptr<OdometryFrame>& dstFrame, OutputArray Rt,
- const Mat& initRt) const = 0;
- };
-
- class CV_EXPORTS_W RgbdOdometry: public Odometry
- {
- public:
- RgbdOdometry();
-
- RgbdOdometry(const Mat& cameraMatrix, float minDepth = Odometry::DEFAULT_MIN_DEPTH(), float maxDepth = Odometry::DEFAULT_MAX_DEPTH(),
- float maxDepthDiff = Odometry::DEFAULT_MAX_DEPTH_DIFF(), const std::vector<int>& iterCounts = std::vector<int>(),
- const std::vector<float>& minGradientMagnitudes = std::vector<float>(), float maxPointsPart = Odometry::DEFAULT_MAX_POINTS_PART(),
- int transformType = Odometry::RIGID_BODY_MOTION);
- CV_WRAP static Ptr<RgbdOdometry> create(const Mat& cameraMatrix = Mat(), float minDepth = Odometry::DEFAULT_MIN_DEPTH(), float maxDepth = Odometry::DEFAULT_MAX_DEPTH(),
- float maxDepthDiff = Odometry::DEFAULT_MAX_DEPTH_DIFF(), const std::vector<int>& iterCounts = std::vector<int>(),
- const std::vector<float>& minGradientMagnitudes = std::vector<float>(), float maxPointsPart = Odometry::DEFAULT_MAX_POINTS_PART(),
- int transformType = Odometry::RIGID_BODY_MOTION);
- CV_WRAP virtual Size prepareFrameCache(Ptr<OdometryFrame>& frame, int cacheType) const;
- CV_WRAP cv::Mat getCameraMatrix() const
- {
- return cameraMatrix;
- }
- CV_WRAP void setCameraMatrix(const cv::Mat &val)
- {
- cameraMatrix = val;
- }
- CV_WRAP double getMinDepth() const
- {
- return minDepth;
- }
- CV_WRAP void setMinDepth(double val)
- {
- minDepth = val;
- }
- CV_WRAP double getMaxDepth() const
- {
- return maxDepth;
- }
- CV_WRAP void setMaxDepth(double val)
- {
- maxDepth = val;
- }
- CV_WRAP double getMaxDepthDiff() const
- {
- return maxDepthDiff;
- }
- CV_WRAP void setMaxDepthDiff(double val)
- {
- maxDepthDiff = val;
- }
- CV_WRAP cv::Mat getIterationCounts() const
- {
- return iterCounts;
- }
- CV_WRAP void setIterationCounts(const cv::Mat &val)
- {
- iterCounts = val;
- }
- CV_WRAP cv::Mat getMinGradientMagnitudes() const
- {
- return minGradientMagnitudes;
- }
- CV_WRAP void setMinGradientMagnitudes(const cv::Mat &val)
- {
- minGradientMagnitudes = val;
- }
- CV_WRAP double getMaxPointsPart() const
- {
- return maxPointsPart;
- }
- CV_WRAP void setMaxPointsPart(double val)
- {
- maxPointsPart = val;
- }
- CV_WRAP int getTransformType() const
- {
- return transformType;
- }
- CV_WRAP void setTransformType(int val)
- {
- transformType = val;
- }
- CV_WRAP double getMaxTranslation() const
- {
- return maxTranslation;
- }
- CV_WRAP void setMaxTranslation(double val)
- {
- maxTranslation = val;
- }
- CV_WRAP double getMaxRotation() const
- {
- return maxRotation;
- }
- CV_WRAP void setMaxRotation(double val)
- {
- maxRotation = val;
- }
- protected:
- virtual void
- checkParams() const;
- virtual bool
- computeImpl(const Ptr<OdometryFrame>& srcFrame, const Ptr<OdometryFrame>& dstFrame, OutputArray Rt,
- const Mat& initRt) const;
-
-
- double minDepth, maxDepth, maxDepthDiff;
-
- Mat iterCounts;
-
- Mat minGradientMagnitudes;
- double maxPointsPart;
- Mat cameraMatrix;
- int transformType;
- double maxTranslation, maxRotation;
- };
-
- class CV_EXPORTS_W ICPOdometry: public Odometry
- {
- public:
- ICPOdometry();
-
- ICPOdometry(const Mat& cameraMatrix, float minDepth = Odometry::DEFAULT_MIN_DEPTH(), float maxDepth = Odometry::DEFAULT_MAX_DEPTH(),
- float maxDepthDiff = Odometry::DEFAULT_MAX_DEPTH_DIFF(), float maxPointsPart = Odometry::DEFAULT_MAX_POINTS_PART(),
- const std::vector<int>& iterCounts = std::vector<int>(), int transformType = Odometry::RIGID_BODY_MOTION);
- CV_WRAP static Ptr<ICPOdometry> create(const Mat& cameraMatrix = Mat(), float minDepth = Odometry::DEFAULT_MIN_DEPTH(), float maxDepth = Odometry::DEFAULT_MAX_DEPTH(),
- float maxDepthDiff = Odometry::DEFAULT_MAX_DEPTH_DIFF(), float maxPointsPart = Odometry::DEFAULT_MAX_POINTS_PART(),
- const std::vector<int>& iterCounts = std::vector<int>(), int transformType = Odometry::RIGID_BODY_MOTION);
- CV_WRAP virtual Size prepareFrameCache(Ptr<OdometryFrame>& frame, int cacheType) const;
- CV_WRAP cv::Mat getCameraMatrix() const
- {
- return cameraMatrix;
- }
- CV_WRAP void setCameraMatrix(const cv::Mat &val)
- {
- cameraMatrix = val;
- }
- CV_WRAP double getMinDepth() const
- {
- return minDepth;
- }
- CV_WRAP void setMinDepth(double val)
- {
- minDepth = val;
- }
- CV_WRAP double getMaxDepth() const
- {
- return maxDepth;
- }
- CV_WRAP void setMaxDepth(double val)
- {
- maxDepth = val;
- }
- CV_WRAP double getMaxDepthDiff() const
- {
- return maxDepthDiff;
- }
- CV_WRAP void setMaxDepthDiff(double val)
- {
- maxDepthDiff = val;
- }
- CV_WRAP cv::Mat getIterationCounts() const
- {
- return iterCounts;
- }
- CV_WRAP void setIterationCounts(const cv::Mat &val)
- {
- iterCounts = val;
- }
- CV_WRAP double getMaxPointsPart() const
- {
- return maxPointsPart;
- }
- CV_WRAP void setMaxPointsPart(double val)
- {
- maxPointsPart = val;
- }
- CV_WRAP int getTransformType() const
- {
- return transformType;
- }
- CV_WRAP void setTransformType(int val)
- {
- transformType = val;
- }
- CV_WRAP double getMaxTranslation() const
- {
- return maxTranslation;
- }
- CV_WRAP void setMaxTranslation(double val)
- {
- maxTranslation = val;
- }
- CV_WRAP double getMaxRotation() const
- {
- return maxRotation;
- }
- CV_WRAP void setMaxRotation(double val)
- {
- maxRotation = val;
- }
- CV_WRAP Ptr<RgbdNormals> getNormalsComputer() const
- {
- return normalsComputer;
- }
- protected:
- virtual void
- checkParams() const;
- virtual bool
- computeImpl(const Ptr<OdometryFrame>& srcFrame, const Ptr<OdometryFrame>& dstFrame, OutputArray Rt,
- const Mat& initRt) const;
-
-
- double minDepth, maxDepth, maxDepthDiff;
-
- double maxPointsPart;
-
- Mat iterCounts;
- Mat cameraMatrix;
- int transformType;
- double maxTranslation, maxRotation;
- mutable Ptr<RgbdNormals> normalsComputer;
- };
-
- class CV_EXPORTS_W RgbdICPOdometry: public Odometry
- {
- public:
- RgbdICPOdometry();
-
- RgbdICPOdometry(const Mat& cameraMatrix, float minDepth = Odometry::DEFAULT_MIN_DEPTH(), float maxDepth = Odometry::DEFAULT_MAX_DEPTH(),
- float maxDepthDiff = Odometry::DEFAULT_MAX_DEPTH_DIFF(), float maxPointsPart = Odometry::DEFAULT_MAX_POINTS_PART(),
- const std::vector<int>& iterCounts = std::vector<int>(),
- const std::vector<float>& minGradientMagnitudes = std::vector<float>(),
- int transformType = Odometry::RIGID_BODY_MOTION);
- CV_WRAP static Ptr<RgbdICPOdometry> create(const Mat& cameraMatrix = Mat(), float minDepth = Odometry::DEFAULT_MIN_DEPTH(), float maxDepth = Odometry::DEFAULT_MAX_DEPTH(),
- float maxDepthDiff = Odometry::DEFAULT_MAX_DEPTH_DIFF(), float maxPointsPart = Odometry::DEFAULT_MAX_POINTS_PART(),
- const std::vector<int>& iterCounts = std::vector<int>(),
- const std::vector<float>& minGradientMagnitudes = std::vector<float>(),
- int transformType = Odometry::RIGID_BODY_MOTION);
- CV_WRAP virtual Size prepareFrameCache(Ptr<OdometryFrame>& frame, int cacheType) const;
- CV_WRAP cv::Mat getCameraMatrix() const
- {
- return cameraMatrix;
- }
- CV_WRAP void setCameraMatrix(const cv::Mat &val)
- {
- cameraMatrix = val;
- }
- CV_WRAP double getMinDepth() const
- {
- return minDepth;
- }
- CV_WRAP void setMinDepth(double val)
- {
- minDepth = val;
- }
- CV_WRAP double getMaxDepth() const
- {
- return maxDepth;
- }
- CV_WRAP void setMaxDepth(double val)
- {
- maxDepth = val;
- }
- CV_WRAP double getMaxDepthDiff() const
- {
- return maxDepthDiff;
- }
- CV_WRAP void setMaxDepthDiff(double val)
- {
- maxDepthDiff = val;
- }
- CV_WRAP double getMaxPointsPart() const
- {
- return maxPointsPart;
- }
- CV_WRAP void setMaxPointsPart(double val)
- {
- maxPointsPart = val;
- }
- CV_WRAP cv::Mat getIterationCounts() const
- {
- return iterCounts;
- }
- CV_WRAP void setIterationCounts(const cv::Mat &val)
- {
- iterCounts = val;
- }
- CV_WRAP cv::Mat getMinGradientMagnitudes() const
- {
- return minGradientMagnitudes;
- }
- CV_WRAP void setMinGradientMagnitudes(const cv::Mat &val)
- {
- minGradientMagnitudes = val;
- }
- CV_WRAP int getTransformType() const
- {
- return transformType;
- }
- CV_WRAP void setTransformType(int val)
- {
- transformType = val;
- }
- CV_WRAP double getMaxTranslation() const
- {
- return maxTranslation;
- }
- CV_WRAP void setMaxTranslation(double val)
- {
- maxTranslation = val;
- }
- CV_WRAP double getMaxRotation() const
- {
- return maxRotation;
- }
- CV_WRAP void setMaxRotation(double val)
- {
- maxRotation = val;
- }
- CV_WRAP Ptr<RgbdNormals> getNormalsComputer() const
- {
- return normalsComputer;
- }
- protected:
- virtual void
- checkParams() const;
- virtual bool
- computeImpl(const Ptr<OdometryFrame>& srcFrame, const Ptr<OdometryFrame>& dstFrame, OutputArray Rt,
- const Mat& initRt) const;
-
-
- double minDepth, maxDepth, maxDepthDiff;
-
- double maxPointsPart;
-
- Mat iterCounts;
-
- Mat minGradientMagnitudes;
- Mat cameraMatrix;
- int transformType;
- double maxTranslation, maxRotation;
- mutable Ptr<RgbdNormals> normalsComputer;
- };
-
- CV_EXPORTS_W
- void
- warpFrame(const Mat& image, const Mat& depth, const Mat& mask, const Mat& Rt, const Mat& cameraMatrix,
- const Mat& distCoeff, OutputArray warpedImage, OutputArray warpedDepth = noArray(), OutputArray warpedMask = noArray());
- }
- }
- #include "opencv2/rgbd/linemod.hpp"
- #endif
- #endif
|