Skip to content

Commit

Permalink
Merge pull request #108 from eEcoLiDAR/pulse_penetration_104
Browse files Browse the repository at this point in the history
Pulse penetration 104
  • Loading branch information
cwmeijer committed Apr 16, 2018
2 parents e3ac7df + 4e6c865 commit 9b79530
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions laserchicken/compute_neighbors.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ def compute_cylinder_neighborhood(environment_pc, target_pc, radius):
if cyl_size > mem_size * MEMORY_THRESHOLD:
y = target_pc[point]['y']['data']

num_points = math.floor(mem_size * MEMORY_THRESHOLD) / \
(avg_points_cyl * sys.getsizeof(int))
print("Number of points: %d" % num_points)
num_points = math.floor(mem_size * MEMORY_THRESHOLD / \
(avg_points_cyl * sys.getsizeof(int)))
print("Number of points: %f" % num_points)

env_tree = kd_tree.get_kdtree_for_pc(environment_pc)

Expand Down
2 changes: 2 additions & 0 deletions laserchicken/feature_extractor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ def _add_or_update_feature(env_point_cloud, neighborhoods, target_point_cloud, e
n_features = len(provided_features)
feature_values = [np.empty(n_targets, dtype=np.float64)
for i in range(n_features)]

print("The number of targets %d and number of features %d for extraction!!!" % (n_targets, n_features))
for target_index in range(n_targets):
point_values = extractor.extract(env_point_cloud, neighborhoods[target_index], target_point_cloud,
target_index, volume)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ def extract(self, point_cloud, neighborhood, target_point_cloud, target_index, v
:param volume_description: volume object that describes the shape and size of the search volume
:return: feature value
"""
class_neighbors = np.array(point_cloud[point]['raw_classification']["data"])[
neighborhood]
class_neighbors = [point_cloud[point]['raw_classification']["data"][n] for n in neighborhood]

ground_indices = self._get_ground_indices(
class_neighbors, self.ground_tags)

Expand Down

0 comments on commit 9b79530

Please sign in to comment.