Proposed Algorithm For Using GLCM Properties To Distinguishing Geometric Shapes

In this research, an algorithm was used to look at the characteristics of a set of images for geometric shapes and then to classify them into totals based on four characteristics obtained from the co-occurrence matrix (energy, contrast, correlation and homogeneity). Studying the above four characteristics in detail and then presenting a complete presentation on the extent of their effect on the distinctive characteristics of the geometrical shapes. The adopted algorithm shows that the above four qualities can be new features of geometric shapes in digital images


. Introduction
Many of the characteristics of objects in our world can be largely determined by geometric characteristics or features [1]. Therefore, the discovery and extraction of geometric features of digital images are important issues in image analysis and computer vision [2] [3] The purpose of image analysis is often to distinguish shapes such as (circle, ellipse) [4] [5]. The process of detection and differentiation of circles is very important in analyzing the image of objects that contain defined signs and encoded into circles, for example confidential documents marked or sealed to the signal [6] [7] The Hough Transform technique is used to detect the circle, but there is a problem in its application. One of these problems is to determine the threshold necessary to reduce the values of the accumulators used by the conversion. For example, if the threshold of values entered in the accumulator matrix is very low, Will generate many values, some of which are wrong, and if the value of the threshold is too high, it can not generate enough values to detect the circle [6] . and then developed the HOF conversion technique to detect ellipse, hyperbolic curves and irregular shapes (arbitrary shapes) [8] [9], but requires a memory space A beer or a huge data processing, and as a result there is a lot of wasted time to calculate space data sites [2] This paper proposes algorithm of the high affectivity characteristics of homogeneity, energy, contrast and correlation for geometric shapes all of which can be obtained from a co-occurrence matrix.

Research Objective
The main objective of the research is to use a new idea to derive properties of geometric shapes in digital images based on evaluating some morphological properties.

Shape Representation
We can classify the shape representation into two categories: 3.1.1 -The first class represents two ways • Contour-based method • Region-based method The method of dependence on the ocean [10] [11] of the most common applications because of its compatibility with the human nature, because it only displays information available on the perimeter of the body and thus requires less information for storage. The second method depends on the state of the form presented in full or in the form of clips.

-The second category is represented in two ways: • Global approach • Structural approach
The global method uses the routing property derived from the integral limit to describe the shape in the way of dependence on the ocean. The common characteristics are (area, rotation, deviation, energy curvature, varied circuits, diffuse flood, convex).
The shape in the 2D image can be represented by general features such as (area, perimeter, concentration, inertial torque, Fourier descriptor), or by local character (eg line cut, arc cut, endpoint, etc.) Only the form of the visual image can be described entirely, where as the local character is available exclusively for objects enclosed in the images [3] [12] [13].

Shape Features In The Image
There are many properties available and used in image classification and retrieval, the most famous of these properties is the property (color, structure, characteristics of the shape) Characteristics of the shape can be divided into two main groups: 2.1 -Syntactical: which uses structural descriptions suitable for regular forms such as objects made by human beings.
2.2 -Statistic: Which is most suitable for irregular forms, ie, naturally occurring forms.
Statistical characteristics can be obtained by using histogram techniques which are common for their smoothness and smooth performance [14].
In addition to the structure and shape, color image distribution (for gray levels), which are necessary features in the content-based image retrieval (CBIR), the image hierarchy is a first-The histogram describes only the general distribution of colors with the neglect of spatial regulation, this has a significant impact on the efficiency of image retrieval [15] 0 generally should be used in the general distribution of colors in the image, We know a range of properties T differentiated each body on its own [16] .

