Automation of the Expertise of the Roman Mosaic Arts in Constanta: Analytical and Statistical Models for a fuzzy Inference-Based System

The biggest problem faced by the specialists in the field of cultural heritage is the identification of the original elements for their separation from the large mass of the mosaic components that come from completions of the different restoration works. This chapter deals with analytical models for statistical evaluation of the morphological and chromatic characteristics that represent suitable metrics for making decisions in the field of cultural heritage. A classifier model based on fuzzy logical inference, which integrates discrete and statistical characteristics of the mosaic components, is presented. The classification will be done in a space of conventional measures (metrics) for identifying and separating the mosaic components. The exemplification of the method is made on the Roman Mosaic of Constanta, a historical monument that is currently in an advanced stage of deterioration and which requires urgent restoration-conservation interventions. This artifact dates from the third or fourth century, (possibly under the emperor Constantine the Great, 306 – 337); it is a pavement that has decorative elements specific to this marine area, part of a large construction that took place, in antiquity on three terraces, located on the Black Sea on the docks of the old Port Tomis.


Introduction
The mosaic represents a category of monumental art in which the decorative technique of assembling small pieces of ceramic materials, glass, natural stone, etc. is used by gluing them together with a suitable adhesive. The mosaic has a strong visual effect of esthetic nature and is characterized by a high resistance to wear and moisture. Thus, mosaics are an artifact commonly found in archeology specific to many cultures and civilizations since ancient times. As a decorative art and for monumental design, the mosaic technique is also present in the modern and contemporary era.
The mosaic is a component of the tangible immovable cultural heritage when it is found as a work of decorative art within monuments or archeological sites. Ancient mosaics, especially from the Roman period, represent a distinct form of monumental art frequently used on pavements. However, the archeological research of the mosaic floors raises certain problems due to the peculiarities of this type of artifact, namely, the large surface, the uneven wear of the component elements, the degradation of the decorative structure, and the chromaticity of the elements. The investigations on the cultural heritage line encounter problems related to the originality of the work as a whole and to the identification of the elements completed during the possible restorations, as well as the establishment of their chronology [1].
In general, investigations on cultural heritage involve human expertise on the one hand and the involvement of appropriate analysis technologies on the other. Currently, the field of cultural heritage research benefits from information technology in different forms-from traditional databases, digital multimedia archives, to advanced image analysis tools, big data knowledge discovery, and cognitive computing.
The involvement of computer science in archeology has been discussed since the early 1970s by James Doran in his pioneering work [2]. He points out that archeologists collect large amounts of data on complex problems in which information is poorly structured, so the use of computer applications would be indispensable. The major challenge in the field of archeological information is the management of imperfect knowledge in terms of uncertainty and incompleteness of facts. For several decades, human experts have relied on software applications for support in their decisions.
Expert systems are the most popular tools capable of performing logical deductions and automatic reasoning in distinct fields using existing facts and knowledge currently provided by human experts. Table 1 contains a presentation of knowledge-based applications of expert system type and simulation programs in the field of archeology and cultural heritage investigation, published until 1996 and cited in [3]. Over the last two decades, computer applications have evolved from standalone products to computer systems based on distributed networks and data capable of integrating and accessing multimedia information. Cognitive computing and big data are current benchmarks of information technology that give considerable impetus to the development of artificial intelligence applications in various fields, including archeology [4]. In support of information management in the field of cultural heritage, several major projects, generally funded by the European Union, have been developed.
A distinct category of projects is aimed at digitizing museums and archeological sites, for example, the SMARTMUSEUM (Cultural Heritage Knowledge Exchange Platform) project is a research and development project sponsored under the European Commission's 7th Framework (FP7-216923), as well as the multitude of applications in the field of virtual museums and virtual archeology [5]. All these information technologies together with the advancement of the physical investigation methods of the artifacts, which can provide more and more detailed data related to the nature and structure of the materials, contribute to the development of knowledge-based systems in the field of cultural heritage [6,7].
In the case of mosaics, as a kind of intangible and immovable cultural heritage, an essential activity is the expertise of the artifact status based on the data on the historical background, the artistic characteristics, the physical structure and condition, as well as possible interventions on it in a certain context. The first step of the expertise consists in collecting the data and organizing them as characteristic vectors for the classification of the studied objects. The next step is to convert the data into knowledge and make up the pieces of knowledge that will form the basis of a logical inference system for estimating the conservation status and the degree of intervention on the mosaic.

