Experimental Software Solution for Estimation of Human Body Height using Homography and Vanishing point(s)

Experimental Software Solution for Estimation of Human Body Height using Homography and Vanishing point(s)

Volume 3, Issue 3, Page No 125-128, 2018

Author’s Name: Ondrej Kainza), Maroš Lukáč, Miroslav Michalko, František Jakab

View Affiliations

DCI, Faculty of Electrical Engineering and Informatics, Technical University of Košice, 042 00, Slovak Republic

a)Author to whom correspondence should be addressed. E-mail: ondrej.kainz@tuke.sk

Adv. Sci. Technol. Eng. Syst. J. 3(3), 125-128 (2018); a  DOI: 10.25046/aj030317

Keywords: Homography matrix, Vanishing line, Vanishing point

Share
440 Downloads

Export Citations

The principal goal of this paper is the development of the experimental software solution for the extraction of dimensional unit from the uncalibrated image. Existing techniques are analyzed and also partially utilized in presented approach as an aid in the extraction process. The design of two different approaches was proposed, these were later implemented and tested. Proposed methods cover utilization of homography matrix, vanishing points and vanishing line. Developed system allows to determine the dimension of any object in image based on the value of reference dimension. Proposed software solution was tested in laboratory and real-world environment.

Received: 07 May 2018, Accepted: 30 May 2018, Published Online: 15 June 2018

1. Introduction

The idea of computer machine being able to “see” is indeed intriguing. The very concept is the basis for computer vision and related image processing scientific field, having as an aim enabling the computer to detect and recognize the real-world by vision. This idea brings however many issues that have to be solved. On the other hand, it proves that some ideas and concepts are possible and can become reality.

Implementation of computer vision is part of our daily life. Millions of people utilize the social media services and add new images every moment. One of the areas of interest that is covered by computer vision is face detection. There is space for improvements even in this area, since many faces are often not being recognized due to multiple reasons, e.g. blurry image, small face etc., yet we can conclude that in general these algorithms are properly designed and work efficiently in most of the cases. Computer vision may be utilized also in the gaming industry by controlling of game environment through hand gestures or in virtual reality, which has potential of becoming vast part of this industry.

Extraction of dimensional units from the image belongs to the image processing. Two types of images may be considered, calibrated and uncalibrated. The first is the image with some prior information, i.e. camera intrinsic and extrinsic parameters. In the second case, there is no such information and the only way is to process the information hidden within the pixels. In our research, we focus on the extraction from the uncalibrated image. Such extraction is more complex and hence different methods must be employed. Extraction of dimension from the image has multiple utilization, e.g. in security cameras or as additional parameters in person identification. Also, another method for such utilization is in the field of medicine, where dimensions may be used in anthropometry or for statistical purposes of changing population.

2.  Approaches for the Extraction of Dimensions from Single Image

The overview of methods and approaches for the extraction of dimensional units from the images is presented in this part. As mentioned above, the image can be divided to two categories, calibrated and uncalibrated. Uncalibrated image is defined by [1] as image created by the optical device with unknown focal length, ratio, and principal point. Also, the position of camera in space is unknown, this covers its translation and rotation.

Many researches utilize estimation of dimension from the image for the reconstruction of scene captured in image or for creation of 3D models. Our solution is utilizing these principles, however only for the estimation of object’s size. Note that only single uncalibrated image is considered.

Authors of researches [1, 2] presume for image to be taken in perspective. Vanishing points and lines are largely utilized in this technique. Several definitions and mathematical proofs show the validity and possibility of extraction of these features from the image. Providing the vanishing line and point of reference plane is extractable and having the known reference length of real-world object the ratio can be determined. Then other distances of points from the reference plane can be acquired using this very ratio. Use of this method is suitable for calculations of distances between parallel planes. Some ratios can be determined, e.g. ratio of two areas in plane or ratio of two parallel straight lines of plane, knowing the vanishing line of reference plane. These properties are utilized in our research in determining of object size.

Accuracy of the measurements is also very important, we presume the certain deviation. In [3] author presents possibility to transfer points from the image to a specific plane of real world. The homography is being utilized, represented by relationship:

where  is the point in the real-world plane,  is the point in the image and  is homography matrix required for the transformation. Further, author presents formula for calculation of distances between planes. These two approaches are used to extract dimensions. First method is for plane extraction and second method is proper for extraction of objects’ heights. Estimation of object’s height is in this case represented as acquiring the distance of point from the plane, knowing the vanishing point and line of this plane. Author formulates expression:

Where  is the height of the unknown object,  is reference object of known height,  is vanishing point, ,  are minimal and maximal point of unknown object, and vice versa, ,  are points of the real object and finally  is vanishing line. Metric factor is  used for calculation of object height. Other approaches to extraction of dimensions is presented in [4].

The main author of this research proposed own approach to the extraction of height in [5]. The real world parameters are calculated based on the prior image calibration process or known distance to the object. Utilization of vanishing point(s) and line are also considered in [5].

3. Homography and Vanishing point(s) and line

Two extraction techniques will be discussed next, the homography and utilization of vanishing point and line. The first is more straightforward but requires specific conditions, the latter is more complex, however allows extraction of multiple dimensions. Experimental software solution is designed to estimate the dimensions of any object in the space providing certain criteria are met. Principal focus is the extraction of vertical dimension, i.e. height from the still static image. No prior calibration is carried out, yet the image has to contain specific shapes to enable extraction. Previously mentioned criteria necessary for input image are the following:

  • low resolution of image is not recommended due to error in the calculation,
  • image can be in full color or in shades of grey,
  • number of required dimensions has to be selected by the user,
  • one object in the image must serve as a reference object.

In the Figure 1 is depicted the internal functionality of proposed system. Input to the system is the single static image. Note that, no lens distortion is not considered, since we do not expect utilization of surveillance cameras or action cameras.

Algorithm takes into the account two specific cases of extraction – using homography or using vanishing point(s) and line. In the first case, the reference dimension or object is in the same plane as the unknown dimension or object, hence homography can be implemented. On the other hand, the approach using vanishing point(s) and lines is used if the reference object is in the different plane than unknown value. More probable is utilization of the latter case, since it is expected for objects to be in separate planes.

Furthermore, the first approach follows the known homography relationships (1), the second approach is based on the [3] and experimentally implements it to the form of software solution. Implementation of the experimental solution is in the form of a desktop application, utilizing available OpenCV libraries. This form of application was selected due to nature of the research project and based on the requirements of laboratory staff.

Figure 1: Extraction of dimensions: System functionality.

3.1.  Extraction using Homography

Providing the above given requirements are met the process of selecting points of plane is possible. This is for the case of Homography, in this case Equation (1) is utilized. Four points are required as an input from the user to correct the perspective distortion. Case of simple situation when known and unknown dimension is in one plane is depicted in Figure 2.

These four points are used to create homography matrix , which is used to transform each point from the original image to the new, while creating a view perpendicular to given plane. Once the distortion is corrected, another input from the user is expected – selecting the reference lengths and unknown lengths. It holds that ratios of the dimensions in the image correlate to the ratios in the real world and thus the unknown height can be extracted using this method. Perspective distortion in transformed image is minimal and calculation of the unknown length is thus not distorted.

Figure 2: Known and unknown length located in one plane.

3.2.  Extraction using Vanishing Point(s) and line

The fundamental presumption of this method is providing the image that meets the given requirements. Principally, at the least one vanishing point should be extractable. Most of the cases belongs to this group of extraction, the since unknown and known object is generally located in the different planes, Figure 3 is the example of such case.

Figure 3: Known and unknown length located in different planes.

This is usually the situation when one object is located behind another, hence the extraction process is a bit more complex. In the first step the vanishing point(s) and line has to be identified. Two points are enough to estimate one straight line of a plane, i.e. four points in total are required to estimate location of vanishing point. Images can be divided based on the number of vanishing points extractable from the image. Estimation of one or two vanishing points were considered in this research. In case of one vanishing point, the vanishing line is created as straight line crossing the vanishing point and being parallel to upper and lower border of the image. In case of two vanishing points, the vanishing line is created as intersection of these points. Based on the number of vanishing points one or two points are selected.

Further user input is required to selected unknown and known length. To achieve the most correct result such selection process must be as precise as possible, first upper point, second lower point. Once this process is completed, the intersection of straight line crossing the lower and then upper point of reference object is calculated. This is further used to calculate the length of the unknown object. The unknown real dimensions is given as the multiple of the reference length and ratio. This ratio represents the distance of the lower point of measured object to intersection of unknown object and reference distance in pixels.

4. Testing of Experimental Software Solution

Experimental software prototype was created to estimate the precision of proposed methods. For each method, at the least one photography, was created that meets the given requirements. Each testing was repeated for two times to reduce the possible error in measurement process.

4.1.  Testing: Homography

The window height is selected as the reference value, i.e. 55 inches. The unknown height in this case is the door (see Figure 2). Naturally, the size of the unknown height was also known to enable calculation of deviation in measurement. See the Table 1 for the summarized results.

Table 1: Implementation of method using Homography.

