Once a device for leisure and productivity in everyday life, the smartphone has been leveraged on increasingly for clinical uses (see review Gan SKE et al., 2016) and in biomedical research (see review Gan SKE & Poon JK, 2016). On this, a significant number of apps have been developed for daily operations in scientific settings. Some examples from our previous work function to replace the lab computer (e.g. DNAapp in Nguyen et al., 2014), some for more convenient data collection (e.g. PsychVey in Nguyen et al., 2015), and some to replace equipment and automated existing processes (e.g. GelApp in Sim et al., 2015; APD Colony Counter App in Wong et al., 2016). In the same vein of automating certain processes, there is room for the development of apps for processes that are not yet routine, but can be implemented as a process to smoothen planning and logistics.

In the daily course of many experiments in scientific research, there are requirements to determine the remaining volume of reagents when planning for experiments for logistic purposes. Similarly, with increasing safety audits on the usage of controlled substances/chemicals (e.g. List I and List II chemicals in USA Drug Enforcement Administration website), there is often a requirement to quickly determine the remaining volume of substances for records keeping or even for audits. While measuring cylinders are accurate, their use would not be suitable for use on hazardous chemicals (e.g. powder), on very minute amounts e.g. the amount of enzymes in microliters (μl) in microfuge tubes, or in cases where sterility, temperature sensitivity, and purity of the solution must be maintained (e.g. biological samples such as competent cells, see Chan et al., 2013).

For the above mentioned purposes, an image based quantification of substances would be beneficial for quick estimation, and thus we made the APD Volumetric App for this purpose. Leveraging on image processing methods and the smartphone camera to analyze user-defined cropped images, the user can conveniently and quickly estimate the remaining contents in a container. By simply taking a picture with the application or by loading a previous image, users can estimate the remaining volume after from the auto-calculation of content space from the known maximum volume of the container.

Since the smartphone is portable, quantities of controlled or hazardous chemicals can be conveniently determined on-the-go without the need for direct exposure to biological and chemical hazards. In the planning of experiments that utilize microliter quantities such as molecular cloning, it is now possible to estimate with better accuracy, that half drop of enzyme in the tubes.

Development and methodology

The APD Volumetric App for Android was developed using version 4.2 of the Eclipse Integrated Development Environment, Juno.

Calculation of volume

The app allows users to use direct camera capture or loading of existing images for analysis (Fig. 1a, b). Users are then to trace the outline of the container, either with their finger or for higher accuracy, with associated smartphone pens. For more accurate results, users are advised to take a close up of the container with the meniscus as a straight line. The cropped areas are marked by a dotted line.

Fig. 1
figure 1

Starting APD Volumetric App. a Choice of loading the picture from the device or to capture a new image directly from the camera. b Loading of the desired image from the phone, and also from Cloud storage apps. c Loaded image for processing

Should there be inaccurate cropping, the cropping process can be restarted with the “RE-CROP” button. In the unlikely event when it is easier to crop the areas outside the container (e.g. when the object exceeds the image size), the “INVERSE CROP” function can be used. Otherwise, when the user is satisfied that the dotted line traces the container accurately, they can select the area with the “CROP” function (Fig. 1c).

The user is next prompted to enter the known maximum volume of the cropped container (Fig. 2).

Fig. 2
figure 2

Determining the Volume. a Entering the maximum volume of the cropped image. b Cropping of the contents. c Results of the calculation of the remaining contents

Following which, the user is prompted to crop the area of the remaining contents in the same manner. Based on the formulae as shown in Fig. 3, the remaining volume of the contents would be calculated.

Fig. 3
figure 3

Formula used to calculate volume of liquid present

The formula used to calculate volume is as follows:

The formula uses the total number of pixels forming the container and the entered known volume of the container to determine the amount of volume represented by a single pixel. By determining the volume represented by a single pixel, the application will be able to calculate the amount of liquid present in the container by multiplying it by the number of pixels the liquid occupies.

As the volume calculations are determined by the pixels, the accuracy of the final calculated value is highly dependent on the outlining process than on the angle of the image. In this sense, to fully tap on the app, it is advisable to use a smartphone pen (generic ones with the soft round ball at the end, or specialized pens that are present in Microsoft Surface Pro series, Samsung Tablets, and Samsung Galaxy Note series) to outline the images. Should there be some odd shape or angles, the user may choose to make appropriate compensations in the outlining process.

Application and limitations

To our knowledge, APD Volumetric App is the only app in the Google Play Store that works to quantify the content of round-bottomed or cylindrical objects such as beakers, test tubes, and microfuge tubes as these are the typical shapes in biomedical research labs. Particularly designed to quantify the minute amounts in microfuge tubes, the app also has applications in common daily processes (e.g. cooking) and in quick logistical checks (liquid stocktaking). These applications can include gauging the amount of liquid supplied in containers, verifying the accuracy of markings of containers, estimating large amounts or very minute volumes, and in estimating the amount of a beverage in a glass e.g. wine in a glass or bottle.

In our tests of 50 ml (ml) of liquid in a 500 ml beaker, we were able to get the result of 51.44 ml estimation (Fig. 4), demonstrating that under accurate cropping conditions, fairly accurate estimates of the volume could be obtained. Due to the image processing nature, the container has to be transparent or at least, translucent for the gauging of the level of the contents. Care must be taken that liquid meniscus should be as straight as possible at camera lens level to reduce parallax errors that will give rise to inaccurate estimates.

Fig. 4
figure 4

Accuracy check of the APD Volumetric App with a laboratory beaker. a Image of 50 mls in a lab beaker. b Quantification of 50 mls in the lab beaker as 51.44 ml using APD Volumetric App

As the app is targeted for a safe and convenient quantification in an indirect manner, the app is not designed to be of a replacement of volumetric cylinders given the natural limitations of image processing and dependence on user cropping.

Future work

To cater to more varieties of bottles, including square bottomed containers (e.g. fish tanks) calculation methods would be incorporated. Auto-cropping features are also being developed.


APD Volumetric App is a standalone Android application that brings convenience and efficiency to volume measurement. The app does not require internet connectivity to support its features, and allows users to measure the volume of liquid present in a container without the need of physical volumetric measurements.