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(); }
public TrackingFacesGraphics(GraphicOverlay graphicOverlay) : base() { this.graphicOverlay = graphicOverlay; }
public TrakerFace(GraphicOverlay nakladkaGraficzna) { this.graphicOverlay = nakladkaGraficzna; faceGraphic = new DrawingOverlay(nakladkaGraficzna); }
public DrawingOverlay(GraphicOverlay graphicOverlay) : base(graphicOverlay) { SetFrame(); }
public FrameGraphic(GraphicOverlay graphicOverlay) { this.graphicOverlay = graphicOverlay; }
public void Start(CameraSource cameraSource, GraphicOverlay graphicOverlay) { this.graphicOverlay = graphicOverlay; Start(cameraSource); }