0% found this document useful (0 votes)
4 views13 pages

Image Processing Cold0goat

This document details an experiment conducted in EE461-LAB at the University of Tripoli, focusing on digital image processing using MATLAB. It covers the representation of images as matrices, explores different image types and noise, and evaluates various filtering techniques for noise removal. The findings demonstrate MATLAB's effectiveness in image processing tasks and the relationship between image representation and manipulation techniques.

Uploaded by

amh18629
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views13 pages

Image Processing Cold0goat

This document details an experiment conducted in EE461-LAB at the University of Tripoli, focusing on digital image processing using MATLAB. It covers the representation of images as matrices, explores different image types and noise, and evaluates various filtering techniques for noise removal. The findings demonstrate MATLAB's effectiveness in image processing tasks and the relationship between image representation and manipulation techniques.

Uploaded by

amh18629
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

University of Tripoli

Faculty of Engineering
Department of Electrical and Electronic Engineering
Spring 2025

EE461-LAB

Image Processing with MATLAB

‫مؤمن منير الزليطني‬


2200209192

Date: 22nd/6/2025
Instructor: DR. SALAH SAWAN
Abstract:
This experiment focused on the application of MATLAB for digital image processing,
emphasizing the matrix-based representation and manipulation of images. The core of the
experiment involved exploring four primary image types: binary, grayscale, indexed, and RGB.
Standard image processing commands were utilized for reading, displaying, and converting
images between these types. Furthermore, the experiment involved introducing various
common noise types (salt & pepper, Gaussian, speckle, and Poisson) into images to analyze
their effects. Subsequently, noise removal techniques, including median, Gaussian, and
Wiener filters, were implemented and evaluated for their effectiveness in restoring the
corrupted images. The results showcase MATLAB's practical utility in handling and processing
digital images, underscoring the fundamental relationship between image representation and
manipulation techniques.

Introduction:
In the field of digital image processing, images are fundamentally represented as numerical
matrices, where each element corresponds to a pixel. The visual characteristics of an image,
such as its brightness, color, and structure, are defined by the arrangement and values of these
pixels. The specific structure of this matrix representation is dependent on the image type. This
experiment delves into these concepts, using MATLAB's extensive capabilities to perform a
range of image processing tasks. The primary goals included understanding how images are
represented as matrices, exploring different image and noise types, and applying filters to
restore image quality. This provides a foundational understanding of real-world image
processing applications.

Objectives:
• To grasp how images are represented as matrices and what that means for processing
them.
• To investigate different image formats, such as binary, grayscale, indexed, and RGB, and
how they can be converted.
• To analyse the impact of adding noise to images and assess various filtering methods for
image restoration.
• To become proficient in using MATLAB's image processing tools for real-world scenarios.
Theory:

➢ Image types

1. Binary Image: A binary image is composed of pixels with only two possible values, 0
(black) and 1 (white). Its matrix representation is a logical array of 0s and 1s. These
images are commonly used for tasks like segmentation and thresholding.

Fig.1.Example of binary image.

2. Grayscale Image: This image type represents shades of gray, with pixel values typically
ranging from 0 (black) to 255 (white) in an 8-bit format. It is represented by a matrix of
intensity values.

Fig.2. Example of Grayscale image


3. RGB Image: A true-color image, an RGB image uses three separate matrices for the red,
green, and blue color channels. The final color of a pixel is a combination of the intensity
values from these three channels. This is stored as a 3D matrix.

Fig.3. Example of RGB image

4. Indexed Image: An indexed image consists of a data matrix of integer values and a
colormap. The integers in the data matrix serve as indices to the colormap, which is a
matrix where each row is an RGB triplet defining a specific color.

Fig.4. Example of Indexed image

➢ Noise types
Noise in digital images refers to unwanted variations in pixel values.

1. Salt & Pepper Noise: Appears as randomly scattered black and white pixels, often
caused by data transmission errors.

Fig.5. Example of salt & pepper noise.


2. Gaussian Noise: Characterized by random intensity variations that follow a Gaussian
distribution, often resulting from sensor noise during acquisition. It gives the image a
grainy appearance.

Fig.6. Example of Gaussian noise.

3. Speckle Noise: A multiplicative noise that is dependent on pixel intensity, common in


imaging systems like radar and ultrasound.

Fig.7. Example of Speckle noise.

4. Poisson Noise: Also known as photon shot noise, it arises from statistical fluctuations
in the number of photons detected, especially in low-light conditions.

Fig.8. Example of Poisson noise


➢ Filter types
Filters are used to suppress or remove noise from images.

1. Median Filter: Replaces each pixel's value with the median value of its neighboring
pixels. It is highly effective at removing salt & pepper noise while preserving edges.
2. Gaussian Filter: Applies a weighted average to pixel neighborhoods, with weights
determined by a Gaussian distribution. It is effective for reducing Gaussian noise but
can cause slight blurring.
3. Wiener Filter: A more advanced filter that minimizes mean squared error by
considering local image statistics, making it effective for both Gaussian and speckle
noise.

Equipment:
1. Personal Computer with MATLAB R2023b installed.

Procedure & Results:

1. Reading and displaying images.

Fig.9. Example of reading and displaying an image.


2. Color Space Conversions.

Fig.10. Example of different color space conversions.

3. Image enhancement.

Fig.11. Example of image enhancement.


4. Edge detection.

Fig.12. Example of different edge detections.

5. Segmentation

Fig.13. Example of segmentation.


6. Morphological operations.

Fig.14. Example of different morphological operations.


7. Geometric transformations.

Fig.15. Example of different geometric transformations.


8. Feature extraction

Fig.16. Example of features extraction.

9. Saving results.

Fig.17. Example of saving a result.


➢ Interactive tools:
• Imtool

Fig.18. Example of showing pixel info.

➢ Mathematical operations
• Addition & Subtraction

Fig.19. Comparison between addition and subtraction.


• Multiplication & Divison

Fig.20. Comparison between multiplication and division.

Discussion:
The experimental results confirmed the fundamental principle that digital images
are represented and manipulated as matrices in MATLAB. The direct application
of matrix operations yielded predictable and tangible visual changes, establishing
a clear link between numerical data and image characteristics. For instance, the
addition or subtraction of a scalar value to an image matrix resulted in a uniform
increase or decrease in overall image brightness, respectively. This illustrates how
pixel-level manipulations directly impact the final visual output.
The exploration of binary, grayscale, and RGB image types highlighted their unique
matrix structures and the corresponding implications for processing. The
experiment demonstrated that handling a multi-channel RGB image, for example,
requires operations to be applied across three separate data matrices, one for
each color channel.
A critical part of the experiment was the simulation of real-world image corruption
through the introduction of various noise types. Each noise exhibited distinct
visual characteristics. Salt & pepper noise appeared as stark, isolated black and
white pixels scattered across the image, while Gaussian noise produced a more
uniform, grainy texture that affected the entire image. This step was crucial for
setting a baseline to evaluate the effectiveness of different noise removal
techniques.
Conclusion:
In conclusion, this experiment effectively demonstrated the practical application
of MATLAB for foundational image processing tasks. Key concepts such as image
representation in matrices, conversions between binary, grayscale, and RGB
formats, and the effects of various noise types were successfully explored. The
results confirmed that specific filtering techniques are required to effectively
restore corrupted images, validating the use of the median filter for salt & pepper
noise and the Gaussian and Wiener filters for other noise types. Overall, the
experiment validated MATLAB's robust capabilities for handling diverse image
processing challenges and provided essential, hands-on insights into the practical
relationship between image theory and its application.

References:
1. Lab sheet.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy