From e1787ae95843541851eff9b7c846aca697a73cd8 Mon Sep 17 00:00:00 2001 From: HiraiKyo Date: Tue, 20 Aug 2024 08:54:17 +0900 Subject: [PATCH] =?UTF-8?q?Doc=E7=B7=A8=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 ++ ply_processor_basics/matrix/get_rotation_from_vectors.py | 1 + ply_processor_basics/points/ransac/detect_circle.py | 9 +++++---- .../points/transform_to_plane_coordinates.py | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8977a77..241d78b 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,8 @@ pip install git+https://github.com/HiraiKyo/ply-processor-basics #### `points.ransac.detect_plane` +#### `points.ransac.detect_circle` + ### Open3d #### `pcd.snapshot` diff --git a/ply_processor_basics/matrix/get_rotation_from_vectors.py b/ply_processor_basics/matrix/get_rotation_from_vectors.py index dad39a5..799ff08 100644 --- a/ply_processor_basics/matrix/get_rotation_from_vectors.py +++ b/ply_processor_basics/matrix/get_rotation_from_vectors.py @@ -7,6 +7,7 @@ def get_rotation_from_vectors(vec1: NDArray[np.float32], vec2: NDArray[np.float32]): """_summary_ + 2つのベクトルから回転行列を求める関数 Args: vec1: The vector from. diff --git a/ply_processor_basics/points/ransac/detect_circle.py b/ply_processor_basics/points/ransac/detect_circle.py index 432f9b5..44d2c41 100644 --- a/ply_processor_basics/points/ransac/detect_circle.py +++ b/ply_processor_basics/points/ransac/detect_circle.py @@ -17,11 +17,12 @@ def detect_circle( """ 平面上の点群から最大円をRANSACで検出する関数 - :param points: a set of points - + :param points: 点群(N, 3) + :param plane_model: 平面の方程式(4, ) + :param density_threshold: 円内に含まれる点の密度閾値 + :param voxel_size: 格子点のサイズ + :param max_iteration: RANSACの最大繰り返し回数 :return: 検出した円の点ポインタ(N, ), 円中心座標(N, 3), 円半径 - - 検出失敗時は None を返す """ # 方針: 平面上の点群をXY平面に射影し、RANSACで円を検出する # 1. 平面上の点群をXY平面に射影し、格子点にする diff --git a/ply_processor_basics/points/transform_to_plane_coordinates.py b/ply_processor_basics/points/transform_to_plane_coordinates.py index 313d123..61ff5aa 100644 --- a/ply_processor_basics/points/transform_to_plane_coordinates.py +++ b/ply_processor_basics/points/transform_to_plane_coordinates.py @@ -12,7 +12,7 @@ def transform_to_plane_coordinates( points: NDArray[np.floating], origin: NDArray[np.floating], normal: NDArray[np.floating] ) -> Tuple[NDArray[np.floating], NDArray[np.floating]]: """ - 点群を平面上の1点を原点とし、法線方向をZ軸とする座標系に変換する。 + 点群を、平面上の1点を原点とし法線方向をZ軸とする座標系に変換する。 :param points: 変換する点群 (N, 3) :param origin: 新しい座標系の原点 (3,)