Analysis of Video Recording in Accident Reconstruction


 The article discusses the use of video recordings in the reconstruction of road accidents. Many drivers use in-car digital video recorders (DVR), so called dashboard cameras, to register the situation in front of or behind the car while driving. Such recording can be in some situations an important evidence when determining liability of the road collision. However, in most such cases the video recording is analyzed only from a qualitative point of view, while the article shows that a lot of quantitative information, such as vehicle speeds, accelerations, or the directions of their movements, can also be obtained from the video recording. The selected methods of quantitative analysis of a video recording are here presented. Furthermore, attention is paid to the problems of image analysis, that experts deal with during accident reconstruction. It is indicated that video recordings should be analyzed according to different procedures depending on the situation they present. It is also discussed the influence of recording quality (resolution, distortion, image sharpness, recording speed and others) on the usefulness of the recording for obtaining from it the quantitative information. Finally, the method for estimating the uncertainty of the results is presented. The article confirms that it is possible to determine the chosen parameters of vehicle motion based on an analysis of the DVR recording.

, from on-board vehicle location systems [13], and information contained in location devices [11] are also analyzed.
Many drivers use in-car digital video recorders (DVR), also known as dashboard cameras, to register the situation in front of or behind the car while driving. If the vehicle involved in the traffic incident was equipped with such video recorder, the recording can also be a valuable source of information about a course of the traffic incident. The video recording of the last moments before the traffic incident and the recording of the traffic incident itself could be the main evidence when determining liability. In most cases the video recording is analyzed only from a qualitative point of view, i.e., what is visible is considered in the reconstruction. The aim of this article is to show that a lot of quantitative information can also be obtained from the video recording. The methods of quantitative analysis of the video recording will be presented here. Obtaining the quantitative information from the recorded video is a difficult and complicated process, but as it will be shown, it is possible. However, regardless of the method of use, the video recording is a very valuable source of information in accident reconstruction process, which was confirmed in work [2].
This article presents the possibilities and limitations of obtaining quantitative information from video recordings recorded with popular video recorders used by drivers. It is also discussed how individual parameters of video recorders have a significant impact on the possibility of obtaining valuable data from video recordings. Finally, it is presented the uncertainty assessment of the results, which was carried out using the Monte Carlo method, described in more detail in [14].

Video recorders used as dashboard cameras
In the scientific literature on the reconstruction of road accidents, there are few publications relating to the analysis of images recorded with a video recorder. Only by extending the search to other fields of knowledge, such as 3D scanning, autonomous vehicles, or robotics, can more information on video image analysis be obtained. There are, admittedly, descriptions in the literature methods of video image analysis allowing to determine the distance of the camera from the object (e.g. [9]), however, few of these methods can be applied in image analysis performed for the purposes of reconstructing a road accident. Available publications (e.g. [8]) usually present a computer algorithm for determining the distance between a camera lens and an object. The limitation of the use of the algorithm is that the analyzed movies can be of different quality, which requires from an expert to change the software code to adapt to each analyzed movie, and thus his high proficiency in the programming environment. This method can, however, play a complementary role in the process of image analysis for accident reconstruction.
Nowadays, many different electronic systems are used in vehicles, which can be used in the process of traffic incident reconstruction. These include black boxes, GPS position recording, vehicle position location, etc. However, this type of vehicle equipment is available in new cars and in higher-end cars and new trucks and buses. Many of budget vehicles are not equipped with this type of electronic system. It is possible to retrofit a vehicle with the above-mentioned electronic systems, but the installation costs wouldn't be acceptable for most driver. However, in recent years the number of vehicles equipped with cheap video recorders, so called dashboard cameras (purchase cost up to EUR 250), has increased significantly and it is estimated that sales will continue to grow, as shown in the Dashboard Camera Market Size, Share & Trends report [4]. Such video recorder is a relatively cheap device to buy and simple to install. These undeniable advantages also lead to an increasing number of these devices in the domestic market of motor vehicle users.
The main reason for installing video recorders in cars is to protect yourself in the event of a collision or suspected traffic offence. The aim is to obtain proof of one's innocence in the event of possible claims relating to damage caused while driving or parking damage.
In such situations video recording could be very helpful as it allows to see the situation that occurred during the incident. However, to date, very often recordings are only analyzed from a qualitative point of view. The aim is to explain how the event took place, to establish and identify the perpetrator of the event, his/her image, to identify the perpetrator's vehicle, its registration number, etc.
As it is shown in the further part of the study, video image contains much more information which, after appropriate processing, allows to obtain valuable quantitative information. Such an analysis of the image makes it possible to determine the speed of vehicles recorded by the camera, which may help in more precise determination of the course of the road event and indicate its possible perpetrators. By determining the acceleration of vehicles, it is also possible to answer questions concerning the reaction of drivers, e.g., attempts to brake. A change of direction of a moving vehicle can also be determined from the video recording. The data on vehicles speeds allow, in turn, to determine their energy, and with the use of energy methods to estimate the energy of a collision and verify the extent of damage to vehicles.

