Modify Manhattan Distance For Image Similarity

A New measure is proposed for assessing the similarity among gray-scale images.The well-known Structural Similarity Index Measure (SSIM) has been designed usinga statistical approach that fails under significant noise (lowPSNR). The proposed measure, denoted by Manhattan distance and STD, uses a combination of two parts: the first part is Geometric method, while the second part is based on statistical feature. The concept of manhattan distance is used in the geometric part. The new measure shows the advantages of statistical approaches and geometric approaches. The proposed similarity method is outcome for human face. The novelmeasure outperforms the classical SSIM in detecting image similarity at low PSNR, with significant difference in performance. ARTICLE INFORMATION Received: 05-Nov-2019 Revised: 19-Nov-2019 Accepted: 25-Dec-2019 DOI: https://doi.org/10.31580/ojst.v2i4.98 4


INTRODUCTION
In image processing, applications that require comparing two images according to theircontent, image matching is an essential component in this process. One of the mostimportant examples is the image database retrieval systems [1]. Image similarity hasbecome in the recent years a basic point in image processing applications like monitoring,image compression, restoration, and many other applications.Various image similarity assessment techniques can be used to detect differences between two images. In recent years, image similarity measure has become an essential aspect in real world applications. It can be used for various image processing applications such as dynamic monitoring, adjusting image quality, image enhancement, compression, restoration, and other applications.
Image similarity can be defined as the difference between two images, and imagesimilarity measure is a numerical difference between two different images under comparison.
Similarity techniques can be classified according to the methods they use inderiving or defining the difference. The first kind of techniques is the statisticalbasedmethods, and the second important type is the information -theoretical techniques [2].
An old statistical measure that has been widely used to detect image similarity is themean squared error (MSE) [3,4,5].
Recently, light has been shed on a new measure that coincides with the HumanVisualSystem (HSV): Structural Similarity Index Measure (SSIM) is proposed in 2004 byWangandBovik. SSIM proved to be distinguished due to its notable performance as comparedto the previous metrics [1,6].
Image recognition has become an interesting subject for researchers over the pasttwo decades because of its potential applications in many important fields like characterrecognition, human computer interfaces, identity authentication and video surveillance.
Different methods for image recognition, mostly for face image recognition, havebeen proposed [7]. Many algorithms of face and object recognition systems have recentlybeen designed based on image similarity measure like SSIM [1] In this work we propose a similarity measure that combines features of Statistical approach and geometry features as represented by (distance, angle) a new formulaFor measure similarity by used Manhattan Distance and standarddeviation.
The paper is organized as follows: Section 2 deals with SSIM, which is the well-known structural similarity, Section 3. In Section 4, experimentalresults are presented; along with performance measures. The conclusions of this study are given in Section5

METHODOLOGY
There have been two major approaches for image similarity: statistical approaches or called .photometricthat distills an image into values and compares the values with templates to eliminate variances. [8] and geometric approaches.which looks at distinguishing features.

Statistical methods:
Mean-squared error (MSE) is a well-known statistical measure. However, MSE is tooweak for modern applications of image processing like face recognition. The first significantstructural similarity measure, called Structural Similarity Index Measure (SSIM), has been proposed in 2004 [1]. SSIM used statistical image parameters such as mean,variance, co-variance, and standard deviation as follows [1,8]: P(x,y)= where ρ(x, y) is the SSIM metric between images x and y, while μx, μy, σ2x and σ2y arethe statistical means and variances of x and y, respectively; σxyis the covariance of xandy, and finally the constants 1 and 2 are inserted to avoid unstable results that maybe reached due to division by zero, and are defined as 1 = ( 1 ) 2 and 2 = ( 2 ) 2 ,with 1 and 2 are small constants and L = 255 (maximum pixel value).

Geometric methods:
Ingeometric approach, the similarity between x and y (where x and y areimages) can be defined as the corresponding differences between geometrice features of the two images. The more differences they have, the less similar they are [9].
In 2013, D. Mistry, A. Banerjee and A. Tatu proposed a new similarity measure thatbase on joint entropy (joint histogram) . The proposed measure is based on the fact of the joint entropy is the measure of uncertainty among two images, so if the joint entropy is low then the similarity between two images are high, and vice-versa. The joint entropy was first applied on two compared images using joint histogram as in [9]. In

FEATURE EXTRACTION
At this stage and after the implementation of appropriate preprocessing, the main features are extracted .These features are powerful against pose, illumination, expression and aging differences . [12] Geometric features Geometric features are the features of the objects that have been created by a group of geometric elements like points, lines, curves or surfaces. In our proposed Algorithm then are a set of geometric measurements (Euclidean distance, Slope, Area, Perimeter, Centroid and Extrema Points, Angle and Rotation ) to extract the features of the human face as better than the others; the mathematical description of these measurements is given below

