vs2022配置pcl1.13.1

news2024/11/28 1:48:40

下载

下载PCL预编译安装程序PCL-1.13.1-AllInOne-msvc2022-win64.exe

和要安装的PCL组件(例如pcl-1.13.1-pdb-msvc2022-win64.zip)

安装

双击 PCL-1.13.1-AllInOne-msvc2022-win64.exe进行安装。到图1的步骤时,选择第二项。

网上找的图
图1

下一步, 安装路径可以自行修改(我的安装路径D:\PCL 1.13.1),之后点击安装即可。

一段时间之后,会弹出来一个OpenNI2的安装窗口,此时将OpenNI2放在3rdparty文件夹里,即D:\PCL 1.13.1\3rdParty\OpenNI2。由于点云在安装的过程中会把所有的第三方库全部安装在点云安装目录下的3rdparty文件夹里。因此,为了保持文件夹的整洁,把OpenNI2放在3rdparty文件夹里。

 如果3rdParty文件夹下的OpenNI2内容为空,可以将其移除:在PCL安装路径下的3rdParty/OpenNI2文件夹内可以看到安装包OpenNI-Windows-x64-2.2.msi,双击运行,选择Remove移除安装再重新安装即可。

配置PDB文件

将下载得到的压缩包pcl-1.13.1-pdb-msvc2022-win64.zip解压缩后将里面的文件复制到PCL安装目录下bin文件夹

至此点云库安装完成,安装目录和3rdparty文件夹如下表所示:

 配置环境变量

首先确认OpenNI2的环境变量是否设置正确

 然后打开Path,添加如下

%OPENNI2_REDIST64%
%OPENNI2_LIB64%
%OPENNI2_INCLUDE64%

VS 环境配置

创建项目

新建一个控制台应用(目录可以放在pcl的安装路径下),建立一个项目属性表(目的:以后新建一个PCL项目文件直接调用配置好的属性表,一劳永逸)

 

之后新建项目时就可以加载配置好的属性表

 

 配置包含目录

打开属性表,配置VC++目录中的包含目录。在配置 PCL 包含目录路径时,连接符应该使用分号(;),注意路径之间不要有空格,并且最后一个路径不需要加分号。

D:\PCL 1.13.1\3rdParty\Boost\include\boost-1_82;D:\PCL 1.13.1\3rdParty\Eigen\eigen3;D:\PCL 1.13.1\3rdParty\FLANN\include;D:\PCL 1.13.1\3rdParty\OpenNI2\Include;D:\PCL 1.13.1\3rdParty\Qhull\include;D:\PCL 1.13.1\3rdParty\VTK\include\vtk-9.2;D:\PCL 1.13.1\include\pcl-1.13

 配置库目录

D:\PCL 1.13.1\3rdParty\Boost\lib;D:\PCL 1.13.1\3rdParty\FLANN\lib;D:\PCL 1.13.1\3rdParty\OpenNI2\Lib;D:\PCL 1.13.1\3rdParty\Qhull\lib;D:\PCL 1.13.1\3rdParty\VTK\lib;D:\PCL 1.13.1\lib

 配置预处理器

_DEBUG
_CONSOLE
_CRT_SECURE_NO_WARNINGS
BOOST_USE_WINDOWS_H
NOMINMAX
_CRT_SECURE_NO_DEPRECATE

 附加依赖项配置

需要对Boost(92)、VTK(284)、PCL(40)几个文件夹内lib文件夹内的.lib文件进行提取。Debug是 **d.lib 类型,Release是 *.lib 类型。

提取Boost和VTK中的.lib文件可以用下面的代码(修改对应的路径、保存的文件名即可)

 

import os

# 设置 Boost lib 文件夹路径和要输出的文本文件名
gd_output_file = "Boost_debug_libs.txt"
non_gd_output_file = "Boost_release_libs.txt"


def Extract_lib(boost_lib_path):
    # 获取 Boost lib 文件夹下的所有 .lib 文件名
    all_lib_files = [file for file in os.listdir(boost_lib_path) if file.endswith('.lib')]

    # 分别筛选包含和不包含 "-gd" 的文件名,并输出到不同的文本文件中
    gd_lib_files = [file for file in all_lib_files if '-gd' in file]
    with open(os.path.join(boost_lib_path, gd_output_file), 'w') as outfile:
        for gd_file in gd_lib_files:
            outfile.write(gd_file + '\n')

    non_gd_lib_files = [file for file in all_lib_files if '-gd' not in file]
    with open(os.path.join(boost_lib_path, non_gd_output_file), 'w') as outfile:
        for non_gd_file in non_gd_lib_files:
            outfile.write(non_gd_file + '\n')


if __name__ == '__main__':
    path = r"D:\PCL 1.13.1\3rdParty\Boost\lib"
    Extract_lib(path)
import os

# 设置 Boost lib 文件夹路径和要输出的文本文件名
gd_output_file = "VTK_debug_libs.txt"
non_gd_output_file = "VTK_release_libs.txt"


def Extract_lib(boost_lib_path):
    # 获取 Boost lib 文件夹下的所有 .lib 文件名
    all_lib_files = [file for file in os.listdir(boost_lib_path) if file.endswith('.lib')]

    # 分别筛选包含和不包含 "-gd" 的文件名,并输出到不同的文本文件中
    gd_lib_files = [file for file in all_lib_files if '-gd' in file]
    with open(os.path.join(boost_lib_path, gd_output_file), 'w') as outfile:
        for gd_file in gd_lib_files:
            outfile.write(gd_file + '\n')

    non_gd_lib_files = [file for file in all_lib_files if '-gd' not in file]
    with open(os.path.join(boost_lib_path, non_gd_output_file), 'w') as outfile:
        for non_gd_file in non_gd_lib_files:
            outfile.write(non_gd_file + '\n')


