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

OpenVSLAM用コンフィグファイル出力機能追加 #13

Merged
merged 7 commits into from
Dec 6, 2021
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
4 changes: 2 additions & 2 deletions notebooks/camera_undistort/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# camera_undistort
![](https://rt-net.github.io/images/jetson-nano-mouse/jnmouse_undistort.png)

Jetson Nano Mouseに搭載されたステレオカメラの歪み補正、視差推定、三次元復元を行うNotebookです。詳細な使い方はそれぞれのNotebookに書かれています。アルゴリズムやコードの実装について順に解説されているので下記の順に閲覧、実行することをおすすめします。※matplotlibおよびnumpyのインストールが必要です(apt installコマンドでのインストール推奨)
Jetson Nano Mouseに搭載されたステレオカメラの歪み補正、視差推定、三次元復元を行うNotebookです。詳細な使い方はそれぞれのNotebookに書かれています。アルゴリズムやコードの実装について順に解説されているので下記の順に閲覧、実行することをおすすめします。

[jnmouse_ros_examples](https://github.com/rt-net/jnmouse_ros_examples)では歪み補正した画像をROSのtopicとしてpublishするサンプルがあります。使用する際はundistort_data_collection.ipynb、undistort_fisheye_stereo.ipynbを実行し、出力されたカメラパラメータファイル(`camera_param_fisheye.npz`)が必要です。
[jnmouse_ros_examples](https://github.com/rt-net/jnmouse_ros_examples)では歪み補正した画像をROSのtopicとしてpublishするサンプルやOpenVSLAMを用いてVisual SLAMを行うサンプルがあります。使用する際はundistort_data_collection.ipynb、undistort_fisheye_stereo.ipynbを実行し、出力されたカメラパラメータファイル(`camera_param_fisheye.npz`, `jnmouse_stereo.yaml`)が必要です。

GitHub上で閲覧する際にうまく描画されない場合は![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)をクリックしてGoogle Colaboratoryで閲覧してください。閲覧用のためGitHubやGoogle ColaboratoryからJetson Nano Mouseのハードウェアにはアクセスできません。

Expand Down
80 changes: 80 additions & 0 deletions notebooks/camera_undistort/camera_param/jnmouse_stereo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
Camera:
name: jnmouse stereo
setup: stereo
model: fisheye
fx: 416.2610758842983
fy: 416.2610758842983
cx: 326.40505978078625
cy: 301.640459760212
k1: 0.0
k2: 0.0
k3: 0.0
k4: 0.0
fps: 30.0
cols: 640
rows: 480
focal_x_baseline: 23.23201280449501
color_order: RGB
StereoRectifier:
K_left:
- 395.6339993415886
- 0.0
- 321.41584425252694
- 0.0
- 527.1584777717195
- 276.3421303108799
- 0.0
- 0.0
- 1.0
D_left:
- -0.038462847996788514
- 0.04223470516826331
- -0.12029016918360039
- 0.10937841468362043
R_left:
- 0.9999837463897118
- -0.0007008079266710662
- -0.005658252790969807
- 0.0005689302406683851
- 0.9997289339426906
- -0.02327520045440702
- 0.005673030475667811
- 0.023271602997247322
- 0.9997130834490269
K_right:
- 393.2216118223581
- 0.0
- 350.7968384205811
- 0.0
- 524.2098091388987
- 269.7692671401212
- 0.0
- 0.0
- 1.0
D_right:
- -0.04535501344331801
- 0.0870062177898424
- -0.2168255045139224
- 0.18467128683662148
R_right:
- 0.9996690367439196
- -0.0030705104509999165
- 0.02554190558776392
- 0.0024751799909932823
- 0.9997252900085308
- 0.0233070375932043
- -0.02560645347360958
- -0.023236103006510196
- 0.9994020177373943
Feature:
max_num_keypoints: 2000
scale_factor: 1.2
num_levels: 8
ini_fast_threshold: 20
min_fast_threshold: 7
Initializer: {}
Mapping:
baseline_dist_thr: 0.02
SocketPublisher:
image_quality: 5
publish_points: 'false'
142 changes: 102 additions & 40 deletions notebooks/camera_undistort/undistort/undistort_fisheye_stereo.ipynb

Large diffs are not rendered by default.