37 #include <opencv2/core/core.hpp> 38 #include <opencv2/features2d/features2d.hpp> 56 const cv::Mat & image,
59 const cv::Mat & userData = cv::Mat());
63 const cv::Mat & image,
67 const cv::Mat & userData = cv::Mat());
72 const cv::Mat & depth,
76 const cv::Mat & userData = cv::Mat());
82 const cv::Mat & depth,
86 const cv::Mat & userData = cv::Mat());
91 const cv::Mat & depth,
92 const std::vector<CameraModel> & cameraModels,
95 const cv::Mat & userData = cv::Mat());
101 const cv::Mat & depth,
102 const std::vector<CameraModel> & cameraModels,
105 const cv::Mat & userData = cv::Mat());
109 const cv::Mat & left,
110 const cv::Mat & right,
114 const cv::Mat & userData = cv::Mat());
119 const cv::Mat & left,
120 const cv::Mat & right,
124 const cv::Mat & userData = cv::Mat());
138 _imageCompressed.empty() &&
139 _depthOrRightRaw.empty() &&
140 _depthOrRightCompressed.empty() &&
141 _laserScanRaw.isEmpty() &&
142 _laserScanCompressed.isEmpty() &&
143 _cameraModels.size() == 0 &&
144 !_stereoCameraModel.isValidForProjection() &&
145 _userDataRaw.empty() &&
146 _userDataCompressed.empty() &&
147 _keypoints.size() == 0 &&
148 _descriptors.empty() &&
152 int id()
const {
return _id;}
154 double stamp()
const {
return _stamp;}
161 const cv::Mat &
imageRaw()
const {
return _imageRaw;}
164 void setImageRaw(
const cv::Mat & imageRaw) {_imageRaw = imageRaw;}
168 void setCameraModels(
const std::vector<CameraModel> & models) {_cameraModels = models;}
172 cv::Mat
depthRaw()
const {
return _depthOrRightRaw.type()!=CV_8UC1?_depthOrRightRaw:cv::Mat();}
173 cv::Mat
rightRaw()
const {
return _depthOrRightRaw.type()==CV_8UC1?_depthOrRightRaw:cv::Mat();}
178 cv::Mat * depthOrRightRaw,
180 cv::Mat * userDataRaw = 0,
181 cv::Mat * groundCellsRaw = 0,
182 cv::Mat * obstacleCellsRaw = 0,
183 cv::Mat * emptyCellsRaw = 0);
184 void uncompressDataConst(
186 cv::Mat * depthOrRightRaw,
188 cv::Mat * userDataRaw = 0,
189 cv::Mat * groundCellsRaw = 0,
190 cv::Mat * obstacleCellsRaw = 0,
191 cv::Mat * emptyCellsRaw = 0)
const;
193 const std::vector<CameraModel> &
cameraModels()
const {
return _cameraModels;}
196 void setUserDataRaw(
const cv::Mat & userDataRaw);
204 void setUserData(
const cv::Mat & userData);
209 void setOccupancyGrid(
210 const cv::Mat & ground,
211 const cv::Mat & obstacles,
212 const cv::Mat & empty,
214 const cv::Point3f & viewPoint);
226 void setFeatures(
const std::vector<cv::KeyPoint> & keypoints,
const std::vector<cv::Point3f> & keypoints3D,
const cv::Mat & descriptors);
227 const std::vector<cv::KeyPoint> &
keypoints()
const {
return _keypoints;}
228 const std::vector<cv::Point3f> &
keypoints3D()
const {
return _keypoints3D;}
234 void setGlobalPose(
const Transform & pose,
const cv::Mat & covariance) {globalPose_ = pose; globalPoseCovariance_ = covariance;}
250 long getMemoryUsed()
const;
251 void clearCompressedData() {_imageCompressed=cv::Mat(); _depthOrRightCompressed=cv::Mat(); _laserScanCompressed.clear(); _userDataCompressed=cv::Mat();}
253 bool isPointVisibleFromCameras(
const cv::Point3f & pt)
const;
cv::Mat RTABMAP_EXP uncompressData(const cv::Mat &bytes)
cv::Mat _userDataCompressed
std::vector< cv::Point3f > _keypoints3D
const LaserScan & laserScanCompressed() const
LaserScan _laserScanCompressed
cv::Mat _obstacleCellsRaw
void setGlobalPose(const Transform &pose, const cv::Mat &covariance)
const cv::Mat & descriptors() const
cv::Mat _groundCellsCompressed
float gridCellSize() const
const std::vector< cv::KeyPoint > & keypoints() const
void setCameraModels(const std::vector< CameraModel > &models)
void setGPS(const GPS &gps)
const cv::Mat & gridObstacleCellsCompressed() const
const cv::Mat & gridGroundCellsRaw() const
const cv::Mat & gridGroundCellsCompressed() const
const LaserScan & laserScanRaw() const
const Transform & groundTruth() const
const cv::Mat & gridEmptyCellsCompressed() const
cv::Mat _emptyCellsCompressed
const cv::Mat & imageRaw() const
const cv::Mat & globalPoseCovariance() const
void setImageRaw(const cv::Mat &imageRaw)
std::vector< cv::KeyPoint > _keypoints
void setCameraModel(const CameraModel &model)
void clearOccupancyGridRaw()
const cv::Mat & depthOrRightCompressed() const
cv::Mat globalPoseCovariance_
const Transform & globalPose() const
cv::Mat _obstacleCellsCompressed
void clearCompressedData()
const cv::Mat & depthOrRightRaw() const
const cv::Mat & userDataRaw() const
const cv::Mat & userDataCompressed() const
const cv::Mat & gridEmptyCellsRaw() const
cv::Mat _depthOrRightCompressed
const std::vector< CameraModel > & cameraModels() const
StereoCameraModel _stereoCameraModel
const StereoCameraModel & stereoCameraModel() const
std::vector< CameraModel > _cameraModels
void setStamp(double stamp)
const cv::Mat & imageCompressed() const
void setIMU(const IMU &imu)
void setGroundTruth(const Transform &pose)
void setStereoCameraModel(const StereoCameraModel &stereoCameraModel)
void setDepthOrRightRaw(const cv::Mat &depthOrImageRaw)
const cv::Point3f & gridViewPoint() const
const std::vector< cv::Point3f > & keypoints3D() const
const cv::Mat & gridObstacleCellsRaw() const
void setLaserScanRaw(const LaserScan &laserScanRaw)