66 name =
"XYZRGBNormal";
102 UFATAL(
"Unhandled type %d!", (
int)format);
126 const cv::Mat & oldScanFormat,
131 if(!oldScanFormat.empty())
133 if(oldScanFormat.channels() == 2)
135 return LaserScan(oldScanFormat, maxPoints, maxRange,
kXY, localTransform);
137 else if(oldScanFormat.channels() == 3)
139 return LaserScan(oldScanFormat, maxPoints, maxRange,
kXYZ, localTransform);
141 else if(oldScanFormat.channels() == 4)
143 return LaserScan(oldScanFormat, maxPoints, maxRange,
kXYZRGB, localTransform);
145 else if(oldScanFormat.channels() == 5)
149 else if(oldScanFormat.channels() == 6)
153 else if(oldScanFormat.channels() == 7)
162 const cv::Mat & oldScanFormat,
170 if(!oldScanFormat.empty())
172 if(oldScanFormat.channels() == 2)
174 return LaserScan(oldScanFormat,
kXY, minRange, maxRange, angleMin, angleMax, angleInc, localTransform);
176 else if(oldScanFormat.channels() == 3)
178 return LaserScan(oldScanFormat,
kXYZ, minRange, maxRange, angleMin, angleMax, angleInc, localTransform);
180 else if(oldScanFormat.channels() == 4)
182 return LaserScan(oldScanFormat,
kXYZRGB, minRange, maxRange, angleMin, angleMax, angleInc, localTransform);
184 else if(oldScanFormat.channels() == 5)
186 return LaserScan(oldScanFormat,
kXYNormal, minRange, maxRange, angleMin, angleMax, angleInc, localTransform);
188 else if(oldScanFormat.channels() == 6)
190 return LaserScan(oldScanFormat,
kXYZNormal, minRange, maxRange, angleMin, angleMax, angleInc, localTransform);
192 else if(oldScanFormat.channels() == 7)
194 return LaserScan(oldScanFormat,
kXYZRGBNormal, minRange, maxRange, angleMin, angleMax, angleInc, localTransform);
213 const cv::Mat &
data,
228 UASSERT(data.empty() || data.rows == 1);
229 UASSERT(data.empty() || data.type() == CV_8UC1 || data.type() == CV_32FC2 || data.type() == CV_32FC3 || data.type() == CV_32FC(4) || data.type() == CV_32FC(5) || data.type() == CV_32FC(6) || data.type() == CV_32FC(7));
251 const cv::Mat &
data,
273 UASSERT(data.empty() || data.rows == 1);
274 UASSERT(data.empty() || data.type() == CV_8UC1 || data.type() == CV_32FC2 || data.type() == CV_32FC3 || data.type() == CV_32FC(4) || data.type() == CV_32FC(5) || data.type() == CV_32FC(6) || data.type() == CV_32FC(7));
281 UWARN(
"The number of points (%d) in the scan is over the maximum " 282 "points (%d) defined by angle settings (min=%f max=%f inc=%f). " 283 "The scan info may be wrong!",
const cv::Mat & data() const
Some conversion functions.
static bool isScanHasNormals(const Format &format)
#define UASSERT(condition)
#define UASSERT_MSG(condition, msg_str)
static bool isScanHasRGB(const Format &format)
bool isCompressed() const
Transform localTransform() const
float angleIncrement() const
std::string formatName() const
ULogger class and convenient macros.
static bool isScan2d(const Format &format)
Transform localTransform_
static bool isScanHasIntensity(const Format &format)
std::string UTILITE_EXP uFormat(const char *fmt,...)
static LaserScan backwardCompatibility(const cv::Mat &oldScanFormat, int maxPoints=0, int maxRange=0, const Transform &localTransform=Transform::getIdentity())
GLM_FUNC_DECL genType ceil(genType const &x)