<?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_Noise_Reduction</id>
	<title>Image Processing: Noise Reduction - 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_Noise_Reduction"/>
	<link rel="alternate" type="text/html" href="https://wiki.hshl.de/wiki/index.php?title=Image_Processing:_Noise_Reduction&amp;action=history"/>
	<updated>2026-05-06T07:05:46Z</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:_Noise_Reduction&amp;diff=147079&amp;oldid=prev</id>
		<title>Ajay.paul@stud.hshl.de am 5. März 2026 um 13:21 Uhr</title>
		<link rel="alternate" type="text/html" href="https://wiki.hshl.de/wiki/index.php?title=Image_Processing:_Noise_Reduction&amp;diff=147079&amp;oldid=prev"/>
		<updated>2026-03-05T13:21:23Z</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 5. März 2026, 13:21 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-l103&quot;&gt;Zeile 103:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 103:&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;code&amp;gt;fspecial(&amp;#039;average&amp;#039;, [m n])&amp;lt;/code&amp;gt;: Creates a linear averaging filter kernel.&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;code&amp;gt;fspecial(&amp;#039;average&amp;#039;, [m n])&amp;lt;/code&amp;gt;: Creates a linear averaging filter kernel.&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;code&amp;gt;imfilter(I, h)&amp;lt;/code&amp;gt;: Convolves the image &amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt; with kernel &amp;lt;math&amp;gt;h&amp;lt;/math&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;code&amp;gt;imfilter(I, h)&amp;lt;/code&amp;gt;: Convolves the image &amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt; with kernel &amp;lt;math&amp;gt;h&amp;lt;/math&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;&#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;&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/3_Noise_Reduction/&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key mtrwiki:diff:1.41:old-146805:rev-147079: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:_Noise_Reduction&amp;diff=146805&amp;oldid=prev</id>
		<title>Ajay.paul@stud.hshl.de: Die Seite wurde neu angelegt: „= Noise Reduction: Median vs. Linear Filtering =  &#039;&#039;&#039;Noise Reduction&#039;&#039;&#039; is a fundamental step in image processing used to improve image quality by removing unwanted signal artifacts (noise) while preserving important structural features like edges and textures.  This article explores the specific problem of removing &#039;&#039;&#039;Salt &amp; Pepper Noise&#039;&#039;&#039; (Impulse Noise) and demonstrates why non-linear filtering (Median) is superior to linear filtering (Averaging) for…“</title>
		<link rel="alternate" type="text/html" href="https://wiki.hshl.de/wiki/index.php?title=Image_Processing:_Noise_Reduction&amp;diff=146805&amp;oldid=prev"/>
		<updated>2026-02-04T11:31:00Z</updated>

		<summary type="html">&lt;p&gt;Die Seite wurde neu angelegt: „= Noise Reduction: Median vs. Linear Filtering =  &amp;#039;&amp;#039;&amp;#039;Noise Reduction&amp;#039;&amp;#039;&amp;#039; is a fundamental step in image processing used to improve image quality by removing unwanted signal artifacts (noise) while preserving important structural features like edges and textures.  This article explores the specific problem of removing &amp;#039;&amp;#039;&amp;#039;Salt &amp;amp; Pepper Noise&amp;#039;&amp;#039;&amp;#039; (Impulse Noise) and demonstrates why non-linear filtering (Median) is superior to linear filtering (Averaging) for…“&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Noise Reduction: Median vs. Linear Filtering =&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Noise Reduction&amp;#039;&amp;#039;&amp;#039; is a fundamental step in image processing used to improve image quality by removing unwanted signal artifacts (noise) while preserving important structural features like edges and textures.&lt;br /&gt;
&lt;br /&gt;
This article explores the specific problem of removing &amp;#039;&amp;#039;&amp;#039;Salt &amp;amp; Pepper Noise&amp;#039;&amp;#039;&amp;#039; (Impulse Noise) and demonstrates why non-linear filtering (Median) is superior to linear filtering (Averaging) for this specific type of degradation.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Theoretical Background ==&lt;br /&gt;
&lt;br /&gt;
=== Salt &amp;amp; Pepper Noise ===&lt;br /&gt;
Salt &amp;amp; Pepper noise presents itself as sparsely occurring white and black pixels. It typically arises from:&lt;br /&gt;
* Errors in data transmission.&lt;br /&gt;
* Malfunctioning pixel elements in camera sensors.&lt;br /&gt;
* Analog-to-digital converter errors.&lt;br /&gt;
&lt;br /&gt;
In an 8-bit image, &amp;quot;Salt&amp;quot; is a pixel value of 255 (white) and &amp;quot;Pepper&amp;quot; is a pixel value of 0 (black). Unlike Gaussian noise, which modifies values by small amounts, Salt &amp;amp; Pepper noise replaces the original pixel value entirely with an extrema value.&lt;br /&gt;
&lt;br /&gt;
=== The Solution: Median Filtering ===&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Median Filter&amp;#039;&amp;#039;&amp;#039; is a non-linear digital filtering technique. &lt;br /&gt;
# It looks at a neighborhood of pixels (e.g., a 3x3 square) around a target pixel.&lt;br /&gt;
# It sorts all pixel values in that neighborhood in numerical order.&lt;br /&gt;
# It replaces the target pixel with the &amp;#039;&amp;#039;&amp;#039;median&amp;#039;&amp;#039;&amp;#039; (middle) value of the sorted list.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Why it works:&amp;#039;&amp;#039;&amp;#039; The median is robust against outliers. Since Salt &amp;amp; Pepper pixels are mathematical outliers (0 or 255), they usually end up at the very start or very end of the sorted list, ensuring the median value picked is a &amp;quot;real&amp;quot; neighbor pixel.&lt;br /&gt;
&lt;br /&gt;
=== The Comparison: Linear Average Filtering ===&lt;br /&gt;
A &amp;#039;&amp;#039;&amp;#039;Linear Average (Mean) Filter&amp;#039;&amp;#039;&amp;#039; calculates the arithmetic mean of the neighborhood and replaces the center pixel with that mean.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;The Problem:&amp;#039;&amp;#039;&amp;#039; If a 3x3 neighborhood contains just one &amp;quot;Salt&amp;quot; pixel (255) on a black background (0), the average will be &amp;lt;math&amp;gt;(255 + 0 + ...)/9 \approx 28&amp;lt;/math&amp;gt;. &lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Result:&amp;#039;&amp;#039;&amp;#039; The bright white dot becomes a gray smudge. The noise is spread out (blurred) rather than removed.&lt;br /&gt;
&lt;br /&gt;
== MATLAB Implementation ==&lt;br /&gt;
&lt;br /&gt;
The following MATLAB script demonstrates the creation of noise, the application of both filters, and the visual comparison.&lt;br /&gt;
&lt;br /&gt;
=== Code Logic ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;matlab&amp;quot;&amp;gt;&lt;br /&gt;
% Noise Reduction&lt;br /&gt;
% Algorithm: Median Filtering (medfilt2)&lt;br /&gt;
clc; clear; close all;&lt;br /&gt;
&lt;br /&gt;
% 1. Load a clean image&lt;br /&gt;
% &amp;#039;eight.tif&amp;#039; is a standard high-contrast binary-style image provided in MATLAB&lt;br /&gt;
I = imread(&amp;#039;eight.tif&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
% 2. Add Salt &amp;amp; Pepper Noise&lt;br /&gt;
% Density 0.05 means approximately 5% of the pixels are corrupted.&lt;br /&gt;
noise_density = 0.05;&lt;br /&gt;
I_noisy = imnoise(I, &amp;#039;salt &amp;amp; pepper&amp;#039;, noise_density);&lt;br /&gt;
&lt;br /&gt;
% 3. Apply Median Filter (The Classic Algorithm)&lt;br /&gt;
% &amp;#039;medfilt2&amp;#039; performs 2-D median filtering. [3 3] is the window size.&lt;br /&gt;
I_median = medfilt2(I_noisy, [3 3]);&lt;br /&gt;
&lt;br /&gt;
% 4. Comparison: Linear Average Filter&lt;br /&gt;
% We create a 3x3 averaging kernel (box filter)&lt;br /&gt;
h = fspecial(&amp;#039;average&amp;#039;, [3 3]);&lt;br /&gt;
% Apply the linear filter&lt;br /&gt;
I_average = imfilter(I_noisy, h);&lt;br /&gt;
&lt;br /&gt;
% 5. Visualization&lt;br /&gt;
figure(&amp;#039;Name&amp;#039;, &amp;#039;Task 3: Noise Reduction&amp;#039;, &amp;#039;Position&amp;#039;, [100, 100, 1200, 800]);&lt;br /&gt;
&lt;br /&gt;
% A. Original&lt;br /&gt;
subplot(2, 2, 1); imshow(I);&lt;br /&gt;
title(&amp;#039;Original Image&amp;#039;, &amp;#039;FontSize&amp;#039;, 12);&lt;br /&gt;
&lt;br /&gt;
% B. Noisy&lt;br /&gt;
subplot(2, 2, 2); imshow(I_noisy);&lt;br /&gt;
title({&amp;#039;Corrupted Image&amp;#039;, &amp;#039;(Salt &amp;amp; Pepper Noise)&amp;#039;}, &amp;#039;FontSize&amp;#039;, 12);&lt;br /&gt;
&lt;br /&gt;
% C. Average Filter Result&lt;br /&gt;
subplot(2, 2, 3); imshow(I_average);&lt;br /&gt;
title({&amp;#039;Linear Average Filter&amp;#039;, &amp;#039;(Noise is smeared/blurred)&amp;#039;}, &amp;#039;FontSize&amp;#039;, 12);&lt;br /&gt;
&lt;br /&gt;
% D. Median Filter Result&lt;br /&gt;
subplot(2, 2, 4); imshow(I_median);&lt;br /&gt;
title({&amp;#039;Median Filter&amp;#039;, &amp;#039;(Noise Removed + Edges Sharp)&amp;#039;}, &amp;#039;FontSize&amp;#039;, 12, &amp;#039;FontWeight&amp;#039;, &amp;#039;bold&amp;#039;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Analysis of Results ==&lt;br /&gt;
&lt;br /&gt;
[[Datei:Noise Reduction.png|center|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Visual Comparison ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Filter Type !! Effect on Noise !! Effect on Edges !! Conclusion&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Average Filter&amp;#039;&amp;#039;&amp;#039; || Reduces the intensity of the noise dots but spreads them out, creating &amp;quot;blobs&amp;quot; or smudges. || Edges become blurred. The image loses sharpness. || &amp;#039;&amp;#039;&amp;#039;Incorrect&amp;#039;&amp;#039;&amp;#039; method for Impulse noise.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Median Filter&amp;#039;&amp;#039;&amp;#039; || Completely removes the white and black dots (assuming noise density isn&amp;#039;t too high). || Edges remain sharp because no averaging takes place across the edge boundary. || &amp;#039;&amp;#039;&amp;#039;Correct&amp;#039;&amp;#039;&amp;#039; method for Impulse noise.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Parameter Sensitivity ===&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Window Size ([3 3]):&amp;#039;&amp;#039;&amp;#039; A 3x3 window works well for low noise densities (like 0.05). If the noise density increases (e.g., &amp;gt; 0.2), a larger window (5x5) might be required to ensure the median value isn&amp;#039;t a noise pixel itself, though this will result in loss of fine detail.&lt;br /&gt;
&lt;br /&gt;
== Key MATLAB Functions ==&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;imnoise(I, &amp;#039;salt &amp;amp; pepper&amp;#039;, D)&amp;lt;/code&amp;gt;: Adds impulse noise with density &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;medfilt2(I, [m n])&amp;lt;/code&amp;gt;: Performs 2D median filtering using an &amp;lt;math&amp;gt;m \times n&amp;lt;/math&amp;gt; window.&lt;br /&gt;
* &amp;lt;code&amp;gt;fspecial(&amp;#039;average&amp;#039;, [m n])&amp;lt;/code&amp;gt;: Creates a linear averaging filter kernel.&lt;br /&gt;
* &amp;lt;code&amp;gt;imfilter(I, h)&amp;lt;/code&amp;gt;: Convolves the image &amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt; with kernel &amp;lt;math&amp;gt;h&amp;lt;/math&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Ajay.paul@stud.hshl.de</name></author>
	</entry>
</feed>