Skip to content

Commit

Permalink
Merge pull request #1 from gaishunhua/gaishunhua-patch-1
Browse files Browse the repository at this point in the history
Update sac_model_cylinder.hpp
  • Loading branch information
gaishunhua authored Sep 22, 2023
2 parents b5ce8f5 + 8662c13 commit eccb2d1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ pcl::SampleConsensusModelCylinder<PointT, PointNT>::projectPointToCylinder (
Eigen::Vector4f line_pt (model_coefficients[0], model_coefficients[1], model_coefficients[2], 0.0f);
Eigen::Vector4f line_dir (model_coefficients[3], model_coefficients[4], model_coefficients[5], 0.0f);

float k = (pt.dot (line_dir) - line_pt.dot (line_dir)) * line_dir.dot (line_dir);
float k = (pt.dot (line_dir) - line_pt.dot (line_dir)) / line_dir.dot (line_dir);
pt_proj = line_pt + k * line_dir;

Eigen::Vector4f dir = pt - pt_proj;
Expand Down

0 comments on commit eccb2d1

Please sign in to comment.