WIN10 + VS2015 + PCL18.0 configuration

My environment: 64 WIN10,64 bit VS2015, Release × 64

1. Download "PCL 1.8.0 All-in-one InstallerMSVC2015 x64.exe", open to a custom path, after completion of the addition in the environment variables

 

Let's start with the directory that contains the library and recommend new property sheet PCLrelease.props

Open PCLrelease.props property , VC ++ directory

 

 

 

2. Add the directory that contains:

 

 

 3. Add the library directory

 

 

 4. In the project directory attribute of "Debug - Environment" add path = H: \ PCL 1.8.0 \ bin

5. PCLrelease.props adding additional dependency under - "input linker" in

pcl_common_release.lib
pcl_features_release.lib
pcl_filters_release.lib
pcl_io_release.lib
pcl_io_ply_release.lib
pcl_kdtree_release.lib
pcl_keypoints_release.lib
pcl_ml_release.lib
pcl_octree_release.lib
pcl_outofcore_release.lib
pcl_people_release.lib
pcl_recognition_release.lib
pcl_registration_release.lib
pcl_sample_consensus_release.lib
pcl_search_release.lib
pcl_segmentation_release.lib
pcl_stereo_release.lib
pcl_surface_release.lib
pcl_tracking_release.lib
pcl_visualization_release.lib
flann_cpp_s.lib
flann_s.lib
flann.lib
libboost_atomic-vc140-mt-1_61.lib
libboost_chrono-vc140-mt-1_61.lib
libboost_container-vc140-mt-1_61.lib
libboost_context-vc140-mt-1_61.lib
libboost_coroutine-vc140-mt-1_61.lib
libboost_date_time-vc140-mt-1_61.lib
libboost_exception-vc140-mt -1_61.lib
libboost_filesystem-vc140-mt-1_61.lib
libboost_graph-vc140-mt-1_61.lib
libboost_iostreams-vc140-mt-1_61.lib
libboost_locale-vc140-mt-1_61.lib
libboost_log-vc140-mt-1_61.lib
libboost_log_setup -vc140-mt-1_61.lib
libboost_math_c99-vc140-mt-1_61.lib
libboost_math_c99f-vc140-mt-1_61.lib
libboost_math_c99l-vc140-mt-1_61.lib
libboost_math_tr1-vc140-mt-1_61.lib
libboost_math_tr1f-vc140-mt- 1_61.lib
libboost_math_tr1l-vc140-mt-1_61.lib
libboost_mpi-vc140-mt-1_61.lib
libboost_prg_exec_monitor-vc140-mt-1_61.lib
libboost_program_options-vc140-mt-1_61.lib
libboost_random-vc140-mt-1_61.lib
libboost_regex-vc140-mt -1_61.lib
libboost_serialization-vc140-mt-1_61.lib
libboost_signals-vc140-mt-1_61.lib
libboost_system-vc140-mt-1_61.lib
libboost_test_exec_monitor-vc140-mt-1_61.lib
libboost_thread-vc140-mt-1_61.lib
libboost_timer -vc140-mt-1_61.lib
libboost_unit_test_framework-vc140-mt-1_61.lib
libboost_wave-vc140-mt-1_61.lib
libboost_wserialization-vc140-mt-1_61.lib
qhullstatic.lib
qhull.lib
qhull_p.lib
qhull_r.lib
qhullcpp.lib
qhullstatic_r.lib
vtkalglib-7.0.lib
vtkChartsCore-7.0.lib
vtkCommonColor-7.0.lib
vtkCommonComputationalGeometry-7.0.lib
vtkCommonCore-7.0.lib
vtkCommonDataModel-7.0.lib
vtkCommonExecutionModel-7.0.lib
vtkCommonMath-7.0.lib
vtkCommonMisc-7.0.lib
vtkCommonSystem-7.0.lib
vtkCommonTransforms-7.0.lib
vtkDICOMParser-7.0.lib
vtkDomainsChemistry-7.0.lib
vtkexoIIc-7.0.lib
vtkexpat-7.0.lib
vtkFiltersAMR-7.0.lib
vtkFiltersCore-7.0.lib
vtkFiltersExtraction-7.0.lib
vtkFiltersFlowPaths-7.0.lib
vtkFiltersGeneral-7.0.lib
vtkFiltersGeneric-7.0.lib
7.0.lib-VtkFiltersGeometry
VtkFiltersHybrid-7.0.lib
VtkFiltersHyperTree-7.0.lib
VtkFiltersImaging-7.0.lib
VtkFiltersModeling-7.0.lib
VtkFiltersParallel-7.0.lib
VtkFiltersParallelImaging-7.0.lib
VtkFiltersProgrammable-7.0.lib
VtkFiltersSelection-7.0.lib
VtkFiltersSMP-7.0.lib
7.0.lib-VtkFiltersSources
VtkFiltersStatistics-7.0.lib
VtkFiltersTexture-7.0.lib
VtkFiltersVerdict-7.0.lib
Vtkfreetype-7.0.lib
VtkGeovisCore-7.0.lib
Vtkhdf5-7.0.lib
Vtkhdf5_hl-7.0.lib
VtkImagingColor-7.0.lib
VtkImagingCore-7.0.lib
7.0.lib-VtkImagingFourier
VtkImagingGeneral-7.0.lib
VtkImagingHybrid-7.0.lib
vtkImagingMath-7.0.lib
vtkImagingMorphological-7.0.lib
vtkImagingSources-7.0.lib
vtkImagingStatistics-7.0.lib
vtkImagingStencil-7.0.lib
vtkInfovisCore-7.0.lib
vtkInfovisLayout-7.0.lib
vtkInteractionImage-7.0.lib
vtkInteractionStyle-7.0.lib
vtkInteractionWidgets-7.0.lib
vtkIOAMR-7.0.lib
vtkIOCore-7.0.lib
vtkIOEnSight-7.0.lib
vtkIOExodus-7.0.lib
vtkIOExport-7.0.lib
vtkIOGeometry-7.0.lib
vtkIOImage-7.0.lib
vtkIOImport-7.0.lib
vtkIOInfovis-7.0.lib
vtkIOLegacy-7.0.lib
vtkIOLSDyna-7.0.lib
vtkIOMINC-7.0.lib
vtkIOMovie-7.0.lib
vtkIONetCDF-7.0.lib
vtkIOParallel-7.0.lib
vtkIOPLY-7.0.lib
vtkIOSQL-7.0.lib
vtkIOVideo-7.0.lib
vtkIOXML-7.0.lib
vtkIOXMLParser-7.0.lib
vtkjpeg-7.0.lib
vtkjsoncpp-7.0.lib
vtklibxml2-7.0.lib
vtkmetaio-7.0.lib
vtkNetCDF-7.0.lib
vtkNetCDF_cxx-7.0.lib
vtkoggtheora-7.0.lib
vtkParallelCore-7.0.lib
vtkpng-7.0.lib
vtkproj4-7.0.lib
vtkRenderingAnnotation-7.0.lib
vtkRenderingContext2D-7.0.lib
vtkRenderingCore-7.0.lib
vtkRenderingFreeType-7.0.lib
vtkRenderingImage-7.0.lib
vtkRenderingLabel-7.0.lib
vtkRenderingLOD-7.0.lib
vtkRenderingVolume-7.0.lib
vtksqlite-7.0.lib
7.0.lib-vtksys
vtktiff-7.0.lib
vtkverdict-7.0.lib
vtkViewsContext2D-7.0.lib
vtkViewsCore-7.0.lib
vtkViewsInfovis-7.0.lib
vtkzlib-7.0.lib
OpenNI2.lib
QVTKWidgetPlugin.lib (if prompted an error, delete this)

