How can I convert a file format FIG to PCD?

조회 수: 7 (최근 30일)
Motoki Hatsuda
Motoki Hatsuda 2022년 8월 1일
댓글: Motoki Hatsuda 2022년 8월 19일
Hi.
I'm new to matlab. I did the following to edit point cloud data.
ptCloud=pcread(filename)
pcshow(ptCloud)
After editing, the data is saved as a FIG file, how can I convert it to a PCD file?

채택된 답변

Benjamin Thompson
Benjamin Thompson 2022년 8월 1일
There is a function called pcwrite. The MATLAB documentation has a good article on it.
  댓글 수: 14
Walter Roberson
Walter Roberson 2022년 8월 9일
There are 1832 points in one point cloud.
You might want to change the colormap to highlight more of the points. There are a lot of dark blue points in the front right.
Motoki Hatsuda
Motoki Hatsuda 2022년 8월 19일
OH, I see.
fig = openfig('NameOfFig.fig'); outnamebase = "pcout_"; pcviewers = findobj(fig, 'tag', 'pcviewer'); for K = 1 : length(pcviewers) x = pcviewers(K).XData; y = pcviewers(K).YData; z = pcviewers(K).ZData; C = pcviewers(K).CData; xyz = [x(:),y(:),z(:)]; if size(C,2) == 1 ptc = pointCloud(xyz, 'Intensity', C); else ptc = pointCloud(xyz, 'Color', C); end outname = outnamebase + K + ".pcd"; pcwrite(ptc, outname); end
↑ I would like to know more about what each line of this code does.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Point Cloud Processing에 대해 자세히 알아보기

태그

제품


릴리스

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by