You are on page 1of 6

Metrologia

Related content
- Calibration of hydrometers
Automatic alignment method for calibration of Salvatore Lorefice and Andrea Malengo

hydrometers - Hydrometer calibration by hydrostatic


weighing
Jesus Aguilera, John D Wright and Vern E
Bean
To cite this article: Y J Lee et al 2004 Metrologia 41 S100
- Bilateral comparisons of hydrometer
calibrations between the IMGC-LNE and
the IMGC-MIKES
S Lorefice, M Heinonen and T Madec
View the article online for updates and enhancements.

Recent citations
- Alignment of the Measurement Scale Mark
during Immersion Hydrometer Calibration
Using an Image Processing System
Luis Peña-Perez et al

- A machine vision system for the calibration


of digital thermometers
Esteban Vázquez-Fernández et al

- Hydrometer calibration by hydrostatic


weighing with automated liquid surface
positioning
Jesus Aguilera et al

This content was downloaded from IP address 130.64.11.153 on 21/02/2018 at 15:43


INSTITUTE OF PHYSICS PUBLISHING METROLOGIA
Metrologia 41 (2004) S100–S104 PII: S0026-1394(04)71028-2

Automatic alignment method for


calibration of hydrometers
Y J Lee1 , K H Chang1 , J C Chon2 and C Y Oh3
1
Mass and Force Group, Korea Research Institute of Standards and Science (KRISS),
PO Box 102, Yusong, Daejon 305-600, Korea
2
Planning and Survey Laboratory, Department of Civil Engineering, University of Tokyo,
7-3-1, Hongo, Bunkyo-ku, Tokyo 113-8656, Japan
3
School of Mechanical and Aerospace System Engineering, MRC, Chon Buk National
University, 664-14, 1 ga, Duckjin-Dong, Duckjin-Gu, Jeonju, Chonbuk 561-756, Korea
E-mail: yjlee@kriss.re.kr, khchang@kriss.re.kr, jjc7151@planner.t.u-tokyo.ac.jp and
ohcy@moak.chonbuk.ac.kr

Received 4 February 2003


Published 24 March 2004
Online at stacks.iop.org/Met/41/S100 (DOI: 10.1088/0026-1394/41/2/S11)

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.

1. Introduction This paper presents the development of an automatic


alignment method to solve the problems inherent in the manual
A hydrometer is an instrument that measures many liquid alignment method. In addition, a hydrometer calibration
properties: relative density, absolute density, alcohol degree, system adopting the new alignment method is developed.
Baume degree, sugar concentration, milk density, etc. It It will greatly improve the efficiency of the calibration of
is widely used since it is inexpensive and easy to use. It hydrometers and the accuracy of measurement.
is calibrated, based on Cuckow’s work [1], by measuring
the buoyancy when a specific scale-mark is aligned with the 2. Hydrometer calibration system
horizontal plane of a reference liquid.
In general, the alignment of the horizontal plane with The hydrometer calibration system described here consists of
a particular scale-mark is performed manually. That is, an electronic balance, an elevating device, a vessel containing
an operator aligns the given scale-mark with the horizontal a reference liquid, a thermostat, a thermometer, an instrument
plane by viewing the hydrometer scale through a magnifier, for measuring air density, and an automatic alignment system.
or looking at a camera image on a computer monitor Figure 1 shows the configuration of the hydrometer calibration
[2]. However, this manual alignment method may induce system.
measurement errors due to the operator’s limited sight or skill, The automatic alignment system consists of a camera,
and may be inefficient because of the limited attention span a frame grabber, a light, a stepping motor, and software
when continuously looking at a magnified image or an image to control the system. It automatically aligns a particular
on a computer monitor. scale-mark of a hydrometer with the horizontal plane without

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

where T is the threshold value.


The centroid of the meniscus is a point on the major axis
because it is symmetric with respect to the major axis. Its value
Environment Thermostat
Sensor is calculated using equation (2): its y-axis value represents the
position of the major axis on the y-axis (i.e. vertical direction).
Figure 1. Schematic of the hydrometer calibration system. Because the major axis represents the horizontal plane, the

(a) (b)

Figure 2. Shape of meniscus: (a) upper view from horizontal plane; (b) lower view from horizontal plane.

Metrologia, 41 (2004) S100–S104 S101


Y J Lee et al

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

The hydrometer calibration system uses a single-axis linear-


motion guide to move the container and the camera. The
Figure 3. A hydrometer scale-mark with meniscus. linear-motion guide uses a stepping motor as an actuator, and

