Abstract Introduction Development And Methodology Application And Limitation Future Work Conclusion Acknowledgments Competing Interest Author Contributions Reference Supplementary Material Chinese 中文版

Student Journal Cover Image

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

Authors:Wei-Ling Wu1,#,Kenneth Yu-Wei Yong1,Ian Hartono Budianto1,Samuel Ken-En Gan1,#

1 A*STAR, Singapore 138671

#To whom Correspondence should be addressed:wuwl@bii.a-star.edu.sg; samuelg@bii.a-star.edu.sg

Submitted: 7 November 2018 | Revised: 18 January 2019 | Accepted: 7 February 2019 | Published: 8 February 2019

APD Trove (2019) 2: 1



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.


With its ever-growing versatility, smartphones are now increasingly leveraged for clinical (Gan et al., 2016) and biomedical research (Gan & Poon, 2016), 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 image-based 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.


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.

Calculation of area

Figure 1 Left: Selecting the appropriate reference coin, Right: Source of image

On the selection of the coin reference, the user can choose the particular reference coin from the various countries listed in the dropdown list (Figure 1 left panel). The current version of the app incudes coins from Singapore, the United States of America, India, and Europe.

Figure 2 Left: Automated coin detection, Right: Confirmation of coin detection

Once the picture with the object of interest and coin is loaded (Figure 1 right panel), the coin would be automatically detected (Figure 2 left panel). In the event when the coin detection is inaccurate, the user may manually mark the coin in the image (Figure 2 left & right panel) by dragging (Android) or tapping (iOS) the circle position with pinching in or out to enlarge or shrink the coin mark.

Figure 3 Left: Automated object detection of an iPhone, Right: Confirmation of crop

Objects are automatically detected following satisfactory detection of the coin (Figure 3 left panel). Should the detection be inaccurate, it can be manually traced using the “Edit” function. Upon user confirmation of object detection cropping method (Figure 3 right panel), the object area will be calculated based on the pixels in comparison to the coin. The final area will be displayed (Figure 5).


Figure 4: Formula used for object area calculation

The formula (Figure 4) utilizes the total number of pixels of the coin in the image and the pre-defined 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.

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.80cm2 could be reasonably accurately determined to be 92.71cm2 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.


Efforts are ongoing in expanding the coin reference database.


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.


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.


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.


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.


Bosiers M et al.Does free cell area influence the outcome in carotic artery stenting. Feb 2007; pp(135-141), Vol. 33:2. doi:https://doi.org/10.1016/j.ejvs/2006/09.019.

Budianto IH, Gan SKE. APD Volumetric app: android app for the quantifiacation of reagents. Scientific Phone Apps and Mobile Devices, 2017; Vol. 3:7. doi:10.1186/s41070-017-0019-8.

Budianto IH, Wong CF, Nguyen PV, Gan SKE. StanXY: standard curve app fro Android. Scientific Phone Apps and Mobile Devices, December 2015; Vol.1:2.doi://https://doi.org/10.1186/s41070-015-0003-0.

Gan SKE, Koshy C, Nguyen PV, Haw YX. An overview of clinically and healthcare related apps in Google and Apple app stores: connecting patients, drugs, and clinicians. Scientific Phone Apps and Mobile Devices, 2016; Vol. 2:8. doi:10.1186/s41070-016-0012-7.

Gan SKE, Poon JK. The world of biomedical apps: their uses, limitations and potential. Scientific Phone Apps and Mobile Devices, 2016; Vol. 2:6. dio:10.1186/s41070-016-0009-2.

Gruul FR de, Leun JC Vander. Systemic influence of pre-irradiation of a limited skin area on UV-tumorienesis. March 1982; Vol. 35:3. doi:https://doi.org/10.1111/j.1751-1097.1982.tb02577.x.

Liberman MC. Effect synapses in the inner hair cell area of the cat cochlea: An electron microscopic study of serial sections . Oct 1980; pp(189-204), Vol. 3:3. doi://https://doi.org/10/1016/0378-5955(80)90046-5.