Image Feature Extraction
The visual specifications (such as shape, color, structure) can be drawn to describe the images, each of these characteristics represented by the use of one or more descriptors of the characteristic [17] [18]. There are two effective techniques for deriving characteristics: 3.1 -ASM Active Shape Model: The shape model fits the real picture by using local distortions related to the local variable model. 3.2 -AAM (Active Appearance Model): Integrates the global structure of the most consistent but slower model of ASM, as well as more sensitive to the structure variations and under different lighting conditions. In addition, both ASM and AAM suffer from incorrect convergence when the model starts from A place far from the location of the real body [19] Part of the systems interested in the process of retrieving the image required from a large group based on the basic characteristics can be drawn automatically from the same images of these systems CBIR system, the algorithms used in these systems are generally divided into three tasks: a) Extraction

b) Selection c) Classification
Extraction converts the important contents of the images into the properties of the different components. The selection of properties reduces the number of properties fitted to the classification process. The properties that are not selected will be neglected. [20] These three tasks are the most critical. Directly on the efficiency of taxonomic functions [17]. ie, a simple improvement of color-based image retrieval using bidirectional statistics, because the two-digit statistical measures use spatial regulation between pairs of dots present or shown in image 0 so correlation-based methods have been used in structural analysis since in 1950 by Kaiser, which was the first to use the self-presence function to measure the roughness of the structure The co-occurrence matrix was presented by Haraliac as a tool based on contrast in structure analysis. The contrast function was used in the image retrieval field, and Huang relied on chromatic contrast (the way in which spatial variance can be described as a function of distance) [15].
The research included the use of a new idea to derive properties of geometric shapes based on the co-occurrence matrix and to obtain the specifications of this matrix, represented by (energy, contrast, homogeneity, correlation) properties.

Co-occurrence Matrices
The Co-occurrence matrix is used primarily to describe the texture of the region, but it can also be used in image maps to measure the number of times a two-pixel parameter is given [21]. We can know r the spatial relationship Left, above, etc., Cr Cooccurrence matrix for this relationship r calculates the number of times the pixel where i is valued with the pixel j by relationship r. The structure characteristics of the gray levels assume that the structure information in the picture contains 18 spatial relationships between the pixel in the image. This is the first parameter of the gray level Co-occurrence matrix. This is a guess or estimate of the potential density function of the second rank of the points in picture, and the characteristics are obtained as statistics from a matrix The GLCM matrix, which is defined by equation (1), has GLCM inputs (n, m) equal to the number of points appearing at grayscale n, m respectively with the separation of (dr, dc) of points figure (1). The number of points on this estimate obtained is given by equation (2). If Co-occurrence matrix normalized taking into account R, then input represents the possibility of the presence of pairs of pixel levels of gray n, m with separation (dr, dc). We will choose dc = 0 and dr change between 1 to 10 in column wise [22] [23].

Creating a Gray-Level Co-occurrence Matrix
To configure GLCM, the co-occurrence matrix for gray levels often calculates the intensity of the pixel (gray level) of n in a spatial relation to a pixel of m, primarily the spatial relationship defined as a pixel of interest and its adjacent pixel horizontally on the right directly, the element (n, m) produced in the co-occurrence matrix is simply the sum of the number of pixels that have a value of n in the spatial relationship specified for the pixel of m in the input image. Because processing requires a calculation of the co-occurrence matrix for the full variable range in the image, this is not desirable, so using the measures to reduce the number of density values in gray images from 256 to 8, the number of gray levels determines the size of the co-occurrence matrix.
The grayscale co-occurrence matrix can reveal some properties about the spatial distribution of gray levels in the image structure. For example, if most of the entries in the co-occurrence matrix are centered along the diameter, the coarse structure takes into account the specified distance [23]. . Figure (2) Process Used to Create the GLCM

