Giter Site home page Giter Site logo

blend's Introduction

QR治具を用いた表裏合成(blend.pyのみ、format.pyは必要ない)

概要

画像中のARマーカーを認識し、その中心座標を用いて表裏画像を合成する。 流れ ①ARマーカーを認識 ②裏画像を上下反転 ③裏画像における二つのマーカーを結ぶベクトルが、表画像における二つのマーカーを結ぶベクトルと重なるように裏画像を回転 ④表画像の一つ目のマーカー中心座標に合わせて、裏画像を平行移動 ⑤余分な領域を削除し、透過画像を作成

入力するパラメータ

必須項目

コマンドライン引数

  • 画像を読み込みたいフォルダ名

コード中

  • 読み込むQRマーカーのidをread_ids_front,backへ入力 QR治具依存のため、治具が完成したら確定 read_ids_front[a,b] read_ids_back[c,d] とした場合、aとc、bとdがそれぞれ裏表のマーカーのidに対応するようにする。

必要事項

表画像、裏画像の名前をそれぞれfront.png、back.pngとする。

オプション

  • 透過画像作成時の、表画像の透過率(裏画像の透過率は1-(表画像の透過率)となる)
  • ARマーカー認識時に二値化処理を行うか否か
  • 裏画像のマーカー中心座標をずらす値(デフォルトでは0)
  • 透過画像作成前の表画像、裏画像を保存するかどうか

出力

・完成した透過画像 ・位置変換・トリミングを行った表裏画像 ・memo.txt・・・表裏の各マーカーの中心座標などのデータ

QRマーカーが認識されない場合

  • まず画像は読み込めているか?
  • read_idsはしっかりマーカーと対応してる?
  • threshold=Trueにして二値化処理を行ってみる

最後の余分領域の削除について

表画像のマーカー中心からpad[px]分だけ離れたところまで残すようにしている

その他

githubのリンク: https://github.com/ogaken1104/blend 質問があれば小川までお願いします。

blend's People

Contributors

ogaken1104 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.