Ng KM, Nguyen PV, Gan SKE. VibraTilt: Accelerometer & Gyroscope measurement app. Scientific Phone Apps and Mobile Devices, April 2016; Vol. 2:5.doi:https://doi.org/10.1186/s41070-016-0008-3.

Nguyen PV, Lim JPH, Budianto IH, Gan SKE. PsychVey: Reseaech Survey App. Scientific Phone Apps and Mobile Devices, December 2016; Vol 1(3). doi:10.1186/s41070-015-0002-1.

Nguyen PV, Verma CS, Gan SKE. DNAApp: a mobile application for sequencing data analysis. Bioinformatics , November 2014; Vol.2014.p.2014. doi:10.1093/bioinformatics/btu525.

Okasa H, Rosenberg JD. Skin area detection for video image systems. U.S.Patent 6343141B1 Oct 08, 1996.

Sim JZ, Nguyen PV, Lee HK, Gan SKE. GelApp: mobile gel electrophoresis analyzer. Nature Methods Application Notes, 2015; doi:10.1038/an9643.

Sim JZ, Nguyen PV, Zang Y, Gan SKE. DNA2App: Mobile sequence analyser. Scientific Phone Apps and Mobile Devices, April 2016; Vol. 2:2.doi://doi.org/10.1186/s41070-016-0008-3.

Sixt M et al. The conduit system transports soluble antigents from the afferent lymph to resident dendritic cells in the T cell area of the lymph node. Jan 2005; pp(19-29), Vol. 22:1. doi:https://doi.org/10.1016/j.immuni.2014.11.013.

Smith PA, King JW. Long term relationships between sunspots, solar faculae and the ionosphere. Oct 1981; pp(1057-1063), Vol. 43:10. doi:https://doi.org/10.1016/0021-9169(81)90020-9.

Wong CF, Yeo JY, Gan SKE(2016). APD Colony counter app: using watershed algorithm for improved colony counting. Nature Methods Applications Notes, Aug 2016; doi:10.1038/an9774.

Supplementary Material 

Figure 1: Area of coaster determined by APD Areametric App

Figure 2: Calculated area of coaster measuring with ruler

Figure 3: Area of plate as determined by using APD Areametric App

Figure 4: Calculated area of plate from manual measurements

APD Areametric (APD 面积测量手机软件)



#联系人:wuwl@bii.a-star.edu.sg; samuelg@bii.a-star.edu.sg

收到日期 11月7日2018年 | 发表日期:2月7日2019年



面积测量有着广泛的用途,例如用于在医学方面的皮肤疾病覆盖面积和天文学界的天体大小,甚至用于日常中的家具大小等等。然而,因为测量工具的局限和人为失误,现今对于不规则形状的精准面积测量仍存有挑战。为了改善面积测量的过程和精准度,一款使用图像分析技术的独立原生安卓和苹果系统手机软件—APD面积测量手机软件(APD Areametric)因此而开发。此手机软件应用了图片分析的技能及像素比例来实现自动化测量与物体面积的计算。这款手机软件不仅方便测量,还大幅度地提高了测量的速度以及精准性,从而有益于后续工作的安排和测量。


随着智能手机的迅速发展和不断扩展的功能,如今的智能手机已越加普遍的被用于临床(Gan et al., 2016) 和生物医学的研究(Gan & Poon, 2016)。在智能手机的发展下,大量用于辅助科学研究的手机软件已替代了昂贵的研究器材, 这些手机软件包括:GelApp (Sim et al., 2015) 、APD Colony Counter Pro (Wong et al., 2016)、 VibraTilt (Ng et al., 2016)等。其次,用于便利研究中的分析过程的包括:DNAapp (Nguyen et al., 2014)、DNA2app (Sim et al., 2016)、 StanXY (Budianto et al., 2015)、PsychVey (Nguyen et al., 2016) 等,以及用于提供可靠教学方案的包括:AniCare、Wound Education手机软件)等。然而,在推动科学手机软件的同时,我们依旧有空间开发便利与日常生活和科学研究流程的手机软件。