Sources for the construction of the knowledge treasure
The field of cultural heritage research is multi-and interdisciplinary. The work of the experts in this field is quite complex, having the task of identifying and documenting as accurately and completely as possible the artifacts, to monitor their condition in order to make the most appropriate decisions regarding the interventions for the maintenance and restoration of the objects. The main issue of the cultural heritage expert is knowledge management, which is mainly based on collaborative work with specialists from complementary fields: historians, archeologists, plastic artists, ethnographers, and increasingly with specialists in transversal disciplines contributing to the investigation process: chemists, physicists, geologists, biologists, as well as computer scientists. Therefore, the major effort consists in merging information from different fields in an attempt to obtain a consolidated knowledge system regarding the heritage object. Three basic steps are distinguished in the formation of a knowledge system: i. Establishing an ontology in the approached field.
ii. Collecting relevant data.
iii. Conversion of data into knowledge.
The construction of the ontology is the first stage for organizing the data and information on the path of transforming them into knowledge necessary to solve the problems of a certain domain.
The domain ontology contributes majorly to the ordering of information by describing taxonomies, naming the categories, properties, and relationships between the specific data. Creating an ontology is a challenge that faces problems related to the reliability of information in terms of trust, incompleteness, and correctness.
Another aspect is related to the automatic generation of ontologies, which is in principle completely different from the traditional "manual" generation mode performed by knowledge engineers. Automating the generation of ontologies is also a challenge launched with Semantic Web and related technology Resource Description Framework (RDF) as a specification for data modeling. In this sense, a prominent concept is the knowledge graph used by Google, and it uses the principle of web search engine to extract relevant information and return an infobox which is a subset of structured information for the searched topic. The essential feature of this type of ontological synthesis is that it is generated ad hoc based on access to online resources such as the Wikipedia encyclopedia and the Wikidata, Wikibase, and DBpedia product suite. In this way, the actual construction of the ontology practically overlaps with the ad hoc generation of knowledge by querying large amounts of data from distributed web resources. This is the operating mechanism for virtual assistant applications such as IBM Watson, Google Assistant, Amazon Alexa, Cortana from Microsoft, Bixby from Samsung, or Apple's Siri. These products invoke artificial intelligence and understand natural language but nevertheless cannot provide expert level assistance in some areas, especially due to the lack of structured information.
The main shortcoming of ontology generation applications based on web resources predefined as online encyclopedias is the insufficient refining capacity to cover the particular issue of cultural heritage. Therefore, the constitution of the ontologies specific to the different sub-branches remains an open problem, which will be solved unequally, in time, as the expert communities will carry out concrete collaborative projects. Approaches in this area are reported in the literature [8,9]. The collection of relevant data on heritage objects is a permanent activity through which systematic information is obtained, this being possible with advanced means of investigation using modern equipment for destructive and nondestructive analysis. The advantage of these methods is that they reveal new aspects, and a relative disadvantage of them would be the high cost of the equipment.
In the case of mosaics, as a decorative surface art, investigating the visual component is essential in obtaining nondestructive morphological and chromatic characteristics of the artifacts. Image-based investigations provide descriptions of the visual forms related to both the structural composition and the chromaticity of the areas of interest. By analyzing the image in the visible spectrum, a number of quantitative and qualitative nondestructive evaluations of the artifacts are possible [10,11]. They can also provide valuable information and other types of passive scans, such as X-ray scanning, fluorescence, etc., and complementary physicochemical analyses of an invasive nature, which involve the taking of small samples from the mosaic.

Automatic image analysis
Imagery is the main source of data needed to form the knowledge base of an artifact [11]. Different types of descriptors are used to characterize the outline and the interior of the interest form, topology, and morphology of the regions of interest [12], as follows: • Outline descriptors A variety of algorithms for particular descriptors in each family mentioned above are reported in the literature. The first step is to address only those specific algorithms that contribute to the best classification of the regions of interest of the mosaic surfaces.
The next step is to develop consistent knowledge based on the classification obtained. An essential step for accomplishing these steps is the integration of appropriate algorithms for the automation of the image analysis and classification process. All digital image analysis and processing algorithms are based on pixel value which depends on color, illumination, and surface quality. Therefore, information can be obtained on materials and pigments, on the degree of finishing and flatness of the mosaic pieces. The illumination of the surface of interest when acquiring the image influences globally and locally-through reflections and diffusions the value of the pixels. In principle, the image analysis is done on intensity-type images (gray level or with a single color component) and on binary images (black and withe) obtained from the first. Most descriptors, such as contour, regional, and some morphological, operate only on binary images. Thus, the results of the image analysis are strongly dependent on the level of the reference threshold used to separate the gray levels into black and white. The choice of the reference threshold is generally a compromise, its value being influenced by external factors such as ambient lighting, directional light sources, and camera position at the time of image acquisition. In these conditions it is preferable to use those methods of analysis that do not depend on the conversion threshold and operate with measures applied to the intensity images. The basic requirement is to get the best quality images.

