**4. 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 *Automation of the Expertise of the Roman Mosaic Arts in Constanta: Analytical and Statistical… DOI: http://dx.doi.org/10.5772/intechopen.92679*

#### **Figure 5.**

*All the data processing flux for extracting knowledge.*

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.

#### **4.1 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:


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


#### **Table 6.**

*Variables for knowledge building.*

data within the clusters. We used, for example, another image of Roman Mosaic of Constanta containing original portions in different degradation states and portions with obvious interventions, which was classified into three classes as shown in **Figure 6**. The following are observed:


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:

• 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

*Automation of the Expertise of the Roman Mosaic Arts in Constanta: Analytical and Statistical…*

*DOI: http://dx.doi.org/10.5772/intechopen.92679*

• Mosaic has obvious intervention (class 3): Contrast is low, entropy is low,

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.

energy is high, and homogeneity is high.

*Image with classified portions, clusters, and dendrogram generated.*

medium.

**Figure 6.**

**267**


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.

*Automation of the Expertise of the Roman Mosaic Arts in Constanta: Analytical and Statistical… DOI: http://dx.doi.org/10.5772/intechopen.92679*

**Figure 6.** *Image with classified portions, clusters, and dendrogram generated.*


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.

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

*Automation of the Expertise of the Roman Mosaic Arts in Constanta: Analytical and Statistical…*

Homogeneity is a statistical measure for approximating the distribution of pixel

The fuzzy approach is fully justified for the mosaic expertise issue. First of all,

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

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

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

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:

If Contrast is Low, Medium, High ð Þ f g and Energy is Low, Medium, High f g

then Conservation is Very Poor, Poor, Good, Very Good

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

contoured details.

for restored mosaic portions.

**4.2 Estimators with fuzzy logic**

*DOI: http://dx.doi.org/10.5772/intechopen.92679*

defined approximate conditions.

*4.2.1 Designing the fuzzy estimator*

on it.

**269**

#### **Figure 7.**

*(a) Data grouping in the contrast-homogeneity plan. (b) Data grouping in the contrast-energy plan. (c) Data grouping in the contrast-entropy plan.*

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. *Automation of the Expertise of the Roman Mosaic Arts in Constanta: Analytical and Statistical… DOI: http://dx.doi.org/10.5772/intechopen.92679*

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.

#### **4.2 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.

#### *4.2.1 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:

If Contrast is Low, Medium, High ð Þ f g and Energy is Low, Medium, High f g then Conservation is Very Poor, Poor, Good, Very Good

**Figure 8.** *Membership functions of fuzzy output variables.*

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**.
