locked
which to use MediaCapture and CameraCaptureUI for zoom and capture photo

    Question

  • Hi, I have these questions:

    1. Does Win8.1 Tablet have Zoom feature?

    2. How to implement Zoom feature?

    3. Which api to use : MediaCapture or CameraCaptureUI  for taking photo.

    4. Does Win8.1 Tablet has Autofocus Feature?

    Thanks


    • Edited by FireDance Tuesday, October 28, 2014 10:11 AM typo
    Tuesday, October 28, 2014 10:09 AM

Answers

  •  don't think there is an API for setting the aspect ratio using MediaCapture, so you may want to consider using CameraCaptureUI instead, if aspect ratio selection is important to you, though CameraCaptureUI will leave the choice of source aspect ratio in the hands of the user (you can, however, programmatically control the starting aspect ratio of the cropped image if the user chooses to crop the original capture).

    Check out the following sample:

    http://code.msdn.microsoft.com/windowsapps/CameraCaptureUI-Sample-845a53ac

    It shows how to use the CameraCaptureUI object to set the aspect ratio for cropping, which is the best you can do programmatically, I believe. Here's the relevant code:

    CameraCaptureUI dialog = new CameraCaptureUI();
    Size aspectRatio = new Size(16, 9);
    dialog.PhotoSettings.CroppedAspectRatio = aspectRatio;
    

    You can also restrict the maximum resolution that the user can select, but not the capture aspect ratio.

    Monday, November 3, 2014 7:26 AM
  • The cropping portion of the thing can be done outside of the actual capture (which is what CameraCaptureUI actually does). Media capture provides you with basic API for capturing stuff, and nothing more. It won't spoon-feed you anything. You have to do it all manually.
    Monday, November 3, 2014 9:45 AM

All replies

  • You can implement everything manually with MediaCapture.

    You get it all done with CameraCaptureUI.The features mostly depend on the hardware you run on, rather than the API.

    Tuesday, October 28, 2014 10:36 AM
  • Is CameraCaptureUI using this MediaCapture api?

    I wonder why Camera App using CameraCaptureUI has better performance than App using MediaCapture api in terms of viewing?

    This was based on these tablets: Lenovo Mii2, Toshiba  and Panasonic FZ -m1.

    The App using CameraCaptureUI run on Panasonic has lagging effect if you point at the target and move the camera horizontally away from the target.

    App using Mediacapture has the same lagging effect in Panasonic as well.

    Is this means Camera Driver is different?


    • Edited by FireDance Friday, October 31, 2014 8:28 AM
    Friday, October 31, 2014 8:25 AM
  • No. They marshal through the same drivers, but camera capture UI is more optimized since it has a clear purpose. Media capture is slower cause it needs to be much more adaptive.

    As I said, the driver for cameras is mostly dependent on OEM. Some OEMs only provide basic drivers and in some version they won't even work with either API, but just the OEM specific App (in the case of asus, for example, led flash can't be controlled by the MediaCapture API, only through the asus camera app)

    • Edited by mcosmin Friday, October 31, 2014 8:49 PM
    Friday, October 31, 2014 8:41 PM
  •  don't think there is an API for setting the aspect ratio using MediaCapture, so you may want to consider using CameraCaptureUI instead, if aspect ratio selection is important to you, though CameraCaptureUI will leave the choice of source aspect ratio in the hands of the user (you can, however, programmatically control the starting aspect ratio of the cropped image if the user chooses to crop the original capture).

    Check out the following sample:

    http://code.msdn.microsoft.com/windowsapps/CameraCaptureUI-Sample-845a53ac

    It shows how to use the CameraCaptureUI object to set the aspect ratio for cropping, which is the best you can do programmatically, I believe. Here's the relevant code:

    CameraCaptureUI dialog = new CameraCaptureUI();
    Size aspectRatio = new Size(16, 9);
    dialog.PhotoSettings.CroppedAspectRatio = aspectRatio;
    

    You can also restrict the maximum resolution that the user can select, but not the capture aspect ratio.

    Monday, November 3, 2014 7:26 AM
  • The cropping portion of the thing can be done outside of the actual capture (which is what CameraCaptureUI actually does). Media capture provides you with basic API for capturing stuff, and nothing more. It won't spoon-feed you anything. You have to do it all manually.
    Monday, November 3, 2014 9:45 AM