if __name__ == '__main__':
    path = r"D:\PCL 1.13.1\3rdParty\VTK\lib"
    Extract_lib(path)

 提取pcl安装路径下lib文件夹内的.lib文件

import os

# 设置 Boost lib 文件夹路径和要输出的文本文件名
gd_output_file = "pcl_debug_libs.txt"
non_gd_output_file = "pcl_release_libs.txt"


def Extract_lib(boost_lib_path):
    # 获取 Boost lib 文件夹下的所有 .lib 文件名
    all_lib_files = [file for file in os.listdir(boost_lib_path) if file.endswith('.lib')]

    # 分别筛选包含和不包含 "-gd" 的文件名,并输出到不同的文本文件中
    gd_lib_files = [file for file in all_lib_files if 'd.lib' in file]
    with open(os.path.join(boost_lib_path, gd_output_file), 'w') as outfile:
        for gd_file in gd_lib_files:
            outfile.write(gd_file + '\n')

    non_gd_lib_files = [file for file in all_lib_files if 'd.lib' not in file]
    with open(os.path.join(boost_lib_path, non_gd_output_file), 'w') as outfile:
        for non_gd_file in non_gd_lib_files:
            outfile.write(non_gd_file + '\n')


if __name__ == '__main__':
    path = r"D:\PCL 1.13.1\lib"
    Extract_lib(path)

提取FLANN(8)和Qhull(8)

import os

# 设置 Boost lib 文件夹路径和要输出的文本文件名
gd_output_file = "FLANN_debug_libs.txt"
non_gd_output_file = "FLANN_release_libs.txt"


def Extract_lib(boost_lib_path):
    # 获取 Boost lib 文件夹下的所有 .lib 文件名
    all_lib_files = [file for file in os.listdir(boost_lib_path) if file.endswith('.lib')]

    # 分别筛选包含和不包含 "-gd" 的文件名,并输出到不同的文本文件中
    gd_lib_files = [file for file in all_lib_files if '-gd' in file]
    with open(os.path.join(boost_lib_path, gd_output_file), 'w') as outfile:
        for gd_file in gd_lib_files:
            outfile.write(gd_file + '\n')

    non_gd_lib_files = [file for file in all_lib_files if '-gd' not in file]
    with open(os.path.join(boost_lib_path, non_gd_output_file), 'w') as outfile:
        for non_gd_file in non_gd_lib_files:
            outfile.write(non_gd_file + '\n')


if __name__ == '__main__':
    path = r"D:\PCL 1.13.1\3rdParty\FLANN\lib"
    Extract_lib(path)
import os

# 设置 Boost lib 文件夹路径和要输出的文本文件名
gd_output_file = "Qhull_debug_libs.txt"
non_gd_output_file = "Qhull_release_libs.txt"


def Extract_lib(boost_lib_path):
    # 获取 Boost lib 文件夹下的所有 .lib 文件名
    all_lib_files = [file for file in os.listdir(boost_lib_path) if file.endswith('.lib')]

    # 分别筛选包含和不包含 "-gd" 的文件名,并输出到不同的文本文件中
    gd_lib_files = [file for file in all_lib_files if 'd.lib' in file]
    with open(os.path.join(boost_lib_path, gd_output_file), 'w') as outfile:
        for gd_file in gd_lib_files:
            outfile.write(gd_file + '\n')

    non_gd_lib_files = [file for file in all_lib_files if 'd.lib' not in file]
    with open(os.path.join(boost_lib_path, non_gd_output_file), 'w') as outfile:
        for non_gd_file in non_gd_lib_files:
            outfile.write(non_gd_file + '\n')


if __name__ == '__main__':
    path = r"D:\PCL 1.13.1\3rdParty\Qhull\lib"
    Extract_lib(path)

 

