示例#1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.FaceDetector);

            preview        = FindViewById <CameraPreview>(Resource.Id.preview);
            graphicOverlay = FindViewById <GraphicOverlay>(Resource.Id.faceOverlay);

            FaceDetector detector = new FaceDetector.Builder(Application.Context).Build();

            detector.SetProcessor(new MultiProcessor.Builder(new TrackingFacesGraphics(graphicOverlay)).Build());

            if (!detector.IsOperational)
            {
                //TODO    Face detection is not available
            }

            cameraSource = new CameraSource.Builder(Application.Context, detector)
                           .SetRequestedPreviewSize(640, 480)
                           .SetFacing(CameraFacing.Front)
                           .SetRequestedFps(30.0f)
                           .Build();
        }
示例#2
0
 public TrackingFacesGraphics(GraphicOverlay graphicOverlay)
     : base()
 {
     this.graphicOverlay = graphicOverlay;
 }
示例#3
0
 public TrakerFace(GraphicOverlay nakladkaGraficzna)
 {
     this.graphicOverlay = nakladkaGraficzna;
     faceGraphic         = new DrawingOverlay(nakladkaGraficzna);
 }
示例#4
0
 public DrawingOverlay(GraphicOverlay graphicOverlay)
     : base(graphicOverlay)
 {
     SetFrame();
 }
示例#5
0
 public FrameGraphic(GraphicOverlay graphicOverlay)
 {
     this.graphicOverlay = graphicOverlay;
 }
示例#6
0
 public void Start(CameraSource cameraSource, GraphicOverlay graphicOverlay)
 {
     this.graphicOverlay = graphicOverlay;
     Start(cameraSource);
 }