Skip to content

Commit

Permalink
fix: fixed access to class fields
Browse files Browse the repository at this point in the history
  • Loading branch information
LevDenisov committed Oct 20, 2023
1 parent 559f938 commit 9be23db
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cpp/deplex/src/deplex/utils/depth_image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ DepthImage::DepthImage(std::string const& image_path) : width_(0), height_(0) {
}
image_.reset(data_ptr);

column_indices = Eigen::VectorXf::LinSpaced(width_, 0.0, width_ - 1).replicate(height_, 1);
row_indices = Eigen::VectorXf::LinSpaced(height_, 0.0, height_ - 1).replicate(1, width_).reshaped<Eigen::RowMajor>();
column_indices_ = Eigen::VectorXf::LinSpaced(width_, 0.0, width_ - 1).replicate(height_, 1);
row_indices_ = Eigen::VectorXf::LinSpaced(height_, 0.0, height_ - 1).replicate(1, width_).reshaped<Eigen::RowMajor>();
}

void DepthImage::reset(std::string const& image_path) {
Expand Down Expand Up @@ -68,9 +68,9 @@ Eigen::MatrixX3f DepthImage::toPointCloud(Eigen::Matrix3f const& intrinsics) con
#pragma omp sections
{
#pragma omp section
{ pcd_points.col(0) = (column_indices.array() - cx) * pcd_points.col(2).array() / fx; }
{ pcd_points.col(0) = (column_indices_.array() - cx) * pcd_points.col(2).array() / fx; }
#pragma omp section
{ pcd_points.col(1) = (row_indices.array() - cy) * pcd_points.col(2).array() / fy; }
{ pcd_points.col(1) = (row_indices_.array() - cy) * pcd_points.col(2).array() / fy; }
}
}

Expand Down

0 comments on commit 9be23db

Please sign in to comment.