| 1 |
<html> |
| 2 |
<title>High-Frequency Enhancement Renderer</title> |
| 3 |
<style type="text/css"> |
| 4 |
TABLE.ba { max-width: 678; text-align: center; padding-bottom: 15; padding-top: 5} |
| 5 |
TABLE.inline { padding-right: 300; clear: left} |
| 6 |
TD.text_table {padding-left: 2; padding-right: 2; border-width: 1} |
| 7 |
H2 {clear: left} |
| 8 |
P {max-width: none; padding-right: 300; clear: left} |
| 9 |
BLOCKQUOTE {padding-right: 400 } |
| 10 |
LI {max-width: 640; clear: left} |
| 11 |
P.footer {max-width: none; width: auto; padding-left: 0} |
| 12 |
P.header {max-width: none; width: auto; padding-left: 0} |
| 13 |
HR.main {max-width: 640; clear: left; padding-left: 0; margin-left: 0} |
| 14 |
HR.footer {clear: both} |
| 15 |
</style> |
| 16 |
</head><body> |
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
<table align=right valign=top width=160> |
| 21 |
<td valign=top height=600 width=160> |
| 22 |
<a href="http://auricle.dyndns.org/ALE/"> |
| 23 |
<big>ALE</big> |
| 24 |
<br> |
| 25 |
Image Processing Software |
| 26 |
<br> |
| 27 |
<br> |
| 28 |
<small>Deblurring, Anti-aliasing, and Superresolution.</small></a> |
| 29 |
<br><br> |
| 30 |
<big> |
| 31 |
Local Operation |
| 32 |
</big> |
| 33 |
<hr> |
| 34 |
localhost<br> |
| 35 |
5393119533<br> |
| 36 |
</table> |
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
<p><b>[ <a href="../">Up</a> <!-- | <a href="../../ba/big_about.html">Examples</a> --> ]</b></p> |
| 41 |
<h1>High-Frequency Enhancement Renderer</h1> |
| 42 |
|
| 43 |
<p>The High-Frequency Enhancement Renderer is a built-in post-processing |
| 44 |
step based on the unsharp mask technique, which has been used to enhance high |
| 45 |
frequencies since the days of photographic plate processing (see, for example, |
| 46 |
<a |
| 47 |
href="http://www.scenic-route.com/tutorial/psp/tutor/unsharp/Unsharp.htm">this |
| 48 |
page</a>). This renderer acts after all other rendering steps have completed, |
| 49 |
except for Irani-Peleg Iterative Image Reconstruction, which occurs afterward. |
| 50 |
|
| 51 |
<p>(The remainder of this text outlines version-specific information and offers no |
| 52 |
further justification for rendering predicates.) |
| 53 |
|
| 54 |
<!-- One theoretical approach to understanding the general |
| 55 |
problem of lousy-looking images is that of convolution, and since many projects take |
| 56 |
this approach, it may be useful to describe briefly how the ALE rendering pipeline |
| 57 |
fits into this framework, as well as some deconvolution approaches which may be |
| 58 |
useful. |
| 59 |
--> |
| 60 |
|
| 61 |
<!-- We discuss convolution -- one context in which such |
| 62 |
a filter can be viewed -- and then deconvolution generally and the details of |
| 63 |
the filter used by ALE. The sections most directly relevant to ALE's high-frequency |
| 64 |
enhancement are the final two sections, 'Release 0.3.2' and 'Release 0.4.0'. The |
| 65 |
other sections provide a context in which this enhancement can be viewed, and discuss |
| 66 |
other approaches to addressing the problems that the high-frequency filter was |
| 67 |
designed to solve. --> |
| 68 |
|
| 69 |
<!-- |
| 70 |
<h2>Convolution</h2> |
| 71 |
--> |
| 72 |
|
| 73 |
<!-- <p>An image capture process involving ALE may transform a source scene in many ways. |
| 74 |
Lens effects may place some areas of a scene in focus and others out of focus, |
| 75 |
image sensors sometimes fail to resolve fine details, and, even when alignment |
| 76 |
is successful, the rendering methods used by ALE do not, in general, respond |
| 77 |
uniformly to unaliased input frequencies. |
| 78 |
|
| 79 |
<p>Subjectively, all of these factors tend to make an image more 'blurry'. One approach |
| 80 |
to handling blur, which can be very effective, is to consider it as a convolution. When |
| 81 |
this assumption is made, the problem then becomes deconvolution. ('Deconvolution' may be |
| 82 |
a good keyword to look for if a more detailed description is desired.) The remainder |
| 83 |
of this section discusses how convolution can approximate the operation of ALE, |
| 84 |
and the next section will cover deconvolution. |
| 85 |
--> |
| 86 |
<!-- |
| 87 |
<p>Several aspects of the ALE rendering pipeline, starting with the image capture hardware, |
| 88 |
can be considered convolutions. These aspects are discussed briefly below. |
| 89 |
|
| 90 |
<h3>Focus</h3> |
| 91 |
|
| 92 |
<p>Blur due to an unfocused lens is sometimes considered in the realm of |
| 93 |
convolution, and approaches such as Ernst Lippe's Gimp plugin <a |
| 94 |
href="http://refocus.sourceforge.net/">refocus</a><sup>1</sup> take this view. |
| 95 |
<!-- However, different parts of a scene may be focused differently, and so treating |
| 96 |
an image uniformly may not always be appropriate. --> |
| 97 |
<!-- |
| 98 |
<h3>Image Sensors</h3> |
| 99 |
|
| 100 |
<p>The manner in which a scene projected onto an image sensor array is sampled |
| 101 |
over each of several small regions corresponding to the sensor elements might |
| 102 |
be considered as a convolution. In particular, if the response of each element |
| 103 |
is roughly linear and uniform over a small, approximately square region, then |
| 104 |
the sensor response could be approximated by convolution with the box filter. |
| 105 |
--> |
| 106 |
<!-- <p>The manner in which an image sensor element (several of which form an image |
| 107 |
sensor array) combines intensity values over some area of a sensor array can be |
| 108 |
|
| 109 |
to be roughly linearly uniformly responsive to changes in intensity over a finite |
| 110 |
region<sup>2</sup>, then its response to intensity can be considered a |
| 111 |
convolution. If the sensor element region is square, then its response would |
| 112 |
be equivalent to convolution with a 2D box filter. --> |
| 113 |
|
| 114 |
<!-- Note that this convolution |
| 115 |
is not generally invertible for a single image, since only one value is |
| 116 |
observed per region and there is no overlap between regions. However, if many |
| 117 |
nearby samples are taken -- e.g. from a sequence of overlapping frames -- some |
| 118 |
deconvolution may be possible. --> |
| 119 |
<!-- |
| 120 |
<h3>ALE Rendering</h3> |
| 121 |
|
| 122 |
<p>For a large number of input frames, when frames are of roughly the same |
| 123 |
scale and rotation about the optical axis is negligible, the default ALE |
| 124 |
rendering technique can be considered to apply the 2D convolution that is the |
| 125 |
direct product of the 1D triangle filter with itself. (I believe this is |
| 126 |
sometimes called the 2D triangle filter.) The distance between the center and |
| 127 |
the edge of the filter is the distance between adjacent pixels. |
| 128 |
|
| 129 |
<p>When the <a href="../drizzling">drizzle</a> rendering method is used with a |
| 130 |
very small diameter and very fine grid (i.e. a large scale factor), then |
| 131 |
negligible convolution occurs. On the other hand, when a diameter approaching |
| 132 |
the distance between pixels is used, and the grid is of the same resolution as |
| 133 |
the input frames, then convolution will be roughly equivalent to the default |
| 134 |
ALE rendering technique. |
| 135 |
|
| 136 |
<h2>Deconvolution</h2> |
| 137 |
|
| 138 |
Deconvolution seems to be an active area of research, but many reasonably good |
| 139 |
practical approaches exist, most of which require some interactive tweaking of |
| 140 |
parameters.--> <!-- This should not be surprising, for at least two reasons. |
| 141 |
|
| 142 |
<h3>Motivation for Interactivity</h3> |
| 143 |
|
| 144 |
<p>First, the value of a filtering process often depends on the viewing context. |
| 145 |
For example, contrast that would appear unrealistic upon close inspection may |
| 146 |
produce what appears to be a realistic image when viewed from a distance. (A |
| 147 |
familiar example of this is the arrangement of differently-colored elements in |
| 148 |
a display device which nevertheless may produce what appears to be a uniform |
| 149 |
image of an entirely different color.) |
| 150 |
|
| 151 |
<p>Second, although deconvolution may be considered as a way of 'undoing' certain |
| 152 |
characteristics of the image capture process, it is not always obvious what |
| 153 |
these characteristics are. An apparently blurred result might, in fact, be a |
| 154 |
faithful capture by a flatbed scanner of a high-quality print of a continuous color |
| 155 |
spectrum. --> |
| 156 |
<!-- |
| 157 |
<h3>Techniques</h3> |
| 158 |
--> |
| 159 |
|
| 160 |
<!-- <p>As described in the convolution section above, the rendering approaches used by |
| 161 |
ALE can be approximated by convolutions, and so it is possible to take the |
| 162 |
final rendered result of ALE and perform deconvolution with an external tool (such |
| 163 |
as Ernst Lippe's Gimp plug-in 'refocus'<sup>1</sup>). --> |
| 164 |
<!-- |
| 165 |
Several tools external to ALE, such as Ernst Lippe's Gimp plug-in |
| 166 |
<a href="http://refocus.sourceforge.net/">refocus</a><sup>1</sup>, provide |
| 167 |
deconvolution functions. Such tools can facilitate interactive adjustment |
| 168 |
of deconvolution parameters. |
| 169 |
--> |
| 170 |
<!-- Since ALE is not well-suited to interactive parameter |
| 171 |
tweaking, and external tools like the Gimp are designed for interactive |
| 172 |
parameter tweaking, this may be a reasonable approach if such tweaking is |
| 173 |
desired. --> |
| 174 |
<!-- |
| 175 |
<p>Alternatively, ALE's <a href="../iterative">image reconstruction option</a> |
| 176 |
may be used to reduce blur caused by other internal renderers and by image |
| 177 |
sensors. <a href="../drizzling">Drizzling</a> with a small diameter may also |
| 178 |
reduce renderer-incurred blurring. |
| 179 |
|
| 180 |
<p>Finally, an internal filter to enhance high frequencies is provided, and may |
| 181 |
sometimes be more convenient to use than the above options. The filter is |
| 182 |
designed to be simple, and is based on the unsharp mask technique. The details |
| 183 |
of the filter are covered in the following two sections. |
| 184 |
--> |
| 185 |
<h2>Release 0.3.1</h2> |
| 186 |
|
| 187 |
<p>The filter in release 0.3.1 acts on a square region, centered on the pixel |
| 188 |
to be filtered, where the length of each side of the square is linear with the |
| 189 |
scale factor (arbitrarily selected to be 2.5 times the scale factor). The |
| 190 |
pixel being filtered makes a positive contribution weighted with the total area |
| 191 |
of the filter region, and all pixels coincident with the filter region make a |
| 192 |
negative contribution weighted with the area in which the pixel is coincident |
| 193 |
with the filter region. |
| 194 |
|
| 195 |
<p>This filter was chosen primarily due to its implementation simplicity and |
| 196 |
also for its satisfaction of the following two criteria: |
| 197 |
|
| 198 |
<p>First, the filter value returned for a uniformly valued pixel array is zero. |
| 199 |
Hence, when the pixels in the region of the filter support do not vary in |
| 200 |
value, the high-frequency filter returns zero. This seems to be a |
| 201 |
reasonable requirement for a high-frequency filter. |
| 202 |
|
| 203 |
<p>Second, the filter support for a pixel closely corresponding to given pixel |
| 204 |
in the original (unscaled) frame spans a region corresponding to a neighborhood |
| 205 |
of pixels in the original frame that is roughly independent of the scale factor. |
| 206 |
|
| 207 |
<p>In release 0.3.1, the filter result described above was divided by 100, so that |
| 208 |
an enhancement factor of 1.0 would look reasonable for an image that had been |
| 209 |
scaled up by a factor of 4. This division step is replaced by a more general |
| 210 |
and elegant normalization step in release 0.4.0. |
| 211 |
|
| 212 |
<p>Since this filter requires a square region of pixels centered on the pixel |
| 213 |
to be filtered, it cannot operate near the boundary of an image. We avoid this |
| 214 |
problem in release 0.3.1 by not filtering near the boundary of images. |
| 215 |
|
| 216 |
<h2>Release 0.4.0 and later</h2> |
| 217 |
|
| 218 |
<p>The filter in release 0.4.0 was modified from the filter in release 0.3.1 in two |
| 219 |
ways: |
| 220 |
|
| 221 |
<p>First, the filter was extended to operate near the boundaries of an image. When |
| 222 |
necessary, the filter region is constrained so that it fits within the boundary |
| 223 |
of the image. (However, the notion of boundary used does not yet elegantly accommodate |
| 224 |
the non-rectangular boundaries that may occur when image extents are increased.) |
| 225 |
|
| 226 |
<p>Second, the filter was normalized so that the filtered pixel makes a |
| 227 |
positive contribution with unit (1) weight, and all pixels coincident with the |
| 228 |
filter region make a negative contribution with weight <i>a/A</i>, where |
| 229 |
<i>a</i> is the area in which the pixel is coincident with the |
| 230 |
filter region and <i>A</i> is the total area of the filter region. |
| 231 |
|
| 232 |
<p>This change provides the following nice property that did not hold for the |
| 233 |
filter in release 0.3.1: |
| 234 |
|
| 235 |
<p>Filtering and then scaling is almost the same as scaling and then filtering. |
| 236 |
|
| 237 |
<p>Hence, a given high-frequency enhancement argument in ALE will achieve |
| 238 |
roughly similar results regardless of scale factor. This behavior should be |
| 239 |
less surprising than the behavior in 0.3.1, in which merely increasing the |
| 240 |
scale factor argument could cause pixel values to become distorted as they |
| 241 |
eventually collided with the limits of the image format.</p> |
| 242 |
|
| 243 |
<small> |
| 244 |
<!-- |
| 245 |
<sup>1</sup>Ernst Lippe. refocus: A Gimp plug-in for sharpening images. <a href="http://refocus.sourceforge.net/doc.html">http://refocus.sourceforge.net/doc.html</a><br> |
| 246 |
<sup>2</sup>E.g. this approach was used in: |
| 247 |
<br>Michal Irani and Shmuel Peleg. "Improving Resolution by Image Registration". <i>Graphical |
| 248 |
Models and Image Processing.</i> Academic Press, May 1991. <a href="http://www.wisdom.weizmann.ac.il/~irani/abstracts/superResolution.html">http://www.wisdom.weizmann.ac.il/~irani/abstracts/superResolution.html</a> --> |
| 249 |
|
| 250 |
</small> |
| 251 |
|
| 252 |
<!-- |
| 253 |
<h2>Examples</h2> |
| 254 |
|
| 255 |
<p><a href="../../ba/big_about.html">Examples</a> of post-enhancement are available. |
| 256 |
--> |
| 257 |
|
| 258 |
<hr> |
| 259 |
<i>Copyright 2002, 2003 <a href="mailto:[email protected]">David Hilvert</a></i> |
| 260 |
<p>Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. |
| 261 |
</body> |
| 262 |
</html> |