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

[2d] Remove variable assignments that are never used #3857

Merged
Merged
Show file tree
Hide file tree
Changes from 2 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
4 changes: 2 additions & 2 deletions 2d/include/pcl/2d/impl/kernel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ void
pcl::kernel<PointT>::loGKernel(pcl::PointCloud<PointT>& kernel)
{
float sum = 0;
float temp = 0;
kernel.resize(kernel_size_ * kernel_size_);
kernel.height = kernel_size_;
kernel.width = kernel_size_;
Expand All @@ -131,9 +130,10 @@ pcl::kernel<PointT>::loGKernel(pcl::PointCloud<PointT>& kernel)

for (int i = 0; i < kernel_size_; i++) {
for (int j = 0; j < kernel_size_; j++) {
float temp = 0;
int iks = (i - kernel_size_ / 2);
int jks = (j - kernel_size_ / 2);
temp = float(double(iks * iks + jks * jks) / sigma_sqr);
float temp = float(double(iks * iks + jks * jks) / sigma_sqr);
diivm marked this conversation as resolved.
Show resolved Hide resolved
kernel(j, i).intensity = (1.0f - temp) * std::exp(-temp);
sum += kernel(j, i).intensity;
}
Expand Down
3 changes: 1 addition & 2 deletions 2d/include/pcl/2d/impl/keypoint.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ pcl::keypoint::hessianBlob(ImageType& output,
hessianBlob(cornerness[i], input, scale, false);
scale *= scaling_factor;
}
bool non_max_flag = false;
float scale_max, local_max;
for (std::size_t i = 0; i < height; i++) {
for (std::size_t j = 0; j < width; j++) {
Expand All @@ -202,7 +201,7 @@ pcl::keypoint::hessianBlob(ImageType& output,
output[i][j] = 0;
for (int k = 0; k < num_scales; k++) {
/*check if the current point (k,i,j) is a maximum in the defined search radius*/
non_max_flag = false;
bool non_max_flag = false;
local_max = cornerness[k][i][j];
for (int n = -local_search_radius; n <= local_search_radius; n++) {
if (n + k < 0 || n + k >= num_scales)
Expand Down