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


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.

#### **3.1 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


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

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

The automation of the expertise for mosaic investigation is possible by integrat-

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

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

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

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

ing the analysis tools in the form of an application program that will provide

solutions for classification of the mosaic surfaces by areas of interest.

the observed data based on distance metrics, in k clusters.

degree of structuring of the mosaic.

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

**3.3 Feature vectors for classification**

wrong cluster.

**3.4 Classification examples**

• The image of interest is read.

clusters.

**261**

#### **Table 2.**

*Statistical properties used for texture description.*

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.

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

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

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.

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

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


**Figure 2.** *Image of interest divided in 55 subimages.*

• The program evaluates the formal descriptors, applies the k-means classification algorithm, and performs the clustering of the results.

**Figure 3** shows graphically the results obtained for several classification solutions for different number of classes.

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.

solution in **Table 5**. The morphological analysis also reveals in this case four classes,

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

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

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

and the classification solution is presented comparative in the same table.

connection with the domain ontology.

**Figure 3.**

**263**

*Image classification and clustering.*

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

**Figure 3.** *Image classification and clustering.*

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.


#### **Table 3.**

*Classification based on morphological descriptors.*


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

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

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:

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:

In practice, different combinations can be found in the correspondence matrix

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

i. Original (artifact without intervention).

ii. Little (a small surface restoration).

iii. Possible (a multi-zone restoration).

*very good*, *good*, *poor*, and *very poor*.

of the two qualitative variables.

**265**

for knowledge construction is presented schematically.

*All the data processing flux for extracting knowledge.*

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

**4.1 Building knowledge**

**Figure 5.**

#### **Table 4.**

*Classification based on statistical texture descriptors.*

#### **Figure 4.**

*An example of classifying image partitions into two modes.*


#### **Table 5.**

*Image partitions grouped on classes.*
