MCPcopy Create free account
hub / github.com/Pamphlett/Outram / ImageProjection

Class ImageProjection

include/imageProjection.hpp:10–582  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8#define USE_FOUR_CROSS_NEIGHBORS_PIXELS 2
9
10class ImageProjection {
11private:
12 pcl::PointCloud<PointTypeIP>::Ptr laserCloudIn;
13 pcl::PointCloud<PointTypeIP>::Ptr fullCloud; // projected velodyne raw cloud, but saved in the form of 1-D matrix
14 pcl::PointCloud<PointTypeIP>::Ptr fullInfoCloud; // same as fullCloud, but with intensity is replaced with range
15
16 pcl::PointCloud<PointTypeIP>::Ptr groundCloud;
17 pcl::PointCloud<PointTypeIP>::Ptr segmentedCloud;
18 pcl::PointCloud<PointTypeIP>::Ptr segmentedCloudPure;
19 pcl::PointCloud<PointTypeIP>::Ptr outlierCloud;
20
21 PointTypeIP nanPoint; // fill in fullCloud at each iteration
22
23 cv::Mat rangeMat; // range matrix for range image
24 cv::Mat labelMat; // label matrix for segmentaiton marking
25 cv::Mat groundMat; // ground matrix for ground cloud marking
26
27 int labelCount;
28 int numMinPtsForSubclustering = 30;
29
30 float startOrientation;
31 float endOrientation;
32
33 quatro::cloud_info segMsg; // info of segmented cloud
34 std_msgs::Header cloudHeader;
35
36 std::vector<std::pair<int8_t, int8_t> > neighborIterator; // neighbor iterator for segmentaiton process
37
38 uint16_t *allPushedIndX; // array for tracking points of a segmented object
39 uint16_t *allPushedIndY;
40
41 uint16_t *queueIndX; // array for breadth-first search process of segmentation
42 uint16_t *queueIndY;
43
44public:
45 int neighborPixelsSelectionMode = NOT_ASSIGNED;
46 string groundSegMode;
47
48 int N_SCAN;
49 int Horizon_SCAN; //1028~4500
50 float ang_res_x;
51 float ang_res_y; //28.0/float(N_SCAN-1);
52 float ang_bottom;
53 int groundScanInd;
54
55 float segmentAlphaX;
56 float segmentAlphaY;
57
58 const float sensorMountAngle = 0.0;
59 //segmentation threshold
60 const float segmentTheta = 60.0/180.0*M_PI; // decrese this value may improve accuracy
61 //If number of segment is below than 30, check line number. this for minimum number of point for it
62 const int segmentValidPointNum = 5;
63 //if number of segment is small, number of line is checked, this is threshold for it.
64 const int segmentValidLineNum = 3;
65
66
67 ImageProjection() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected