Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Quickstart-android/mlkitについて

 Quickstart-android/mlkitについて

2018/07/02(月)にGoogle Japanで開催したFirebase meetup #4にて発表したLTの資料です

yamacraft

July 02, 2018
Tweet

More Decks by yamacraft

Other Decks in Technology

Transcript

  1. Quickstart-android/
    mlkit ʹ͍ͭͯ
    @yamacraft

    View full-size slide

  2. profile
    • @yamacraft (Wataru Yamada)
    • Mobile Application Engineer
    • Freelance ʗ (private)team Y.G.E.
    • Getting Over It (Save 40%Off in steam)
    • 113(50+50+13)wins / BestTime 7min →

    View full-size slide

  3. ެࣜαϯϓϧ঺հʗղઆ͠·͢
    ʢإೝূ෦෼ͷΈʣ

    إೝূαϯϓϧϓϩδΣΫτ࡞੒ΛఘΊͨஉ

    View full-size slide

  4. firebase/quickstart-android

    View full-size slide

  5. MLKit෦෼Λಈ͔͢ʹ͸ʁ

    View full-size slide

  6. 1. git clone͢Δ

    View full-size slide

  7. 2. firebaseϓϩδΣΫτͷ࡞੒
    • ϓϩδΣΫτ໊ࣗମ
    ͸ͳΜͰ΋͍͍
    • ௥Ճ͢ΔAndroidΞϓ
    Ϧͷύοέʔδ໊ʹ
    ஫ҙ

    View full-size slide

  8. 3. ࣮ߦʂ
    • mlkit/appҎԼʹɺgoogle-service.jsonΛೖΕ
    Δ
    • configΛʮmlkit-appʯʹͯ͠Runʂ

    View full-size slide

  9. ެࣜαϯϓϧϓϩδΣΫτ͕
    ΍͍ͬͯΔ͜ͱ

    View full-size slide

  10. ެࣜαϯϓϧ͕΍͍ͬͯΔ͜ͱ
    • Χϝϥͷ੍ޚʢCamera1 APIʂʣ
    • onPreviewFrameͰϓϨϏϡʔը໘ͷBufferΛ
    FirebaseVisionFaceDetectorʹྲྀ͠ࠐΈ
    • ↑ҙਤతʹ্هͷݺͼग़͠Λ૿΍ͨ͢ΊʢϑϨʔϜඈͼ๷
    ࢭʁʣʹaddCallbackBuffer()Λେྔʹొ࿥
    • FirebaseVisionFaceDetectorͷ݁ՌΛݩʹɺϓϨϏϡʔը໘ʹ
    ݁ՌΛΦʔόʔϨΠ

    View full-size slide

  11. LivePreviewActivityͷத਎
    ˞ͪΐͬͱࣗ৴ͳ͍ʜ

    View full-size slide

  12. ίʔυͷେ൒͕Χϝϥ੍ޚʂ

    View full-size slide

  13. MLKitΛ࢖͏ʹ؆୯
    MLKitΛ࢖͏લޙͷ੍ޚ
    ʹਏ͍

    View full-size slide

  14. ࣍ճ·ͰʹϦϕϯδ͠·͢ʂ

    View full-size slide

  15. Ͳ͔͜ͰϦϕϯδ͠·͢ʂ

    View full-size slide