Current Pedorthics | January-February 2020 | Vol.52, Issue 1 | Page 27

Mobile Application for Ulcer Detection Figure 2: Main UI Figure 4: Image Processing Main UI Thread Algorithm 1 Main Thread 1. procedure Main 2. If image processing button pressed then 3. Open gallery 4. User selects thermal image 5. Imagepath – path of selected thermal image 6. Execute background thread 7. Ready to support background thread for UI display Figure 3: Background Thread Background Thread Algorithm 2 Background Thread 1. procedure Background 2. BgrImage – Read Image (imagepath) 3. Progress Update (Analyzing) 4. If Normal Image then 5. Error Message 6. Exit 7. GreyImage – Convert image to greyscale 8. GreyFoot – Extract foot from GreyImage 9. Smoothen GreyFoot 10. BgrFoot – Extract foot from BgrImage 11. ThermalImage – Read ThermalImage (imagepath) 12. ThermalImageProcess – (ThermalImage) 13. Procedure ProgressUpdate 14. Display progress on Main Thread 15. Procedure PostExecute 16. After 5 seconds, every second: 17. If background thread code execution is finished then 18. Display results on Main UI Algorithm 3 Image Processing 1. procedure ThermalImageProcess 2. 1DThermalData – Extract Thermal Radiometric Data from Thermal Image 3. 2DThermalData – Convert to 2D thermal data matrix from 1DThermalDate 4. ThermalGreyscale – Convert radiometric date to greyscale from 2DThermalData 5. ThermalFoot – Extract Foot only and smoothen from ThermalGreyscale 6. ThermalHot – Extract Foot only and smoothen from ThermalFoot 7. ThermalFootHotnot – ThermalFoot - ThermalHot 8. MHT – mean temp for the hot region only 9. MFMHT – mean temp for the foot – hot region only 10. If MHT-MFMHT <= 2.2 then 11. Ulcer = false 12. If MHT-MFMHT > 2.2 then 13. Ulcer = true 14. If MHT <= 25andMFMHT <= 25 then 15. Ulcer = false 16. If MHT > 50andMFMHT > 50 then 17. Ulcer = false 18. If !Ulcer then 19. Display BgrFoot 20. If Ulcer then 21. BgrUlcer – Highlight Ulcer area in Red 22. Display BgrUlcer Current Pedorthics | January/February 2020 25