在许多研究过程中,面积测量是不可缺乏的一部分。在生物医学研究中,时常需要被测量的包括皮肤疾病覆盖面积(Okasa & Rosenbeery, 1996; Gruul & Leun, 1982)、细胞/组织/器官面积、颈动脉支架手术(Bosier et al., 2017)、睡眠研究 (Liberman, 1980)、免疫学 (Sixt et al., 2005) 等。在天文学中对天体区域的计算也存有意义,例如太阳黑子的面积 (Smith & King, 1981)。不仅如此,面积计算软件也给日常生活带来便捷,比如烘培时确保松饼大小的一致,装修时对家具大小的测量等。这些例子都体现了人们对面积测量的需求。然而,传统人工测量方式容易产生视觉误差,尤其使用与专用的临床过程中从而导致不堪的后果。

为解决以上的问题,一款使用图像像素比例来实现面积测量和计算的安卓和苹果原生手机软件-APD面积测量手机软件(APD Areametric)因此而开发。APD面积测量手机软件引用了OpenCV图像处理方式和智能手机的拍摄功能对图像进行分析,从而带给使用者便捷、快速的物体面积的测量和计算。此过程非常简单、易操作。使用者只需使用手机内现有的相机进行拍摄(硬币需和物体一起拍摄)或者选择相册内已有的图像,便可通过手机软件得知物体的面积。



APD 面积测量安卓系统手机软件开发于Android Studio 3.0 平台,苹果系统手机软件则开发于XCode 9.4 平台。手机软件中的图像分析则参考并使用了OpenCV中的些许资源。







紧接着,就是对图像中的物体进行识别。使用者可同样使用自动化模式(图三左)来获取物体在图像中的所在处,若出现不准确物体识别,使用者可使用 “更改” 功能进行手描勾取物体轮廓。当图像中的物体和硬币被准确识别/手描勾取后,按照计算公式,可得出物体的实际面积。


图四: 计算公式


由于物体实际面积的计算方式与像素息息相关,最终测量的准确度将依赖于整体自动化识别/手描勾取物体的过程。从这层面来说,要充分利用该手机软件,在进行手描时,建议使用智能手机笔,如同使用APD Volumetric app (Budianto & Gan, 2017) 时使用微软Surface Pro 、三星平板电脑与Galaxy Note系列等的手机笔来进行手描勾取。


图五: 面积测量结果

APD面积测量手机软件是谷歌应用商店 (Google Play Store) 和苹果应用商店 (Apple App Store) 上唯一测量面积的手机软件,用途十分广泛。通过此方便的面积测量手机软件大幅度的提高了效率和测量的准确性。根据我们的实验,一部实际面积为92.80平方厘米的iPhone 7,通过APD面积测量手机软件,可测量出的面积为92.71平方厘米(图五)。其次,在补充资料中也包含了其他实验例子。由此可见,正确的使用自动化识别/手描勾取,我们可获得相当准确的面积。然而,APD面积测量手机软件美中不足之处在于无法对自动化模式中识别出的物体做出实况的修改。其次,目前APD面积测量手机软件的硬币数据库偏小,但随着后续的发展,数据库将会逐渐扩大。同时,所应用的图像中硬币和物体需在同个平面角上,否者测量的准确度将受到影响。




APD面积测量手机软件是一款安卓和苹果系统的原生手机软件为测量及面积计算带来了便利与效率。该手机软件无需互联网以及其他设备的支持。面积的测量和计算只需通过分析便可获得, 省去繁琐的手动测量和计算,促使整个过程更加便捷,准确和数码化。


这项工作由新加坡“Wound Care in the Tropics”研究项目资助。



颜庆应是 此期刊总主编。为了避免利益冲突,文章的审查及评论将由其他期刊编辑委员执行。 此文章免除了出版费。


吴炜铃起草了手稿并制作了安卓手机软件。杨 裕伟制作了iOS手机软件。任德峻协助于硬币自动化识别算法的过程。颜庆应构思了软件 的概念并监督了程序的全过程。


图一:通过APD Areametric 手机软件对杯垫进行的面积计算


图三:通过APD Areametric 手机软件对盘子进行的面积计算