0% found this document useful (0 votes)
10 views

Chapter 1

An image can be represented as a 2D array of pixel intensities. A digital image samples and quantizes a continuous image into discrete pixel values. Common image file formats include TIFF, JPEG, and PNG. Histograms show the distribution of pixel intensities in an image and are useful for image processing tasks like segmentation. Segmentation partitions an image into homogeneous regions. Region growing starts with seed pixels and groups similar neighboring pixels. Thresholding uses intensity thresholds to separate foreground and background. Split and merge recursively splits an image into subimages until regions are homogeneous, then merges similar adjacent regions.

Uploaded by

emma nagy
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Chapter 1

An image can be represented as a 2D array of pixel intensities. A digital image samples and quantizes a continuous image into discrete pixel values. Common image file formats include TIFF, JPEG, and PNG. Histograms show the distribution of pixel intensities in an image and are useful for image processing tasks like segmentation. Segmentation partitions an image into homogeneous regions. Region growing starts with seed pixels and groups similar neighboring pixels. Thresholding uses intensity thresholds to separate foreground and background. Split and merge recursively splits an image into subimages until regions are homogeneous, then merges similar adjacent regions.

Uploaded by

emma nagy
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

What is an Image?

Imaging System is as
An image can be thought of as a function with
resulting values of the light intensity at each
point over a planar region.

▪ 2‐dimensional matrix of
Intensity (gray or color)
values
▪ Digital image: discrete
samples f [x,y]
representing continuous
image f (x,y) . Each
element of the 2-d array
f [x,y] is called a pixel
Digital Image?

Digitization causes a
digital image to become
an approximation of a
real scene
• Image (Spatial) Sampling
A digital sensor can only measure a limited number
of
samples at a discrete set of energy levels
• Quantization: process of converting continuous
analog
signal into its digital representation
• Discretize image I(u,v) values
• Limit values image can take
Representing Images

Image data structure is 2D


array of pixel values
Pixel values are gray levels in
range 0‐255 or RGB colors
Array values can be any data
type (bit, byte, int, float,
double, etc.)
Hundreds of image file formats. Examples
Tagged Image File Format (TIFF)
Graphics Interchange Format (GIF)
Portable Network Graphics (PNG)
Image File JPEG, BMP, Portable Bitmap Format (PBM), etc
Formats Image pixel values can be
Grayscale: 0 – 255 range
Binary: 0 or 1
Color: RGB colors in 0‐255 range (or other color
model)
Application specific (e.g. floating point values
in astronomy)
Colour Image
Video :frame
by frame

30 framed per
second
Contrast
Stretching
❑Low contrast images occur often
due to poor or non uniform lighting
conditions, or due to nonlinearity, or
small dynamic range of the imaging
sensor.
❑Purpose of contrast stretching is
to process such images so that the
dynamic range of the image will be
very high, so that different details in
the objects present in the image will
be clearly visible.
❑ Contrast stretching process
expands dynamic range of intensity
levels in an image so that it spans
the full intensity range of the
recording medium or display
devices
Image Histograms
The histogram of an image shows us the distribution of grey levels in the
image. Massively useful in image processing, especially in segmentation.
Frequencies

Grey Levels
Image Histograms

Histograms plots how many times (frequency) each


intensity value in image occurs
Image Histograms Normalized histogram

The histogram of a digital image with Dividing each of its values by the total
gray levels in the range [0, L-1] is a number of pixels in the image (n).
discrete function p(rk) = nk/ n
h (rk) = nk
rk: the kth gray level For k = 0,1,……, L-1.
nk: the number of pixels in the image p(rk): Gives an estimate of the
having gray level rk probability of occurrence of gray level
rk.
The sum of all components of a
normalized histogram is equal to 1.
Histogram
Examples (cont…)
• A selection of images and
their histograms
• Notice the relationships
between the images and
their histograms
• Note that the high contrast
image has the most
evenly spaced histogram
Histogram equalization based on a histogram obtained from a portion of the image

Limit contrast expansion in flat regions of the image,


e.g., by clipping histogram values.
(“Contrast-limited adaptive histogram equalization”)
Image Histograms
• Different images can have same histogram
• 3 images below have same histogram

• Half of pixels are gray, half are white


- Same histogram = same statistics
- Distribution of intensities could be different
• Can we reconstruct image from histogram? NO
Histogram Equalization
The formula for histogram
equalisation is given where
Spreading out the frequencies in an image rk: input intensity
sk: processed intensity
(or equalising the image) is a simple way to k: the intensity range
improve dark or washed out images (e.g 0.0 – 1.0)
n j: the frequency of intensity j
Can be expressed as a transformation of hi n: the sum of all frequencies
stogram
Where: sk = T ( rk )
k
• rk: input intensity
=  pr ( r j )
• sk: processed intensity j =1
• k: the intensity range k nj
(e.g 0.0 – 1.0) =
j =1 n
A selection of images and
their histograms
Notice the relationships
between the images and
their histograms
Note that the high contrast
image has the most
evenly spaced histogram
❑A segmentation is a partition of an image I into
❑a set of regions S satisfying:

Image 1.  Si = S Partition covers the whole image.


Segmentation 2. Si  Sj = , i  j No regions intersect.
3.  Si, P(Si) = true Homogeneity predicate is
satisfied by each region.
❑4. P(Si  Sj) = false, Union of adjacent regions
i  j, Si adjacent Sj does not satisfy it.
Region growing
The fundamental drawback of histogram-based region detection is that
histograms provide no spatial information (only the distribution of gray levels)

Region-growing approaches exploit the important fact that pixels which are close
together have similar gray values

Region growing techniques start with one pixel of a potential region and try to grow
it by adding adjacent pixels till the pixels being compared are too dissimilar
1. Choose the seed pixels (one for every
segment).The first pixel selected can be
Region just the first unlabeled pixel in the image
or a set of seed pixels can be chosen from
growing in a the image
brief… 2. Check the neighboring pixels and add
them to the region if they are similar to
the seed

3. Repeat step 2 for each of the newly added


pixels; stop if no more pixels can be
added
Thresholding
o Bi-level thresholding is
employed on images
which have bimodal
histograms.
o In bi-level thresholding,
the object and background
form two different groups
with distinct gray levels.
Multilevel Thresholding
A simple
iterative
algorithm for
threshold
selection in a
bimodal image
Split and Merge

1. Split (& merge) starts from the assumption that the entire image is homogeneous

2. If this is not true (by the homogeneity criterion), the image is split into four sub images

3. This split is repeated until no further splitting is possible

4. Merging phase: If 2 adjacent regions are homogenous, they are merged

5. Repeat step 4 until no further merging is possible


Split and Merge
Since the procedure is recursive, it produces an image representation that can be
described by a tree whose nodes have four sons each
*Such a tree is called a
‘Quadtree’. Therefore split is also
known as ‘quadtree segmentation’

You might also like