Greenough 2011 July

A few nice Photoshop tricks images I found:

Greenough 2011 July
Photoshop tricks

Image by Chris Devers
These time-series photos (there has to be a term for this sort of composition) of the Charles River in Boston were done after seeing how hugovk did his time-series photo of the Naurissalmi strait in Finland, and before that, Eirik Solheim’s One Year in One Image.

The composites were generated with a fairly simple shell script. The original version by Aslak Hellesøy hard-codes the image dimensions & the column "stripe" width, and it turns out that if you get these wrong, then the resulting image might be interesting in an "abstract impressionism" way, but it won’t look like the original scene at all.My version improves on this by using jhead to figure out the dimensions of each of the source images, then does the arithmatic to come up with the optimal dimensions & average stripe width to use. As a result, you can just point it at any folder full of images, and it will generate a reasonable composite based on what was found there. So, in my case, that means that months where I just took a few photos — like in 2009 — will come out more or less as well as months where there were many photos.

The remaining problem, which I obviously haven’t solved yet, is the "garbage in, garbage out" you get from not framing the photos absolutely consistently. Eirik Solheim’s brilliant composition avoided this problem because he had his camera on a tripod out his window for a year. In my case, as with hugovk, the photos were hand-held, and while it helps a little that I’m using a camera with a built-in virtual horizon (so that the images are at least level, if not aimed consistently), there’s still room for improvement. A script to auto-align & auto-crop source images would improve the results considerably.

Still, this isn’t bad, and some of them — particularly some of the single-month composites — I quite like.

Feel free to try your own with the script, pasted below. It requires jhead & ImageMagick, but otherwise just needs a plain old Bourne shell, which any Mac, Linux, or Windows machine (with [free] Cygwin) will have — no fancy & expensive Photoshop tricks here.

$ cat ~/bin/eirikmagick.sh
#!/bin/sh
curdir=$ (pwd | sed ‘s#^.*/\([^/]*\)##’)
jhead -n"$ {curdir}_%Y%m%d-%H%M%S" *jpg
tmpdir=tmp
if [ -d "$ tmpdir" ]; then
rm -rf $ tmpdir
fi
mkdir $ tmpdir

img_count="$ (ls -1 *jpg| wc -l)"
echo "`date` processing $ img_count images in $ curdir ($ (pwd))"

height=$ (jhead -c *jpg 2>/dev/null | awk ‘{print }’ | sort | sed ‘s#.*x##’ | head -1)
echo "shortest image is $ height, so setting output height to match"

img_width=$ (jhead -c *jpg 2>/dev/null | awk ‘{print }’ | sort | sed ‘s#x.*##’ | head -1)
echo "narrowest image is $ img_width"

width=$ (($ img_width / $ img_count))
echo "setting column width to $ width (average of $ img_width width divided by $ img_count images)"

n=0
for f in *.jpg
do
offset=$ (($ n*$ width))
c="$ (printf "%05d" $ n)"
echo "Creating slice $ tmpdir/$ c.png: convert -crop $ {width}x$ {height}+$ {offset}+0 $ f $ tmpdir/$ c.png"
convert -crop $ {width}x$ {height}+$ {offset}+0 $ f $ tmpdir/$ c.png
n=$ (($ n+1))
done

count="$ (ls -1 $ tmpdir | wc -l)"
echo "Joining $ count slices into out.png"
montage $ tmpdir/*.png -mode concatenate -tile $ {count}x -verbose $ {curdir}_$ (date ‘+%Y%m%d.%H%M%S’).png

Greenough 2010 May
Photoshop tricks

Image by Chris Devers
These time-series photos (there has to be a term for this sort of composition) of the Charles River in Boston were done after seeing how hugovk did his time-series photo of the Naurissalmi strait in Finland, and before that, Eirik Solheim’s One Year in One Image.

The composites were generated with a fairly simple shell script. The original version by Aslak Hellesøy hard-codes the image dimensions & the column "stripe" width, and it turns out that if you get these wrong, then the resulting image might be interesting in an "abstract impressionism" way, but it won’t look like the original scene at all.My version improves on this by using jhead to figure out the dimensions of each of the source images, then does the arithmatic to come up with the optimal dimensions & average stripe width to use. As a result, you can just point it at any folder full of images, and it will generate a reasonable composite based on what was found there. So, in my case, that means that months where I just took a few photos — like in 2009 — will come out more or less as well as months where there were many photos.

The remaining problem, which I obviously haven’t solved yet, is the "garbage in, garbage out" you get from not framing the photos absolutely consistently. Eirik Solheim’s brilliant composition avoided this problem because he had his camera on a tripod out his window for a year. In my case, as with hugovk, the photos were hand-held, and while it helps a little that I’m using a camera with a built-in virtual horizon (so that the images are at least level, if not aimed consistently), there’s still room for improvement. A script to auto-align & auto-crop source images would improve the results considerably.

Still, this isn’t bad, and some of them — particularly some of the single-month composites — I quite like.

Feel free to try your own with the script, pasted below. It requires jhead & ImageMagick, but otherwise just needs a plain old Bourne shell, which any Mac, Linux, or Windows machine (with [free] Cygwin) will have — no fancy & expensive Photoshop tricks here.

$ cat ~/bin/eirikmagick.sh
#!/bin/sh
curdir=$ (pwd | sed ‘s#^.*/\([^/]*\)##’)
jhead -n"$ {curdir}_%Y%m%d-%H%M%S" *jpg
tmpdir=tmp
if [ -d "$ tmpdir" ]; then
rm -rf $ tmpdir
fi
mkdir $ tmpdir

img_count="$ (ls -1 *jpg| wc -l)"
echo "`date` processing $ img_count images in $ curdir ($ (pwd))"

height=$ (jhead -c *jpg 2>/dev/null | awk ‘{print }’ | sort | sed ‘s#.*x##’ | head -1)
echo "shortest image is $ height, so setting output height to match"

img_width=$ (jhead -c *jpg 2>/dev/null | awk ‘{print }’ | sort | sed ‘s#x.*##’ | head -1)
echo "narrowest image is $ img_width"

width=$ (($ img_width / $ img_count))
echo "setting column width to $ width (average of $ img_width width divided by $ img_count images)"

n=0
for f in *.jpg
do
offset=$ (($ n*$ width))
c="$ (printf "%05d" $ n)"
echo "Creating slice $ tmpdir/$ c.png: convert -crop $ {width}x$ {height}+$ {offset}+0 $ f $ tmpdir/$ c.png"
convert -crop $ {width}x$ {height}+$ {offset}+0 $ f $ tmpdir/$ c.png
n=$ (($ n+1))
done

count="$ (ls -1 $ tmpdir | wc -l)"
echo "Joining $ count slices into out.png"
montage $ tmpdir/*.png -mode concatenate -tile $ {count}x -verbose $ {curdir}_$ (date ‘+%Y%m%d.%H%M%S’).png

This entry was posted in Photoshop Tricks and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>