Selected information about the principles of operation of video recorders which influence the process of film analysis
The recording devices used in cars are made up of an optical system and an electronic system for image processing, which is like that used in normal video cameras. However, popular devices use lossy compression to reduce the amount of data stored in the device's memory.
Lossy compression is the removal of data from the processed video that is irrelevant to the human sense, in this case sight. The removed data, invisible to the viewer, is nevertheless essential for the film analysis process. There are various compression standards, the main goal of which is to save the film in a file with the smallest possible volume while maintaining the best possible quality. Reducing the size of the file, however, is associated with a loss of data and in the case of a film this manifests itself in the deterioration of image quality [12].
The video recorder records images in a loop as short video sequences of up to several minutes in length. When the device runs out of memory, the oldest files are replaced by new ones, allowing the video recorder to work continuously. More advanced video recorders record video sequences on the memory carrier, as well as files that store other data correlated temporally with the recorded image, such as GPS position, acceleration in the three axes of the Cartesian reference system, as well as speed and time.
In the case of video recorders, the parameters that are necessary to perform a quantitative analysis of the video (determination of vehicle movement parameters) are -the focal length (distance in mm) of an optical system, which defines the distance between the center of the focusing lens and the point at which light rays are focused, -the dimensions (expressed in mm) of the photosensitive matrix on which are incident the light rays focused by a lens according to the scheme in Fig. 1. It should also be noted that in both cameras and camcorders, the optical system is subject to an optical defect called distortion [10].
It is important that recording of film sequences is done at a resolution where the aspect ratio of the image corresponds to that of the photosensitive matrix. If this condition is not met, a coarse reading error will be introduced, and the results may contain discrepancies of several tens of percent. However, if the recording was made in a different aspect ratio, an appropriate factor must be entered to correct the error.
The time of the video can be recorded on the recording as a clock, or it can be obtained from the analysis of the recorded video. The video recording standard is 25 to 30 frames of video per second. Frame rates above 25 fps result in the human eye seeing a smooth image. When recording in this mode (25 fps -frames per second) the time interval between successive frames is 0.040 s = 40 ms. This is an assumption that does not always hold true and is explained later in the paper.
There are many video recorders on the market today, with various recording speeds of up to 120 fps. When analyzing a several-second film sequence, such a high recording speed is not necessary. At the recording speed of 120 fps each subsequent frame of the film is recorded every 0.0083 s = 8.3 ms. During this time the vehicle speed will change only slightly.

