Mikedowney.co.uk
What's New
Site Map

Diary
Astronomy
Bits N Bobs
Computing
Food And Drink
Links
Photography
Welcome


Selected Entries
Pinhole Photography
Keeping Quail
Coventry
Recipes
A different recipe each week
Friends websites
Oven Temperatures and Measuring Cups


Most popular stories
A Hamster's Home is his C...
Hamster Peanuts
Pizza, Hamsters and Ballo...
Hamster Baby Update
A Tangfastic Mess
Tiny Koala
Giant Sunflowers
More Squirrel Photos
Hamster Baby Update
Roborovski Babies
Hamster and Quail update


RSS Feeds:
RSS Feed Entire Site.
RSS Feed Diary only.



Powered by Blosxom


Pinhole Photography Ring
pinhole webring logo
powered by RingSurf
Next | Previous
Random Site | List Sites

Simple HDR photography with ImageJ

Story location: Home / photography /
02/Jan/2010

This follows from my first attempt at 'HDR-style' photography with ImageJ. I have abandoned my old approach, which used ImageJ macros, and have developed a couple of plugins which are easier to use.

See more ...



Not Quite HDR photography

Story location: Home / photography /
23/Nov/2008

I've been intending to experiment with HDR (High Dynamic Range) photography, where images maintain details in both the shadows and highlights. Normal photography has a fairly low dynamic range, so if you want to have good shadow detail, highlights are usually over-exposed.

Normally, HDR software requires 3 bracketed exposures but this usually requires a tripod to ensure all 3 photos can be easily aligned and merged to give the HDR image. I thought I would try to come up with a shortcut to allow me to get results close to HDR but without the need to take multiple images or carry a tripod.

My method requires a digital camera which can produce a 16 bit colour file. I use the 'RAW' image format on my Nikon D40, and then convert it to a 16 bit uncompressed TIF using the ViewNX software which came with the camera. Other cameras should be suitable as long as a 16 bit image format is available.

Required Software

  • Download and install Imagej and the Calculator Plus plug-in.

  • Download the HDR Maker macro and copy it into the ImageJ plugins directory.

  • Install any software necessary to load or convert RAW images from the camera. ImageJ has plugins to handle a lot of different image formats.

Procedure

This is obviously biased towards Nikon cameras, the D40 in particular. Instructions for other cameras will vary.

  • Set the camera to take RAW images. One way of doing this on the D40 is to go into the Shooting Menu and select Image Quality and choose NEF (RAW) or NEF(RAW) + Jpeg.

  • We will need to get a wide range of intensities recorded, so we'll use low contrast to reduce the amount of detail lost in shadows and highlights. On the D40, there are two main ways of doing this. In the Shooting Menu, choose Optimise Image. From there you can either select Softer or go to Custom and set Tone Compression to one of the low contrast options.

  • After transferring the images to the computer, use the ViewNX software (which comes with the camera) to convert the raw NEF file to a 16 bit uncompressed TIFF file.

  • Load ImageJ and open the 16 bit TIFF.

  • Go to the Plugins menu and select 'HDR Maker'.

  • The dialogue box gives options for shadow/highlight values. The defaults are 25% and 75% which means the darkest 25% of pixels will be lightened slightly and the lightest 25% (100-75) will be darkened.

  • The next options are dodging (lightening shadow areas) and burning (darkening highlights). Higher values have a greater effect.

  • The blur value is related to the sharpness of the area where the lightness adjustment takes place. Good values range from 0.9 to 50, and vary depending on the image.

  • The saturation value refers to the percentage of pixels which will be set to the extreme light and dark settings after processing.

  • The default values are only suggestions and will not work for all images. Feel free to experiment and try different values to obtain a good effect.

HDR test image

The image above shows the output of the macro. The original photo is on the left, and has detail in the sky but the shadows are very dark. The middle image is the output from the HDR Maker macro. The image on the right is the original photo with the brightness and contrast increased to show detail in the shadows. This has resulted in losing all detail in the sky. Click on the image for a full size version.

