<?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>jueseph.com</title>
	<atom:link href="http://jueseph.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://jueseph.com</link>
	<description>home</description>
	<lastBuildDate>Sat, 21 Apr 2012 18:13:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Podcast</title>
		<link>http://jueseph.com/2012/03/podcast/</link>
		<comments>http://jueseph.com/2012/03/podcast/#comments</comments>
		<pubDate>Fri, 09 Mar 2012 15:30:08 +0000</pubDate>
		<dc:creator>Wang</dc:creator>
				<category><![CDATA[rambling]]></category>

		<guid isPermaLink="false">http://jueseph.com/?p=1447</guid>
		<description><![CDATA[For the few that actually followed this blog at some point: I am now devoting my Internet energies to Google+ and a music podcast, and probably won&#8217;t be posting much on here any longer. Check those out, and thanks!]]></description>
			<content:encoded><![CDATA[<p>For the few that actually followed this blog at some point: I am now devoting my Internet energies to <a href="https://plus.google.com/113287290466157671823/posts">Google+</a> and a <a href="http://thelabrotation.tumblr.com/">music podcast</a>, and probably won&#8217;t be posting much on here any longer. Check those out, and thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://jueseph.com/2012/03/podcast/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rachmaninov sounds like an 80&#8242;s high school dance</title>
		<link>http://jueseph.com/2011/01/rachmaninov-sounds-like/</link>
		<comments>http://jueseph.com/2011/01/rachmaninov-sounds-like/#comments</comments>
		<pubDate>Sun, 23 Jan 2011 21:41:27 +0000</pubDate>
		<dc:creator>Wang</dc:creator>
				<category><![CDATA[rambling]]></category>
		<category><![CDATA[classical music]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[music]]></category>

		<guid isPermaLink="false">http://jueseph.com/?p=1439</guid>
		<description><![CDATA[View this post on my blog if the audio clips below aren&#8217;t showing up. Just saw this old (but fun) post on the blog Mental Floss, &#8220;6 pop songs that rip off classical music.&#8221; Some aren&#8217;t so surprising&#8211;for example, the several rap songs with samples of dramatic orchestral pieces. If the combination of rap and (<a href="http://jueseph.com/2011/01/rachmaninov-sounds-like/">More...</a>)]]></description>
			<content:encoded><![CDATA[<p class="endnote">View <a href="http://jueseph.com/2011/01/rachmaninov-sounds-like">this post on my blog</a> if the audio clips below aren&#8217;t showing up.</p>
<p>Just saw this old (but fun) post on the blog Mental Floss, &#8220;<a href="http://www.mentalfloss.com/blogs/archives/22026">6 pop songs that rip off classical music</a>.&#8221; Some aren&#8217;t so surprising&#8211;for example, the several rap songs with samples of dramatic orchestral pieces. If the combination of rap and orchestral backdrops and doesn&#8217;t ring a bell, see exhibits <a href="http://www.youtube.com/watch?v=E5a93wABHNM">one</a>, <a href="http://www.youtube.com/watch?v=H7VZt4mmPHo">two</a>, <a href="http://www.youtube.com/watch?v=j5-yKhDd64s">three</a>, and <a href="http://www.youtube.com/watch?v=o5YJfPBqPNE">four</a>. Rappers (or more likely, their producers) are second only to late-19th-century romantics in their love of dramatic string music.</p>
<p>My favorite classical/pop hybrids, though, are the more creative&#8211;Connor Oberst of Bright Eyes channeling Beethoven via a stripped-down guitar riff; Janet Jackson taking inspiration from the avante-garde French modernism of Erik Satie (this one is awesome). As a side note, these clips confirm my suspicion that the minor V<sup>7</sup>-i is pretty much every human being&#8217;s favorite chord progression.</p>
<p>Obviously, <a href="http://en.wikipedia.org/wiki/Musical_quotation">musical quotation</a> (when classical composers copy from each other) and <a href="http://en.wikipedia.org/wiki/Sampling_(music)">sampling</a> (the same thing, but in pop) happens all the time&#8211;purists might even say it happens in every single piece of music ever. But cross-contamination of recognizable motifs between <em>different</em> genres of music is much less common, and I like to play a game with myself to find the most obscure, surprising, or just plain incongruous example of this.</p>
<p>For example, Rachmaninov&#8217;s 2nd piano concerto (&#8220;Rach 2&#8243;) immediately comes to mind as possibly the single most fruitful source of pop songs in all of 20th century classical music. Some of the derivations were famous in their time, but later forgotten, like this song:</p>
<p><iframe title="YouTube video player" class="youtube-player" type="text/html" width="480" height="390" src="http://www.youtube.com/embed/e_woly_UvEo" frameborder="0" allowFullScreen></iframe></p>
<p>You might recognize the vocal melody of this (which is even in the same key as the original) from the first movement of Rach 2:</p>
<p>Here&#8217;s another song in the same style, this time based on the 3rd movement of the same piece:</p>
<p><iframe title="YouTube video player" class="youtube-player" type="text/html" width="480" height="390" src="http://www.youtube.com/embed/JwnJzm-kubE" frameborder="0" allowFullScreen></iframe></p>
<p>The original snippet from Rach 2, movement III:</p>
<p>Just to show what a melody-writing badass Rachmaninov is, here is a clip from the second movement of Rach 2. Before scrolling further, try to guess what song ended up using this.</p>
<p><span id="more-1439"></span>Now here&#8217;s the song. Note the replacement of almost all of the harmonic nuance of the original with a big dollop of 80&#8242;s melodrama.</p>
<p><iframe title="YouTube video player" class="youtube-player" type="text/html" width="480" height="390" src="http://www.youtube.com/embed/WxHHMEEKsFA" frameborder="0" allowFullScreen></iframe></p>
<p>Incidentally, &#8220;All By Myself&#8221; (and its use in certain <a href="http://www.youtube.com/watch?v=0D0zfB1l1x0">chick flicks</a>) is actually what prompted this blog post, as my friend Reed observed yesterday that &#8220;Every time I hear the slow movement of Rach 2 it sounds weirdly familiar.&#8221; I realized then that most people probably feel this way when they first hear Rach 2.</p>
<p>Of course, you could charge that Rachmaninov was writing 20th-century melodrama in the first place, so it&#8217;s not a huge surprise for its melodies to end up in more of the same. For a more obscure sample, I dug up this song from the underground rapper / fictional character <a href="http://en.wikipedia.org/wiki/Dr._Octagon">Dr. Octagon</a>.</p>
<p><iframe title="YouTube video player" class="youtube-player" type="text/html" width="480" height="390" src="http://www.youtube.com/embed/V9VYzNUXGDA" frameborder="0" allowFullScreen></iframe></p>
<p>And the source? None other than the second violin concerto by Bela Bartok, a lyrical yet almost completely un-hummable piece of modernism inspired by Hungarian folk melodies. Here&#8217;s the sample in its natural habitat:</p>
]]></content:encoded>
			<wfw:commentRss>http://jueseph.com/2011/01/rachmaninov-sounds-like/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://jueseph.com/wp-content/uploads/2011/01/rach2-I-1.mp3" length="224888" type="audio/mpeg" />
<enclosure url="http://jueseph.com/wp-content/uploads/2011/01/rach2-III-1.mp3" length="838870" type="audio/mpeg" />
<enclosure url="http://jueseph.com/wp-content/uploads/2011/01/rach2-II-1.mp3" length="583497" type="audio/mpeg" />
<enclosure url="http://jueseph.com/wp-content/uploads/2011/01/bartok-vln-I.mp3" length="691330" type="audio/mpeg" />
		</item>
		<item>
		<title>A guide to defining systems biology</title>
		<link>http://jueseph.com/2010/09/a-guide-to-defining-systems-biology/</link>
		<comments>http://jueseph.com/2010/09/a-guide-to-defining-systems-biology/#comments</comments>
		<pubDate>Tue, 14 Sep 2010 04:19:24 +0000</pubDate>
		<dc:creator>Wang</dc:creator>
				<category><![CDATA[rambling]]></category>
		<category><![CDATA[school]]></category>
		<category><![CDATA[science]]></category>

		<guid isPermaLink="false">http://jueseph.com/?p=1433</guid>
		<description><![CDATA[What is systems biology? I&#8217;ve been asked this 102 times in the last few weeks, and if you are my friend or classmate you may find yourself having to answer this question as well, so here is how you respond, depending on who asked the question. To your friends: &#8220;Systems biology is the study of (<a href="http://jueseph.com/2010/09/a-guide-to-defining-systems-biology/">More...</a>)]]></description>
			<content:encoded><![CDATA[<p>What is systems biology? I&#8217;ve been asked this 10<sup>2</sup> times in the last few weeks, and if you are my friend or classmate you may find yourself having to answer this question as well, so here is how you respond, depending on who asked the question.</p>
<p><strong>To your friends:</strong><br />
&#8220;Systems biology is the study of living things, but it&#8217;s cooler than non-systems biology.&#8221;</p>
<p><strong>To your parents:</strong><span id="more-1433"></span><br />
&#8220;Systems biology is the study of living things, but there&#8217;s more grant funding for it than non-systems biology.&#8221;</p>
<p><strong>To other grad students:</strong><br />
&#8220;Systems biology is the study of biological systems using concepts and tools from &lt;insert their field here&gt;.&#8221;</p>
<p><strong>To a fellow systems biologist:</strong><br />
&#8220;I don&#8217;t know.&#8221;</p>
<p><strong>To a journalist:</strong><br />
&#8220;Systems biology is a response to the glut of molecular data produced by reductionist biology over the past few decades, and therefore it is the study of the design principles of biological systems rather than of the structure and properties of system components. Also, we know math.&#8221; (Then say the word &#8220;cancer&#8221; a few times.)</p>
<p><strong>To a 6-year-old:</strong><br />
&#8220;Systems biology is trying to write assembly instructions for a Lego set after you&#8217;ve been digging around in the dirt and found a mix of single and partly assembled Lego blocks. You&#8217;re looking at the little pieces and holding them in your hands but you think that they aren&#8217;t telling the whole story, so you try to make stuff with them, or you try to picture how you would make stuff with them, and what that stuff would look like.&#8221;</p>
<p>Now if the 6-year-old follows up with &#8220;What&#8217;s the point of writing Lego instructions?&#8221; just &#8216;fess up and tell him/her that you&#8217;re probably never going to come up with the full manual, but you don&#8217;t care because a) digging around in the dirt is fun and b) Legos are fun.</p>
<p>There you have it, an incomplete list of the least useful definitions of systems biology ever. For a more well-informed answer to the question, check out <a href="http://ittakes30.wordpress.com/category/what-is-systems-biology/">our department&#8217;s blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jueseph.com/2010/09/a-guide-to-defining-systems-biology/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The difference between undergrad and grad school</title>
		<link>http://jueseph.com/2010/08/the-difference-between-undergrad-and-grad-school/</link>
		<comments>http://jueseph.com/2010/08/the-difference-between-undergrad-and-grad-school/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 22:25:32 +0000</pubDate>
		<dc:creator>Wang</dc:creator>
				<category><![CDATA[rambling]]></category>
		<category><![CDATA[school]]></category>
		<category><![CDATA[systems biology]]></category>

		<guid isPermaLink="false">http://jueseph.com/?p=1432</guid>
		<description><![CDATA[Today was my first day of grad school (orientation). What was it like? Imagine a lanky, stubbled, Englishman declaiming the following: Here&#8217;s the difference between your undergrad studies and what you are about to embark on for your PhD. Undergrad is like being in a hurdles race. It&#8217;s 4 years, you know how many hurdles (<a href="http://jueseph.com/2010/08/the-difference-between-undergrad-and-grad-school/">More...</a>)]]></description>
			<content:encoded><![CDATA[<p>Today was my first day of grad school (orientation). What was it like? Imagine a lanky, stubbled, Englishman declaiming the following:</p>
<blockquote><p>Here&#8217;s the difference between your undergrad studies and what you are about to embark on for your PhD. Undergrad is like being in a hurdles race. It&#8217;s 4 years, you know how many hurdles you have to jump over and how high they are, and the goal is to clear them as quickly and as well as you can, while knocking down as few as possible.</p>
<p>Grad school is more like a one-way plane ticket to a Transylvanian castle, and when you get inside the doors shut behind you and you&#8217;re left in total darkness holding onto nothing but a single matchbook. You light the first match and discover that you are in a room full of objects covered by white sheets. Before the light from your match goes out you have time to uncover only one object. If you&#8217;re lucky, before you run out of matches you&#8217;ll uncover a sheet that has another box of matches under it. If you&#8217;re really lucky eventually you&#8217;ll find the key to the door so you can get out of the damn place.</p></blockquote>
<p>&#8230;to which a fellow grad student responded, can&#8217;t we just set fire to all the sheets?</p>
]]></content:encoded>
			<wfw:commentRss>http://jueseph.com/2010/08/the-difference-between-undergrad-and-grad-school/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Music: A Cheap Trick for Nerds? Part 2.</title>
		<link>http://jueseph.com/2010/07/music-a-cheap-trick-for-nerds-part-2/</link>
		<comments>http://jueseph.com/2010/07/music-a-cheap-trick-for-nerds-part-2/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 15:11:32 +0000</pubDate>
		<dc:creator>Wang</dc:creator>
				<category><![CDATA[classical music]]></category>
		<category><![CDATA[rambling]]></category>
		<category><![CDATA[music]]></category>

		<guid isPermaLink="false">http://jueseph.com/?p=1425</guid>
		<description><![CDATA[In my previous post I showed you a piece of piano music based on a Shepard Scale&#8211;it seems to go up and up forever. Listen to it (it&#8217;s at the bottom on this link), and then ask yourself: 1. Was that interesting? 2. Was that aesthetically pleasing or beautiful? 3. Was that music? Most people (<a href="http://jueseph.com/2010/07/music-a-cheap-trick-for-nerds-part-2/">More...</a>)]]></description>
			<content:encoded><![CDATA[<p>In my previous post I showed you a piece of piano music based on a Shepard Scale&#8211;it seems to go up and up forever. <a href="http://jueseph.com/2010/07/music-is-a-cheap-trick-for-nerds-part-1/">Listen to it (it&#8217;s at the bottom on this link)</a>, and then ask yourself: 1. Was that interesting? 2. Was that aesthetically pleasing or beautiful? 3. Was that music?</p>
<p>Most people would probably answer &#8220;no&#8221; to questions 2 and 3 after listening to that. It actually sounds stressful, even unpleasant. This, incidentally, is the general response of most people when they encounter contemporary classical music, especially the avant-garde stuff. However, if you are a modern composer, you are not most people.</p>
<p>Some people might ask, in response to question 1, what&#8217;s so interesting about a piece that sounds like it&#8217;s going up/down forever? It&#8217;s a cheap trick for nerds. To these people, if you are a modern composer, you should say &#8220;Uh, no!&#8221; after stammering a little. Then walk away, knowing in your heart that your tricks actually rather expensive, which is why you&#8217;re unemployed.</p>
<h3>Part 2: Overtone Series</h3>
<p><span id="more-1425"></span>Now listen to <a href="http://www.youtube.com/watch?v=4pzeXBuzl8Q">this</a>:<br />
<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/4pzeXBuzl8Q&amp;hl=en_US&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/4pzeXBuzl8Q&amp;hl=en_US&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>
<p>It&#8217;s a piece of &#8220;music&#8221; by composer Karlheinz Stockhausen, who loved useless concepts probably more than most smart people. His secret in this piece is the <a href="http://en.wikipedia.org/wiki/Overtone_series">overtone series</a>, a.k.a. harmonic series (or just &#8220;overtones&#8221;), combinations of pitches that fit a certain mathematical pattern. This pattern is what give natural sounds like a voice or an instrument their distinctive timbre (i.e. the &#8220;feel&#8221; or &#8220;texture&#8221; of a sound). In this piece, a chorus sings an overtone series dreamed up by the composer himself. What&#8217;s different about this, compared with, say, two country singers belting out a tune in parallel 3rds harmony, or a church choir singing a hymn, is that the pitch (and volume) of each voice is mathematically calculated to add up to something MORE than harmony. Stockhausen is basically using the choir to create a new &#8220;instrument&#8221; whose timbre comes from the precise combination of all the voices. </p>
<p>In this case the artificial &#8220;instrument&#8221; is a chorus that sounds weird. You can tell this is a significant achievement by imagining how long it took to convince a group of singers to sing random words from erotic poems that don&#8217;t sound like anything.</p>
<p>How about that Stockhausen? Interesting? Beautiful? Music? </p>
<p>No? A lot of other people would agree with you. They all went out to buy the Beatle&#8217;s &#8220;Sergeant Pepper&#8217;s Lonely Hearts Club Band&#8221; instead of going to hear this piece (both came out in the same year). But a small group of composers who call themselves &#8220;<a href="http://en.wikipedia.org/wiki/Spectralism">spectralists</a>&#8221; (some call them &#8220;insane&#8221;) love it. In fact, if they had money they would buy computers and learn <a href="http://en.wikipedia.org/wiki/Fourier_transform">fancy math</a>, so they can analyze the overtones of all sorts of sounds and write oodles of this kind of music. </p>
<p>If you think overtones are something that only nerds care about, you&#8217;re probably right, but just know that we&#8217;re talking about nerds from around the world here. There are folk music traditions based entirely on overtones. For example, check out this <a href="http://www.youtube.com/watch?v=NOsGvs1FZDs">video</a> of a Mongolian badass performing notes using the &#8220;throat singing&#8221; technique. Notice how, especially in the notes near the end of the video, you can hear very high pitched &#8220;buzzing&#8221; on top of the (mostly very low) bass notes he&#8217;s singing directly. These high pitches are overtones, and the Mongolian singer has developed his ability to control his vocal chords so that he can create melodies with those overtones. Note that every singer&#8211;and in fact, anything earthly that makes a sound&#8211;will create overtones. It&#8217;s just that usually overtones are very quiet and your ears focuses on the main pitch instead. Mongolian (and the related Tuvan) throat-singing flip that around, and draw your attention to the overtones by making the main pitch very very low.</p>
<p>Here&#8217;s a final, and much more familiar example of overtones used in music. This is a <a href="http://www.youtube.com/watch?v=SEAwl2jGxzc#t=1m58s">passage</a> of a guitar prelude that is played with &#8220;harmonics&#8221;&#8211;the overtones on a stringed instrument that players create by touching a string lightly, but not pressing it down. Notice how they&#8217;re much quieter and purer sounding than the typical notes that you would hear from guitar strings.</p>
<p>Next time I&#8217;ll show you examples of 12-tone music, a style of composition that is actually more pleasing to look at than it is to listen to. This is why it is respected and emulated by true artists around the world.</p>
]]></content:encoded>
			<wfw:commentRss>http://jueseph.com/2010/07/music-a-cheap-trick-for-nerds-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Music is a Cheap Trick for Nerds, Part 1</title>
		<link>http://jueseph.com/2010/07/music-is-a-cheap-trick-for-nerds-part-1/</link>
		<comments>http://jueseph.com/2010/07/music-is-a-cheap-trick-for-nerds-part-1/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 05:32:33 +0000</pubDate>
		<dc:creator>Wang</dc:creator>
				<category><![CDATA[classical music]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[rambling]]></category>

		<guid isPermaLink="false">http://jueseph.com/?p=1422</guid>
		<description><![CDATA[Modern classical music, a.k.a. &#8220;art music,&#8221; often gets a bad rap for being impossible to listen to. In fact, this is completely true. Since you&#8217;re probably very busy at work, allow me to take you on a stroll through Youtube and Wikipedia to see why. Part 1: The Shepard Scale First you need to understand (<a href="http://jueseph.com/2010/07/music-is-a-cheap-trick-for-nerds-part-1/">More...</a>)]]></description>
			<content:encoded><![CDATA[<p>Modern classical music, a.k.a. &#8220;art music,&#8221; often gets a bad rap for being impossible to listen to. In fact, this is completely true. Since you&#8217;re probably very busy at work, allow me to take you on a stroll through Youtube and Wikipedia to see why.</p>
<h3>Part 1: The Shepard Scale</h3>
<p>First you need to understand some abstract, completely useless concepts. Imagine playing an ascending scale or a note that slowly slides upward in pitch. When you get higher and higher, you slowly fade out&#8211;get softer and softer&#8211;but you fade in with the same scale several octaves below, which goes up a while but then also fades out. Keep repeating, and you end up with a scale, actually 2 or more overlapping scales, that seems to go up forever. This is called a <a href="http://en.wikipedia.org/wiki/Shepard_tone">Shepard scale</a>. Home exercise: try playing a Shepard scale. Home exercise: try doing that forever.</p>
<p>Let&#8217;s say you are a composer and instead of contributing something of tangible value to society, you want to write a piece of music using a Shepard Scale. If you have a good grad student stipend, or if that&#8217;s impossible, if you have a good faculty salary and have paid off your student loans but haven&#8217;t died of old age, you can buy an electronic &#8220;instrument&#8221; called a tone generator, and make this composition in 5 minutes&#8211;it sounds like <a href="http://en.wikipedia.org/wiki/File:DescenteInfinie.ogg">this</a>. It&#8217;s kind of lame, but you get the idea.</p>
<p>Fortunately, if you know how to click randomly on Youtube, the best kind of concept music is at your fingertips. For example, in the following video you&#8217;ll notice the hallmarks of a contemporary composition: lots of black ink, pages that don&#8217;t look like they have any notes on them and were drawn by babies, notes that require breaking appendages to play. <span id="more-1422"></span>This is known as &#8220;cryo-music,&#8221; music that needs to be frozen and revived 300 years from now when people have evolved 20 fingers on each hand:</p>
<p><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/gddnK17sN6Y&amp;hl=en_US&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/gddnK17sN6Y&amp;hl=en_US&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>
<p>Now listen to this&#8211;it&#8217;s written by Gyorgy Ligeti, who has two important qualities: he writes music for an anatomically plausible number of fingers, and he&#8217;s Hungarian:</p>
<p><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/BUB83_F-SmE&amp;hl=en_US&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/BUB83_F-SmE&amp;hl=en_US&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>
<p>The reason Gyorgy Ligeti wrote this piece is because the goal of all art is to sound like a person trying to get out of Hell by climbing a staircase, but not succeeding. Sublime.</p>
<p>Stay tuned for: <a href="http://jueseph.com/2010/07/music-a-cheap-trick-for-nerds-part-2/">Part 2</a>, where I explain what an overtone series is, and why you should listen to Karlheinz Stockhausen instead of the Beatles. (Hint: it&#8217;s not to make girls like you. Actually: it&#8217;s more the opposite.)</p>
]]></content:encoded>
			<wfw:commentRss>http://jueseph.com/2010/07/music-is-a-cheap-trick-for-nerds-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://en.wikipedia.org/wiki/File:DescenteInfinie.ogg" length="61807" type="audio/ogg" />
		</item>
		<item>
		<title>An American Dinner</title>
		<link>http://jueseph.com/2010/07/an-american-dinner/</link>
		<comments>http://jueseph.com/2010/07/an-american-dinner/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 03:43:55 +0000</pubDate>
		<dc:creator>Wang</dc:creator>
				<category><![CDATA[Food]]></category>
		<category><![CDATA[rambling]]></category>
		<category><![CDATA[cooking]]></category>
		<category><![CDATA[recipe]]></category>

		<guid isPermaLink="false">http://jueseph.com/?p=1416</guid>
		<description><![CDATA[from Dave&#8217;s Flickr I just discovered the joy of marinating meat. This first attempt is inspired by the motherland, although the real Chinese would never cook chicken this way. Same goes for the Thai-style stir-fry, which is Thai only in style. Be assured, though, that both came out tasty. Ginger-soy baked chicken Put a few (<a href="http://jueseph.com/2010/07/an-american-dinner/">More...</a>)]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/dklein/4790373429/" title="Dinner by Dave Kleinschmidt, on Flickr"><img src="http://farm5.static.flickr.com/4142/4790373429_4d261c1a16.jpg" width="500" height="374" alt="Dinner" /></a><br />
<span class="caption">from <a href="http://www.flickr.com/photos/dklein/4790373429/">Dave&#8217;s Flickr</a></span></p>
<p>I just discovered the joy of marinating meat. This first attempt is inspired by the motherland, although the real Chinese would never cook chicken this way. Same goes for the Thai-style stir-fry, which is Thai only in style.</p>
<p>Be assured, though, that both came out tasty.<span id="more-1416"></span></p>
<h3>Ginger-soy baked chicken</h3>
<p>Put a few <strong>chicken thighs</strong> in a ziplock bag or tupperware, with <strong>soy sauce</strong>, <strong>rice vinegar</strong> (black or white) finely chopped <strong>ginger</strong> and <strong>garlic</strong>. Optional ingredients include <strong>spiciness</strong> (cayenne powder or chili flakes), <strong>sesame-ness</strong> (sesame oil or toasted seeds), and <strong>sweetness</strong> (sugar, honey, or maple syrup). Leave in fridge for a day/overnight. If you start with frozen chicken, leave at room temperature for a day to combine thawing and marinating.</p>
<p>When you get home from work, take the chicken out of the marinade and pop into a 400°F oven on a baking pan. Baste every 10 minutes or so by putting some of the marinade on top of the chicken. The chicken is done after ~30min or if your meat thermometer / eyes tell you so.</p>
<h3>Thai-style stir-fry</h3>
<p>You can put any vegetables you want in here. I chose <strong>kale, carrots, water chestnuts</strong>, and <strong>fresh baby corn</strong>. Chop into cookable pieces&#8211;strips for kale, thin slices for carrots and chestnuts, break corn in half. Pre-cook vegetables by blanching* (carrots, corn) or sautéing with some water or <strong>stock</strong> (kale). Water chestnuts don&#8217;t need to be pre-cooked.</p>
<p>What makes this Thai is the sauce. Start this by cooking some diced <strong>onions</strong>, minced <strong>garlic+ginger</strong>, and coarsely chopped <strong>lemongrass</strong> in <strong>vegetable oil</strong>. When onions are soft, add a few dashes of <strong>sherry</strong> and let reduce briefly. Then add <strong>stock+coconut milk</strong>, <strong>spiciness</strong> (chili flakes or chopped fresh chilis), and <strong>sweetness</strong> (sugar or honey). Cook until thick, then take off heat.</p>
<p>Now combine vegetables and sauce in a big wok and stir-fry on high heat for a few minutes.</p>
<p class="footnote">*Blanching means quickly boiling in lightly salted water so the vegetables don&#8217;t get soggy. Bring water to boil, toss in vegetables, turn off heat, wait a minute, and pour into colander to stop cooking.</p>
<h3>Sauce (for chicken)</h3>
<p>When you take the chicken out of the baking pan, skim off most of the oil with a spoon, put the pan on a burner, and pour in some <strong>stock+sherry</strong>. Scrape up the gunk on the bottom, mix it up, and reduce. Spoon some of this over the chicken.</p>
<h3>Combined</h3>
<p>Serve chicken and stir-fry on steamed white rice. Keep a bit of the sauce on the side and add to the rice if you get bored of the plain rice flavor.</p>
]]></content:encoded>
			<wfw:commentRss>http://jueseph.com/2010/07/an-american-dinner/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Noodles with pork broth</title>
		<link>http://jueseph.com/2010/07/noodles-with-pork-broth/</link>
		<comments>http://jueseph.com/2010/07/noodles-with-pork-broth/#comments</comments>
		<pubDate>Tue, 06 Jul 2010 03:46:39 +0000</pubDate>
		<dc:creator>Wang</dc:creator>
				<category><![CDATA[Food]]></category>
		<category><![CDATA[cooking]]></category>
		<category><![CDATA[recipe]]></category>

		<guid isPermaLink="false">http://jueseph.com/?p=1413</guid>
		<description><![CDATA[Another of my mom&#8217;s recipes. The noodles are quick to make, but the broth takes a while to simmer. Noodles: Mix some flour (~2 cups) and water (~0.5 cup) in a pot or mixing bowl. This isn&#8217;t exact, so start with the flour and add water in small amounts until you get a good dry (<a href="http://jueseph.com/2010/07/noodles-with-pork-broth/">More...</a>)]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/cremeglace/4766742460/" title="Noodles with pork neck bone broth by cremeglace, on Flickr"><img src="http://farm5.static.flickr.com/4074/4766742460_f6e3684704.jpg" width="500" height="375" alt="Noodles with pork neck bone broth"></a></p>
<p>Another of my mom&#8217;s recipes. The noodles are quick to make, but the broth takes a while to simmer.<span id="more-1413"></span></p>
<h3>Noodles:</h3>
<p>Mix some <strong>flour</strong> (~2 cups) and <strong>water</strong> (~0.5 cup) in a pot or mixing bowl. This isn&#8217;t exact, so start with the flour and add water in small amounts until you get a good dry dough&#8211;this is less water than you might think, so make sure to really mix and knead the dough with your hands before adding the next batch of water. </p>
<p>Once you have a ball of dough barely sticking together, put it on a flat, floured surface and start kneading it, maybe about 10 minutes or until it gets too tough. Leave the dough in a ball, covered with a moist paper towel, to rest for 30 minutes.</p>
<p><a href="http://www.flickr.com/photos/cremeglace/4766742560/" title="Chopping noodles by cremeglace, on Flickr"><img src="http://farm5.static.flickr.com/4093/4766742560_a834159ca9_t.jpg" width="100" height="73" alt="Chopping noodles" class="alignright"></a> When the dough has rested and softened, roll it out into a thin (2-5mm thick) round sheet with a rolling pin. Fold this sheet onto itself 4-5 times, and cut into noodles. Either thin (2-3mm) or wide noodles (5-10mm) are good. </p>
<p>To store, sprinkle the noodles generously with flour and freeze in a bag. Frozen or fresh noodles can be cooked by boiling in water for 5-10 min, stirring occasionally to prevent sticking.</p>
<h3>Broth:</h3>
<p>Get some stewing cuts of meat. I used <strong>pork neck bone</strong> pieces, but beef bones, chuck steak, lamb leg, or any fatty pieces of robust red meat can traditionally be used for this. Quickly boil a few pieces of meat in a pot until the water gets foamy. </p>
<p>Strain the meat by pouring the water and meat into a colander, rinse the foam off, and return the pieces of meat to the empty pot. </p>
<p>Throw in <strong>a small carrot</strong>, a <strong>stalk of celery</strong>, <strong>1/4-1/2 of an onion</strong>, <strong>5-10 Szechuan peppercorns</strong>, <strong>a star anise seed</strong>, <strong>a bay leaf</strong>, and cover with water. Simmer for an hour or longer. At the end add <strong>salt</strong> and/or <strong>soy sauce</strong> to taste.</p>
<h3>Combined:</h3>
<p>Half-fill a bowl with freshly cooked noodles. Throw some chopped <strong>cilantro</strong> and <strong>scallions</strong> on, and a dash of <strong>chili oil</strong>, <strong>sesame oil</strong>, and/or sesame seeds. Ladle broth to cover noodles and herbs, throw on a piece of meat if you want. Eat.</p>
]]></content:encoded>
			<wfw:commentRss>http://jueseph.com/2010/07/noodles-with-pork-broth/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>On Google Buzz now&#8230;</title>
		<link>http://jueseph.com/2010/06/on-google-buzz-now/</link>
		<comments>http://jueseph.com/2010/06/on-google-buzz-now/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 04:11:53 +0000</pubDate>
		<dc:creator>Wang</dc:creator>
				<category><![CDATA[rambling]]></category>
		<category><![CDATA[life]]></category>

		<guid isPermaLink="false">http://jueseph.com/?p=1411</guid>
		<description><![CDATA[In case you actually follow this blog, just a note that I&#8217;ve pretty much consolidated my entire online presence to Google Buzz. Posts on this blog will be fed into my Buzz, and anything I tweet will also hit Buzz first. Some thoughts and links, additionally, will only live on Buzz.]]></description>
			<content:encoded><![CDATA[<p>In case you actually follow this blog, just a note that I&#8217;ve pretty much consolidated my entire online presence to <a href="http://www.google.com/profiles/cremeglace#buzz">Google Buzz</a>. Posts on this blog will be fed into my Buzz, and anything I tweet will also hit Buzz first. Some thoughts and links, additionally, will only live on Buzz.</p>
]]></content:encoded>
			<wfw:commentRss>http://jueseph.com/2010/06/on-google-buzz-now/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Opticrop: Content-aware Cropping with PHP and ImageMagick</title>
		<link>http://jueseph.com/2010/06/opticrop-content-aware-cropping-with-php-and-imagemagick/</link>
		<comments>http://jueseph.com/2010/06/opticrop-content-aware-cropping-with-php-and-imagemagick/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 22:06:37 +0000</pubDate>
		<dc:creator>Wang</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[image processing]]></category>
		<category><![CDATA[imagemagick]]></category>
		<category><![CDATA[imagick]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://jueseph.com/?p=1306</guid>
		<description><![CDATA[Opticrop is a PHP script I wrote to crop a thumbnail of a specific width and height from a full-sized image. Unlike most cropping routines out there, Opticrop uses edge-detection to find the most &#8220;interesting&#8221; part of the image to crop, so you won&#8217;t get a useless thumbnail just because the top-left corner of your (<a href="http://jueseph.com/2010/06/opticrop-content-aware-cropping-with-php-and-imagemagick/">More...</a>)]]></description>
			<content:encoded><![CDATA[<p>Opticrop is a PHP script I wrote to crop a thumbnail of a specific width and height from a full-sized image. </p>
<p>Unlike most cropping routines out there, Opticrop uses edge-detection to find the most &#8220;interesting&#8221; part of the image to crop, so you won&#8217;t get a useless thumbnail just because the top-left corner of your image happened to be a big patch of featureless sky. This post is a big-picture discussion of my method. If you just want the script, see the post on <a href="http://jueseph.com/2010/06/opticrop-usage-and-implementation/">Opticrop&#8217;s usage and implementation</a>.<span id="more-1306"></span></p>
<h3>The Thumbnail-Cropping Problem</h3>
<p>You&#8217;ve probably dealt with the thumbnail problem if you run a blog or website that publishes images with articles. When you link to that article (say, on your front page), it&#8217;s nice to have a thumbnail of that article&#8217;s &#8220;feature&#8221; image for your readers to click on.</p>
<p>The simplest way to make a thumbnail is to proportionally resize the original image to fit a width or height. However, if both dimensions are constrained, you usually have to crop the image before resizing. </p>
<p>For example, say your home page design uses square thumbnails, but your source images come in an odd assortment of width/height combinations. You&#8217;ll need to open the source image up in Photoshop/GIMP, take your crop, and save the thumbnail for your website. If you&#8217;re doing this dozens of times a day (like our photo editor does), it would be much nicer if you could somehow use a script&#8211;you open up the URL to a script, give it the path to an image, and it serves back a cropped/resized thumbnail. Unfortunately, a good script to do this is hard to come by, which is why I wrote Opticrop.</p>
<p><img src="http://jueseph.com/wp-content/uploads/2010/06/fig-1-cropping.png" alt="" title="fig-1-cropping" width="388" height="323" class="alignright size-full wp-image-1374" /></p>
<p class="caption"><strong>Figure 1. The usefulness of cropping.</strong> Suppose you need a 120px-wide thumbnail from a 600&#215;400 source image. You can resize it proportionally to fit the width (left), but the height will be 80px in the thumbnail. If thumbnail height also needs to be 120px, then the original image should first be cropped to the 1:1 aspect ratio of the thumbnail (red box), and then resized (right).</p>
<h3>Existing Solutions</h3>
<p>A Google search will turn up simple explanations on how to resize/or crop images in PHP&#8211;see &#8220;examples&#8221; at the bottom of <a href="http://php.net/manual/en/function.imagecopyresampled.php">this page</a>, or <a href="http://fourmilestomay.com/2009/resize-crop-photos-php-gd-library/">these</a> <a href="http://www.talkphp.com/advanced-php-programming/1709-cropping-images-using-php.html">tutorials</a>. Many CMS&#8217;s also come bundled with thumbnail-generation utilities. For instance, Movable Type 5 (the CMS used by <a href="http://news.sciencemag.org">my employer</a>) has <a href="http://www.movabletype.org/documentation/appendices/tags/assetthumbnailurl.html">template tags</a> for on-the-fly generation of resized or square-cropped thumbnails.</p>
<p>These solutions have their limitations. MT5 can make square thumbnails, but won&#8217;t make them in arbitrary dimensions. What if you want a 200&#215;50 thumbnail for a &#8220;related articles&#8221; widget for your sidebar? More generally, I want a script that will take an image, a width, and a height, and give me a thumbnail back that is exactly what a photo editor would have made in Photoshop.</p>
<p>With this goal in mind, I tracked down a few &#8220;smart&#8221; image resizer/croppers out there to find a starting point. A script by <a href="http://www.theukwebdesigncompany.com/articles/php-imagemagick.php">Gijs van Tulder</a> ingeniously delegates all its work to the command-line ImageMagick utility, so you can run a <a href="http://www.imagemagick.org/Usage/">bewildering array</a> of commands through a simple URL string&#8211;he even wrote a custom command, <code>part</code>, to do a simple crop-and-resize. Another script by <a href="http://shiftingpixel.com/2008/03/03/smart-image-resizer/">Joe Lencioni</a> isn&#8217;t as powerful, but it does its own work using only functionality that comes with PHP&#8211;so you don&#8217;t have to have ImageMagick installed or set up additional modules. </p>
<p>Van Tulder&#8217;s <code>part</code> command and MT5&#8242;s square-thumbnail-generator crop as large of a region from the source image as possible without changing the aspect ratio, and center the crop along the dimension that needs cropping. This &#8220;largest centered crop&#8221; is generally a safe and simple strategy. However, if the source and target images have very different aspect ratios (i.e. you need to crop out more stuff), then a smarter strategy might be needed. Also, if the image contains a single small subject on an otherwise blank background, then you don&#8217;t want to take the biggest crop you can get, but rather just enough to capture the subject. Otherwise you run the risk of scaling that spot down into obscurity.</p>
<p><a href="http://jueseph.com/wp-content/uploads/2010/06/f2-centeredcrop.png"><img src="http://jueseph.com/wp-content/uploads/2010/06/f2-centeredcrop-300x130.png" alt="" title="f2-centeredcrop" width="300" height="130" class="alignright size-medium wp-image-1386" /></a></p>
<p class="caption"><strong>Figure 2. Pitfalls of the &#8220;largest centered crop&#8221;.</strong> It&#8217;s easiest to take the largest centered crop before scaling to the target dimensions (such as a small square thumbnail), but the strategy yields less-than-ideal results when the aspect ratio of the original or target image are severely elongated, or when there is a small single subject on an otherwise uniform background.</p>
<h3>Content-Aware Cropping</h3>
<p>In other words, the script needs to understand the content of an image. There are all sorts of fancy ways to do this, but I set out to write something that will be quick, simple, and require a minimum of external code. A key first step would be running the image to crop through an <a href="http://en.wikipedia.org/wiki/Edge_detection">edge-detection</a> filter. Like the name suggests, an edge-detection filter transforms an image based on changes in color and lightness&#8211;&#8221;interesting&#8221; areas with lots of detail get mapped to bright pixels, and uniform, boring areas like sky get mapped to dark pixels.</p>
<div style="width:310px;" class="alignright"><a href="http://jueseph.com/wp-content/uploads/2010/06/f3-edge-coe.png"><img src="http://jueseph.com/wp-content/uploads/2010/06/f3-edge-coe-300x281.png" alt="" title="f3-edge-coe" width="300" height="281" class="size-medium wp-image-1379" /></a></p>
<p class="caption"><strong>Figure 3. Several potential crops around the center of edginess (red dot).</strong> Images are shown after edge detection. At the bottom you can see the &#8220;best&#8221; crop in full color and after rescaling to target dimensions.</p>
</div>
<p>Armed with the edge-detection filter, a script can do all sorts of things to infer where to crop an image. For example, I decided to crop the image around a spot I calculate by averaging all the pixels&#8217; locations, weighted by the intensity of each pixel in the edge-detected image. This tell you the location of the &#8220;center-of-edginess&#8221; of the image , sort of like the center-of-gravity of a physical object. Just as the COG is a good place to put your finger if you want to balance something, the COE of an image a good point to use as the center of a crop (with important exceptions, noted below).</p>
<p>Once you know where to crop you still need to pick a crop size, since for any set of target dimensions you can make many crops with that aspect ratio from the source image. If you choose the crop by adding up the edginess of all the pixels in each possible crop and choosing the one with highest &#8220;total edginess&#8221; you&#8217;ll end up always choosing the largest crop, which is bad for the type of &#8220;small single subject&#8221; images mentioned above. If you choose the highest <em>average</em> edginess (total edginess divided by area of the crop) instead, you&#8217;ll favor small, cramped crops with a lot of detail but no visual context.</p>
<div class="alignright sidebox">
<p class="endnote">If <img src='http://s.wordpress.com/latex.php?latex=%5Ceta_i&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\eta_i' title='\eta_i' class='latex' /> is the edginess at pixel <img src='http://s.wordpress.com/latex.php?latex=%5Cboldsymbol%20r_i%20%3D%20%28x_i%2Cy_i%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\boldsymbol r_i = (x_i,y_i)' title='\boldsymbol r_i = (x_i,y_i)' class='latex' />, <img src='http://s.wordpress.com/latex.php?latex=A&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='A' title='A' class='latex' /> is the area of the image, and <img src='http://s.wordpress.com/latex.php?latex=%5Cgamma&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\gamma' title='\gamma' class='latex' /> is a tweaking parameter:</p>
<p class="eq">Center of edginess: <img src='http://s.wordpress.com/latex.php?latex=%5Cboldsymbol%20R%20%3D%20%5Csum_i%20%7B%5Ceta_i%20%5Cboldsymbol%20r_i%7D%2F%5Csum_i%20%5Ceta_i&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\boldsymbol R = \sum_i {\eta_i \boldsymbol r_i}/\sum_i \eta_i' title='\boldsymbol R = \sum_i {\eta_i \boldsymbol r_i}/\sum_i \eta_i' class='latex' /></p>
<p class="eq">Total edginess: <img src='http://s.wordpress.com/latex.php?latex=H%3D%5Csum_i%20%5Ceta_i&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='H=\sum_i \eta_i' title='H=\sum_i \eta_i' class='latex' /></p>
<p class="eq">Average edginess: <img src='http://s.wordpress.com/latex.php?latex=%5Cbar%20H%3DH%2FA&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\bar H=H/A' title='\bar H=H/A' class='latex' /></p>
<p class="eq">Adjusted average edginess: <img src='http://s.wordpress.com/latex.php?latex=%20%5Ctilde%20H%3D%20H%2FA%5E%5Cgamma&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt=' \tilde H= H/A^\gamma' title=' \tilde H= H/A^\gamma' class='latex' /></p>
</div>
<p>My solution is to maximize an &#8220;adjusted average edginess&#8221; metric that, instead of dividing total edginess by the area, divides it by <em>some power</em> <img src='http://s.wordpress.com/latex.php?latex=%5Cgamma&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\gamma' title='\gamma' class='latex' /> of the area. The parameter <img src='http://s.wordpress.com/latex.php?latex=%5Cgamma&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\gamma' title='\gamma' class='latex' /> can be tuned by trial and error to get the right amount of &#8220;breathing room&#8221; in a crop. If <img src='http://s.wordpress.com/latex.php?latex=%5Cgamma%3D1&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\gamma=1' title='\gamma=1' class='latex' />, the adjusted average edginess simplifies to average edginess, and we favor small crops as we discussed above. If <img src='http://s.wordpress.com/latex.php?latex=%5Cgamma%3D0&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\gamma=0' title='\gamma=0' class='latex' />, adjusted average edginess simplifies to total edginess and the biggest crop is selected. I liked the results from test crops with <img src='http://s.wordpress.com/latex.php?latex=%5Cgamma%3D0.2&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\gamma=0.2' title='\gamma=0.2' class='latex' />, but for really small thumbnails (which require significant rescaling), the tighter crop given by a higher <img src='http://s.wordpress.com/latex.php?latex=%5Cgamma&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\gamma' title='\gamma' class='latex' /> (i.e. closer to 1) might be preferable.</p>
<p><a href="http://jueseph.com/wp-content/uploads/2010/06/f4-gamma.png"><img src="http://jueseph.com/wp-content/uploads/2010/06/f4-gamma-300x281.png" alt="" title="f4-gamma" width="300" height="281" class="alignright size-medium wp-image-1387" /></a></p>
<p class="caption"><strong>Figure 4. Cropping around the center-of-edginess yields &#8220;good&#8221; crops for most images.</strong> Compare to Fig. 2 above. Increasing <img src='http://s.wordpress.com/latex.php?latex=%5Cgamma&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\gamma' title='\gamma' class='latex' /> increases the tightness of the crop.</p>
<h3>Limitations</h3>
<p>Opticrop was written to be smarter than easily available alternatives, but because the strategy is relatively simple, it still makes the &#8220;wrong&#8221; crop on certain images. There are caveats to both the methods of choosing where to crop and how much to crop.</p>
<p>As to where to crop, choosing the center-of-edginess is best suited to single-subject images, and gives poor results on two-subject or multi-subject images. If a picture has 2 areas of interest, Opticrop will crop to the region between them, because the center-of-edginess is an average over the entire image and gives no information about local &#8220;pockets&#8221; of edginess. A solution, suggested by <a href="http://kleinschmidt.wordpress.com">Dave</a>, may be to find &#8220;local maxima of edginess&#8221;, or the modes of edginess, rather than a single average. I&#8217;m open to ideas on how to implement such an approach.</p>
<p>Another possibility is an &#8220;iterative search&#8221; that will start at the center-of-edginess and meander around, subject to certain constraints, until it settles on a region that is comparatively more &#8220;edgy&#8221; than where it started. This kind of algorithm tends to enlist some kind of recursion in refining the answer, which generally leads to a superior result without too much added computation. But the devil is in the details of implementation.</p>
<p>The decision of how large an area to crop (or how much &#8220;breathing room&#8221; to give the cropped subject, assuming there is one) could also be accomplished in a completely different way. The current version simply tries a number of different sizes and picks the best one. I&#8217;ve defined &#8220;best&#8221; as &#8220;highest <img src='http://s.wordpress.com/latex.php?latex=%5Ctilde%20H&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\tilde H' title='\tilde H' class='latex' />&#8220;, but using a different criterion may yield other desired crop properties. A refined search method might also yield better crops.</p>
<p>You can download the script, and see usage and implementation details, on <a href="http://jueseph.com/2010/06/opticrop-usage-and-implementation/">this post</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jueseph.com/2010/06/opticrop-content-aware-cropping-with-php-and-imagemagick/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

