All About Symbian - Nokia (S60) and Sony Ericsson (UIQ) smartphones unwrapped

Go Back   All About Symbian Forums > Symbian Based Devices > S60 (Series 60) > Nokia N95 and N95 8GB

 
 
Thread Tools Display Modes

  #1  
Old 26-11-2008, 10:42 PM
argh argh is offline
Registered User
 
Join Date: Sep 2007
Posts: 273
argh is on a distinguished road
Automated taking pictures over exposure compensation values (useful for HDR)

I've attached a Python camera that will take photos over the full set of exposure compensation values.

It's modified from 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
Attached Files
File Type: zip hdr_viewfinder.zip (2.2 KB, 803 views)

Last edited by argh; 26-11-2008 at 11:06 PM.

  #2  
Old 27-11-2008, 07:14 PM
Dr Tran's Avatar
Dr Tran Dr Tran is offline
Registered User
 
Join Date: Oct 2005
Location: Los Angeles
Posts: 91
Dr Tran is on a distinguished road
Not running here.

Are there other python scripts I need to be running?

edit:

Ok got it working. Script seems slow. Dont know what's going on when its taking pictures.

Last edited by Dr Tran; 27-11-2008 at 07:44 PM.

  #3  
Old 27-11-2008, 11:36 PM
argh argh is offline
Registered User
 
Join Date: Sep 2007
Posts: 273
argh is on a distinguished road
It needs PyCameraLib from the Nokia CV project (which I assume you now have).

It is slow, but that's because it's taking (and transferring to memory card) 17 pictures (0.25 steps from -2 to +2). I can add more HDR settings to do fewer steps (e.g. every 0.5, and 1.0 steps). You can also reduce the resolution to speed it up.

I agree that I (or someone!) should update it to show more information about what it's doing. As I said, it's my first Python work. PyCameraLib has no documentation either, and some methods (such as the flash) weren't used in any samples, so I figured that out myself.

I'll take a look at making some improvements as soon as I can. Thanks for the feedback - it was your post on HDR with the N95 that initially inspired me, as I don't have a bluetooth keyboard!

  #4  
Old 29-11-2008, 05:41 PM
chandelirious chandelirious is offline
Registered User
 
Join Date: Nov 2008
Posts: 4
chandelirious is on a distinguished road
Hi,

I've been looking for something like this for ages, so thanks!

But I can't get it to work...

I've got Python on the N95, working, and pycamera, working - but when I run hdr_viewfinder, I get the error message:
SymbianError: [Errno -1]
KErrNotFound

Any ideas? Bearing in mind that today is the first day that I have used Python, and have absolutely NO programming experience

Thanks again!

  #5  
Old 30-11-2008, 08:23 AM
argh argh is offline
Registered User
 
Join Date: Sep 2007
Posts: 273
argh is on a distinguished road
Hi, I'll try to help.

First, did you install the PyCameraLib from NokiaCV available here.

They need to be installed to internal memory, unless you tweak a script.

Then, test the scripts that come with the package (e.g. test_viewfinder.py).

If they work, I'll probably need to see more information on the error, please!

  #6  
Old 30-11-2008, 11:37 AM
chandelirious chandelirious is offline
Registered User
 
Join Date: Nov 2008
Posts: 4
chandelirious is on a distinguished road
Ah, I was installing to the memory card, not the phone memory. Many thanks for your help!

  #7  
Old 30-11-2008, 07:09 PM
chandelirious chandelirious is offline
Registered User
 
Join Date: Nov 2008
Posts: 4
chandelirious is on a distinguished road
Erm... okay... so I have got the script working... kinda.

I run the script, everything is great, the exposure is set to HDR... it takes some photos (max so far has been five), then the script shuts down and Python exits. I thought maybe it was something to do with the fact that my images are stored to the memory card, so changed that, but it did the same.

I put the flash on, but it did the same.

No error messages, just turns itself off.

Any ideas?

  #8  
Old 30-11-2008, 08:07 PM
chandelirious chandelirious is offline
Registered User
 
Join Date: Nov 2008
Posts: 4
chandelirious is on a distinguished road
Don't worry - sorted now - the images were set at the highest resolution, which I don't think it liked. I lowered the resolutin considerably, and it worked - now I'm going to see how high I can go - ooh, the thrills...

  #9  