The images used above are only to illustrate the procedure, rather than examples of good photography. The HDR macro is an early version and needs more development. The main problem is the lack of contrast in the shadow areas. I tried different values for shadow/highlight/dodge/burn but couldn't get an image which gave 'punchy' detail such as in the right hand image. With any luck I'll be able to sort this out in a future version.



Trying to prevent image theft 2: Watermarking images

Story location: Home / computing /
14/Apr/2008

Yesterday I mentioned using the .htaccess file with Apache to prevent people hot-linking images. That would only be a temporary solution, which would stop current hot-links from working. Any future image theft would involve people downloading images and re-uploading them somewhere else.

See more ...



Storylog and Storyfilter plugins updated

Story location: Home / computing / blosxom /
17/Sep/2006

I have updated the Storylog (v0.29) and Storyfilter (v0.39) plugins for Blosxom. Both now include file locking so there should be no problems with simultaneous access to a site causing file corruption any more.

Storylog now includes an ignore list for URLs and user agents so search engine hits can be ignored so they won't affect the 'most popular clicks' list.

Storyfilter now has the option to generate a list of all keywords, which is useful for site maps. This requires the line
meta-showkeywords: yes
to be included at the start of the story and fills the $storyfilter::allkeywords variable with the list.

Both plugins can be downloaded here.



Storylog v0.20

Story location: Home / computing / blosxom /
24/Oct/2005

Storylog is another Blosxom plugin. It logs the category views (and if storyfilter is installed, optionally logs keyword links).
Download the current version (version 0.20).
Instructions are in the zip file (no perldoc yet). For a demonstration of storylog in action, see the 'Most popular clicks' in the menu bar on the left. This uses the 'combined' log of both categories and keywords.



Storyfilter Plugin v0.31

Story location: Home / computing / blosxom /
24/Oct/2005

I have been steadily working on my two blosxom plugins - this one and storylog. Storyfilter is now up to version 0.31 with the following improvements:

  • Now includes documentation in the file itself, rather than in a seperate readme.
  • Keywords treates as case-insensitive
  • Only matches at the start of a keyword, for example, 'review' will still match 'reviews' but 'work' will no longer match 'network'

Download the current version (version 0.31).
Instructions are found in the file itself.



Storyfilter Plugin v0.30

Story location: Home / computing / blosxom /
18/Sep/2005

I have been steadily working on my two blosxom plugins - this one and storylog. Storyfilter is now up to version 0.31 with the following improvements:

  • Now includes documentation in the file itself, rather than in a seperate readme.
  • Keywords treates as case-insensitive
  • Only matches at the start of a keyword, for example, 'review' will still match 'reviews' but 'work' will no longer match 'network'

Download the current version (version 0.31).



Storyfilter Plugin updated

Story location: Home / computing / blosxom /
23/Jul/2005

I have update the plugin to version 0.23 and fixed a few problems:

  • The keyword cache file is now rebuilt from scratch rather than waiting until all the stories have been viewed.
  • Rebuilding the cache can be forced by appending ?refresh=full to the url.
  • Bug fixed which stopped stories being viewed if they were in the blosxom main directory (ie not in a category) when /keyword was being used.

Download the latest version (version 0.23).
Further instructions are in the zip file.
There are still some problems with using /keyword instead of ?keyword= but they don't seem to be critical.



Storyfilter plugin

Story location: Home / computing / blosxom /
18/Jul/2005

Blosxom is a pretty good bit of blog software but it's main weakness is the inability to place a story into several categories without duplicate postings. This plugin is an attempt to recify that.
Storyfilter maintains a list of keywords and allows stories to be selected according to keywords. The keywords associated with each story can be displayed and if the user clicks on one, blosxom will display only those stories which contain that keyword. See more ...