Main Content

LAZ ファイルからの点群データの読み取り

この例では、LAS/LAZ ファイルから点群データを読み取って可視化する方法を示します。

LAZ ファイル用の lasFileReader オブジェクトを作成します。その後、関数 readPointCloud を使用して点群データを LAZ ファイルから読み取り、pointCloud オブジェクトを生成します。

LAZ ファイルのデータにアクセスするための lasFileReader オブジェクトを作成します。

filepath = fullfile(toolboxdir("lidar"),"lidardata", ...
    "las","aerialLidarData.laz");
lasReader = lasFileReader(filepath);

関数 readPointCloud を使用して、点群データを LAZ ファイルから読み取ります。

ptCloud = readPointCloud(lasReader);

点群を可視化します。

figure
pcshow(ptCloud.Location)

Figure contains an axes object. The axes object contains an object of type scatter.