Application Notes on APD Areametric App: Automated area quantification for both Android and iOS

Area measurements have a wide range of uses from the monitoring of skin features in healthcare, celestial bodies in astronomy, to determining furniture sizes in everyday indoor uses. Current measurement methods utilize some form of measuring tool and unless performed by skilled and trained professionals, human errors leading to inaccurate measurements can often arise. This is especially so for irregularly shaped objects with complex dimensions. To alleviate such inaccuracies, we created the APD Areametric native Android and Apple mobile application that leveraged upon image processing to more accurately determine areas of the defined object in images by using pixel ratios. This not only makes such measurement more convenient, but also greatly improves the accuracy and speed of area determination.


INTRODUCTION
With its ever-growing versatility, smartphones are now increasingly leveraged for clinical  and biomedical research , where expensive laboratory equipment can now be displaced by the smartphone (for example, Gel App in Sim et al., 2015;Colony Counter Pro in Wong et al., 2016;VibraTilt in Ng et al., 2016;etc.). Other uses include on-the-go analysis (for example, DNAapp in Nguyen et al., 2014;DNA2app in Sim et al., 2016;StanXY in Budianto et al. 2015;PsychVey in Nguyen et al., 2016), and for education (for example, AniCare and Wound Education apps in the app stores). It is undeniable that there are still many opportunities for more smartphone apps to further increase the convenience of scientific research and daily life.
Area measurements are often indispensable in scientific and medical processes. There is often the need to calculate the area of skin features (Okasa & Rosenbery, 1996;Gruul & Leun, 1982), and cell/tissue/organ areas such as for carotid artery stenting (Bosier et al., 2017), sleep research (Liberman, 1980), immunity (Sixt et al., 2005 and many others. In astronomy, the calculation of areas of celestial bodies such as sunspots (Smith & King, 1981) can also be of interest. Beyond scientific uses, businesses and daily life can also benefit from area quality control processes, such as consistent pancake sizes in the food industry, and buying exact-fitting furniture. Manual measurements in these processes can often be affected by human errors such as parallax errors, and depending on the process, can lead to dire consequences, such as those in delicate clinical processes.
To streamline and improve the accuracy of area determination, we created an automated imagebased pixel area calculation smartphone app for both Android OS and iOS called APD Areametric app. The APD Areametric app utilizes the OpenCV image processing library and the in-built smartphone camera to analyze the user-defined image for a convenient and quick calculation of the object area. Users have a choice of using either the camera function of the phone to take a new picture or uploading an existing picture from the phone gallery for analysis. To estimate the area more accurately, the picture of the object of interest should include a coin of known area.
Leveraging on the portability of the smartphone and the universal use of coins, the app transforms the smartphone into a tool for more accurate, faster and easier area measurements than typical manual methods.

DEVELOPMENT AND METHODOLOGY
The APD Areametric Application for Android was developed using Android Studio version 3.0, and for iOS XCode 9.4. The OpenCV library for image processing resources was used in both the operating systems.   The formula (Figure 4) utilizes the total number of pixels of the coin in the image and the predefined coin area to determine the area represented by a single pixel. The result is then used to compute the area of the object by multiplying it with the number of pixels occupied by the object.

Calculation of area
Since the object area calculation is based on the pixel occupation of the coin and the object, the accuracy of the final measurement is highly dependent on the overall automated detection or manual object tracing process. If the automated object detection is incorrect, the user is advised to employ associated smartphone pens (generic soft round ball pens, or specialized pens of the Microsoft Surface Pro series, Samsung Tablets, and Samsung Galaxy Note series) for manual cropping, as was suggested for the APD Volumetric Application (Budianto & Gan, 2017).

Figure 5: Result of area calculation
In skilled hands, efficient and accurate area measurements can be performed easily using APD Areametric App. The iPhone 7 smartphone with a manufacturer defined area of 92.80cm 2 could be reasonably accurately determined to be 92.71cm 2 in a matter of minutes ( Figure 5). Other examples of household items are also demonstrated in Supplementary Material. With the automated detection/skilled manual object outlining, we demonstrated convenient and reasonable accurate area calculation utilizing the app. Several limitations are present. Firstly, modifications cannot be made to the automatic cropping, requiring users to perform manual outlining from scratch if edits are to be made. Secondly, the coin database is limited. Lastly, both the coin and the object must be taken on the same plane; hence there may be decreased accuracy when calculating curved surface areas.

FUTURE WORK
Efforts are ongoing in expanding the coin reference database.

CONCLUSION
APD Areametric app is a native Android and Apple mobile application available in Google and Apple app stores that brings about convenience and efficiency in area measurements. The mobile application is stand-alone and does not require Internet connectivity or add-ons. In the effort towards convenience, accuracy and digitalization, APD Areametric app allows area determination on-the-go, doing away with laborious and tedious manual measurements.

ACKNOWLEDGEMENTS
This work is partially funded by the "Wound Care in the Tropics" research programme from A*STAR Singapore.
The work described here is the final year project of WWL and KYWY in fulfilment of the requirements of the Diploma in Information Technology by Temasek Polytechnic, Singapore.

COMPETING INTEREST
SG is also the Editor-In-Chief of the journal. To avoid conflict of interest, the article was handled by an independent member of the editorial board. The article-processing-charge for this article was also waived for Bioinformatics Institute, A*STAR.

AUTHOR CONTRIBUTIONS
WWL drafted the manuscript and made the Android app. KYWY made the iOS version. IHB assisted with the algorithm for automated object detection. SKEG conceived the idea and supervised all aspects of the manuscript.  (Okasa & Rosenbeery, 1996;Gruul & Leun, 1982)