Input Image:Camel.raw Image Size:256*256

advertisement
TEXTURE AND COLOR FEATURES FOR ANIMAL
IDENTIFICATION
Ms. Priya Ronad
Ms. Shilpa Ankalaki
Dr.Jharna Majumdar
Department of CSE (PG)
Asst.Prof, Dept of CSE (PG)
Dean R&D
NMIT Bangalore, India
NMIT Bangalore, India
priyaronad@gmail.com
Shilpaa336@gmail.com
Prof.&Head, Dept of CSE (PG),
NMIT Bangalore, India
jharna.majumdar@gmail.com
ABSTRACT
There are mainly 2 types of texture
Research on animal identification has a many real life
applications, those are preventing animal vehicle
accident, preventing dangerous animals in living area etc,
and because of these important applications animal
1) Artificial texture: Human beings create and design for
a specific purpose to give a volume example is shown
below in figure 2.
identification is important. Animal identification has two
important phases one is learning phase and the second
one is classification phase based on feature extraction.
This paper includes detection of animals based
.
on texture and color features, Texture features used for
animal identification are Haar wavelet, fusion of Haar
Figure 2: Example of Artificial Textures
and GLCM and the color feature used is Grid based color
1)
moment.
Natural textures
Keywords
GLCM, HAAR wavelet, fusion of HAAR and GLCM,
Laws method, Grid based color moment.
1 INTRODUCTION
Figure 3: Examples of Natural Textures
Texture does not have a single definition, but
texture can be defined in several ways. Texture gives the
Texture also helps in segmentation of images.
information about the nature of the surface of an object.
Texture gives the information about the image regarding
It says whether the surface is rough or smooth, and also
its color and intensities.
gives the information about how pixels are mutually
To define exactly what is texture there are mainly 2
related. Texture can be artificial or it may be natural.
approaches
Texture features plays a very important role in many
applications such as remote sensing CBIR and medical
applications, some of the examples are shown below in
1) Structural approach: Here texels are arranged in
some regular or repeated pattern. It works well with
artificial textures.
figure 1.
2) Statistical approach Here it measures the
arrangement of intensities in a region. This works
well with natural texture.
Wood
Brick
Metal
Figure 1: Examples of Texture
This paper describes the Methods used for texture and
color feature extraction are those are GLCM, fusion of
A[I(i,j),I(r,s)]= A[I(i,j),I(r,s)]+1
Ends.
HAAR and GLCM texture feature Laws method. and the
color feature used is grid based color moment these are
Here P is the position vector,(r,s) is some vector.
explained in detail in further sections.
From this we will get co-occurrence matrix ,based on
2 METHODS USED FOR TEXTURE
FEATURE EXTRACTION
These are some of the methods used for texture feature
extraction of animal.
GLCM method.
that matrix features[3] are obtained
1)
Maximum probability:
Maxi,j {Ci,j}
Where ci,j is the co-occurrence matrix.
1)
Element difference moment

HAAR wavelet method.
This is low if higher values appear along the main