Overview of image analysis techniques
The first technique, widely described and used both in robotics, autonomous vehicles, and 3D scanning, is stereovision. It involves the use of two cameras, observing an object from different angles. This makes it possible to read 'depth' from two two-dimensional images created by the two cameras. It is a highly accurate but expensive technique. It is also not applicable to the present work, the subject of which is limited to the analysis of the recording of film sequences obtained with monovision video recorders popular among drivers.
Techniques two and three are mainly used in robotics and involve the use of a single camera.
The second method uses a camera, placed at a certain height, which has a variable tilt angle. This allows to read the distance of the object from the camera in the horizontal plane. This has been presented in the works [5]. This technique is also not applicable to the analysis of videos from video recorders because they are mounted stationary in vehicles. Furthermore, video recorders are mounted at such a height that the focal axis is positioned (approximately) parallel to the longitudinal axis of the vehicle.
The third technique used in robotics is one that is based on image capture using a single camera.
The camera should be placed high up at an appropriate (quite significant) angle to the surface on which the robot moves and should be mounted stationary relative to the robot [15].

General methods of accident reconstruction
To reconstruct a traffic incident, it is necessary to determine the position of vehicles in time in the adopted reference system. This can be done by analyzing an appropriately made police sketch from the scene of the accident or by analyzing a video-recorder recording. The use of video-recorder recording allows to determine the speed of vehicles and their acceleration.
Additionally, by identifying the vehicle, its make, model, and additional load, it is possible to determine the mass of the vehicle at the time of the incident and calculate the energy of the vehicle collision. To reconstruct the traffic event with the use of the recording made by the video recorder, it is additionally necessary to read the parameters of the device, i.e., the size of the photosensitive matrix, the focal length of the lens and the speed of video recording. These are parameters that can be read from the specifications of the device. You can also perform an experiment with the video recorder to determine its parameters.
The knowledge of the parameters of the optical system of the camera enables the calculation of the distance of the characteristic element from the focusing lens (lens of the recording device).
It should be noted that the selection of the appropriate characteristic object used to perform the analysis is very important and is described later in this paper. The distance from the recording equipment to the outline of the vehicle can be determined by knowing the make and model of the vehicle, from the technical data.
If there is no information on the focal length or the dimensions of the photosensitive sensor, a suitable experiment should be carried out. It consists in mounting the video recorder (from which the analyzed recording comes, or another copy of the same model) in the vehicle in the same way as it was mounted during the event (height, angle of inclination). Then, a characteristic object, characterized in a known way, should be placed in front of the vehicle at various known distances and the position of this object should be recorded. The experiment will allow to find the relation between the real size of the characteristic point and the apparent size from the recording and to determine the parameters of the optical system, which can then be used to analyze the film sequence.
Knowing the parameters of the recording device, the next step is to select the frames of film to be analyzed. The film frames were recorded by the recorder at a certain time interval. Knowing the time between successive analyzed frames, it is necessary to determine the change of the vehicle position. The movement of the vehicle in time will allow to determine its speed.
To determine the displacement of a vehicle, it is necessary to identify the characteristic object present throughout the film sequence that has been analyzed. The distance travelled by the traffic participant can be determined by measuring the position of the characteristic object in relation to the surroundings (e.g., picket posts, road signs). In the case when there are no reference points, the parameters of the optical system of the device, described in works [1].
There is also a method of determining the distance travelled by a vehicle based on two consecutive film frames. Based on the proportions of objects in consecutive frames superimposed on each other, the change in distance can be determined, as further described in the work [8].
The reconstruction of a road event may also be facilitated by other parameters recorded by some recording devices, namely: GPS position and vehicle acceleration.
When reconstructing road accidents, the analysis of vehicle damage may also be useful. It is possible to estimate the amount of damage that occurred during the accident based on images from the video recorded by the video recorder. Determining the damage to the vehicle involves selecting appropriate shots in which the vehicle is seen in a specific position. The focal axis should be parallel or perpendicular to the longitudinal axis of the vehicle. The contours of the vehicle should be superimposed on the shot. By comparing the photograph and the vehicle silhouette, damage may be assessed. The method, which is described in more detail in work [3] however, has certain limitations.
In the analysis of video recordings recorded by the video recorders, three groups of scenarios were distinguished. The first group consists of recordings where the analyzed vehicles are moving in parallel directions, and the turn of the vehicles is the same or opposite to each other.
The second group consists of vehicles moving in near perpendicular directions. The third group of films are vehicles moving in directions that intersect at any angle.
Depending on the classification of a given film sequence into a specific group, different ways of analyzing video recordings will be used. The differences will consist in the selection of the characteristic object necessary to perform the video analysis.

Analysis of video recordings of vehicles moving in parallel directions
When vehicles run on lanes which can be considered parallel, as the distinctive element could be used the number plate. This is an element whose dimensions are known and described in the Road Traffic Law. If a film with vehicles registered abroad is analyzed, the number plates are also standardized and finding information about the dimensions of the number plate should not be a problem. In addition, the reconstruction of the traffic incident is done after the incident, so the geometric dimensions of the number plate can be measured.
According to Figure 1, the number plate recorded on the video has known geometric dimensions, which are used to determine the position of the vehicle in relation to the video recorder. The distance of the vehicle on individual frames of the film can be determined from the relation: where: The unit of measurement of WF is usually pixels. It is therefore necessary to convert the WF value into physical units based on the relationship: where: WFR -frame width [px], VM -width of the photosensitive matrix [m].
After substituting relation (2), equation (1) takes the form: It is necessary to start by estimating the speed of a vehicle equipped with a video recorder. Such speed can be estimated based on two methods. The first, described in more detail in the paper [8] the first, described in more detail in the paper, consists in taking two photographs. Then, based on these photos, scaling should be performed in such a way that the objects overlap.
Estimation of the distance is based on calculation of proportions of geometric size of objects visible in the shot. The second method, presented in this work, is to determine the velocity using ambient elements. This involves identifying two frames in a film sequence in which consecutive picket posts are in the same position in the shots, assuming that the picket posts are 100 m apart.
If a visual inspection of the scene is carried out, it is useful to ascertain the actual distance of the picket posts from each other. Then read the number of frames between the two shots.
Knowing the recording speed of the video recorder, you can make a calculation using the relationship: where: To determine the speed, use the relationship: where: In the case of determining the speed using the recording time, the time interval between successive analyzed frames of the film should be determined. After reading out the time interval, the speed should be determined using the relation in the form: where:

Δt∆m -time between the analyzed film frames [s],
∆m -the number of frames between two analyzed frames, vKAM -video recorder recording speed [fps].
Knowing the distance covered by the analyzed vehicle and the time in which this distance was covered, it is possible to proceed to determining the vehicle speed according to the relation: where: Δv -increase in speed of the test vehicle in subsequent shots [m/s],

Δt -increment of recording time of successive shots [s],
∆m -the number of frames between two analyzed frames, To determine the time course of the delay in the recorded shot, a constant value of the delay between successive frames of the film is assumed and this delay is calculated from the relation The delay values for successive frames of the film can be determined from the equation:

Analysis of video recordings of vehicles moving in perpendicular directions
When vehicles move on tracks that intersect at close to right angles, the wheelbase of the vehicle on the recording can be used as the characteristic object to determine the speed of the vehicle on which the video recorder is installed. This characteristic object (with known real-world dimensions), in this case a vehicle with a known wheelbase, that will be repeated in subsequent shots, should be as close as possible to the geometric center of the recording. It is important because many video recorders have wide-angle lenses, which introduce distortions (change of geometry) of elements of the environment located further from the center of the image. In such cases it is necessary to correct the shot by applying an appropriate filter. Such filters are available in software designed for graphics processing, e.g.: Adaptive Wide Angle filter of Adobe Photoshop. Next, it is necessary to determine the position of the vehicle subject to analysis (the distance of the vehicle from the characteristic point) in several consecutive analyzed shots. The distance travelled will be determined based on the position difference in subsequent shots according to the relation: where: Knowing the distance travelled by the vehicle subjected to the analysis in successive shots, it is possible to proceed to determination of velocity. As a result, the relation (5) determining the speed will take the form: where:

