Compiling PCL 1.6 for android - patch

原创 2017年03月12日 00:00:45
~/pcl-superbuild/build/CMakeExternals/Source/pcl$ git diff
diff --git a/features/src/narf.cpp b/features/src/narf.cpp
index 23d6813..6b99500 100644
--- a/features/src/narf.cpp
+++ b/features/src/narf.cpp
@@ -457,7 +457,7 @@ Narf::getRotations (std::vector<float>& rotations, std::vector<float>& strengths
     {
       float value = descriptor_[descriptor_value_idx];
       float angle2 = static_cast<float> (descriptor_value_idx) * angle_step_size2;
-      float distance_weight = powf (1.0f - fabsf (normAngle (angle - angle2)) / deg2rad (180.0f), 2.0f);
+      float distance_weight = std::pow (1.0f - fabsf (normAngle (angle - angle2)) / deg2rad (180.0f), 2.0f);
       
       score += value * distance_weight;
     }
diff --git a/keypoints/src/narf_keypoint.cpp b/keypoints/src/narf_keypoint.cpp
index c0daf88..6ae677f 100644
--- a/keypoints/src/narf_keypoint.cpp
+++ b/keypoints/src/narf_keypoint.cpp
@@ -132,7 +132,7 @@ namespace
                 float optimal_distance, float& negative_score, float& positive_score)
   {
     negative_score = 1.0f - 0.5f * surface_change_score * (std::max) (1.0f - distance_factor/optimal_distance, 0.0f);
-    negative_score = powf (negative_score, 2);
+    negative_score = std::pow (negative_score, 2);
     
     if (pixelDistance < 2.0)
       positive_score = surface_change_score;
@@ -639,7 +639,7 @@ NarfKeypoint::calculateSparseInterestImage ()
       if (do_neighbor_size_reduction)
       {
         float min_distance_between_relevant_points = 0.25f * search_radius,
-              min_distance_between_relevant_points_squared = powf(min_distance_between_relevant_points, 2);
+              min_distance_between_relevant_points_squared = std::pow(min_distance_between_relevant_points, 2);
         for (int angle_histogram_idx=0; angle_histogram_idx<angle_histogram_size; ++angle_histogram_idx)
         {
           std::vector<std::pair<int,float> >& relevent_point_indices = angle_elements[angle_histogram_idx];
@@ -745,7 +745,7 @@ NarfKeypoint::calculateInterestPoints ()
   
   interest_points_ = new ::pcl::PointCloud<InterestPoint>;
   
-  float max_distance_squared = powf (0.3f*parameters_.support_size, 2);
+  float max_distance_squared = std::pow (0.3f*parameters_.support_size, 2);
   
   const RangeImage& range_image = range_image_border_extractor_->getRangeImage ();
   const ::pcl::PointCloud<BorderDescription>& border_descriptions =
@@ -871,7 +871,7 @@ NarfKeypoint::calculateInterestPoints ()
   
   std::sort (tmp_interest_points.begin (), tmp_interest_points.end (), isBetterInterestPoint);
   
-  float min_distance_squared = powf (parameters_.min_distance_between_interest_points*parameters_.support_size, 2);
+  float min_distance_squared = std::pow (parameters_.min_distance_between_interest_points*parameters_.support_size, 2);
   for (size_t int_point_idx=0; int_point_idx<tmp_interest_points.size (); ++int_point_idx)
   {

     if (parameters_.max_no_of_interest_points > 0  &&  int (interest_points_->size ()) >= parameters_.max_no_of_interest_points)



~/pcl-superbuild/build/CMakeExternals/Source/vtk$ git diff
diff --git a/CMake/GenerateExportHeader.cmake b/CMake/GenerateExportHeader.cmake
index e0897d4..ebbb741 100644
--- a/CMake/GenerateExportHeader.cmake
+++ b/CMake/GenerateExportHeader.cmake
@@ -174,7 +174,7 @@ macro(_test_compiler_hidden_visibility)
         _gcc_version "${_gcc_version_info}")
     endif()
 
-    if(${_gcc_version} VERSION_LESS "4.2")
+    if(_gcc_version VERSION_LESS "4.2")
       set(GCC_TOO_OLD TRUE)
     endif()
   endif()
diff --git a/CMake/vtkCompilerExtras.cmake b/CMake/vtkCompilerExtras.cmake
index 0b57437..f0bfffd 100644
--- a/CMake/vtkCompilerExtras.cmake
+++ b/CMake/vtkCompilerExtras.cmake
@@ -37,7 +37,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
   option(VTK_USE_GCC_VISIBILITY "Use GCC visibility support if available." OFF)
   mark_as_advanced(VTK_USE_GCC_VISIBILITY)
 
-  if(${_gcc_version} VERSION_GREATER 4.2.0 AND BUILD_SHARED_LIBS
+  if(_gcc_version VERSION_GREATER 4.2.0 AND BUILD_SHARED_LIBS
     AND HAVE_GCC_VISIBILITY AND VTK_USE_GCC_VISIBILITY
     AND NOT MINGW AND NOT CYGWIN)
     # Should only be set if GCC is newer than 4.2.0

相关文章推荐

Compiling PCL for android

Compiling PCL for android (in windows, cmake-gui) JULY 14, 2014 INS7ITIA3 COMMENTS I hav...

A simple guide to 9-patch for Android UI

[转] http://radleymarx.com/blog/simple-guide-to-9-patch/ While I was working on my first And...

Cross compiling wxDFB-2.8.11 for ARM-Linux

Without GUI, cross compilation of wxWidgets is pretty easy. However it does not provide wxImage. Wit...

a patch for android

  • 2013年03月23日 13:11
  • 63KB
  • 下载

cross-compiling for iPhone dev

http://robertcarlsen.net/2009/07/15/cross-compiling-for-iphone-dev-884 Update: Proof-of-concept d...
  • phiger
  • phiger
  • 2011年08月28日 15:33
  • 794

Cross Compiling Python for Embedded Linux

Cross Compiling Python for Embedded Linux Posted by Paul Gibson on 16 November 2011, 2:48 pm Th...
  • gxp
  • gxp
  • 2012年04月17日 09:54
  • 752

Cross-compiling for ARM

In order to do program in ARM board [9TDMI], I cross-compiled using the Linux 'C' compiler for ARM a...
  • wzwind
  • wzwind
  • 2011年08月08日 21:53
  • 717

compiling ffmpeg for iFrameExtractor

转自:http://stackoverflow.com/questions/6994151/problem-compiling-ffmpeg-for-iframeextractor ...

windows下成功编译Cairo,Compiling Cairo for Windows

Cairo is a cross-platform 2D graphics software library. It is designed to produce consistent output ...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:Compiling PCL 1.6 for android - patch
举报原因:
原因补充:

(最多只允许输入30个字)