features image processing and extaction
Post on 16-Jul-2015
161 Views
Preview:
TRANSCRIPT
Ali abdul-zahraa
We will discuss shape-based representations
(external), features based on texture and
statistical moments (internal) .
look at principal component analysis (PCA), a
statistical method which has been widely
applied to image processing problems.
We are assume that an image has undergone
segmentation.
The common goal of feature extraction and
representation techniques is to convert the
segmented objects into representations that
better describe their main features and
attributes.
The type and complexity of the resulting
representation depend on many factors, such
as the type of image (e.g., binary, grayscale, or
color), the level of granularity (entire image or
individual regions) desired.
Feature extraction is the process by which
certain features of interest within an image are
detected and represented for further
processing.
It is a critical step in most computer vision and
image processing solutions because it marks
the transition from pictorial to nonpictorial
(alphanumerical, usually quantitative) data
representation.
The aim is to process the image in such a waythat the image, or properties of it, can beadequately represented and extracted in acompact form amenable to subsequentrecognition and classification.
Representations are typically of two basickinds:
internal (which relates to the pixels comprisinga region)
or external (which relates to the boundary of aregion).
A feature vector is a n × 1 array that encodes
the n features (or measurements) of an image
or object.
The array contents may be:
symbolic (e.g., a string containing the name of
the predominant color in the image)
numerical (e.g., an integer expressing the area
of an object, in pixels) I’ll interested in.
or both
A very basic representation of a shape simply
requires the identification of a number N of
points along the boundary of the features. In
two dimensions, this is simply.
A common requirement for feature extraction
and representation techniques is that the
features used to represent an image be
invariant to rotation, scaling, and translation,
collectively known as RST.
RST invariance ensures that a machine vision
system will still be able to recognize objects
even when they appear at different size,
position within the image, and angle (relative to
a horizontal reference).
A binary object, in this case, is a connected
region within a binary image f (x, y), which will
be denoted as Oi, i > 0. Mathematically, we can
define a function Oi(x, y) as follows:
Oi(x, y) = 1 if f (x, y) ∈ Oi
0 otherwise
The matlab function bwlabel, pixels labeled 0
correspond to the background; pixels labeled 1
and higher correspond to the connected
components in the image.
we mean that the selected coordinates constituting
the boundary/shape must be chosen in such a way
as to ensure close agreement across a group of
observers.
If this were not satisfied, then different observers
would define completely different shape vectors for
what is actually the same shape.
achieved by defining criteria for identifying
appropriate and well-defined key points along the
boundaries , Such key points are called
landmarks
Landmarks essentially divide into three
categories:
Mathematical landmarks
Anatomical or true landmarks
Pseudo-landmarks
These correspond to points located on an
object according to some mathematical or
geometric property (e.g. according to local
gradient, curvature or some extremum value).
These are points assigned by an expert which
are identifiable in (and correspond between)
different members of a class of objects.
Examples of anatomical landmarks are the
corners of the mouth and eyes in human faces.
These are points which are neither
mathematically nor anatomically completely
well defined, though they may certainly be
intuitively meaningful and/or require some
skilled judgment on the part of an operator.
An example of a pseudo landmark might be
the ‘ centre of the cheek bones’ in a human
face, because the visual information is not
definite enough to allow unerring placement.
• Anatomical landmarks
(indicated in red) are located
at points which can be easily
identified visually.
• Mathematical landmarks
(black crosses) are identified
at points of zero gradient and
maximum corner content.
• The pseudo-landmarks are
indicated by green circles
In certain applications, we do not require a
shape analysis/recognition technique to
provide a precise, regenerative representation
of the shape. The aim is simply to characterize
a shape as succinctly as possible in order that
it can be differentiated from other shapes and
classified accordingly.
a small number of descriptors or even a single
parameter can be sufficient to achieve this
task.
Note that many of these measures can be
derived from knowledge of the perimeter
length.
The following Table gives a number ofcommon, single-parameter measures ofapproximate shape
which can be employed as shape features inbasic tasks of discrimination and classification.
Note that many of these measures can bederived from knowledge of the perimeterlength,
the extreme x and y values and the total areaenclosed by the boundary – quantities whichcan be calculated easily in practice.
1. Area
The area of the ith object Oi, measured in
pixels, is given by:
2. Centroid
The coordinates of the centroid (also known as
center of area) of object Oi, denoted (x¯i, y¯i),
are given by: or
3. Projections
The horizontal and vertical projections of a
binary object—hi(x) and vi(y), respectively—are
obtained by equations:
and
Projections are very useful and compact shape
descriptors. For example, the height and width
of an object without holes can be computed as
the maximum value of the object’s vertical and
horizontal projections, respectively, as
illustrated in Figure:
4. Thinness Ratio
The thinness ratio Ti of a binary object Oi is a
figure of merit that relates the object’s area and
its perimeter by equation
Ti = (4πAi)/(Pi^2)
where Ai is the area and Pi is the perimeter
The thinness ratio is often used as a measure
of roundness.
Since the maximum value for Ti is 1 (which
corresponds to a perfect circle), for a generic
object the higher its thinness ratio, the more
round it is.
This figure of merit can also be used as a
measure of regularity and its inverse, 1/Ti is
sometimes called irregularity or compactness
ratio.
A=imread('coins_and_keys.png'); subplot(1,2,1), imshow(A);
%Read in image and display
bw=~im2bw(rgb2gray(A),0.35); bw=imfill(bw,'holes'); %Threshold and fill in holes
bw=imopen(bw,ones(5)); subplot(1,2,2), imshow(bw,[0 1]); %Morphological opening
[L,num]=bwlabel(bw); %Create labelled image
s=regionprops(L,'area','perimeter'); %Calculate region properties
for i=1:num %object’s area and perimeter
x(i)=s(i).Area;
y(i)=s(i).Perimeter;
form(i)=4.*pi.*x(i)./(y(i).^2); %Calculate form factor
end
figure; plot(x./max(x),form,'ro'); %Plot area against form factor
% regionprops Measure properties of image regions
The key and drill bit are easily distinguished
from the coins by their form-factor values.
However, the imperfect result from thresholding
means that the form factor is unable to
distinguish between the heptagonal coins and
circular coins. These are, however, easily
separated by area.
1. Chain Code, Freeman Code, and Shape
Number:
A chain code : is a boundary representation
technique by which a contour is represented as
a sequence of straight line segments of
specified length (usually 1) and direction.
Once the chain code for a boundary has been
computed, it is possible to convert the resulting array
into a rotation-invariant equivalent, known as the first
difference
Fourier Descriptor Fourier descriptor: view a coordinate (x,y) as a complex number
(x = real part and y = imaginary part) then apply the Fourier
transform to a sequence of boundary points.
)()()( kjykxks
1
0
/2)(1
)(K
k
KukeksK
ua Fourier descriptor :
1
0
/2)(1
)(K
k
KukeuaK
ks
Let s(k) be a coordinate
of a boundary point k :
Reconstruction formula
Boundary
points
Example: Fourier Descriptor
Examples of reconstruction from Fourier descriptors
1
0
/2)(1
)(ˆP
k
KukeuaK
ks
P is the number of
Fourier coefficients
used to reconstruct
the boundary
Fourier Descriptor Properties
Some properties of Fourier descriptors
top related