<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://wiki.hshl.de/wiki/index.php?action=history&amp;feed=atom&amp;title=Image_Processing%3A_Recovery_and_restoration_of_information</id>
	<title>Image Processing: Recovery and restoration of information - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.hshl.de/wiki/index.php?action=history&amp;feed=atom&amp;title=Image_Processing%3A_Recovery_and_restoration_of_information"/>
	<link rel="alternate" type="text/html" href="https://wiki.hshl.de/wiki/index.php?title=Image_Processing:_Recovery_and_restoration_of_information&amp;action=history"/>
	<updated>2026-04-19T21:50:07Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in HSHL Mechatronik</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://wiki.hshl.de/wiki/index.php?title=Image_Processing:_Recovery_and_restoration_of_information&amp;diff=147073&amp;oldid=prev</id>
		<title>Ajay.paul@stud.hshl.de am 2. März 2026 um 17:30 Uhr</title>
		<link rel="alternate" type="text/html" href="https://wiki.hshl.de/wiki/index.php?title=Image_Processing:_Recovery_and_restoration_of_information&amp;diff=147073&amp;oldid=prev"/>
		<updated>2026-03-02T17:30:04Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;de&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version vom 2. März 2026, 17:30 Uhr&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l137&quot;&gt;Zeile 137:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 137:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Datei:Restoration.png|center|800px|thumb|Image restoration result]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Datei:Restoration.png|center|800px|thumb|Image restoration result]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&#039;&#039;&#039;SVN Repository:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; https://svn.hshl.de/svn/MATLAB_Vorkurs/trunk/Signalverarbeitung_mit_Kuenstlicher_Intelligenz/Image%20Processing%20with%20MATLAB%20and%20AI/image_processing_matlab/1_Restoration/&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ajay.paul@stud.hshl.de</name></author>
	</entry>
	<entry>
		<id>https://wiki.hshl.de/wiki/index.php?title=Image_Processing:_Recovery_and_restoration_of_information&amp;diff=146792&amp;oldid=prev</id>
		<title>Ajay.paul@stud.hshl.de: /* Image Recovery and Restoration */</title>
		<link rel="alternate" type="text/html" href="https://wiki.hshl.de/wiki/index.php?title=Image_Processing:_Recovery_and_restoration_of_information&amp;diff=146792&amp;oldid=prev"/>
		<updated>2026-02-03T10:53:46Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Image Recovery and Restoration&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;de&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version vom 3. Februar 2026, 10:53 Uhr&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l133&quot;&gt;Zeile 133:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 133:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;fprintf(&amp;#039;Restoration Quality (PSNR): %.2f dB\n&amp;#039;, score);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;fprintf(&amp;#039;Restoration Quality (PSNR): %.2f dB\n&amp;#039;, score);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== Result ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Datei:Restoration.png|center|800px|thumb|Image restoration result]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key mtrwiki:diff:1.41:old-146773:rev-146792:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Ajay.paul@stud.hshl.de</name></author>
	</entry>
	<entry>
		<id>https://wiki.hshl.de/wiki/index.php?title=Image_Processing:_Recovery_and_restoration_of_information&amp;diff=146773&amp;oldid=prev</id>
		<title>Ajay.paul@stud.hshl.de: Die Seite wurde neu angelegt: „= Image Recovery and Restoration =  &#039;&#039;&#039;Image Restoration&#039;&#039;&#039; is a field of image processing that deals with recovering an original, sharp image from a degraded version. Unlike &#039;&#039;Image Enhancement&#039;&#039;, which seeks to improve the visual appearance of an image subjectively (e.g., brightening a dark photo), Restoration is an &#039;&#039;&#039;objective&#039;&#039;&#039; approach. It attempts to reconstruct the original image by mathematically modeling the degradation and reversing it.  __TOC…“</title>
		<link rel="alternate" type="text/html" href="https://wiki.hshl.de/wiki/index.php?title=Image_Processing:_Recovery_and_restoration_of_information&amp;diff=146773&amp;oldid=prev"/>
		<updated>2026-02-03T07:24:15Z</updated>

		<summary type="html">&lt;p&gt;Die Seite wurde neu angelegt: „= Image Recovery and Restoration =  &amp;#039;&amp;#039;&amp;#039;Image Restoration&amp;#039;&amp;#039;&amp;#039; is a field of image processing that deals with recovering an original, sharp image from a degraded version. Unlike &amp;#039;&amp;#039;Image Enhancement&amp;#039;&amp;#039;, which seeks to improve the visual appearance of an image subjectively (e.g., brightening a dark photo), Restoration is an &amp;#039;&amp;#039;&amp;#039;objective&amp;#039;&amp;#039;&amp;#039; approach. It attempts to reconstruct the original image by mathematically modeling the degradation and reversing it.  __TOC…“&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Image Recovery and Restoration =&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Image Restoration&amp;#039;&amp;#039;&amp;#039; is a field of image processing that deals with recovering an original, sharp image from a degraded version. Unlike &amp;#039;&amp;#039;Image Enhancement&amp;#039;&amp;#039;, which seeks to improve the visual appearance of an image subjectively (e.g., brightening a dark photo), Restoration is an &amp;#039;&amp;#039;&amp;#039;objective&amp;#039;&amp;#039;&amp;#039; approach. It attempts to reconstruct the original image by mathematically modeling the degradation and reversing it.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== The Mathematical Model of Degradation ==&lt;br /&gt;
&lt;br /&gt;
To restore an image, we must first understand how it was damaged. In classic image processing, degradation is modeled as a linear process.&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;f(x,y)&amp;lt;/math&amp;gt; be the original image. The observed (degraded) image &amp;lt;math&amp;gt;g(x,y)&amp;lt;/math&amp;gt; is produced by convolving the original image with a degradation function &amp;lt;math&amp;gt;h(x,y)&amp;lt;/math&amp;gt; (often called the Point Spread Function or PSF), followed by the addition of noise &amp;lt;math&amp;gt;\eta(x,y)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;g(x,y) = h(x,y) * f(x,y) + \eta(x,y)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;&amp;lt;math&amp;gt;g(x,y)&amp;lt;/math&amp;gt;&amp;#039;&amp;#039;&amp;#039;: The degraded image we have.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;&amp;lt;math&amp;gt;f(x,y)&amp;lt;/math&amp;gt;&amp;#039;&amp;#039;&amp;#039;: The original image we want to recover.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;&amp;lt;math&amp;gt;h(x,y)&amp;lt;/math&amp;gt;&amp;#039;&amp;#039;&amp;#039;: The &amp;#039;&amp;#039;&amp;#039;Point Spread Function (PSF)&amp;#039;&amp;#039;&amp;#039;. This represents the blur (e.g., motion blur, lens defocus, atmospheric turbulence).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;&amp;lt;math&amp;gt;\eta(x,y)&amp;lt;/math&amp;gt;&amp;#039;&amp;#039;&amp;#039;: Additive noise (e.g., sensor noise, Gaussian noise).&lt;br /&gt;
&lt;br /&gt;
== The Solution: Deconvolution ==&lt;br /&gt;
&lt;br /&gt;
Since the degradation involves convolution, the restoration process is often called &amp;#039;&amp;#039;&amp;#039;Deconvolution&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=== Why is this difficult? ===&lt;br /&gt;
If there were no noise, we could theoretically convert the image to the frequency domain (using Fourier Transform), divide by the blur function, and convert back. This is called &amp;#039;&amp;#039;&amp;#039;Inverse Filtering&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
However, in the real world, images contain noise. At frequencies where the blur function &amp;lt;math&amp;gt;H(u,v)&amp;lt;/math&amp;gt; has low values (near zero), simple division amplifies the noise term mathematically, resulting in a restoration typically unusable due to extreme noise artifacts.&lt;br /&gt;
&lt;br /&gt;
=== The Classic Algorithm: The Wiener Filter ===&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Wiener Filter&amp;#039;&amp;#039;&amp;#039; (Minimum Mean Square Error Filter) is the standard algorithm for restoration. It acknowledges the presence of noise. Instead of simply dividing by the blur, it performs a trade-off between &amp;#039;&amp;#039;&amp;#039;deblurring&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;noise smoothing&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
It minimizes the overall mean square error between the estimated image and the original image.&lt;br /&gt;
&lt;br /&gt;
== MATLAB Implementation Strategy ==&lt;br /&gt;
&lt;br /&gt;
When solving this in MATLAB (specifically for Grader tasks), the workflow follows a strict logic: &amp;#039;&amp;#039;&amp;#039;Model the Blur → Preprocess Edges → Deconvolve.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=== Key MATLAB Functions ===&lt;br /&gt;
* &amp;lt;code&amp;gt;fspecial&amp;lt;/code&amp;gt;: Creates the PSF (the model of the blur).&lt;br /&gt;
* &amp;lt;code&amp;gt;edgetaper&amp;lt;/code&amp;gt;: Pre-processes the image to reduce &amp;quot;ringing&amp;quot; artifacts at the borders.&lt;br /&gt;
* &amp;lt;code&amp;gt;deconvwnr&amp;lt;/code&amp;gt;: Applies the Wiener filter.&lt;br /&gt;
* &amp;lt;code&amp;gt;deconvreg&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;deconvlucy&amp;lt;/code&amp;gt;: Alternative constrained least squares or iterative methods.&lt;br /&gt;
&lt;br /&gt;
=== Detailed Code Logic ===&lt;br /&gt;
&lt;br /&gt;
Below is a step-by-step breakdown of how to implement Image Restoration to solve a motion-blur problem.&lt;br /&gt;
&lt;br /&gt;
==== Step 1: Define the Degradation (PSF) ====&lt;br /&gt;
First, you must determine (or be given) the nature of the blur.&lt;br /&gt;
* &amp;#039;&amp;#039;Motion Blur:&amp;#039;&amp;#039; Defined by length (pixels) and angle (degrees).&lt;br /&gt;
* &amp;#039;&amp;#039;Gaussian Blur:&amp;#039;&amp;#039; Defined by the standard deviation (sigma) and window size.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
% Create a Point Spread Function (PSF)&lt;br /&gt;
% Example: A camera moved 21 pixels in a 11-degree direction&lt;br /&gt;
LEN = 21;&lt;br /&gt;
THETA = 11;&lt;br /&gt;
PSF = fspecial(&amp;#039;motion&amp;#039;, LEN, THETA);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Step 2: Handle Boundary Effects (Edge Tapering) ====&lt;br /&gt;
Deconvolution uses Fourier transforms, which assume images are periodic (repeatable tiles). The edges of a photo usually do not match the opposite edges, causing &amp;quot;ringing&amp;quot; (ripples) in the restored image. &amp;lt;code&amp;gt;edgetaper&amp;lt;/code&amp;gt; blurs the edges of the input image to minimize this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
% &amp;#039;blurredImage&amp;#039; is the input image&lt;br /&gt;
taperedImage = edgetaper(blurredImage, PSF);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Step 3: Estimate Noise-to-Signal Ratio (NSR) ====&lt;br /&gt;
The Wiener filter requires an estimation of the Noise-to-Signal Power Ratio.&lt;br /&gt;
* If &amp;lt;math&amp;gt;NSR = 0&amp;lt;/math&amp;gt;, the Wiener filter becomes an ideal Inverse Filter (works only if zero noise).&lt;br /&gt;
* In Grader tasks, this is often a tunable parameter. If the variance of noise is known, &amp;lt;math&amp;gt;NSR = \frac{\sigma_{noise}^2}{\sigma_{signal}^2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
% Estimation of noise power (often estimated experimentally)&lt;br /&gt;
estimated_nsr = 0.001; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Step 4: Apply Deconvolution ====&lt;br /&gt;
Pass the tapered image, the modeled PSF, and the NSR into the function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
restoredImage = deconvwnr(taperedImage, PSF, estimated_nsr);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Full Algorithm Example (Script) ==&lt;br /&gt;
&lt;br /&gt;
Here is a complete, standardized script suitable for a MATLAB Grader problem.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
% --- IMAGE RESTORATION TASK ---&lt;br /&gt;
&lt;br /&gt;
% 1. Read the input image (Ground Truth)&lt;br /&gt;
original = imread(&amp;#039;cameraman.tif&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
% 2. Simulate Degradation &lt;br /&gt;
&lt;br /&gt;
PSF_real = fspecial(&amp;#039;motion&amp;#039;, 21, 11);&lt;br /&gt;
blurred = imfilter(original, PSF_real, &amp;#039;conv&amp;#039;, &amp;#039;circular&amp;#039;);&lt;br /&gt;
noise_mean = 0;&lt;br /&gt;
noise_var = 0.0001;&lt;br /&gt;
blurred_noisy = imnoise(blurred, &amp;#039;gaussian&amp;#039;, noise_mean, noise_var);&lt;br /&gt;
&lt;br /&gt;
% A. Model the PSF&lt;br /&gt;
&lt;br /&gt;
estimated_len = 21;&lt;br /&gt;
estimated_theta = 11;&lt;br /&gt;
est_PSF = fspecial(&amp;#039;motion&amp;#039;, estimated_len, estimated_theta);&lt;br /&gt;
&lt;br /&gt;
% B. Estimate Noise to Signal Ratio&lt;br /&gt;
% A lower value assumes less noise (sharper but grainier)&lt;br /&gt;
% A higher value assumes more noise (smoother but blurrier)&lt;br /&gt;
estimated_nsr = noise_var / var(im2double(blurred_noisy(:)));&lt;br /&gt;
&lt;br /&gt;
% C. Taper Edges&lt;br /&gt;
% This reduces the Gibbs phenomenon (ringing) at image borders&lt;br /&gt;
input_ready = edgetaper(blurred_noisy, est_PSF);&lt;br /&gt;
&lt;br /&gt;
% D. Restore Image using Wiener Deconvolution&lt;br /&gt;
restored_img = deconvwnr(input_ready, est_PSF, estimated_nsr);&lt;br /&gt;
&lt;br /&gt;
% ---------------------------------------------------------&lt;br /&gt;
% VISUALIZATION &amp;amp; METRICS&lt;br /&gt;
% ---------------------------------------------------------&lt;br /&gt;
figure;&lt;br /&gt;
subplot(1,3,1); imshow(original); title(&amp;#039;Original&amp;#039;);&lt;br /&gt;
subplot(1,3,2); imshow(blurred_noisy); title(&amp;#039;Blurred &amp;amp; Noisy&amp;#039;);&lt;br /&gt;
subplot(1,3,3); imshow(restored_img); title(&amp;#039;Restored (Wiener)&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
% Metric: Peak Signal-to-Noise Ratio (Higher is better)&lt;br /&gt;
score = psnr(restored_img, original);&lt;br /&gt;
fprintf(&amp;#039;Restoration Quality (PSNR): %.2f dB\n&amp;#039;, score);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ajay.paul@stud.hshl.de</name></author>
	</entry>
</feed>