New Approach for the Detection of Family of Geometric Shapes in the Islamic Geometric Patterns

This article proposes a new approach to detect the family of geometric shapes in Islamic geometric patterns. This type of geometric pattern which is constructed by tracing the grids with the respect of precise measurement criteria and the concept of symmetry of a method which is called ‘Hasba’. This geometric pattern generally found in the tiles which cover the floors or walls of many buildings around the Islamic world such as mosques. this article describe a new method which is based on the calculation of the Euclidean distance between the different geometric shapes which constitute the geometric Islamic pattern, in order to detect similar regions in this type of geometric pattern encountered in Islamic art. Keywords—Family geometric; shapes; Euclidean distance; ‘Hasba’; geometric art; Islamic patterns


I. INTRODUCTION
Since centuries, the Islamic world has had great decorative traditions. The Islamic geometric patterns [1] were very widespread throughout different countries in Africa, Asia and Europe. This article focus on the ornamental Arabesque (Thalal & al. [1][2]). More precisely, in this paper will be interested on the geometric patterns called "Tastyr" (Fig. 1). This kind of Islamic patterns are built through a method called 'Hasba' based on the respect of some precise criteria of measurement.
In Morocco, the method to build the geometric patterns adopted by craftsmen is called 'Hasba' [2], based on rigorous geometric rules such as the distance between two close neighboring geometric shapes must be fixed. The concept of 'symmetry', also based on a specific measure, is rather adapted in the carving and painting of wood, metal and plaster.
The main goal of the proposed approach consists of detecting family of similar regions through the analysis of pictures constructed based on the method 'Hasba', which containing geometric shapes. This method called "Hasba" (measure) is widely adopted by the Moroccan craftsmen ("Maâlam") especially who's working on wood material and handed over to their disciples.
This new approach to extract similar regions in Islamic geometric patterns is based on the detection first of the outline [3] of geometric shapes. In a second step, calculating the Euclidean distance [4] between them, in order to help artisans to make a decision very quickly on the geometric pattern, does it respect the rules of the 'Hasba' method ? as for example the distance between two neighboring forms is constant and the concept of symmetry is also respected.
After that the "Maâlam" can adapted the geometric pattern on wood or in other material (plaster, metal, marble...). To do so, the method of simple blob detector [5][6][7][8][9][10][11] is adapted. This method of having the different regions in a picture has in the input an image with a grid level [12]. The output is a set of regions.
The paper is organized as follows: In Section 2, related work. In Section 3, describe the method simple blob detector. In Section 4, shows the procedure to follow to apply the proposed approach. Section 5 contains the conclusion and the future works.

II. RELATED WORK
We have find articles that talk about the Hasba method, which use some software to create the models respecting 'Hasba' method. But none articles talk about how to solve the difficulty of the validation of a geometric pattern adapted by craftsmen by respected the concept of symmetry and the new Islamic geometric pattern witch take on consideration the rules of 'Hasba' method. This article talk about a new approach that based on given the steps to follow in order to give the "Maâlam" the possibility to take the decision of the geometric pattern is valid to adapt in a wood or not.

III. SIMPLE BLOB DETECTOR
To determine the different geometric shapes, this method [13][14][15][16][17] uses a binary picture that allows extracting the different regions that make up the picture represent the geometric pattern. The method can follow two ways of www.ijacsa.thesai.org extracting the different regions either by using 4-connectivity as shown in Fig. 2 or 8-connectivity as shown in Fig. 3.

A. Connectivity-4
This way of traversing a picture to find the different contours of the geometric shapes in the picture makes it possible to determine the corresponding neighboring pixels.
The connectivity-4 is based on the approach by flood fill that takes a binary picture in the input as shown in Fig. 4. Which represent a binary picture [18] where the value 'true' represents '1' and the value 'false' represents 0. It gives the different shapes in the output in the form of a matrix of labels as shown in Fig. 5.
In Fig. 5, the different geometric shapes in the picture represented with numeric values 0, 1 and 2. This means that the picture represent the geometric pattern, contains three regions.    1) Algorithm of the approach by flood fill: The approach by flood fill based on two matrices, the first one representing the binary picture. It can be called A. The second Matrix represents the different regions founded in the picture, called B. The main algorithm Fig. 6.

B. Connectivity-8
The approach by double course that takes the binary picture in the input and it gives as output the different regions in the form of a matrix of labels as shown in Fig. 5. This second principle scan order of raster picture based on the classical sense as shown in Fig. 6. In addition, the second course is in the opposite direction.

