Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a problem to inicializate spatial_data #1151

Merged
merged 2 commits into from
Feb 25, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions features/include/pcl/features/impl/crh.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,11 @@ pcl::CRHEstimation<PointInT, PointNT, PointOutT>::computeFeature (PointCloudOut

pcl::transformPointCloudWithNormals (grid, grid, transformPC);

//fill spatial data vector
kiss_fft_scalar * spatial_data = new kiss_fft_scalar[nbins];
//fill spatial data vector and the zero-initialize or "value-initialize" an array on c++,
// the initialization is made with () after the [nbins]
kiss_fft_scalar * spatial_data = new kiss_fft_scalar[nbins]();


float sum_w = 0, w = 0;
int bin = 0;
for (size_t i = 0; i < grid.points.size (); ++i)
Expand Down