Part 1: Intensity Transformations (Point Processing)

These techniques operate on a single pixel (1×1 neighborhood) at a time, mapping an input intensity r to an output intensity s.

Technique / Filter Category Mathematical Concept / Mechanism Primary Purpose / Application
Image Negative Linear s=L1r Reverses intensity levels. Used to enhance white/gray details embedded in large dark regions (e.g., medical X-rays).
Log Transformation Logarithmic s=c×log(1+r) Expands a narrow range of dark input values while compressing higher-level values. Used to reveal hidden details (e.g., Fourier spectrum).
Power-Law (Gamma) Exponential s=c×rγ Lightens (γ<1) or darkens (γ>1) an image. Used for Gamma Correction to fix nonlinear monitor displays.
Contrast Stretching (Min-Max) Piecewise-Linear Inew=(IMin)NewMaxNewMinMaxMin+NewMin Stretches a narrow intensity range to span a wider target range. Used to normalize images with poor illumination.
Thresholding Piecewise-Linear s=1 if rm, else s=0 Converts grayscale to binary (black and white) based on a threshold m. Used for image segmentation.
Intensity-Level Slicing Piecewise-Linear Highlights a specific range of intensities [A,B]. Can either set all other pixels to black (binary mapping) or preserve their original values. Highlighting specific features of interest, such as masses in medical X-rays or bodies of water in satellite imagery.
Bit-Plane Slicing Bitwise / Piecewise Decomposes an 8-bit image into 8 binary planes (Bit 0 to Bit 7). The Most Significant Bit (MSB, Bit 7) contains the most visual data; the LSB (Bit 0) looks like noise. Analyzing the importance of bits for image compression and steganography (hiding data in the LSB).
Histogram Equalization Statistical / Global sk=(L1)j=0kpr(rj)



(Maps pixels using the Cumulative Distribution Function of the histogram).
Fully automatic contrast enhancement. Spreads out the most frequent intensity values to create a "flat" histogram, maximizing dynamic range.

Part 2: Smoothing Spatial Filters (Neighborhood Processing)

These filters use a moving mask (e.g., 3×3) to calculate a new value for the center pixel based on its surrounding neighbors. Their main goal is noise reduction and blurring.

Technique / Filter Category Concept Primary Purpose / Application Kernel Matrix (Mask) Example
Box Filter (Averaging) Linear Spatial All mask coefficients are equal (e.g., all 1s, divided by 9). Replaces center pixel with the neighborhood average. Blurring an image and reducing random noise.

Drawback: Causes significant blurring of edges.
19[111111111]
Weighted Average Linear Spatial Center mask coefficients have higher values than outer ones. Smoothes the image while preserving slightly more detail/edges compared to a standard box filter. 116[121242121]
Median Filter Order-Statistic (Nonlinear) Replaces the center pixel with the median value of the neighborhood. Excellent for removing impulse noise (salt-and-pepper noise) with considerably less blurring than linear filters. N/A (Uses Sorting/Ranking)
Max Filter Order-Statistic (Nonlinear) Replaces the center pixel with the maximum value of the neighborhood. Finds the brightest points in an image; effectively removes "pepper" (dark) noise. N/A (Uses Sorting/Ranking)
Min Filter Order-Statistic (Nonlinear) Replaces the center pixel with the minimum value of the neighborhood. Finds the darkest points in an image; effectively removes "salt" (bright) noise. N/A (Uses Sorting/Ranking)

Part 3: Sharpening Spatial Filters (Neighborhood Processing)

These filters use spatial differentiation to highlight rapid transitions in intensity, effectively sharpening edges and fine details.

Technique / Filter Category Concept / Math Primary Purpose / Application Kernel Matrix (Mask) Example
Laplacian Filter Linear Spatial (2nd Derivative) Isotropic mask (e.g., center 4 or 8, surrounded by 1s). 2f=2fx2+2fy2 Highlights fine details and rapid intensity transitions. The result is usually added back to the original image to restore background tones. [010141010] or

[111181111]

(for composite, add 1 or -1 depending on center)
Unsharp Masking Image Arithmetic g(x,y)=f(x,y)+[f(x,y)f¯(x,y)] Subtracts a blurred version of the image from the original to create an edge mask, which is then added back to sharpen the image. N/A (Subtracts a blurred image from the original)
Highboost Filtering
Image Arithmetic g(x,y)=f(x,y)+k×[f(x,y)f¯(x,y)] Similar to Unsharp Masking, but multiplies the edge mask by a weight k>1 to drastically increase the contribution of the edges. N/A (Uses Unsharp mask logic with a multiplier k>1)
Roberts Cross-Gradient
Nonlinear Spatial (1st Derivative) Uses 2×2 masks to compute diagonal differences. Extracts edges by calculating the gradient magnitude. Very sensitive to noise due to its small mask size. Gx=[1001]




Gy=[0110]
Sobel Operator Nonlinear Spatial (1st Derivative) Uses 3×3 masks to compute horizontal (Gx) and vertical (Gy) changes. Extracts edges. Provides a slight smoothing effect due to the 3×3 size, making it less sensitive to noise than Roberts. Gx=[121000121]




Gy=[101202101]