1) Algorithm of the approach double course:
The approach double course takes two matrices, the first one represents the binary picture previously named A. The second one represents the regions already named B. The main algorithm used in this approach to extract the geometric shapes as shown in Fig. 7.

C. Results
The identification of the regions, using the Simple Blob Detector method, takes in the input (see Fig. 8) a picture in grayscale and gives in the output the two shapes in the original picture (see Fig. 9 and Fig. 10).
The different shapes with basic proprieties( 1 , 1 ), which represent the coordinate's point of the top left corner, ( 2 , 2 ) represent the coordinates of the point in the bottom right corner, for the Shape i which i represent the number of the first shape as shown in Fig. 9.   ( 1 , 1 ) represent the coordinates of the point in the top left corner, ( 2 , 2 ) represent the coordinates of the point in the bottom right for the Shape j which j represent the number of the second shape as shown in Fig. 10.
In Table I, presented the x and y coordinates of the top left corner and the bottom right one for the two shapes, as shown in Fig. 11.

IV. PROPOSED APPROACH
In this work, the Simple Blob Detector method is used with connectivity-8 to extract the different regions [8][9] in a Hasba picture Fig. 12. In order to solve the validation problem in this kind of Islamic geometric pattern, which is the distance between two neighboring geometric shapes must be the same.
The proposed approach is focus on the first part of the problem, which is how to extract similar shapes composing a family, as shown in Fig. 13. Now, the experiment test of the approach based on detecting the different geometric shapes in 'Hasba' picture, and compute the Euclidian distance between every couple of shapes Fig. 14 and Fig. 15.

A. Similarity between Regions
In Table II, represent the coordinates (x1, y1) and (x2, y2) of the different points for the every shape i detected in the 'Hasba' picture with the Simple blob detector method.
After having detected the different coordinates x and y for each shape in the Islamic geometric pattern. The next step is to compute the Euclidian distance, using Eq. (1), between the shape i , with coordinates [( 1 , 1 ), ( 2 , 2 )] and the shape j with coordinates [( 1 , 1 ), ( 2 , 2 ) ] where (i, j) ϵ [1, n] and n represent the number of shapes in the Islamic geometric pattern.
In addition, the second distance using Eq. (2). , that means the two shapes are not necessarily similar.
After some tests, founded that there was no equality between the two distances [ , 1 , , 2 ] and the two shapes [shape i , shape j ] are similar. As shown in Table III.  To solve this problem, the distances in Eq.
(3) and Eq. (4) present in Table IV are added to solve the problem detected. , After the tests, some exceptions are founded that which the shape i and shape j are not completely similar although , 1 ≅ , 2 or , 3 ≅ , 4 .
A solution of this new problem consists on computing the distance using Eq. (5) and Eq. (6) present in Table V.
Where  Shapei and shapej are very similar.

B. Family of Similar Shapes in the Islamic Pattern
In this paper the approach, after having extracted the similar regions [10][11], a problem related to similar regions is founded. For example, if they are three regions, F1 with index 1, F2 with index 6 and F3 with index 27, the program will show that F1 is similar to F1, F1 is similar to F2, F1 is similar to F3, F2 is similar to F2, F2 is similar to F3 and F3 is similar to F3.
The objective is to eliminate the combinations F2 is similar to F2, F2 is similar to F3 and F3 is similar to F3.
To solve this problem, a set of points created, and testing whether the shape is already present in the set. If that it is so, then it not inserted in the set. Else, it will be insert it in the set of points. Table III shows the results with this method of computing the Euclidian distance among different regions.
In this subsection, which display the different family of geometric shapes, and the numbers of all shapes composing the family. Table VI shows results of different shapes in Hasba Pictures.

C. Units Display of the different Family Groups
In this subsection, witch display the results obtained through using this new proposed approach for the detection of the similar geometric shapes in Islamic geometric patterns or Hasba Pictures Fig. 16.

V. CONCLUSIONS
Many works have used the simple blob detection method to show us the different connected components in a binary picture. The problem treated in this work is not only the detection of connected components but also how to extract the similar regions in an Islamic geometric pattern. This paper presented a new approach to solve the problem: How can extract a family group of each shape in the pictures constructed with the method called 'Hasba'. In a future work, the objective is to implement new moments and apply the new detected approach to know whether a given kind of Islamic geometric patterns is valid or not.