Description of Two-dimensional Co-occurrence Matrices
The two-dimensional co-occurrence matrix proposed by Haralik in 1970 is typically used in texture analysis because it is able to take spatial dependence of grayscale values in the image [24]. A 2D co-occurrence matrix P is a matrix of dimensions (n, n), where n is the number of gray levels in the image. for computational efficiency the number of gray levels can be reduced and thus the size of the cooccurrence matrix is reduced. The matrix is represented as an accumulator, so P (i, j) calculates the number of point pairs that have the intensity i and j. points pairs It can be represented by a shift vector d=(dx, dy), where dx represents the number of points that travel along the x-axis and dy axis of the number of points that travel along the y-axis in the image slice.
In order to determine this spatial dependence of grayscale values, different properties of the structure must be calculated as suggested by Haralick [24,25,26], including Entropy, Contrast, Maximum Probability, Variance, Energy (Angular Second Moment), Sum Mean (Mean), Homogeneity, Correlation, Inverse Difference Moment, and Cluster Tendency. For the The formulas and descriptions of these characteristics are found in Table (1). Table (1) The co-occurrence features

Proposed Algorithm
The proposed algorithm has the potential to find the characteristics of various geometric shapes (circle, polygon, square, ellipse, triangular) and irregular shapes in different dimensions ranging from (50,50), (100,100), .. to (300,300) To extract the four qualities mentioned previously for retention and then apply the same steps on new forms in order to extract the four attributes adopted in the research to compare with what was obtained previously to determine the form that was tested.

Result Discussion
Initialize input image (binary image color and dimensions ranging between (50,50) to (300 ,300)) for each shape listed) Perform the initial processors on the image (Continuous process of thinning to obtain the Skelton image that thickness one pixel).
Calculate the co-occurrence matrix for the Skelton image.  Tables (2,3), show the extent of the effect of each of the four attributes on changing the dimensions of the geometrical image. Table (2) The four properties of geometric shapes with varying dimensions of the image.
. Table (3) Measured values of the coefficient of determination, Standard Err and the calculated significant level of the geometric shapes.
By studying the relationship between the dimensions of the image is estimated in pixels with homogeneity feature and after testing a set of polynomial equations found that the logarithmic model was the most efficient (Y = 0.0162ln (x) +0.9039)), where the coefficient of determination (R2 = 0.94) and a standard error of (Std_Err = 0.002) and the significant level (Sig = 0.003), indicating the efficiency of the graphic representation of this relationship, ie that 94% of the changes in the feature of homogeneity due to the change in dimensions of the image and 6% attributed to other factors not measured. As a result of the high coefficient of determination and the reduction of the standard error value, the logarithmic equation is considered efficient in the graphic representation of the independent factor (image dimensions) in the values of the dependent factor (image homogeneity feature) as shown in figure (4).  As for the relationship of the energy feature with the dimensions of the image and after the adoption of a set of equations was found that the logarithmic model is the best model in the representation of this relationship (y = 0.0707ln (x) +0.5769), where the coefficient of determination (R2 = 0.95) and the standard error (Std_Err = 0.003) and with the significance level ( sig = 0.01), ie, the ratio of the effect of changing the dimensions of the image to the energy values of 95% and 5% of the remaining changes is due to other factors that are not measured. It is highly efficient in the graphic representation of the effect of the independent factor to dimension the image in the energy values of the image Between the values calculated using the relationship and the real values of the energy feature and Figure (6) shows the degree of compatibility. In the above discussion, we conclude that energy and homogeneity features are affected by large changes in image dimensions. The contrast feature is inversely affected. The correlation 42feature, however, is weak as the dimensions of the image change. The three features of homogeneity, energy, and contrast give a topical distinction to the shape, but the correlation property is weak in the distinction of form. The results in Table (2) and Table (3) in Appendix A, respectively, show the values of the four features of the geometric shapes, the measured values of the coefficient of determination, standard err and significant level of the four properties, are drawn in the appendix B. 11. Recommendations and future work 1-Connect-based algorithm to distinguish the shapes in the classification of maps drawn by AutoCAD software. 2-The possibility of characterization of the ideas adopted for the physical in order to distinguish to some parts of the human form of discrimination, such as palm or face shape. 3-The possibility of applying the idea of the discovery of angles within geometric shapes for measurement based on the mathematical relationships.
Appendix A