libboost_atomic-vc143-mt-gd-x64-1_82.lib
libboost_bzip2-vc143-mt-gd-x64-1_82.lib
libboost_chrono-vc143-mt-gd-x64-1_82.lib
libboost_container-vc143-mt-gd-x64-1_82.lib
libboost_context-vc143-mt-gd-x64-1_82.lib
libboost_contract-vc143-mt-gd-x64-1_82.lib
libboost_coroutine-vc143-mt-gd-x64-1_82.lib
libboost_date_time-vc143-mt-gd-x64-1_82.lib
libboost_exception-vc143-mt-gd-x64-1_82.lib
libboost_fiber-vc143-mt-gd-x64-1_82.lib
libboost_filesystem-vc143-mt-gd-x64-1_82.lib
libboost_graph-vc143-mt-gd-x64-1_82.lib
libboost_graph_parallel-vc143-mt-gd-x64-1_82.lib
libboost_iostreams-vc143-mt-gd-x64-1_82.lib
libboost_json-vc143-mt-gd-x64-1_82.lib
libboost_locale-vc143-mt-gd-x64-1_82.lib
libboost_log-vc143-mt-gd-x64-1_82.lib
libboost_log_setup-vc143-mt-gd-x64-1_82.lib
libboost_math_c99-vc143-mt-gd-x64-1_82.lib
libboost_math_c99f-vc143-mt-gd-x64-1_82.lib
libboost_math_c99l-vc143-mt-gd-x64-1_82.lib
libboost_math_tr1-vc143-mt-gd-x64-1_82.lib
libboost_math_tr1f-vc143-mt-gd-x64-1_82.lib
libboost_math_tr1l-vc143-mt-gd-x64-1_82.lib
libboost_mpi-vc143-mt-gd-x64-1_82.lib
libboost_nowide-vc143-mt-gd-x64-1_82.lib
libboost_numpy310-vc143-mt-gd-x64-1_82.lib
libboost_prg_exec_monitor-vc143-mt-gd-x64-1_82.lib
libboost_program_options-vc143-mt-gd-x64-1_82.lib
libboost_python310-vc143-mt-gd-x64-1_82.lib
libboost_random-vc143-mt-gd-x64-1_82.lib
libboost_regex-vc143-mt-gd-x64-1_82.lib
libboost_serialization-vc143-mt-gd-x64-1_82.lib
libboost_stacktrace_noop-vc143-mt-gd-x64-1_82.lib
libboost_stacktrace_windbg-vc143-mt-gd-x64-1_82.lib
libboost_stacktrace_windbg_cached-vc143-mt-gd-x64-1_82.lib
libboost_system-vc143-mt-gd-x64-1_82.lib
libboost_test_exec_monitor-vc143-mt-gd-x64-1_82.lib
libboost_thread-vc143-mt-gd-x64-1_82.lib
libboost_timer-vc143-mt-gd-x64-1_82.lib
libboost_type_erasure-vc143-mt-gd-x64-1_82.lib
libboost_unit_test_framework-vc143-mt-gd-x64-1_82.lib
libboost_url-vc143-mt-gd-x64-1_82.lib
libboost_wave-vc143-mt-gd-x64-1_82.lib
libboost_wserialization-vc143-mt-gd-x64-1_82.lib
libboost_zlib-vc143-mt-gd-x64-1_82.lib
flann-gd.lib
flann_cpp-gd.lib
flann_cpp_s-gd.lib
flann_s-gd.lib
pcl_commond.lib
pcl_featuresd.lib
pcl_filtersd.lib
pcl_iod.lib
pcl_io_plyd.lib
pcl_kdtreed.lib
pcl_keypointsd.lib
pcl_mld.lib
pcl_octreed.lib
pcl_outofcored.lib
pcl_peopled.lib
pcl_recognitiond.lib
pcl_registrationd.lib
pcl_sample_consensusd.lib
pcl_searchd.lib
pcl_segmentationd.lib
pcl_stereod.lib
pcl_surfaced.lib
pcl_trackingd.lib
pcl_visualizationd.lib
qhullcpp_d.lib
qhullstatic_d.lib
qhullstatic_rd.lib
qhull_rd.lib
vtkcgns-9.2-gd.lib
vtkChartsCore-9.2-gd.lib
vtkCommonColor-9.2-gd.lib
vtkCommonComputationalGeometry-9.2-gd.lib
vtkCommonCore-9.2-gd.lib
vtkCommonDataModel-9.2-gd.lib
vtkCommonExecutionModel-9.2-gd.lib
vtkCommonMath-9.2-gd.lib
vtkCommonMisc-9.2-gd.lib
vtkCommonSystem-9.2-gd.lib
vtkCommonTransforms-9.2-gd.lib
vtkDICOMParser-9.2-gd.lib
vtkDomainsChemistry-9.2-gd.lib
vtkDomainsChemistryOpenGL2-9.2-gd.lib
vtkdoubleconversion-9.2-gd.lib
vtkexodusII-9.2-gd.lib
vtkexpat-9.2-gd.lib
vtkFiltersAMR-9.2-gd.lib
vtkFiltersCore-9.2-gd.lib
vtkFiltersExtraction-9.2-gd.lib
vtkFiltersFlowPaths-9.2-gd.lib
vtkFiltersGeneral-9.2-gd.lib
vtkFiltersGeneric-9.2-gd.lib
vtkFiltersGeometry-9.2-gd.lib
vtkFiltersHybrid-9.2-gd.lib
vtkFiltersHyperTree-9.2-gd.lib
vtkFiltersImaging-9.2-gd.lib
vtkFiltersModeling-9.2-gd.lib
vtkFiltersParallel-9.2-gd.lib
vtkFiltersParallelImaging-9.2-gd.lib
vtkFiltersPoints-9.2-gd.lib
vtkFiltersProgrammable-9.2-gd.lib
vtkFiltersSelection-9.2-gd.lib
vtkFiltersSMP-9.2-gd.lib
vtkFiltersSources-9.2-gd.lib
vtkFiltersStatistics-9.2-gd.lib
vtkFiltersTexture-9.2-gd.lib
vtkFiltersTopology-9.2-gd.lib
vtkFiltersVerdict-9.2-gd.lib
vtkfmt-9.2-gd.lib
vtkfreetype-9.2-gd.lib
vtkGeovisCore-9.2-gd.lib
vtkgl2ps-9.2-gd.lib
vtkglew-9.2-gd.lib
vtkhdf5-9.2-gd.lib
vtkhdf5_hl-9.2-gd.lib
vtkImagingColor-9.2-gd.lib
vtkImagingCore-9.2-gd.lib
vtkImagingFourier-9.2-gd.lib
vtkImagingGeneral-9.2-gd.lib
vtkImagingHybrid-9.2-gd.lib
vtkImagingMath-9.2-gd.lib
vtkImagingMorphological-9.2-gd.lib
vtkImagingSources-9.2-gd.lib
vtkImagingStatistics-9.2-gd.lib
vtkImagingStencil-9.2-gd.lib
vtkInfovisCore-9.2-gd.lib
vtkInfovisLayout-9.2-gd.lib
vtkInteractionImage-9.2-gd.lib
vtkInteractionStyle-9.2-gd.lib
vtkInteractionWidgets-9.2-gd.lib
vtkIOAMR-9.2-gd.lib
vtkIOAsynchronous-9.2-gd.lib
vtkIOCesium3DTiles-9.2-gd.lib
vtkIOCGNSReader-9.2-gd.lib
vtkIOChemistry-9.2-gd.lib
vtkIOCityGML-9.2-gd.lib
vtkIOCONVERGECFD-9.2-gd.lib
vtkIOCore-9.2-gd.lib
vtkIOEnSight-9.2-gd.lib
vtkIOExodus-9.2-gd.lib
vtkIOExport-9.2-gd.lib
vtkIOExportGL2PS-9.2-gd.lib
vtkIOExportPDF-9.2-gd.lib
vtkIOGeometry-9.2-gd.lib
vtkIOHDF-9.2-gd.lib
vtkIOImage-9.2-gd.lib
vtkIOImport-9.2-gd.lib
vtkIOInfovis-9.2-gd.lib
vtkIOIOSS-9.2-gd.lib
vtkIOLegacy-9.2-gd.lib
vtkIOLSDyna-9.2-gd.lib
vtkIOMINC-9.2-gd.lib
vtkIOMotionFX-9.2-gd.lib
vtkIOMovie-9.2-gd.lib
vtkIONetCDF-9.2-gd.lib
vtkIOOggTheora-9.2-gd.lib
vtkIOParallel-9.2-gd.lib
vtkIOParallelXML-9.2-gd.lib
vtkIOPLY-9.2-gd.lib
vtkIOSegY-9.2-gd.lib
vtkIOSQL-9.2-gd.lib
vtkioss-9.2-gd.lib
vtkIOTecplotTable-9.2-gd.lib
vtkIOVeraOut-9.2-gd.lib
vtkIOVideo-9.2-gd.lib
vtkIOXML-9.2-gd.lib
vtkIOXMLParser-9.2-gd.lib
vtkjpeg-9.2-gd.lib
vtkjsoncpp-9.2-gd.lib
vtkkissfft-9.2-gd.lib
vtklibharu-9.2-gd.lib
vtklibproj-9.2-gd.lib
vtklibxml2-9.2-gd.lib
vtkloguru-9.2-gd.lib
vtklz4-9.2-gd.lib
vtklzma-9.2-gd.lib
vtkmetaio-9.2-gd.lib
vtknetcdf-9.2-gd.lib
vtkogg-9.2-gd.lib
vtkParallelCore-9.2-gd.lib
vtkParallelDIY-9.2-gd.lib
vtkpng-9.2-gd.lib
vtkpugixml-9.2-gd.lib
vtkRenderingAnnotation-9.2-gd.lib
vtkRenderingContext2D-9.2-gd.lib
vtkRenderingContextOpenGL2-9.2-gd.lib
vtkRenderingCore-9.2-gd.lib
vtkRenderingFreeType-9.2-gd.lib
vtkRenderingGL2PSOpenGL2-9.2-gd.lib
vtkRenderingHyperTreeGrid-9.2-gd.lib
vtkRenderingImage-9.2-gd.lib
vtkRenderingLabel-9.2-gd.lib
vtkRenderingLICOpenGL2-9.2-gd.lib
vtkRenderingLOD-9.2-gd.lib
vtkRenderingOpenGL2-9.2-gd.lib
vtkRenderingSceneGraph-9.2-gd.lib
vtkRenderingUI-9.2-gd.lib
vtkRenderingVolume-9.2-gd.lib
vtkRenderingVolumeOpenGL2-9.2-gd.lib
vtkRenderingVtkJS-9.2-gd.lib
vtksqlite-9.2-gd.lib
vtksys-9.2-gd.lib
vtkTestingRendering-9.2-gd.lib
vtktheora-9.2-gd.lib
vtktiff-9.2-gd.lib
vtkverdict-9.2-gd.lib
vtkViewsContext2D-9.2-gd.lib
vtkViewsCore-9.2-gd.lib
vtkViewsInfovis-9.2-gd.lib
vtkWrappingTools-9.2-gd.lib
vtkzlib-9.2-gd.lib
OpenNI2.lib

