DIP UNIT 3 (Segment, Compress)
DIP UNIT 3 (Segment, Compress)
Image Segmentation,
Image Compression
Image Segmentation
• It is a process of partitioning the image into
homogeneous pixels based on some criteria.
Boundary Approach
Region Approach
• Regions in an image are a group of
connected pixels with similar properties.
Splitting Merging
IMAGE SEGMENTATION BASED ON
THRESHOLDING
• Thresholding techniques produce segments
having pixels with similar intensities.
• …. θ is threshold value
• Causes of Edges:
– shadows, texture, geometry, etc.
– discontinuities in the image intensity due to changes
in the image structure.
– Edge points are boundaries of objects and
background.
Edge Detection Using First-order and
Second-order Derivatives
Consider two regions having transitions in intensity
1.from dark to bright to dark
2.from bright to dark to bright
• The first derivative values are shown;
• 1st derivative is positive at the leading edge means
transition from dark to bright and vise versa
• Second derivative is positive on the darker side of
the edge and negative on the brighter side.
• First order derivative can be calculated using the
Gradient Operator. Where as second order derivative
using the Laplacian.
• The gradient of image f(x,y) at location (x,y) is defined
by the vector,
𝜕𝑓
𝐺𝑥 𝜕𝑥
• 𝛻𝑓 = 𝐺𝑦
= 𝜕𝑓 ∴ 𝜵𝒇 ≈ 𝑮𝒙 + 𝑮𝒚
𝜕𝑦
𝜕𝑓
• = 𝐺𝑥 = 𝑓 𝑥 + 1, 𝑦 − 𝑓(𝑥, 𝑦)
𝜕𝑥
𝜕𝑓
• = 𝐺𝑦 = 𝑓 𝑥, 𝑦 + 1 − 𝑓(𝑥, 𝑦)
𝜕𝑦
Gives averaging effect
So noise is reduced.
• and
Statistical Psychovisual
Interpixel Coding
Spatial Temporal
Statistical Redundancy
• Interpixel Redundancy
• If in an image neighbouring pixel values are
related to each other, i.e. neighboring pixels are
not statistically independent.
• Coding redundancy
• In an image the information is represented in the
form of codes. Choosing efficient codes may
reduce image size.
Spatial Redundancy
• 2D Run-length Coding
• utilising correlation between pixels in neighboring
scan lines to achieve higher coding efficiency.
HUFFMAN CODING