Texture descriptors
A defining visual feature for the morphological characterization of the mosaic is considered the texture. The strongest descriptors for texture are in the category of statistics: contrast, energy, homogeneity, and entropy; they form a vector of statistical characteristics or texture attributes [12,13]. In summary they are formally described in Table 2.
We mention that the statistical measures of contrast, energy, and homogeneity are calculated based on the gray-level co-occurrence matrix (GLCM) derived from the image intensity of interest [13].
The analysis of the chromatic characteristics of the mosaic can provide essential information about general and local wear, about possible restoration interventions. Chromatic analysis is applied independently of texture analysis and uses histograms of perceptual components of HSV [10]. This proves a method available to the expert for the detailed analysis in the comparative study of various pieces or particular mosaic areas.

Morphological image descriptors
An image can be considered as an assembly (a lot of component parts) having a similarity of variable topological shape and regularity. The morphological analysis of the image approaches the notion of form by applying transformations consisting of (i) extracting some simpler relevant forms called structural elements, from the complex forms of the image, and (ii) comparing some classes of structuring elements with the elements of the image. Structural elements can be considered as regular polygonal shapes such as square, rectangle, rhombus or octagon, as well as the round disk type. Their size is defined by a single dimensional parameter. An interesting structural element used in our approach is the linear one, in the form of the right-hand segment whose size is controlled by two parameters: its length and its orientation angle, measured against the horizontal axis in the opposite direction to the clockwise. The application of the morphological descriptor on an intensity image with gray levels leads to a transformation of it as shown in Figure 1.

Property Formula Notes
Contrast P i P j i À j ð Þ 2 p i, j ð Þ Give a measure of the intensity contrast between the current pixel p(i,j) and its neighbor, applying over the whole image Give the sum of squared pixels value Give a measure of the closeness of distributions of pixel values to matrix diagonal Þ Give the scalar value of the entropy of the whole image Table 2.
Statistical properties used for texture description. This descriptor is useful in classifying the images of interest as a discriminator for the variation of the cumulative intensity of the pixels according to the length and orientation of the linear structuring element. An algorithm for calculating this discriminator involves calculating the intensity of the pixels for the entire range of lengths and all the angular positions of the structuring element and detecting the maximum intensity variation. The classification of the images evaluated according to the pair (length, angle) of the structuring element (star) gives us a measure of the degree of structuring of the mosaic.
The automation of the expertise for mosaic investigation is possible by integrating the analysis tools in the form of an application program that will provide solutions for classification of the mosaic surfaces by areas of interest.

Feature vectors for classification
Feature vectors are composed of elements representing statistical measures of the analyzed image. In our study we considered the four descriptors for texture as defined in Table 2. They are the basic vector for classifying a set of N images of the same size, obtained by dividing the image of interest. The proper classification consists of applying the k-means clustering algorithm, which evaluates a possible group structure in the data observed for the four descriptors. Thus, proposing a number of k classes in which the given images could fit, the algorithm distributes the observed data based on distance metrics, in k clusters.
An important aspect for classification is the characterization of clusters in terms of their size, dispersion, and separation. The silhouette of the cluster is dimensionally characterized by the number of elements (objects) that compose it and the value of the silhouette-a number that designates the extent to which a particular object belongs to that cluster. A common dimensional measure of clusters is the average of the silhouette values, the situation being better if the average is higher. Clusters of elements with the values of the closest figure represent a good solution, while values of 0 or even negative denote a confusing belonging of the respective element to one cluster or another or belonging to a wrong cluster.
Clusters can also be characterized in the plane of the characteristic variables, by 2D representations of the points for characteristics taken by two, showing much more clearly the dispersion of data within each cluster by their grouping in relation to the center or weight and possibly the degree of overlap of some clusters.

