removeInvalidPoints
点群から無効な点を削除
説明
[
は、点群から ptCloudOut
,indices
] = removeInvalidPoints(ptCloud
)Inf
または NaN
の座標値をもつ点を削除し、有効な点のインデックスを返します。
メモ
出力は常に、アンオーガナイズド (X 行 3 列) 点群になります。入力 ptCloud
がオーガナイズド点群 (M×N×3) である場合、関数は出力をアンオーガナイズド点群として返します。
例
点群から無効な点を削除
NaN
値と Inf
値をもつ点群オブジェクトを作成します。
xyzpoints = abs(randn(10,3)).*100; xyzpoints(1:2:4,:) = nan('single'); xyzpoints(6:2:10,:) = inf('single'); ptCloud = pointCloud(xyzpoints);
点群データの Location
プロパティを検査して、NaN
値と Inf
値の出現を検証します。
ptCloud.Location
ans = 10×3
NaN NaN NaN
183.3885 303.4923 120.7487
NaN NaN NaN
86.2173 6.3055 163.0235
31.8765 71.4743 48.8894
Inf Inf Inf
43.3592 12.4144 72.6885
Inf Inf Inf
357.8397 140.9034 29.3871
Inf Inf Inf
点群から NaN
値と Inf
値をもつ点を削除します。
ptCloudOut = removeInvalidPoints(ptCloud);
点群データの Location
プロパティを検査して、無効な点が削除されていることを検証します。
ptCloudOut.Location
ans = 5×3
183.3885 303.4923 120.7487
86.2173 6.3055 163.0235
31.8765 71.4743 48.8894
43.3592 12.4144 72.6885
357.8397 140.9034 29.3871
入力引数
ptCloud
— 点群
pointCloud
オブジェクト
点群。pointCloud
オブジェクトとして指定します。
出力引数
ptCloudOut
— 点が削除された点群
pointCloud
オブジェクト
点群。Inf
または NaN
の座標が削除された pointCloud
オブジェクトとして返されます。
メモ
出力は常に、アンオーガナイズド (X 行 3 列) 点群になります。入力 ptCloud
がオーガナイズド点群 (M×N×3) である場合、関数は出力をアンオーガナイズド点群として返します。
indices
— 有効な点のインデックス
ベクトル
点群内の有効な点のインデックス。ベクトルとして指定します。
拡張機能
C/C++ コード生成
MATLAB® Coder™ を使用して C および C++ コードを生成します。
GPU コード生成
GPU Coder™ を使用して NVIDIA® GPU のための CUDA® コードを生成します。
バージョン履歴
R2015a で導入
参考
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)