6. Create a new main ()

#include <iostream>
#include <pcl/io/pcd_io.h>
#include <pcl/point_types.h>
#include <pcl/ModelCoefficients.h>
#include <pcl/filters/project_inliers.h>

int main(int argc, char** argv)
{
    pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>);
    pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_projected(new pcl::PointCloud<pcl::PointXYZ>);

    // Fill in the cloud data
    cloud->width = 5;
    cloud->height = 1;
    cloud->points.resize(cloud->width * cloud->height);

    for (size_t i = 0; i < cloud->points.size(); ++i)
    {
        cloud->points[i].x = 1024 * rand() / (RAND_MAX + 1.0f);
        cloud->points[i].y = 1024 * rand() / (RAND_MAX + 1.0f);
        cloud->points[i].z = 1024 * rand() / (RAND_MAX + 1.0f);
    }

    std::cerr << "Cloud before projection: " << std::endl;
    for (size_t i = 0; i < cloud->points.size(); ++i)
        std::cerr << "    " << cloud->points[i].x << " "
        << cloud->points[i].y << " "
        << cloud->points[i].z << std::endl;

    // Create a set of planar coefficients with X=Y=0,Z=1
    pcl::ModelCoefficients::Ptr coefficients(new pcl::ModelCoefficients());
    coefficients->values.resize(4);
    coefficients->values[0] = coefficients->values[1] = 0;
    coefficients->values[2] = 1.0;
    coefficients->values[3] = 0;

    // Create the filtering object
    pcl::ProjectInliers<pcl::PointXYZ> proj;
    proj.setModelType(pcl::SACMODEL_PLANE);
    proj.setInputCloud(cloud);
    proj.setModelCoefficients(coefficients);
    proj.filter(*cloud_projected);

    std::cerr << "Cloud after projection: " << std::endl;
    for (size_t i = 0; i < cloud_projected->points.size(); ++i)
        std::cerr << "    " << cloud_projected->points[i].x << " "
        << cloud_projected->points[i].y << " "
        << cloud_projected->points[i].z << std::endl;

    system("pause");
    return (0);
}

Run the following result, the configuration is complete.

 

Guess you like

Origin www.cnblogs.com/sunrise-to-set/p/11494133.html