<?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>Eugeni&#039;s blog&#187; tutorial</title>
	<atom:link href="http://dodonov.net/blog/category/tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://dodonov.net/blog</link>
	<description>One blog to rule them all. Kinda.</description>
	<lastBuildDate>Wed, 01 Sep 2010 13:42:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Cleaning dust on photos: or &#8220;In Gimp We Trust!&#8221;</title>
		<link>http://dodonov.net/blog/2009/12/29/cleaning-dust-on-photos-or-in-gimp-we-trust/</link>
		<comments>http://dodonov.net/blog/2009/12/29/cleaning-dust-on-photos-or-in-gimp-we-trust/#comments</comments>
		<pubDate>Tue, 29 Dec 2009 17:55:30 +0000</pubDate>
		<dc:creator>eugeni</dc:creator>
				<category><![CDATA[Linux-Planet]]></category>
		<category><![CDATA[devel]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[mandriva]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://dodonov.net/blog/?p=670</guid>
		<description><![CDATA[A few weeks ago I finally realized my old wish: I bought a real camera for me: a Nikon D40 &#8211; which is, according to many, many people, is the best DSLR out there. At least for non-professionals. With just a few pictures it was already possible to note the difference &#8211; I could not [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago I finally realized my old wish: I bought a <strong>real</strong> camera for me: a <strong>Nikon D40</strong> &#8211; which is, according to many, many people, is the best DSLR out there. At least for non-professionals.</p>

<p>With just a few pictures it was already possible to note the difference &#8211; I could not ever EVER got close to those pictures with all my previous cameras (like Nokia N95 and Sony CyberShot W90):</p>

<p><a href="http://www.flickr.com/photos/eugeni_dodonov/4207561962/" title="Sunset at Angra dos Reis by eugeni_dodonov, on Flickr" onclick="urchinTracker('/outgoing/www.flickr.com/photos/eugeni_dodonov/4207561962/?referer=');"><img src="http://farm3.static.flickr.com/2496/4207561962_015b5d0c7a_m.jpg" width="240" height="160" alt="Sunset at Angra dos Reis" /></a>
<a href="http://www.flickr.com/photos/eugeni_dodonov/4128519991/" title="A flower and a tiny bee by eugeni_dodonov, on Flickr" onclick="urchinTracker('/outgoing/www.flickr.com/photos/eugeni_dodonov/4128519991/?referer=');"><img src="http://farm3.static.flickr.com/2775/4128519991_3a36e078be_m.jpg" width="240" height="160" alt="A flower and a tiny bee" /></a>
<a href="http://www.flickr.com/photos/eugeni_dodonov/4124872929/" title="Rancho Panorama by eugeni_dodonov, on Flickr" onclick="urchinTracker('/outgoing/www.flickr.com/photos/eugeni_dodonov/4124872929/?referer=');"><img src="http://farm3.static.flickr.com/2575/4124872929_af241b6977_m.jpg" width="240" height="159" alt="Rancho Panorama" /></a>
<a href="http://www.flickr.com/photos/eugeni_dodonov/4100678645/" title="A beautiful flower by eugeni_dodonov, on Flickr" onclick="urchinTracker('/outgoing/www.flickr.com/photos/eugeni_dodonov/4100678645/?referer=');"><img src="http://farm3.static.flickr.com/2731/4100678645_73ae0286ec_m.jpg" width="240" height="160" alt="A beautiful flower" /></a></p>

<p>However, after a few days with my new camera, I found out that it came with some dust on its sensor. Not much, but clearly visible on pictures with uniform colors (like sky or white wall). For example, it is possible to see the dust spot on the left half of the following picture &#8211; if you zoom in, you&#8217;ll clearly see that there is some dark spot covering part of a cloud and appearing in the sky:</p>

<p><a href="http://www.flickr.com/photos/eugeni_dodonov/4100676249/" title="A lonely tree among clouds by eugeni_dodonov, on Flickr" onclick="urchinTracker('/outgoing/www.flickr.com/photos/eugeni_dodonov/4100676249/?referer=');"><img src="http://farm3.static.flickr.com/2737/4100676249_d31300faff_m.jpg" width="240" height="160" alt="A lonely tree among clouds" /></a>
<a href="http://www.flickr.com/photos/eugeni_dodonov/4101433558/" title="A lonely tree 3 by eugeni_dodonov, on Flickr" onclick="urchinTracker('/outgoing/www.flickr.com/photos/eugeni_dodonov/4101433558/?referer=');"><img src="http://farm3.static.flickr.com/2770/4101433558_8bc4b350d9_m.jpg" width="240" height="160" alt="A lonely tree 3" /></a></p>

<p>One could say &#8216;Ahh, but that is just a small tiny spot.. nobody will notice it&#8217;. But&#8230; I do notice it, and I don&#8217;t like it. So I started looking for solutions for this issue.</p>

<p>In first place, I tried cleaning the sensor using a air blower (without luck). The dust spot moved a bit with the air flow (a few microns) and landed to its new place (permanently, I afraid). The next step was to ask the official Nikon support in Brazil, which is located in São Paulo city, about 250km from where I live. Their answer was is that the sensor cleaning should cost around R$ 100 (about 60 US$) + shipping. Quite expensive in my opinion.</p>

<p>So the next step was to start thinking like a computer geek. The photo is digital, so it is nothing more than a bunch of bits <img src='http://dodonov.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  . So there SHOULD be some software or at least algorithm suitable for cleaning this all. After a quick research, I found that there is the <strong>Nikon Capture NX software</strong> which removes the dust pretty well. However, it is</p>

<ul>
<li>commercial</li>
<li>expensive</li>
<li>orders you to take photos in <strong>RAW</strong> only. I like RAW, but&#8230; the memory card is not infinite.</li>
</ul>

<p>So another option was to clean the dust in gimp. Manually&#8230; and it is needless to say that this approach is.. well.. boring, time-consuming and pretty much futile.</p>

<p>However, when all the hope was, apparently, lost, the Great Google Gods sent me a wonderful link to the <a href="http://www.logarithmic.net/pfh/resynthesizer" onclick="urchinTracker('/outgoing/www.logarithmic.net/pfh/resynthesizer?referer=');">Resynthesizer plugin</a> &#8211; which is <strong>AMAZINGLY EFFICIENT</strong> in solving the dust issues.</p>

<p>So, dear readers, without other words, I&#8217;ll show you the few needed steps to fix the dust on your photos:</p>

<ol>
<li><p><strong>Install resynthesizer plugin</strong>. On Mandriva systems, you can cheat and run a magic <strong>urpmi gimp2-resynthesizer</strong> command which will do the trick. On other systems, go to the <a href="http://www.logarithmic.net/pfh/resynthesizer" onclick="urchinTracker('/outgoing/www.logarithmic.net/pfh/resynthesizer?referer=');">resynthesizer web site</a>, download, compile and install the plugin. it is trivial, so I won&#8217;t go into additional details here.</p></li>
<li><p><strong>Grab your dust-damaged image and open it in gimp</strong>. As you can see, there is a horrible dust on the left part of the otherwise-blue sky:</p></li>
</ol>

<div id="attachment_679" class="wp-caption aligncenter" style="width: 310px"><a href="http://dodonov.net/blog/wp-content/uploads/2009/12/res1.jpg"><img src="http://dodonov.net/blog/wp-content/uploads/2009/12/res1-300x187.jpg" alt="" title="1" width="300" height="187" class="size-medium wp-image-679" /></a><p class="wp-caption-text">Gimp with the dust-cleaning victim</p></div>

<ol>
<li><strong>Select a region around the dust to remove</strong>:</li>
</ol>

<div id="attachment_680" class="wp-caption aligncenter" style="width: 296px"><a href="http://dodonov.net/blog/wp-content/uploads/2009/12/res2.jpg"><img src="http://dodonov.net/blog/wp-content/uploads/2009/12/res2.jpg" alt="" title="2" width="286" height="271" class="size-full wp-image-680" /></a><p class="wp-caption-text">Selecting the dust to remove</p></div>

<ol>
<li><strong>Press CTRL-X to remove the selected area</strong>:</li>
</ol>

<div id="attachment_681" class="wp-caption aligncenter" style="width: 276px"><a href="http://dodonov.net/blog/wp-content/uploads/2009/12/res3.jpg"><img src="http://dodonov.net/blog/wp-content/uploads/2009/12/res3.jpg" alt="" title="3" width="266" height="256" class="size-full wp-image-681" /></a><p class="wp-caption-text">Removing the dust</p></div>

<ol>
<li><strong>Now, select a bit larger region around the white spot</strong>:</li>
</ol>

<div id="attachment_682" class="wp-caption aligncenter" style="width: 245px"><a href="http://dodonov.net/blog/wp-content/uploads/2009/12/res4.jpg"><img src="http://dodonov.net/blog/wp-content/uploads/2009/12/res4.jpg" alt="" title="4" width="235" height="239" class="size-full wp-image-682" /></a><p class="wp-caption-text">Selecting some space around the dust spot</p></div>

<ol>
<li><strong>Go to Filters->Map->Resynthesize</strong> and run the <strong>Resynthesize</strong> filter:</li>
</ol>

<div id="attachment_686" class="wp-caption aligncenter" style="width: 393px"><a href="http://dodonov.net/blog/wp-content/uploads/2009/12/res5.jpg"><img src="http://dodonov.net/blog/wp-content/uploads/2009/12/res5.jpg" alt="" title="5" width="383" height="406" class="size-full wp-image-686" /></a><p class="wp-caption-text">The Resynthesizer plugin in all its glory</p></div>

<ol>
<li><strong>Wait, wait, and&#8230;</strong>:</li>
</ol>

<div id="attachment_684" class="wp-caption aligncenter" style="width: 255px"><a href="http://dodonov.net/blog/wp-content/uploads/2009/12/res6.jpg"><img src="http://dodonov.net/blog/wp-content/uploads/2009/12/res6.jpg" alt="" title="6" width="245" height="215" class="size-full wp-image-684" /></a><p class="wp-caption-text">Magic!</p></div>

<ol>
<li><strong>That&#8217;s it!</strong>:</li>
</ol>

<div id="attachment_685" class="wp-caption aligncenter" style="width: 310px"><a href="http://dodonov.net/blog/wp-content/uploads/2009/12/res7.jpg"><img src="http://dodonov.net/blog/wp-content/uploads/2009/12/res7-300x187.jpg" alt="" title="7" width="300" height="187" class="size-medium wp-image-685" /></a><p class="wp-caption-text">A perfect clear sky!</p></div>

<p>Of course, it all could be done manually in gimp. However, the <strong>Resynthesizer</strong> plugin just makes it easier and better.</p>

<p>So what is the result? A bit more magic + some <strong>Hugin</strong> hacking and&#8230;:</p>

<p><a href="http://www.flickr.com/photos/eugeni_dodonov/4225158661/" title="Panoramic view of Ilha Bela/SP, Brazil by eugeni_dodonov, on Flickr" onclick="urchinTracker('/outgoing/www.flickr.com/photos/eugeni_dodonov/4225158661/?referer=');"><img src="http://farm5.static.flickr.com/4044/4225158661_7136603c9b.jpg" width="500" height="197" alt="Panoramic view of Ilha Bela/SP, Brazil" /></a></p>

<p>Yes, that&#8217;s right. Every image on panorama had a dust spot, which I cleared up with Resynthesizer. So next time you encounter some dust on your photo, remember that there is a <strong>GREAT</strong> open-source plugin for gimp out there to help!</p>

<p>Enjoy, and have a Happy New Year! <img src='http://dodonov.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://dodonov.net/blog/2009/12/29/cleaning-dust-on-photos-or-in-gimp-we-trust/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
	</channel>
</rss>