Classification examples
Let be the working image taken from Roman Mosaic of Constanta, presented in Figure 2, that we propose to classify using the vector of texture characteristics and morphological descriptors. This operation will be performed automatically with the help of an application program developed in MATLAB that uses special functions for image processing [13]. The working steps of the program are as follows: • The image of interest is read.
• The number of the image division is given by horizontal (n_x) and vertical (n_y) to obtain K_max = n_x Â n_y subimages to be analyzed.
• The number of classes k_classes proposed for classification is given. • The program evaluates the formal descriptors, applies the k-means classification algorithm, and performs the clustering of the results. If the number of partitions of the image of interest is changed, the classification solutions change accordingly. The following are two situations: for 9, respectively, 16 partitions of the same original image. Table 3 presents the classification result for the original image divided into nine images of interest based on the structural morphological descriptors, resulting in four classes. Comparatively, classification, based on the vector of texture descriptors in three classes, generates the solution from Table 4. Figure 4 shows how the classification is based on the two categories of descriptors.
A new classification test for the same mosaic portion divided into 16 areas (images) of interest, for k = 3 belonging classes for texture analysis, reveals the solution in Table 5. The morphological analysis also reveals in this case four classes, and the classification solution is presented comparative in the same table.
Some differences can be noted due to the different numbers of classes and the different natures of the descriptors used in the two cases presented. It is not a question of judging whether one classification or another is correct but rather to explain the plausibility of the solutions obtained. The plausibility of a classification solution is ultimately verified by the human expert who uses visual perception in connection with the domain ontology.

The system of knowledge inference
The step of converting the data into knowledge is done by interpreting the clusters obtained after classification in the space of the descriptors in correlation with elements of the ontology in the mosaic field. Thus, the relationships between the mosaic descriptors generate different classification solutions that will logically Class no. Image partition no. Strel parameters (length, angle) connect with conclusions regarding the current conservation status of the mosaic, respectively the degree of intervention on it. In Figure 5, the process of data fusion for knowledge construction is presented schematically.

Building knowledge
The main technique used here for representing knowledge is based on rules that operate with hypothesis-type and conclusion-type sentences. A rule is an assertion with the generic structure If () -Then () implementing a conditional relationship between a premise and a consequence. The linguistic terms for the construction of sentences in the composition of the rules are the names of the quantitative descriptors of image analysis, as well as qualitative attributes regarding the state of the artifact and the restoration intervention on it. These linguistic terms are actually variables defined on numerical discourse domains and make the connection between numerical and knowledge space. There are input variables in the premise part of the rules and output variables in the conclusion part. The input variables are of a physical type defined on real numerical discourse domains, while the output variables are more or less qualitative and are represented on conventional definition domains. Table 6 presents the variables manipulated in the knowledge formation process for the characterization of the mosaic and their fields of description.
The intervention on the mosaic has the following classes: i. Original (artifact without intervention).
ii. Little (a small surface restoration).
iv. Obvious (a larger surface restoration), which can be right or incorrect.
The current state of conservation of the mosaic has the following four classes: very good, good, poor, and very poor.
In practice, different combinations can be found in the correspondence matrix of the two qualitative variables.
The representation of knowledge in the form of rules is based on the cause-effect relationships observed between the input and output variables. Following the experiments, the relationships between the image descriptors were monitored, and the sensitivity and consistency of the dependencies were identified by analyzing the clusters from the perspective of their separation (distinction) and the scattering of c. Class 3 is the most restricted in this case; it contains only two portions where it is intervened obviously, incorrectly.
The dendrogram (Figure 6c) provides useful information on the relatedness (relationships in terms of similarity) of the analyzed images.
Analyzing the dependencies of the data in the descriptor space, it is found that the most distinct groups are noted in the following relations: • Contrast vs. homogeneity (see Figure 7a) • Contrast vs. energy (see Figure 7b) • Contrast vs. entropy (see Figure 7c) Therefore, these dependencies provide us with the first source of facts for constituting knowledge. The following sentences link the numerical data with the expert's observations: • Mosaic is well preserved (class 2): Contrast is high, entropy is high, energy is low, and homogeneity is low.  Table 6.
Variables for knowledge building.
• Mosaic is poorly preserved (class 1): Contrast is medium (i.e., lower than in the previous class), entropy is medium, energy is medium, and homogeneity is medium.
• Mosaic has obvious intervention (class 3): Contrast is low, entropy is low, energy is high, and homogeneity is high.
Some interpretations on the statistic descriptors are given in following in order to provide a better understanding of their meanings in this study. The entropy is probably the most popular descriptor in information theory counting the randomness of a system states. It is conceptually close related on entropy thermodynamics in terms of order and disorder in a multiparticle system. Basically, high entropy denotes disorder, a lot of diversity, so a wealth of details. Usually, the degradation of artifacts leads to the loss of original details which is reflected in lower entropy.

13
Automation of the Expertise of the Roman Mosaic Arts in Constanta: Analytical and Statistical… DOI: http://dx.doi.org /10.5772/intechopen.92679 Thus, in the case of the studied mosaic artifact, it is observed that the entropy decreases in the areas susceptible to degradation due to wear or lack of elements. Moreover, the entropy is even lower in the case of coarse restoration interventions. However, entropy is not an absolute indicator to quantify the integrity of the mosaic texture. Some confusion is possible if entropy is considered as the only descriptor, and therefore contrast is considered as a descriptor of discrimination. Contrast is a measure of the difference in intensity of a pixel in the image relative to its neighbor, which is calculated over the entire image. For a constant image, the contrast is zero. Therefore, the contrast is higher for mosaic areas with many better contoured details.
Homogeneity is a statistical measure for approximating the distribution of pixel values in relation to the diagonal of the gray-level co-occurrence matrix. For a purely diagonal matrix, the homogeneity has a maximum value of 1. This makes the surfaces without morphological and chromatic details to have high homogeneity.
Finally, energy is a global indicator of the image that increases with its chromatic intensity and uniformity. Therefore, the energy is higher on evenly colored portions and decreases in proportion to the complexity of the texture details. A constant image has a maximum energy of 1. Energy can be a good discriminating indicator for restored mosaic portions.

Estimators with fuzzy logic
The fuzzy approach is fully justified for the mosaic expertise issue. First of all, the fuzzy logic works well with the uncertainty of the decision model and in conditions of uncertainty of the numerical data. Fuzzy logic treats physical and qualitative variables by providing a consistent and robust response in roughly defined approximate conditions.
The current state of conservation of the mosaic is a qualitative, subjective attribute, which can be conventionally quantified on a rating scale from 0 to 10, zero corresponding to "very poor" and grade 10 to "very good." The intervention is also a qualitative characteristic that can be evaluated quantitatively by the extent of the restored areas. When the intervention is certain, the question arises to evaluate whether the restoration was correct or incorrect. The correctness of the mosaic restoration is also a qualitative attribute, but which can be evaluated quantitatively in comparison with original areas. The metrics used for the qualitative evaluation of the mosaic result from the automatic classifications based on image descriptors in numerical form that will serve as inputs for estimators with fuzzy logic.
In principle, a system of fuzzy estimators consisting of independent blocks for partial decisions will be built, which will be linked to generate the final decision regarding the state of conservation of the mosaic, respectively the intervention on it.

Designing the fuzzy estimator
The proposed estimator operates with three input variables: two texture descriptors of the evaluated image (contrast and energy) and a quantifier for the consistency of the class, respectively the width of the cluster to which the evaluated image belongs. Input variables are described by fuzzy sets defined on real numeric fields of speech. The output variables (from the conclusions) are described by fuzzy sets on conventional definition fields for the current state of conservation, respectively, for the degree of intervention, as shown in Figure 8. The generic assertion for constructing the first fuzzy inference block will be of the following form: The third variable results from the automatic classification and represents the size of the class in which the evaluated image falls, being quantified by the width of the cluster of the respective class, as a percentage in relation to the total number of elements. This variable intervenes with the output of the first block, as an input to the second block of the fuzzy system, which estimates the degree of intervention on the mosaic. The generic assertion for the second fuzzy inference block is as follows: If Conservation is Very Poor, Poor, Good, Very Good È É À Á and Cluster_Width is Small, Medium, Big f g ð Þ then Intervention is Obvious, Possible, Little, Original f g ð Þ The design of the blocks with fuzzy logic and the implementation of the functional model was done with the Fuzzy Logic Toolbox and the Simulink package in the MATLAB programming environment. The functional system, which estimates, based on the input data resulted from the processing of the image of interest-the conservation status and the intervention level-is shown in Figure 9.

Results and interpretation
With the help of the software modules for processing and decision based on fuzzy logic presented above, the mosaic in Figure 10 was evaluated resulting in the graphs presented in Figure 11 with the notes for the Kmax = 25 portions of the artifact.
First we observe a few peaks on the conservation curve (circle markers) that corresponds to the images with the numbers 3, 6, 10, 11, 13, 16, 21, 22, and 23. They are all above the level 6.7, which belongs to the class good. Two of them, 11 and 23, are qualified towards very good class. Other remarkable points on the same curve denote minimal values (square markers) that correspond to images 1 and 25, which are qualified as poor and very poor, respectively. The low grades also have the  images with numbers 5 and 20 but also 2 and 24. All these belong rather to the poor image class.
The interpretation of intervention curve reveals some peaks, which, however, do not exceed grade 5 as are images 11 and 23. They show the best preserved parts of mosaic but few interventions are not excluded. On the contrary, the points marked with red points denote possible interventions for images that were already qualified as poor. These images are 1, 2, 5, 20, 24, and 25 that were detected with obvious level of intervention and visually confirmed as such.

Conclusions
Automatic analysis of images with mosaic-type artifacts and automatic classification of images of interest is sustainable and efficient. The mathematical tools for