ダメな画像
模様が少ない画像

上図のような模様の少ない画像は使えるっちゃ使えるものの推奨されておらず、精度が下がってしまいます。
WWDCのsessionでも指摘されています。
まだあるダメ条件

試しに明らかにダメっぽい画像をいれてみました。
-
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
#良い画像

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

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