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

CH7 Representation & Description

The document discusses representation and description techniques in machine vision and object recognition systems. It describes how to represent an object's shape using chain codes and how to describe object properties and characteristics using features like area, perimeter, moments and histograms. Examples are given to demonstrate calculating features and chain codes for different shapes.

Uploaded by

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

CH7 Representation & Description

The document discusses representation and description techniques in machine vision and object recognition systems. It describes how to represent an object's shape using chain codes and how to describe object properties and characteristics using features like area, perimeter, moments and histograms. Examples are given to demonstrate calculating features and chain codes for different shapes.

Uploaded by

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

CHAPTER 7

Representation & Description

Eng. Hamza Hassan Karshe


Faculty of Mechanical Engineering
SOMALI NATIONAL UNIVERSITY
Gaheyr Campus
Images taken from:
R. Gonzalez and R. Woods. Digital Image Processing, Prentice Hall, 2008.
Digital Image Processing course by Brian Mac Namee, Dublin Institute of Technology.
MACHINE VISION
CONTENTS

 Object Recognition
 How to represent an object shape?

 Feature Extraction
 How to describe the object
properties/characteristic?
OBJECT RECOGNITION
 Object recognition systems find objects in the
real world from an image of the world.

 Object recognition can be defined as a labeling


problem based on models of known objects.
OBJECT RECOGNITION
The next step in Machine Vision is the Object
Recognition. This problem is accomplished using the
extracted feature information.
The object recognition algorithm is to be powerful and
fast so that the required object is uniquely
recognized. There are mainly two methods
(a) Template matching technique
A template is provided to computer and the
computer is trained to match the object with the
template irrespective of object orientation.
(b) Structural technique
Several structural techniques are available. These
may take the features also in to account. We
discuss a common method.
CHAIN CODES
• Used to represent a boundary by a connected sequence of
straight-line segments of specified length and direction.
• Directions are quantized into one of four/ eight directions.
• CHAIN CODE. Here there are two approaches
(a) 4-Directional Chain Code
(b) 8 Directional Chain code 2
1 3 1

2 0 4 0

5 7
3
6
4-directional 8-directional
converter converter
• These codes are also known as Freeman chain codes.
• Are used for the description of pixel border
• Local information of the objects can be obtained from the chain
code
– E.g. where image border turns 90 degrees etc.
• Follow a clockwise direction and assigning a direction to the
segments connecting every pair of pixels.
• The chain code of a boundary depends on the starting point.
• Unacceptable for 2 principal reasons;
1) The resulting chain code tends to be quite long
2) Any small disturbance along the boundary due to noise or
imperfect segmentation cause changes in the code that may not
be related to the principal shape features of the boundary.
Example 1:
2
3 1
1

4 0
2 0

5
3 7
6
4-directional 8-directional
converter converter
OBJECT Start with the start point and go along
START the arrows
Comparing the boundary of object with
respect to 4-directional chain code
converter, we get
Chain code of Object: 03032211
Difference Code:

• The code can be normalized with respect to the


starting point by a straightforward procedure.

- by using the first difference of the chain code instead


of the code itself.
- counting the number of direction changes (in a
counterclockwise direction) that separate 2 adjacent
elements of the code.
Example 2 (4-directional Chain Code):

CHAIN CODE : 03032211


We then get the difference;
Difference between 0 and 3 is 3 (ref 4 direc. converter)
Difference between 3 and 0 is 1
Difference between 0 and 3 is 3 and so on
Difference between 1 and 1 is 0
Difference between 1 and 0 is 3.
Difference Code is : 31330303
Take the minimum (decimal) value of Difference code as 03033133,
known as Shape number!
This SHAPE number is for the object, uniquely recognized, independent
of rotation (by 900). Normally chosen from Difference Code of smallest
order
Example 3 (4-directional Chain Code) :
Another Object
Verify:
Chain Code:
03300110333233332211112111

Difference code:
30101033003100030300013003

Shape Number:
00013003301010330031000303
8-directional Chain Code

If the object edges are of slopes 450, 1350 , - 450 and


- 1350, then we can use the 8-Directional converter.
The procedure of getting the shape number is the
same.

This method of object recognition is fast and can be


used for different shapes of objects to be recognized if
they are coming in a random sequence.
Example 4 (8-directional Chain Code):

3 2 1
4 0
5 6 7
0 0 0 0 0 0
2 7
3 7
3 6
4 4 4 4 4 6
Exercise:
Obtain the chain code for 8-direction converter
More Exercises:

(a) Obtain the chain code (b) Obtain the chain code

(c) Obtain the object shape based on the following chain code
• 000066644422
• 00777444666552222221
FEATURE EXTRACTION:

In vision, it is often necessary to distinguish one object from


another. This is accomplished by mean of features that
uniquely characterize the object.
Some features of objects that can be used in Vision are:
(a) Area (b) Minimum Enclosing rectangle
(c) Diameter (d) center of gravity
(e) Perimeter (f) eccentricity
(g) Aspect Ratio (h) Number of holes
(i) Moments
Example 5: Histogram
EXAMPLE 6:
Let an original image of an object undergone several
image processing techniques and finally available to
us as a pixel pattern shown below:
Some of features can be computed as:

(a) Moment ( M00 ) = x, y y


x 0 0
= 24
(b) Eccentricity = (Max x-length) / (Max y-length) = 9/4
(c) Perimeter = 22
(d) Area = 24
(e) Diameter = 9
(f) Thinness = {Diameter / area }
= ( 9 / 24 ) = 0.375
(g) compactness =
{ (perimeter)2 / area } = ( 22 2
/24 )
(a) No: of holes = 0

Objects having these features belong to one category


24

You might also like