- Technical Note
- Open Access
A system for computerised retinal haemorrhage analysis
© Aslam et al; licensee BioMed Central Ltd. 2009
- Received: 27 November 2008
- Accepted: 28 September 2009
- Published: 28 September 2009
Our aim was to develop an objective computerised system for measuring different types of retinal haemorrhages in differing digital images, for use as a research tool. Despite developing various fully automated systems of retinal haemorrhage measurement we ultimately found user interaction to be necessary to achieve satisfactory validity of segmentation, and developed an interactive system of haemorrhage assessment based on this.
The Haemorrhage Assessment System (HAS) presented here is an open access interactive program with graphical user interface allowing the ophthalmically trained user to easily delineate different haemorrhage types, optic disc and fovea. The system then automatically calculates a variety of measures, including mean haemorrhage area, total haemorrhage area, centre of mass, distance of centre of mass from disc and fovea, eccentricity and orientation. This paper presents evidence for the validity of HAS by comparison against established software and known results for geometric images.
The system should be of use to experimenters studying the distribution and topography of vitreoretinal haemorrhages who require a means of accurately quantifying an ophthalmologist's gold standard assessment of a digital image.
- Optic Disc
- Cerebral Malaria
- Retinal Vein Occlusion
- Back Propagation Neural Network
- Vitreous Haemorrhage
Haemorrhages occur when there is extravasation of blood into the retina itself (deep and superficial retina haemorrhage), between the retina and the hyaloid face of the vitreous body (pre-retinal), or into the vitreous gel (vitreous haemorrhage). The colour and the shape of the haemorrhages are determined by the layer or layers of retina that are affected. Haemorrhages in each of these areas have different features of texture, shape, hue, intensity, saturation and edge.
Objective analysis of retinal haemorrhage might be useful in several ways. Firstly, it may be helpful in clinically differentiating conditions, e.g., birth trauma and shaken baby syndrome - current studies are hampered by lack of objective outcome measures. Secondly, quantitative characterization of retinal haemorrhage together with accurate assessment of other biomarkers of the patient may provide insight into the aetiology and pathogenesis of the haemorrhagic condition. Finally, detailed image analysis may help in the grading of retinopathy e.g., retinal haemorrhage in cerebral malaria.
Published methods for haemorrhage detection are often focussed on automated detection of intraretinal haemorrhages in diabetic retinopathy images. Gardner et al.  employed a back propagation neural network to detect diabetic haemorrhage. The success rate depended on the pre-processing and the number of images used in training. They reported detection rate for haemorrhages as 73.8% for both sensitivity and specificity, compared with the reference standard of a clinical ophthalmologist.
Sinthanoyothin et al utilised a "moat operator" in their image analysis which creates a trough around the lesion and aids segmentation of the image to enhance the hemorrhagic lesions. Recursive region growing segmentation was then used to extract blood vessels and haemorrhage lesions. Sensitivity and specificity for haemorrhage detection were 77.5% and 88.7% respectively. Again this was compared with assessment by a clinical ophthalmologist.
Usher et al employed recursive region growing and adaptive intensity thresholding in conjunction with a "moat operator" similar to Sinthanoyothin et alto extract haemorrhagic lesions. Then, a neural network was applied to classify the images. On a per image basis, sensitivity for detection of any exudates and/or haemorrhage/microaneurysms was 89% and a specificity of 62%.
M. Niemeijer et al proposed a haemorrhage detection scheme based on pixel classification. By using pixel classification, the contrast between the foreground pixels (red lesions and vasculature) and pixels in the background can be improved such that a global threshold can be used to extract all relevant objects. Subsequently, the vasculature was separated from the red lesions. This method was then refined by combining the mathematical morphology as used by Spencer-Frame[8, 9] to form a "Hybrid Scheme". The hybrid system reached 100% sensitivity and 87% specificity on a per image basis for haemorrhage, although the sensitivity on a per lesion basis was 30%. Grisan et al, Larsen et al and Lee et al have also employed image processing and analysis techniques to test for haemorrhages.
Apart from in diabetes, haemorrhage assessment would also be of use for assessing paediatric non-accidental injuries and other conditions with areas of haemorrhage such as retinal vein occlusions that would benefit from being accurately quantified for clinical or research purposes [2, 14]. There are particular problems associated in automated assessment of images of these conditions. Haemorrhages may be present at different levels in the eye and have subtly different physical characteristics within each level. The blood may be in vitreous gel, between vitreous and retina (subhyaloid haemorrhage), at superficial or deep retinal layers. Haemorrhages in each of these areas have different features of texture, shape, hue, intensity, saturation and edge. Vitreous haemorrhage in particular can be extremely variable from barely noticeable to completely obscuring all retinal view. It poses a challenge not only for its own specific quantification but also for that of other forms of haemorrhage given that it obscures retinal clarity. Image quality may be further degraded due to difficulty in obtaining images both in infants and in adults (due for example to cataract or high intraocular pressures causing poor visibility).
All the automated systems for retinal haemorrhage analysis have limited sensitivity and specificity as demonstrated above. A key cause for this is that retinal haemorrhages have high variability in lesion appearance, both intra-image and inter-image, coupled with the fact that the colour content of hemorrhagic lesions is often within the distribution of retinal background pigmentation. Variations in patient ethnicity also cause difficulty in standardization of image processing and analysis settings as retinal pigmentation levels vary. Furthermore, algorithms [5–7, 11, 12] that use a two-stage segmentation/classification approach needs a very sensitive first stage and very specific second stage.
The gold standard for assessing retinal haemorrhage alluded to in all the above papers is still universally acknowledged to be clinical assessment by retinal specialists. However, there is no open access system designed to allow such specialists to perform this in a way that benefits fully from computer technology. We present software that allows this gold standard clinical assessment of images to be done in a specially designed computing environment and adds high level computing calculations that would otherwise have been prohibitively complex.
The Haemorrhage Assessment System (HAS) was designed and written using MATLAB© version 14. It has been compiled for use with Windows XP providing MATLAB© installer is used. There is a greater access to viewing options, however, if the uncompiled version of the program is run within the MATLAB© runtime environment. The program was written by the first author (TA).
We initially developed fully automated systems of analysing haemorrhages. The most promising involved an initial pre-processing sequence of background removal and adaptive histogram equalisation followed by conversion to hue, saturation and intensity (HSI) colour map modes. Specific thresholds for hue, saturation and intensity components were used to highlight central seed components of the haemorrhage. These were grown into mask elements that had less demanding thresholds. We devised a program that allowed us to investigate and adapt these thresholds using separate sliders for hue, saturation and intensity for both seed and mask. For individual images these could be altered to produce segmentation results that were acceptable for retinal haemorrhage detection. However there were no settings that provided excellent sensitivity and specificity for segmentation with broad validity across varied images with different forms of haemorrhage. Published reports are ultimately limited in their sensitivity and specificity of haemorrhage detection as described above and do not include eyes with highly varied forms of haemorrhage including vitreous haemorrhage[11, 15]. We ultimately found that user interaction was required to achieve higher levels of validity for segmentation of different types of haemorrhage in varied patient groups.
The HAS program presents a simple graphical user interface from which the user first loads the image to be analysed. The software allows the option of viewing a processed version of the image in which haemorrhage is more easily visible to the user. The user is required to delineate the optic disc and fovea. The software then requires the user to specify what region he requires to be assessed. This may be done by delineating it manually. Alternatively, the user can choose to assess an automatically segmented area based on the commonly used constant of numbers of disc diameters away from optic disc or disc diameters away from the fovea. The user must then carefully manually mark the boundaries of each type of haemorrhage. When all haemorrhages are marked to the satisfaction of the user, the HAS software performs calculations on these valid segmented areas. The total area of each type of haemorrhage is calculated. The centre of mass of the average of each area type is calculated along with its distance from the centre of the disc and from the fovea. The total values for all haemorrhages combined are also assessed in this way. The 'eccentricity' of the haemorrhagic mass is also calculated-this term alludes to the deviation from circularity, with 0 being a perfect circle and 1 being a straight line. Finally, 'orientation' is calculated and is the angle in degrees between the x axis and the major axis of the ellipse that has the same second moments as the haemorrhage region. The area values are provided both in pixels and disc area units.
Many commercial software packages can perform basic measurement tasks from images. Such software can calculate the area of regions of interest circled by the user. However, the software would be tedious and prohibitively slow to use to calculate multiple haemorrhages at different levels and offers no automatic pre-processing step of background removal with adaptive histogram equalisation. Furthermore, advanced calculations performed by HAS are not available, such as centre of mass, automated calculation of distances from disc and fovea, eccentricity and orientation, nor the facility to assess only set areas of an image based on the constant of optic disc diameter.
There should be no doubt that an area marked out on a digital image by an ophthalmology specialist is indeed a retinal haemorrhage - His assessment is the current gold standard and no automated computer algorithms can compete. The HAS acts to provide technical support to this process by allowing the measurement of haemorrhagic areas marked out to be easier, quicker and ultimately much more informative. The testing of HAS focuses therefore on proving that once outlined, the mathematical values of size attributed to these areas are indeed correctly assessed. For this, the appropriate test is to first allow a specialist to measure several areas with HAS. The same areas are then delineated with an established (albeit non-specialised) scientific program. Although such measurements would take longer to complete and give less detailed statistical information than HAS, they should provide values of area that correspond.
In fact, the HAS program was tested by running analyses on a random selection of images of retinal haemorrhages using both the HAS system and a well established scientific image analysis software tool, Image J (1.23p, http://rsb.info.nih.gov/ij/). The Image J software used could not fully replace the HAS system as it is deficient in key areas that are done automatically by the HAS system. Firstly it does not pre-process the retinal image for ease of assessment. It does not make important automated calculations such as total haemorrhagic areas or eccentricity. Finally it does not perform functions for calculating centre of optic disc and thus does not provide statistics describing distances from haemorrhages to optic disc and to the fovea. However, Image J software is able to simply measure the area of any image region that is first delineated by the user. Using this function multiple haemorrhages could be separately calculated then added together by the user to recreate the basic area measures of the HAS. The areas could be measured and total haemorrhage area could be calculated by the user and compared to the HAS output for the same images.
Image J Size
Percentage Error (%)
p = 0.907
HAS Value, including human tracing error
centre of mass of square
135 × 289
134.5 × 288.5
300 × 300
300 × 300
centre of mass of circle
138 × 133
137 × 132
145 × 315
146 × 316
eccentricity of line shape
eccentricity of near circular shape
There is an excellent level of accordance between Image J calculated areas and the HAS system and excellent accordance between expected values for complex statistical analysis of particular geometric shapes and those values returned by HAS.
Project name; Haemorrhage Assessment System
Project homepage; http://www.sharebypeer.org
- All instructions and required files available from this site.
Availability and requirements; Open availability. Requires Windows XP/MATLAB© runtime environment preferred. The AMD ACML BLAS is not supported on MATLAB 7.3 (R2006b) and on previous releases of MATLAB on the Windows platform thus this program will not run on machines with AMD processors unless the Matlab runtime environment is available.
Operating System. Windows XP/Vista
Programming language; MATLAB©
Restrictions for non academics; for academic use only
The user is guided through the program by a graphical user interface with a column of function buttons on the left side of the screen that should be depressed in turn from top to bottom. Pressing the top button allows the relevant image to be loaded onto the screen. The next 'Process image' button initiates a sequence of processing steps that results in an output image in which areas of haemorrhage are highlighted more clearly than the original image - This step may take a few minutes to complete, but allows the user to toggle between this processed image and the original before deciding which to continue with. After pressing the following button, labelled 'Define region of interest', the user must click the left mouse key around the total area of image that is relevant to the study. A final right mouse key click signifies user segmentation of the relevant area is complete. As a final pre-processing step the user clicks on the 'define disc/fovea' button and is asked to manually delineate these areas. This allows for the option of analysing only within a certain number of disc diameters around the fovea or disc. This is subsequently done, if required, by setting the slider to the appropriate number of disc diameters and then pressing the button marked as measuring 'diameters around disc' or 'diameters around fovea'.
After this the program is ready to accept user input of areas of haemorrhage. To indicate areas deemed as haemorrhage, the user presses the button corresponding to the haemorrhage type before manually delineating the region in the same way as the initial region of interest was outlined. This is repeated for all haemorrhages before the button marked 'Calculate' is pressed. A separate window shows the results of the calculations performed, separated into haemorrhage type and also calculating total haemorrhage indices.
The HAS system we present helps ophthalmologists quantify their gold standard clinical assessment of haemorrhage. It relies on users to input the haemorrhage borders and thus maintains complete validity for the segments that are being measured. The user is guided through the measurement process via an easy to use graphical user interface. The HAS system ultimately is able to perform complex calculations on the segmented areas that would otherwise be extremely difficult. It is anticipated that the system may be of use for all experimenters interested in studying the distribution and topography of vitreoretinal haemorrhages in retinal and systemic disease.
We would like to thank Caroline Williams for her invaluable help in formatting and proofreading the document.
- Hughes LA, May K, Talbot JF, Parsons MA: Incidence, distribution, and duration of birth-related retinal hemorrhages: a prospective study. J Aapos. 2006, 10: 102-6. 10.1016/j.jaapos.2005.12.005.View ArticlePubMedGoogle Scholar
- Eisner A, Falardeau J, Toomey MD, Vetto JT: Retinal hemorrhages in anastrozole users. Optom Vis Sci. 2008, 85: 301-8. 10.1097/OPX.0b013e31816bea3b.View ArticlePubMedGoogle Scholar
- White VA, Lewallen S, Beare N, Kayira K, Carr RA, Taylor TE: Correlation of retinal haemorrhages with brain haemorrhages in children dying of cerebral malaria in Malawi. Trans R Soc Trop Med Hyg. 2001, 95: 618-21. 10.1016/S0035-9203(01)90097-5.View ArticlePubMedGoogle Scholar
- Gardner GG, Keating D, Williamson TH, Elliott AT: Automatic detection of diabetic retinopathy using an artificial neural network: a screening tool. Br J Ophthalmol. 1996, 80: 940-4. 10.1136/bjo.80.11.940.PubMed CentralView ArticlePubMedGoogle Scholar
- Sinthanayothin C, Boyce JF, Williamson TH, Cook HL, Mensah E, Lal S, Usher D: Automated detection of diabetic retinopathy on digital fundus images. Diabet Med. 2002, 19: 105-12. 10.1046/j.1464-5491.2002.00613.x.View ArticlePubMedGoogle Scholar
- Usher D, Dumskyj M, Himaga M, Williamson TH, Nussey S, Boyce J: Automated detection of diabetic retinopathy in digital retinal images: a tool for diabetic retinopathy screening. Diabet Med. 2004, 21: 84-90. 10.1046/j.1464-5491.2003.01085.x.View ArticlePubMedGoogle Scholar
- Niemeijer M, van Ginneken B, Staal J, Suttorp-Schulten MS, Abramoff MD: Automatic detection of red lesions in digital color fundus photographs. IEEE Trans Med Imaging. 2005, 24: 584-92. 10.1109/TMI.2005.843738.View ArticlePubMedGoogle Scholar
- Spencer T, Olson JA, McHardy KC, Sharp PF, Forrester JV: An image-processing strategy for the segmentation and quantification of microaneurysms in fluorescein angiograms of the ocular fundus. Comput Biomed Res. 1996, 29: 284-302. 10.1006/cbmr.1996.0021.View ArticlePubMedGoogle Scholar
- Frame AJ, Undrill PE, Cree MJ, Olson JA, McHardy KC, Sharp PF, Forrester JV: A comparison of computer based classification methods applied to the detection of microaneurysms in ophthalmic fluorescein angiograms. Comput Biol Med. 1998, 28: 225-38. 10.1016/S0010-4825(98)00011-0.View ArticlePubMedGoogle Scholar
- Grisan E, Ruggeri A: Segmentation of candidate dark lesions in fundus images based on local thresholding and pixel density. Conf Proc IEEE Eng Med Biol Soc. 2007, 2007: 6736-9.PubMedGoogle Scholar
- Larsen M, Godt J, Larsen N, Lund-Andersen H, Sjolie AK, Agardh E, Kalm H, Grunkin M, Owens DR: Automated detection of fundus photographic red lesions in diabetic retinopathy. Invest Ophthalmol Vis Sci. 2003, 44: 761-6. 10.1167/iovs.02-0418.View ArticlePubMedGoogle Scholar
- Lee SC, Lee ET, Kingsley RM, Wang Y, Russell D, Klein R, Warn A: Comparison of diagnosis of early retinal lesions of diabetic retinopathy between a computer system and human experts. Arch Ophthalmol. 2001, 119: 509-15.View ArticlePubMedGoogle Scholar
- Trenchs V, Curcoy AI, Morales M, Serra A, Navarro R, Pou J: Retinal haemorrhages in-head trauma resulting from falls: differential diagnosis with non-accidental trauma in patients younger than 2 years of age. Childs Nerv Syst. 2008, 24: 815-20. 10.1007/s00381-008-0583-y.View ArticlePubMedGoogle Scholar
- Qiu C, Cotch MF, Sigurdsson S, Garcia M, Klein R, Jonasson F, Klein BE, Eiriksdottir G, Harris TB, van Buchem MA, et al: Retinal and cerebral microvascular signs and diabetes: the age, gene/environment susceptibility-Reykjavik study. Diabetes. 2008, 57: 1645-50. 10.2337/db07-1455.View ArticlePubMedGoogle Scholar
- Hansen AB, Hartvig NV, Jensen MS, Borch-Johnsen K, Lund-Andersen H, Larsen M: Diabetic retinopathy screening using digital non-mydriatic fundus photography and automated image analysis. Acta Ophthalmol Scand. 2004, 82: 666-72. 10.1111/j.1600-0420.2004.00350.x.View ArticlePubMedGoogle Scholar
This article is published under license to BioMed Central Ltd. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.