Spatial_Domain_Methods_in_Digital_Image_Processing_Group_8[1]
Spatial_Domain_Methods_in_Digital_Image_Processing_Group_8[1]
The spatial domain refers to the image plane itself, where operations are performed directly on
pixel values at coordinates (x, y). Unlike frequency domain methods (which use Fourier
transforms), spatial domain techniques manipulate raw pixel intensities for tasks like:
Thus,
By Working directly on pixels makes spatial domain methods intuitive and fast for real-time
applications such as camera filters.
Point Processing is a technique in image processing where each pixel is modified independently
based on its own intensity value, without considering neighboring pixels.
Common Techniques:
Medical imaging
Image Negative S = (L−1) −r Inverts intensities
(X-ray reversal)
Enhancing low-
Log Transformation S = clog(1+r) Expands dark pixels
light images
Method Formula Effect Real-World Use
Display calibration
γ
Power-Law (Gamma) S = c⋅r Adjusts contrast (sRGB gamma
correction)
Where:
1 1 1 1 Pre-processing for
Average [1 1 1 ] Blurs noise
9 object detection
1 1 1
1 1 2 1
Smooths + Face detection (reducing
Gaussian [2 4 2]
16 preserves edges skin texture noise)
1 2 1
Non-linear (picks median Removes salt-
Median Old photo restoration
value) and-pepper noise
(ii) Sharpening Filters (High-Pass)
Histogram Processing refers to techniques that analyze and modify the distribution of pixel
intensity values in an image to improve contrast or match certain characteristics.
Main Techniques includes;
Useful when an image is too dark or too bright — it "spreads out" the pixel values.
Image enhancement refers to the process of highlighting certain information of an image, as well
as weakening or removing any unnecessary information according to specific needs. For
example, eliminating noise, revealing blurred details, and adjusting levels to highlight features of
an image.
I. Image negativity.
This method inverts the pixel values of an image to enhance details, especially in bright regions.
The transformation can be represented as:
S= (L−1) −r
Where:
This is particularly useful in medical imaging (e.g., X-ray reversal) to highlight details in bright
regions.
Example 1
Consider we have an 8-bit grayscale image of original intensity, r = 30, Required to find image
negativity.
Solution
S = 225
So, the corresponding pixel in the negative image would have an intensity of 225.
Example 2
Consider a 3-bit grayscale image represented by the following pixel intensity values. Calculate
the image negativity for this image
f(x,y)
4 3 2 1
3 1 2 4
5 1 6 2
2 3 5 6
5 4 2 1
II. Bit plane slicing
Bit Plane Slicing is a technique in image processing where each bit of the pixel intensity values
is separated into individual "bit planes." This helps analyze or manipulate the image based on the
contribution of each bit level.
MSB
LSB
For an 8-bit image, 0 is encoded as 00000000 and 255 is encoded as 11111111. Any number
between 0 t0 255 is encoded as one byte.
The bit in the far-left side is referred as the Most Significant Bit (MSB) because a change in that
bit would significantly change the value encoded by the byte.
The bit in the far right is referred as the Least Significant Bit (LSB), because a change in this bit
does not change the encoded gray value much.
Example.
Consider a 3-bit grayscale image represented by the following pixel intensity values for f(x,y),
Perform bit plane slicing on this image and extract the Most Significant Bit (MSB), Center Bit,
and Least Significant Bit (LSB) planes.
4 3 2 1
3 1 2 4
5 1 6 2
2 3 5 6
Solution
In Bit Plane image is broken and converted into MSB, Central Bits, and LSB. So, we convert
every pixel value for f (x, y) into 3-bit binary value
1 0 0 0
0 0 0 1
1 0 1 0
0 0 1 1
0 1 1 0
1 0 1 0
0 0 1 1
1 1 0 1
For LSB
0 1 0 1
1 1 0 0
1 1 0 0
0 1 1 0
III. Thresholding
Thresholding is a spatial domain technique that converts a grayscale image into a binary image (black
and white) by classifying pixels based on their intensity values relative to a chosen threshold value (T).
Purpose of Thresholding
❖ Segmentation: Isolate objects from the background (e.g., text in scanned documents).
❖ Noise Reduction: Remove low-intensity noise (e.g., salt-and-pepper noise).
❖ Feature Extraction: Highlight regions of interest (e.g., tumors in X-rays
255 𝑖𝑓 𝑓 (𝑥,𝑦)>𝑇
g (x, y) =├0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Where:
120 80 200
60 150 100
30 170 90
Assume/set Thresholding value to be, Threshold (T) = 100
Therefore, Output image will be black and white with intensity pixels
255 0 255
0 255 0
0 255 0
Limitations
❖ Struggles with periodic noise (frequency domain is better).
❖ Large kernels slow down processing.
❖ Noise Amplification Risk
Improper kernel selection can unintentionally increase noise instead of reducing it.
❖ Lacks Frequency Insight
These methods don’t provide spectral information, which limits their use in applications
like texture classification or compression.
5. REAL-WORLD APPLICATIONS
i. Instagram Filters: Gamma correction + contrast stretching.
ii. Autonomous Vehicles: Sobel/Prewitt filters for lane detection.
iii. Medical Imaging: Enhancing X-rays or MRI scans (e.g., image negatives, histogram
equalization).
iv. Satellite Imagery: Improving contrast for better geographical analysis.
v. Photography: Adjusting brightness and contrast using intensity transformations.
vi. Useful in Security Practices: Noise reduction for clearer surveillance footage.