Skip to content

Commit

Permalink
[CLEAN] Removed useless check of PCL version
Browse files Browse the repository at this point in the history
  • Loading branch information
rlagneau committed Apr 23, 2024
1 parent 2855066 commit 4a5e001
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions example/device/framegrabber/saveRealSenseData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,7 @@
#if defined(VISP_HAVE_PCL)
#include <pcl/pcl_config.h>
#if defined(VISP_HAVE_PCL_COMMON)
#if PCL_VERSION_COMPARE(>=,1,14,1)
#include <pcl/impl/point_types.hpp>
#else
#include <pcl/point_types.h>
#endif
#include <pcl/point_cloud.h>
#endif
#if defined(VISP_HAVE_PCL_IO)
Expand Down Expand Up @@ -417,7 +413,7 @@ class vpStorageWorker
vpIoTools::writeBinaryValueLE(file_pointcloud, pt.y);
vpIoTools::writeBinaryValueLE(file_pointcloud, pt.z);
}
}
}
#else
uint32_t width = m_size_width;
uint32_t height = m_size_height;
Expand All @@ -440,16 +436,16 @@ class vpStorageWorker
}
}
#endif
}
}
}
else {
#if defined(VISP_HAVE_PCL) && defined(VISP_HAVE_PCL_IO)
pcl::io::savePCDFileBinary(filename_point_cloud, *pointCloud);
#elif defined(VISP_HAVE_PCL)
throw(vpIoException(vpIoException::fatalError, "Cannot save as pcd files without PCL io module"));
#endif
}
}
}

if (m_save_infrared) {
ss.str("");
Expand All @@ -461,13 +457,13 @@ class vpStorageWorker
}

m_cpt++;
}
}
}
}
catch (const vpFrameQueue::vpCancelled_t &) {
std::cout << "Receive cancel vpFrameQueue." << std::endl;
}
}
}

private:
vpFrameQueue &m_queue;
Expand Down Expand Up @@ -627,12 +623,12 @@ int main(int argc, const char *argv[])
vpHomogeneousMatrix depth_M_color;
if (!use_aligned_stream) {
depth_M_color = realsense.getTransformation(rs::stream::color, rs::stream::depth);
}
}
#endif
std::ofstream file(std::string(output_directory + "/depth_M_color.txt"));
depth_M_color.save(file);
file.close();
}
}

vpFrameQueue save_queue;
vpStorageWorker storage(std::ref(save_queue), std::cref(output_directory), save_color, save_depth, save_pointcloud,
Expand Down

0 comments on commit 4a5e001

Please sign in to comment.