Old 01-12-2008, 05:42 AM
argh argh is offline
Registered User
 
Join Date: Sep 2007
Posts: 273
argh is on a distinguished road
I think that it's probably running out of memory somewhere - I've had this issue before as well (sometimes at around picture 12). I'll see if I can track it down - not sure if there's anything I can do about it (depends if it's within the library, or the script.

I've changed the script to be able to do less different exposures (17 is a bit many, really!) and I'll try and see if I can get it to show more information about what it is doing while taking photos - a preview picture, or at least some on-screen information.

I'll upload it again when I've had a bit of time to test. Thanks for the feed back and I hope that someone finds it useful!
Ads

  #10  
Old 05-12-2008, 07:52 PM
argh argh is offline
Registered User
 
Join Date: Sep 2007
Posts: 273
argh is on a distinguished road
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.
Attached Files
File Type: zip hdr_viewfinder.zip (2.5 KB, 671 views)

  #11  
Old 25-05-2009, 04:01 AM
badchad badchad is offline
Registered User
 
Join Date: Mar 2003
Posts: 12
badchad is on a distinguished road
importerror: no module named pycamera

Hi there,

I installed python and the scripts and the pycamlib (just 1 sis file) and both the ncvlib.sisx and nokiacvimage.sisx.

I installed them on the internal memory.

When I run python and run the test viewfinder script or the pycamera script I get the error: importerror:no module named pycamera.

i have firmware 30.0.015 on my n95

Any ideas?

  #12  
Old 25-05-2009, 04:30 AM
badchad badchad is offline
Registered User
 
Join Date: Mar 2003
Posts: 12
badchad is on a distinguished road
fixed - don't use python 1.9.4 . Use python 1.45

i found my problem.
I was using python 1.9.4

uninstalled that and installed 1.45 and now works.

  #13  
Old 20-09-2009, 05:10 PM
boothy boothy is offline
Registered User
 
Join Date: Dec 2004
Location: North West England
Posts: 232
boothy is on a distinguished road
Hi Argh

Did you get any further with your python script for AEB?- I have tried it in various screen size formats on my N95 with little success - I only seem to get 2 exposures before it crashes - and it does not seem to work at all on latest version of python.I have now upgraded to N97 and it would be awesome to create hdr - well AEB shots on phone.Any way thanks for all your efforts so far.I have not yet ran on N97 - I kmow very little about python and wonder if it will run better on N97 - suppose the best way is to try!

Thanks again for your efforts - Boothy

Edit:I had noted previous post by badchad - why does it not work on later version?

Last edited by boothy; 20-09-2009 at 05:16 PM.

  #14  
Old 20-09-2009, 06:07 PM
boothy boothy is offline
Registered User
 
Join Date: Dec 2004
Location: North West England
Posts: 232
boothy is on a distinguished road
Hi Guys

I have figured how to tweak settings (duh!) and it seems to work better - when using are you supposed to focus with camera first then run script to create bracketed exposures ?

On format type - every format except exif is in red and will not take exposures unless on exif format - is this correct ?

Thanks again in advance

Boothy

PS I will try on N97 later

  #15  
Old 20-09-2009, 08:34 PM
argh argh is offline
Registered User
 
Join Date: Sep 2007
Posts: 273
argh is on a distinguished road
Hi Boothy.

Sorry, I'm afraid that I can't find my N95 charger at the moment and it doesn't seem to hold charge very well when it's off (my older Windows Mobile devices still turn on).

I don't have any other Symbian devices right now, but if I do get another I will look back at this. It appeared to be a memory leak / bug in the pycamera library.

Does test_viewfinder.py that comes with PyCamLib work?
 

Bookmarks

Tags
automated, compensation, exposure, hdr, pictures, taking, values

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Nokia N73 - taking silent pictures? ranis Nokia N71, Nokia N73 and Nokia N75 10 02-08-2008 12:23 PM
Taking better pictures slitchfield Links of Interest 0 02-08-2006 05:22 PM
Out Of Memory When Taking Pictures Ari9500 Nokia 6630, 6680, 6681 and 6682 1 17-08-2005 11:55 PM
Automated photo taking with Nokia 7610? joao1a S60 Software 0 02-09-2004 08:57 AM



All times are GMT. The time now is 04:14 PM.


vBulletin skins developed by: eXtremepixels
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright Notes || Contact Us || Privacy Policy