Analysis of video recordings of vehicles moving in any directions
The case where vehicles run on tracks that intersect at angles significantly different from 0° and 90° or their directions are indeterminate, is the most difficult situation to recreate. This is due to changes in the angular position of the vehicle visible in successive shots recorded by the camera relative to its axis. Changes in the position and rotation of the vehicle make it difficult to read the geometric dimensions of characteristic objects visible in the analyzed film frame.
However, it is possible to determine these dimensions or angular position. For this purpose, it is necessary to adopt a coordinate system where the x-axis is parallel to the longitudinal axis of the vehicle, the y-axis is perpendicular to the longitudinal axis of the vehicle and the z-axis is the axis of rotation of the vehicle equipped with the video recorder. In this case, if the car seen in the video moves in the xy plane, which is common to the vehicle seen in the video and equipped with the video recorder, the rotation about the x-axis can be omitted. and y axes and determine only the rotation about the z axis. However, there may be special cases where it is necessary to determine the position, velocity, acceleration, or energy of vehicles by considering the rotation around two or three axes of the coordinate system. In such cases, use the relation describing the rotation of a three-dimensional coordinate system as in [2]. As a result, a matrix describing the rotation of the three-dimensional coordinate system will be determined: The determination of the rotation using matrix calculus, however, has a drawback especially if the above relationship were to be used in calculations with the aid of computers which have a finite accuracy. If the determination of the rotation is performed in order, starting with the rotation about the x-axis then y and z, there is a danger that a certain special case may arise. This is that after a rotation has been performed, the axes of the coordinate system may overlap, resulting in a loss of one degree of freedom. This effect is called "gimbal lock". To eliminate this special case, the rotation should be determined using quaternions, as described in the paper [4]. As a result, the relation for determining the point P' will look as follows

Reconstruction of vehicle trajectory
From the point of view of traffic accident reconstruction, reconstructing the trajectory of a vehicle can provide valuable information. Determining the position in consecutive time correlated frames also gives the possibility to describe the driver's reaction during driving.
The movement path of a vehicle can be described by determining the position of the vehicle in successive shots. When analyzing each successive frame, the process becomes time-consuming.
It is difficult to present a general scheme for determining the path of a vehicle for all types of accidents because accidents are very different from each other. Therefore, the generalized scheme of proceedings for determination of the vehicle path was divided into two variants. The  brightness, the analyzed object should be visible and as large as possible. In such a case it can be expected that the measurement made will be close to reality and the error made will be small.
If the photogrammetric transformation is performed beforehand, it should be remembered that the errors introduced during the transformation will influence the further analysis. The magnitude of errors introduced with the data being analyzed may be so significant that it will make it impossible to determine small changes in the vehicle path, speed or acceleration caused by the driver's reaction.

Evaluation of the uncertainty of the results
The main problem in reconstructing road accidents is the small amount of data, especially when analyzing video recordings from a video recorder. This is related to the time of the road event.
An accident or collision lasts for fractions of seconds. When a moment before the event to be analyzed is added, the footage to be used for reconstruction will be at most a few seconds long.
Another problem in road accident reconstruction is the analysis of many parameters, each of which may be subject to error, which is the cause of increasing uncertainty in the results.
Many methods can be used to analyze the uncertainty of a result estimate, but the Monte Carlo method is often used in accident reconstruction [14]. σi -standard deviation.
Assuming a calculation confidence level of 99%, the value of the standard deviation can be determined from the so-called 3 σ rule: The series of distance values S calculated for random values, after performing calculations for a sufficiently large number of random variables, has a distribution close to the normal distribution. Consequently, it is possible to apply to its analysis the mathematical apparatus appropriate for a normal distribution, and thus -to calculate its mean value S ^ and standard deviation σ, and thus the uncertainty of the result, assuming a confidence level of 99%: The calculation is carried out in the loop shown in the diagram in Figure 6 (iteratively) until the statistical indicators of the result, i.e., the mean value and standard deviation, have stabilized. Fig. 6. Schematic of the calculation until the mean and standard deviation have stabilized The methods discussed in this paper for determining the time between successive frames of a film only make sense if the exact interval between successive analyzed frames of the film is known. The use of the average number of frames recorded in each time may cause, in a particular case, that the obtained result will be burdened with a thick error. As an example, a short analysis is presented -determination of the vehicle speed at the video recording speed given by the manufacturer as 30 fps. The determined distance of the vehicle between consecutive frames was 0.4 m, the calculated speed was 12 m/s, assuming that the recording speed (provided by the manufacturer of the recording device) was 30 fps. If, for various reasons (explained later), the actual recording speed of the recording device, at a given moment is only 25 fps, then the calculated actual speed of the vehicle will be equal to 10 m/s. A difference of

