パノラマ画像
前準備
curl のインストール
- Windows での curl の使用: curl は,Windows 10, 11 の標準機能にあるので,インストールの必要はない.
- Ubuntu での curl のインストール
sudo apt -y update sudo apt -y install curl
ここで説明のためにサンプルとして使用する画像
curl コマンドを用いてダウンロードできる.あるいは Web ブラウザでもダウンロードできる.
curl -L https://github.com/opencv/opencv_extra/raw/4.x/testdata/stitching/boat1.jpg?raw=true -o boat1.jpg curl -L https://github.com/opencv/opencv_extra/raw/4.x/testdata/stitching/boat2.jpg?raw=true -o boat2.jpg curl -L https://github.com/opencv/opencv_extra/raw/4.x/testdata/stitching/boat3.jpg?raw=true -o boat3.jpg curl -L https://github.com/opencv/opencv_extra/raw/4.x/testdata/stitching/boat4.jpg?raw=true -o boat4.jpg curl -L https://github.com/opencv/opencv_extra/raw/4.x/testdata/stitching/boat5.jpg?raw=true -o boat5.jpg curl -L https://github.com/opencv/opencv_extra/raw/4.x/testdata/stitching/boat6.jpg?raw=true -o boat6.jpg
複数画像からのパノラマ画像の生成ツール Hugin
- Hugin のインストール
Windows の場合は, https://hugin.sourceforge.io/
Ubuntu の場合は, 次のコマンドを実行.
sudo add-apt-repository ppa:ubuntuhandbook1/apps sudo apt -y install hugin hugin-tools
- Hugin を起動する
ファイル名を指定している.あとで,Hugin の画面で,ファイルを読み込むこともできる.
hugin boat*.jpg
- 「配置」をクリック
- 「パノラマを作成」をクリック
その後は,画面の指示に従う
- .tif ファイルができるので確認