Rapid Daignostic Lateral Flow Strip Test Reader

Non-invasive rapid diagnostic tests (RDT) are commonly used to detect some kind of viruses or bacteria instead of invasive methods. Helicobacter pylori ( H. Pylori ) which causes gastric cancer, peptic ulcer, gastritis, mucosa-associated lymphoid tissue lymphoma diseases can be detected easily with lateral flow strip (LFS) that is one of the RDT types. The tests are evaluated whether there are control line and test line at the region of interest (ROI) by users or microbiology technicians manually. Once the test line is tentative, despite the test must be reported positive, it can be resulted as negative incorrectly. This incorrect diagnose causes incorrect treatment planning. In this work, to mitigate this problem which will be able to occur by human based, an automatic LFS-RDT reading system is developed. The computer laptop based system firstly takes image utilizing the holders that are designed with 3D printer. Whether the test have the control-test lines or not are carried out by image processing techniques straightforwardly. After feature extraction from line areas, k- NN classification method is used to evaluate the test results automatically. 100 LFS-RDTs are tested and observed that all results are correct. The system is found quite useful and approved as a second reader by medical technicians.


I. INTRODUCTION
DTs are easy to use and fast methods to detect HIV, H. pylori, adeno virus, rota virus, malaria in a microbiology laboratories as non-invasive. Additionally, some physiological conditions such as pregnancy, blood glucose level, drugs of abuse, cholesterol, food poisoning are easily diagnosed by user themselves [1]. There are different types RDTs such as microfluidic Chip immunoassay [2], dipstick [3], pads [4], cassette test [5], and LFS [6][7][8]. Especially, RDTs are implemented in any developing countries even bad and inadequate conditions easily [9,10] To diagnose H. Pylori, LFS-RDT is used routinely. H. Pylori is a type of gram-negative bacteria and causes peptic ulcer, gastric cancer, gastritis, mucosa-associated lymphoid tissue lymphoma diseases [11][12][13]. Gaita, urea-breath or urine samples are used to detect H. pylori [14]. While urea-breath samples are being used at the test process with high sensitivity, urea-breath and gaita tests can be implemented together at the same time. However, gaita test is just the most economic methods among them. So it is preferred to use routinely [15].
Besides the improving of fast and practical medical test technologies, computer or smartphone based automatic diagnostic systems have been progressing expeditiously. These systems help physicians for evaluating the tests with accurate and certain results by saving time. This situation increases the quality of health systems positively. Routinely, RDTs are evaluated with visual inspections by medical technicians or users manually. Human based or illumination based incorrect evaluations can be encountered. To mitigate these problems, nowadays automatic reading systems have been developed by researchers. Generally, quantity tests are realized by checking whether there are control and test lines and reported the result with cell phone based RDT readers [1,16,17]. Also, the smart phone or Google Glass based RDTs, which can be done quantity tests, report the amount of the sample that is tested [18][19][20]. The mentioned cell phone based RDT readers have such electronic component for illumination. This condition is advantage for them but the components increase the cost and disinfection is not easy after the testing due to the external components. Also motion artefact on the captured images can arise because of shaking of hand. So we developed a laptop or tablet based RDT reader in our previous work [21]. There is no motion artefact since the system is stable on the table. Beside the designed RDT holder does not have any external component for illumination, disinfection is very easy. However, it is a disadvantage that there are no external illumination tools because the image quality can change with different illumination. So, in our previous work all images were captured with fixed indoor illumination In this work, newly different system is developed to mitigate the illumination problem. New offered computer based system can work under different illumination conditions without external electronic illumination tools. First of all, using the RDT holders that are created from 3D printer, different images are captured under indoor illumination and sun light conditions. The images of each conditions different than each other in terms of background or brightness. After segmenting of ROI from taken image, each ROIs randomly are enhanced with the new preferred system. The control and test lines are segmented from the ROI. Then features are extracted from the line areas. Using k-NN classification method the tests are read as invalid, positive or negative. 100 LFS-RDT are tested to diagnose H. pylori and it is observed that all results under every condition are correct.