Limitations in the use of the proposed methods
Using the average recording speed of the camera for calculations (average number of frames in each time) is correct only in the case of old-type cameras, in which recording parameters were unchangeable. In the video recorders offered on the market, a change in the filmed environment, e.g. light intensity, automatically changes the exposure time of a given frame. As a result, the time between subsequent frames of the recorded image changes, which is presented in Fig. 7.
This is a graph presenting the speed of the car, which was determined based on the differentiation of the distance covered by the car between the analyzed frames of the film. To determine the speed A, the actual recording time of the analyzed frames of the film was used.
To determine the speed B, the average time between consecutive frames of the film was used, which for the presented image took the form: where: njj-th frame of the film, ni -the i-th frame of the film, 29,97 -the recording speed of the video recorder as stated by the manufacturer.
The reason for the large differences during velocity changes presented in Fig. 7 is that successive film frames were recorded at different time intervals.

20
Another important parameter determining the possibility of image analysis is the resolution with which the video was recorded by the video recorder. Fig. 8, 9, 10 show an image recorded at a resolution of 1920x1080 pixels, giving a file size of 2 MP (mega pixels), at a resolution of 4000x3000 pixels it has a size of 12 MP (mega pixels). The difference in image quality on the printout is not large, but when tested using a computer monitor operating in 4K mode (with a resolution of 3840x2160 pixels) the difference in image quality was significant. Two pictures extracted from a film with the same resolution of 1920x1080 pixels. Both photos show the same situation on the road. However, the photo shown in fig. 9 is much clearer. Thus, in this photo, the geometric dimensions of the license plate can be identified when the visible car was at a greater distance from the vehicle equipped with the video recorder than in the photo shown in Fig. 8. It follows that using the MiVue 658 DVR, the speed of the vehicle can be determined from a greater distance than using the camera of the Samsung Galaxy S5 smartphone. The deciding factor here is not only the resolution of the sensor, but to an even greater extent the quality of the lens.

Conclusions
Based on conducted research, it has been shown that the analysis of video recording from the dashboard camera makes it possible to obtain important information useful in the process of reconstructing a road event. These are not only qualitative data, but also quantitative, such as: speeds of vehicles, their mutual position, angular positioning. It has also been shown that the parameters of the recording device have a significant influence on the possibility of using the recording in the reconstruction of a road event. The quality of the recording is affected by several factors. One of them is the quality of the optical system and defects of this system, which result from imperfections in its manufacture. Another important parameter is the resolution of the recorded image, which affects, among other, the possibility of dimensioning the vehicle registration plate and making an analysis on its basis. An important problem is the speed of film recording by the video recorder. The time interval between successive frames of the film may differ from the interval resulting from the recording speed given by the manufacturer. Moreover, it may change during recording. Time of day when the video was recorded, light intensity, quality of the camera optical system can also have influence on quality of the recording and in consequence on the possibility of using it in an accident reconstruction.
During the research, it was not possible to clearly determine the distance between the vehicles and the camera, which allows the recording to be used in the analysis of a road incident, because too many factors mentioned above and discussed in the article affect the results of the analysis.