<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Sharpening using Image Magick</title>
	<atom:link href="http://redskiesatnight.com/2005/04/06/sharpening-using-image-magick/feed/" rel="self" type="application/rss+xml" />
	<link>http://redskiesatnight.com/2005/04/06/sharpening-using-image-magick/</link>
	<description>Featuring photography by Eric Jeschke</description>
	<lastBuildDate>Tue, 14 Feb 2012 06:22:21 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: hithere</title>
		<link>http://redskiesatnight.com/2005/04/06/sharpening-using-image-magick/#comment-5604</link>
		<dc:creator><![CDATA[hithere]]></dc:creator>
		<pubDate>Mon, 09 Jan 2012 13:31:03 +0000</pubDate>
		<guid isPermaLink="false">http://redskiesatnight.wordpress.com/2005/04/06/sharpening-using-image-magick/#comment-5604</guid>
		<description><![CDATA[some lame idiot who couldnt even get IM unsharp right removed my valuable comments
please fix your article. the radius parameter has nothing to do with ps radius.
you don&#039;t even seem to know clearly how convolution works at all. it&#039;s sigma which gives weight of surrounding pixels, as it is the parameter of gauss mapping. radius is just used to discard values to speed up calculation. setting it to the same value of sigma makes little sense.]]></description>
		<content:encoded><![CDATA[<p>some lame idiot who couldnt even get IM unsharp right removed my valuable comments<br />
please fix your article. the radius parameter has nothing to do with ps radius.<br />
you don&#8217;t even seem to know clearly how convolution works at all. it&#8217;s sigma which gives weight of surrounding pixels, as it is the parameter of gauss mapping. radius is just used to discard values to speed up calculation. setting it to the same value of sigma makes little sense.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cpm</title>
		<link>http://redskiesatnight.com/2005/04/06/sharpening-using-image-magick/#comment-5596</link>
		<dc:creator><![CDATA[cpm]]></dc:creator>
		<pubDate>Mon, 09 Jan 2012 01:51:19 +0000</pubDate>
		<guid isPermaLink="false">http://redskiesatnight.wordpress.com/2005/04/06/sharpening-using-image-magick/#comment-5596</guid>
		<description><![CDATA[quoting wikipedia:

In theory, the Gaussian function at every point on the image will be non-zero, meaning that the entire image would need to be included in the calculations for each pixel. In practice, when computing a discrete approximation of the Gaussian function, pixels at a distance of more than 3σ are small enough to be considered effectively zero. Thus contributions from pixels outside that range can be ignored. Typically, an image processing program need only calculate a matrix with dimensions ceil(6σ) x ceil(6σ) to ensure a result sufficiently close to that obtained by the entire gaussian distribution.

apart from that, what do you mean by &quot;screen resolution&quot; and why is it 72dpi? that&#039;s pointless to consider. you may consider a formula to cumpute sharpen radius for printed pictures based on resolution, but, when it comes to screen display, resolution means nothing. it&#039;s the zoom level which matters. for 100% zoom (that is, one picture pixel to one screen pixel), my prefered radius is 0.5. from that mark, simply multiply (i.e., for 50% zoom, use half radius). still, choosing radius depending on resolution is not a wise choise. it is better off set according to visual results.]]></description>
		<content:encoded><![CDATA[<p>quoting wikipedia:</p>
<p>In theory, the Gaussian function at every point on the image will be non-zero, meaning that the entire image would need to be included in the calculations for each pixel. In practice, when computing a discrete approximation of the Gaussian function, pixels at a distance of more than 3σ are small enough to be considered effectively zero. Thus contributions from pixels outside that range can be ignored. Typically, an image processing program need only calculate a matrix with dimensions ceil(6σ) x ceil(6σ) to ensure a result sufficiently close to that obtained by the entire gaussian distribution.</p>
<p>apart from that, what do you mean by &#8220;screen resolution&#8221; and why is it 72dpi? that&#8217;s pointless to consider. you may consider a formula to cumpute sharpen radius for printed pictures based on resolution, but, when it comes to screen display, resolution means nothing. it&#8217;s the zoom level which matters. for 100% zoom (that is, one picture pixel to one screen pixel), my prefered radius is 0.5. from that mark, simply multiply (i.e., for 50% zoom, use half radius). still, choosing radius depending on resolution is not a wise choise. it is better off set according to visual results.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cpm</title>
		<link>http://redskiesatnight.com/2005/04/06/sharpening-using-image-magick/#comment-5593</link>
		<dc:creator><![CDATA[cpm]]></dc:creator>
		<pubDate>Mon, 09 Jan 2012 01:31:40 +0000</pubDate>
		<guid isPermaLink="false">http://redskiesatnight.wordpress.com/2005/04/06/sharpening-using-image-magick/#comment-5593</guid>
		<description><![CDATA[please note, again:

SIGMA in IM == RADIUS in PS/GIMP]]></description>
		<content:encoded><![CDATA[<p>please note, again:</p>
<p>SIGMA in IM == RADIUS in PS/GIMP</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cpm</title>
		<link>http://redskiesatnight.com/2005/04/06/sharpening-using-image-magick/#comment-5592</link>
		<dc:creator><![CDATA[cpm]]></dc:creator>
		<pubDate>Mon, 09 Jan 2012 01:19:18 +0000</pubDate>
		<guid isPermaLink="false">http://redskiesatnight.wordpress.com/2005/04/06/sharpening-using-image-magick/#comment-5592</guid>
		<description><![CDATA[thanks for article.

sigma, however, is the most important parameter, as it defines the weight of each surrounding pixel. such weight is non zero for ALL pixels, but actually for pixels too distintant from the center, their value means almost nothing and counting them is just a loss of time. that&#039;s what the parameter radous is for. it specifies a boundary to cut off and do not count pixels values. setting this parameter to zero is sesible, as imagemagick will take a value -according to sigma- which is studied to be small enough to reduce processing while obtaining very good (quasi optimal) results.]]></description>
		<content:encoded><![CDATA[<p>thanks for article.</p>
<p>sigma, however, is the most important parameter, as it defines the weight of each surrounding pixel. such weight is non zero for ALL pixels, but actually for pixels too distintant from the center, their value means almost nothing and counting them is just a loss of time. that&#8217;s what the parameter radous is for. it specifies a boundary to cut off and do not count pixels values. setting this parameter to zero is sesible, as imagemagick will take a value -according to sigma- which is studied to be small enough to reduce processing while obtaining very good (quasi optimal) results.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Jeschke</title>
		<link>http://redskiesatnight.com/2005/04/06/sharpening-using-image-magick/#comment-3384</link>
		<dc:creator><![CDATA[Eric Jeschke]]></dc:creator>
		<pubDate>Fri, 26 Nov 2010 08:51:51 +0000</pubDate>
		<guid isPermaLink="false">http://redskiesatnight.wordpress.com/2005/04/06/sharpening-using-image-magick/#comment-3384</guid>
		<description><![CDATA[Dirk,
Thanks for a lucid and erudite explanation.  It agrees mostly with what I understand about the algorithm.  However, I&#039;m still curious about the fractional radii.  I understand that ultimately the number of pixels chosen is an integral number, but I&#039;m wondering how early the value is rounded or truncated, and whether this is before or after the calculation of the bounding area of the convolution.  I guess I really should grab the source code and take a look to understand this to my satisfaction.]]></description>
		<content:encoded><![CDATA[<p>Dirk,<br />
Thanks for a lucid and erudite explanation.  It agrees mostly with what I understand about the algorithm.  However, I&#8217;m still curious about the fractional radii.  I understand that ultimately the number of pixels chosen is an integral number, but I&#8217;m wondering how early the value is rounded or truncated, and whether this is before or after the calculation of the bounding area of the convolution.  I guess I really should grab the source code and take a look to understand this to my satisfaction.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dirk Wacker</title>
		<link>http://redskiesatnight.com/2005/04/06/sharpening-using-image-magick/#comment-3381</link>
		<dc:creator><![CDATA[Dirk Wacker]]></dc:creator>
		<pubDate>Thu, 25 Nov 2010 10:57:55 +0000</pubDate>
		<guid isPermaLink="false">http://redskiesatnight.wordpress.com/2005/04/06/sharpening-using-image-magick/#comment-3381</guid>
		<description><![CDATA[Ups, seems ascii art picture of a gaussian distribution collapsed to a bunch of stars.
But you can simply google for &quot;gaussian distribution&quot;.]]></description>
		<content:encoded><![CDATA[<p>Ups, seems ascii art picture of a gaussian distribution collapsed to a bunch of stars.<br />
But you can simply google for &#8220;gaussian distribution&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dirk Wacker</title>
		<link>http://redskiesatnight.com/2005/04/06/sharpening-using-image-magick/#comment-3380</link>
		<dc:creator><![CDATA[Dirk Wacker]]></dc:creator>
		<pubDate>Thu, 25 Nov 2010 10:55:45 +0000</pubDate>
		<guid isPermaLink="false">http://redskiesatnight.wordpress.com/2005/04/06/sharpening-using-image-magick/#comment-3380</guid>
		<description><![CDATA[***
                 ***   ***
               **         **
              **
            **               **
         ***                   ***
     ****                         ****
*****                                 ***** - extends to infinity on both sides -&gt;


The unsharp mask filter uses a gaussian blur filter internally. That means the image gets convolved with a gaussian distribution with a standard deviation of sigma. The gaussian distribution has its peak at the center, falling of in an s-curve to boths sides, but never reaching zero. Sigma tells you how broad the distribution is and thus, the amount of blur to be applied. But as the gaussian distribution extends from -infinity to +infinity you cannot calculate the convolution perfectly. This is where the radius parameter comes into play. The radius tells you, how big your kernel for the convolution should be and how much of the gaussian distribution function is actually used. Setting this to something like 2*sigma or higher should give you a reasonably good approximation. Radius is rounded to the next integer, because the kernel used for convolution is made up of whole pixels (as is you digitized image). A kernel size of 0.5 does not make sense.]]></description>
		<content:encoded><![CDATA[<p>***<br />
                 ***   ***<br />
               **         **<br />
              **<br />
            **               **<br />
         ***                   ***<br />
     ****                         ****<br />
*****                                 ***** &#8211; extends to infinity on both sides -&gt;</p>
<p>The unsharp mask filter uses a gaussian blur filter internally. That means the image gets convolved with a gaussian distribution with a standard deviation of sigma. The gaussian distribution has its peak at the center, falling of in an s-curve to boths sides, but never reaching zero. Sigma tells you how broad the distribution is and thus, the amount of blur to be applied. But as the gaussian distribution extends from -infinity to +infinity you cannot calculate the convolution perfectly. This is where the radius parameter comes into play. The radius tells you, how big your kernel for the convolution should be and how much of the gaussian distribution function is actually used. Setting this to something like 2*sigma or higher should give you a reasonably good approximation. Radius is rounded to the next integer, because the kernel used for convolution is made up of whole pixels (as is you digitized image). A kernel size of 0.5 does not make sense.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Jeschke</title>
		<link>http://redskiesatnight.com/2005/04/06/sharpening-using-image-magick/#comment-3018</link>
		<dc:creator><![CDATA[Eric Jeschke]]></dc:creator>
		<pubDate>Fri, 11 Jun 2010 07:41:36 +0000</pubDate>
		<guid isPermaLink="false">http://redskiesatnight.wordpress.com/2005/04/06/sharpening-using-image-magick/#comment-3018</guid>
		<description><![CDATA[Nigel,
It&#039;s pretty standard advice to sharpen for the output.  Take a scan, for example.  One typically does some sharpening as the last step after resampling for some particular output (say printing).  If you were going to print at 240 dpi, then the radius might be 240/150 = 1.6.  The density of the print determines how big your sharpening halos need to be to be noticeable/effective.  If you are showing your image on a 19in monitor with 1680x1050 resolution, then a good deal of your image will be thrown away--the image will be down sampled for display to around 1400x1050.  For best results, down sample it yourself to this dimension, and finish it with an unsharpen operation.  A 19in monitor with that resolution will be somewhere in the neighborhood of 16.56in (w) x 9.31in (h) (Pythagorean theorem, ymmv according to pixel pitch, cheat calculator here: http://cubic.bioc.columbia.edu/kernytsky/tools/aspect/aspect.php). The ppi of this output device is around 1400/16.56 = 85ppi, therefore I would use a radius of 85/150 = ~0.5.  This concurs with the remarks in the main article.  The ppi of monitors tends to go up as monitor size increases, with the ppi somewhere between 72-140 ppi.  A radius of 0.5 is a pretty standard/safe choice for any monitor.

Now, all that said, the above remarks assume that the image has had correct input sharpening applied to it.  If you are not sharpening your images on input (e.g. a RAW file) or you are letting some image display program down sample it for display (without additional sharpening, because downsampling almost always requires additional sharpening), then you may need to increase the sharpening radius to account for the lack of two-pass (input/output) sharpening.]]></description>
		<content:encoded><![CDATA[<p>Nigel,<br />
It&#8217;s pretty standard advice to sharpen for the output.  Take a scan, for example.  One typically does some sharpening as the last step after resampling for some particular output (say printing).  If you were going to print at 240 dpi, then the radius might be 240/150 = 1.6.  The density of the print determines how big your sharpening halos need to be to be noticeable/effective.  If you are showing your image on a 19in monitor with 1680&#215;1050 resolution, then a good deal of your image will be thrown away&#8211;the image will be down sampled for display to around 1400&#215;1050.  For best results, down sample it yourself to this dimension, and finish it with an unsharpen operation.  A 19in monitor with that resolution will be somewhere in the neighborhood of 16.56in (w) x 9.31in (h) (Pythagorean theorem, ymmv according to pixel pitch, cheat calculator here: <a href="http://cubic.bioc.columbia.edu/kernytsky/tools/aspect/aspect.php" rel="nofollow">http://cubic.bioc.columbia.edu/kernytsky/tools/aspect/aspect.php</a>). The ppi of this output device is around 1400/16.56 = 85ppi, therefore I would use a radius of 85/150 = ~0.5.  This concurs with the remarks in the main article.  The ppi of monitors tends to go up as monitor size increases, with the ppi somewhere between 72-140 ppi.  A radius of 0.5 is a pretty standard/safe choice for any monitor.</p>
<p>Now, all that said, the above remarks assume that the image has had correct input sharpening applied to it.  If you are not sharpening your images on input (e.g. a RAW file) or you are letting some image display program down sample it for display (without additional sharpening, because downsampling almost always requires additional sharpening), then you may need to increase the sharpening radius to account for the lack of two-pass (input/output) sharpening.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nigel</title>
		<link>http://redskiesatnight.com/2005/04/06/sharpening-using-image-magick/#comment-3017</link>
		<dc:creator><![CDATA[Nigel]]></dc:creator>
		<pubDate>Fri, 11 Jun 2010 03:45:39 +0000</pubDate>
		<guid isPermaLink="false">http://redskiesatnight.wordpress.com/2005/04/06/sharpening-using-image-magick/#comment-3017</guid>
		<description><![CDATA[Thanks for this very informative article. One query I have - in the formula for calculating the required radius (or is it sigma?) it seems to me that the ppi number should come from the photo, rather than the display device. For viewing a typical 12MP (4000x3000) photo on a 19 inch monitor this would be about 250ppi rather than the approx 85ppi of the device itself. So a radius/sigma around 1.5 or 2.0 would be suitable. In my experience a sigma in this range (and letting Imagemagick set the radius) gives an OK result.

Apologies if I am misinterpreting your use of the ppi formula.]]></description>
		<content:encoded><![CDATA[<p>Thanks for this very informative article. One query I have &#8211; in the formula for calculating the required radius (or is it sigma?) it seems to me that the ppi number should come from the photo, rather than the display device. For viewing a typical 12MP (4000&#215;3000) photo on a 19 inch monitor this would be about 250ppi rather than the approx 85ppi of the device itself. So a radius/sigma around 1.5 or 2.0 would be suitable. In my experience a sigma in this range (and letting Imagemagick set the radius) gives an OK result.</p>
<p>Apologies if I am misinterpreting your use of the ppi formula.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: solaris.x80</title>
		<link>http://redskiesatnight.com/2005/04/06/sharpening-using-image-magick/#comment-2753</link>
		<dc:creator><![CDATA[solaris.x80]]></dc:creator>
		<pubDate>Sat, 06 Feb 2010 09:01:18 +0000</pubDate>
		<guid isPermaLink="false">http://redskiesatnight.wordpress.com/2005/04/06/sharpening-using-image-magick/#comment-2753</guid>
		<description><![CDATA[... there are a few postings around the net (including some referenced in this article) that suggest that Image Magick accepts, but does not honor, fractional radii; that is, if you specify a radius of 0.5 or 1.2 it is rounded ... It is true, code for this looks like width = 2.0*ceil(radius)+1.0 where ceil rounds up &quot;radius&quot; to nearest integer bigger than &quot;radius&quot;, so if radius = 1.2 it is rounds up to 2 and &quot;width&quot; equals 5, and then through out the code only &quot;width&quot; is used. 
-------------------------------------------------
$ convert -unsharp 1.2x1.2+5+0 test.tif testo1.tif
$ convert -unsharp 1.4x1.4+5+0 test.tif testo2.tif
$ composite -compose difference test01.tif testo2.tif diff.tif
$ display diff.tif
-------------------------------------------------
should be:
$ convert -unsharp 1.2x1.2+5+0 test.tif testo1.tif
$ convert -unsharp 1.4x1.2+5+0 test.tif testo2.tif
$ composite -compose difference test01.tif testo2.tif diff.tif
$ display diff.tif]]></description>
		<content:encoded><![CDATA[<p>&#8230; there are a few postings around the net (including some referenced in this article) that suggest that Image Magick accepts, but does not honor, fractional radii; that is, if you specify a radius of 0.5 or 1.2 it is rounded &#8230; It is true, code for this looks like width = 2.0*ceil(radius)+1.0 where ceil rounds up &#8220;radius&#8221; to nearest integer bigger than &#8220;radius&#8221;, so if radius = 1.2 it is rounds up to 2 and &#8220;width&#8221; equals 5, and then through out the code only &#8220;width&#8221; is used.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
$ convert -unsharp 1.2&#215;1.2+5+0 test.tif testo1.tif<br />
$ convert -unsharp 1.4&#215;1.4+5+0 test.tif testo2.tif<br />
$ composite -compose difference test01.tif testo2.tif diff.tif<br />
$ display diff.tif<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
should be:<br />
$ convert -unsharp 1.2&#215;1.2+5+0 test.tif testo1.tif<br />
$ convert -unsharp 1.4&#215;1.2+5+0 test.tif testo2.tif<br />
$ composite -compose difference test01.tif testo2.tif diff.tif<br />
$ display diff.tif</p>
]]></content:encoded>
	</item>
</channel>
</rss>

