computer vision

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

21AI601 – COMPUTER VISION

UNIT II & LP 10 – IMAGE SEGMENTATION, TEXTURE


SEGMENTATION, OBJECT DETECTION

1. IMAGE SEGMENTATION
• Segmentation subdivides an image into its constituent regions or objects until the
objects of interest in an application have been objects, until the objects of interest in an
application have been isolated.
• The goal of image segmentation is to cluster pixels into salient image regions, i.e.,
regions corresponding to individual surfaces, objects, or natural parts of objects.
• A segmentation could be used for object recognition, occlusion boundary estimation
within motion or stereo systems, image compression, image editing, or image database
look-up.
• We consider bottom-up image segmentation. That is, we ignore (top- down)
contributions from object recognition in the segmentation pro- cess.
• For input we primarily consider image brightness here, although simi- lar techniques
can be used with colour, motion, and/or stereo disparity information.
• Segmentations of simple gray-level images can provide useful infor- mation about the
surfaces in the scene.
• Note, unlike edge images, these boundaries delimit disjoint image re- gions (i.e. they
are closed).
Example Segmentations

Segmentation conditions
1.1 Two Principal Approaches
1.1.1 Region-based segmentation
Partition an image into regions that are similar according to a set of predefined criteria. The main goal of
segmentation is to partition an image into regions. Some segmentation methods such as thresholding
achieve this goal by looking for the boundaries between regions based on discontinuities in grayscale or
color properties. Region-based segmentation is a technique for determining the region directly.
1.1.1.2 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. A general discussion of the region growing
algorithm is described below.
• The first step in region growing is to select a set of seed points. Seed point selection is based on
some user criterion (for example, pixels in a certain grayscale range, pixels evenly spaced on a
grid, etc.). The initial region begins as the exact location of these seeds.

• The regions are then grown from these seed points to adjacent points depending on a region
membership criterion. The criterion could be, for example, pixel intensity, grayscale texture, or
colour.

Since the regions are grown on the basis of the criterion, the image information itself is important. For
example, if the criterion were a pixel intensity threshold value, knowledge of the histogram of the image
would be of use, as one could use it to determine a suitable threshold value for the region membership
criterion.
One can use 4-connected neighborhood to grow from the seed points. An alternative for pixels
adjacent relationship is the 8-connected neighborhood. Pixels adjacent to the seed points are examined
and classified into the seed points if they have the same intensity value. It is an iterated process until there
are no change in two successive iterative stages. Other criteria can be chosen; the main goal is to classify
the similarity of the image into regions.
Advantages
• Can correctly separate the regions that have the same properties we define.
• Can provide the original images which have clear edges with good segmentation results.
• Simple concept: only need a small number of seed points to represent the property we want, then
grow the region.
• Can determine the seed points and the criteria we want to make.
• Can choose the multiple criteria at the same time.
• Theoretical very efficient due to visiting each pixel by a limited bound of times.
Disadvantages
• Unless image has had a threshold function applied, a continuous path of points related to color
may exist, which connects any two points in the image.
• Practically random memory access slows down the algorithm, so adaption might be needed
1.1.2 Edge-based segmentation
Partition an image based on abrupt changes in intensity (edges).
1.1.2.1 Graph-Cut Segmentation
Graph cut optimization can be employed to efficiently solve a wide variety of low-level computer vision
problems, such as image smoothing, the stereo correspondence problem, image segmentation, object co-
segmentation, and many other computer vision problems that can be formulated in terms of energy
minimization. Many of these energy minimization problems can be approximated by solving a
maximum flow problem in a graph (and thus, by the max-flow min-cut theorem, define a minimal cut
of the graph). Under most formulations of such problems in computer vision, the minimum energy
solution corresponds to the maximum a posteriori estimate of a solution. Graph-cut is an algorithm that
finds a globally optimal segmentation solution. Also know as Min-cut.

1.2 MORPHOLOGICAL PRINCIPLES OF SEGMENTATION


Morphological segmentation is a technique used in image processing to divide an image into
meaningful regions. It relies on the shape and structure of objects in an image, rather than just their
intensity values. This makes it a powerful tool for segmenting images that contain complex objects or
that have uneven lighting.

There are several morphological principles that are used in segmentation. These include:
• Set Theory
• Structuring Element
• Erosion and Dilation
• Opening and Closing

Morphological segmentation controls set theory concepts to analyze and segment images based on the
shape and structure of objects. Here's a breakdown of the key principles involved:

1. Set Theory Foundations:

• Images are represented as sets, where each pixel is an element.


• Binary images: Pixels belong to either the object (foreground) or background. Values are
typically 1 (object) and 0 (background).
• It emphasizes the foundations of morphological operations on set theoretic manipulations of
pixels.

2. Structuring Element (SE):

• A small, predefined shape (square, disk, cross, etc.) used to probe the image.
• The origin of the SE acts as the reference point during operations.
• Explains the importance of structuring element as the tools used to interact with the image.

3. Erosion:

• Shrinks objects in the image by removing pixels at boundaries.


• For a pixel to be retained in the eroded image, the SE, centered on that pixel, must completely
fit within the foreground (object) of the original image.
• In set theory terms: Eroded image = Original image INTERSECTION (complement of SE).

4. Dilation:

• Expands objects in the image by adding pixels to boundaries.


• A pixel is included in the dilated image if the SE, centered on that pixel, overlaps the foreground
(object) in the original image at least once.
• Set theory representation: Dilated image = Original image UNION SE.
5. Opening:

• "Cleans" the object by removing thin protrusions and isolating foreground objects.
• Performed sequentially: erosion followed by dilation with the same SE.
• Removes objects smaller than the SE and thins narrow connections between objects.
• Set theory: Opened image = (Original image ERODED by SE) DILATED by SE.

6. Closing:

• Fills small holes inside objects and connects nearby objects.


• Performed sequentially: dilation followed by erosion with the same SE.
• Connects close objects and removes small background objects smaller than the SE.
• Set theory: Closed image = (Original image DILATED by SE) ERODED by SE.

By combining these basic operations and choosing appropriate SE shapes, you can achieve various
segmentation tasks, like:

• Removing noise or small objects (opening)


• Filling holes in objects (closing)
• Separating touching objects (opening with specific SE)
• Extracting specific shapes (erosion and dilation with tailored SE)

You might also like