Collection of Images to make the Database. Firstly the
images of various area of soil captured using digital camera with required
resolution for better quality or by scanner. The construction of database is
clearly dependent on application. All the databases are collected and stored in
2 Checking whether Image is colored or gray: Initially the
soil image is taken and is checked whether it is colored or gray image by using
the command size. If the soil image taken is colored then it is converted to
gray image to make it two dimensional (m x n). After this the class type of
gray image is checked to make sure the image type is doubled or not. If it is
not doubled than convert the image to double.
3 Mean and Standard Deviation of Images is Calculated: After
this the image is converted into a column vector of dimension mxn, so that a
typical image of size 112×92 for example becomes a vector of dimension 10304,
denoted as T. Now the mean of the image is calculated by using equation (4) and
standard deviation (S) is calculated using equation(13).
Also the standard deviation (ustd) and mean (um) is set
practically approximately close to mean and standard deviation calculated
4 Normalization: Next normalization of images is done
using equation (14) in order to make all images of uniform dimension.
5 Calculating Train Centred Images: Subtracting the mean
from column vector matrix of training images in order to obtain the centred
6 Calculating Eigen Vectors and Values from the covariance
7 Creating Eigen faces: Eigen Vectors obtained after SVD
are sorted in descending order and the top Eigen vectors are considered as
8 Calculating Train Weights: Now the weights are
determined by calculating the dot product of transpose of Eigen Faces matrix
and Train Centred Images.
9 Store Train Weights in Sink for Further Comparison: The
above mentioned procedure from step (2 to 8) is applied on each train image and
finally one by one train weights are stored in sink for further comparison.
10 Euclidean distance Classifier: In this block firstly all
steps from (2 to 7) are applied on the test image to compute its test weights
and then the difference between this test weights and the train weights stored
in the sink.
Recognized: Finally the minimum distance gives the best match or can be said
similar soil pH Identified.