Reference length [in inches] 55 86.6 55
Real length [in inches] 86.6 55 67
Number of test 1 2 1 2 1 2
Estimated value [in inches] 86.2 86.2 54.87 54.6 67.6 67.7
Difference [in inches] 0.4 0.4 0.13 0.4 0.6 0.7

4.2.  Testing: One and Two Vanishing Point(s)

Both interior and exterior were the subject of the testing using this method. As the reference objects were considered students of the department.

Table 2: Implementation of method using One Vanishing point [in inches].

(a) (b)
Reference length 70.5 77.1 179.1
Real length 77.1 70.5 73.62 66.14 71.65
Number of test 1 2 1 2 1 2 1 2 1 2
Estimated value 77.4 76.9 70.7 71.0 74.2 74.3 66.2 66.7 71.4 71.4
Difference 0.3 0.2 0.2 0.5 0.6 0.7 0.1 0.6 0.3 0.2
A B C

The first case of one vanishing point is depicted in Figure 4 (a), see Table 2, containing student of height 70.5 inches. Door (77.1 inches) behind the person is used as the unknown value in this case, however, vice versa, door was used as the known parameter. In Figure 4 (b) is depicted exterior image containing several students, having as a reference height pillar of height 179.1 inches. In both cases one vanishing point is extractable.

The last case is depicted in Figure 5 having two vanishing points and one reference height. Several department students were asked to stand in the specific positions. Two vanishing points  can be thus created. Person marked with  is of unknown height. Reference object is marked again with yellow.

Figure 4: Known and unknown length located in one plane.

Figure 5: Two vanishing points.

Last method contains the largest deviation from the real values, e.g. subject marked with B. Relative error in this case is up to 2%. For detailed outputs see Table 3.

Table 3: Implementation of method using Two Vanishing points [in inches].

Reference length 75.6
Real length 71.7 71.7 66.1 70.5 72.8 73.6
Estimated value 71.5 72.9 65.8 69.3 73.2 69.9 73.9
Difference 0.1 1.3 0.4 1.2 0.4 0.3
A B C D E F G

5. Testing of Experimental Software Solution

Large analysis of existing approaches in the extraction of length from uncalibrated images was carried out. Several approaches may be considered if the reference object is in the same plane as the unknown object. One of such approach is presented in this paper, i.e. correction of perspective distortion through the means of homography matrix.

Another situation consists of having reference object in different plane to unknown object. This case assumes utilization of vanishing point(s) and line. Specifically, the research was principally focused on the extraction of human body height. The outputs of the testing prove this method to be successful if deviation up to 2 percent is acceptable. These approaches have variety of use, in case of this research they were utilized to extract anthropometric parameters, mainly height was considered. However, as a part of another research other anthropometric parameters were extracted. Created software solution proved to be usable and reliable in estimation of object size from uncalibrated images.

In the future research, we plan to implement automatic detection of vanishing points and further automatic detection and recognition of reference object. Testing of image with and without lens distortion is considered. The extraction of heights can be also extended to measure the human body parameters that can serve as an input to novel HBDF format proposed in [6].

Conflict of Interest

The authors declare no conflict of interest.

Acknowledgment

This publication is the result of the Project implementation: University Science Park TECHNICOM for Innovation Applications Supported by Knowledge Technology, Phase II., ITMS: 313011D232, supported by the Research & Inovation Operational Programme funded by the ERDF. We support research activities in Slovakia/This project is being co-financed by the European Union.

  1. A. Criminisi, Accurate visual metrology from single and multiple uncalibrated images, Distinguished Dissertation Series, London: Springer-Verlag, 2001.
  2. A. Criminisi, I. Reid, A. Zisserman, “Single View Metrology,” in International Journal of Computer Vision, 2001, vol. 40, no. 2, pp. 123-148.
  3.  A. Criminisi, “Single-View Metrology: Algorithms and Applications,” in Proceedings of the 24th DAGM Symposium on Pattern Recognition, Zurich, CH, 2002, pp. 224-239.
  4.  W. Guang-Hui, H. Zhan-Yi, W. Fu-Chao, “Single View Based Measurement on Space Planes,” in Journal of Computer Science and Technology, 2004, vol. 19, no. 3, pp. 374-382.
  5.  O. Kainz, “Advanced Approaches in Identification the Anthropometric Features of Person in the Image,” PhD Thesis, Technical university of Kosice, 2018, pp. 1-117.
  6.  O. Kainz, F. Jakab, R. Vápeník, and M. Michalko, “Human body description format,” in Computer Standards & Interfaces, vol. 58, pp. 118–125, May 2018.

Citations by Dimensions

Citations by PlumX

Google Scholar

Scopus