保存属性表 

 之后可以通过添加现有属性表找到保存的属性添加就行

releas

libboost_atomic-vc143-mt-x64-1_82.lib
libboost_bzip2-vc143-mt-x64-1_82.lib
libboost_chrono-vc143-mt-x64-1_82.lib
libboost_container-vc143-mt-x64-1_82.lib
libboost_context-vc143-mt-x64-1_82.lib
libboost_contract-vc143-mt-x64-1_82.lib
libboost_coroutine-vc143-mt-x64-1_82.lib
libboost_date_time-vc143-mt-x64-1_82.lib
libboost_exception-vc143-mt-x64-1_82.lib
libboost_fiber-vc143-mt-x64-1_82.lib
libboost_filesystem-vc143-mt-x64-1_82.lib
libboost_graph-vc143-mt-x64-1_82.lib
libboost_graph_parallel-vc143-mt-x64-1_82.lib
libboost_iostreams-vc143-mt-x64-1_82.lib
libboost_json-vc143-mt-x64-1_82.lib
libboost_locale-vc143-mt-x64-1_82.lib
libboost_log-vc143-mt-x64-1_82.lib
libboost_log_setup-vc143-mt-x64-1_82.lib
libboost_math_c99-vc143-mt-x64-1_82.lib
libboost_math_c99f-vc143-mt-x64-1_82.lib
libboost_math_c99l-vc143-mt-x64-1_82.lib
libboost_math_tr1-vc143-mt-x64-1_82.lib
libboost_math_tr1f-vc143-mt-x64-1_82.lib
libboost_math_tr1l-vc143-mt-x64-1_82.lib
libboost_mpi-vc143-mt-x64-1_82.lib
libboost_nowide-vc143-mt-x64-1_82.lib
libboost_numpy310-vc143-mt-x64-1_82.lib
libboost_prg_exec_monitor-vc143-mt-x64-1_82.lib
libboost_program_options-vc143-mt-x64-1_82.lib
libboost_python310-vc143-mt-x64-1_82.lib
libboost_random-vc143-mt-x64-1_82.lib
libboost_regex-vc143-mt-x64-1_82.lib
libboost_serialization-vc143-mt-x64-1_82.lib
libboost_stacktrace_noop-vc143-mt-x64-1_82.lib
libboost_stacktrace_windbg-vc143-mt-x64-1_82.lib
libboost_stacktrace_windbg_cached-vc143-mt-x64-1_82.lib
libboost_system-vc143-mt-x64-1_82.lib
libboost_test_exec_monitor-vc143-mt-x64-1_82.lib
libboost_thread-vc143-mt-x64-1_82.lib
libboost_timer-vc143-mt-x64-1_82.lib
libboost_type_erasure-vc143-mt-x64-1_82.lib
libboost_unit_test_framework-vc143-mt-x64-1_82.lib
libboost_url-vc143-mt-x64-1_82.lib
libboost_wave-vc143-mt-x64-1_82.lib
libboost_wserialization-vc143-mt-x64-1_82.lib
libboost_zlib-vc143-mt-x64-1_82.lib
flann.lib
flann_cpp.lib
flann_cpp_s.lib
flann_s.lib
pcl_common.lib
pcl_features.lib
pcl_filters.lib
pcl_io.lib
pcl_io_ply.lib
pcl_kdtree.lib
pcl_keypoints.lib
pcl_ml.lib
pcl_octree.lib
pcl_outofcore.lib
pcl_people.lib
pcl_recognition.lib
pcl_registration.lib
pcl_sample_consensus.lib
pcl_search.lib
pcl_segmentation.lib
pcl_stereo.lib
pcl_surface.lib
pcl_tracking.lib
pcl_visualization.lib
qhullcpp.lib
qhullstatic.lib
qhullstatic_r.lib
qhull_r.lib
vtkcgns-9.2.lib
vtkChartsCore-9.2.lib
vtkCommonColor-9.2.lib
vtkCommonComputationalGeometry-9.2.lib
vtkCommonCore-9.2.lib
vtkCommonDataModel-9.2.lib
vtkCommonExecutionModel-9.2.lib
vtkCommonMath-9.2.lib
vtkCommonMisc-9.2.lib
vtkCommonSystem-9.2.lib
vtkCommonTransforms-9.2.lib
vtkDICOMParser-9.2.lib
vtkDomainsChemistry-9.2.lib
vtkDomainsChemistryOpenGL2-9.2.lib
vtkdoubleconversion-9.2.lib
vtkexodusII-9.2.lib
vtkexpat-9.2.lib
vtkFiltersAMR-9.2.lib
vtkFiltersCore-9.2.lib
vtkFiltersExtraction-9.2.lib
vtkFiltersFlowPaths-9.2.lib
vtkFiltersGeneral-9.2.lib
vtkFiltersGeneric-9.2.lib
vtkFiltersGeometry-9.2.lib
vtkFiltersHybrid-9.2.lib
vtkFiltersHyperTree-9.2.lib
vtkFiltersImaging-9.2.lib
vtkFiltersModeling-9.2.lib
vtkFiltersParallel-9.2.lib
vtkFiltersParallelImaging-9.2.lib
vtkFiltersPoints-9.2.lib
vtkFiltersProgrammable-9.2.lib
vtkFiltersSelection-9.2.lib
vtkFiltersSMP-9.2.lib
vtkFiltersSources-9.2.lib
vtkFiltersStatistics-9.2.lib
vtkFiltersTexture-9.2.lib
vtkFiltersTopology-9.2.lib
vtkFiltersVerdict-9.2.lib
vtkfmt-9.2.lib
vtkfreetype-9.2.lib
vtkGeovisCore-9.2.lib
vtkgl2ps-9.2.lib
vtkglew-9.2.lib
vtkhdf5-9.2.lib
vtkhdf5_hl-9.2.lib
vtkImagingColor-9.2.lib
vtkImagingCore-9.2.lib
vtkImagingFourier-9.2.lib
vtkImagingGeneral-9.2.lib
vtkImagingHybrid-9.2.lib
vtkImagingMath-9.2.lib
vtkImagingMorphological-9.2.lib
vtkImagingSources-9.2.lib
vtkImagingStatistics-9.2.lib
vtkImagingStencil-9.2.lib
vtkInfovisCore-9.2.lib
vtkInfovisLayout-9.2.lib
vtkInteractionImage-9.2.lib
vtkInteractionStyle-9.2.lib
vtkInteractionWidgets-9.2.lib
vtkIOAMR-9.2.lib
vtkIOAsynchronous-9.2.lib
vtkIOCesium3DTiles-9.2.lib
vtkIOCGNSReader-9.2.lib
vtkIOChemistry-9.2.lib
vtkIOCityGML-9.2.lib
vtkIOCONVERGECFD-9.2.lib
vtkIOCore-9.2.lib
vtkIOEnSight-9.2.lib
vtkIOExodus-9.2.lib
vtkIOExport-9.2.lib
vtkIOExportGL2PS-9.2.lib
vtkIOExportPDF-9.2.lib
vtkIOGeometry-9.2.lib
vtkIOHDF-9.2.lib
vtkIOImage-9.2.lib
vtkIOImport-9.2.lib
vtkIOInfovis-9.2.lib
vtkIOIOSS-9.2.lib
vtkIOLegacy-9.2.lib
vtkIOLSDyna-9.2.lib
vtkIOMINC-9.2.lib
vtkIOMotionFX-9.2.lib
vtkIOMovie-9.2.lib
vtkIONetCDF-9.2.lib
vtkIOOggTheora-9.2.lib
vtkIOParallel-9.2.lib
vtkIOParallelXML-9.2.lib
vtkIOPLY-9.2.lib
vtkIOSegY-9.2.lib
vtkIOSQL-9.2.lib
vtkioss-9.2.lib
vtkIOTecplotTable-9.2.lib
vtkIOVeraOut-9.2.lib
vtkIOVideo-9.2.lib
vtkIOXML-9.2.lib
vtkIOXMLParser-9.2.lib
vtkjpeg-9.2.lib
vtkjsoncpp-9.2.lib
vtkkissfft-9.2.lib
vtklibharu-9.2.lib
vtklibproj-9.2.lib
vtklibxml2-9.2.lib
vtkloguru-9.2.lib
vtklz4-9.2.lib
vtklzma-9.2.lib
vtkmetaio-9.2.lib
vtknetcdf-9.2.lib
vtkogg-9.2.lib
vtkParallelCore-9.2.lib
vtkParallelDIY-9.2.lib
vtkpng-9.2.lib
vtkpugixml-9.2.lib
vtkRenderingAnnotation-9.2.lib
vtkRenderingContext2D-9.2.lib
vtkRenderingContextOpenGL2-9.2.lib
vtkRenderingCore-9.2.lib
vtkRenderingFreeType-9.2.lib
vtkRenderingGL2PSOpenGL2-9.2.lib
vtkRenderingHyperTreeGrid-9.2.lib
vtkRenderingImage-9.2.lib
vtkRenderingLabel-9.2.lib
vtkRenderingLICOpenGL2-9.2.lib
vtkRenderingLOD-9.2.lib
vtkRenderingOpenGL2-9.2.lib
vtkRenderingSceneGraph-9.2.lib
vtkRenderingUI-9.2.lib
vtkRenderingVolume-9.2.lib
vtkRenderingVolumeOpenGL2-9.2.lib
vtkRenderingVtkJS-9.2.lib
vtksqlite-9.2.lib
vtksys-9.2.lib
vtkTestingRendering-9.2.lib
vtktheora-9.2.lib
vtktiff-9.2.lib
vtkverdict-9.2.lib
vtkViewsContext2D-9.2.lib
vtkViewsCore-9.2.lib
vtkViewsInfovis-9.2.lib
vtkWrappingTools-9.2.lib
vtkzlib-9.2.lib
OpenNI2.lib

