Top Banner
Window 에에 PCL 에에 에에
13

PCL 1.6.0 설치 방법

Mar 20, 2017

Download

Engineering

Jonghee Back
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: PCL 1.6.0 설치 방법

Window 에서 PCL 설치방법

Page 2: PCL 1.6.0 설치 방법

VS 설치

VS 버전과설치하는 PCL 버전이맞는것이중요함 . 본자료에서는 VS2010 에 PCL1.6.0

Page 3: PCL 1.6.0 설치 방법

http://www.pointclouds.org/downloads/windows.html 에서VS2010 과비트수에해당되는파일 All-in-one 파일다운

(All-in-one 에 Qt 는포함되어있지않으므로별도다운요망 )

PCL 설치

Page 4: PCL 1.6.0 설치 방법

PCL 설치

for all users 로설정

Page 5: PCL 1.6.0 설치 방법

PCL 과 3rd Party Libraries 모두체크

PCL 설치

Page 6: PCL 1.6.0 설치 방법

PCL 뿐만아니라다른 Dependency 까지설치완료

PCL 설치

Page 7: PCL 1.6.0 설치 방법

PDB 파일항목이동

다운받은 PDB 압축파일의모든 pdb 파일을 C:\Program Files\PCL 1.6.0\bin 로넣기

Page 8: PCL 1.6.0 설치 방법

실험폴더 (test) 를만들고그안에 build 폴더 , cloud_viewer.c, CMakeLists.txt 의이름을 하는파일을생성한다 .

예제

Page 9: PCL 1.6.0 설치 방법

cmake_minimum_required(VERSION 2.8 FATAL_ERROR)

project(cloud_viewer)

find_package(PCL 1.2 REQUIRED)

include_directories(${PCL_INCLUDE_DIRS})link_directories(${PCL_LIBRARY_DIRS})add_definitions(${PCL_DEFINITIONS})

add_executable (cloud_viewer cloud_viewer.cpp)target_link_libraries (cloud_viewer ${PCL_LIBRARIES})

CMakeLists.txt 에복사후넣기(http://pointclouds.org/documentation/tutorials/cloud_viewer.php#cloud-viewer 참고 )

예제

Page 10: PCL 1.6.0 설치 방법

#include <pcl/visualization/cloud_viewer.h>#include <iostream>#include <pcl/io/io.h>#include <pcl/io/pcd_io.h>int user_data;void viewerOneOff (pcl::visualization::PCLVisualizer& viewer){ viewer.setBackgroundColor (1.0, 0.5, 1.0); pcl::PointXYZ o; o.x = 1.0, o.y = 0, o.z = 0; viewer.addSphere (o, 0.25, "sphere", 0); std::cout << "i only run once" << std::endl;}void viewerPsycho (pcl::visualization::PCLVisualizer& viewer){ static unsigned count = 0; std::stringstream ss; ss << "Once per viewer loop: " << count++; viewer.removeShape ("text", 0); viewer.addText (ss.str(), 200, 300, "text", 0); user_data++;}

예제

Page 11: PCL 1.6.0 설치 방법

int main (){ pcl::PointCloud<pcl::PointXYZRGBA>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZRGBA>); pcl::io::loadPCDFile ("my_point_cloud.pcd", *cloud); pcl::visualization::CloudViewer viewer("Cloud Viewer"); viewer.showCloud(cloud); viewer.runOnVisualizationThreadOnce (viewerOneOff); viewer.runOnVisualizationThread (viewerPsycho); while (!viewer.wasStopped ()) {

user_data++; } return 0;}

예제

이전슬라이드부터현재슬라이드까지 cpp 파일에복사후넣기

Page 12: PCL 1.6.0 설치 방법

예제

위의두줄은 test 폴더및 test 폴더의 build 까지로각각지정후하단의 Configure 클릭 창이하나뜨면각자 VS 환경에맞는항목을선택 ( 본자료에서는 VS2010 Win64)

Page 13: PCL 1.6.0 설치 방법

정육면체가뜨지않더라도분홍색배경의 cloud viewer 가뜨면완료

예제