Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions apps/src/face_detection/filesystem_face_detection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ run(pcl::RFFaceDetectorTrainer& fdrf,
bool result = face_detection_apps_utils::readMatrixFromFile(pose_file, pose_mat);

if (result) {
#if (EIGEN_WORLD_VERSION > 3 || (EIGEN_WORLD_VERSION == 3 && EIGEN_MAJOR_VERSION >= 5))
Eigen::Vector3f ea = pose_mat.topLeftCorner<3, 3>().canonicalEulerAngles(0, 1, 2);
#else
Eigen::Vector3f ea = pose_mat.topLeftCorner<3, 3>().eulerAngles(0, 1, 2);
#endif
Eigen::Vector3f trans_vector =
Eigen::Vector3f(pose_mat(0, 3), pose_mat(1, 3), pose_mat(2, 3));
std::cout << ea << std::endl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ void pcl::face_detection::FaceDetectorDataProvider<FeatureType, DataSet, LabelTy

if (readMatrixFromFile (pose_file, pose_mat))
{
#if (EIGEN_WORLD_VERSION > 3 || (EIGEN_WORLD_VERSION == 3 && EIGEN_MAJOR_VERSION >= 5))
Eigen::Vector3f ea = pose_mat.topLeftCorner<3, 3> ().canonicalEulerAngles (0, 1, 2);
#else
Eigen::Vector3f ea = pose_mat.topLeftCorner<3, 3> ().eulerAngles (0, 1, 2);
#endif
ea *= 57.2957795f; //transform it to degrees to do the binning
int y = static_cast<int>(pcl_round ((ea[0] + static_cast<float>(std::abs (min_yaw))) / res_yaw));
int p = static_cast<int>(pcl_round ((ea[1] + static_cast<float>(std::abs (min_pitch))) / res_pitch));
Expand Down Expand Up @@ -354,7 +358,11 @@ void pcl::face_detection::FaceDetectorDataProvider<FeatureType, DataSet, LabelTy
pose_mat.setIdentity (4, 4);
readMatrixFromFile (pose_file, pose_mat);

#if (EIGEN_WORLD_VERSION > 3 || (EIGEN_WORLD_VERSION == 3 && EIGEN_MAJOR_VERSION >= 5))
Eigen::Vector3f ea = pose_mat.topLeftCorner<3, 3> ().canonicalEulerAngles (0, 1, 2);
#else
Eigen::Vector3f ea = pose_mat.topLeftCorner<3, 3> ().eulerAngles (0, 1, 2);
#endif
Eigen::Vector3f trans_vector = Eigen::Vector3f (pose_mat (0, 3), pose_mat (1, 3), pose_mat (2, 3));

pcl::PointXYZ center_point;
Expand Down
4 changes: 4 additions & 0 deletions recognition/src/face_detection/rf_face_detector_trainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,11 @@ void pcl::RFFaceDetectorTrainer::detectFaces()
head_clusters_centers_[i][1] = icp_trans (1, 3);
head_clusters_centers_[i][2] = icp_trans (2, 3);

#if (EIGEN_WORLD_VERSION > 3 || (EIGEN_WORLD_VERSION == 3 && EIGEN_MAJOR_VERSION >= 5))
Eigen::Vector3f ea = icp_trans.topLeftCorner<3, 3> ().canonicalEulerAngles (0, 1, 2);
#else
Eigen::Vector3f ea = icp_trans.topLeftCorner<3, 3> ().eulerAngles (0, 1, 2);
#endif
head_clusters_rotation_[i][0] = ea[0];
head_clusters_rotation_[i][1] = ea[1];
head_clusters_rotation_[i][2] = ea[2];
Expand Down
4 changes: 4 additions & 0 deletions registration/include/pcl/registration/impl/ndt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,11 @@ NormalDistributionsTransform<PointSource, PointTarget, Scalar>::computeTransform
// Convert initial guess matrix to 6 element transformation vector
Eigen::Matrix<double, 6, 1> transform, score_gradient;
Vector3 init_translation = eig_transformation.translation();
#if (EIGEN_WORLD_VERSION > 3 || (EIGEN_WORLD_VERSION == 3 && EIGEN_MAJOR_VERSION >= 5))
Vector3 init_rotation = eig_transformation.rotation().canonicalEulerAngles(0, 1, 2);
#else
Vector3 init_rotation = eig_transformation.rotation().eulerAngles(0, 1, 2);
#endif
transform << init_translation.template cast<double>(),
init_rotation.template cast<double>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,11 @@ pcl::SampleConsensusModelTorus<PointT, PointNT>::computeModelCoefficients(
B << -d.dot(p0), -d.dot(p1), -d.dot(p2), -d.dot(p3);

Eigen::Matrix<float, -1, -1> sol;
#if (EIGEN_WORLD_VERSION > 3 || (EIGEN_WORLD_VERSION == 3 && EIGEN_MAJOR_VERSION >= 5))
sol = A.jacobiSvd<Eigen::ComputeThinU | Eigen::ComputeThinV>().solve(B);
#else
sol = A.jacobiSvd(Eigen::ComputeThinU | Eigen::ComputeThinV).solve(B);
#endif

const float r_min = -sol(0);
const float D = sol(1);
Expand Down
3 changes: 3 additions & 0 deletions visualization/src/image_viewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ pcl::visualization::ImageViewer::ImageViewer (const std::string& window_title)
{
// Prepare for image flip
algo_->SetInterpolationModeToCubic ();
#if (VTK_MAJOR_VERSION < 9 || (VTK_MAJOR_VERSION == 9 && VTK_MINOR_VERSION < 6))
// starting with VTK 9.6.0, this is a no-op and marked deprecated
algo_->PreserveImageExtentOn ();
#endif
algo_->FlipAboutOriginOn ();
algo_->SetFilteredAxis (1);

Expand Down
5 changes: 4 additions & 1 deletion visualization/src/point_picking_event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,11 @@ pcl::visualization::PointPickingCallback::performAreaPick (vtkRenderWindowIntera

vtkPolyData* selected = glyph_filter->GetOutput ();
vtkIdTypeArray* global_ids = vtkIdTypeArray::SafeDownCast (selected->GetPointData ()->GetArray ("Indices"));

#if (VTK_MAJOR_VERSION > 9 || (VTK_MAJOR_VERSION == 9 && VTK_MINOR_VERSION >= 7))
if (!global_ids->GetCapacity () || !selected->GetNumberOfPoints ())
#else
if (!global_ids->GetSize () || !selected->GetNumberOfPoints ())
#endif
continue;

Indices actor_indices;
Expand Down
Loading