3

I am creating windows 8 store application with MonoGame framework. I want to get each bitmap from camera in order to process some image recognition on that bitmap. The thing is I only get the whole video stream from camera (randomAccessStream) but not each frame from the video.

 async private void Start_Click(object sender, RoutedEventArgs e)
        {
            //1. Initialize:
            mediaCaptureMgr = new MediaCapture();
            randomAccessStream = new InMemoryRandomAccessStream();

            await mediaCaptureMgr.InitializeAsync();

            //2. create profile
            MediaEncodingProfile encordingProfile = MediaEncodingProfile.CreateWmv(VideoEncodingQuality.Auto);

            //3. start recording
            await mediaCaptureMgr.StartRecordToStreamAsync(encordingProfile, randomAccessStream);
        }

How can I receive new up-coming frame/bitmap from camera?

Minh Nguyen
  • 2,106
  • 1
  • 28
  • 34

1 Answers1

1

Take a look here

It is a sample app from Microsoft. Among other things it shows:

  • How to capture an image using the new LowLagPhotoCapture and LowLagPhotoControl classes.
  • How to capture a sequence of photos using the new LowLagPhotoSequenceCapture and LowLagPhotoSequenceControl classes.
  • ...

If you are going to process the images, you could just take pictures on an interval. I don't think you need to process every single frame of a video stream..

deherch
  • 659
  • 4
  • 9