Professional Documents
Culture Documents
To cite this article: C. M. Sabliov , D. Boldor , K. M. Keener & B. E. Farkas (2002) IMAGE
PROCESSING METHOD TO DETERMINE SURFACE AREA AND VOLUME OF AXI-SYMMETRIC
AGRICULTURAL PRODUCTS, International Journal of Food Properties, 5:3, 641-653
ABSTRACT
641
INTRODUCTION
EXPERIMENTAL PROCEDURE
The products subject to this study were eggs, lemons, limes, and pea-
ches, all purchased at a local grocery store. Surface area and volume of the
products were determined using image processing techniques, in three steps:
1) image acquisition, 2) image processing, and 3) volume and surface area
computation. Results obtained were compared against experimental and
analytical data.
IMAGE PROCESSING TO DETERMINE SURFACE AREA AND VOLUME 643
Image Acquisition
Figure 2. Original and processed images with two different views per product.
product 90 . The two perpendicular views of an egg and peach prior to
processing are presented in Figs. 2a and 2c, respectively.
Image Processing
The acquired images were processed using Adobe Photoshop 5.5 image
processing software (Adobe Systems Inc., Salinas, CA), upgraded with the
Image Processing ToolKit (Reindeer Games Inc., Asheville, NC), installed
on a Sony VAIO Digital Studio desktop computer. The color image of the
product on a black background was converted to a 256-levels gray scale
image, with white corresponding to 0 and black to 255. The image was then
converted to a binary image using the threshold option, with a value of 128,
the midpoint between the two peaks of the image histogram.[14] All pixels
with a gray level of 128 and higher were converted to black (binary value 1),
and those with a value of 127 and lower were converted to white (binary
value 0). The remaining noise, image features of less than 200 pixels, was
removed using the cutoff filter in the Image Processing Toolkit.[15] The binary
IMAGE PROCESSING TO DETERMINE SURFACE AREA AND VOLUME 645
image was inverted, with the object of interest black and the remaining image
white, and saved as a bitmap file (Figs. 2b and 2d).
sffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
X
n Xn
p Dbot i Dtop i 2 2
S¼ Si ¼ ðDbot i þ Dtop i Þ þh ð1Þ
i¼1 i¼1
2 2 2
X
n Xn
ph 2
V¼ Vi ¼ Dbot i þ Dbot i Dtop i þ D2top i ð2Þ
i¼1 i¼1
12
where Dbot ¼ frustum bottom diameter, cm; Dtop ¼ frustum top diameter,
cm; and h ¼ frustum height, cm.
A Matlab code was created to calculate volume and surface area of the
elementary cones and their summation over the whole object (Appendix A).
The program counts the frustum radii in pixels, based on the difference
between the color of the sample (1 ¼ black) and the background (0 ¼ white).
Conversion from pixels to unit length in vertical and horizontal directions is
accomplished by multiplying the number of pixels with the calibration factor
in that direction (unit length=number of pixels). Calibration was performed
in both dimensions to account for non-square pixels in the CCD array of the
camera. For each sample class (eggs, lemons, limes, peaches) the system was
calibrated separately to account for different focal planes associated with
products of different dimensions. The calibration factors were determined as
follows. A picture of one representative product in each class was used in
Adobe Photoshop to count the number of pixels corresponding to its max-
imum dimensions in two directions. The dimensions were previously mea-
sured using a caliper and the calibration factor was calculated as the ratio
between the dimension in centimeters and the number of pixels. The resulting
number was employed in Matlab as a calibration factor for all products in
the same class with the reference product.
Method Validation
A ¼ pD2 ð3Þ
pD3
V¼ ð4Þ
6
For agricultural products, method precision was assessed by comparing the
two data points obtained from two perpendicular images of the product.
Method accuracy was estimated by comparing image processing results with
data obtained using previously developed methods. Surface area of agri-
cultural products was measured using the tape method[2] and volume by the
water displacement method.[2]
Narrow strips of tape from 2 to 4 cm in length were used to cover the
entire surface area of the product. The tape was cut into sections with a razor
knife, all sections removed and placed on a transparency sheet, which was
run through a LI-3000 Area Meter (LI-COR, Inc, Lincoln, NE) to obtain the
total sample area.
Sample volume was measured using the water displacement method.
The product was completely submerged in water by a sinker rod and the
weight of displaced water measured. Water absorption was assumed negli-
gible due to short contact time between the sample and the medium (water).
The product volume was obtained based on Archimede’s principle, by
dividing the mass of displaced water by the density of water.
Statistical Analysis
jx1 x2 j
% diff ¼ ð5Þ
x1
Surface area and volume of five 1.500 diameter spheres obtained using
image processing and traditional methods were compared against calculated
values to assess the accuracy of the method used (Table 1). Image processing
data shows a 1.34% larger surface area than the calculated value. The tape
method yields a surface area 3.20% larger than the calculated value. This
suggests that the image processing method is more accurate than the tape
method. Besides higher accuracy, the image processing method is more
precise, as supported by a low standard deviation between the readings,
0.32 cm2 as compared to 0.64 cm2 for the tape method.
In terms of volume measurement, the accuracy of the water displace-
ment method (0.44%) is better than the image processing (1.19%). The
precision of both methods: water displacement and image processing, are
very similar: 0.04 cm3 and 0.07 cm3, respectively. Overall, the image proces-
sing error in both surface area and volume measurement was below 2%.
Agricultural Products
Method Precision
Table 1. Method Validation, Mean Values Standard Deviations (Percent Difference Be-
tween the Measured Parameter and the Analytical Value)
45.60 46.21 0.32 47.06 0.64 28.96 28.62 0.07 29.09 0.04
(1.34%) (3.20%) (1.19%) (0.44%)
IMAGE PROCESSING TO DETERMINE SURFACE AREA AND VOLUME 649
I and another in region II (Fig. 2d), the Matlab program created a new
frustum with a diameter equal to the sum of the diameters of the two frustums,
leading to higher calculated area and volume. It is therefore important to
avoid using concave images of the agricultural products when computing their
volume and surface areas. Also, errors were introduced during the digitization
process, when images were converted from a continuous function to a grid of
discrete elements (pixels). Sources of error in the digitization process for dif-
ferent types of discretizations have been reviewed previously.[16]
Method Accuracy
CONCLUSIONS
Image acquisition does not require special training and the mathema-
tical model can be easily implemented in software packages other than
Matlab. With future developments of other image acquisition devices, such
as higher resolution digital cameras, and with the increase in image quality
and price reductions, the method will become more accurate and more
affordable. Furthermore, this method may be used for on-line sorting of
agricultural products based on their surface areas and volumes.
APPENDIX A
Matlab Code
REFERENCES