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

Lecture 4

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

Lecture 4

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

DI GIT AL IMAGE P RO C ES S I NG

Lecture 4 7 :Image Segmentation


Image Segmentation: is subdivides an image into it constituent regions or
objects.
Segmentation should stop when the objects of interest in an application have
been isolated
Image segmentation algorithms generally are based on one of two basic
properties of intensity values:
1.Discontinuity: to partition an image based on sharp changes in intensity such
as points, lines, and edges in an image.
2.Similarity: to partition an image into regions those are similar according to a set
of predefined criteria ‫ معايير محددة مسبقا‬.
1. Detection of Discontinuities
The most common way to find a discontinuity in an image is by run a mask
through the image to points, lines, and edges in an image.

Detect the three basic types of gray-level discontinuities: points, lines, edges.
1.1 . Point Detection
The simple algorithm and mask based on the fact that the pixel itself is
distinguishable from surrounding pixels and that the surrounding pixels are
homogeneous ‫ متجانس‬, or nearly homogeneous, in intensity.
A pixel of this type is usually described as isolated. a point has been detected at
the location on which the mask is centered if
|𝑅| ≥ 𝑇 Where: T is a nonnegative threshold, R is the sum of products of the
coefficients.
Point detection mask

Example: find the point detection for the following image: 2 1 2


Solution: 1 2 1
2 1 2
1.2 Line Detection
Line detection is the process of detecting a line, or lines, in an image by applying
a mask to the image itself.
Horizontal mask will result with max response when a line passed through the
middle row of the mask with a constant background. The similar idea is used with
other masks.
Note: the preferred direction of each mask is weighted with a larger coefficient
(i.e.,2) than other possible directions.
Apply every mask on the image let R1, R2, R3, R4 denotes the response of the
𝒉𝒐𝒓𝒊𝒛𝒐𝒏𝒕𝒂𝒍,+𝟒𝟓°,𝒗𝒆𝒓𝒕𝒊𝒄𝒂𝒍 𝒂𝒏𝒅 −𝟒𝟓° masks, respectively.
((if, at a certain point in the image |Ri| > |Rj|, for all j # i, that point is said to be more
likely associated with a line in the direction of mask i ))
Alternatively, if we are interested in detecting all lines in an image in the direction
defined by a given mask, we simply run the mask through the image and threshold
the absolute value of the result.

2. Edge Detection
An edge is a set of connected pixels that lie on the boundary between two
regions.
Edges are significant local changes of intensity in an image.
Edge detection is by far the most common approach for detecting meaningful
discontinuities in intensity values.
Goals of Edge Detection
◼ Important features can be extracted from the edges of an image (e.g.,
corners, lines, curves).
◼ These features are used by higher-level computer vision algorithms (e.g.,
segmentation and recognition).
Edge Detection Methods : There are three edge detection methods:
1. Roberts Operator. 2. Sobel Operator . 3. Prewitt Operator
1. Roberts Operator: The Roberts edge detector uses the masks in below to
approximate digitally Gx, and Gy.

2. Sobel Operator : Looks for edges in both horizontal and vertical directions, then
combine the information into a single metric. The masks are as follows :
Example: find the edge detection for the following image by using Sobel operator

3. Prewitt Operator
Similar to the Sobel, with different mask coefficients

Example: find the edge detection for the


following image by using Prewitt operator
Thresholding:
Thresholding is the simplest method of image segmentation. From a grayscale image,
Thresholding can be used to create binary images. One obvious way to extract the
objects from the background is to select a threshold T that separates these modes.
Then any point (x,y) for which f(x,y) >=T is called an object point; otherwise, the point
is called a background point.
The simplest thresholding methods replace each pixel in an image with a black pixel if
the image intensity 𝐼𝑖,𝑖 is less than some fixed constant T (that is, 𝐼𝑖,𝑖<𝑇 ), or a
white pixel if the image intensity is greater than that constant.

Region Growing
Region growing is a simple region-based image segmentation method. It is also
classified as a pixel-based image segmentation method since it involves the selection
of initial seed points.
This approach to segmentation examines neighboring pixels of initial seed points and
determines whether the pixel neighbors should be added to the region. The process is
iterated on, in the same manner as general data clustering algorithms.
The basic approach is to start with a set of “seed ‫ ” بذرة‬points and from these grow
regions by appending ‫ إلحاق‬to each seed those neighboring pixels that have properties
similar to the seed (such as specific ranges of gray level or color).
The selection of similarity criteria depends not only on the problem under
consideration, but also on the type of image data available. ‫اختيار معايير التشابه ال يتوقف‬
‫ ولكن يتوقف على نوع بيانات الصورة المتاحة‬، ‫ على مشكلة قيد النظر فقط‬.

You might also like