Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc編集 #14

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
1 change: 1 addition & 0 deletions ply_processor_basics/matrix/get_rotation_from_vectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

def get_rotation_from_vectors(vec1: NDArray[np.float32], vec2: NDArray[np.float32]):
"""_summary_
2つのベクトルから回転行列を求める関数

Args:
vec1: The vector from.
Expand Down
9 changes: 5 additions & 4 deletions ply_processor_basics/points/ransac/detect_circle.py
Original file line number Diff line number Diff line change
Expand Up @@ -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平面に射影し、格子点にする
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,)
Expand Down
Loading