Example #1
0
        private int compressquality = 100; //tested ok for now with lossy jpeg compression default for now byt need to be user configurable

        protected override void OnCreate(Bundle bundle)
        {
            try
            {
                base.OnCreate(bundle);
                this.RequestWindowFeature(WindowFeatures.NoTitle);

                this.Window.AddFlags(Android.Views.WindowManagerFlags.Fullscreen);

                // Set our view from the "main" layout resource
                SetContentView(Resource.Layout.VideoCapture);

                mPreview         = FindViewById <CameraSourcePreview>(Resource.Id.preview);
                mGraphicOverlay  = FindViewById <GraphicOverlay>(Resource.Id.faceOverlay);
                mRecbutton       = FindViewById <Button>(Resource.Id.btnRecord);
                mSwitchcamButton = FindViewById <ImageButton>(Resource.Id.btnswCam);
                mPlaybutton      = FindViewById <Button>(Resource.Id.btnPlay);

                mRecbutton.Click       += (sender, e) => ToggleRecording();
                mSwitchcamButton.Click += (sender, e) => ToggleCamface();
                mPlaybutton.Click      += (sender, e) => OpenVideo();
                mPlaybutton.Enabled     = _currentfilepath != null;

                SetVideoSize(camface);
                CreateCameraSource(false);
            }
            catch (Exception e)
            {
            }
        }
Example #2
0
        protected override void OnCreate(Bundle bundle)
        {
            try
            {
                base.OnCreate(bundle);
                RequestWindowFeature(WindowFeatures.NoTitle);

                Window.AddFlags(WindowManagerFlags.Fullscreen);

                // Set our view from the "main" layout resource
                SetContentView(Resource.Layout.VideoCapture);

                mGraphicOverlay     = FindViewById <GraphicOverlay>(Resource.Id.faceOverlay);
                mRecbutton          = FindViewById <Button>(Resource.Id.btnRecord);
                mSwitchcamButton    = FindViewById <ImageButton>(Resource.Id.btnswCam);
                mPlaybutton         = FindViewById <Button>(Resource.Id.btnPlay);
                mReAnalyzebutton    = FindViewById <Button>(Resource.Id.btnReAnalyze);
                mFilepickbutton     = FindViewById <Button>(Resource.Id.btnpickfile);
                mProcessExistbutton = FindViewById <Button>(Resource.Id.btnProcess);

                mRecbutton.Click       += (sender, e) => ToggleRecording();
                mSwitchcamButton.Click += (sender, e) => ToggleCamface();
                mPlaybutton.Click      += (sender, e) => OpenVideo();
                TogglePlay(_outputfilepath != null);
                mReAnalyzebutton.Click     += (sender, e) => ReTrimVideo();
                mReAnalyzebutton.Enabled    = _fdp != null;
                mFilepickbutton.Click      += (sender, e) => Pickfile();
                mProcessExistbutton.Click  += (sender, e) => StartAllProcessing();
                mProcessExistbutton.Enabled = _inputfilename != null;
            }
            catch (Exception e)
            {
            }
        }
Example #3
0
 public GraphicFaceTracker(GraphicOverlay overlay)
 {
     mOverlay     = overlay;
     mFaceGraphic = new FaceGraphic(overlay);
 }
Example #4
0
 public void Start(CameraSource cameraSource, GraphicOverlay overlay)
 {
     mOverlay = overlay;
     Start(cameraSource);
 }