Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
25 views23 pages

Unit 4

The document discusses the concept of Region of Interest (ROI) selection in image processing, defining it as a specific part of an image analyzed separately. It categorizes ROI selection techniques into manual and automatic methods, detailing various techniques such as contour detection, template matching, and deep learning solutions. Additionally, it covers feature extraction methods, including histogram-based features, color features, and texture descriptors, as well as image compression techniques, distinguishing between lossless and lossy compression methods.

Uploaded by

tyagih682
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views23 pages

Unit 4

The document discusses the concept of Region of Interest (ROI) selection in image processing, defining it as a specific part of an image analyzed separately. It categorizes ROI selection techniques into manual and automatic methods, detailing various techniques such as contour detection, template matching, and deep learning solutions. Additionally, it covers feature extraction methods, including histogram-based features, color features, and texture descriptors, as well as image compression techniques, distinguishing between lossless and lossy compression methods.

Uploaded by

tyagih682
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

1.

Region of Interest (ROI) Selec on

Defini on:

 ROI is a specific part of an image that draws a en on and is typically analyzed separately
from the rest of the image.

 It is useful when we need to focus on a par cular area rather than processing the full
image.

Examples:

 Iden fying a face in an image for facial recogni on.

 Detec ng a car in a surveillance image.

2. ROI Selec on Techniques

ROI selec on can be categorized into two types:

A. Manual ROI Selec on

 Defini on: User manually selects the area of interest using tools such as bounding
boxes, polygons, freehand drawing, or circles.

 Process:

o The user draws a boundary around the desired region.

o The selected region is extracted for further processing.

 Bounding Box:

o Defined by its top-le corner (x1,y1) and bo om-right corner (x2,y2).

o Pixels inside the ROI sa sfy the condi on: x1≤x≤x2 and y1≤y≤y2

 Advantages:

o Simple.

o Suitable for small datasets or specific applica ons.

 Limita ons:

o Not scalable for large datasets.


o Subjec ve and prone to human error.

B. Automa c ROI Selec on

 Automa c methods remove the need for manual interac on by selec ng ROIs based on
certain criteria.

 Techniques include:

1. Contour Detec on

 Contours detect object boundaries by iden fying regions with high intensity varia ons.

 Applica on: Used in object tracking and shape analysis.

2. Template Matching

 Searches for a template within the image by sliding the template across different
regions.

 Process:

o A predefined template is matched with different parts of the image.

o The best match is iden fied based on similarity measures (e.g., cross-
correla on).

 Applica on: Face or object detec on in fixed templates.

3. Deep Learning-based Solu ons

 Uses neural networks or CNN models to automa cally iden fy and classify regions.

 Applica on: Object detec on, segmenta on, and classifica on tasks.

Threshold-based ROI Selec on


Edge Detec on-based ROI Selec on

Where:

 I → Intensity func on of the image.

 x,y → Coordinates of the pixel.

 ΔG gives the strength of the edge at a particular point.


 High values of ΔG indicate a strong edge, while low values indicate smooth regions.
Region Growing

Clustering Based ROI Selec on


Graph Based ROI

Normalized Cut (N-cut) is a technique used to par on the graph into two disjoint regions,
minimizing the connec on between the regions while maximizing the connec on within the
regions.

Purpose of Normalized Cut:

 It minimizes the total connec on (or similarity) between different regions, ensuring that
the resul ng segments are well-separated and meaningful.

 N-cut aims to find the op mal par oning that minimizes the connec on between the
segments.
Applica ons:

 Image segmenta on and object detec on.

 Medical imaging for iden fying tumors or regions of interest.

 Clustering and par oning large datasets.

Feature Extrac on
 Defini on: Feature extrac on is a crucial step in image processing that extracts
meaningful informa on from an image to represent its content effec vely.

 Purpose: It reduces the dimensionality of data while retaining essen al informa on.

i) Histogram-Based Features

k is typically used to denote intensity levels from the set L={0,1,2,…,255}., while H(k) is the
histogram value for the intensity level k.
ii) Features Derived from Histograms
ii) Color Features:

 Defini on: Color features describe the distribu on and proper es of color in an image.