II. MATERIAL AND METHOD
In this study, dataset was taken from Medical school of Istanbul University, microbiology laboratory. In the laboratory, to detect H. Pylori LFS-RDTs are used. While the test is preparing the gaita samples are used. Small samples Rapid Daignostic Lateral Flow Strip Test Reader H. Ozkan from gaita are picked by touching a pin of extraction tube. The gaita samples are injected to the extraction tube and the tube is shaken to achieve homogony solution. The tube is waited during a few minutes vertically. So, solid particles fall down. A few drop of homogeny solution is instilled to the LFS-RDT.
There are two lines area on the ROI of LFS-RDT: control and test lines. In case test line is appeared the result is positive otherwise the test is negative. Appearing the test line means that the sample has H. pylori. In the ROI, to signalize the test line, a monoclonal antibody is fixed to the membrane of ROI of LFS-RDT. If there is H. pylori antigen, a complex structure comprises by combining the antigen with the fixed antibody and a line appears. Otherwise, if there is no H. pylori the test line does not appear since the complex structure does not comprise. In the ROI, second antibody is used for control line. So, during the test, control line appears for any condition whether there is H. pylori or not. The control line has to appear for any condition, otherwise the test is invalid.
In this work 100 LFS-RDTs are used. 20 of them, which have tentative test line, are positive, 15 of them, that seem well test and control line, are positive, 53 are negative, and 7 are invalid. In Fig. 1., the tested LFS-RDTs are given. All of them are valid because they have control lines explicitly. Fig.  1.a. is reported as negative easily by medical technicians since there is no test line. Fig. 1.b is read as positive because there are both lines. But in Fig. 1.c., there is a tentative test line. The tentative test line sometimes is not noticed by technicians or users and they report the test as negative although it is positive. This incorrect diagnose follows incorrect treatment. In this work, to overcome the human based incorrect evaluation, a new automatic RDT reading system is preferred. This study is basically performed at three steps which are imaging, image processing, and classification. The detailed flow chard is shown in Fig. 2.   First of all, ROI area are easily segmented since every LFS-RDT stand same position via fixed holders during the all test processes. In Fig. 5, different images of ROIs that have the results from negative to positive are given respectively. Each background of ROI is different than others as the images are captured under different illumination conditions. Some of them have white background, some of them have grey and the others have yellow. In Fig. 5.a.- Fig. 5.c-d-e, despite control lines appear clearly, test lines are not seen obviously. Essentially, there are test lines on them but they are tentative. Users can report the test as negative incorrectly. They all are positive actually. In Fig. 5. f-g-h-i-j, the ROIs have both control and test lines that seem clearly. So their reporting process is quite easy. The problem is to report incorrectly the tests which have tentative test lines. By enhancing the tentative test lines to see clearly is quite important to have more accurate results.
RGB images are converted to gray scale images to use 8 bit image instead of 24 bit image. In Fig. 6, all gray level ROIs can be seen which are converted from Fig. 5. respectively. Fig. 6. The ROIs images that are converted gray images from RGB images of Fig. 5 To enhance the images, the histogram of ROI are carried out. A histogram shows frequencies of intensity values in an image. In Fig. 7, the histogram of Fig. 6.d. is shown. Horizontal axis gives intensity values, vertical axis shows frequencies of any intensity values. As it can be seen clearly the image is low contrast image since intensity values are just sorted between 180 to 225. So the test line looks like grey and nearly white color but actually it should be seen nearly black. To increase contrast, histogram equalization technique is implemented. It is proposed that the intensity levels scatter between 0 to 255. To equalize the histogram firstly probability of any intensity level has to be calculated with Equation 1. (1) Where r k is intensity value, p r probability, n k the number of pixel that has r k intensity value, L maximum intensity level, MN total number of pixel. Then Equation 2. or 3. are used for intensity transformation All probabilities are gathered cumulatively and they are multiplied with one mines maximum intensity level. After transformation, decimally number are achieved and they are rounded. The obtained s k, that are integer numbers, are assigned to a new intensity values and the histogram distributes equally between 0 to 255. The new histogram of Fig. 6.d. after histogram equalization can be seen in Fig. 8. Fig. 8 The high contrast histogram of Fig. 6.d. that is carried out after histogram equalization technique When Fig. 7 and Fig. 8. are compared, it is obviously seen that the low contrast histogram turns the high contrast histogram. In Fig. 9, the histogram equalized ROIs of Fig. 6 are given from a. to j. respectively. Fig. 9. The ROIs that are acquired after histogram equalization process from ROIs of Fig. 6 In Fig 5. a. and 6. a., the given RGB and gray level images are evaluated as negative since test line does not appear. After histogram equalization, the result is verified (Fig. 9.a). Although The ROIs in Fig. 5.b. and 6.b does not have test line, In Fig. 9.b, there is small quantities in the test line area but it is not found enough to decide as positive by medical technicians. Especially, in Fig. 5. c-d-e. and 6. c-d-e. the nonvisible test lines, after histogram equalization, appear as visible as it can be seen in Fig. 9. c-d-e. So, they are easily resulted as positive. The ROIs in Fig 9. from f. to j. can be evaluated positive since all the test lines appear clearly. In Fig. 10. The zoomed ROIs are shown. In Fig. 10.a. has zoomed ROIs of Fig. 5.a, 6.a. and 9.a. In Fig. 10.b. shows zoomed ROIs of Fig. 5.d, 6.d. and 9.d. In Fig. 10.c. indicates zoomed ROIs of Fig 5.i, 6.i. and 9.i. It can be seen that tentative test line can be clearly read with the improved reading system. Besides, it is observed that the system can work with different illumination conditions. Fig. 10.a) Zoomed ROIs of Fig. 5.a, 6.a. and 9.a. b) zoomed ROIs of Fig.  5.d, 6.d. and 9.d. c) zoomed ROIs of Fig 5.i, 6.i. and 9.i Before feature extraction, median filter is implemented the histogram equalized ROIs to remove noise. The coordinates of control and test lines are stable during the test, they are segmented from ROI. Six different features are extracted from both test and control lines in Table 1.

