Discussion Board

Results 1 to 13 of 13
  1. #1
    Registered User
    Join Date
    Feb 2014
    Posts
    4

    Video capture for CV - Disable auto white balance

    Hi,

    I am creating an app that employs some computer vision techniques together with live video capture on Windows Phone 8.
    In order to get reliant results however, I need to be able to disable all processes that potentially disrupt the temporal consistency.

    I have already disabled auto focus using the KnownCameraGeneralProperties on the AudioVideoCaptureDevice (native C++), however I would also like to disable the auto white balance and, if possible, the auto exposure.
    These properties are exposed for photo capture with the KnownCameraPhotoProperties, however no such properties seem to exist for the AudioVideoCaptureDevice...

    Auto white balance can be disabled in both Microsoft's and Nokia's video capture app, so it should be possible somehow.

    Does anyone have an idea on how to disable auto white balance / exposure for video capture via AudioVideoCaptureDevice? Thanks in advance.

  2. #2
    Regular Contributor
    Join Date
    Nov 2011
    Location
    la bouexiere, france
    Posts
    481

    Re: Video capture for CV - Disable auto white balance

    Hi,
    If you only need live, you could use Photo Capture preview.
    Windows 8, Windows phone 8 or Nokia Asha developer? Go to DVLUP

  3. #3
    Registered User
    Join Date
    Feb 2014
    Posts
    4

    Re: Video capture for CV - Disable auto white balance

    Hi,

    This is indeed an option that I hadn't yet considered.
    I would have liked to have full resolution flexibility, but the PhotoCaptureDevice preview might already offer enough at this time.

    Thank you for the suggestion!

  4. #4
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    529

    Re: Video capture for CV - Disable auto white balance

    At least all Nokia devices I've tested so far support at least 1280x720 for the photo preview resolution. The Lumia 1520 also supports a preview resolution of 1920x1080. The Huawei and HTC WVGA devices however only support lower preview resolutions. You'll have to test for those. Also not all devices support 1920x1080 video capture. WVGA devices regularly only support 1280x720 for capture as well.

  5. #5
    Registered User
    Join Date
    Feb 2014
    Posts
    4

    Re: Video capture for CV - Disable auto white balance

    Thanks for that information SB Dev, I didn't realize the preview resolutions varied as much.

    I have an additional problem however which seems to invalidate the photo capture preview approach. Setting properties such as manual white balance, exposure and so on only seems to affect the pictures taken with the PhotoCaptureDevice, and not the preview stream itself. After seeing this in my own app, I checked with the Nokia's 'CameraExplorer' demo app and also there this is the case...

    So I guess I'm back to my initial question. Can I get access to a live video feed in which I can manually control things like focus, white balance and exposure? Thanks.

  6. #6
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    529

    Re: Video capture for CV - Disable auto white balance

    After setting those properties did you call FocusAsync()? Most settings are only applied when you call that method. I know that to be the case for the Focus settings at least but I don't know wether the same is true for (at least some of) the others.

    I think it's unlikely that you can manually change the exposure on video capture. The time for each frame has a pretty fixed slot defined by the framerate. Changing the ISO settings might give you results there.

  7. #7
    Registered User
    Join Date
    Feb 2014
    Posts
    4

    Re: Video capture for CV - Disable auto white balance

    SB Dev,

    Thanks for the comment. I did not call FocusAsync after setting for example the white balance as I assumed this was only needed for updating the focus. I shall give it a try.

    Your point on setting the exposure for video is probably valid. I've worked with standalone cameras in which the framerate adapts to the exposure time, but It's plausible this will not be the case with these built-in cameras.

  8. #8
    Registered User
    Join Date
    Mar 2014
    Posts
    4

    Re: Video capture for CV - Disable auto white balance

    Quote Originally Posted by SB Dev View Post
    After setting those properties did you call FocusAsync()? Most settings are only applied when you call that method. I know that to be the case for the Focus settings at least but I don't know wether the same is true for (at least some of) the others.

    I think it's unlikely that you can manually change the exposure on video capture. The time for each frame has a pretty fixed slot defined by the framerate. Changing the ISO settings might give you results there.
    Hi there, sorry to hjack the topic. YOu mentioned that it is unlikely one can manually change the exposure on video capture, may I know why? Do you mean that it takes more than one frame time for the exposure value to take effect.

    I am trying to made a HDR Video app, so I need to have Frame | t = 0 with normal exposure and the next Frame | 1/30 with Higher exposure, then Frame | 2/30 with normal exposure again and so on so forth, is this not possible?

    Thanks

  9. #9
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    529

    Re: Video capture for CV - Disable auto white balance

    Most often people mean changing exposure time when they say 'change exposure'. The other ways to change it would be to change the aperture (which is fixed on Smartphone cameras) and lastly to change the ISO setting of the sensor. So basically you could only use ISO. If I remember correctly the ISO setting is always automatic in the Windows Phone APIs for video capture but I'd have to look it up (I have mainly been working with still image capture so far).

  10. #10
    Registered User
    Join Date
    Mar 2014
    Posts
    4

    Re: Video capture for CV - Disable auto white balance

    Oh yes! I forget that the Aperture value is fixed.

    but I know that, for instance my Nokia 925 supports a shutter speed from the fastest 1/16000 to 1/30 .... 4 seconds. Since the frame rate of a movie is always 30 ( not sure if we can change it via KnownCameraAudioVideoProperties.VideoFrameRate property) but I assume the max. fps is 30.

    So does that mean I can still control the "exposure" of each frame in between 1/16000 <--> 1/30 ???

  11. #11
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    529

    Re: Video capture for CV - Disable auto white balance

    You would have to look in the documentation but if I remember correctly than you can't control exposure time for video frames. They always use 1/30. I believe that at least the native camera application can also set it to 25 fps but you can't change that during capture.

  12. #12
    Registered User
    Join Date
    Mar 2014
    Posts
    4

    Re: Video capture for CV - Disable auto white balance

    Quote Originally Posted by SB Dev View Post
    You would have to look in the documentation but if I remember correctly than you can't control exposure time for video frames. They always use 1/30. I believe that at least the native camera application can also set it to 25 fps but you can't change that during capture.
    That's a bad news. I just realized that in both the NOkia Pro cam and the stock camera app, you only can change the white balance and the format, but I guess I just need to try.

    Because there was an app (Video Camera Pro) on the store, which allows us to change the focus on the fly during video recording, which is not provided in the Nokia Pro or Stock camera app. I am still finding a sample to record video using AudioVideoCaptureDevice, do you know if there is one atm?

    Anyway, thanks for the reply, the Nokia Developer community seems to be better than the Microsoft Phone dev. community! I appreciate your help.

  13. #13
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    529

    Re: Video capture for CV - Disable auto white balance

    This article builds a basic app and it references a video recorder sample by Microsoft: http://msdn.microsoft.com/en-us/libr...v=vs.105).aspx

    I guess it's at least a good starting point.

Similar Threads

  1. Fixing Camera White Balance Levels
    By skela in forum Symbian Media (Closed)
    Replies: 16
    Last Post: 2008-09-30, 19:34
  2. N73 Video Capture = White Screen!
    By sambo1972 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2007-06-22, 18:26
  3. White balance on 3650/6600 camera
    By JTierno in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2003-11-19, 11:59
  4. White balance on 3650
    By Lebihen in forum General Development Questions
    Replies: 0
    Last Post: 2003-09-02, 17:11

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×