+ handling of organized point cloud
This commit is contained in:
@@ -122,6 +122,8 @@ void PointsAlgos::LoadAscii(PointKernel &points, const char *FileName)
|
||||
|
||||
Reader::Reader()
|
||||
{
|
||||
width = 0;
|
||||
height = 0;
|
||||
}
|
||||
|
||||
Reader::~Reader()
|
||||
@@ -175,6 +177,21 @@ bool Reader::hasNormals() const
|
||||
return (!normals.empty());
|
||||
}
|
||||
|
||||
bool Reader::isOrganized() const
|
||||
{
|
||||
return (width > 1 && height > 1);
|
||||
}
|
||||
|
||||
int Reader::getWidth() const
|
||||
{
|
||||
return width;
|
||||
}
|
||||
|
||||
int Reader::getHeight() const
|
||||
{
|
||||
return height;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
AscReader::AscReader()
|
||||
@@ -351,6 +368,9 @@ void PcdReader::read(const std::string& filename)
|
||||
hasColors = true;
|
||||
}
|
||||
|
||||
width = cloud2.width;
|
||||
height = cloud2.height;
|
||||
|
||||
if (hasNormals && hasColors) {
|
||||
pcl::PointCloud<pcl::PointXYZRGBNormal> cloud_in;
|
||||
pcl::io::loadPCDFile<pcl::PointXYZRGBNormal>(filename, cloud_in);
|
||||
|
||||
Reference in New Issue
Block a user