convert stl file to depth map

조회 수: 10 (최근 30일)
Yuval Braun
Yuval Braun 2020년 4월 12일
답변: George Abrahams 2024년 2월 10일
I built a 3d scanner whose output is a depth map. I want to check that the result is the same as the photographed object, which I printed from the stl file. Is there a way to get a depth map (from a certain perspective) given the stl file?
  댓글 수: 2
KSSV
KSSV 2020년 4월 12일
YOu can read your stl file using stlread and then plot the map using trisurf.
Yuval Braun
Yuval Braun 2020년 4월 12일
KSSV. I know, but I'm specifically interested in depth values so I can calculate the size of the error.

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

답변 (1개)

George Abrahams
George Abrahams 2024년 2월 10일
Hi @Yuval Braun, you need a renderer. My 3D Rendering Toolbox on File Exchange will easily handle this. For example, you can see the toolbox generating a depth map in the figure below.
To get an identical image, you'll need to know a few properties about the sensor used to perform the scan, namely its field-of-view and resolution. You'll also need to know the relative position between the object and sensor. Finally, if the sensor is a camera, due to lens distortion, you'll likely need to calibrate it to undistort (rectify) the image with the undistortImage function of the Computer Vision Toolbox.

카테고리

Help CenterFile Exchange에서 STL (STereoLithography)에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by