1. Image Enhancement Fundamentals

Image enhancement is the process of manipulating an image so the result is more suitable than the original for a specific application.

Spatial Domain Methods

Spatial domain operations operate directly on the pixels of the image and can be reduced to the form:

g(x,y)=T[f(x,y)]

Where f(x,y) is the input image, g(x,y) is the processed image, and T is an operator defined over a specific neighborhood around (x,y) .

Point Processing

The simplest spatial domain operation occurs when the neighborhood is just the pixel itself (1×1). It takes the form:

s=T(r)

Where r is the original image pixel value, s is the processed image pixel value, and T is the transformation mapping .


2. Basic Intensity Transformation Functions

There are three basic types of mathematical functions used frequently for image enhancement: Linear, Logarithmic, and Power-Law .

A. Linear (Identity & Negative)

B. Logarithmic

C. Power-Law (Gamma)


3. Piecewise-Linear Transformation Functions

Unlike standard mathematical functions, piecewise linear functions can be arbitrarily complex, allowing for highly customized intensity mappings .

A. Contrast Stretching

Contrast is the difference between the minimum and maximum pixel intensity in an image . Low contrast can result from poor illumination, lack of dynamic range in the sensor, or wrong lens aperture settings .

Pasted image 20260227224343.png

B. Thresholding

Thresholding converts a grayscale image into a binary image by comparing every pixel to a specific threshold value m (or k) .

s={1If rm0If r<m

To see numerical examples, here

Summary

Transformation Type Mathematical Formula Behavior / Characteristics Primary Application
Image Negative (Linear) s=L1r Reverses the intensity levels of an image. Enhancing white or gray details embedded in large dark/black regions (e.g., medical X-rays).
Logarithmic s=c×log(1+r) Expands a narrow range of dark input values while compressing higher-level values. Revealing hidden details in images with massive dynamic ranges, like the Fourier spectrum.
Power-Law (Gamma) s=c×rγ Maps values based on an exponent.

γ<1: Lightens image (expands darks).

γ>1: Darkens image (expands brights).
Gamma Correction: Preconditioning images to display correctly on monitors that do not respond linearly to intensity.
Contrast Stretching (Piecewise-Linear) Inew=(IMin)NewMaxNewMinMaxMin+NewMin Stretches the original intensity range to span a new, wider target range (usually 0 to 255). Normalizing images with poor illumination or fixing low dynamic range sensor captures.
Thresholding (Piecewise-Linear) s=1 if rm



s=0 if r<m
Maps pixels above a threshold m to White (1/255) and below to Black (0). Binarizing an image to segment or isolate specific objects from the background.
(Note: r is the input intensity, s is the output intensity, L is the number of intensity levels, c is a scaling constant, and m is the threshold value).