Mobile Vision

8928b5277aa7234dbca4ff782952343a?s=47 funnelbit
August 31, 2016

Mobile Vision

8928b5277aa7234dbca4ff782952343a?s=128

funnelbit

August 31, 2016
Tweet

Transcript

  1. 5.
  2. 9.

    %FUFDUPS5 Frame frame = new Frame.Builder().setBitmap(bitmap).build(); FaceDetector detector = new

    FaceDetector.Builder(context)
 .setProminentFaceOnly(true)
 .build(); 
 SparseArray<Face> faces = detector.detect(frame); Face face = faces.valueAt(0);
  3. 11.
  4. 12.

    5SBDLFS w நग़͞ΕͨJUFNͷঢ়ଶมԽΛ஌ΔͨΊͷΫϥε private class FaceTracker extends Tracker<Face> {
 @Override


    public void onNewItem(int faceId, Face item) {
 // item ͷτϥοΩϯά͕։࢝͞Εͨ
 }
 @Override
 public void onUpdate(FaceDetector.Detections<Face> detectionResults, Face face) {
 // ͢Ͱʹ։͍࢝ͯ͠Δ item ͕Ξοϓσʔτ͞Εͨ
 }
 @Override
 public void onMissing(FaceDetector.Detections<Face> detectionResults) {
 // τϥοΩϯάʹࣦഊͨ͠ }
 @Override
 public void onDone() {
 // ͢ͰʹτϥοΩϯά͍ͯͨ͠ item ͕ແ͘ͳΓɺτϥοΩϯά͕ऴྃͨ͠
 }
 }
  5. 14.

    .VMUJ1SPDFTTPS w ෳ਺ͷݕग़ΛϋϯυϦϯά͠ɺ5SBDLFSʹ௨஌͢Δ 
 FaceDetector faceDetector = …
 faceDetector.setProcessor(new MultiProcessor.Builder<>(


    new MultiProcessor.Factory<Face>() {
 @Override
 public Tracker<Face> create(Face face) {
 return new FaceTracker();
 }
 }
 ).build());
 cameraSource.build(getApplicationContext(), faceDetector);
  6. 18.

    .VMUJ%FUFDUPS 'SBNF %FUFDUPS 'SBNF 'SBNF 5SBDLFS 5SBDLFS $BNFSB4PVSDF .VMUJ%FUFDUPS %FUFDUPS

    5SBDLFS 5SBDLFS .VMUJ1SPDFTTPS 5SBDLFS'BDUPSZ .VMUJ1SPDFTTPS 5SBDLFS'BDUPSZ JUFN JUFN JUFN JUFN
  7. 19.