测试

#include <iostream>
#include <vector>
#include <ctime>
#include <pcl/point_cloud.h>
#include <pcl/octree/octree.h>
#include <boost/thread/thread.hpp>
#include <pcl/visualization/pcl_visualizer.h>
using namespace std;


int main(int argc, char** argv)
{
	srand((unsigned int)time(NULL));
	pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>);
	// 创建点云数据
	cloud->width = 1000;
	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.0f * rand() / (RAND_MAX + 1.0f);
		cloud->points[i].y = 1024.0f * rand() / (RAND_MAX + 1.0f);
		cloud->points[i].z = 1024.0f * rand() / (RAND_MAX + 1.0f);
	}

	pcl::octree::OctreePointCloudSearch<pcl::PointXYZ> octree(0.1);
	octree.setInputCloud(cloud);
	octree.addPointsFromInputCloud();
	pcl::PointXYZ searchPoint;
	searchPoint.x = 1024.0f * rand() / (RAND_MAX + 1.0f);
	searchPoint.y = 1024.0f * rand() / (RAND_MAX + 1.0f);
	searchPoint.z = 1024.0f * rand() / (RAND_MAX + 1.0f);

	//半径内近邻搜索
	vector<int>pointIdxRadiusSearch;
	vector<float>pointRadiusSquaredDistance;
	float radius = 256.0f * rand() / (RAND_MAX + 1.0f);
	cout << "Neighbors within radius search at (" << searchPoint.x
		<< " " << searchPoint.y
		<< " " << searchPoint.z
		<< ") with radius=" << radius << endl;
	if (octree.radiusSearch(searchPoint, radius, pointIdxRadiusSearch, pointRadiusSquaredDistance) > 0)
	{
		for (size_t i = 0; i < pointIdxRadiusSearch.size(); ++i)
			cout << "    " << cloud->points[pointIdxRadiusSearch[i]].x
			<< " " << cloud->points[pointIdxRadiusSearch[i]].y
			<< " " << cloud->points[pointIdxRadiusSearch[i]].z
			<< " (squared distance: " << pointRadiusSquaredDistance[i] << ")" << endl;
	}
	// 初始化点云可视化对象
	boost::shared_ptr<pcl::visualization::PCLVisualizer>viewer(new pcl::visualization::PCLVisualizer("Display Point Cloud"));
	viewer->setBackgroundColor(255, 245, 238);  //设置背景颜色为黑色
	// 对点云着色可视化 (red).
	pcl::visualization::PointCloudColorHandlerCustom<pcl::PointXYZ>target_color(cloud, 255, 0, 0);
	viewer->addPointCloud<pcl::PointXYZ>(cloud, target_color, "target cloud");
	viewer->setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 1, "target cloud");

	// 等待直到可视化窗口关闭
	while (!viewer->wasStopped())
	{
		viewer->spinOnce(100);
		boost::this_thread::sleep(boost::posix_time::microseconds(1000));
	}

	return (0);
}

#include <iostream>
#include <pcl/common/common_headers.h>
#include <pcl/io/pcd_io.h>
#include <pcl/visualization/pcl_visualizer.h>
#include <pcl/visualization/cloud_viewer.h>
#include <pcl/console/parse.h>


int main(int argc, char** argv) {
    std::cout << "Test PCL !!!" << std::endl;

    pcl::PointCloud<pcl::PointXYZRGB>::Ptr point_cloud_ptr(new pcl::PointCloud<pcl::PointXYZRGB>);
    uint8_t r(255), g(15), b(15);
    for (float z(-1.0); z <= 1.0; z += 0.05)
    {
        for (float angle(0.0); angle <= 360.0; angle += 5.0)
        {
            pcl::PointXYZRGB point;
            point.x = 0.5 * cosf(pcl::deg2rad(angle));
            point.y = sinf(pcl::deg2rad(angle));
            point.z = z;
            uint32_t rgb = (static_cast<uint32_t>(r) << 16 |
                static_cast<uint32_t>(g) << 8 | static_cast<uint32_t>(b));
            point.rgb = *reinterpret_cast<float*>(&rgb);
            point_cloud_ptr->points.push_back(point);
        }
        if (z < 0.0)
        {
            r -= 12;
            g += 12;
        }
        else
        {
            g -= 12;
            b += 12;
        }
    }
    point_cloud_ptr->width = (int)point_cloud_ptr->points.size();
    point_cloud_ptr->height = 1;

    pcl::visualization::CloudViewer viewer("test");
    viewer.showCloud(point_cloud_ptr);
    while (!viewer.wasStopped()) {};
    return 0;
}

 

参考:Win10 系统下VisualStudio2022 配置点云库 PCL 1.13.0

           Windows11+VS2022+PCL1.13.0 安装配置记录

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/620616.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

串口助手(布局,图标,串口号,隐藏界面,显示实时时间)

文章目录 前言一、串口助手布局二、设置软件的标题&#xff0c;图标三、显示可用串口号四、隐藏&#xff0c;显示面板五、显示实时时间总结 前言 从这篇文章开始 教大家自己制作一个串口助手软件&#xff0c;并实现基本的功能。学做一个 串口助手可以一边回顾复习 QT 的相关知…

《面试1v1》G1垃圾回收器

我是 javapub&#xff0c;一名 Markdown 程序员从&#x1f468;‍&#x1f4bb;&#xff0c;八股文种子选手。 《面试1v1》 连载中… 面试官&#xff1a; G1垃圾收集器?听说很牛逼的样子! 候选人&#xff1a; 是的,G1是JDK9默认的垃圾收集器,代替了CMS收集器。它的目标是达到…

4.运算符|Java学习笔记

文章目录 运算符介绍算术运算符关系运算符&#xff08;比较运算符&#xff09;逻辑运算符赋值运算符三元运算符位运算符 运算符优先级Java命名规范关键字保留字 进制十进制转&#xff08;二/八/十六进制&#xff09;原码、反码、补码 运算符介绍 运算符是一种特殊的符号&#…

【Linux】认识Linux下的编译器gcc/g++ | 认识动静态库

本文思维导图&#xff1a; 文章目录 前言tips: 关于前两篇文章所提到的sudo指令 一、gcc/g编译器的认识和使用tips 1.预处理2. 编译3.汇编4.链接关于预编译&#xff0c;编译&#xff0c;汇编阶段的指令记忆方法 二、gcc/g指令汇总三、认识动静态库1.库的认知库的命名规则静态库…

C++ ---- 继承

目录 继承概念及定义 继承概念 继承定义 语法 继承关系和访问限定符 继承基类成员访问方式的变化 规律总结 以公有继承为例测试 基类和派生类对象赋值转换 继承中的作用域 派生类的默认成员函数 构造函数 析构函数 拷贝构造 赋值重载 继承与友元 继承与静态成员…

ESP8266调用NTP服务器进行时间校准

一、背景知识 【1】什么是NTP服务器&#xff1f; NTP是网络时间协议&#xff08;Network Time Protocol&#xff0c;简称NTP&#xff09;&#xff0c;是一种用于同步计算机时间的协议。NTP服务器指的是提供NTP服务的计算机或设备。NTP服务器的主要功能是保证网络上的所有设备…

Linux下信号量使用总结

目录 1.Linux下信号量简介 2.POSIX信号量 2.1 无名信号量 2.2 有名信号量 3.System V信号量 1.Linux下信号量简介 信号量是解决进程之间的同步与互斥的IPC机制&#xff0c;互斥与同步关系存在的症结在于临界资源。 临界资源是在同一个时刻只容许有限个&#xff08;一般只有…

ble系统知识介绍(较为完整,持续更新中)

BLE学习 现在网上关于BLE系统的学习资料实在是太少了&#xff0c;因此本文希望能够聚集一些资料能够系统的入门BLE,本文翻译自Bluetooth_LE_Primer_Paper,还有一些网上的一些资料,如果侵害到了某些作者的权益请及时联系我 参考资料和链接 Bluetooth_LE_Primer_Paper_3MtXws-zP…

GitOps 实践之渐进式发布

本文作者&#xff1a;陈钧桐 腾讯云 CODING DevOps 高级解决方案架构师&#xff0c;从事多年技术布道工作&#xff0c;对于云原生时代下企业数字化转型、IT 与 DevOps 建设、价值流体系搭建等有丰富的经验&#xff0c;曾为多家大型企业提供咨询、解决方案以及内训服务。既关注工…

【Python小技巧】加密又提速,把.py文件编译为.pyd文件(类似dll函数库),你值得拥有!

文章目录 前言一、常见的Python文件格式有哪些&#xff1f;二、准备编译环境1. 安装cython2. 安装Microsoft C 生成工具 三、编译.py文件为.pyd文件1. 编辑原始.py文件2. 准备setup.py文件3. 进行编译 四、测试总结 前言 Python的脚本文件是开源的&#xff0c;若直接发布&#…

i.MX RT1010跨界MCU上手体验(上)

由于项目需要性价比高一些的高性能MCU&#xff0c;了解到NXP的RT1010主频高达500MHZ的MCU&#xff0c;半个月以前已经拿到官方Demo板了&#xff0c;今天抽空上电体验下&#xff0c;在此记录。这颗芯片的优势是主频高&#xff0c;功能全&#xff0c;价格合理&#xff0c;但是需要…

第六章 方法区

文章目录 前言一、&#x1f6fa; 栈、堆、方法区的交互关系二、&#x1f68e; 方法区的理解1、方法区在哪里2、方法区的演变过程 三、&#x1f697; 设置方法区的大小与 OOM1、设置方法区内存的大小2、使用CGLib 让方法区OOM3、如何解决 OOM4、方法区的内部结构5、non-final 的…

利用提示工程优化软件架构:ChatGPT的应用

ChatGPT时代的软件架构全生命周期 简介 在如今日新月异的技术环境中&#xff0c;软件架构师必须不断地寻找和采纳新的工具和方法&#xff0c;以优化开发过程&#xff0c;提高效率&#xff0c;并保证最终产出的质量。其中&#xff0c;人工智能&#xff08;AI&#xff09;已经成…

《淘宝技术这十年》读书笔记

一. 分布式时代 在系统发展的过程中&#xff0c;架构师的眼光至关重要&#xff0c;作为程序员&#xff0c;只要把功能实现即可&#xff0c;但作为架构师&#xff0c;要考虑系统的扩展性、重用性&#xff0c;对于这种敏锐的感觉&#xff0c;有人说是一种“代码洁癖”。淘宝早期…

使用双屏时两个屏幕的色调、亮度不一样如何设置?

当使用双屏时&#xff0c;即使两个屏幕的型号一致也可能存在色差的问题&#xff08;色调不一致&#xff0c;亮度不一致&#xff09;&#xff0c;以下是解决此问题的方法。 Step1.同时按下两个屏幕下方的ok按钮 Step2.此时会进入显示器的OSD界面 Step3.通过按键切换菜单 Step4.…

节省35% MCU开发成本的红外智能洗手器运用方案,N9300-S16音乐芯片

随着全国人民生活水平的逐步提升以及近期疫情影响&#xff0c;公民的健康保护意识也越来越强&#xff0c;洗手液越来越被人们重视以及提倡&#xff0c;即时在受疫情影响是2022年洗手液市场规模也是上升至恐怖34亿元产值&#xff1b;而近年来自动感应洗手液器凭借实用性、便携性…

APP测试面试题快问快答(三)

11. App安装测试的主要内容有哪些&#xff1f; App是客户端程序&#xff0c;客户端程序就需要进行安装才能使用&#xff0c;因此需要测试安装、卸载、升级测试 关注点&#xff1a;正常场景、异常场景。 正常场景&#xff1a; 1. 在不同的操作系统上安装 2. 从不同的安装渠…

windows10安装ElasticSearch

一 安装 Java环境 ElasticSearch使用Java开发的&#xff0c;依赖Java环境&#xff0c;安装 ElasticSearch 之前&#xff0c;需要先安装一个较新版本的 Java&#xff0c;jdk 1.8版本太低了&#xff0c;需要安装jdk 11或更高版本。 Java安装方法请参考 Java 15环境安装 。 二 …

详解字典树原理,代码分析leetcode208. 实现 Trie (前缀树)

0、引言 本文介绍一种能够偶快速查找字符串的树形数据结构-----字典树。介绍其原理&#xff0c;以及通过leetcode208题目这个实例&#xff0c;用数组动手实现一棵字典树&#xff0c;并完成其增、查字符串、查字符串前缀的功能。 1、字典树的应用场景 询问一个单词b&#xff0c…

Mujoco 加载机器人模型(三)

目录 .1 简介 1.1 urdf概述 ​编辑 1.2 导出urdf为可用的xml​编辑 1.3 导出测试​编辑 .2 修改 2.1 添加平面和物体 2.2 关节修改 2.2.1 group 2.2.2 关节修改 2.2.3 关节 解压提供的ur5后 修改compiler的 meshdir路径 <mujoco model"ur5"><compi…