none
Surface 2 Camera Focus - Is there a way to alter the focal point of the surface 2 camera?

    Question

  • I am working to update a barcode scanning app I wrote for the surface rt so it will work on the surface 2. The issue I am having is that the Surface 2 camera appears to have a significantly longer focal distance than the rt.

    In order to correctly identify a barcode you need an image that clearly delineates the barcode lines. Unfortunately the images captures with the Surface 2 are either a blurry blob if you get close enough to get a decent size image of the barcode or if you take the photo from a distance that the far enough to ensure the barcode is in focus the lines are too close and small to be clearly delineated.

    I am using a MediaCapture object to control the image capture process, which gives access to a VideoDeviceControl object which in turn exposes a focus control. Unfortunately, this focus control appears to be disabled for the Surface devices, so I can't use it to set auto focus or manually select a focus point.

    Does anyone know if it is possible to alter the focal point of the Surface 2 cameras?

    Alternatively if there is no way to alter the focal point, does anyone have any suggestions for ways I can get a good enough quality image to perform a barcode scan process?

    (Note I am already performing post capture image enhancements to increase contrast, sharpness and edge detection)

    Saturday, October 26, 2013 3:51 AM

Answers

  • No, VideoDeviceControl is the way to programmatically control focus.

    I can't comment on what the Surface 2 (or any other specific device, although I do have a Surface RT) supports. You'll need to check with the Surface forums.

    --Rob

    Thursday, October 31, 2013 11:07 PM
    Owner

All replies

  • The VideoDeviceControl is the way to do this, but it is dependant on support from the underlying system. I'm not familiar with the support levels of different devices (such as Surface 2). You can see if you can use the built-in camera apps to fiddle with the focus, and if so then you are probably doing something wrong in your code.

    --Rob

    Saturday, October 26, 2013 10:16 PM
    Owner
  • I am pretty sure it is not a code problem, at least in that the current code works on the surface rt and my laptop computer. The current code checks the availability of several basic camera controls and provides access to alter them if are enabled. Which is working even on the surface 2; however the focus control shows it is unavailable.

    My question, is basically if the focus setting is somehow controllable at some more basic level?

    Alternatively if the surface 2's camera is fully fixed and cannot be alerted, does anyone have a suggestion of camera filters or post image processing that might allow me to produce a usable image for barcode analysis? (note I am already performing sharpening, edge detection, and contrast enhancements)

    Sunday, October 27, 2013 5:21 AM
  • No, VideoDeviceControl is the way to programmatically control focus.

    I can't comment on what the Surface 2 (or any other specific device, although I do have a Surface RT) supports. You'll need to check with the Surface forums.

    --Rob

    Thursday, October 31, 2013 11:07 PM
    Owner
  • why support the Surface 2 if you know the camera is not able to capture a clean image of the barcode due to the fact that it's a fixed focus camera ?  There are many other Window tablets out there that offer better cameras which your app will work better on.  Your best bet is to wait for an updated firmware which addresses the camera focus issue until then don't waste anymore time with Surface2 if you can.  I'm sure they know about the camera quality, it's very poor, and shouldn't be in a tablet if it cannot capture a barcode easily.
    Tuesday, December 03, 2013 11:41 PM