A research on the calculation method of car proportion based on image processing

The proportion of the car is one of the important parts of car styling design. The study of the car proportion is of great significance. The proportion of the car is determined by the technical conditions, functions and aesthetics. At present, there’re not many studies on the area proportion of the car .There’re studies on the line relationship and length, width, height proportion of the car. This paper uses computer image processing method to calculate the projected area proportion of the hatchback car. And it provides a new thinking and method for the car proportion study. The result shows that the projected area proportion values of the hatchback cars of European, American, Japanese, Korean and Chinese series on the market have a difference, but are close. And the total average projected area proportion values of car window and car body of the hatchbacks have been calculated.


Introduction
The proportion of car is an important part of the car styling, whether a car is beautiful, depends on whether the proportion of the car is coordinate. The proportion of car is determined by the development of automobile industry technology and aesthetic laws. The car styling should meet the function of use, also should meet the aesthetic needs of people. To meet the use function, ergonomics and aerodynamics requires, the body length, height, Width, wheelbase etc. will have some limits. And after meeting the basic use requires, it needs to meet the aesthetic requirements.
At present, the study of the proportion of car is mainly concentrated on the relationship between the lines on the body and the proportions on the length, width and height directions.Computer image processing technology has been widely used in scientific researches, industrial and agricultural productions, biomedical engineering, military and other fields.
Ravi Ranjan et al. proposed a classification and identification method for surface defects in friction stir welding based on image processing [1] . Paula Cristina Oliveira et al. proposed a non-destructive method based on digital image processing for measuring the vitality and nutritional status of vines [2] . Hua-wei Cui et al. proposed a rapid measurement method of relative lesion area based on Photoshop software [3] . Lu Fu et al. studied the technical factors such as ergonomics, aerodynamics and body structure in car styling [4] . Zhen Wang and others studied the car styling features from the view of holidtic cognition, proposed that the ratio, space and stance together constitute the overall car styling feature frame [5] . Zhuan Wei and others studied the side proportions on the sedan car body, also the characteristics, contents and application of digital image processing are analyzed [6] . Yu-mi Huang analyzes the characteristics, contents and applications of digital image processing [7] .

Calculation principle
A pixel is the minimum unit of a digital picture: a point. Theoretically, the face is composed of numerous lines, and the line is composed of numerous points, that is, the surface is composed of numerous points. But In actual use, the number of pixels of the image is limited, and the single pixel has a certain area. So calculating the ratio of the number of pixels in different parts of a picture can get the area proportion between them.
This paper calculates the area proportions in a single car picture, then making classification to the statistics, dividing them into three categories: projected area proportion between the front window and the front view of the car body, the side windows and side view of the car body, the rear window and the rear view of the car body. This method is a rapid measurement method of projected area proportional. The requirements of the samples in this experiment are the pictures are clear, the shooting distance is moderate, and the shooting directions are the front, the side and the rear. And the sample car pictures come from professional car website: www.pcauto.com.cn.
The projected area proportions between the window and the body of the car are calculated as follows: Where, R is the projected area proportion value between the window and the body, P w is the number of pixels of the window in the picture, and P b is the number of pixels of the body in the picture.

Method validation
According to the ratio of 1: 1 ,in mm Drawing a 50 × 50 square, 40 × 70 rectangular, circle of radius 25, bottom side length 30, high 40 isosceles triangle, and bottom side length 40, high 50 isosceles triangles. And then print it in a 1: 1 ratio on an A4 paper .After that use a digital camera to take picture of it with the camera lens vertical to the paper, then put the picture into Photoshop software as shown in Figure.1, the graphics number are○ 1 ,○ 2 ,○ 3 ,○ 4 ,○ 5 .
Then use the pen tool to create five paths along the profile of the five graphs, then use these paths to create the select area, as shown in the dotted area in Figure.2, and then view the number of pixels within the five selection area respectively through the histogram expansion window in Photoshop as shown in Figure.2. The results are as shown in Table 1 and Table 2:  The relative error is the ratio between the absolute error caused by the measurement and the true value (conventional) of the measured, multiplied by 100%, the average relative error of the measurement method is 2.64%, indicating that the method is effective when the measurement accuracy requirement is not high. And this method can be used to calculate the area proportions between the graphics in a single photo.

Sample collection
Widely collecting the front, side and rear view pictures of the mainstream hatchback on the market as test samples, of which there are 18 European cars, 5 American cars, 12 Japanese cars, 6 Korean cars, 17 Chinese cars, a total of 58 models (the amount of the American and Korean hatchback cars is small on the market).The hatchback models are as shown in Table3.

Calculation examples
Take the projected area proportion between the window and the body calculation of BMW 1 Series as example: The three virtual projection planes are the front view plane, back view plane and the side view plane. Take the areas on the car in the three view photos as projected areas simply. So the projected area proportion is the size proportion between the areas on the car in the three view photos.
First, collect the front, the side and the rear view pictures of the target model, as shown in Figure.4. Next, put them into Photoshop separately, using the pen tool to separately hook out the paths along the profiles of the car body and the window (Considering the integral design of the side car body, the area of the wheel opening is taken into account). For the sake of clarity, the path is indicated by red dotted lines, as shown in Figure.4. And then use the body path and window path to establish the select area. After that, view the number of pixels of the selected area in the histogram extension window, as shown in Figure.5. The pixels of BMW 1 series car pictures are as shown in Table 4:  Put the value of pixels into equation (1), so the proportion of projected area between the car window and the car body can be obtained. The proportions of the projected area between the car window and car body of BMW 1 Series are here: Front view proportion value is 0.20, side view pro portion value is 0.15 and rear view proportion value is 0.18.

Statistic of the calculation results
In the following chart, the proportion 1 is the projected area proportion value between the front window and the front view car body. The proportion 2 is the projected area proportion value between the side window and the side view car body. The proportion 3 is the projected area proportion value between the rear window and the rear view car body.

Conclusions
This paper presented a fast method based on image processing to measure the projected area proportion between the car window and the car body, and calculated the projected area proportions between the window and the body of current mainstream hatchbacks through this method. Here come the conclusions: a) The total average projected area proportion values of the mainstream hatchbacks on the market : The total average projected area proportion value between the front window and the front view car body is about 0.22; the total average projected area proportion value between the side window and the side view car body is about 0.16; the total average projected area proportion values between the rear window and the rear view car body is about 0.19. b) The changes of the proportion values between the five hatchback series: As can be seen from Table 5, the standard deviations of proportion 1, proportion 2 and proportion 3 between the five hatchback series are about 0.00,0.00 and 0.01 respectively (keep two decimal places) .This means that the projected area proportions between the car window and car body between the five hatchback series do not change too much. c) The order of the projected area proportion values of the five hatchback series : Relatively speaking, the projected area proportions between the front window and the front view body of the mainstream hatchbacks from large to small order is: Chinese series> Korean series = American series=Japanese series=European series; The projected area proportions between the side window and the side view body of the mainstream hatchbacks from large to small order is: American series = Chinese series> Japanese series = Korean series = European series; The projected area proportions between the rear window and the rear view body of the mainstream hatchbacks from large to small order is: Japanese series> American series = Chinese series = European series> Korean series.