\chapter{Analysis of current state}\label{one}
The aim of my work is to extend the currently used visualization techniques in FIDENTIS Analyst application, which is a part of FIDENTIS project\footnote{More information about the FIDENTIS project can be found at \url{http://fidentis.cz/}.} dedicated to facial analysis and research. To provide background for my work I will describe the aim of the project and the current state of the application. I will also analyze the used visualizations in order to identify the space for improvement and I will present the results of discussion with anthropologists on this topic.

\section{The FIDENTIS project}
FIDENTIS is an interdisciplinary collaboration project between Laboratory of Morphology and Forensic Anthropology at Faculty of Science, Masaryk University, and Human Computer Interaction Laboratory at Faculty of Informatics, Masaryk University, targeting research of human face with primary focus on collection and analysis of 3D data. The project consists of two parts -- FIDENTIS Database and FIDENTIS Analyst.

The FIDENTIS 3D Face Database, originally published in \cite{F3DFD}, represents large dataset of 3D facial scans acquired via Vectra M1, H1 or XT imaging systems. In order to prepare data for research, the scans are pre-processed (removal of artifacts, reconstruction from more scans, etc.) by scientists before inclusion in database. The database also contains basic demographic and morphometric data. It currently consists of approximately 2,000 specimen. During my work I have used data from this database to test my results.

FIDENTIS Analyst is an application developed for morphological analyses of 3D facial models. It contains several features designed for forensic purposes, such as 3D facial composite construction, automated landmark localization and analysis of facial morphological variation. To meet various demands of facial  analysis, three different modes of model comparison were developed -- Pair comparison, Comparison with database and Batch processing. Moreover, two comparative techniques were included in each mode -- landmark based variations of Procrustes analysis \cite{gower1975generalized, myself} and surface based variations of nearest neighbor search \cite{zuzka}.

Each of the modes serves different purpose and the comparative techniques used in the application work with different data structures. Proper visual representation of comparison results is therefore crucial for accurate understanding and interpretation. In following sections I will discuss the modes of application as well as the currently used visualizations to analyze their purpose and space for possible improvement. 

\subsection{Pair comparison}
The Pair comparison mode serves for comparison of two models marked as primary and secondary. One of the goals of this method is to determine whether the two models depict the same person. Another use case is analysis of differences between the two models, e.g. for analysis of facial changes during aging process or facial variations in siblings. For these purposes it is important that the final visualization shows global differences, such as size and overall shape, as well as local differences, such as varying width of the mouth or shape of the nose.

As for the used visualization, the superimposition principle was applied here for both landmark-based and surface-based comparison. The comparison process runs in two steps -- firstly the secondary model is aligned to the primary model, then the differences are computed. In case of landmark-based comparison, the models are aligned using only landmark configurations, whereas the surface-based comparison applies Iterative Closest Point algorithm \cite{besl1992method} to entire meshes to register the models. After the registration, the models are drawn on top of each other with optional transparency, so the user can verify the alignment. However, rendering transparent intersecting objects via fixed OpenGL pipeline results in undesired artifacts, as can be seen in Figure \ref{pair} (a). On the other hand, rendering them with full opacity hides important details. 

The registration is followed by comparison itself. Here the resulting visualization differs based on the comparison method selected. For landmark-based comparison the two landmark configurations are overlaid and the landmarks are connected to approximate facial shape -- Figure \ref{pair} (b). Distance enhancement between corresponding landmarks was implemented to provide means to analyze even small local differences. Surface-based comparison computes distance from each vertex of secondary model to the nearest vertex of primary model. These distances are then mapped on secondary model in a form of color map -- Figure \ref{pair} (c). This illustrates the differences between models nicely, however since the result is mapped on the secondary model, the shape of primary model is not obvious.
\begin{figure}[h]
\centering
\scalebox{0.3}{\includegraphics{pictures/pair.png}}
\caption{Pair comparison. (a) Superimposed models after registration with visible artifacts caused by improperly handled transparency. (b) Landmark configurations after Procrustes analysis. (c)~Color map showing results of surface-based comparison.} \label{pair}
\end{figure}

\subsection{Comparison with database}
The Comparison with database mode of application serves to identify the closest match to given model (referred to as primary model) in specified dataset, e.g. comparing a model of suspect with database of criminals. It is also used for analyzing the difference between the primary model and the dataset. The same work-flow as in Pair comparison is followed here -- first registration, then comparison, however, there is no visualization for verifying the registration of more than two models. The landmark-based comparison is displayed as a~mean landmark configuration computed form dataset, with vectors displaying deviation of primary model from this mean -- Figure \ref{batch} (a). The visualization of surface-based comparison is again color map, however, this time it is mapped on average model computed from dataset and it shows the minimal distance from the vertices of average model to the vertices of primary model. 

\begin{figure}[h]
\centering
\scalebox{0.105}{\includegraphics{pictures/batch.png}}
\caption{(a) Visualization of landmark-based Comparison with database. (b) Visualization of landmark-based Batch processing. (c)~Color map on average model showing results of surface-based Batch processing.} \label{batch}
\end{figure}

\subsection{Batch processing}
The Batch processing is a mode designed for research on large sets of models. The example of typical use case of this mode is analysis of facial variations of given population. The work-flow consists of same steps as in previous modes. For landmark-based comparison all landmark configurations are displayed with mean configuration highlighted -- Figure \ref{batch} (b). As for surface-based comparison, average model is computed and for each vertex of the average model distances to the nearest vertices of each model in dataset are computed. The final per-vertex value is then calculated form these distances using one of the following techniques: Root Mean Square, Arithmetic Mean, Geometric Mean, Variance, Minimal Distance, Maximal Distance or 75 Percentile. The resulting values are again displayed as color map on the average model -- Figure \ref{batch} (c).

\section{Shortcomings of currently used visualizations}
In preparation for my work I met several times with anthropologists to discuss the biggest drawbacks of currently used visualizations, as well as the areas they would like to visualize and explore in greater detail. There are several tasks they need to perform within the application, where various visualization techniques would be beneficial: aligning the models or verifying the results of automatic alignment, analyzing shape of the models, analyzing local variability and shape differences of models, comparing models -- pairwise or within a set, analyzing variability of entire dataset, etc.

When discussing how visualizations could aid these tasks and what the currently used ones are missing, three most notable points concerning especially surface-based comparison came up:
\begin{itemize}
\item \textbf{Lack of shape information.} The currently used color map map\-ped on one model is suitable for large datasets where average model is used as basis, however the shapes of the models in dataset are lost to the observer. Therefore, at least in case of pair comparison it would be beneficial to preserve and illustrate the shape of both models.
\item \textbf{Lack of local information.} When processing larger sets of data, the color map is computed on global level -- the final color at one vertex of average mesh is always dependent on the scale computed from all the values (scale from minimal to maximal detected value). There is no possibility to limit the presented information only to specific area and display it on local scale.\item \textbf{Limited view of data.} There is basically only one type of visualization for each comparative method -- color map for surface-based methods and landmark visualizations for landmark-bas\-ed methods. There isn't any analysis tool or additional visualization for numerical data as is typical for software dedicated to data analysis. One must process the numerical data in an additional software, if one wishes to analyze the relationship between data in larger dataset more closely.
\end{itemize}