LAWS method.
diagonal
∑ ∑ (i − j) ∗ Ci, j
2.1 GLCM method
Along with intensity grey level co-occurrence
i
2)
method also gives information about position. This is a
j
Entropy: It majors the randomness how
random the given texture major is
second order statistical method. GLCM is defined as
∑ ∑ Ci, j ∗ log⁡(Ci, j)
joint probability of combination of 2 grey level pixels for
i
j
a stable window size given two parameters
3)
Uniformity
1) Distance among pixels.
∑ ∑ Ci, j ∗ Ci, j
2) Angle among pixels.
GLCM is quantized to the number of grey levels.
Because it is sparse. If the full range is used than it will
i
j
Its high when all Ci,j are equal.
4)
Homogeneity
have 256*256 elements which is quite sparse.
It is larger when large values appear along main
Algorithm
diagonal.
Here I is a given image of dimension M*N
∑ ∑ (i − j) ∗ Ci, j
i
L indicates number of discrete quantized levels
j
AL*L is the co-occurrence matrix.
Below the GLCM method is explained with the example
A<- Initialization(every element in the matrix are
in figure 4.
initialized to zero)
for i=0 -M-1
for j=0 - N-1 do
begin
(r,s)=(i,j)+(px,py)
If (r,s)<M,N(within our image)
Then
Input
matrix
co-occurrence matrix
Figure 4: GLCM of a 4*4 image for distance d = 1
and direction theta=0
transformation and resultant matrix of the columns are
2.2 HAAR wavelet
obtained.
The HAAR wavelet is introduced by Alferd Haar in
𝟓
𝟏 𝟕
[
𝟐 𝟓
𝟖
1990.it is a simplest form of wavelet. And the
computation is also speed. Here Transformation takes
place from space domain to frequency domain[1].
𝟓 𝟏
𝟑 −𝟏
|
𝟒 𝟏
𝟓 −𝟒
𝟑
−𝟏
]
𝟐
−𝟑
In the second phase, first-level D2 transform is enforced
Algorithm
on the rows of the resultant column matrix. . The first
It mainly Has a 2 passes
transformation and resultant matrix of the rows are
a)
Column by column transformation.
obtained.
b)
Row by row transformation.
.
Step 1: Calculate the average of Reverence pixel and its
12 8
0
2
|
−3 −1
1 13 9
[ −−− − −−− ]
2 −2 2
2 4
|
−3 −1
5 5
neighboring pixel column by column and store it in the
place of reference pixel.
Step 2: Calculate the difference of Reference pixel and
Following indications are used:
its neighboring pixel column by column and store it in
𝐀=[
the place of reference pixel.
12 8
]
13 9
Step 3: Calculate the average of Reference pixel and its
neighboring pixel row by row and store it in the place of
𝐇=[
reference pixel.
0
2
]
−3 −1
Step 4: Calculate the difference of Reference pixel and
−2
𝐕=[
−3
its neighboring pixel row by row and store it in the place
2
]
−1
of reference pixel.
Step 5: From this will get 4 bands LL, HL, LH and HH
2
𝐃=[
5
bands.
D2 transform is used to reduce the image size , Image
compression reduces the image size without altering the
4
]
5
A: Estimated area which contains the information of
entire image.
information. To understand the D2 wavelet, a example is
H: Horizontal area which has information of edges which
given below.
are present vertically.
A 2D input image matrix M is set to be:
V: Vertical area which has information of edges which
are present vertically.
D: It has information of diagonal elements.
3
2
4
1
Disadvantage of D2 wavelet
3
4
1
2
3
2
3
1
HAAR wavelet is that it is not regular, and so
cannot be separable.

