金子邦彦研究室人工知能Windows でのインストールと動作確認(人工知能関係)chasank/Image-Rectification のインストールと画像補正の実行(画像補正)(Python を使用)(Windows 上)

chasank/Image-Rectification のインストールと画像補正の実行(画像補正)(Python を使用)(Windows 上)

chasank/Image-Rectification をインストールし, 画像補正を行う.

(人工知能でなく,コンピュータビジョンの技術である)

文献

Chaudhury, Krishnendu, Stephen DiVerdi, and Sergey Ioffe. "Auto-rectification of user photos." 2014 IEEE International Conference on Image Processing (ICIP). IEEE, 2014.

関連する外部ページ

GitHub のページ: https://github.com/chsasank/Image-Rectification

1. Google Colab へのリンク

Google Colaboratory のページ:

次のリンクをクリックすると,Google Colaboratoryノートブックが開く. そして,Google アカウントでログインすると,Google Colaboratory のノートブック内のコード等を編集したり再実行したりができる.編集した場合でも,他の人に影響が出たりということはない.そして,編集後のものを,各自の Google ドライブ内に保存することもできる.

https://colab.research.google.com/drive/11VNfE_9fEZ3IDAh-jSwVkrRVE6ZGJ4iM?usp=sharing

2. 前準備

Git のインストール(Windows 上)

Windows での Git のインストール: 別ページ »で説明

関連する外部ページ

Git の公式ページ: https://git-scm.com/

Python のインストール(Windows 上)

Windows での Python 3.10,関連パッケージ,Python 開発環境のインストール: 別ページ »で説明

サイト内の関連ページ

Python のまとめ: 別ページ »にまとめ

関連する外部ページ

Python の公式ページ: https://www.python.org/

3. chasank/Image-Rectification のインストール

  1. Windows で,コマンドプロンプト管理者として実行

    コマンドプロンプトを管理者として実行: 別ページ »で説明

  2. pip更新と,chasank/Image-Rectification のインストール

    ※ 「 python -m pip install ...」は,Python パッケージをインストールするためのコマンド.

    cd %HOMEPATH%
    rmdir /s /q Image-Rectification
    git clone --recursive https://github.com/chsasank/Image-Rectification
    

    [image]
  3. 同封の画像ファイル shelf.jpg を使って実行してみる.

    次のコマンドを実行

    cd %HOMEPATH%
    cd Image-Rectification
    del results\shelf_warped.png
    python rectification.py results\shelf.jpg
    

    [image]
  4. 実行の結果,result\shelf_warped.png ができる.

    results\shelf.jpg と result\shelf_warped.png

    [image]

    [image]