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

Method allocateMemory

include/imageProjection.hpp:147–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145 }
146
147 void allocateMemory() {
148
149 laserCloudIn.reset(new pcl::PointCloud<PointTypeIP>());
150
151 fullCloud.reset(new pcl::PointCloud<PointTypeIP>());
152 fullInfoCloud.reset(new pcl::PointCloud<PointTypeIP>());
153
154 groundCloud.reset(new pcl::PointCloud<PointTypeIP>());
155 segmentedCloud.reset(new pcl::PointCloud<PointTypeIP>());
156 segmentedCloudPure.reset(new pcl::PointCloud<PointTypeIP>());
157 outlierCloud.reset(new pcl::PointCloud<PointTypeIP>());
158
159 fullCloud->points.resize(N_SCAN * Horizon_SCAN);
160 fullInfoCloud->points.resize(N_SCAN * Horizon_SCAN);
161
162 segMsg.startRingIndex.assign(N_SCAN, 0);
163 segMsg.endRingIndex.assign(N_SCAN, 0);
164
165 segMsg.segmentedCloudGroundFlag.assign(N_SCAN * Horizon_SCAN, false);
166 segMsg.segmentedCloudColInd.assign(N_SCAN * Horizon_SCAN, 0);
167 segMsg.segmentedCloudRange.assign(N_SCAN * Horizon_SCAN, 0);
168
169 // 4 neigbor labeling
170 // cout << "=> neighborPixelsSelectionMode: ";
171 if (neighborPixelsSelectionMode == USE_FOUR_NEIGHBORS_PIXELS) {
172 // cout << "USE_FOUR_NEIGHBORS_PIXELS" << endl;
173 neighborIterator.push_back({-1, 0});
174 neighborIterator.push_back({0, 1});
175 neighborIterator.push_back({0, -1});
176 neighborIterator.push_back({1, 0});
177
178 } else if (neighborPixelsSelectionMode == USE_EIGHT_NEIGHBORS_PIXELS) {
179 // cout << "USE_EIGHT_NEIGHBORS_PIXELS" << endl;
180 neighborIterator.push_back({-1, 0});
181 neighborIterator.push_back({0, 1});
182 neighborIterator.push_back({0, -1});
183 neighborIterator.push_back({1, 0});
184 neighborIterator.push_back({-1, -1});
185 neighborIterator.push_back({-1, 1});
186 neighborIterator.push_back({1, 1});
187 neighborIterator.push_back({1, -1});
188
189 } else if (neighborPixelsSelectionMode == USE_FOUR_CROSS_NEIGHBORS_PIXELS) {
190 // cout << "USE_FOUR_CROSS_NEIGHBORS_PIXELS" << endl;
191 neighborIterator.push_back({-1, -1});
192 neighborIterator.push_back({-1, 1});
193 neighborIterator.push_back({1, 1});
194 neighborIterator.push_back({1, -1});
195 } else { cout << endl; }
196
197 allPushedIndX = new uint16_t[N_SCAN * Horizon_SCAN];
198 allPushedIndY = new uint16_t[N_SCAN * Horizon_SCAN];
199
200 queueIndX = new uint16_t[N_SCAN * Horizon_SCAN];
201 queueIndY = new uint16_t[N_SCAN * Horizon_SCAN];
202 }
203
204 void resetParameters() {

Callers

nothing calls this directly

Calls 2

resetMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected