Journal of Robotics, Networking and Artificial Life
Vol. 7(3); December (2020), pp. 208–211
DOI: https://doi.org/10.2991/jrnal.k.200909.014; ISSN 2405-9021; eISSN 2352-6386
https://www.atlantis-press.com/journals/jrnal

Research Article

Geometric Measurement Based on the Single Image
with a Rectangular Structure
Jiwu Wang*, Bo Dai
School of Mechanical and Electronic Engineering, Beijing Jiaotong University, Beijing, Haidian District, China

ARTICLE INFOABSTRACT

Article History

Image-based geometric measurement is getting more attention in machine vision field due to its contact-less and low-costcharacteristics. Here the measurement of single image with the rectangular structure is studied, in which only one side length of
the rectangle is known, and the coordinates of points in the measured plane are obtained. The intrinsic parameters of the camera
are calibrated firstly by using the three vanishing points of mutually orthogonal directions. Then the homography between theimage plane and the model plane which the rectangle structure belongs to is derived, and the plane measurement method of thelatter is described in details. Furthermore, the measurement experiment is done with the single image taken by the camera, andthe validity of the proposed method is verified by comparing with real data.

Received 11 October 2019
Accepted 04 June 2020
Keywords
Measurement
single image with rectangularstructure
vanishing points
homography© 2020 The Authors. Published by Atlantis Press B.V.
This is an open access article distributed under the CC BY-NC 4.0 license (http://creativecommons.org/licenses/by-nc/4.0/).

1. INTRODUCTIONAs characterized by its non-contact and universality, real-time andrepeatability, image measuring gradually becomes one of the impor­t­
ant methods for geometric measurement. In binocular measure­mentsystems, precise matching between two images and camera cali­bra­tion
have always been classic problems in photogrammetry. Geometricmeasurement based on a single image is getting more attention inphotogrammetry owing to the avoidance of such problems.
Considering what camera model is appropriate, blade angle measurements of variable stator vanes in jet engines were made basedon a single image [1]. It was proved to achieve plane metric rectification based a single view of multiple coplanar circles [2], but thecamera’s intrinsic parameters are known. The research was evaluated to verify the utility of a single image approach for scene ofcrime dimensional analysis [3].
Compared with theses above methods, we propose a new planemeasurement method based a single image. The method avoids
camera calibration by specialized equipment and only requires thatthe image scene contains parallel lines in three mutually orthogonal direction, where the length of one side of spatial rectangle isknown. The measurement task is completed in accordance withsteps in Sections 2 and 3.

2. USING VANISHING POINTS FORCAMERA CALIBRATION
The vanishing point is useful information for the measurement
method based on a single image. It can be used to estimate
Corresponding author. Email: jwwang@bjtu.edu.cn*

intrinsic parameters and extrinsic parameters of the camera[4,5], and assist in measuring the height of target on the reference plane [6]. The accuracy of vanishing point detection
directly affects the accuracy of measurement result. Currently,
there are various methods for automatic vanishing point detection. Owing to inevitable interferences in some special scenes,
these methods tend to be misjudged. In order to avoid such possible measurement errors, the method in this paper determines
the parallel lines corresponding to three mutually orthogonal
directions manually and estimates the vanishing point by using
Least Squares.
As shown in Figure 1, Px, Py, Pz are vanishing points corresponding to three mutually orthogonal directions. The parallel lines thatdetermine the vanishing points are respectively parallel to OX, OYand OZ coordinate axis in the spatial coordinate system O-XYZ.
C is the orthocenter of ∆PxPyPz, and D is the perpendicular foot on
the side PxPy.
There are such basic properties which are very useful for the purpose of camera calibration [4,6].
PROPERTY 1. Point C is the intersection of the optical axis and theimage plane.
PROPERTY 2. The focal length of the camera satisfies the following formula.
f =Px D Py D − OD

2Afterward the camera intrinsic matrix K is determined. On
the image plane, u is the coordinate of principal point along
the X-axis and v is the coordinate of principal point along theY-axis.

J. Wang and B. Dai / Journal of Robotics, Networking and Artificial Life 7(3) 208–211

Figure 1 | Vanishing points in three mutually orthogonal directions.

209

Figure 3 | Perspective projection schematic of spatial rectangle A1A2A3A4.

system. If camera intrinsic parameters are known, the ratio of one
side to the other adjacent side in the spatial rectangle is a functionof camera intrinsic parameters and the coordinates of vertexes ofquadrilateral a1a2a3a4 on the image plane [7].

A1A2A2 A3=(C12 x2 − x1 )(C12 x2 − x1 )(C13 x3 − C12 x2 )(C13 x3 − C12 x2 )det(x , x , x )det(x , x , x )22  C12 = det(x 3 , x 4, x 1 ) , C13 = det(x 4, x 1 , x2 ) ,Figure 2 | Typical indoor scene with plenty of information about linesegments.

fK =0

 00
f0u
v
1

Let us consider a typical indoor scene with plenty of information
about line segments as shown in Figure 2. Coordinates of vanishingpoints corresponding to three mutually orthogonal directions on
the image plane are estimated based on the above properties.
Px = (1303.41, –2.06), Py = (593.14, 2014.20), Pz = (–294.08, 101.98).
It is assumed that the distortion coefficient equals 0 and aspectratio equals 0 and then the camera intrinsic matrix is calculated.
 730.37

K =



000486.51
730.37 376.96
01 3. ESTIMATING THE HOMOGRAPHY
BASED VERTEXES OF THE RECTANGLE
It is necessary to specify a spatial rectangle mapping with arbitrary
quadrilateral in the image as a reference and the known length ofone side of the rectangle serves as the input of the measurement
system. We choose the spatial rectangle A1A2A3A4 corresponding
to quadrilateral a1a2a3a4 on the image plane as the reference. Spatial
points are represented by uppercase letters and subscripted numbers, and points on the image plane are represented by lowercase
letters and subscripted numbers.
In Figure 3, the coordinate system O-XYZ is the camera coordinate
system and the coordinate system O′-X′Y′Z′ is the world coordinate

3434


Notation: xi represents the vector Oai in the camera coordinate system.
The length of A1A2 and A2A3 are respectively a and b mm based
the above algorithm. In the world coordinate system O′-X′Y′Z′, thecoordinates of A1, A2, A3, A4 are (0, 0, 0), (a, 0, 0), (a, b, 0), (0, b, 0).
The coordinates of a1, a2, a3, a4 correspond to (x1, y1), (x2, y2), (x3, y3),(x4, y4) on the image plane.
Only the homogeneous solution for estimating the homographymatrix H is described [8]. Each image-to-world point correspondence provides two equations which are linear in the elements ofthe matrix H. They are:xh1 + yh2 + h3 − xXh7 − yXh8 − Xh9 = 0xh4 + yh5 + h6 − xYh7 − yYh8 − Yh9 = 0
The homography matrix H has eight degrees of freedom [9]. For
four correspondences, we obtain a system of eight equations ineight unknows and then an exact solution about H is obtained. For
the reference rectangle A1A2A3A4, eight equations from its vertexes
can be rewritten as a matrix equation Ah = 0.
 x10
A= x 4 0y10
y40

1 00 x1
 1 00 x40y1
0y40 − x1 X1
1 − x1Y1

0 −x4 X4
1 − x 4Y4− y1 X1− y1Y1
− y4 X4− y 4Y4− X1 −Y1  − X 4 −Y4 A performs singular value decomposition and then A = UDVT.
h equals the last column of the matrix VT. Afterward h can be
rewritten as a 3 × 3 matrix and that is H.
 0.0002 0.0000 −0.7296
H =  −0.0001 −0.0001 0.6839  0.0000 0.0000 0.0008 J. Wang and B. Dai / Journal of Robotics, Networking and Artificial Life 7(3) 208–211

210

4. PERFORMING EXPERIMENTAL
MEASUREMENT

5. CONCLUSIONAs shown in Figure 4, we select three line segments (L1, L2, L3)
which all belong to the spatial plane corresponding to quadrilateral
a1a2a3a4, and measure the lengths based on the single image. The
experimental results are compared with the results using handheld
measurement tool.

In this paper, we have developed a new method to make plane measurement based on a single image with the rectangular structure.
The method requires that the image scene contains parallel lines inthree mutually orthogonal direction, where the length of one sideof spatial rectangle is known. The measurement is performed on
the model plane which the rectangle structure belongs to.

In terms of the proposed method and handheld measurement
tool, we both carried out three replicates of the measurement
experiment which are recorded as 1, 2, and 3 to avoid random
error. Table 1 is sorted out after the experimental results arerecorded accurately. Li (i = 1, 2, 3) represents the result based on
the single image and L′i (i = 1, 2, 3) represents the result using
handheld measurement tool. From Table 1, the relative measurement error does not exceed 8%. Taking the measurement principle into account, the error seems to be caused by the following
two aspects:

The procedure consists of using vanishing points for camera calibration, estimating the homography based vertexes of rectangle
and making the plane measurement. Both the proposed methodand direct method using handheld measurement tool have been
applied to three replicates of the measurement experiment in a
typical indoor scene and good results are obtained. The proposed
method gains acceptable accuracy. In the future, optimization ofmeasurement error will be an important issue when the proposed
method is used in variable scenes.

•• Vanishing point detection involves two steps of selecting parallel lines manually and solving overdetermined linear equations
by using Least Squares when using vanishing points for camera
calibration.

CONFLICTS OF INTEREST•• There is no doubt that extracting the coordinates of pixels causes
the error. In the first case, the error of estimating the homography matrix occurs if the mouse chooses the adjacent pixels rather
than the pixels corresponding to vertexes of the reference rectangle. In other case, selecting the coordinates of pixel wrongly iscertain to cause the error when trying to measure based on thesingle image.

Figure 4 | Estimation of length in typical indoor scene.
Table 1 | Experimental results (mm) and results (mm) using handheld
measurement tool

123

L1L′1

L2L′2

L3L′3

247.7
254.5
245.9

253.0
252.3
251.8341.3
350.9
359.0

364.0
367.1
365.2

246.4
242.3
242.5

264.1
263.0
263.4

The authors declare they have no conflicts of interest.

ACKNOWLEDGMENT
The paper is supported by the project (M18GY300021).

REFERENCES[1] P.R.S. Mendonca, R. Kaucic, Single view metrology: a practicalexample, 2008 IEEE Workshop on Applications of Computer
Vision, IEEE, Copper Mountain, CO, USA, 2008.
[2] M.I.A. Lourakis, Plane metric rectification from a single view ofmultiple coplanar circles, 2009 16th IEEE International Conference
on Image Processing (ICIP), IEEE, Cairo, Egypt, 2009.
[3] D. González-Aguilera, J. Gómez-Lahoz, Dimensional analysis ofa crime scene from a single image, 2008 Congress on Image andSignal Processing (CISP), IEEE, Sanya, Hainan, China, 2008.
[4] B. Caprile, V. Torre, Using vanishing points for camera calibration, Int. J. Comput. Vis. 4 (1990), 127–139.
[5] A. Criminisi, Single-view metrology: algorithms and applications, Joint Pattern Recognition Symposium, Springer, Berlin
Heidelberg, 2002.
[6] X. Cao, H. Foroosh, Metrology from vertical objects, British
Machine Vision Conference, 2004.
[7] F.A. van den Heuvel, Exterior orientation using coplanar parallellines, Proceedings of the 10th Scandinavian Conference on ImageAnalysis, 1997, pp. 71–78.
[8] A. Criminisi, I. Reid, A. Zisserman, A plane measuring device,
ImageVis. Comput. 17 (1997), 625–634.
[9] R. Hartley, A. Zisserman, Multiple view geometry in computer
vision, second ed., Cambridge University Press, 2003, pp. 87–129.

J. Wang and B. Dai / Journal of Robotics, Networking and Artificial Life 7(3) 208–211

211

AUTHORS INTRODUCTION
Dr. Jiwu Wang

Mr. Bo Dai
He is an Associate Professor, Beijing
Jiaotong University. His research interest
is Intelligent Robot, Machine Vision, andImage Processing.

He is a postgraduate in Beijing Jiaotong
University. His research interest is geometric measurement based images.