Reply
Thread Tools
Posts: 240 | Thanked: 68 times | Joined on Nov 2009
#111
or just download it and use an editor to view what it does
__________________
If I helped you, please use the Thank button.
 
Posts: 11 | Thanked: 8 times | Joined on Mar 2010 @ Sabah, Malaysia
#112
I've been running through a couple of forum threads and noticed that the N900 Video focus and led light, python script thread uses the v4l2-ctl library. Like expcomp, it supports changing exposure settings for the camera. Unlike expcomp, it doesn't change the EV relative to the default preset - instead you specify an absolute value.

While testing both libraries, I noticed that there is a maximum and minimum value for the EV. Exceeding these limits will simply cause the value to be set to the minimum or maximum possible. However, expcomp will erroneously report the out-of-bounds EV.

TL;DR: I wrote a set of HDR scripts which utilises the superior v4l2-ctl library:

./bracket-auto.sh performs just like the original script as provided by davost, with one extra twist - it will first check whether the current EV of the camera is already at minimum or maximum, and bracket accordingly. For example: If the EV is already at its maximum, instead of bracketing +2 and -2, it will bracket -2 and -4. As an added bonus, if you've installed eSpeak, the script will announce what it is doing, as well as its completion.

./bracket-manual.sh is a little bit more special - it allows you to manually set the minimum and maximum EV for the shot..
IMPORTANT: This script cannot be run as root. You must run it as the default user, otherwise you won't get any on-screen notifications while the camera application is active. Therefore, DO NOT sudo gainroot in X Terminal before running this script.
To use it, run the script with the camera application closed. The script will start the camera application and notify you to aim the camera at the brightest area in the scene, then half-press the shutter button. After this, you must repeat the procedure but point the camera at the dimmest area in the scene. This is necessary so the script can determine the minimum and maximum EV for the current scene.
After this, you should mount the camera on a tripod and half-press the shutter button a third time to focus the camera properly. The moment you release the shutter button, you will have 5 seconds to close the camera application by tapping the close button. After the 5 seconds have elapsed, the script will automatically take 3 shots at the minimum, maximum and ((minimum + maximum)/2) EV.
The script will beep 3 times when it completes (it won't announce anything even if eSpeak is installed).
Note: For both scripts, images will be saved in /home/user/MyDocs/hdr/. Make sure that you create this directory.

I've attached two files with this post:

1. A sample HDR image generated with enfuse running on Easy Debian with the raw images captured by ./bracket-auto.sh. It took about 15 minutes on my N900 to process it. FYI: That's a very hot tropical mid-day sun.

2. The actual scripts compressed into a tar.gzip file.
The scripts consists of several files which must be extracted and stored in a non-vfat folder (like the original davost scripts). Make sure that all of the files are executable, then you can run the two scripts listed above.
For more information about these scripts (including more comprehensive installation and usage instructions), you can check out my blog post. You can also see the raw images I used to generate the sample HDR image, as taken by ./bracket-manual.sh.

This is a pretty long post, I hope its useful I'm not sure whether I should start a new thread or keep it within this single thread. Let me know if I should start a new thread exclusively for these scripts.

Cheers

UPDATES
  • 2009-04-22: Uploaded new bracketing script (bracketing.20100419c.tar.gz) that *should* fix the "dsp_thread: failed waiting for events" issue when the script takes jpegs instead of pngs. I've left the older archive (bracketing.20100418.tar.gz) just in case something goes wrong with this newer script.


P.S. The tar.gzip package also contains hdr-enfuse.sh, which can be used in conjunction with Easy Debian to automate the processing of the raw image files.
Attached Images
 
Attached Files
File Type: gz bracketing.20100418.tar.gz (196.0 KB, 159 views)
File Type: gz bracketing.20100419c.tar.gz (196.0 KB, 126 views)

Last edited by eol; 2010-04-22 at 07:44. Reason: Updates
 

The Following 5 Users Say Thank You to eol For This Useful Post:
Posts: 240 | Thanked: 68 times | Joined on Nov 2009
#113
I tweaked it a little and it's working perfectly.. Nice script

I just have to test it outside and compare pictures taken with both scripts..

I usually merge to HDR on my PC because I can tweak settings.. I'll get back with the pictures when I have them
__________________
If I helped you, please use the Thank button.
 

The Following User Says Thank You to bachagabriel For This Useful Post:
Posts: 3,664 | Thanked: 1,530 times | Joined on Sep 2009 @ Hamilton, New Zealand
#114
Would be nice if you can turn this to .deb file and create an interface for it.
 
Posts: 100 | Thanked: 18 times | Joined on Jan 2010 @ Bristol, UK
#115
i must say that is one hell of a good script! but as usual iv got problems :P i tried to set permission but it keeps on saying "operation not permitted". what should i do?
 
Posts: 11 | Thanked: 8 times | Joined on Mar 2010 @ Sabah, Malaysia
#116
@maxximuscool
I too would like to convert it into a proper application, rather than just a command-line script. I'm slowly picking up the Maemo development environment. Perhaps in the near future or maybe someone else on this thread can do it

@saud khan
I -think- the following procedure should work..

Installation - this will install the scripts into /home/user/bracketing/:
  1. Run X Terminal
  2. Go into the directory where you downloaded/copied bracketing.20100415.tar.gz
  3. Run the following command (without quotes): "tar -xvzf bracketing.20100415.tar.gz -C /home/user/"
  4. Run the following command (without quotes): "chmod 755 /home/user/bracketing/*"
  5. Run the following command (without quotes): "mkdir /home/user/MyDocs/hdr/"
Usage:
  1. Run X Terminal, if it isn't running yet
  2. Run the following command (without quotes): "cd /home/user/bracketing/"
  3. You should be able to run "./bracket-manual.sh" or "./bracket-auto.sh" now.

Note: You don't need to sudo gainroot
 
cjp's Avatar
Posts: 762 | Thanked: 395 times | Joined on Jan 2010 @ Helsinki
#117
To me some of these HDR pics in this thread don't really impress me, as it just looks like the image has been photoshopped!

Sure the lighting and everything is much more interesting than in the "plain" mode, but somehow that looks really artificial and perhaps a little "overdone". Any way to tone this effect down?
 
Posts: 1,341 | Thanked: 708 times | Joined on Feb 2010
#118
Originally Posted by eol View Post

TL;DR: I wrote a set of HDR scripts which utilises the superior v4l2-ctl library:

P.S. The tar.gzip package also contains hdr-enfuse.sh, which can be used in conjunction with Easy Debian to automate the processing of the raw image files.
There is a software called Qtpfsgui, which could semi-automatically create HDR-images from raw-images.
It supports only JPEG and RAW formats though currently.
I asked the author, if PNG support is possible.
Right now I just tried to convert the PNG files to JPEG with Gimp.

However, for Qtpfsgui to do most of the work automatically, it needs EXIF data in the image file. I believe, there can be EXIF data both in PNG and JPEG-files.
WARNING:
Qtpfsgui was not able to find the relevant EXIF tags for the following images:
raw-08267.jpg
raw-16550.jpg
raw-33138.jpg

You can still proceed creating an Hdr. To do so you have to insert manually the EV (exposure values) or stop difference values.

If you want Qtfsgui to do this automatically, you have to load images that have at least the following exif data:
Shutter Speed (seconds)
Aperture (f-number)
So if you would like to improve your scripts, having the correct EXIF data in the raw images (either JPEG or PNG) would be great.
 
Posts: 100 | Thanked: 18 times | Joined on Jan 2010 @ Bristol, UK
#119
YAY!! thanks man it worked is it possible to reprogram it to take more picture at more exposures? and secondly, is it possible to save the photo in RAW format rather than jpeg?
 
Posts: 100 | Thanked: 18 times | Joined on Jan 2010 @ Bristol, UK
#120
armmm iv got another problem :$ im really sorry (this might be one of the most stupid question ever asked :P ) i ran the script and it took some pics and told me its "Done, YAY!" or something like that :P but then I went into hdr folder and in there i found another folder, but an empty one, named after the date and time. I cant find where did the pictures go i have tried it two times and still i cant find the picture.
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 03:44.