2
6
1
4
In the first Phase the first-level D2 transform is enforced
on the columns of the input image M. The first
Advantage
For analysis of signals with sudden transitions.
2.3 FUSION OF HAAR AND GLCM
Step 2: Take the average of all the multiplied values and
store it in the center place of the window in the image.
This method is used to reduce the time taken to
calculate the texture values for GLCM .If Haar wavelet is
used than time complexity can be reduced[1].
Step 3: Move the window and repeat the same steps.
Step 4: calculate the mean, standard deviation and
variance of all the window centers and get the mean and
Algorithm
standard deviation value.
Step 1: Calculate the average of Reference pixel and its
neighboring pixel column by column and store it in the
Steps to calculate the window operations in
laws method are shown in figure 5 and 6.
place of reference pixel.
Step 2: Calculate the difference of Reference pixel and
its neighboring pixel column by column and store it in
the place of reference pixel.
Step 3: Calculate the average of Reference pixel and its
neighboring pixel row by row and store it in the place of
reference pixel.
Step 4: Calculate the difference of Reference pixel and
its neighboring pixel row by row and store it in the place
Figure 5: Mask convolution using window
of reference pixel.
Step 5: From this will get 4 bands LL, HL, LH and HH
bands.
Step 6: Apply the GLCM to LH and HH band.
HH is not used because it contains less image
information and LL is also not used because this band is
nothing but approximation of the image, this band can be
further divided.
Figure 6: statistic computation of energy
measures where zj is the mean
2.4 LAWS METHOD
After this have to calculate mean, absolute mean
Laws method is used in many applications
which was discovered by K .I. Laws.It is one of the
texture energy measure method, which uses convolution
and standard deviation these are some of the texture
energy measures.
3 METHODS USED FOR COLOR
masks to calculate the energy measure. It uses 5 masks
those are spot, edge, level, wave, and ripple given below.
Except L and E all are zero these mask values are given
FEATURE EXTRACTION
3.1 Grid Based Color Method.
below.
L5 = [1 4 6 4 1]
S5 = [-1 0 2 0 -1]
R5 = [1 -4 6 -4 1]
E5 = [-1 -2 0 2 1]
W5 = [-1 2 0 -2 1]
Algorithm
Step 1: consider the window of size 5*5 or 3*3 and
multiply the respective mask value with the pixel value
of image
Here RGB image is converted to HSV and later divide
each H,S and V into 9 blocks and apply mean, variance
and skewness[3].
Identification stage
Here second phase is classification based on these
extracted methods. The classification method used here
is k-means.
K-means:
1) Assignment step: allocate every object to its respective
k means is also called as lioyd’s algorithm, it uses
clusters, which has a nearest average.
interactive refinement technique.
2) Update step: calculate new mean which is a center of
Given a set of Centroid saym1,m2……mk,the algorithm
the cluster.
proceeds as follows.
4 RESULTS
There are mainly 2 steps
4.1 Results of GLCM and HAAR fusion
Input image : Camel (color)
Input Size:256*256
Figure 7: GLCM and HAAR fusion texture values for camel
Input Image:Dog(color)
Input Size:256*256
Figure 8: GLCM and HAAR Fusion Texture Values for Dog
4.2 Results of Laws texture energy measure method
Input Image:Camel.raw(grey)
Image Size:256*256
Figure 9: LAWS Texture Feature Values of Camel
Input Image:Dog.raw
Image Size:256*256
Figure 10: LAWS Texture Feature Values of Dog
Input Image:Rhinoceros.raw Image Size:256*256
Figure 11: LAWS Texture Feature Values of Rhinoceros
4.3 Results of RGB to HSV convertion
Input Image:Camel.raw Image Size:256*256
Figure 12: RGB to HSV Convertion Image for Camel
Input Image:Dog.raw Image Size:256*256
Figure 13: RGB to HSV Convertion Image for Dog
Input Image:Rhinoceros.raw Image Size:256*256
Figure 14: RGB to HSV Convertion Image for Rhinosorous
Results of Grid Based Color moment
Input Image:Camel.raw
Image Size:256*256
Figure 15: Grid Based Color Moment Values for Camel
Input Image:Dog.raw
Image Size:256*256
Figure 16: Grid Based Color Moment Values for Dog
5 RESULT ANALYSES
Table 1: Time Taken by GLCM and HAAR and GLCM fusion
TIME TAKEN
S.NO
TECHNIQUE
(HH:MM:SS:MS)
Image1(camel)
Image2(Horse)
MM:SS
MM:SS
1
GLCM
14:703
14:594
2
WAVELET AND GLCM FUSION
2:656
3:719
Table 2: Mean, Variance and skew values for HUE for camel
Block number
Mean
Variance
Skewness
Block 1
122.794992
176.894194
-0.690679
Block 2
119.682961
149.989012
-0.789993
Block 3
133.770771
217.214783
-0.610997
Block 4
126.784934
99.914740
-1.196958
Block5
128.795789
90.021679
-1.394250
Block 6
132.653246
295.204034
-0.447849
Block 7
154.155423
300.993096
-0.508423
Block 8
153.104008
372.507194
-0.409398
Block 9
0.000000
0.000000
0.000000
Table 3: Mean, Variance and skew values for SATURATION for Camel
Block number
Mean
Variance
Skewness
Block 1
68.508058
95.319670
-0.689019
Block 2
69.883908
86.548935
-0.772220
Block 3
61.900287
96.071885
-0.492044
Block 4
66.348266
52.491695
-0.865325
Block5
71.246098
51.726786
-0.967135
Block 6
66.058949
138.353615
-0.459180
Block 7
44.024549
79.315348
-0.335277
Block 8
28.442112
57.938302
-0.424412
Block 9
0.000000
0.000000
0.000000
Table 4: Mean, Variance and skew values for VALUE for camel
Block number
Mean
Variance
Skewness
Block 1
0.000000
381.168628
0.630834
Block 2
552.477752
506.663610
-0.655476
Block 3
669.885105
769.561280
-0.593832
Block 4
0.000000
229.625705
0.974612
Block5
276.245527
104.853146
-1.224532
Block 6
1240.619318
2263.775417
-0.442141
Block 7
0.000000
467.984009
0.532329
Block 8
1150.807252
1930.603473
-0.466644
Block 9
0.000000
0.000000
0.000000
Table 5: Mean, Variance and skew values for HUE for Dog
Block Number
Mean
Variance
Skewness
Block 1
113.844340
654.997582
-0.173665
Block 2
118.362799
415.679785
-0.283755
Block 3
132.511950
147.573591
-0.814353
Block 4
115.348553
98.127383
-1.126492
Block 5
112.807588
55.670722
-1.867090
Block 6
119.727109
130.009468
-0.910057
Block 7
141.051418
210.767988
-0.658124
Block8
161.774090
420.760100
-0.383056
Block 9
161.672982
327.984880
-0.487861
Table 6: Mean, Variance and skew values for SATURATION for Dog
Block Number
Mean
Variance
Skewness
Block 1
41.569863
185.786654
-0.200654
Block 2
76.851995
233.304688
-0.281606
Block 3
89.257209
106.654340
-0.372526
Block 4
149.234779
130.903817
-0.998892
Block 5
156.269834
81.875146
-1.569423
Block 6
168.288240
185.097175
-0.875796
Block 7
61.704463
89.430618
-0.226607
Block8
38.070645
87.887116
-0.092385
Block 9
46.704127
91.282234
-0.110030
Table 7: Mean, Variance and skew values for Value for Dog
Block Number
Mean
Variance
Skewness
Block 1
0.000000
1125.060096
0.225813
Block 2
2299.504505
6258.554070
-0.328041
Block 3
330.894181
239.054700
-0.978491
Block 4
0.000000
236.337317
0.956058
Block 5
172.430422
62.519873
-0.067977
Block 6
420.743590
338.588353
-0.761416
Block 7
0.000000
336.731745
0.722756
Block8
1225.735254
2178.556353
-0.449614
Block 9
860.643958
1179.154227
-0.530352
method. HAAR is the most efficient texture method .The
6 CONCLUSION
color feature used here is grid based moment from this
The work proposed in this paper has mainly concerned
81 features are extracted.
with the 2 challenging steps in image analysis
and
Using these extracted features clustering has to
classification. For all types of images there are no
be done using a K-means clustering. From this method
general feature extraction methods. To determine a
we can efficiently classify the animals.
applications.
Those
are
feature
extraction
suitable method trial has to be done on the animal
Future work to be carried out is extraction of
images. In this proposed method the features are
texture features which are invariant to scale and rotation.
extracted on texture and color features. The texture
And usage of still more efficient clustering methods.
feature extracted here are GLCM, HAAR and LAWS
REFERENCES
1] Manasi Saraswat, Anil Kumar Goswami, Aastha Tiwari”. Object Recognition Using Texture Based analysis”International
Journal of Computer Science and Information Technologies, Vol. 4(6), 2013.
[2] P.Mohanaiah, P.Sathyanarayana, L.GuruKumar “Image Feature Extraction Using GLCM Approach”. InternationaJournal
of Scientific Research Publications, Volume 3, Issue 5, May 2013.
[3] Gaurav Mandoli “A Survey on Feature Extraction Techniques for Color Images”. International Journal of Computer
Science and Information Technologies, Vol. 5(3), 2014.
[4] Sandip.S.Patil, Harshal S.Patil”Study and Review of Various Image Texture Classification Methods”. International
Journal of Computer Applications. Vol. 75, August 2013.
[5] D S Guru, Y.H.Sharath, S.Manjunath, “Texture Features and KNN in Classification of Flower Images”. IJCA Special
Issue on “Research Trends in Image Processing and Pattern Recognition”.2010.
[6] Kamrul Hasan Talukder, Koichi Harada,”Haar Wavelet Based Approach for Image Compression and Quality Assessment
of Compressed Image”. IAENG International Journal of Applied Mathematics.2007.
[8] Guillaume Lemaiitre,Miroslav rodojevic, “Texture segmentation:Co-occurrence matrix and Laws texture masks
methods”.
Download