Lecture
NOTE: For the log function, the reason as to why we are adding 1 to r is due to the fact that if log(0), then it would be undefined.
Recall from last lecture (Intensity Transformation):
Formula for intensity transformation (or point processing): $s = T(r)$
Formula for Image Negatives: $s = (L-1)-r$
Formula for Log Transformation: $s = clog(1 + r)$
Power Law (Gamma) Transformation
Formula is: $ s = cr^\gamma $ or $ s = c(r + \epsilon)^\gamma$ for $c > 0$ and $\gamma > 0$ and s and r are scaled to $[0, 1]$
Conditions to consider:
- If $\gamma < 1$: Enhance dark areas
- If $\gamma > 1$: Enhance bright areas
- If $\gamma = c = 1$: Identity transformation
Application that use Power Law (Gamma) Transformation
CRT Screens In terms of CRT screens/monitors, they must have their gammas be corrected. CRT monitors have a gammer response between 1.8 to 2.5–this would result to having images being darker than intended. To correct the gammas of CRTs, an inverse gamma transformation is applied $(s = cr^{1/\gamma})$
- Identity - no change within an image (linear line).
- Negative - light areas are converted to dark (inverted linear line).
- Log - enhances details of dark areas in an image (inverted exponential function).
- Inverse Log - reduces dominance of bright areas to balance the overall exposure (exponential function).
- Gamma - overall brightness for an image is adjusted using a non-linear transformation, which is controlled by a gamma value.
NOTE: REMEMBER THESE
Piecewise Linear Transformation Functions
There are four transformations:
- Global Transformations - uniformly applies a single formula to all pixel values.
- Piecewise Lienar Transformations - different linear adjustments are applied across specific intensity segments
- Complexity - a more detailed process–focuses on specific areas.
- Ideal Use Cases - enhances images w/ bright and dark areas.
NOTE: Piecewise basically just applies to a specific range/group of pixels.
Contrast Stretching:
Basically stretches a range of intensity levels to improve contrast.
What is an artifact?
- It is a type of noise
The function for contract stretching must be increasing so artifacts won’t be present.
Conditions to consider for contrast stretching:
- If r1 = s1 and r2 = s2, then there is no change (basically an identity)
- If r1 = r2 and s1 = 0, s2 = L-1, then there are various degrees of spread in gray levels. _|- (this is basically saying there is a jump in intensity levels lol)
- If r1 <= r2 and s1 <= s2, then it is single valued and monotonically increasing.
Intensity-Level Slicing:
Technique that is used in DIP that enhances a specific range of intensities.
The ranges $[A, B]$ will have their ranges changed. For example, imagine a linear line, where each point (x, y) == x = y. The points within the ranges $[A, B]$ will have their values changed, and the others left untouched.
Bit-Plane Slicing:
It is a technique that divides an image into a series of binary images (For example, an 8-bit image being separated into 8 1-bit images) where each image represets one-bit level in the pixel intensity representation.
To separate the individual sliced images, refer to the columns. Basically, the total number of columns determine the number of images.
Uses for Bit-plane slicing:
- highlights different components of an image
- compression and watermarking
- enhancement and extraction
Histograms
Plots the frequency of each intensity value in an image (counts the number of times each intensity value occurs).
Intensity Levels in an image: The intensity level of an image is represented by $r_k$ for k = 0, 1, 2, … , L-1 L levels in total for image f(x,y)
Ex: For an 8-bit image, there are 0-255 bits. Therefore, L-1 = 255
Unnormalized Histogram: Basically counts the pixel occurrence by intensity
Is defined as $h(r_k) = n_k$, where $n_k$ is the number of pixels with intensity $r_k$.
Normalized Histogram: Represents the probability of intensity occurrence. Total number of pixels is M x N
Histogram Processing
The intensity level of k is represented by the sum of probabilities of k.
Histogram Equalization
In digital image processing, it can be categorized into two types:
- Discrete - Standard in DIP–pixel’s intensity values are discrete
- Continuous - Used in theory and simulations–data is not discrete; however, there is a specific range of values.
For discrete cases, it requires the use of probabilities and summations; continuous cases requires the use of probability densities and integration.
Readings
Summary (LECTURE 5/6)
Intensity Transformation Formulas:
- Intensity transformation (point processing): $s = T(r)$
- Image Negatives: $s = (L-1)-r$
- Log Transformation: $s = clog(1+r)$
Power Law (Gamma) Transformation
General formula is $s = cr^{\gamma}$ or $s = c(r+\epsilon)^{\gamma}$ if $c > 0$ and $\gamma > 0$ where $s$ and $r$ are scaled to $[0,1]$
Conditions to consider:
- If $\gamma < 1$, enhance dark areas
- If $\gamma > 1$, enhance bright areas
- If $\gamma = c = 1$, it is an identity transformation
IMPORTANT TO REMEMBER:
- Identity - no change in image (linear line, y=x)
- Negative - light areas converted into dark (inverted linear line)
- Log - enhances details of dark areas in an image (inverted exponential function)
- Inverse Log - reduces dominance of bright areas to balance overall exposure (exponential function)
- Gamma - overall brightness of image is adjusted using non-linear transformation controlled by a gamma value
Piecewise Linear Transformation Functions
- Global Transformation - uniformly applies single formula to all pixel values
- Piecewise Linear Transformation - different linear adjustments applied across specific intensity segments
- Complexity - more detailed process that focuses on specific areas
- Ideal Use Case - enhance images w/ bright and dark areas.
Contrast Stretching
Stretches a range of intensity levels to improve contrast.
Function for constrast stretching must be increasing so artifacts won’t be present.
ARTIFACT: A TYPE OF NOISE
Conditions for contrast stretching:
- $r1 = s1$, $r2 = s2$, then identity (no change)
- $r1 = r2$, $s1 = 0$, $s2 = L-1$, then there are various degrees of spread in gray levels.
- $r1 \leq r2$, $s1 \leq s2$, then single valued and monotonically increasing
Intensity-level Slicing
Enhances specific range of intensities at $[A,B]$.
Bit-plane Slicing
Divides an image into a series of binary images–each binary image represents one-bit level in the pixel intensity representation.
NOTE: total number of columns determine number of binary images
The first (or rightmost) bit of an intensity value at each pixel is the least significant bit
The last (or leftmost) bit of an intensity value at each pixel is the most significant bit
Useful for:
- highlighting different components of an image
- compression and watermarking
- enhancement and extraction
Histograms
Plots frequency of each intensity value in an image (basically counts the number of times each intensity value occurs).
Histogram Processing
Intensity level of $k$ is represented by the sum of probabilities of $k$.
Intensity Levels in an image: Total number of intensity levels for image $f(x,y)$ is represented using $r_k$, for $k = 0, 1, 2, … L-1$
EXAMPLE: For an 8-bit image, there are 0-255 bits, so L-1 = 255
Unnormalized Histogram: Counts the pixel occurrenec by intensity
Normalized Histogram: Represents probability of intensity occurrence. Total number of pixels is $M x N$
Histogram Equalization
It is categorized into two types:
- Discrete
- Continuous
For discrete cases, it requires probablities and summation; continuous requires probability densities and integration.