×

Discussion Board

Results 1 to 13 of 13
  1. #1
    Registered User
    Join Date
    Dec 2005
    Location
    Finland
    Posts
    109

    Autofocus & video capture

    Hi all,

    I'm trying to use new autofocus implementation provided by CCameraAdvancedSettings.

    I'm currently capturing frames from camera by using StartViewFinderBitmapsL() function with resolution 320x240. But I need bigger resolution (640x480). This works fine in 3rd Edition pre FP2 devices (N95,etc) and image quality is good. But in S60 3rd FP2 devices (6220) image quality is really poor, like jpeg compressed with lowest quality or like scaled from 320x240 (or smaller). When using StartViewFinderBitmapsL autofocus works fine.

    To get better quality frames I tried to use StartVideoCapture() to get image buffers, quality seems better in 3rd FP2 devices, but autofocus is not working. It initializes well but when i call iAdvSettings->SetAutoFocusType(CCamera::CCameraAdvancedSettings::EAutoFocusTypeSingle);
    it allways completes with throws two new events in HandleEvent
    KUidECamEventCameraSettingFocusRangeUidValue:-18
    KUidECamEventCameraSettingAutoFocusType2UidValue:-18

    Any ideas howto get autofocus work on video capture? Amazingly it works in SE P990i and I have allways ranked Nokia before SE in multimedia implemantations.

    Thanks,
    Jascco

  2. #2
    Nokia Developer Expert
    Join Date
    Dec 2003
    Posts
    148

    Re: Autofocus & video capture

    Auto focus is not supported in video capture. There are some technical reasons behind that but also having a single shot focus does not make much sense during video capture...

    The view finder quality is not so much dependent on the S60 version used but the camera HW integrated in to the device. As you have noticed there are some limitations in 6220 HW compared to N95.
    janza

  3. #3
    Registered User
    Join Date
    Dec 2005
    Location
    Finland
    Posts
    109

    Re: Autofocus & video capture

    Thanks janza for your answer.

    I was looking for this video capture solution so that I could get better quality frames for image processing.

    Can you give me any hints how to get best quality out of camera, without using image capturing? Is there some magic resolution that is native across 3rd edition devices or something?

  4. #4
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: Autofocus & video capture

    Hi,

    There is no magic that will work across all devices. As janza said, it is the hardware on each phone that determines what you can do. Some devices have special hardware acceleration for the camera, others don't. That's why some support VGA video recording and others don't have that feature. If you try to use a low-end smartphone to do a high-end task it won't work very well.

    Sorcery

  5. #5
    Registered User
    Join Date
    Dec 2005
    Location
    Finland
    Posts
    109

    Re: Autofocus & video capture

    Quote Originally Posted by Sorcery-ltd View Post
    Hi,

    There is no magic that will work across all devices. As janza said, it is the hardware on each phone that determines what you can do. Some devices have special hardware acceleration for the camera, others don't. That's why some support VGA video recording and others don't have that feature. If you try to use a low-end smartphone to do a high-end task it won't work very well.

    Sorcery
    Can't believe that guy with that kind of comment is Forum Nokia Champion.

    As far as I have learned best solution is to use 320x240 frame and do this by calling StarViewFinderBitmapsL(). I'm interest to find some other methods that might improve camera performance.

  6. #6
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: Autofocus & video capture

    Hi,

    Sorry you don't like the answer. I'm just trying to tell you how it is. My comment was specifically aimed at your:
    Is there some magic resolution that is native across 3rd edition devices or something?
    Strangely enough most devices are optimised for viewfinder bitmaps at 320x240 because that is the screen resolution.
    That won't be the case on all device because some don't do a full screen viewfinder (portrait mode camera application only) and others have different screen sizes!

    If you want better performance out of the camera it MIGHT be possible to get it on some devices but then you have to do device specific optimizations. It won't work across the whole range. You can't have your cake and eat it as they say.

    The Symbian Camera API is quite high level and doesn't give you much control. In my opinion it is not a very good API and has become fragmented to address the issues.

    One of the things that contributes to my FNC status is that I (literally) wrote the book on Symbian Multimedia:
    http://developer.symbian.com/main/do...ulti/index.jsp

    Janza has much more inside knowledge on the camera hardware and software internals so he might be able to help you out, but I wouldn't hold my breath if I were you. There are serious limitations in the hardware on some of the lower end devices like memory bandwidth for transferring the frames being simply too low to get a decent framerate and a high resolution.

    Sorcery

  7. #7
    Registered User
    Join Date
    Dec 2005
    Location
    Finland
    Posts
    109

    Re: Autofocus & video capture

    Actually this is the thing I'm looking for:
    If you want better performance out of the camera it MIGHT be possible to get it on some devices
    anything that might improve performance on some devices.

    My current application does image processing well on allmost all S60 devices. But I appriciate any help that might help it perform better.

    The Symbian Camera API is quite high level and doesn't give you much control. In my opinion it is not a very good API and has become fragmented to address the issues.
    I agree with this. I have now worked about three year with CCamera and on every new S60 release I hope that they make it better, but no. And the new CCameraAdvancedSetting just makes things worse. I think UIQ 3.x has the best camera solution for now.

  8. #8
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: Autofocus & video capture

    Hi,

    Sorry, I just refreshed my memory on the 6220 Classic specs and I understand why you didn't like my first answer. The non-Nseries phones used to have awful camera features. This one is an odd combination of top-of-the-range camera features and bottom-of-the-range processing (single CPU - probably the Freescale chip, same as in the cheapest new S60 devices - probably with no on-board imaging acceleration?).

    You might be able to use the autofocus API to pre-focus the camera before you start video capture. Other than that I don't think there will be much you can do apart from what you're already doing. I'm guessing the (separate) camera accelerator always delivers the screen-sized viewfinder bitmaps, so if you ask for larger ones the API just scales them up internally. I could be wrong though.

    Sorcery

  9. #9
    Registered User
    Join Date
    Dec 2005
    Location
    Finland
    Posts
    109

    Re: Autofocus & video capture

    Quote Originally Posted by Sorcery-ltd View Post
    Hi,

    You might be able to use the autofocus API to pre-focus the camera before you start video capture.
    Now that's answer I like. I will try this, thanks

    EDIT: Nah, didn't work. I can hear lens motors clicking, but focus range is probably initialized to some default state. Too bad that default state is for genereal video capturing not for close range (<20 cm) image processing.

    I'm guessing the (separate) camera accelerator always delivers the screen-sized viewfinder bitmaps, so if you ask for larger ones the API just scales them up internally. I could be wrong though.
    It would help greatly if someone with more information could clear this issue. Or we could have some sort list of list models which don't have on-board imaging acceleration and camera chip's native resolutions, etc. Then I could implement my own scaling algorithmn in those models that need it (as chip's scaling algorithmn is weak) or use lower resolution.
    Last edited by jascco; 2008-12-02 at 20:44.

  10. #10
    Nokia Developer Expert
    Join Date
    Dec 2003
    Posts
    148

    Re: Autofocus & video capture

    Almost all of Nokia products include some sort of imaging accelerator. The problem is that every HW has it's own limitations and features so you can not just categorize them in "good" and "bad".

    Mainly the Camera API functionality is optimized for the native camera application since that is what we understand well. It is not very easy to gather these 3rd party application requirements. The best I can do is to read this forum and try to understand what kind of application are being developed out there.
    janza

  11. #11
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: Autofocus & video capture

    Hi,

    To be completely fair, when ECam was originally designed I don't expect anyone really imagined we'd be having 5MPix cameras with VGA video recording and optical zoom and/or autofocus in our phones and still using the same API. Also, this is the area with the highest variability in hardware and yet it is supposed to be covered by a single abstract API. As such, ECam is probably inadequate for historical reasons and the compromises it has to make to isolate applications from the hardware differences.

    I think with the number of people interested in various computer vision, image processing and augmented reality applications around now there is probably a case for exposing some lower level APIs and allowing developers to optimize for specific hardware if they want to. Binary compatibility might not be such a big issue if different builds have to be produced for different devices models anyway.

    Just a thought.

    Sorcery

  12. #12
    Registered User
    Join Date
    Dec 2005
    Location
    Finland
    Posts
    109

    Re: Autofocus & video capture

    I think with the number of people interested in various computer vision, image processing and augmented reality applications around now there is probably a case for exposing some lower level APIs and allowing developers to optimize for specific hardware if they want to
    Totally agree with this.

    Some things I'd like to see might be:
    -Better focus control (just simple function that drives autofocus to closest/furthest focus range would help image processing applications)
    -Access to raw camera sensor data (As now I think some preprocessing is done to optimize data for photos (or different preprocess schemes))
    -More information about cameras in genuine.
    -Better control over camera features

    Binary compatibility might not be such a big issue if different builds have to be produced for different devices models anyway.
    Agree with this too, in image processing application tests have to be made on allmost every device. So if I can tweak my application to every device I don't care if have to deliver multiple sis-files.

  13. #13
    Regular Contributor
    Join Date
    Jan 2006
    Posts
    174

    Re: Autofocus & video capture

    I found auto focus doesn't work on Sony Ericsson U1 when device is previewing in "Video Capture" mode. And this device support "Video Capture" mode only if you want to preview, any suggestion to improve image quality?

Posting Permissions

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