EUCLIDEAN DISTANCE
The Euclidean distance is one of the most important measuring ways used to draw the similarity between two vectors ( testing vector with dataset vector) [ 13]. The formula of the Euclidean distance is shown below Take the square root of the sum of the squares of the differences of the coordinates.
For example, if xx=(aa, bb) and yy=(cc, dd) the Euclidean distance between xx and yy is ANGLE Is the separation or break between the two straight lines merging with one another, where the crossing point of the two lines and their intersection are known as the angle head (Vertex), and the two line the two parts of the angle they know two ribs of the angle, The angle comprises of two bars going from a similar beginning stage. The angle is determined any between the two intersectional lines According to the accompanying equation (2.24) [14] 1 : The slope between (Y) and (X). 2 : The slope between (Y) and (Z).

Statistical features
Singulaarvalueedecompositionn (SVD) is a decent strategy to extricate image features . Since it has invariance for the turn and reflecting change, and furthermore has better heartiness for clamor and light force change [15]. SVD is a result of direct polynomial math. It plays an intriguing, key job in a wide range of uses that is, face recognition, image compression, watermarking, object detection, scientific computing, signal processing, texture classification and so on [16]. The singular value decomposition of a matrix is one of the most elegant the most rich and amazing calculations in straight polynomial math, and it has been widely utilized for rank and measurement decrease in example pattern recognition and information retrieval applications [17].

A NEW MEASUREMENT
A Modify MahataanDistance measure is utilized here to create a newmeasure, designedto be a hybrid measure combining statistical features (represented by StatanderdDevation)with geometrical features. The new measure is a combination of two parts asfollows.The first part of the proposed measure is the geometry -theoretic part that uses theconcept of MahattanDistance, defined as follows:

Standard Deviation
The standard deviation is a numerical value used to indicate how widely individuals in a group vary. If individual observations vary greatly from the group mean, the standard deviation is big; and vice versa. [19] It is important to distinguish between the standard deviation of a population and the standard deviation of a sample. They have different notation, and they are computed differently. The standard deviation of a population is denoted by σ and the standard deviation of a sample, by s. 14 The standard deviation of a population is defined by the following formula: σ = sqrt [ Σ ( Xi -X ) 2 / N ] where σ is the population standard deviation, X is the population mean, Xi is the ith element from the population, and N is the number of elements in the population. [19] The standard deviation of a sample is defined by slightly different formula: where s is the sample standard deviation, x is the sample mean, xi is the ith element from the sample, and n is the number of elements in the sample.
And finally, the standard deviation is equal to the square root of the variance.
The new measure is

M(x, y) =(∑|x-y|/ STD y)ˆ2
The value of proposed measure will ensure that: The final version of the first part can be stated as follows: The second part of the measure is standard deviation to the internal image(tested) imageas follows: σ = sqrt [ Σ (Xi -X ) 2 / N] (5) where Xandare the mean values of x.
Note that 0 ≤ new measure≤ 1; giving 1 for completely similar images and 0 forcompletely different images.
The above new measure can be calculated according to the following algorithm

Algorithm:
Input: Images x and y, which are the observed image( with noise) and saved image respectively.
Output: Similarity, a number ranging between 0 and 1.
Step 1: Convert color image into gray scale.
Step 2: Convert image values into double type.
Step 3: Set feature vector (Geometry and statistical) of observed(noisy image) and saved image that is represent x and y.
End of Algorithm.

TEST ENVIRONMENT
In common noise is representing the unwanted things produced in the image [21]. Image noise is random difference of brightness or color information in images. Noise can be created from dissimilar sources such as the sensor and circuit board of a scanner or digital camera. Image noise can also create in film grain and in the necessary shot noise of an ideal photon detector. Image noise is an unwanted by-product of image capture that increases false and minor informationTo test the performance of the proposed measure, type of images have been considered: a human face (face 94database, [22]), [23]Type of noise have been considered in simulation and testing: Gaussian noise,Gaussian noise is squarely distributed above the signal . Generally each pixel in the noisy image is values of the sum of the a random Gaussian distributed noise and true pixel. Gaussian distribution of this type of noise The probability distribution function takes the shape of the bell as such [24]: where signifies the grey level, the standard deviation and.
the mean value which is one of the most popular noise types that are encountered in signal processing systems;, which is common in image processing.To test the performance of the proposed measure, : a human face (face94 database,) images have been considered .

RESULTS AND DISCUSSION
The proposed measure has been tested and simulated using MATLAB.

Performance under Gaussian Noise:
The proposed measure has been tested with Gaussian noise, which is the most popular noise that attacks images and systems. Results are shown in Figures 1-3. Table 1 shows a comparison between the SSIM and MMD for different types of images.The proposed measure gives larger similarity than SSIM with Gaussian noise.

CONCLUSION
Results show that the proposed quality measure (by Manhattan distance and STD) provides results that are more consistent with human perception of color image quality assessment and also greatly improves the performance of SSIM at low PSNR on many distortion types. In this paper, we present an improvement to the well-known Multi-Scale Structural Similarity index (SSIM) by adding a gray comparison to the criteria of the gray scale SSIM. The new image quality measure fully uses the geometry and statistical information of the image for the assessment of color distortions that are difficult to be noticed using the luminance channel only or gray scale conversion of the color image at low PSNR.
The proposed measure gave better result than using statistical measure and geometrical theoretic measure individually.