-
-
Save antimodular/75abe99baacb3aee0dab to your computer and use it in GitHub Desktop.
#pragma once | |
//this is ofApp.h | |
#include "ofMain.h" | |
//taken from ofxPCL.h file | |
// file io | |
#include <pcl/io/pcd_io.h> | |
// transform | |
#include <pcl/common/transforms.h> | |
// thresold | |
#include <pcl/filters/passthrough.h> | |
// outlier removal | |
#include <pcl/filters/statistical_outlier_removal.h> | |
#include <pcl/filters/radius_outlier_removal.h> | |
// segmentation | |
#include <pcl/sample_consensus/model_types.h> | |
// downsample | |
#include <pcl/filters/voxel_grid.h> | |
// segmentation | |
#include <pcl/ModelCoefficients.h> | |
#include <pcl/segmentation/sac_segmentation.h> | |
#include <pcl/sample_consensus/method_types.h> | |
#include <pcl/filters/extract_indices.h> | |
// cluster extraction | |
#include <pcl/sample_consensus/model_types.h> | |
#include <pcl/segmentation/extract_clusters.h> | |
// triangulate | |
#include <pcl/features/normal_3d.h> | |
#include <pcl/surface/gp3.h> | |
#include <pcl/surface/grid_projection.h> | |
#include <pcl/Vertices.h> | |
// mls | |
#include <pcl/surface/mls.h> | |
#include <pcl/io/pcd_io.h> | |
#include <pcl/surface/organized_fast_mesh.h> | |
#include <pcl/features/integral_image_normal.h> | |
//taken from ofxPCL utility.h file | |
#include <pcl/common/io.h> | |
//taken from types.h file | |
#include <pcl/point_cloud.h> | |
#include <pcl/point_types.h> | |
//taken from tree.h | |
// octree | |
#include <pcl/octree/octree.h> | |
// kdtree | |
#include <pcl/search/pcl_search.h> | |
class ofApp : public ofBaseApp{ | |
public: | |
void setup(); | |
void update(); | |
void draw(); | |
void keyPressed(int key); | |
}; |
turns out my version of boost was old and dusty.
i went and deleted libs/pcl/include/boost
installed homebrew via http://brew.sh
use homebrew to install boost via terminal command brew install boost
went to /usr/local/Cellar/boost/1.60.0_1/include and copied this new boost folder to where i just deleted the old one -> libs/pcl/include/boost
then recompiled my project in Xcode.
now let's see if i can make use of PCL
downloaded a fresh / new version of PCL this time it is version 1.7.2 via brew install pcl
went to /usr/local/Cellar/pcl/1.7.2/pcl/1.7.2/lib and copied the content in to my local ofProject/libs/pcl/lib/osx folder. but removed the old stuff before.
then drag all those dylib files in to Xcode
adjust the the header search path in project settings:
it compiles fine now BUT does not run.
strange compile error:
dyld: Library not loaded: /usr/local/lib/libvtkDomainsChemistry-6.3.1.dylib
Referenced from: /usr/local/opt/pcl/lib/libpcl_cc_tool_normal_estimation.1.7.dylib
Reason: image not found
which is strange because /usr/local/lib/ already has a lot of vtk stuff in it.
even libvtkDomainsChemistry-7.0.1.dylib and libvtkDomainsChemistry-7.0.dylib
but no 6.3.1
so i tried to remove all vtk stuff by doing
brew uninstall vtk
brew uninstall pcl
and then build pcl as suggested here:
http://www.pointclouds.org/documentation/tutorials/installing_homebrew.php
brew install pcl --without-apps --without-tools --without-vtk --without-qt
now the compile error is a bit different but still looks for libvtkDomainsChemistry-6.3.1.dylib
dyld: Library not loaded: /usr/local/lib/libvtkDomainsChemistry-6.3.1.dylib
Referenced from: /usr/local/opt/pcl/lib/libpcl_io.1.7.dylib
Reason: image not found
worked out a stable setup:
https://github.com/antimodular/ofxPCL
As suggested i downloaded PCL_1.6.0.dmg for OS X here:
http://www.pointclouds.org/downloads/macosx.html
I ran the included PCL_1.6.0.mpkg installer. Not sure where it got installed.
I did not touch the dependencies listed there for OS X.
But at some point in the past i did go through the homebrew steps listed here but i am not sure where it got installed:
http://www.pointclouds.org/documentation/tutorials/installing_homebrew.php
Then i copy an empty OF project and placed the PCL libs folder i got from https://github.com/satoruhiga/ofxPCL, added a whole bunch of #include xxx.h files that where in the ofxPCL addon header files.
Then edited header and library search paths as shown in this screen shot:
and then i get a whole bunch of compile errors: