Abstract
Recent researches have proved a direct relationship between data gathered from retinal images and some pathologies such as hypertension or diabetes. There are a lot of studies that propose methods used in this particular area of investigation. They are based on image processing algorithms to extract retinal information, but there is no general accepted methodology to obtain the information automatically. In this work, a new methodology for the classification of retinal vessels based on agreement technologies and artificial vision techniques is presented. The proposed methodology has been evaluated by expert users and compared with other existing free software with similar features.
Introduction
The information that is acquired from blood vessels is relevant to try to detect some kind of diseases. Some of these diseases affect the morphology of the vessel tree itself, such as retinopathy of prematurity. Through retinal images, it is possible to see the blood vessels. Thanks to this type of images obtained from the fundus, medical experts are able to detect certain anomalies associated with diseases that would not be seen at first glance.
Techniques and algorithms of digital image processing of fundus images have been proposed in recent years in order to make better the measurement of retinal vessel parameters, and then discover the relationship of retinal vessels with cardiovascular diseases [31,34]. However, there is no validated automatic methodology or technique that can acquire all the necessary data and relate the extracted parameters with pathologies.
To obtain the relevant information that medical experts use in their diagnostic processes in a way that is as automatic as possible, and therefore, improving the productivity of these experts, in this research it is proposed the use of a collaborative agent-based architecture for the execution of different artificial vision techniques needed in the retinal image processing. The objective of this work is to obtain different measurements that have been proved to be related to pathologies. For instance, the arteriovenous index (or just AV index) is a parameter that represents the relationship between the arteries caliber and the veins caliber, and it has been proved to be related to diabetic retinopathy.
To carry out this objective, the first phase to be carried out is the vasculature segmentation, which provides the vessel structure apart from the retinal background. Agents must collaborate to identify every vessel and classify them according to their type: vein or artery. This classification is one of the most difficult processes in the retinal image analysis process, not only for the applied techniques of image analysis but also for the medical experts who have to carry out their manual classification work, because, among other factors, each image is different (in terms of color, brightness, background, etc.).
In order to obtain the relevant measures for the medical expert, the image analysis usually involves different phases, which include the segmentation of the vessels, for their subsequent classification, identification and measurement of the same.
As the vessel identification phase is obviously based on the vasculature segmentation phase, every step is important for the final result. Previous results for the vessel identification phase are expected to improve with the tool that implements the proposed methodology [9].
Following the investigation carried out, this article presents the advances carried out in the same, in which Multi-Agent Systems (MASs) and Agreement technologies (AT) have been introduced because software such as the one proposed requires high levels of collaboration and therefore, intelligence, so that the final classification is as accurate as possible. Agents proposed will have to negotiate to propose the most accurate result. The agents of the proposed architecture will have to carry out a negotiation process in which, taking into account the expert knowledge of each one of them, they will decide the final classification of the retinal vessels, thus improving the classification carried out so far (individually or manually by the medical expert).
The phases through which a retinal image passes along with the proposed methodology and the improvements for the classification are presented in the following sections. In addition, once the final classification has been carried out, and every blood vessel in the image has been detected and identified, relevant parameters related to its morphology, such as thickness, area or length, are extracted and retained in order to maintain a complete database and find a relationship with illnesses in future works.
The proposed methodology has been implemented to be evaluated and the result is a software tool called ALTAIR (Automatic Image Analyzer to Assess Retinal Vessel Caliber). This is the second version (v2) of the software tool, which includes the MAS approach as the main modification (first version was a sequential application without agents [9]). In this version is necessary to differentiate two significant contributions. Firstly, the agent-based architecture implemented, which considers that a distributed computing and involving entities of very diverse type is appropriate for retinal image analysis. Secondly, the proposed methodology includes different phases and different visual analysis techniques that agents can use. This work presents an improvement in the software process, replacing the collaboration among human experts by a collaboration and negotiation between agents of the software system in the classification phase. The result of implementing this new methodology in the MAS is called ALTAIR (v2).
The structure of the presented article is the following: a technical overview of the present published researches that guide to the development of this work is shown in the next section. Then, the proposed system is described in Sections 3 and 4. The sections detail the based-agent architecture and the image processing techniques applied to extract the information from retinal images. Section 4 is an individual section for the classification phase, in which the negotiation process is carried out. Then, the results obtained with this system are exposed, followed by conclusions and lines of future work.
Technical overview
This section presents a summary of all techniques involved in the development of this work. On the one hand, it is widely known that there are many works related to obtaining information from retinal images. This review is focused on the work that tries to automate, semi-automate or automate part of the process of obtaining this information. On the other hand, AI (Artificial Intelligence) techniques applied to e-health fields as the present work, are becoming more abundant. Section 2.2 focuses on how the techniques chosen, in this case, virtual agent organizations (VO), are used successfully and can favor the process that follows the system presented in this article.
Retinal vessels researches
The digital colour fundus photographs are an innocuous and non invasive technique to obtain the retinal vascular tree. Fundus examination is a non-invasive evaluation of the vascular damage caused by multiple factors. The damage can be observed clearly in the colour fundus images, microaneurysms, neovascularizations, hemorrhages, venous beading, hard exudates, macular oedema, etc. This paper focuses on automatic retinal vessels segmentation in 2D colour fundus image. Photographs taken by a fundus camera provide a clear image of the retina in which medical experts can discern blood vessels, their thickness, length, positioning, etc. to diagnose pathologies such as stroke [52], arterial damage [47], metabolic syndrome [50], etc.
The research field that connecting retinal blood vessels and pathologies is not a recent discovery; retinal images have been used and analyzed manually for decades [15]. The current novelty is that these studies can now use computer visualization techniques that were not previously available. Today, computer-based visual analysis is used to detect the vessel structure in retinal images. Different works, including [53] and [20], suggest the application of morphological methods like erosion or dilation [45], which are widely used when extracting different kinds of characteristics from images with a previously known shape. Algorithms based on adaptive filtering techniques to highlight the vessels and detect them easily have been used too in works such as [10]. These algorithms normally are systems with a linear filter that has a transfer function controlled by variable parameters and a means to adjust those parameters according to an optimization algorithm. Adaptive filters are used in applications in which some parameters of the desired processing operation are not known in advance or are changing. There are others methodologies such as [33] or that proposed in [16] for the detection of diabetic retinopathy, that follow a four block analysis that includes a preprocessing step, a shape estimation step, a feature extraction step and a classification step. However, existing works usually only apply one technique in every step. In this work it will be possible observe how the results can be improved by combining more than one techniques in every step.
A method using linear operators and Support vector machines (SVM) is shown in [38]. [44] presented a supervised method for retinal vessel segmentation. In [46] is described a segmentation method based on image ridges extraction.The authors acquired a fundus image database named DRIVE from a screening program, which is widely used for the testing of fundus images processing technology.
There are supervised methods for retinal vessel detection using Artificial Neural networks (ANN) such as [32]. The retinal photograph is represented by a 7-D feature vector composed of gray-level and moment invariants-based features. And in [19] is proposed a method of retinal vessel segmentation using multilayer perceptron ANN. A summary of the technologies applied by other methodologies for the analysis of retinal images can be found in [49].
Part of the medical group that collaborated in this research was previously involved in the development of another software tool (AVIndex [25]) which obtain information similar to that extracted with the software tool proposed in this work. However, the medical team realized that it was incomplete because data related to the area, length or vessel position were missing, and the analyzed area was not large enough to discover relationships with pathologies. These difficulties have been solved and refined in the investigations carried out and here the most complete version of the proposed system is shown.
Agreement technologies and multi-agent systems in e-health
The application of ICTs (Information and Communication Technologies) in healthcare is known as e-Health, electronic health, medical technology or telemedicine, among others. The new rationalization and efficiency philosophy adopted nowadays in medicine, together with the quick evolution of ICTs is mostly responsible for the e-health [17].
Every health area is susceptible to improve economically as well as when consuming resources or offering facilities to the patients. Medical equipment is probably the main area where a better scope for improving is offered. e-health is a great open environment distinguished by shared and distributed decision making and management of care requiring the communication and coordination of complex and diverse forms of information between involved organizations and people. Therefore, both MASs and health-care can have advantages from their joint: MASs have the suitable features for the modeling and performance of current and future health care applications; health-care scenarios offer the suitable requirements for experimenting at best the multi-agent technologies and, so, for giving a significant contribution to their success and evolution. The agents have characteristics such as autonomy, reactivity, reasoning, social abilities and pro-activity which make them appropriate for developing distributed systems based on highly dynamic scenarios. Software agents have been widely used for decades as a solution to solve complex problems and more recently they have been used to solve e-health problems [5,21].
Within the current tendency in development of MASs is possible to observe the use of organizational concepts in their design, which helps to focus their work in the field of e-health, since they establish a connection between a medical organizations and an organization at the software agent level with regards to structure, functionality, etc. Virtual organizations [18] are a way of understanding system models from a sociological perspective, which is closely related to the area in question. From a business perspective, a virtual organization model is based on the principles of cooperation among businesses within a shared network, and take advantage of the heterogeneous elements that provide the flexibility and quick response capability that form the strategy aimed at customer satisfaction.
Virtual Organizations of agents (VO) [41] consider social integration and performance aspects that must be taken into account when functionalities are created outside the system. Social integration is understood as the way agents organize themselves in the system in the form of a society. They can form coalitions, groups or sub-organizations with different objectives to be carried out in the system [39]. Performance aspects are understood as all the aspects that influence the performance of the system (interoperability, integration of other components, etc.). In this sense, functionalities are created outside the system is understood all modules or software components that can be implemented outside the MAS, for example, another segmentation module.
VO are aimed at the interoperability between different systems, distribution of resources, and the lack of dependency of programming languages [41]. Functionalities are linked by means of standard communication protocols that must be used by applications in order to share resources in the network. The compatibility and management of messages between functionalities is an important and complex element in any of these approaches.
However, the development of a MAS, either from the traditional point of view, or from an organizational point of view, can be an extensive process. Especially when there are very different techniques to apply by agents. In this case, the algorithms of identification and image processing require special characteristics in which the agents have to work as heterogeneous entities. During this process, it is convenient to utilize other kind of techniques, such as AT tools [3,36].
Agreement is one of the critical social concepts that helps human agents to face with their social environment and is in all human interactions. In fact, without agreement there is no cooperation and ultimately social systems cannot emerge. AT is a new approach of Distributed Artificial Intelligence for implementing large-scale open distributed computer systems. It is focused on techniques that enable software components to achieve agreements on the mutual performance of service.
AT can be successfully applied in a large number of domains [8,35] to solve complex and dynamic runtime problems. In [35] is analyzed the concept of agreement from a computing perspective. In particular, the capability of software components to dynamically forge and execute agreements at run-time, and the emerging field of agreement Technologies for the construction of large-scale open distributed software systems. This is the case of vessel identification, where agents have to determine the vessel type taking into account different parameters (defined by the retina morphology) and negotiate to reach a global agreement regarding their type. Such tools facilitate and improve the overall process, making the end result a consensus among all experts in the system, in this case, the agents of the organization.
Agent-based architecture for classification
The proposed architecture is based on a novelty methodology specifically designed and developed for the present work. Although this methodology follows an analogous schema to the one used by other studies and works, as shown in [49], the whole of techniques applied in every phase are novel.
The proposed architecture follows an approach based on agents, in which the functionalities can be distributed and also carried out independently, but with a common goal. The agents collaborate within a virtual organization and are independent and heterogeneous entities, and therefore, can apply at each step the techniques for which they are specialized. It is even possible to introduce very simple new processing techniques into the architecture.

Agents organized by stages.
The steps to be followed when the analysis of the retina is carried out, are sequential, but each of these steps can be carried out individually, even in parallel and using different techniques and algorithms. Each agent can use different techniques of filtering, classification or segmentation among other. Agents are included in a system based on virtual organizations called PANGEA [43]. That is, MAS is created with a defined structure, roles and norms [14,40–42]. This means that all functionalities, communication and input / output of system entities are controlled. For example, if it were necessary to add an agent capable of locating the optic disk in a different way than the system does now, it would only be necessary to specify in the MAS the role of that new agent (independently of the program language in which is implemented), and how provides its services by defining its input/output (in this case the optic disk location). At every step of the process one or more agent can take part. When more than one agent executes one step for the same task, the input is the same, although each one can have its own output. In some cases, agents will have to use agreement technologies to propose the output that is best suited for the desired result. The communication between the agents and the operation of the system would already be provided by the platform following the specifications of [43]. The communication between agents in PANGEA is based on the FIPA/ACL protocol. PANGEA is a service-oriented platform that allows the implementation of open MASs to take maximum advantage of the distribution of resources. To this end, all services are implemented as Web Services. Due to its service orientation, different tools modelled with agents that consume Web services can be integrated and operated from the platform, regardless of their physical location or implementation [54].
The proposed methodology uses eight states or steps as a baseline for extracting the information. The output of the previous state is considered as the input for the next state, as can be seen Fig. 1. In the figure can be observed, in addition to the steps followed in the methodology, the agents of the architecture involved in each one of them. These agents will be described in detail in this section.

Fundus retinography preprocessing.

Retina location.
Finally, before beginning to detail each of the entities of the system, say that the retinal images used in the present study have been taken by a commercial fundus camera whose model is irrelevant for the system, given that any fundus camera can be used to get the images. The reason for this is that the analysis only requires a suitable resolution (height from 600px). Features such as the scale, relationship between pixels, and real measure, are characteristics that all fundus camera manufactures should provide and with which the system can adapt.
The following subsections detail the steps followed in the methodology and the collaboration between the agents of the proposed architecture to carry them out. Step 7 of vessel classification will be the one that includes the process of negotiation between agents, in this case type VesselType and VesselManager to reach the final classification.
Image uploading
The first step of the system make a connection between the selected retina image with a concrete patient. This initial step is necessary because, to accomplish different analyses or studies linking the extracted information with the pathologies, the system must be able to associate that information with the patient in order to study the relationship with the patient’s clinical history. In the MAS, this action is executed by the
Image preprocessing
Then the system changes to a state of “Image preprocessing” where the image is processed by the
The result of this preprocessing step can be seen in the top middle of Fig. 2, where the original RGB image a) is directly converted to grayscale b) and converted by using a filtered combination c). This combination mixes red (R), green (G) and blue (B) channels in a specific mode to highlight the difference between blood vessels and the background to improve the analysis results.

Optic disc alignments.

Retina and optic disc size relationship.
The color of every pixel is analyzed to find a substantially color change that belongs to a blob big enough to be considered as the retina. This procedure, known such as detecting of edges, is executed for every row, which detects both the top and the bottom points of the retina. The agent then acts in the same way with the columns to detect horizontal retina limits.
Locating optic disk
The papilla or optic disc is another important element in the photograph that has to be situated. All the blood vessels access the eye through the optic disc. Vessels inside the optic disc are too close to detect their morphology individually, so the analysis starts from its edge. The localization step is executed by the
Fundus images can be taken with the optic disc oriented in different ways:
with the optic disc in left or right side (Fig. 4i)
with the macula centered (Fig. 4ii) or
with the optic disc centered (Fig. 4iii)
In this case, for the study, we require to obtain as much information as possible, and therefore, only the images with the optic disc in the middle are considered, because the Region Of Interest (ROI) has no hidden parts.
The ROI where the analysis is executed is defined as the area from the optic disc border and its concentric circle whose radius is three times higher. With this definition, the analysis area will be different for every retina image as the size ratio of optic disc size can vary from 1:8 the retina size to 1:6 optic to retina size. Therefore, this is the radius value that has been established for all of them. An example of this relationship is shown in Fig. 5.
The optic disc is now located by applying pixel intensity, adaptive thresholding and morphologic filters to locate the lighter blob with the optic disc morphology. Its center of mass is defined as the middle of the circle that contains the optic disc. The result of every filter can be seen in Fig. 6.

Visual analysis steps of algorithm for optic disc location.
Once the area containing all the data to extract is determined and the location of the optic disc is known, the eye side (left or right) can be determined. This information can be interesting when analyzing the results. The

Eye identification step.

Segmentation step.
At this point of the methodology, the system knows all the information to segment the vasculature in the “Segmenting vessels” state, whose output will be the vascular structure separate from the background. This process requires the participation of more than one agent. More specifically, the Blur Agent executes different Gaussian filters so that blood vessels are mixed with the background. This will result in an image like the one shown in Fig. 8 a. The agent then detects the points of the new image with highest color difference from the same point in the grayscale image. It generates a binary image with those points (Fig. 8 b), which is analyzed by the
final, with just one neighbor,
normal, with two neighbors
branch, with three neighbors
intersection, with four neighbors.
Every detected vessel is fragmented in a series of segments which are analyzed individually. Every segment is a set of every point between pairs of point final-final, branch-final, branch-branch, branch-cross, cross-cross and cross-final. On the other hand, full vessels (both veins and arteries) are points between a pair final-final with one or more chained segments. The followed process to get all the segments is described by the Algorithm 1.

Extraction of skeleton vessels and segmentation
At this point of the proposed methodology, all blood vessels have been detected and tagged. It is time to carry out the classification, that is, to know if the detected blood vessel is a vein or artery. Once the blood vessels have been segmented and individually identified, the system proceeds with their classification as vein or artery. The vessel color is the only measurable parameter that differentiates veins and arteries in retinal images. This means that the classification is very variable, depending on the medical expert, the background of the vessel and other factors such as the brightness or the overall color of the image. Vessel color cannot be the only parameter taken into account because color depends on the lightness of that area of the image (for example, all vessels close to the macula are usually darker), so the vessel’s closest background color has to be measured too in order to evaluate the vessel type. Other parameters are sometimes used as the thickness. The mean thickness of all the veins is usually higher than that of the arteries, but some arteries can be thicker than some veins, so thickness cannot be used to classify the vessels.
This step is usually carried out by human experts who carry out this classification. In this study, a methodology based on agents and agreement is proposed to carry it out the classification. As it is a complex step and one of the significant contributions of this article, it is described in detail in Section 4.
Measuring
Finally, as can be seen in Fig. 1, the last step after the classification is when the
Classification phase
The retina morphology plays also an important role in this step of the methodology. All images should follow three basic rules:
there must be both veins and arteries;
the number of arteries and veins must be similar (there is always at least a 40% of the total vessels that are veins or arteries, and the other % is associated to the other vessel type);
both veins and arteries should be in the northern as well as the southern half of the image because they always follow that pattern.
This classification step is usually carried out by human experts that follow the rules listed above. It is a complex and subjetive step that usually varies depending on the expert who carries it out. In this study, a methodology based on agents and agreement is proposed to carry it out the classification.
Several VesselType agents are launched in the system, each one of which is associated with one area of the image as explained below, and one VesselManager agent. Each VesselType agent is responsible for obtaining both the vessel and the background tonality information (mean value). The negotiation between every agent now begins, coordinated by the VesselManager agent. An agreement must be reached to provide one result with the classification of every vessel as a vein or an artery.
Depending on the opinion of medical experts and taking into account previous experience [9], a same retinal image can give different results in the classification phase. Different medical experts, facing the same image, can give different assessments to decide if a blood vessel is a vein or an artery. Although in most cases they usually coincide, in case of doubt the opinion of a second or third expert is requested. As with manual valuation, in this phase, it is decisive for the system to consider the different results obtained by the agents and including a complex process such as negotiation. A negotiation process, in which each agent can classify according its parameters and a final classification obtained, is necessary in the system. Each agent, meanwhile, can use the technique of classification for which it is implemented.
Agents in this tool were originally designed as single entities, but within the collaborative agent-based approach, a different design has become possible. In addition to continuing the need for multiple services and functionalities continues, a coordination problem is added. Several Vessel Type agents will have to agree on the final classification of a blood vessel. The vessel classification process can be shown as a way to present the operational capabilities of a VesselType agent (or a collection thereof).
Communication between agents makes it possible to synchronize actions, send and receive knowledge, resolve conflicts in solving a task, etc. Meanwhile, negotiations can be described as social norms that impose a standard behavior for agents that avoid conflicts [7]. It is a process where each negotiator evaluates information from their own perspective, and there is a final decision made by mutual agreement. In this case, there is a negotiation between VesselType agents to carry out a classification of the vessel according to its type (vein or artery). The process below describes the formalization of the negotiation process.
During the development of this work, a trading strategy is carried out, where there are different proposals and a unilateral agreement in which a negotiator agent takes control to reach the final resolution, in this case the classification. There are several models of negotiation [3,41]. In this case it is centralized. There is a negotiation cycle in which VesselType agents start proposing a solution to the conflict, then discuss other possibilities, taking their preferences into account, and finally updating the storage solutions according to the final preferences.
Agents coordination model
This study presents a coordination model that employs a cooperative MAS in which each agent is capable of determining results dynamically in order to achieve its objectives. Moreover, there is a global mechanism that can optimally assign a final result to the agents so that they can work in a coordinated effort. The global mechanism considers the global objective of the group of agents. VesselType agents present a deliberative CBR-BDI (Case Based Reasoning – Belief Desire Intentions) [13] agent architecture to construct the negotiation model.
A BDI agent emphasizes the reasoning process directed at an action, i.e., determining what the agent should do [6,12,51]. This process suppose two fundamental phases:
determining which goals should be achieved (deliberation) and
deciding how to reach these goals (planning).
Both processes should be carried out by taking into account the limited resources of each agent. In other words, the reasoning processes should consider the restrictions imposed within the system for selecting the actions in an effective manner.
BDI architectures present interesting features that can deal with situations involving high level coordination among the agents available at a given time, and suggest the necessary extensions for this model, thus allowing the agents to engage in the correct social behavior [41].
The model proposed in this research incorporates a kind of agent capable of classifying from the perspective of an agent organization. This particular agent is a deliberative CBR-BDI agent [13]. The principal feature of this agent is the ability to integrate a CBR reasoning mechanism [1]. A CBR system launch a reasoning cycle that includes four sequential steps: retrieve, reuse, revise and retain. This cycle is incorporated within the activities of the BDI agent [13]. and identifies the phases as tasks or roles that the agent should be able to perform. This composes for one of the primary deficiencies in the BDI model, which involves the manner in which memory and past experiences are handled. Authors in [4,26] used specifically Beliefs, Desires and Intentions, to be able to obtain a representation of the case and initiate the CBR reasoning cycle. To integrate the CBR reasoning model within the structure of a deliberative BDI agent, [12,22,23] and [26] present a formula that can relate the concept of case to the fundamental concepts of BDI. The coordination of tasks that are combined to solve a common problem requires either a centralized or distributed type of classifying that can be carried out by the system agents themselves. This constitutes an open problem for which traditional classifying systems are inadequate. It is necessary to have a classifying feature that can adapt to these circumstances.
The agent-based architecture presented in this study includes a group of agents whose aim is to offer a classification vessel to the users. This group of agents is implemented by using the CBR-BDI model. The agent roles, represented in Fig. 9, necessary to carry out the methodology presented with all the proposed phases are:

Coordination problem between VesselType Agents and VesselManager Agent.
VesselType agents can produce a classification for the vessel identified in its area of performance independent of other agents, but depending on the resources and profile for each of them. The agent that assumes the role of VesselManager agent will be responsible for assigning final classification vessels according to the best individual classification. This classification is chosen taking into account the probability of the cases of the base-cases stored for this vessel in the past. In other words, there may be certain individual restrictions for each agent that must be taken into consideration by the VesselType agents in order to generate a classification vessel; however, it is the VesselManager Agent who takes into account the restrictions for the entire group of agents in order to distribute and assign the final classifications. The VesselManager agent is a coordinator that has access to the information on areas, previous classifications, tonalities, among others, stored in the system.
The CBR-BDI agent, as suggested in [12], is assigned a cycle in which it will obtain its personalized optimal classification. The information stored is a data base of cases that considers the classification performed and the resources generated by each agent. This way the VesselManager agent ensures that the vessel classification process can at least be carried out.
To supply the required characteristics, there is a decomposition of services (in this case of classification services) which agents can access to carry out their individual classification. The platform used as the basis for the creation of the MAS [54] allows to carry out this decomposition. The services are outsourced so that the agents can make use of them, depending on the role that they have assigned. Thus, an agent of type VesselType X may make use of a specific classification service, and different from another agent VesselType Y.
After that, it is necessary to address the structure of agreements which supports this decomposition, in order to make it adaptive. So, an important notion is the agreement between computational entities (agents) conceived as an architectural construct.
The interaction between the VesselType agent and the VesselManager agent is made through a negotiation protocol inspired by the standard WS-Agreement used in web services [28,37,48]. In this case, the following information is going to be considered: Inputs, Outputs, Preconditions, and Results, and a non-functional parameter: classification process execution time. When a classifying vessel process is carried out in the system, a Morphology Agent sends a request to the VesselManager Agent, the query is an OWL (Web Ontology Language) document, which contains a set of service inputs, outputs and a deadline before which the required service should be provided:
The VesselManager agent, in order to determine a set of appropriate classification, analyzes the existing classifications of VesselType agents considering the Morphology Agent deadline. Each individual classification of a VesselType agent consists of a set of elements:
The VesselManager Agent selects the service, taking into account the success probability of the service and its execution time. In this point is where the internal vessel classification is carried out.
Arguments exchanged among VesselType agents are tuples of the form
The support set S can consist of different elements, depending on the argument purposed. For example, if the argument justifies a potential solution for a problem, the support set is:
the set of features (premises) that match the problem to be solved,
additional premises that do not appear in the description of this problem but have also been considered to draw the conclusion of the argument, and
optionally, any knowledge resource used by the proponent to generate the argument (domain-cases, argument-cases or argumentation schemes).
This type of argument is called a support argument [2,27]. If the argument attacks the argument of an opponent, the support set can also include any of the allowed attack elements of our framework. These are distinguishing premises, counter-examples, or critical questions.
A distinguishing premise is either a premise that is not in the description of the problem to be resolved and has various,values for two cases, or a premise that appears in the problem description and does not appear in one of the cases.
A counter-example for a case is a previous case (i.e. a domain-case or an argument case), where the problem description of the counterexample matches the current problem to be solved and also includes the problem description of the case, but proposing a different solution.
Critical questions represent potential attacks that can defeat the conclusion of an argumentation-scheme. This other type of argument is called an attack argument.
The argumentation system that implements our architecture has a specific structure of domain-cases and a concrete set of argumentation-schemes, depending on the application domain where the argument has been put forward (those premises that match the problem to solve and other extra premises that do not appear in the description of this problem but that have been also considered to draw the conclusion of the argument) [28]. An example of a case used by a VesselType agent could be the following:
Case example for VesselType agent
Case example for VesselType agent
Argument-cases retain the data about previous arguments that an agent had proposed in a dialogue with other agents. In other words, argument cases store a problem description that has a domain context and is formed by the premises that characterize the argument. A case example for VesselType agent is shown in Table 1. In this case, it is necessary to store all information related to the classification of the vessel, that is, background color, tonality, area of performance of the VesselType agent, Type of classification result (in this case A- Artery or B- Vein), and the probability of success in the classification process.
For example, for a hypothetical simple case in which there are several classifications for the same vessel:
VesselType A agent: Type Vessel {B} Probability {94%}
VesselType B agent: Type Vessel {B} Probability {94%}
VesselType C agent: Type Vessel {A} Probability {6%}
VesselType D agent: Type Vessel {A} Probability {6%}
VesselType E agent: Type Vessel {A} Probability {95%}
The VesselManager agent has to select which is the final classification. In this case a centralized decision is made. VesselManager agent is prepared to collect all the classifications made by VesselTypes agents and decide the final classification (A or B). It is based on the probabilities given by each of the VesselTypes and their classification. In this case, the strategy is simple and based on the merger of the classifiers. The merger of the classifiers assumes that all the classifiers are competitive and complementary (equally expert). For this reason, each of them issues a decision regarding each vessel classification pattern. The output of the classifiers is an H-dimensional vector containing the decisions of the H classifiers (VesselTypes agents). This vector also contains the fields of the case (Type, Tonality, Background, Area, Probability). From the vector set, VesselManager agent must make the final decision by applying one of the following principles: simple majority voting or weighted majority voting. In this case, a vote is carried out by a weighted majority, where a different weight is available for each classifier taking into account the probability of success that is stored in its case. The final decision could be made by majority, average [30], minority, median [11], or use more complex methods [29].
In this case, it will be B type, although there is an VesselType agent with a 95% probability that suppose that it is an artery. A single agent could fail although with its values of tonality, etc. consider a high percentage that the vessel is of a specific type. That is why it is important to negotiate in this step of the system. Hence the importance of the negotiation process and the collaboration between agents in the step of classification.
The success parameter is used in the argument management process of our argumentation process to represent the potentially high persuasive power of current arguments that are similar to previous arguments that were remained acceptable at the end of the agreement process.
In the present study it is necessary to differentiate two significant contributions. On the one hand is the agent-based architecture created, which considers that a distributed computing and involving entities of very diverse type is suitable for carrying out studies such as the present in the retinal image analysis field. On the other hand is the proposed methodology, which includes different steps and different visual analysis techniques that agents can use. A summary is shown in Table 2. The result of implementing this methodology is an architecture, called ALTAIR (v2), developed with Qt and OpenCV as shown in Fig. 10. The accuracy of this tool when analyzing the different existing components of the image has been assessed by processing a total of 200 images. Results for every analysis step are shown below in Table 3.
Visual analysis techniques used by agents
Visual analysis techniques used by agents

Software tool screenshot (last step).
Analysis results for every stage
Expert users [25] helped to validate the proposed methodology and the image analysis. Each image was reviewed by an expert user and it is possible to observe that, in the different steps of the methodology presented in this study (retina edge location, optic disc location and eye side identification), the accuracy was excellent: 100%, 99.5% and 100% respectively.
For the evaluation of the segmentation stage, only main blood vessels were considered (generally there are at least 6–8 vessels thicker than the rest, and usually, at least 1 vein-artery pair in every eye quadrant). In the 200 images that were processed, the expert user marked a total of 1,463 main blood vessels and 1,316 were successfully detected, achieving a system accuracy of 89.95%.
In the vessel classification phase the results were also relevant. It must be considered, as it is mentioned above, that it is the most complicated step for a human expert and that, in most cases, a second or third opinion is usually requested. This article presents an improvement in the software process, replacing this collaboration among human experts by a collaboration and negotiation between agents of the software system. The evaluation was performed considering only those main blood vessels that were successfully detected (1,316). In 1,119 cases, the classification of the system coincided with the classification performed by the expert users, which translates to an accuracy of 85.03%.
These results have improved the results obtained with the first version of ALTAIR [9] (without the MAS approach), where the segmentation achieved an accuracy of 80% and the system achieved an accuracy of 72% in the vessel classification step. The segmentation in ALTAIR v2 is much higher than the results obtained by the AVIndex tool, which only detects 50% of the vessels. In addition, in AVIndex, crosses and branches are not taken into consideration.
Another interesting issue to evaluate the tool that implements the proposed methodology (in this case, its usability), is the time spent in the analysis of every image. A slow tool could dissuade the user from using it. Timing results are shown in Table 4. All values are in seconds and they are the mean processing time for 10 images in every step of the methodology.
Analysis time
The tool has been compared to an existing free software tool with similar characteristics [25]. The ALTAIR tool takes just 6.0 seconds until parameters are exported. The AVIndex tool takes 15.3 seconds to process the same images (steps cannot be evaluated because there is just one step and it is not an open source tool).
Clinical validation of the ALTAIR software tool and the results obtained have been published in [24], where the conclusion of the developed tool is that:
it showed a good reliability in the concordance inter observers, intra observer and inter device measurements;
the tool is valid to show an association with vascular parameters, target organ damage and cardiovascular risk.
As conclusions in the present research, it is necessary to distinguish two significant contributions. On the one hand is the agent-based architecture created, which considers that a distributed computing and involving heterogeneous entities is appropriate for developments of system in the retinal image analysis field. On the other hand is the proposed methodology, which includes different phases and improves the previous results has been presented by using different visual analysis techniques (a summary of the used techniques is shown in Table 2) and by using software agents with AT.
An agent-based architecture is proposed in which the functionalities can be distributed and carried out independently, but with a common goal. Each agent can use different techniques of filtering, classification or segmentation among other. In this way, in a future work, using this approach, it is possible to have several agents working in parallel on each methodology step, and agents will have to deal with issues such as coordination or synchronization, etc.
Until now, the only pathologies that have been demonstrated to be associated with the parameters measured and exported by the ALTAIR v2 software tool is organ damage and cardiovascular risk. This means that the measured values are right and these values do not depend on the user, because the evaluation showed a good reliability no matter who the user is. There are a lot of diseases and pathologies related to the blood vessels caliber and structure, and in this sense, future work will focused on finding the relationship of these types of pathologies with the parameters exported using the developed system. In addition, different online services will be published to allow other users to use their images to increase the case database.
Footnotes
Acknowledgements
This work was carried out under the frame of the project with Ref. TIN2015-65515-C4-3-R. The research of Pablo Chamoso has been financed by the Regional Ministry of Education in Castilla y León and the European Social Fund (EDU/310/2015).
