LoginSignup
12
4

More than 3 years have passed since last update.

ARKit画像マーカーに適した画像適さない画像

Last updated at Posted at 2018-12-15

ダメな画像

模様が少ない画像

スクリーンショット 2018-12-15 13.36.35.png

上図のような模様の少ない画像は使えるっちゃ使えるものの推奨されておらず、精度が下がってしまいます。

WWDCのsessionでも指摘されています。

aj580.jpg

まだあるダメ条件

スクリーンショット 2018-12-15 13.51.57.png

試しに明らかにダメっぽい画像をいれてみました。

  • AR reference Image must have non-zero positive width
  • AR reference Image the histogram of the image is narrow or not well distributed. Recognition works better on images with wider, flatter histograms.
  • AR reference: The image has uniform color regions, low texture, or low contrast regions. Recognition works better when there are higher local contrast regions distributed across the image.
  • AR reference: The resolution of the image is low. Both width and height should be at least 480 pixels

  • 3:1より横長はダメ

  • 明暗がはっきりした方がいい

  • 色の均一領域広すぎダメ

  • 縦横480px以上

といった感じ。

まだまだあるダメ条件

先日書いた記事にARWorldTrackingConfigurationで画像認識を使うと固まる問題というのがあるのですが、

AR Image Resourcesではアラート出ないけど、ビルドしたら固まる画像があります。(Xcode10.0現在)

  • pngじゃだめ。jpgが安全

pngだとarkit起動した瞬間に固まることあります。しかも全く関係ないエラーログで。。。w

良い画像

スクリーンショット 2018-12-15 10.42.28.png

こういう画像だと大丈夫です。下記の通りエラーが出ませんでした!

スクリーンショット 2018-12-15 14.07.45.png

まとめ

  • 3:1より横長はダメ
  • 明暗がはっきりした方がいい
  • 色の均一領域広すぎダメ
  • 縦横480px以上
  • pngじゃなくてjpgにすべし
  • 筋肉はすべてを解決してくれる
12
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
4