These features are extracted for each color channel (e.g., Red, Green, Blue).

Color Histogram:

iii) Color Moments:


Ques:

Color Histogram Calcula on:

Mean Intensity Calcula on:


iv) Shape Feature Proper es:

Area:

 Defini on: The total number of object pixels (usually represented by 1s) in the image.

 Formula: Area=Count of 1s in the object

Perimeter:

 Defini on: The total number of boundary pixels (pixels that define the object’s outer
boundary).

 Formula:

Perimeter=Count of pixels forming the boundary.

Compactness:

 Defini on: It describes how compact or spread out the object is.

 Formula:

Compactness=Perimeter2/Area

Circularity:
1 → Object pixels

0 → Background pixels

(v) Local Binary Pa ern (LBP)

LBP is a texture descriptor that captures local pa erns in an image.


Example of LBP Calcula on

Hence LBP Value:


LBP=250

vi) Texture Descriptors: Grey Level Co-occurrence Matrix (GLCM)

GLCM is a sta s cal texture descriptor that captures spa al rela onships between pixel
intensi es.

Mathema cal Formula on:


Where:

 i,j = intensity levels

Features Derived from GLCM

Contrast:

Energy:

Homogeneity

Measures uniformity of the texture.

Higher value indicates smoother texture.

Correla on
 Measures how correlated pixel values are in the image.
 μi, μj are the mean values of the row and column.
 σi, σj are the standard devia ons of the row and column.

Given the following grayscale image with intensity levels 0, 1, 2, 3:

Compute the Grey Level Co-occurrence Matrix (GLCM) for a given distance d = 1 and angle θ =
0° (horizontal adjacency).

Step 1: Define Parameters for GLCM Computa on

We calculate GLCM for:

 Distance (d) = 1

 Angle (θ) = 0° (Horizontal Adjacency)

This means we consider pixel pairs (i, j) where:

 i = intensity of a pixel

 j = intensity of the pixel immediately to its right


Step 2: Extrac ng Adjacent Horizontal Pairs

We go row by row and extract adjacent horizontal pixel pairs.

Row 1:

[0,0,1,1]

Pairs: (0,0), (0,1), (1,1)

Row 2:

[0,0,1,1]

Pairs: (0,0), (0,1), (1,1)

Row 3:

[0,2,2,2]

Pairs: (0,2), (2,2), (2,2)

Row 4:

[2,2,3,3]

Pairs: (2,2), (2,3), (3,3)

Step 4: Coun ng Co-Occurrence Pairs

Now, we count how many mes each (i, j) pair appears.

Pair (i, j) Count

(0, 0) 2

(0, 1) 2

(0, 2) 1

(1, 1) 2

(2, 2) 3

(2, 3) 1

(3, 3) 1
Step 5: Construct the GLCM Matrix

Since intensity levels are 0, 1, 2, 3, the GLCM matrix is 4×4, and we fill it with the counts:

Step 6: Normalize the GLCM

Total number of pairs = sum of all elements =

2+2+1+0+0+2+0+0+0+0+3+1+0+0+0+1=12

We normalize by dividing each element by 12:


Image Compression

Image Compression is the process of reducing the size of an image file while preserving its visual
quality or ensuring that loss of quality is acceptable for intended applica ons. Compression is
essen al for efficient storage, transmission, and processing of images. It can be classified into
two categories:

1. Error-Free (Lossless) Compression

2. Lossy Compression

Lossless (Error-Free) Compression:

It reduces file size without losing any informa on. These methods exploit redundancies in image
data, such as spa al redundancy (correla on between neighboring pixels) and coding
redundancy.

Variable Length Coding – (Huffman Coding)

It assigns shorter binary codes to more frequently occurring symbols and longer codes to less
frequent ones. The process begins with calcula ng symbol probabili es, then construc ng a
binary tree by itera vely combining the two least probable symbols. Codes are assigned by
traversing the tree, with le branches as 0 and right branches as 1.

This method achieves a compression ra o of 1.5:1 to 3:1 and approaches the entropy limit
when symbol probabili es are inverse powers of two.

You might also like