「手元のセンサーは何か」から入って、その生データを扱うのに どの op をどの順で 組めばよいかを引く台帳です(op の全一覧は OP_CATALOG.md)。
in → out のデータ種が繋がるように並んでいる。ops3d)から in → out/説明を引いており、ops3d.get(name)(...) で呼べる。2D 経路は OP_CATALOG.md の該当カテゴリを参照。examples_3d/ にある。密度を揃え外れ点を落として後段を安定化
voxel_grid_downsample (points → points) — 辺 voxel_size の格子で点群を間引き、各セルを重心 1 点に集約する(決定論的)。statistical_outlier_removal (points → points) — 各点の k 近傍平均距離が大域的に外れる点を除去する(統計的外れ値除去)。radius_outlier_removal (points → points) — 半径 radius 内の近傍数が min_neighbors 未満の点を除去する(孤立点除去)。回転式LiDARを2D距離画像に畳んで高速処理→戻す
project_spherical (points → image2d) — 回転式 LiDAR の球面レンジ画像へ投影 (v_res, h_res)。空セル=0, 近い点優先(最小 range)。unproject_spherical (image2d → points) — 球面レンジ画像 → 3D 点 (M, 3)。range>0 のセルのみをビン中心角で逆投影。project_cylindrical (points → image2d) — 円柱レンジ画像へ投影 (z_bins, h_res)。方位角(列)× z(行)、画素=水平半径 ρ=hypot(x,y)。一貫向きの法線(平面/物体判定・登録の土台)
estimate_oriented_normals (points → normals) — PCA 法線推定 + Hoppe 大域向き付けの合成。→ (N,3) の向き付き単位法線。orient_normals (points, normals → normals) — Hoppe 法で法線を大域一貫に向き付け(MST 伝播)。→ (N,3)。地面を剥がし残りを物体クラスタへ
plane_segmentation (points → labels) — 反復 RANSAC で最大 max_planes 枚の平面を逐次抽出(残差点 -1)。euclidean_cluster (points → labels) — 半径 tol の近接グラフの連結成分で距離クラスタリング(-1=ノイズ)。region_growing (points → labels) — 法線類似で領域成長し連結した平滑領域へ同ラベルを付す(曲率ゲート無し変種)。疎な対応付け・登録のための記述子
iss_keypoints (points → indices) — ISS(Intrinsic Shape Signatures、3D Harris 相当)キーポイント検出。harris3d_keypoints (voxel → keypoints) — 3D Harris キーポイント検出(2D Harris コーナー検出の 3D 版)。compute_fpfh (points, normals → descriptor) — FPFH 記述子 (N, 3*n_bins) を計算(Rusu 2009)。FPFHで粗合わせ→GICP/点対面ICPで精合わせ、品質を定量評価
register_fpfh (points, points → pose) — FPFH 記述子 + RANSAC で 初期推定なし の剛体位置合わせ (R,t) を推定する。gicp (points, points → pose) — Generalized-ICP(共分散重みマハラノビス ICP)で剛体変換 (R,t) を推定する。icp_point2plane (points, points, normals → pose) — 点-面 ICP(Gauss-Newton, 小角近似)で剛体変換を高精度に精緻化する。inlier_ratio (points, points → measurement) — 対応集合の inlier 率 = ‖T·source[i] − target[i]‖ < thresh の割合。→ [0,1]。registration_recall (points, points → measurement) — 3DMatch 流の per-pair 登録成否 = 1.0(成功)/ 0.0(失敗)。物体の位置・向き・大きさを掴む
aabb (points → primitive) — Axis-aligned bounding box. Returns (min (3,), max (3,)).obb (points → primitive) — Oriented bounding box by PCA.min_enclosing_sphere (points → primitive) — 点群 (N,3) → 全点を含む(近似)最小包含球 {center(3), radius}。convex_hull (points → mesh) — Convex hull of a point set -> (V, F) with outward-oriented triangles.経路計画用の占有格子と連続距離場
occupancy_grid (points → voxel) — 点群 (N,3) → 3-D 占有ボクセル格子 bool(点の落ちた voxel を占有)。esdf (voxel → sdf) — 占有格子 → Euclidean 符号付き距離場 (ESDF)(外=+ 最近占有まで, 内=- 最近自由まで)。inflate (voxel → voxel) — 障害物を radius(world 単位)膨張した占有格子 bool(= ESDF<=radius を占有)。query_distance (sdf, points → signal) — 任意 world 座標 (M,3) での ESDF 値 (M,) を返す(mode=’trilinear’ 補間 or ‘nearest’)。シーンフローと剛体運動の分割
nearest_neighbor_flow (points, points → flow_scattered) — 各点 pts0 から pts1 の最近傍への 3-D 変位ベクトル場 (N, 3) を返す。rigid_flow (points, points → pose) — pts0 -> pts1 を説明する単一剛体運動を最近傍対応 + Kabsch(ICP 風)で推定。smooth_flow (points, points → flow_scattered) — 最近傍フローを近傍平均で局所平滑化した正則化フロー (N, 3) を返す。segment_rigid_motions (points, points → labels) — 2 点群を運動が一致する剛体ごとに分割する(反復 RANSAC による multi-body 分割)。深度→3D点、格子を活かした高速法線
depth_to_organized_points (depth → pointmap) — organized 深度画像 → 格子整列 3D 点 (H,W,3)。depth_to_points (depth → points) — 深度マップ(2.5D)→ point cloud(ピンホール逆投影)。depth 行を全手法へ接続。normals_from_depth (depth → normalmap) — organized 深度 → 向き付き単位法線 (H,W,3)。隣接画素の 3D 点の外積(格子構造を利用、O(HW))。段差を跨がず平滑化、欠測を補間
bilateral_filter_depth (depth → depth) — 深度画像の bilateral filter(段差保存デノイズ)。→ float64 (H,W)。joint_bilateral (depth, image2d → depth) — joint / cross bilateral: 平滑対象は depth、range 重みは guide の差で作る。→ float64 (H,W)。fill_holes (depth → depth) — 無効画素(穴)を近傍有効画素から調和(ラプラス)緩和で補間。→ float64 (H,W)。手前/奥の段差を検出(物体境界)
occlusion_edges (depth → image2d) — 深度の不連続(前景/背景境界 = 遮蔽エッジ)を検出。→ bool HxW。bearing_angle_image (depth → image2d) — bearing-angle 画像: 走査方向に沿った視線と局所面のなす角(range image の古典記述子)。→ HxW(度)。台面除去とビンピッキングの物体分離
plane_segmentation (points → labels) — 反復 RANSAC で最大 max_planes 枚の平面を逐次抽出(残差点 -1)。euclidean_cluster (points → labels) — 半径 tol の近接グラフの連結成分で距離クラスタリング(-1=ノイズ)。複数深度をTSDFへ融合し表面メッシュを抽出
tsdf_from_depth (depth → sdf) — 深度マップ(2.5D)→ TSDF volume(RGB-D 再構成の標準表現)。depth→TSDF 変換。fuse (depth → sdf) — 深度列を new_volume + integrate で 1 つの TSDF volume に融合。返り値 (tsdf, weight)。integrate (sdf, depth → sdf) — 深度 1 枚を投影的 TSDF で volume に統合(in-place、重み付き移動平均)。extract_surface_points (sdf → points) — TSDF ゼロ交差から表面点 (M,3) を抽出(marching cubes 不要、線形補間)。voxel_to_mesh (voxel → mesh) — voxel → mesh(marching cubes、skimage)。返り値 (verts, faces, normals)。voxel→mesh 変換。非収縮平滑化・軽量化・法線/面積計測
taubin_smooth (mesh → mesh) — Taubin λ |
μ フィルタによる 非収縮 平滑化。→ (verts, faces)。 |
decimate_qem (mesh → mesh) — Quadric-error-metric edge-collapse decimation toward target_faces.vertex_normals (mesh → normals) — 三角形メッシュの頂点法線(面積重み付きで集約した単位法線)。→ (N,3)。mesh_area (mesh → measurement) — 三角形メッシュの表面積(全三角形面積の総和)。→ float。対応点から基礎/基本行列→相対R,t
fundamental_8point (image2d, image2d → matrix) — 正規化 8 点法で基礎行列 F を推定(rank-2 強制)。→ F (3,3)。8 点以上必要。essential_8point (image2d, image2d → matrix) — 対応点 + K から本質行列 E を直接。→ E (3,3)。recover_pose (image2d, image2d → pose) — 対応点 + K から相対姿勢 (R,t) と 3D 構造を復元(cheirality で一意化)。→ (R, t_unit, points3d)。sampson_distance (image2d, image2d → signal) — エピポーラ拘束の Sampson 距離(1 次幾何誤差、各対応)。→ (N,)。深度平面を掃引しphoto-consistency最小で深度
plane_sweep_depth (image2d, image2d → depth) — plane-sweep stereo で密な深度マップを推定。→ (H,W) depth。warp_by_plane (image2d → image2d) — homography H で img を逆ワープ。→ out[y,x] = img(H·(x,y,1))(bilinear)。対応点+姿勢から3D点を復元
triangulate (image2d, image2d → points) — DLT 三角測量: 2 視点の対応点 + 射影行列 → 3D 点。→ (N,3)。PnPで姿勢→再投影誤差最小でバンドル調整
pnp_ransac (points, keypoints → pose) — 外れ値に頑健な PnP(RANSAC + 最終 DLT リフィット)。→ (R, t, inlier_mask, info)。dlt_pose (points, keypoints → pose) — DLT で 3D-2D 対応からカメラ姿勢を復元(K 既知)。→ (R (3,3), t (3,))。6 点以上必要。reprojection_error (points, keypoints → measurement) — 再投影誤差(RMS ピクセル)。姿勢の当てはまり評価。→ scalar。bundle_adjust (pose, points → table) — 再投影誤差最小でカメラ姿勢と 3D 点を同時最適化。→ dict{cameras, points, rmse, cost}。既知形状から縞画像を合成しGT検証
synthesize_fringes (image2d → images) — 既知の height map から N-step 位相シフト縞画像列を合成する(テスト/サンプル生成用)。包み位相→アンラップ→絶対位相→高さ
wrapped_phase (images → image2d) — N-step 位相シフト縞画像から wrapped phase (-π, π] を求める。unwrap_phase_2d (image2d → image2d) — wrapped phase を skimage.restoration.unwrap_phase で連続位相に展開する。graycode_decode (images → image2d) — Gray code ビット画像列 → 整数フリンジ次数マップ(絶対次数)。decode_fringe (images → depth) — 位相シフト画像列を一括復号: wrapped → unwrap →(参照減算で)高さ。高さ→点群→メッシュ
depth_to_points (depth → points) — 深度マップ(2.5D)→ point cloud(ピンホール逆投影)。depth 行を全手法へ接続。voxel_to_mesh (voxel → mesh) — voxel → mesh(marching cubes、skimage)。返り値 (verts, faces, normals)。voxel→mesh 変換。poisson_lite (points → mesh) — 点群 (N,3) → (vertices(V,3), faces(F,3)) の表面メッシュ(スクリーンド Poisson 軽量近似)。陰影群から画素ごとの法線
photometric_stereo (images → normalmap) — Lambertian フォトメトリックステレオ: 既知光源方向の N 枚から法線とアルベドを復元。→ (normals HxWx3, albedo HxW)。surface_normals (image2d → normalmap) — 高さ場 z(HxW)→ 単位法線 (H,W,3)。n ∝ (-dz/dx, -dz/dy, 1)。深度→法線の順変換。法線場を積分して高さ場へ
integrate_normals (normalmap → image2d) — 法線場 → 高さ場 z を Frankot-Chellappa 積分。→ z HxW(定数分の自由度あり・平均0基準)。法線+光源→輝度の順レンダで逆問題を検証
render_lambertian (normalmap → image2d) — 法線 + アルベド + 光源方向 → Lambertian 画像(検査サンプル生成 / GT 検証 / 逆レンダの順方向)。→ HxW。空洞埋め・トゲ除去・境界殻抽出
morph_dilate3d (voxel → voxel) — 3D グレースケール dilation(SE 半径 r の局所 max)。明領域を膨張。morph_erode3d (voxel → voxel) — 3D グレースケール erosion(SE の局所 min)。明領域を収縮。se は dilate と同じ。morph_gradient3d (voxel → voxel) — 3D モルフォロジー勾配 = dilation − erosion。境界/表面を抽出(sobel 代替のエッジ源)。morph_tophat3d (voxel → voxel) — 3D white top-hat = vol − opening。SE より小さい 明構造を抽出(keypoint 前処理)。連結成分で分離・計測、接触物体はwatershedで割る
label_components (voxel → labels) — 3D 二値ボリュームを連結成分にラベリングする。region_props (voxel → table) — 各連結成分のリージョンプロパティ一覧を返す。filter_by_volume (voxel → voxel) — min_voxels 未満の連結成分を除去した bool マスクを返す。largest_component (voxel → voxel) — 最大(最多ボクセル)連結成分の bool マスクを返す。vol_watershed (voxel → labels) — Marker-controlled 3-D watershed segmentation (optional — scikit-image).境界抽出・距離場・中軸骨格
canny3d (voxel → voxel) — 3D Canny エッジ検出(非最大抑制 + ヒステリシス)。log_zero_crossings (voxel → voxel) — Laplacian-of-Gaussian のゼロ交差エッジ。edge_points (voxel → points) — エッジ mask を (M,3) の座標点群にする(下流の chamfer / Hough 用)。signed_distance_field (voxel → sdf) — occupancy/密度 voxel → 符号付き距離場 SDF(内側<0・外側>0)。edt_jfa を両側に。skeletonize_vol (voxel → voxel) — 3D バイナリ voxel を細線化して 1 voxel 幅の骨格に。skimage の Lee(1994)法ラッパ。medial_axis_points (voxel → points) — medial voxel の座標と局所半径(= その点の EDT 値)を点群化。返り値 (points, radius)。marching cubesで表面化→軽量化・平滑化・曲率/面積計測
voxel_to_mesh (voxel → mesh) — voxel → mesh(marching cubes、skimage)。返り値 (verts, faces, normals)。voxel→mesh 変換。decimate_qem (mesh → mesh) — Quadric-error-metric edge-collapse decimation toward target_faces.taubin_smooth (mesh → mesh) — Taubin λ |
μ フィルタによる 非収縮 平滑化。→ (verts, faces)。 |
vertex_curvature (mesh → curvature) — 三角形メッシュの各頂点の平均曲率の大きさ(mean curvature magnitude)。→ (N,)。mesh_area (mesh → measurement) — 三角形メッシュの表面積(全三角形面積の総和)。→ float。不変量・慣性・プリミティブ当てはめで寸法照合
moment_invariants (points → descriptor) — 並進+回転+スケール不変な形状特徴ベクトル(Sadjadi–Hall 流 + 高次半径分布)。principal_moments (points → descriptor) — 慣性テンソルの固有値(主慣性モーメント、降順ソート、回転不変)。inertia_tensor (points → matrix) — 点群の慣性テンソル (3,3)(中心 2 次モーメントから、等質量・総質量 1)。fit_cone (points → primitive) — 点群に無限円錐を当てはめ {apex, axis, half_angle, residual} を返す。fit_torus (points → primitive) — 点群にトーラスを当てはめ {center, axis, R, r, residual} を返す。fit_ellipsoid (points → primitive) — 点群に任意姿勢の 3 軸楕円体を代数フィットし {center, axes, radii, residual} を返す。最初の2枚で姿勢と初期点群
fundamental_8point (image2d, image2d → matrix) — 正規化 8 点法で基礎行列 F を推定(rank-2 強制)。→ F (3,3)。8 点以上必要。essential_8point (image2d, image2d → matrix) — 対応点 + K から本質行列 E を直接。→ E (3,3)。recover_pose (image2d, image2d → pose) — 対応点 + K から相対姿勢 (R,t) と 3D 構造を復元(cheirality で一意化)。→ (R, t_unit, points3d)。triangulate (image2d, image2d → points) — DLT 三角測量: 2 視点の対応点 + 射影行列 → 3D 点。→ (N,3)。既知3D点に新規画像を PnP で結合
pnp_ransac (points, keypoints → pose) — 外れ値に頑健な PnP(RANSAC + 最終 DLT リフィット)。→ (R, t, inlier_mask, info)。reprojection_error (points, keypoints → measurement) — 再投影誤差(RMS ピクセル)。姿勢の当てはまり評価。→ scalar。全姿勢+構造をバンドル調整、ループはポーズグラフで
bundle_adjust (pose, points → table) — 再投影誤差最小でカメラ姿勢と 3D 点を同時最適化。→ dict{cameras, points, rmse, cost}。optimize_pose_graph (pose → table) — 相対姿勢制約 + ループ閉じから大域姿勢を最適化。→ dict{poses, rmse, cost}。relative_pose (pose, pose → pose) — T_i⁻¹ ∘ T_j = i←j の相対姿勢。pose_* = [rvec |
t] (6,)。→ (rvec_ij (3,), t_ij (3,))。 |
コーナー/記述子など2D特徴で対応点を作る(詳細=OP_CATALOG.md)
多視点シルエットからvisual hullを彫る
synthesize_silhouette (points → image2d) — 3-D 点群を (K,R,t) カメラへ射影し占有画素 True のシルエット(H,W bool)を返す。carve (images → voxel) — bounds を res^3 voxel に離散化し、全シルエット内に射影される voxel を残す(空間彫刻)。visual_hull (images → voxel) — 多視点シルエットの visual hull を voxel 占有として返す(:func:carve の別名)。既知視点群からの密深度
plane_sweep_depth (image2d, image2d → depth) — plane-sweep stereo で密な深度マップを推定。→ (H,W) depth。3DGSを占有体積化→メッシュ(gsplat 訓練/描画は gsplat* モジュール)_
gaussians_to_voxel (points → voxel) — 3DGS(異方性ガウス)→ 密度 voxel。各ガウスを means に opacity で置き、平均 scale で平滑。voxel_to_mesh (voxel → mesh) — voxel → mesh(marching cubes、skimage)。返り値 (verts, faces, normals)。voxel→mesh 変換。平滑化・復元・階調/周波数/色変換(詳細=OP_CATALOG.md)
エッジ/領域/輪郭/形態で欠陥・部品を抽出
特徴量・寸法・テクスチャ・テンプレート照合(サブピクセル)
校正済みなら2D計測を3D幾何当てはめへ橋渡し
fit_line_3d (points → primitive) — 点群 → 最小二乗直線(通過点=重心, 方向=最大主軸)。返り値 (point, direction)。fit_plane_3d (points → primitive) — 点群 → 最小二乗平面(通過点=重心, 法線=最小主軸, 残差 RMS)。返り値 (point, normal, resid)。fit_circle_3d (points → primitive) — 点群 → 3D 円(平面フィット → 面内で 2D 円フィット)。返り値 (center, radius, normal)。fit_sphere_3d (points → primitive) — 点群 → 最小二乗球(代数フィット)。返り値 (center, radius)。配管/ボール計測に。SDFのCSGで形を作りmarching cubesでメッシュ化
sphere_sdf (coordgrid → sdf) — 球の符号付き距離場: |p - center| - R(内側負・外側正)。box_sdf (coordgrid → sdf) — 軸平行直方体の厳密な符号付き距離場(内側負・外側正)。sdf_smooth_union (sdf, sdf → sdf) — 滑らかに丸めた和集合(polynomial smooth-min)。k>0 で継ぎ目を半径 ~k で丸める。sdf_subtract (sdf, sdf → sdf) — 差集合 A\B = max(a, -b)(A の内側 かつ B の外側 = -b の内側)。voxel_to_mesh (voxel → mesh) — voxel → mesh(marching cubes、skimage)。返り値 (verts, faces, normals)。voxel→mesh 変換。深度/MIP/投影で疑似センサー画像
render_point_depth (points → depth) — 点群 → 深度画像(z-buffer、各画素に最近点の深度)。観測合成/外観検査サンプル。render_volume_projection (voxel → image2d) — voxel を任意視点で 2D 投影(mode=xray=減衰積算 / mip=最大値)。DRR(X線)・世界モデル観測。project_points (points → keypoints) — 3D 点群 (N,3) → 画像座標 (u,v) と深度。ピンホール(depth_to_points の順方向)。全品質層を合成した hero 画像(render_beauty 一発、または層を個別に)
render_beauty (mesh → rgbimage) — メッシュを全品質層合成で「映える静止 3D」1 枚に描く → RGB (size, size, 3) float [0,1]。ambient_occlusion (mesh → image2d) — メッシュを AO マップ画像 (H, W) [0,1] にレンダリングして返す。cast_shadow (mesh, vector → image2d) — メッシュのキャスト影 / ソフトシャドウを計算し、可視性マップ (H,W) ∈ [0,1] を返す。phong_shade (normalmap → image2d) — Phong 反射モデルで法線マップを陰影付け(環境光 + 拡散 + 鏡面)。→ (H, W)。matcap_shade (normalmap, image2d → image2d) — MatCap: 視空間法線を lit-sphere テクスチャに写して素材の見えを転写。→ (H, W[, C])。supersample_mesh (mesh → image2d) — メッシュを SSAA でアンチエイリアス描画 -> float 画像 (H, W) (or (H, W, C))。tonemap_reinhard (image2d → image2d) — Reinhard トーンマップで HDR を [0, 1] の LDR へ圧縮。→ float64、入力と同形状。tonemap_aces (image2d → image2d) — ACES filmic 近似(Narkowicz 2015)で HDR を [0, 1] の LDR へ圧縮。→ float64。点群/ボリュームの拡張で頑健性を上げる
jitter (points → points) — 各点に等方ガウスノイズ N(0, sigma) を付加(センサ位置ノイズの模倣)。random_rotation (points → points) — ランダム回転を適用し (rotated, R) を返す(視点変化の模倣)。random_scale (points → points) — 一様スケール s ~ U(lo, hi) を原点まわりに適用し (scaled, s) を返す。random_dropout (points → points) — 点の ratio 割合をランダム除去し (kept, kept_idx) を返す(欠損の模倣)。elastic_deform (points → points) — 滑らかな乱数変位場で弾性変形(相関距離 sigma, RMS 振幅 alpha)。cutout (points → points) — 空間的な軸平行ボックス領域を除去し (kept, kept_idx) を返す(局所欠損の模倣)。bin_pick.py — ビンピッキング(乱雑箱→把持)stereo_sim.py — ステレオ撮像シミュレーションfocus_stack.py — 焦点合成(被写界深度合成)polar_cam.py — 偏光カメラevent_camera.py — イベントカメラ(DVS)pick_render.py — ピッキング動作レンダ