<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>underbjerg.com &#187; utilities</title>
	<atom:link href="http://www.underbjerg.com/tag/utilities/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.underbjerg.com</link>
	<description>...mostly photography, dance and a bit of computery stuff</description>
	<lastBuildDate>Sun, 20 Jun 2010 12:01:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Ruby script for focal length statistics</title>
		<link>http://www.underbjerg.com/2008/12/11/ruby-script-for-focal-length-statistics/</link>
		<comments>http://www.underbjerg.com/2008/12/11/ruby-script-for-focal-length-statistics/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 15:31:35 +0000</pubDate>
		<dc:creator>erik</dc:creator>
				<category><![CDATA[Photography]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[utilities]]></category>

		<guid isPermaLink="false">http://underbjerg.com/?p=5</guid>
		<description><![CDATA[I have wanted to get a fast prime lens for a while, but wasn&#8217;t sure whether to go for Canon&#8217;s 50mm f/1.2, 35mm f/1.4 or the new 24mm f/1.4 II to put on my EOS 50D. I had an idea that wider lens would support my style of photography better, because I often shoot dancing [...]]]></description>
			<content:encoded><![CDATA[<p>I have wanted to get a fast prime lens for a while, but wasn&#8217;t sure whether to go for Canon&#8217;s <a href="http://www.canon-europe.com/For_Home/Product_Finder/Cameras/EF_Lenses/Fixed_Focal_Length/EF_50mm_f12L_USM/index.asp">50mm f/1.2</a>, <a href="http://www.canon-europe.com/For_Home/Product_Finder/Cameras/EF_Lenses/Fixed_Focal_Length/EF_35mm_f14L_USM/index.asp">35mm f/1.4</a> or the new <a href="http://www.canon-europe.com/For_Home/Product_Finder/Cameras/EF_Lenses/Fixed_Focal_Length/EF_24mm_f1.4L_II_USM/index.asp">24mm f/1.4 II</a> to put on my EOS 50D. I had an idea that wider lens would support my style of photography better, because I often shoot dancing indoors, where it&#8217;s hard to get a good distance to the subject, but I had no hard data to back it up.</p>
<p>I use <a href="http://www.adobe.com/products/photoshoplightroom/">Adobe Lightroom</a> for almost all my image editing, and although it is a fantastic piece of software, and can show me picture counts by lens, camera, etc., it cannot show me how many pictures I&#8217;ve taken at various focal lenghts.</p>
<p>So I wrote a small Ruby script to do just that. It takes a folder and a result file name as arguments, and scans through the folder for any pictures that matches the file type (jpg or raw) and the camera model I&#8217;m interested in (to filter out the compact), and counts all the focal lengths used, and their frequency. It then stores the results in the result file in CSV format.</p>
<p>If you like, you can download <a href="/files/exif_reader.rb">the script here</a>. There is also an <a href="/files/results_2008.csv">example result file</a>, which shows a run of all the pictures I&#8217;ve taken in 2008. The script uses the <a href="http://miniexiftool.rubyforge.org/">mini_exiftool</a> gem that wraps the <a href="http://www.sno.phy.queensu.ca/~phil/exiftool/">exiftool</a> binary, so you&#8217;ll need both to run the script.</p>
<p>I just love how simple it is to put these kind of utilities together with Ruby. You are welcome to modify the script as you like, and I&#8217;d like to hear about any improvements or other cool stuff you come up with.</p>
<p>The image below shows a graph over the 6608 pictures I&#8217;ve have kept, taken with my Canon EF-S 17-55mm f/2.8 IS, over the last 1 1/2 years. This is the lens that I use for 75% of my pictures.</p>
<p><img src="http://www.underbjerg.com/files/2008/12/result_all_years.png" alt="result_all_years" title="result_all_years" width="695" height="399" class="alignnone size-full wp-image-369" /></p>
<p>This shows a couple of interesting things (at least to me):</p>
<ul>
<li>I primarily use the lens at it extremes: 17mm and 55mm</li>
<li>I clearly prefer the wider focal lengths, from 17-35mm</li>
</ul>
<p>So now I am sure that it is the Canon 24mm f/1.4 II that should be on my wishlist &#8211; now I just have to save up for it <img src='http://www.underbjerg.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.underbjerg.com/2008/12/11/ruby-script-for-focal-length-statistics/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
