After white-balance correction, the observer used the specially designed selection tool to define the conjunctival area to score. This tool is a trapezoid ROI selection tool with seven control points connected by B-spline (basis spline) curves (
Fig. 2). This program reads the RGB values of each pixel in the selection and converts it to HSV space, where the value component is defined as:
The saturation component is given by:
The HUE component is given by:
Then the HUE value is mapped from [0, 360] to [0, 1] using a parabola curve (
Fig. 3). The final redness value is calculated as:
All pixels with specular reflection are excluded from redness calculation (by excluding pixels where all three values, R, G, and B, are above 220), since specular reflections do not demonstrate true colors and artificially drag the redness score down. Originally the
V (blackness) value was included in the redness calculation formula (redness = H × S × V), where
V evaluates how pure (or dark) the red color is. However, after several tests, the
V value was removed from the formula since brightness or darkness in the red color of the vessels did not ultimately determine the degree of OR. The
redness score was set within the range of [0, 1], as both the
H and
S values were within the range of [0, 1], where zero indicates that there is absolutely no redness in the selected area, and one indicates the area is completely red. The software was programmed to average redness from all the pixels within the selected area to obtain a composite score from the region of interest. Next, we remapped the
redness score from [0, 1] to [0, 100] for the practical purpose of obtaining a centesimal scale. Finally, since there are no absolute cases in clinical practice, we incorporated a finite superior limit to the scale. We selected, from the photographs with severe redness, the image with more OR, and set its score as the superior limit of 100. All images with equal or more redness than this case will then be scored as 100, while images with a lesser redness score will be mapped between this case [100] and zero [0] (
Fig. 2).