(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.

S102 Metrologia, 41 (2004) S100–S104


Calibration of hydrometers

Figure 5. Procedure for alignment of a scale-mark and the meniscus.

is computer controlled. A proportional controller is used to


START
control the position of the linear-motion guide, whose gain
is adjusted to move the linear-motion guide to the desired
position without overshoot, oscillation, or steady state error. System initialization Calibration
To achieve this, the linear-motion guide moves very slowly
in order not to disturb the horizontal plane of the reference
liquid. The positions of the scale-marks and the horizontal Define meniscus
Read calibration point
search region
plane are controlled to an accuracy of one pixel. After the
bottom of the scale-mark to be calibrated has been aligned
with the horizontal plane, its calibration value is calculated Move meniscus to meet
Find meniscus
target scale
using the measured values of the balance and the environment
sensor.
The picture on the left-hand side in figure 5 shows an image Find scale Read balance
used in the controlling software to find the hydrometer scale-
mark and the meniscus. The pictures on the right-hand side
in figure 5 are magnified images of the circled region around Read environment condition
the meniscus shown in the picture on the left-hand side. They Input initial value (Temperature, Humidity,
show the aligned state of the horizontal plane and a scale-mark. Pressure)
Figure 6 is a flowchart showing the sequence of the operation
of the system.
Calculate calibration value
Input calibration point
5. Experimental results
Save data
Experiments were performed to show the effectiveness of the Calibration
new alignment method. A hydrometer with a scale division
of 0.2 kg m−3 , a range of 940 kg m−3 to 960 kg m−3 , a stem No
Calibration data save Calibration
Calibration
diameter of 5.69 mm, a smallest scale division interval of completed ?
compleated
& print out
0.86 mm, and a scale-mark thickness of 0.27 mm was used in
the experiments. First, the horizontal plane was aligned with a
particular scale-mark using the automatic alignment method. RETURN
Then, the operating program was stopped and the degree of STOP
alignment was measured using a magnifier as in the existing
manual-alignment method. No distinguishable discrepancy Figure 6. Sequence of the system operation.
was observed between the two methods. In measuring the
discrepancy, the hydrometer used in the experiment was
calibrated while the reference liquid was kept at 20 ˚C for manual alignment method and the automatic alignment method
both measurements so that the density was constant. In both were −0.0068 kg m−3 , −0.0009 kg m−3 , 0.0018 kg m−3 ,
the manual and automatic calibrations, the same scale-marks 0.0025 kg m−3 , and −0.0006 kg m−3 at calibrated scale-marks
were used. Figure 7 compares the experimental results of of 940 kg m−3 , 945 kg m−3 , 950 kg m−3 , 955 kg m−3 , and
the two alignment methods. The deviations between the 960 kg m−3 , respectively. The repeatability of the corrections

Metrologia, 41 (2004) S100–S104 S103


Y J Lee et al

program. A linear-motion guide is attached to the hydrometer


0.095
Autom atic calibration equipment, and is designed to approach the desired
M anual position slowly in order not to disturb the horizontal plane
0.090
of the reference liquid. To verify the performance of
0.085
the automatic alignment method, experimental results from
Correction/(kg m-3)

0.080 manual and automatic measurements were compared. The


standard uncertainties (k = 1) of the calibration results were
0.075 0.032 kg m−3 for the manual measurement and 0.031 kg m−3
0.070
for the automatic measurement. Relative to the smallest scale
division (0.2 kg m−3 ) of the hydrometer, the repeatability of
0.065 corrections was less than 6.6% in the automatic measurement
and 7.7% in the manual measurement. Using the same
0.060
reference, the differences between the two alignment methods
940 945 950 955 960 were less than 3.4% of the smallest scale division. As
Scale/(kg m-3)
shown, this automatic method is a good improvement over
Figure 7. Comparison of calibration results using the two alignment the manual method as it does not rely on the variable skills of
methods. a human operator. Not only are the results slightly better, the
repeatability is also assured.
was better than 0.013 kg m−3 (automatic measurement) Note that according to the ISO specification, when making
and 0.015 kg m−3 (manual measurement). The standard a measurement, the centre of the scale-mark should be aligned
uncertainties (k = 1) of the calibration results were estimated with the horizontal plane of the reference liquid. However, in
to be 0.031 kg m−3 (automatic measurement) and 0.032 kg m−3 this study we aligned the bottom of the scale-mark, since the
(manual measurement) using the equation calculating the upper part of the scale-mark was not visible in the immediate
density of the reference liquid in which the hydrometer would vicinity of the meniscus. Nonetheless, the data could be
float at the specific scale-mark [2]. corrected by allowing for the size of the scale-mark (thickness
and diameter), or by using the top of the scale-mark.
6. Conclusions
References
We have described an efficient, new alignment method
for calibrating a hydrometer. The method reduces errors [1] Cuckow F W 1949 J. Soc. Chem. Indust. 68 44–9
caused by limited operator skills or attention span when [2] Lorefice S, Heinonen M and Madec T 2000 Metrologia 37
141–7
calibration is performed manually. The new alignment method [3] Gonzalez R C and Woods R E 2000 Digital Image Processing
automatically aligns specific hydrometer scale-marks with (Boston: Addison-Wesley)
the horizontal plane of the reference liquid. To implement [4] Myler H R and Weeks A R 1993 The Pocket Handbook of
it, a CCD camera, a frame grabber, a stepping motor, and Imaging Processing Algorithms in C (Upper Saddle River:
an image-processing program were added to the existing Prentice Hall) pp 30–1, 157–9, 239–40
[5] Glasbey C A 1993 CVGIP: Graphical Models Image Process.
hydrometer calibration system. Images are obtained using 55 532–7
the CCD camera, and the positions of the horizontal plane [6] Weszka J S and Rosenfeld A 1979 IEEE Trans. Systems Man
and the scale-marks are found using an image-processing Cybernet. SMC-9 38–52

S104 Metrologia, 41 (2004) S100–S104

You might also like