point_tool.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. //
  2. // Created by zx on 2021/5/11.
  3. //
  4. #ifndef ROBOT_CONTROL_FEATURE_EXTRA_SRC_POINT_TOOL_HPP_
  5. #define ROBOT_CONTROL_FEATURE_EXTRA_SRC_POINT_TOOL_HPP_
  6. /*
  7. #include <iostream>
  8. #include <pcl/point_types.h>
  9. #include <pcl/point_cloud.h>
  10. #include <pcl/io/pcd_io.h>
  11. #include <pcl/segmentation/sac_segmentation.h>
  12. #include <pcl/ModelCoefficients.h>
  13. #include <pcl/filters/extract_indices.h>
  14. #include <pcl/segmentation/extract_clusters.h>
  15. #include <opencv2/opencv.hpp>
  16. bool string2point(std::string str, pcl::PointXYZ &point);
  17. pcl::PointCloud<pcl::PointXYZ>::Ptr ReadTxtCloud(std::string file);
  18. void save_cloud_txt(pcl::PointCloud<pcl::PointXYZ>::Ptr cloud, std::string file);
  19. void save_cloud_txt(pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud, std::string file);
  20. double distance(cv::Point2f p1, cv::Point2f p2);
  21. bool isRect(std::vector<cv::Point2f> &points);
  22. std::vector<pcl::PointCloud<pcl::PointXYZ>::Ptr> segmentation(pcl::PointCloud<pcl::PointXYZ>::Ptr sor_cloud);
  23. void rpy_to_rotation_matrix();
  24. void rotation_matrix_to_rpy();
  25. void reverse_test();
  26. bool read_pointcloud(std::string filename, pcl::PointCloud<pcl::PointXYZ>::Ptr &pointcloud);
  27. */
  28. #endif //ROBOT_CONTROL_FEATURE_EXTRA_SRC_POINT_TOOL_HPP_