protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.FaceTracker); _cameraSourcePreview = FindViewById <CameraSourcePreview>(Resource.Id.cameraSourcePreview); _overlay = FindViewById <GraphicOverlay>(Resource.Id.faceOverlay); var detector = new FaceDetector.Builder(Application.Context) //.SetTrackingEnabled(false) .SetLandmarkType(LandmarkDetectionType.All) .SetMode(FaceDetectionMode.Accurate) .Build(); detector.SetProcessor( new MultiProcessor.Builder(new FaceTrackerFactory(_overlay)).Build()); _cameraSource = new CameraSource.Builder(this, detector) .SetAutoFocusEnabled(true) //.SetRequestedPreviewSize(640, 480) .SetFacing(CameraFacing.Front) .SetRequestedFps(30.0f) .Build(); }
/// <summary> /// コンストラクタ /// </summary> /// <param name="parent"></param> public SurfaceCallback(CameraSourcePreview parent) { Parent = parent; }