Monday, 18 March 2013

Macro photography on the cheap - Correcting chromatic aberration

In this series I show how you can use a cheap close-up filter to take macro pictures. The previous post is a general introduction, and this post will show you how to fix chromatic aberration introduced by the filter.

As shown in the previous post, the cheap 8x close-up filter introduces a lot of chromatic aberration (CA), especially at high magnification (45-150mm lens at maximum focal length). This is obvious when taking a picture of a black and white checkered pattern.
Checkered pattern (1mm square size), uncorrected.
Can we fix this? After all, the Micro 4/3 is known to fix lens distortion and CA in software. The idea is that Panasonic could manufacture optically inferior lenses, with fewer elements, hence cheaper/lighter, and fix some of the image imperfection in software. Since there is no viewfinder, the user would never notice these corrections.

Here, I'm pushing this to the limit: adding a very cheap close-up adapter, that introduces a lot of CA, and seeing how we can recover a decent-looking image.

Tuesday, 12 March 2013

Macro photography on the cheap

In this series I will show how you can use a cheap close-up filter to take macro pictures. This post is a general introduction, and the next post will show you how to fix chromatic aberration introduced by the filter.

There are many ways of obtaining relatively large magnification with a camera. You can find out about many of these methods on the excellent Micro 4/3rds Photography blog: using a dedicated macro lens, extension rings, a reverser ring, or a close-up filter...

I'm not willing to spend more than 500$ for a dedicated macro lens, so I went the cheapest possible way: using a 8x close-up filter, that you can find for 8$ on dealextreme, and maybe cheaper on eBay. I went for the 8x filter instead of the 10x, because the latter has bad reviews: the lens element protrudes at the back of the filter, and you risk scratching your lens when mounting the filter (Fredrik Gløckner talks about it in this post); it also seems to be optically inferior.

Friday, 1 March 2013

Random blog banner - Part 2

Alright, the previous part shows you the script that allows to randomly display a banner image. Now, this would quickly end up being a bit messy to manage, if you want to add a new banner, then update the page with the list of all panoramas.

I wrote a Ruby script to semi-automate the process. The source can be found on github.

We first start with a database of images, called images.db. It is a YAML file, with this format:
- url:{}/xx.jpg
  width:  800
  repeat: true
  offset: -30
  text:   Krabi - Thailand
  date:   2012.12
I like to use YAML, because it is easy to parse in Ruby, without being as wordy as XML, but more structured than a simple text file.

The fields are:
  • url: source image location. s{} in the URL will be replaced by the proper image width
  • width: width to display
  • repeat: if the panorama is a full 360° that can be repeated
  • offset: vertical offset to center the image
  • text: Text that will appear in the banner, and in the image description
  • date: year and month when the image was taken
Then, the script banner.rb reads images.db. It generates the Javascript arrays, and insert them in jscode.template, creating a new jscode.js file, that you can then copy-paste on the blog.

It will also read pagecode.html.template, and generate pagecode.html for the list of images.

That's it! Looking at the code should be somehow self-documenting, if you want to modify it. I release the code in public domain, do whatever you want with it!