The goal of the luminescence readout algorithm is to detect very low levels of light intensity. As already described in the Hardware section we therefore first had to get a more sensitive image sensor. Overall, when looking at the pictures with a human eye, no difference between imaging no sample and luminescence sample is visible as it is shown below.
Due to this results it was very clear from the beginning that the signal is very weak. Therefore an analysis of the picture on the pixel level was absolutely necessary. As we were already expecting the signal to be quite close to the noise level, we thought of analysing the entire image, hoping that the random noise from picture to picture will roughly cancel out and the overall noise level will stay constant. Furthermore, before being able to start the image analysis, we had to work on the camera in order to tune it towards a maximum exposure time (in the end about 5 seconds). Furthermore we put the camera’s analog gain to a maximum such that when any electrons are generated by photons, they will be amplified and hopefully their signal will be stronger than the noise level.
The first step of our algorithm is to actually average each pixel value for 5 consecutive images. This step is done in order to reduce the amount of random noise in each pixel. In a second step we analyse this average of the 5 pictures from step one further. As already described in the introduction, from the very beginning we thought of analysing the overall pictures as we expected this to be far more robust against noise. (Indeed, later experiments showed that it is almost impossible to detect that there is a luminescence signal when analysing the pixels individually). As every individual pixel can take a value in between 0 and 255, we performed a binning i.e. we counted how many values have one and the same value. This binning idea is illustrated below.
The result of the binning of an averaged initial image (i.e. an averaged image when there is no sample inside the imaging chamber) is shown below together with the exemplary sampling of an induced image. It is clearly visible that most of the pixels have a pretty low value in between roughly 0 and 20 and that also there is not an obvious difference in between those two disctributions.
Nevertheless, if you substract the distributions from one another and only look at the region of interest around 15 one arrives at the figure shown below. Substracting the initial image (i.e. when there is nothing inside the imaging chamber) basically means that we eliminate the background noise which comes for instance from the outside temperature)
One can clearly see from the figure above that the difference is not a lot but is still a significant. Also when repeating this kind of experiment one will arrive at the same result which goes in line with the intuition that the image of the induced sample should have more pixels at higher values than the reference one where there is no sample/signal. To lastly transform this figure into a score, the initial idea was to take the integral over the absolute value of the shown distribution and normalise it to get an intensity value. However, we found an even better solution: When simply multiplying all the number of pixel values in the interval [0,8] with -1 and in the interval [9,20] with +1 this will yield to a better signal as this reduces the accumulation of random noise in comparison with taking the absolute value. The final output of the algorithm in a proper luminescence imaging session is shown in the figure below.
Therefore as already shown in the hardware section, together, our hardware and this algorithm are able to reliably resolve the luminescence signal. The sample consisted always of a volume of 40uL at a constant OD. We also did a significance analysis later on in order to ensure that the luminescence signal is significantly different from the signal when no samples are present. When performing a two sided significance test, the p-value is way smaller than 1% for all of the samples with induced cells. Therefore it is very unlikely that noise led to the outcome of our luminescence detection algorithm as such a p-value basically says that the two distributions which were compared in the test differ significantly.
Overall, our algorithm together with the hardware is capable of detecting this luminescence signal as shown above. Obviously, there is still some room for improvements both, on the hardware as well as software side, however the presented solution served our purposes during the project.