find関数で領域指定する方法について

5 ビュー (過去 30 日間)
大石 清二
大石 清二 2020 年 12 月 9 日
コメント済み: Rik 2020 年 12 月 11 日
現在、lasファイルを読み込み点群の領域を指定して点群を表示しようとしているのですがpcshowで元の大きい点群データが出力されてしまい領域を指定し出力ができません。どのように修正すればよいのでしょうか?
*min やmax にはそれぞれ実際の数値を入れて実行しています
*コードは以下の通りです
lasReader = lasFileReader('lasfile_name');
ptCloud = readPointCloud(lasReader);
x = ptCloud.Location(:,1);
y = ptCloud.Location(:,2);
z = ptCloud.Location(:,3);
Ix = find((x>min) & (x<max));
Iy = find((y>min) & (y<max));
Iz = find((z>min) & (z<max));
figure
pcshow(ptCloud.Location)
  1 件のコメント
Rik
Rik 2020 年 12 月 11 日
Why did you flag your question? I don't see why it would not be appropriate.

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

回答 (1 件)

Kenta
Kenta 2020 年 12 月 9 日
pcshow(ptCloud.Location)
と、最後にもとのptCloudを表示してしまっていますね。
pcshow([x(lx),y(ly),z(lz)])
とすればいかがでしょうか。

カテゴリ

Help Center および File ExchangeLIDAR および点群の処理 についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!