프로그래밍/Open3D

Open3D C++, VS 2019 환경 설정 법

triplehoon 2023. 4. 4. 13:08

윈도우 운영체제에서 Open3d를 C++로 활용하려면 직접 소스에서 빌드를 해, Visual studio를 위한 솔루션을 만들어야한다.

 

일단, Git 하고 cmake-gui를 설치하자.

 

참고로 open3d 버전과 vs 버전은 어느정도 일치가 되어야한다. 

 

여기서 진행한 기준은 opend3d 0.11 + vs 2019+ 이다.

 

추가로 설치해야 할 것이 많다. open3d 버전에 알맞는 파이썬이 필요하다. 이 글에서는 python 3.7을 이용하였다.

 

 

일단, open3d를 깃헙에서 가져오자.

cmd 창에서 원하는 폴더로 이동후 다음과 같은 명령어를 친다.

 

git clone --recursive https://github.com/intel-isl/Open3D

 

 

다음과 같이 clone 이 완료되었으면, 3rd party 를 위한 서브모듈 업데이트를 진행해야한다.

 

git submodule update --init --recursive

 

명령어를 치면 아무것도 안뜨는데 잘 된것이다.

 

 

이제 빌드할 차례이다. CMake-GUI를 키자.

 

Browse Source...를 눌러 Opend3D 가 설치된 폴더를 설정하고

Browse Build 를 눌러 Open3D를 빌드할 폴더를 설정하자. 필자는 Open3D/build 폴더로 설정하였다.

 

 

Configure를 눌러서 VS 2019 로 설정하자. 기본으로 되어있다. platform 이나 기타도 그냥 기본값으로 두었다.

 

 

Finish를 누르면 Configure 이 완료되고, Generate 를 누르면 build 폴더 안에 Open3D.sln 파일이 생성된다.

 

 

 

Open3D.sln을 키기 전에, vs studio를 관리자 권한으로 켜야한다!

 

ALL_BUILD를 오른쪽 클릭한 후 시작 프로젝트로 설정 후 Realse 로 빌드하면 시간이 꽤 걸린다.

그 후 INSTALL 을 오른쪽 클릭한 후 프로젝트만> INSTALL 만 다시 빌드 를 하면 설치가 완료된다.

기본 저장 폴더는 C:/Program Files (x86)/Open3D/ 로 설정되어 있다.

 

사용법은 나중에....

 

 

출처: www.programmersought.com/article/71094722047/

 

Open3D+vs configuration and usage tutorial - Programmer Sought

Open3d-0.8.0+Cmake+vs2015 1. Download Take a brief look at the official website:Open3D Home Page Github homepage:Open3D Github Note the download version,Must match vs, The official has corresponding instructions, eg.vs2019+open3d0.10.0 or vs2015+open3d0.

www.programmersought.com

www.open3d.org/docs/release/compilation.html

 

Build from source — Open3D 0.11.1 documentation

ML Module The ML module consists of primitives like operators and layers as well as high level code for models and pipelines. To build the operators and layers, set BUILD_PYTORCH_OPS=ON and/or BUILD_TENSORFLOW_OPS=ON. Don’t forget to also enable BUILD_CU

www.open3d.org

 

반응형