Open3D c++
时间: 2023-10-18 10:00:12 浏览: 123
Open3D:用于3D数据处理的现代库_C++_Python_下载.zip
Open3D是一个用于3D数据处理的现代化开源库,支持Python和C++。你可以在Open3D的官方网站上找到更多关于Open3D的信息。如果你想在C++中调用Open3D,你需要满足一些条件,包括安装Open3D的Git源代码、CMake版本大于等于3.20和Clang版本大于等于7。对于C++中的新工程,你可以参考下面的CMakeLists.txt示例,以适配之前的安装路径:
```
cmake_minimum_required(VERSION 3.20.1)
project(open3d_example)
set(CMAKE_BUILD_TYPE "Release")
set(CMAKE_CXX_FLAGS "-std=c++17")
set(Open3D_DIR ${HOME}/open3d_install/lib/cmake/Open3D)
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
# 查找Open3D
find_package(Open3D HINTS REQUIRED)
list(APPEND Open3D_LIBRARIES dl)
if (Open3D_FOUND)
message(STATUS "Found Open3D ${Open3D_VERSION}")
link_directories(${Open3D_LIBRARY_DIRS})
endif()
# 添加cpp文件
add_executable(open3d_test src/open3d_test.cpp)
target_link_libraries(open3d_test ${Open3D_LIBRARIES})
```
这样,你就可以在你的C++项目中使用Open3D了。希望对你有帮助!<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [Open3D c++配置(VS2019)](https://blog.csdn.net/m0_46611008/article/details/121417972)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [【Open3D】如何在CMake/C++中调用Open3D](https://blog.csdn.net/weixin_44044411/article/details/128687221)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文