×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Feb 2008
    Posts
    9

    Compensation Exposure Nokia n73

    Hi, I'm searching for a way to change my compensation exposure for my photos (I need not to move my camera, since I want to create hdr photos).
    My code is something like that:
    Code:
    import camera
    import time
    def name():
        name=0
        while 1:
            try:
                open("e:\\images\\%s.jpg" % name).read()
                name+=1
            except:
                break
        return "e:\\images\\%s.jpg" % name
            
    def photo():
        modes=camera.exposure_modes() ##reiceve a list of all available exps
        print "You've got 10 secs to get ready!"
        for i in range(11): 
            time.sleep(1)
            print "- %s" % i
        print "Start taking photos, don't move device!\n"
        for i in modes: ##iterate all modes
            fn=name() ##Do not overwrite
            img=camera.take_photo(exposure=i)
            img.save(fn) 
            print "Photo with exp %s done..\n" % i
        print "\nEND\n"
            
    photo()
    But the photos are all very similar!
    Can you give me a hint?

  2. #2
    Registered User
    Join Date
    Jun 2006
    Posts
    4

    Re: Compensation Exposure Nokia n73

    I was making just the same script for my N82. If you look at the python docs in the camera module, you will see that these are the available options:

    * exposure is the exposure adjustment of the device. Exposure is a combination of lens aperture and shutter speed used in taking a photograph. The default value is 'auto'. The following exposure modes are supported:
    - 'auto'
    Sets exposure automatically. Default value, always supported
    - 'night'
    Night-time setting for long exposures
    - 'backlight'
    Backlight setting for bright backgrounds
    - 'center'
    Centered mode for ignoring surroundings

    You can also check for the device capabilities calling the exposure modes() function. My N82 returns just the same as above. The problem is that my script takes 4 pictures, each one with one of this values but the resulting images only have 2 different exposure levels. I at least hope to get 3 (night, backlight and center) with the auto mode shoot just to test all options. And then another problem is that this 2 different pictures are quite similar, plus you can't use autofocus on python so you end with not enough samples for your HDR photo.

    The end is that the camera module is not ready for this kind of jobs now, as it far from the real camera capabilities of some of the new symbian phones. I'm now working with the real S60 SDK that I hate but for a simple app like this I hope to have something very basic working by this weekend.

  3. #3
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: Compensation Exposure Nokia n73

    hi talentdream
    ur code seems perfect and it must be working fine.
    as said by zeool the exposure mode depends on many factors may be the program worked fine but due to that conditions the images may be looking same.
    thanx

  4. #4
    Regular Contributor
    Join Date
    Dec 2007
    Location
    India
    Posts
    133

    Re: Compensation Exposure Nokia n73

    I agree with Zerool, High Definition resolution Imagaes are not quite possible in Python, I tested the code on my device N95 8GB which gives 2 little dissimilar images, but this is when they were taken in dark.
    So I think there is some parameters that vary sligtly,
    Kandyfloss

    V 7.0642.0
    18-10-06
    RH-51
    Nokia 7610

  5. #5
    Registered User
    Join Date
    Sep 2007
    Posts
    6

    Re: Compensation Exposure Nokia n73

    I've modified test_viewfinder.py that comes with the Nokia CV camera library. I added support for multiple exposure compensations by selecting "HDR" from the exposure comensation menu. I also added support for switching the flash on/off. Images are saved to E:\Images.

    At high resolution, it takes a while to run through all the exposures.

    This is my first non-"hello world" work in Python, so let me know if anything doesn't work correctly, please

    Tested on N95 and available at the AAS forums or N95 Users forums.

  6. #6
    Registered User
    Join Date
    Feb 2005
    Location
    Belgium (Europe)
    Posts
    1,352

    Re: Compensation Exposure Nokia n73

    Quote Originally Posted by alex.simpson View Post
    I've modified test_viewfinder.py that comes with the Nokia CV camera library. I added support for multiple exposure compensations by selecting "HDR" from the exposure comensation menu. I also added support for switching the flash on/off. Images are saved to E:\Images.

    At high resolution, it takes a while to run through all the exposures.

    This is my first non-"hello world" work in Python, so let me know if anything doesn't work correctly, please

    Tested on N95 and available at the AAS forums or N95 Users forums.
    Great

    Thanks

    I'll test it soon.

    BR
    Cyke64
    pys60 1.4.5 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !

    Find my pys60 extension modules on cyke64.googlepages.com

  7. #7
    Registered User
    Join Date
    Sep 2007
    Posts
    6

    Re: Compensation Exposure Nokia n73

    I've updated it with more features (showing what's happening, allowing for different size steps of exposure compensation).

    It doesn't seem to be very stable, though, often causing Python to exit with no error. I imagine that it's related to the native library, but with so little documentation, it's hard to tell.

    Available at AAS and N95 users.

    If anyone can help with the stability issues, I'd be grateful!

  8. #8
    Super Contributor
    Join Date
    Mar 2003
    Location
    Espoo, Finland
    Posts
    976

    Re: Compensation Exposure Nokia n73

    Thanx,

    Downloaded and saved, hope to remember to install it next week! About mysterious crashes, I would bet on running out of memory or heap. Have you tried to e.g. create a SIS and increase default heap size with Ensymble?

    Cheers,

    --jouni

  9. #9
    Registered User
    Join Date
    Sep 2007
    Posts
    6

    Re: Compensation Exposure Nokia n73

    Thanks, I suspected that myself (in this release I moved the call to take the next photo out of the handlePhoto() callback and in to the main loop in case this was causing issues - I'm still not completely familiar with the Symbian active objects, but it looks like all callbacks are made in the main thread, thanks to the ao_callgate() wrappers around them), but tracking the free memory (with sysinfo.free_ram()) doesn't seem to show anything and I've had it fail taking 3 * 640x480 pictures. Is there a per-process heap that's different from the value returned by sysinfo.free_ram()?

    I haven't tried Ensymble yet - thanks for the suggestion. Is there a way of altering the heap size at runtime, or is using Ensymble the only way?

    I'm thinking that it could be a problem with the PyCameraLib API, but I'd really like to be proven wrong (as there's not much that I can do to fix that!).
    Last edited by alex.simpson; 2008-12-07 at 00:07.

  10. #10
    Super Contributor
    Join Date
    May 2004
    Location
    Tampere, Finland
    Posts
    524

    Re: Compensation Exposure Nokia n73

    Quote Originally Posted by alex.simpson View Post
    Is there a way of altering the heap size at runtime, or is using Ensymble the only way?
    Maximum heap size is a property of a process. I don't think there's a way to change it after the process has started, even in C++. Changing it from inside Python is definitely impossible for now.

Similar Threads

  1. which phones for laptop
    By dvdljns in forum PC Suite API and PC Connectivity SDK
    Replies: 2
    Last Post: 2006-02-14, 12:58
  2. Infra-red capability
    By Symbian_Challenge_0412 in forum General Development Questions
    Replies: 1
    Last Post: 2005-08-16, 18:24
  3. Nokia Mobile VPN Client
    By marcyl in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2003-12-01, 14:47

Posting Permissions

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