Average intensity value Maximum intensity value Minimum intensity value Difference between minimum and maximum intensity value Standard deviation Entropy
Using the k-NN classification method with two steps, firstly control line is classified to report the test valid or not and then the test line is classified to report the test positive or negative. If the first classification result is valid, then the second step starts. Otherwise, the system reports the test result as invalid. 5 neighbours are used for k-NN classification. It is observed that all classification results are correct with the highest accuracy as 100%.

III. CONCLUSION AND DISCUSSION
In this study, an automatic LFS-RDT reading system is developed. The images are captured from RDTs and image processing techniques are implemented to the ROIs for enhancing the image, features are extracted from control and test lines and the tests are classified with k-NN method firstly the test is evaluated in terms of valid or invalid, and if the system valid secondly the test is resulted as positive or negative. If the test is invalid, the result is reported and second step does not continue.
To verify the accuracy of the result, first of all, the test results have been read by medical technicians with visual inspection and they have been compared with the results that have been taken from the designed LFS-RDT reader platform. It has been observed that the system is run efficiently having all correct results as 100% accuracy. The designed LFS-RDT reader platform has been evaluated and validated by testing the total of 100 H. pylori RDT tests. 25 of 100 are tentative positive, 15 of 100 are positive, 53 of 100 are negative and the rest (7) are invalid.
In the literature, some cell phone based RDT reader platforms [1,16,17,18,19] and a Google Glass based RDT reader platform [20] are designed by researchers. Carrio [1,16,18]. The illumination platform provides good benefit to increase the image quality but it also increase the cost of reader system. Our RDT reader platform does not have an external illumination source this situation was disadvantage for our earlier study. However in this work, this mentioned disadvantage is extinguished with improving new image processing technique. In our earlier study, Gaussian filter was used to smooth the image and then sigmoid function is used to release the lines for taken image under just indoor illumination [21]. However, in this work, low contrast images are converted to high contrast images with histogram equalization technique and noises are removed with median filter for images that are captured with different illumination conditions such as sun light or indoor illumination. This result provides us to have low cost RDT reader platform since having holder without external illumination source. Shen et al. have quantified the colors by using colorimetric diagnostic assays. They have not declared specific number of their system accuracy but they reported that they have high accuracy [19]. Feng et al. have had 100% accuracy using their Google Glass based platform. They have designed QR code to crop ROI and used SVM for classifying the RDT. Their RDT platform need to have internet connection since their reader platform sends the captured image to a server and gets the result back to the Google Glass from the server [20]. Our platform runs real time on the computer without internet connection as an advantage of the designed RDT reader platform. Another advantage of our RDT reader platform is not to have motion artefacts on the capturing image since computer laptop is stand as fixedly. On the other hand, cell phone and Google Glass based RDT reader platforms can have motion artefacts since they are held by user hand or head that can be shaken. Besides, the cell phone or Google Glass based RDT reader platforms can be used point of care tools but cannot be adapted to the hospital computer network system. However, the designed RDT reader platform in this work both can be easily used as a point of care diagnostic tool or connected to the existing hospital computer network systems and used routinely in the hospital. When all these advantages are considered, the medical technicians declared that the designed new automatic LFS-RDT reader platform can be used as a second reader.