written 2.2 years ago by |
Solution:
Shape analysis is a method of finding the shape of irregular objects using two types of descriptors. It is used when the objects are not polyhedral.
There are two types:
(1) line descriptors:
(2) Area Descriptors.
Line descriptors:
They are used to find out the length of the irregular boundary or curve of an irregular object in terms of pixels and make use of two encoding names namely absolute representation and relative representation.
A curve C(a) is represented by a sequence of chain codes $a \in R^n$, where n is the length of the curve in pixels.
Chain code is more efficient than storing the coordinates of the points because it takes only 3 bits per point.
Example:
Consider the following image ,
$ \begin{array}{|l|l|l|l|l|l|l|l|} \hline 0 & 0 & 0 & 0 & 1 & 1 & 0 & 0 \\ \hline 0 & 0 & 1 & 1 & 0 & 0 & 1 & 0 \\ \hline 0 & 1 & 0 & 0 & 0 & 0 & 1 & 0 \\ \hline 0 & 1 & 0 & 0 & 0 & 0 & 1 . & 0 \\ \hline 0 & 0 & 1 & 0 & 0 & 1 & 0 & 0 \\ \hline 0 & 0 & 0 & 1 & 1 & 0 & 0 & 0 \\ \hline \end{array}\\ $
$ \begin{array}{|c|c|c|} \hline 3 & 2 & 1 \\ \hline 4 & p . & 0 \\ \hline 5 & 6 & 7 \\ \hline \end{array}\\ $
Mark a dot ". " at the right most pixel of the binary image.(already marked in the image) The chain code is generated as follows
$ a=[2,2,3,4,5,4,5,6,7,7,0,1,1] $
$C(a)=13$ pixels i.e. the length of the curve is 13 pixels.
Area Descriptors:
The descriptors which are based on the analysis of points enclosed by the boundary are called area descriptors.
Area descriptors are more robust than line descriptors. Consider R representing a region in an image I(k,j). R is a connected set that is for each pair of pixels in R, there is a path in R which connects the pair.
R corresponds to a single part but may have holes. The foreground is represented by 1’s and the background region is represented by 0’s. A circular object with a hole inside is also present.