<?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>Romano Giannetti&#039;s blog &#187; Photography</title>
	<atom:link href="http://rlog.rgtti.com/category/photography/feed/" rel="self" type="application/rss+xml" />
	<link>http://rlog.rgtti.com</link>
	<description>rlog: computer, cooking, thinking</description>
	<lastBuildDate>Mon, 13 Feb 2012 11:26:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Recreating bokeh (just an idea)</title>
		<link>http://rlog.rgtti.com/2012/02/08/recreating-bokeh-just-an-idea/</link>
		<comments>http://rlog.rgtti.com/2012/02/08/recreating-bokeh-just-an-idea/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 13:57:38 +0000</pubDate>
		<dc:creator>romano</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Photography]]></category>

		<guid isPermaLink="false">http://rlog.rgtti.com/?p=422</guid>
		<description><![CDATA[<p>Bokeh is that nice off-focus effect that good lenses can give you on portraits or photos of details, helping centering your attention on your subject and not on the background of the photo.</p> <p>Unfortunately, &#8220;nice&#8221; bokeh is well-tied to &#8220;nice&#8221; (==expensive) lenses. And sometime simply you just have a photo shot with too much depth [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Bokeh">Bokeh</a> is that nice off-focus effect that good lenses can give you on portraits or photos of details, helping centering your attention on your subject and not on the background of the photo.</p>
<p>Unfortunately, &#8220;nice&#8221; bokeh is well-tied to &#8220;nice&#8221; (==expensive) lenses. And sometime simply you just have a photo shot with too much depth of field (maybe because there was too much light, or the photographer, for example my 6-years old daughter, just know to point and shot). So I thought&#8230; it&#8217;s possible to reproduce it on a photo after the fact?</p>
<p>The poor man solution is easy: select your foreground in GIMP or Photoshop or whatever you use to edit your photo, invert the selection, blur. But this does not look like bokeh at all. The problem is that with real bokeh, distant point of light are transformed in big disks, and nearer one (although off focus) on smaller ones. So I though&#8230; well, let&#8217;s try to play a bit.</p>
<p><a href="http://rlog.rgtti.com/wp-content/uploads/2012/02/bk_big.jpg"><img class="size-full wp-image-425    alignleft" style="margin-left: 10px; margin-right: 10px;" title="bk_big" src="http://rlog.rgtti.com/wp-content/uploads/2012/02/bk_big.jpg" alt="" width="33" height="33" /></a></p>
<p><a href="http://rlog.rgtti.com/wp-content/uploads/2012/02/08/recreating-bokeh-just-an-idea/bk_med.jpg"><img class="size-full wp-image-427   alignleft" style="margin-left: 10px; margin-right: 10px;" title="bk_med" src="http://rlog.rgtti.com/wp-content/uploads/2012/02/08/recreating-bokeh-just-an-idea/bk_med.jpg" alt="" width="33" height="33" /></a></p>
<p><a href="http://rlog.rgtti.com/wp-content/uploads/2012/02/08/recreating-bokeh-just-an-idea/bk_lit.jpg"><img class="size-full wp-image-426    alignleft" style="margin-left: 10px; margin-right: 10px;" title="bk_lit" src="http://rlog.rgtti.com/wp-content/uploads/2012/02/08/recreating-bokeh-just-an-idea/bk_lit.jpg" alt="" width="33" height="33" /></a></p>
<p>So I prepared three &#8220;bokeh masks&#8221; that would represent how a point of light can be transformed at high, medium and low distances. See the example at the left.</p>
<p>Now the trick is to select one photo and to prepare a mask for it. Paint black the foreground, which will be left as-is, and in different shade of gray the other parts of the photo, from near (dark gray) to far (light gray) to very far (white). See the photo and the mask below.</p>
<p><a href="http://rlog.rgtti.com/wp-content/uploads/2012/02/08/recreating-bokeh-just-an-idea/little.jpg"><img class="alignnone size-large wp-image-446" title="uffa" src="http://rlog.rgtti.com/wp-content/uploads/2012/02/08/recreating-bokeh-just-an-idea/uffa-1024x385.jpg" alt="" width="640" height="240" /></a></p>
<p>(click on the photo to see the original photo, full size). now I have written a little program that apply the &#8220;blur&#8221; or, technically speaking, convolute the correct bokeh image on the photo.Here is the result:</p>
<div>
<dl id="attachment_447" class="wp-caption alignnone" style="width: 310px;">
<dt class="wp-caption-dt"><a href="http://rlog.rgtti.com/wp-content/uploads/2012/02/08/recreating-bokeh-just-an-idea/output.jpg"><img class="size-medium wp-image-447" title="output" src="http://rlog.rgtti.com/wp-content/uploads/2012/02/08/recreating-bokeh-just-an-idea/output-300x200.jpg" alt="" width="300" height="200" /></a></dt>
<dd class="wp-caption-dd">(click for full size)</dd>
</dl>
</div>
<p>The program is written in python, it&#8217;s dog slow, it can be done better, the mask has been done with the electronic equivalent of a hammer, etc. etc. But this post is just to show the idea. In principle, a general program would interpolate among the bokeh images, to accept more than three levels of &#8220;distance&#8221;&#8230; but think the experiment you can do with it! Would you try an octagonal bokeh effect? Or a doughnut one?</p>
<p>Doughnut bokeh:</p>
<p><a href="http://rlog.rgtti.com/wp-content/uploads/2012/02/08/recreating-bokeh-just-an-idea/out_donuts.jpg"><img class="alignnone size-medium wp-image-454" title="out_donuts" src="http://rlog.rgtti.com/wp-content/uploads/2012/02/08/recreating-bokeh-just-an-idea/out_donuts-300x200.jpg" alt="" width="300" height="200" /></a></p>
<p>And this is one made with an hexagonal aperture pattern:</p>
<p><a href="http://rlog.rgtti.com/wp-content/uploads/2012/02/08/recreating-bokeh-just-an-idea/out_exa.jpg"><img class="alignnone size-medium wp-image-455" title="out_exa" src="http://rlog.rgtti.com/wp-content/uploads/2012/02/08/recreating-bokeh-just-an-idea/out_exa-300x200.jpg" alt="" width="300" height="200" /></a></p>
<p>It&#8217;s a very subtle difference, but it&#8217;s there &#8212; I especially like the hexagonal one.</p>
<p>If you like I can share the program under GPLv3 license, for free inclusion in free software. For other kind of licenses, contact <a href="mailto:romano@rgtti.com">me</a> <img src='http://rlog.rgtti.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>BTW, it seems that I effectively reinvented the weel.<a href="http://forums.dpreview.com/forums/readflat.asp?forum=1006&amp;message=40545596&amp;changemode=1"> See here&#8230;</a></p>
<p>Have a nice day!</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://rlog.rgtti.com/2012/02/08/recreating-bokeh-just-an-idea/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello world!</title>
		<link>http://rlog.rgtti.com/2009/12/21/hello-world/</link>
		<comments>http://rlog.rgtti.com/2009/12/21/hello-world/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 21:28:09 +0000</pubDate>
		<dc:creator>romano</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Computers]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Español]]></category>
		<category><![CDATA[Food&Cooking]]></category>
		<category><![CDATA[Italiano]]></category>
		<category><![CDATA[Language]]></category>
		<category><![CDATA[Photography]]></category>
		<category><![CDATA[readme!]]></category>

		<guid isPermaLink="false">http://rlog.rgtti.com/?p=1</guid>
		<description><![CDATA[<p>Welcome to Romano Giannetti blog! This is just a start post. Please check my home page, there will be things appearing there.</p> <p>Per ora, ho trasferito qui IHC Memories, il sito dove ho raccolto tre anni di ricette, suggerimenti e trucchi di cucina apparsi sul newsgroup it.hobby.cucina. I newsgroup sono, sembra, una cosa del passato, [...]]]></description>
			<content:encoded><![CDATA[<p>Welcome to Romano Giannetti blog! This is just a start post. Please check <a href="http://www.rgtti.com/">my home page</a>, there will be things appearing there.</p>
<p>Per ora, ho trasferito qui<a href="http://www.rgtti.com/IHC/"> IHC Memories</a>, il sito dove ho raccolto tre anni di ricette, suggerimenti e trucchi di cucina apparsi sul newsgroup it.hobby.cucina. I newsgroup sono, sembra, una cosa del passato, però c&#8217;è tanta informazione in questi post&#8230; che mi semba un peccato perderli.</p>
<p>¡Que os guste el sito!</p>
<p><a href="http://rlog.rgtti.com/wp-content/uploads/2009/12/21/hello-world/rgttiwm.png"><img class="alignleft size-full wp-image-47" title="rgttiwm" src="http://rlog.rgtti.com/wp-content/uploads/2009/12/21/hello-world/rgttiwm.png" alt="RGtti Logo" width="100" height="75" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://rlog.rgtti.com/2009/12/21/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

