Professional Documents
Culture Documents
Related content
- Calibration of hydrometers
Automatic alignment method for calibration of Salvatore Lorefice and Andrea Malengo
Recent citations
- Alignment of the Measurement Scale Mark
during Immersion Hydrometer Calibration
Using an Image Processing System
Luis Peña-Perez et al
Abstract
This paper presents a new method to automatically align specific
scale-marks for the calibration of hydrometers. A hydrometer calibration
system adopting the new method consists of a vision system, a stepping
motor, and software to control the system. The vision system is composed
of a CCD camera and a frame grabber, and is used to acquire images. The
stepping motor moves the camera, which is attached to the vessel containing
a reference liquid, along the hydrometer. The operating program has two
main functions: to process images from the camera to find the position of the
horizontal plane and to control the stepping motor for the alignment of the
horizontal plane with a particular scale-mark. Any system adopting this
automatic alignment method is a convenient and precise means of
calibrating a hydrometer. The performance of the proposed method is
illustrated by comparing the calibration results using the automatic
alignment method with those obtained using the manual method.
0026-1394/04/020100+05$30.00 © 2004 BIPM and IOP Publishing Ltd Printed in the UK S100
Calibration of hydrometers
an operator’s intervention. The camera (Sony, VCC-870) and transparent, and light comes from several directions.
provides a monochrome image of the meniscus and scale- Therefore, a strip of black paper is attached to the outside
marks at a rate of 12 frames per second, and has a lens with of the container of the reference liquid, to shield against
a focal length of 12 mm and an aperture ratio of 1 : 1.2. The unwanted light and allow the shape of a meniscus containing
frame grabber (Matrox, Meteor-II) converts the camera images the horizontal plane to be easily identified.
into digital data for image processing. The distance between The real meniscus has a three-dimensional shape similar
the hydrometer and the camera is 150 mm. The vessel is to a trumpet (figure 2(a)), but its camera image is a two-
cylindrical with a height of 495 mm and diameter of 180 mm. dimensional ring similar to an ellipse (figure 2(b)). The major
The software comprises an image-processing program to axis of the ellipse is on the horizontal plane.
search for a meniscus and target scale-marks, and a program The camera support was attached at the side of the support
to control the stepping motor that aligns the target scale-mark of the reference-liquid container, so the camera moves with
with the horizontal plane. the container. The roll angle of the camera was adjusted to
be parallel to the reference horizontal line. The camera was
installed facing the meniscus, at an angle of less than 5˚ to the
3. Image processing
horizontal plane. The height and angle of the camera were
An image taken using the CCD camera shows a part of the adjusted so that the length of the minor axis of the elliptical
stem with hydrometer scale-marks, the meniscus, and the meniscus was one or two pixels (0.05 mm to 0.1 mm). This
surrounding objects. However, the essential parts in the image adjustment was necessary because if the camera is positioned
for hydrometer calibration are the meniscus, the horizontal lower than the horizontal plane, the minor axis of the ellipse
plane of the reference liquid, and the hydrometer scale-marks. gets longer (as the angle between the horizontal plane and
Selecting the essential parts from the image is extremely the camera gets larger), and the error in the alignment of the
complicated and difficult. Rather than identifying the essential horizontal plane and the scale-mark increases. The horizontal
parts by processing the entire image, our system selects the part plane and the scale-mark of the hydrometer were aligned with
of the image containing the meniscus and hydrometer scale- the major axis of the meniscus.
marks, and determines the positions of the horizontal plane of As the centre of the meniscus is covered by the hydrometer,
the reference liquid and the scale-marks. the meniscus appears to be divided into two parts by the
hydrometer (figure 3). The operator selects either of the views
shown in figure 3. Separating the meniscus from the
3.1. Location of the horizontal plane background is performed using the selected part; that is, the
In a camera image, it is difficult to distinguish the horizontal meniscus is selected from the background using the threshold
plane of the reference liquid from the meniscus on the process defined in equation (1).
hydrometer’s stem because the reference liquid is colourless To threshold an image, a grey image is converted into a
binary image by representing each pixel of the image as a white
pixel if the pixel is larger than the threshold value, or as a black
PC pixel if the pixel is less than the threshold value [3–6]. As the
Electric Balance thresholding is performed, the meniscus turns black and the
background turns white.
CCD
Camera Original image: g(x, y)
Thermometer
1 if g(x, y) T (1)
Binary image: b(x, y) =
0 if g(x, y) < T
(a) (b)
Figure 2. Shape of meniscus: (a) upper view from horizontal plane; (b) lower view from horizontal plane.
vertical component of the meniscus, (ȳ), is the vertical position of scale-marks are found in the same way as was the position
of the horizontal plane: of the horizontal plane. Of the scale-marks found in this way,
the one closest to the meniscus is taken as the reference point.
m−1 n−1
Then, the hydrometer is moved to align the reference point to
A= b(i, j ) the horizontal plane. As the meniscus covers the scale-marks
i=0 j =0
above it, the accessible scale-marks are those below it.
m−1 n−1
i=0 j =0 j · b(i, j ) (2) As the container and the camera move up or down, the
x̄ = scale-marks above the meniscus may become obscured, or
A
m−1 n−1 those below the meniscus may become visible. Thus, they
i=0 j =0 i · b(i, j ) must be traced carefully, or it is not possible to determine which
ȳ = scale-mark is aligned with the horizontal plane.
A
To determine whether the bottom of a particular scale-
where b(x, y) is the binary image, A the area of the meniscus, mark is aligned with the horizontal plane, the value of the
and (x̄, ȳ) the centre of the meniscus. scale-mark closest to the horizontal plane of the current image
The position of the horizontal plane calculated using must be known. After the horizontal plane has been found, it
equation (2) is given with respect to the selected image. Thus, is assigned an initial value by the operator. Then, the value
it is necessary to transform the position of the horizontal plane of each scale-mark is calculated by counting the number of
to one relative to the whole image. This transformation is scale-marks disappearing into the meniscus or the number of
performed using equation (3): scale-marks emerging from the meniscus.
From the viewpoint of the camera, the hydrometer scale-
(X̄, Ȳ ) = (x + x̄, y + ȳ) (3)
mark appears to be moving up and down during the process
where (x̄, ȳ) represents the position of the centroid of of hydrometer calibration. When two consecutive images
the meniscus in the selected image and (x, y) represents the are compared, the hydrometer scale-mark of the latter image
coordinate of the origin of the selected image within the whole appears close to the position of the hydrometer scale-mark of
image. the former one. As the position of the horizontal plane has
been determined, the direction of motion and the position of
the scale-mark can be calculated by comparing the distance
3.2. Location of the scale-mark
between the meniscus and the closer of the two consecutive
Once the position of the horizontal plane has been determined scale-mark images.
from the meniscus, the region where the scale-marks of the Furthermore, because the scale-marks above the meniscus
hydrometer are expected to exist is searched. The positions are invisible, there is a discontinuity in the differential distance
between a scale-mark and the horizontal plane as the scale-
mark disappears into the meniscus (figure 4(a)), or appears
from the meniscus (figure 4(b)). As the movement of a scale-
mark near the horizontal plane can be detected using the
discontinuity of the distance, the change in the position of
the scale-mark can be computed accurately.
4. System operation
(a) (b)
Figure 4. Behaviour of hydrometer scale-marks near a meniscus: (a) disappearance of a scale-mark above a meniscus; (b) appearance of a
scale-mark below a meniscus.