Consider the first result in Figure 4, it reveals that the routines could correctly locate the center of 43 out of 44 LEDs. This is equivalent to 97 percent of correctness. The LED on the left side along the horizontal center line was incorrectly located due to the fact that its covering region on the image was split up in to 2 clusters. Notice that although several regions of LEDs in the image seem to have imperfect shapes, they were located correctly as far as all the regions were connected. The lower images in Figure 4 shows the result when a covering region of the LED on the left side along the horizontal center line has an interior hole. Although, the hole can be removed by carefully adjustment of the black and white threshold, doing so could result in deteriorating the quality of the rest of LEDs. Surprisingly, without removing the internal hole, the routines can successfully locate the center of the LED. By performing the routines with similar allowed procedures for manual adjustment mentioned above on a set of 50 images of an LED array, we have found that the maximum, minimum and average percents of correctness are 100, 63, and 94, respectively. The minimum one
was found when most LEDs on the image have a light gray package colour. The correctness for these images can be leveraged by making manual adjustment to the intermediate images.
Figure 5 shows the result of using the routines to identify the center of all LEDs, measure and display the brightness at those points. The latter 2 processes were performed without an external light source and under the condition that all LEDs were switched on to their brightest level. The application was also developed to have a feature to uniformly adjust the brightness and transfer the final value to the microcontroller of an LED array. An XY scanner to control the spectrometer is being developed in order to accept a set of center coordinates from this application and make more accurate measurements.