フィルターのクリア

How to use Z-buffer in Matlab

19 ビュー (過去 30 日間)
MENGZHI DI
MENGZHI DI 2018 年 10 月 9 日
コメント済み: yang zhang 2020 年 2 月 11 日
Now I have a 3D point cloud. And I want to convert it to 2D image that viewed from different directions. I think it may works following: (1) rotate the 3D model, (2) use Z-buffer to determine which points are visible, (2) project 3D model to 2D image. I have some problem with the second step, which is Z-buffer. Could someone give me some advice about how to do it?
  9 件のコメント
Walter Roberson
Walter Roberson 2020 年 2 月 10 日
Given a viewpoint and a viewing angle, you do a translation of the point coordinates to be relative to the viewpoint, and then you do a rotation of the points to align viewpoint. Then any point that has a negative (local) Z coordinate is "behind your head" and cannot be seen, and every other point can be seen provided that it is not co-linear along that axes (if it is, then it projects to exactly the same local x and local y).
It is, however, not common to bother to compute these things yourself, as MATLAB does the computation automatically when you plot.
There is a closely related question having to do with how far an object is away from the viewpoint, in order to know how much detail to render the object at. However when doing that kind of calculation, you always have perspective, which the original question does not deal with. The computations to determine how much "Level of Detail" (LOD) for 3D scenes in virtual reality are typically handled by functions provided by the VR environment.
yang zhang
yang zhang 2020 年 2 月 11 日
Can it be obtained automatically?

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2018 年 10 月 9 日
  4 件のコメント
yang zhang
yang zhang 2020 年 2 月 10 日
How should this code be used, can you give an example?
yang zhang
yang zhang 2020 年 2 月 11 日
Your answer is important to me

サインインしてコメントする。

その他の回答 (1 件)

yang zhang
yang zhang 2020 年 2 月 10 日
Have you achieved all the above three steps? Can we talk? My email is 1198692934@qq.com
  1 件のコメント
yang zhang
yang zhang 2020 年 2 月 11 日
Your answer is important to me

サインインしてコメントする。

カテゴリ

Help Center および File ExchangePoint Cloud Processing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by