Image Processing Assignment
Image Processing Assignment
To
Md. Mijanur Rahman
Lecturer
Department of CSE
Southeast University From
Sadia Akter Anika
ID: 2022200000012
Salma Sabiha Piya
ID: 2022100000057
Proshanta Ranjan Das
ID: 2023000000148
Saira Zaman
ID: 2023000000014
Contents
Figure 5.1 shows an image degradation/restoration process. The degraded image in the spatial
domain is given by
g ( x, y ) = f ( x, y ) h ( x, y ) + ( x, y )
where h(x,y) is the spatial representation of the degradation function.
Therefore, we can have the frequency domain representation of:
G (u , v) = H (u , v) F (u , v) + N (u , v)
Where the terms in capital letters are Fourier transforms.
sin(VTu )
H (U ,V ) =
UV
• Atmospheric turbulence
5/6
H (U ,V ) = e − c (u +v2 )
2
1.1) Linear, Position-Invariant Degradation
The input-output relationship before the restoring stage is expressed as
𝒈(𝒙, 𝒚) = 𝑯[𝒇(𝒙, 𝒚)] + 𝜼(𝒙, 𝒚)
For the moment, let us assume that 𝜼(𝒙, 𝒚)=0 so that g(x,y)= H[f(x,y)]
H[af1(x,y)+bf2(x,y)]=aH[f1(x,y)]+bH[f2(x,y)]
Where a and b are scalars and f1(x,y) are any two input images.
If a=b=1 the equation become,
H[f1(x,y)+f2(x,y)]=H[f1(x,y)]+H[f2(x,y)]
With a slight (but equivalent) change in notation in the definition of the im-
pulse in Eq. (4.5-3), f(x,y) can be expressed as:
∞ ∞
𝑓(𝑥, 𝑦) = ∫ ∫ 𝑓(𝛼, 𝛽)𝛿(𝑥 − 𝛼, 𝑦 − 𝛽)𝑑𝛼 𝑑𝛽
−∞ −∞
Calculating the following equation when assume the 𝜼(𝒙, 𝒚) = 𝟎 then the homogeneity property
will be, ℎ(𝑥, 𝛼, 𝑦, 𝛽) = 𝐻[𝛿(𝑥 − 𝛼, 𝑦 − 𝛽)]
It is called the impulse response of H. In optics, the impulse becomes a point of light and
ℎ(𝑥, 𝛼, 𝑦, 𝛽) is commonly referred to as the point spread function (PSF). This name arises from
the fact that all physical optical systems blur (spread) a point of light to some degree, with the
amount of blurring being determined by the quality of the optical components.
∞ ∞
𝑔(𝑥, 𝑦) = ∫ ∫ 𝑓(𝛼, 𝛽)ℎ(𝑥 − 𝛼, 𝑦 − 𝛽)𝑑𝛼 𝑑𝛽 + 𝜂(𝑥, 𝑦)
−∞ −∞
Where 𝐸(∗) is the expected value of the argument. It is assumed that the noise and the image
are uncorrelated; that one or the other has zero mean; and hat the intensity levels in the estimate
are a linear function of the levels in the degraded image. Based on these conditions, the minimum
of the error function is given in the frequency domain by the expression:
A number of useful measures are based on the power spectra of noise and of the undegraded
image. One of the most important is the signal to noise ratio, approximately using frequency
domain quantities such as
∑𝑀−1 𝑁−1
𝑢=0 ∑𝑣=0 |𝐹(𝑢, 𝑣)|
2
𝑆𝑁𝑅 = 𝑀−1 𝑁−1
∑𝑢=0 ∑𝑣=0 |𝑁(𝑢, 𝑣)|2
This ratio gives a measure of the level of information bearing signal power to the level of
noise power.
The mean square error given in statistical form can be approximated also in terms of summation
involving the original and restore image
𝑀−1 𝑁−1
1 2
𝑀𝑆𝐸 = ∑ ∑|𝑓(𝑥, 𝑦) − 𝑓̂(𝑥, 𝑦)|
𝑀𝑁
𝑥=0 𝑦=0
if one considers the restored image to be “signal” and the difference between this image and
the original to be noise, we can define a signal-to-noise ratio in the spatial domain as
∑𝑀−1 𝑁−1 ̂ 2
𝑥=0 ∑𝑦=0 𝑓 (𝑥, 𝑦)
𝑆𝑁𝑅 = 2
∑𝑀−1 𝑁−1 ̂
𝑥=0 ∑𝑦=0 |𝑓(𝑥, 𝑦) − 𝑓 (𝑥, 𝑦)|
2) Noise Models:
• Noise is the unwanted random variation in pixel intensity values that corrupts an image.
• It occurs during image acquisition (camera sensor, scanner, etc.) or transmission
(channel interference, compression errors, etc.).
• Noise reduces image quality and makes processing tasks (like edge detection,
segmentation, recognition) difficult.
➢ Noise arise-
• During Image Acquisition
• Environment conditions
• Quality of sensing elements
• For x. Two factors for CCD: light level and sensor temperature
• Image Transmission
Noise has some general characteristics that help us model and filter it.
Additive Noise:
Multiplicative noise:
2. Statistical Properties
o Mean (μ\muμ): average value of noise.
𝜇 = 𝐸[𝜂(𝑥, 𝑦)]
𝜎 2 = 𝐸[(𝜂(𝑥, 𝑦) − 𝜇)2 ]
o PDF (Probability Density Function): describes how noise values are distributed.
4. Spatial Properties
o Noise can be independent (uncorrelated between pixels) or correlated (structured
pattern).
o Salt-and-Pepper is independent, but periodic noise is correlated.
Frequency Properties of Noise:
Noise is often analyzed in the frequency domain because filters (like notch, Wiener, Gaussian
low-pass) work there.
1. White Noise
𝑵𝟎
𝑺𝒏𝒏 = , −∞ < 𝒇 < ∞
𝟐
𝑵𝟎
= 𝑪𝒐𝒏𝒔𝒕𝒂𝒏𝒕 𝑽𝒂𝒍𝒖𝒆
𝟐
Example: Gaussian noise in spatial domain looks like random dots, in frequency domain it is
uniformly spread.
2. Colored Noise
3. Periodic Noise
𝑨 = 𝑨𝒎𝒑𝒍𝒊𝒕𝒖𝒅𝒆
∅ = 𝑷𝒉𝒂𝒔𝒆
1
p( z ) = e −( z − ) / 2 2
2
2
Example: An image pixel has value 150. Gaussian noise with mean μ=0 and variance σ²=25 is added. If
noise sample = -3: z = 150 - 3 = 147.
New pixel value = 147
Shape
Imaging Context
• Suppose a signal (like ultrasound or radar wave) reflects off many tiny scatterers.
• Resultant magnitude is always positive and follows Rayleigh distribution.
Mathematics:
2
( z − a )e −( z − a ) / b for z a
2
p( z ) = b
0 for z a
Example: σ=4, z=5 → p(5) = (5/16) * exp(-25/32) ≈ 0.141
.
Shape
Imaging Context
Mathematics:
b b −1 −( z − a ) 2 / b
a z for z a
p ( z ) = (b − 1)! e
0 for z a
Example: a=2, b=2, z=1 → p(1) = 4e^(-2) ≈ 0.541.
Shape
Imaging Context
• Describes processes where small values occur often, large ones rarely.
• Photon counting: most pixels get a small count, but occasionally a high one.
Formula:
p ( z ) = ae − az
Example: a=0.2, z=5 → p(5) = 0.2 * e^(-1) ≈ 0.0736.
Shape
Imaging Context
Formula:
1
for a z b
p( z ) = b - a
0 otherwise
Example: a=0, b=10 → p(z) = 1/10 = 0.1
Imaging Context
Formula:
Pa for z = a
p ( z ) = Pb for z = b
0
otherwise
• If b>a gray level b will appear as a light dot;
• If either Pa or Pb is zero, the impulse is called unipolar
• If neither probability is zero (bipolar), and especially if they are approximately
equal: salt and pepper noise
Shape
Imaging Context
Detailed Intuition
Shape
Imaging Context
Detailed Intuition
𝑳−𝟏
Mean, 𝒛̅ = ∑𝑳−𝟏
𝒊=𝟎 𝒛𝒊 𝒑𝒔 (𝒛𝒊 ) & Variance, 𝝈𝟐 = ∑𝒊=𝟎 (𝒛𝒊 − 𝒛̅)𝟐 𝒑𝒔 (𝒛̂𝒊 𝒊 )
Shape
Imaging Context
When the degradation is mainly noise, special filters are used to restore images. These filters
fall into three main categories:
Concept:
Mean filters smooth the image by replacing each pixel with some kind of average of its
neighbors. They are linear because they satisfy the principle of superposition.
General Formula:
𝒂 𝒃
𝟏
𝒈(𝒙, 𝒚) = ∑ ∑ 𝒇(𝒙 + 𝒊, 𝒚 + 𝒋)
𝒎∗𝒏
𝒊=−𝒂 𝒋=−𝒃
Formula:
𝟏
𝒇̂(𝒙, 𝒚) = ∑ 𝒈(𝒔, 𝒕)
𝒎𝒏
(𝒔,𝒕)𝝐𝑺𝒙𝒚
Example: Window values [100, 102, 98, 101, 99, 100, 97, 103, 102] → Mean ≈ 100
Advantages:
1. Simple to implement.
2. Efficient and fast for small windows.
3. Works well for Gaussian noise.
Disadvantages:
• Multiplies all pixels in the neighborhood and takes the nth root.
Formula:
𝟏
𝒎𝒏
Advantages:
Disadvantages:
𝒎𝒏
𝒇̂(𝒙, 𝒚) =
𝟏
∑(𝒔,𝒕)𝝐𝑺𝒙𝒚
𝒈(𝒔, 𝒕)
Uses:
Advantages:
Disadvantages:
Uses:
Advantages:
Disadvantages:
Formula:
Advantages:
Disadvantages:
• Max filter: Replace pixel with maximum → removes dark (pepper) noise.
• Min filter: Replace pixel with minimum → removes bright (salt) noise.
Formula:
Uses:
Advantages:
Disadvantages:
𝟏
𝒇̂(𝒙, 𝒚) = [𝒎𝒂𝒙(𝒔,𝒕)𝝐𝑺𝒙𝒚 {𝒈(𝒔, 𝒕)} + 𝒎𝒊𝒏(𝒔,𝒕)𝝐𝑺𝒙𝒚 {𝒈(𝒔, 𝒕)]
𝟐
Uses:
Advantages:
Disadvantages:
1. Blurs edges.
2. Less effective for impulsive noise.
3. Not suitable for images with varying intensity patterns.
Formula:
𝟏
𝒇̂(𝒙, 𝒚) = ∑ 𝒈𝒓 (𝒔, 𝒕)
𝒎𝒏 − 𝒅
(𝒔,𝒕)𝝐𝑺𝒙𝒚
Uses:
Disadvantages:
𝝈𝟐𝜼
𝒇̂(𝒙, 𝒚) = 𝒈(𝒙, 𝒚) − [𝒈(𝒙, 𝒚) − 𝒎𝑳 ]
𝝈𝟐𝑳
𝝈𝟐𝜼
= 𝒏𝒐𝒊𝒔𝒆 𝒗𝒂𝒓𝒊𝒂𝒏𝒄𝒆
𝝈𝟐𝑳
Uses:
Advantages:
Disadvantages:
Formula:
Stage A: A1= 𝒛𝒎𝒆𝒅 − 𝒛𝒎𝒊𝒏 If A1>0 AND A2<0, go to stage B, Else increase the window size
A2= 𝒛𝒎𝒆𝒅 − 𝒛𝒎𝒂𝒙 If windows size <= 𝑺𝒎𝒂𝒙 repeat stage A, else output 𝒛𝒎𝒆𝒅 .
Uses:
Advantages:
Disadvantages:
Method:
• Types:
o Notch Reject Filter (NRF): Removes unwanted frequencies.
o Notch Pass Filter (NPF): Keeps only desired frequencies, removes all others (less
common for noise removal).
𝑲
𝟏
𝑯(𝒖, 𝒗) = ∏ 𝟐𝒏
𝑫𝟎
𝑲=𝟏 𝟏 +( )
𝑫𝒌 (𝒖, 𝒗)
𝑫𝟎 = 𝑪𝒖𝒕𝒐𝒇𝒇 𝑭𝒓𝒆𝒒𝒖𝒆𝒏𝒄𝒚
𝒏 = 𝑭𝒊𝒍𝒕𝒆𝒓 𝑶𝒓𝒅𝒆𝒓
Working:
Advantages:
Disadvantages:
• Unlike ideal notch filters (which have sharp cutoffs), optimum notch filters use smooth
transition functions to reduce ringing artifacts.
𝑺𝒙𝒙 (𝒖, 𝒗)
𝑯(𝒖, 𝒗) =
𝑺𝒙𝒙 (𝒖, 𝒗) + 𝑺𝒏𝒏 (𝒖, 𝒗)
Working:
Advantages:
Disadvantages:
Image reconstruction from projections refers to the process of estimating an unknown 2D image
or 3D object from its projection data. A projection is essentially a line integral of the object’s
internal density along a certain direction. By taking projections from many angles and combining
them, it becomes possible to reconstruct the original object.
This is the foundation of tomography (from Greek: tomos = slice, graphien = to write). The most
common application is X-ray Computed Tomography (CT), where an X-ray source rotates
around a patient, and detectors record projections at multiple angles. Using reconstruction
algorithms, doctors can “slice” the human body virtually and see the internal organs non-
invasively.
Historically, Johann Radon (1917) introduced the Radon transform, proving mathematically that
a 2D function can be reconstructed from its line integrals. Later, this theory was applied to imaging
technology, leading to the invention of CT scanners in the 1970s, for which Sir Godfrey Hounsfield
won the Nobel Prize.
Mathematical Form:
∞
Advantages:
1. Cross-Sectional Imaging
o Produces detailed slice images of internal structures, eliminating the overlap of
tissues seen in plain X-rays.
2. High Spatial Resolution
o Can distinguish fine anatomical details, especially useful in detecting small lesions,
fractures, or vascular changes.
3. 3D Reconstruction
o Multiple slices can be combined to create 3D models of organs, bones, or tumors,
aiding surgical planning and diagnostics.
4. Non-Invasive & Quick
o Provides internal information without surgery.
o Scan times are fast, important in trauma and emergency settings.
5. Versatility
o Used in many fields: medicine (diagnosis, treatment planning), industry
(nondestructive testing), geophysics, archaeology.
6. Quantitative Information
o Provides Hounsfield Units (CT numbers) that reflect tissue density, useful for
distinguishing soft tissues, blood, bone etc.
Disadvantages:
1. Radiation Dose
o Higher than plain X-rays; repeated scans increase risk of radiation-related effects.
2. Cost and Accessibility
o CT scanners are expensive to purchase and maintain, not always available in low-
resource settings.
3. Artifact Susceptibility
o Motion, metal implants, and beam-hardening can cause streaks or distortions in the
image.
4. Contrast Agent Risks
o Some scans require contrast media, which can cause allergic reactions or kidney
issues in vulnerable patients.
5. Limited Soft-Tissue Contrast
o While CT is better than X-ray, MRI generally provides superior soft tissue contrast
(e.g., for brain or spinal cord imaging).
6. Not Real-Time
o Unlike ultrasound or fluoroscopy, CT does not provide live imaging — it captures
static snapshots.
3.3) Projection and the Random Transform
Definition:
A projection is the shadow or summation of image values along a straight line.
If you imagine shining a light through an object, the detector measures how much light passes →
that’s a projection.
Transforms:
a) Radon Transform:
If 𝒇(𝒙, 𝒚) is a 2D image then the projection at angle 𝜃 is:
∞ ∞
we illustrate how to use the Radon transform to obtain an analytical expression for the projection
of the circular object:
∞ ∞ ∞
𝒈(𝝆, 𝜽) = ∫ 𝑨 𝒅𝒚
−√𝒓𝟐 −𝝆𝟐
Advantages:
1. Mathematical Foundation of CT
o Provides a precise framework for describing how projections (X-ray line integrals)
relate to the object.
o Essential for deriving reconstruction formulas like FBP.
2. Direct Link to Fourier Theory
o Through the Fourier Slice Theorem, the Radon transform connects projections to
the object’s Fourier transform.
o Enables analytical reconstruction approaches.
3. Generality
o Works for any dimension: 2D Radon for CT slices, 3D Radon for volumetric
imaging.
o Can be extended to fan-beam and cone-beam geometries by change of variables.
4. Well-Studied and Stable in Ideal Case
o With complete, noise-free projections over 180∘180^\circ180∘ or
360∘360^\circ360∘, exact reconstruction is possible.
o Strong theoretical guarantees (invertibility under certain conditions).
5. Useful in Many Fields
o Beyond CT: used in tomography, image processing, geophysics, nondestructive
testing, and even machine learning (for feature extraction in certain transforms).
Disadvantages:
= ∫ ∫ 𝒇(𝒙, 𝒚)𝒆−𝒋𝟐𝝅(𝒖𝒙+𝒗𝒚) 𝒅𝒙 𝒅𝒚
−∞ −∞
We recognize this expression as the 2-D Fourier transform of 𝒇(𝒙, 𝒚) evaluated at the values of
𝒖 𝒂𝒏𝒅 𝒗
𝑮(𝝆, 𝜽) = 𝑭(𝝎𝒔𝒊𝒏𝜽, 𝝎𝒄𝒐𝒔𝜽)
Advantages:
1. Mathematical Foundation of CT
o Provides a direct link between measured projections and the object’s Fourier
transform.
o Basis of analytical reconstruction methods like Filtered Back-projection (FBP).
2. Conceptual Simplicity
o Explains CT imaging in terms of Fourier analysis, making it intuitive for
understanding how projections map into frequency space.
3. Exact Reconstruction (in Ideal Case)
o With infinite, noise-free, and complete projection data, the theorem guarantees
exact image reconstruction.
4. Efficient Use in Algorithms
o Enables FFT-based implementations and frequency-domain filtering.
o Forms the backbone of fast reconstruction methods.
5. General Applicability
o Extends to higher dimensions (3D Radon ↔ 3D Fourier slices) and different
geometries (fan-beam, cone-beam with modifications).
6. Insight into Data Completeness
o By showing how projections fill Fourier space, it helps understand why incomplete
angular coverage or sparse data causes artifacts.
Disadvantages:
If the let 𝑢 = 𝜔 𝑐𝑜𝑠𝜃 and 𝑣 = 𝜔 𝑠𝑖𝑛𝜃 then the differentials become 𝑑𝑢 𝑑𝑣 = 𝜔 𝑑𝜔 𝑑𝜃 then
𝟐𝝅 ∞
By splitting this integral into two expressions, one for 𝜃 in the range 0° to 180° and the other in
the range 180° to 360°, and using the fact that 𝑮(𝝎, 𝜽 + 𝟏𝟖𝟎) = −𝑮(𝝎, 𝜽)
𝝅 ∞
In terms of integration with respect to 𝝎 the term 𝒙 𝒄𝒐𝒔𝜽 + 𝒚 𝒔𝒊𝒏𝜽 is a constant, which we recognize as 𝝆,
𝝅 ∞
1. Mathematical Simplicity
o The formula is cleaner than fan-beam FBP (no pre-weighting, no Jacobian
denominator).
o Directly linked to the Radon transform and Fourier Slice Theorem, so it’s easy to
analyze and explain.
2. Well-Studied and Standard
o Serves as the theoretical foundation of CT reconstruction.
o Useful for education, algorithm testing, and theoretical analysis.
3. Lower Computational Complexity (Conceptually)
o Only requires 1D filtering and backprojection, without extra geometry corrections
(like fan-beam cosγ\cos \gammacosγ pre-weighting).
4. Noise and Artifact Understanding
o Since it’s mathematically clean, it’s easier to study the effects of noise, limited data,
and filtering in parallel-beam form.
5. Compatibility with Mathematical Theory
o Directly compatible with algorithms like Radon inversion and Fourier
reconstruction.
o Often used in research simulations before adapting to real-world fan-beam
geometry.
Disadvantages:
This expression is nothing more than the parallel-beam reconstruction formula written in polar
coordinates. However, integration still is with respect to 𝝆 & 𝜽. To integrate with respect to 𝜶 and
𝜷 requires a transformation of coordinates,
−𝟏 𝑻
𝟏 𝟐𝝅−𝜶 𝐬𝐢𝐧 (𝑫)
𝒇(𝒓, 𝝋) = ∫ ∫ 𝒈(𝑫 𝒔𝒊𝒏𝜶, 𝜶 + 𝜷)𝒔[𝒓 𝐜𝐨𝐬(𝜷 + 𝜶 − 𝝋) − 𝑫 𝒔𝒊𝒏𝜶]𝑫𝒄𝒐𝒔𝜶 𝒅𝜶 𝒅𝜷
𝟐 −𝜶 𝑻
− 𝐬𝐢𝐧−𝟏 ( )
𝑫
After calculating all the formula with some proper equation and assume according the needs of
changes of angle we call get the formula,
𝟐𝝅
̃(𝜸𝜷 (𝒙, 𝒚), 𝜷)
𝒒
𝒇(𝒙, 𝒚) = ∫ 𝒅𝜷
(𝑹 − 𝒙 𝒄𝒐𝒔𝜷 − 𝒚 𝒔𝒊𝒏𝜷)𝟐
𝟎
Advantages:
1. Computational Efficiency
o FBP is much faster than iterative reconstruction methods since it mainly involves
filtering (FFT-based convolution) and back projection.
o Suitable for real-time or near-real-time CT imaging.
2. Simplicity of Implementation
o The algorithm is mathematically well-established and relatively straightforward to
implement compared to iterative methods.
3. Direct Reconstruction
o Produces an image directly from projection data without requiring multiple
iterations.
o Good for quick diagnostics and situations where computational resources are
limited.
4. Geometric Fit to Modern CT Scanners
o Most clinical CT scanners use fan-beam geometry. FBP naturally adapts to that
geometry (with pre-weighting and Jacobian corrections).
5. Stable and Reproducible
o Provides consistent results without risk of non-convergence (unlike iterative
reconstructions).
o Noise amplification is predictable and can be controlled with filters.
Disadvantages:
1. Noise Sensitivity
o The ramp filter amplifies high-frequency noise. Even with windowing (e.g., Hann
or Shepp–Logan), noise remains a challenge.
2. Artifact-Prone
o Streaks, star artifacts, and beam-hardening effects are more pronounced, especially
in sparse data or with metal objects in the scan.
3. High Dose Requirement
o To reduce noise and artifacts, a relatively high number of projections (and thus
higher radiation dose) is needed for good image quality.
4. Limited Flexibility
o Assumes complete or near-complete angular coverage.
o For limited-angle scans, missing data, or sparse-view CT, FBP performs poorly
compared to iterative methods.
5. Approximate Physical Modeling
o Does not model scatter, detector blur, or nonlinear effects (beam hardening, noise
statistics).
o Iterative reconstruction can incorporate these physics for better accuracy.
6. Short-Scan Complexity
o In fan-beam geometry, if only a short scan (<360°) is acquired, additional weighting
(e.g., Parker weighting) is required to correct for angular under sampling.