Method and device for intelligently editing dynamic test video, and automobile test method
Automatically edit dynamic test videos by calculating and fitting video feature values, which solves the problems of low redundant content removal efficiency and large human resource investment in dynamic test videos, realizes efficient intelligent video editing, saves resources and improves analysis efficiency .
Patent Information
- Application Number
- CN202310310746.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-28
- Publication Date
- 2024-10-01
AI Technical Summary
The existing technology has the problems of low efficiency in removing redundant content and heavy investment in human resources in automobile dynamic test videos. Existing solutions require manual camera control or manual video editing, resulting in a waste of resources.
By calculating the characteristic value of each frame of the original test video, normalization and fitting are performed to determine the moment when the video image changes the most, and then automatically edit effective video clips to achieve intelligent editing.
It improves the efficiency of video editing, saves human resource investment, reduces redundant content through automated processing, and improves the efficiency of test video analysis.
Smart Images

Figure CN118741015A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of automobile dynamic test video processing, and in particular to a method and device for intelligently editing dynamic test videos, and an automobile test method. Background Art
[0002] During the dynamic test of the car, it is necessary to use a camera to record the test process, and then edit the test video to remove the redundant parts. Taking the dynamic airbag misoperation test as an example, it is necessary to use a camera to record the process of the test vehicle passing through the test module with specific requirements. In order to carry out the subsequent test process analysis, test effectiveness judgment and other work. In the actual work process, the camera often starts recording before the test vehicle starts, and it will continue to record for a while after the test vehicle completes the test and stops steadily. The resulting test video, in addition to the desired effective process of the test vehicle passing through the test module, also contains many redundant parts before and after it. For example, the test vehicle starts, the test vehicle slowly accelerates to the test module, and the test vehicle stops in place after the test is completed.
[0003] The above redundant content is meaningless for analyzing and reproducing the test process, and wastes computer storage resources. The test video should be processed to remove the front and back redundancy and retain the effective part in the middle. There are currently two solutions:
[0004] Solution 1: Artificially set the cameraman to start recording before the test vehicle arrives at the module and stop recording after the test vehicle passes through the module; the video is streamlined by controlling the cameraman to record at the correct time; the disadvantages of Solution 1 are: it requires the cameraman at each shooting point to control the camera to shoot at the corresponding time point, which has high requirements on the cameraman's operation; when the cameraman makes an operational error (for example, not starting or ending shooting at a certain time point), the recorded test video will be missing or unnecessary redundant video will be recorded; at the same time, the involvement of multiple cameramen leads to a waste of human resources.
[0005] Solution 2: After receiving the test video, the staff uses video processing software (this type of software is very common, such as Quick Clip) to manually complete the editing of each video. The disadvantage of Solution 2 is: waste of manpower. During the editing process, the staff needs to watch each test video at least once. Often dozens of videos need to be processed every day, which takes a long time. Video editing work is simple, repetitive, and low-value labor, which wastes human resources.
[0006] In view of the above problems, the inventors of the present invention finally obtained the present invention after a long period of research and practice. Summary of the invention
[0007] The present invention provides a method and device for intelligently editing a dynamic test video and an automobile test method, which solve the problems of low efficiency and large human resource investment caused by removing redundancy of test videos in the prior art.
[0008] The technical solution adopted by the present invention is:
[0009] On the one hand, a method for intelligently editing a dynamic test video is provided, comprising the following steps:
[0010] Calculate the feature value of each frame image in the original test video;
[0011] All eigenvalues are normalized and fitted to obtain the fitting curve;
[0012] The moment when the image changes the most in the original video is obtained through the fitting curve;
[0013] Determine the duration of the valid video segment to be captured, and determine the start time and end time of the valid video segment based on the duration and the time when the maximum change occurs;
[0014] The start time and the end time are converted into corresponding frame numbers, and editing is performed accordingly.
[0015] Furthermore, the step of calculating the characteristic value of each frame of the original test video includes:
[0016] Read the RGB value of each pixel or all equally spaced pixels in each frame of the original test video;
[0017] For each pixel read in each frame, select the pixel with the closest color value in the same position and surrounding positions in the previous frame, and calculate the color value difference between the two, which is a positive number;
[0018] The sum of all color value differences of each frame is used to obtain the characteristic value of the video image of that frame.
[0019] Furthermore, the step of selecting the pixel points with the closest color value in the same position and surrounding positions of the previous frame and calculating the color value difference between the two includes:
[0020] Select the pixel point closest to the red R pixel value among the pixels at the same position and surrounding positions in the previous frame, and calculate the difference between the red R pixel values of the two pixels;
[0021] Similarly, the difference between the green G pixel value and the blue B pixel value is calculated; the sum of the three differences is the color value difference.
[0022] Furthermore, the step of normalizing all eigenvalues and fitting to obtain a fitting curve includes:
[0023] The logarithm of the eigenvalue of each frame of image with base 10 is taken as the final eigenvalue of the frame of image;
[0024] Normalize the final feature values of all frames of video images so that all values are distributed between 0 and 1;
[0025] The normalized final eigenvalues are fitted according to the following formula to obtain the fitting curve:
[0026] y=o / [(xu) 2 +o];
[0027] Among them, x represents the moment of the video corresponding to each frame, and y represents the final feature value;
[0028] o and u are function parameters; o is a positive number, u represents the moment of the video corresponding to the highest point of the fitting curve, that is, the moment when the image in the original video changes the most, and the value range of u is from 0 to the maximum duration of the video; the specific values of o and u are determined according to the least squares method.
[0029] Furthermore, the final feature values of all the frame video images are normalized so that all values are distributed between 0 and 1.
[0030] Including: obtaining the minimum value of all final eigenvalues;
[0031] Subtract the minimum value from all final eigenvalues to obtain a set of values, and then divide the set of values by the maximum value among them so that the normalized maximum value is 1 and the minimum value is 0.
[0032] Furthermore, the step of determining the start time and the end time of the valid video segment based on the duration and the time with the largest change includes:
[0033] The moment with the largest change is placed in the middle of the desired duration, thereby determining the start and end times for editing the original test video.
[0034] On the other hand, a dynamic test video intelligent editing device is provided, including a memory and a processor;
[0035] The memory is configured to store a computer program, which, when executed by the processor, implements the steps of the method according to any one of claims 1 to 6.
[0036] In another aspect, a test method for malfunction of a dynamic airbag of an automobile is provided, comprising:
[0037] A camera is used to record the process of the test vehicle passing through the test module. The camera is located next to the test module. The camera includes a fixed-viewing angle camera and / or a mobile-viewing angle camera. The fixed-viewing angle camera has a fixed viewing angle and is aimed at the test module. The mobile-viewing angle camera moves with the test vehicle to capture the test vehicle in real time.
[0038] The original video shot by the camera is edited using the editing method described in any one of claims 1 to 6.
[0039] The present invention calculates the characteristic value of each frame of the original test video, normalizes and fits all the characteristic values to obtain a fitting curve; then the moment when the video image changes the most (that is, the most concerned moment in the original test video) is obtained through the fitting curve; the duration of the effective video segment to be captured is determined, and based on the duration and the moment when the maximum change occurs, the start and end times of the effective video segment can be determined, and then the two moments are converted into corresponding frame numbers, and editing is performed to obtain the effective video segment with redundancy eliminated, thereby realizing intelligent editing, high efficiency, and saving human resource investment. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1 A schematic diagram showing a fitting curve in an example of the present invention;
[0042] Figure 2 A schematic diagram showing a fitting curve in another example of the present invention;
[0043] Figure 3 A schematic diagram showing a fitting curve in yet another example of the present invention is shown. DETAILED DESCRIPTION
[0044] The above and other technical features and advantages of the present invention are described in more detail below in conjunction with the accompanying drawings.
[0045] In the present invention, the term "includes", "comprising" or any other variation thereof is intended to cover non-exclusive inclusion, so that a commodity or system including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such commodity or system. In the absence of more restrictions, the elements defined by the sentence "comprising a ..." do not exclude the existence of other identical elements in the commodity or system including the elements.
[0046] After the camera records the process of the test vehicle passing through the test module, the test video needs to be edited to remove the redundant parts, so as to carry out the subsequent test process analysis, test effectiveness judgment and other work. The method for intelligent editing of dynamic test videos provided by the present invention is used to realize intelligent editing and obtain effective video clips with redundant parts eliminated, and includes the following steps:
[0047] S100: receiving an original test video. Taking a dynamic airbag misapplication test as an example, the original test video is a process in which a test vehicle passes through a test module according to specific requirements.
[0048] S200: Reading the RGB value of each pixel point of each frame of the video image in the original test video.
[0049] For example, a video file with a size of 1024 x 1080 consists of 250 frames of images; each frame of image has 1,105,920 pixels; and each pixel has 3 color data values (RGB).
[0050] S300: For all pixel points in each frame, select the point with the closest pixel value to this pixel point in the same position and surrounding positions in the previous frame, and calculate the color value difference between the two (take a positive number); thereby obtaining multiple color value differences corresponding to each frame of the video image.
[0051] Specifically, the color value difference is used to represent the "pixel change value" of this pixel compared to the previous frame;
[0052] It should be noted that in order to increase the calculation speed, the pixels can also be taken at intervals. For example, one pixel is taken every two or three pixels for calculation. This approach reduces the amount of calculation by sacrificing accuracy, thereby increasing the calculation speed. If this method is used, the calculation of each frame should use the same method (taking pixels at the same interval).
[0053] For example, the red (R) pixel value of the pixel in the 15th row and 15th column of the 8th frame is 73. Among the red (R) pixel values of the 9 pixels at the intersection of rows 14 to 16 and columns 14 to 16 of the 7th frame, the value closest to it is 80. Then the difference of the red component of this pixel is 7 (80-73). Of course, for the pixels at the boundary and the four corners, 6 and 4 reference points can be found respectively, instead of 9. It should be noted that "surrounding positions" are not necessarily adjacent columns and rows, but can also be adjacent columns and rows, but the corresponding result accuracy will be reduced, so it is preferably an adjacent column and row, that is, "the same position and surrounding positions in the previous frame" are 9 pixels (except for the case of being at the boundary and the four corners).
[0054] The difference between the green (G) and blue (B) values of this point can be calculated in this way. The sum of the three values is the "pixel change value" of this pixel compared to the previous frame, that is, the "color value difference".
[0055] S400: summing up all color value differences (ie, the above pixel change values) corresponding to each frame to obtain a characteristic value of the video image of the frame.
[0056] It should be noted that, for the convenience of calculation, the logarithm of the obtained eigenvalue with base 10 is used as the final eigenvalue. In order to improve the calculation speed, the frames involved in the calculation can also be selected at intervals. For example, one frame is taken for calculation every two or three frames of images. This approach reduces the amount of calculation by sacrificing accuracy, thereby improving the calculation speed.
[0057] S500: normalizing the final feature values of all frames of video images so that all values are distributed between 0 and 1.
[0058] The specific normalization method is:
[0059] S501: Obtain the minimum value among all final eigenvalues.
[0060] S502: Subtract the minimum value from all final eigenvalues to obtain a set of values, and then divide the set of values by the maximum value thereof, so that the normalized maximum value is 1 and the minimum value is 0.
[0061] For example: The minimum value among 15, 65, and 115 is 15;
[0062] Then after subtracting the minimum value 15, the values are: 0, 50, 100;
[0063] After dividing by the maximum value 100, the results are: 0, 0.5, 1.
[0064] S600: Fit the normalized final eigenvalues according to formula (1) to obtain a fitting curve:
[0065] y=o / [(xu) 2 +o]; (a)
[0066] Among them, x represents the moment of the video corresponding to each frame, and y represents the final feature value;
[0067] It should be noted that o and u are function parameters; o is a positive number, u represents the time of the video corresponding to the highest point of the fitting curve, and the value range of u is from 0 to the maximum duration of the video. The specific values of o and u are determined according to the least squares method. Then the fitting of this function compared to the original data is completed.
[0068] It should be noted that there are two common camera positions when shooting test videos:
[0069] The first camera position is located next to the test module, and the angle of view is fixed, always shooting the test module. When the test car does not reach the test module, it shoots a still picture. Then the test car gradually enters the field of view, and the proportion of the screen occupied gradually increases. When the test car just drives onto the module, it occupies the largest proportion of the screen. Then it gradually leaves the field of view of the lens, and the proportion of the test car occupying the screen gradually decreases. Finally, the test car completely leaves the lens range, and the camera shoots a still picture again.
[0070] The second camera position is also located next to the test module, but the view is moving, and the lens captures the test car in real time. As the test car accelerates towards the test module, the proportion of the test car in the screen gradually increases. This is because it is gradually approaching the lens. When the test car just drives onto the module, the proportion of the screen occupied reaches the maximum, because it is closest to the lens at this time. As the test car gradually moves away from the module, the proportion of the screen occupied by it gradually decreases.
[0071] Regardless of the camera position, from the beginning to the end of the test video, the change pattern of the "characteristic value" of each frame should be to increase first and then decrease.
[0072] This step fits the change of the "feature value" of each frame of the original video to the standard function y=o / [(xu) 2 +o]. Figure 1 As described above, the independent variable x represents the moment of the video. The dependent variable y is the "feature value" of the frame of the image corresponding to that moment. Of course, since the time when the video starts and ends cannot be controlled, the highest point of this curve may not be in the middle of the video, so it may also be like Figure 2 , Figure 3 situation.
[0073] It should be noted that the above formula (I) is designed based on the following three considerations:
[0074] 1. Bell-shaped curve. During the research and development process, it was found that the curves formed by the final characteristic values of all original test videos were similar to bell-shaped curves;
[0075] 2. When x is equal to positive infinity or negative infinity, the y value needs to be 0;
[0076] 3. When x is at the symmetry axis, y=1 is required;
[0077] Based on the above three considerations, the above formula (1) is obtained.
[0078] S700: Determine the moment corresponding to the highest point of the fitting function; obtain the required duration of the effective test video (known, determined according to the test needs); based on the highest point moment (i.e. the moment when the video image changes the most, i.e. the most concerned moment in the original test video) and the required duration, determine the start time and end time of the effective test video.
[0079] It should be noted that, according to the above analysis, the moment corresponding to the highest point of the fitted function is the moment when the test vehicle drives onto the module. It is also the most important moment in the test execution process and the most concerned moment in the test video.
[0080] The duration of each valid test video is defined as needed, and evenly distributed on both sides of the moment corresponding to the highest point, thereby determining the start and end time of video editing.
[0081] For example, if a valid test segment with a duration of 30 seconds is required, and the highest point of a video is found to be 2 minutes and 45 seconds using the above method, then 2 minutes and 15 seconds to 3 minutes and 15 seconds are the valid test segments that need to be retained. The rest are redundant.
[0082] It should be noted that in order to ensure the effectiveness of the test video, the redundancy before and after the test video is often very long. Therefore, the effective segment should be a segment in the video. It will not exceed the length of the original video.
[0083] S800: After determining the start and end times of the effective video segment according to the above steps, these two times are converted into corresponding frame numbers for editing.
[0084] According to another aspect of the present invention, there is provided a dynamic test video intelligent editing device, comprising a memory and a processor. The memory is configured to store a computer program, and the steps of the above method are implemented when the computer program is executed by the processor. Therefore, the intelligent editing device has all the beneficial effects of the intelligent editing method, which will not be repeated here. In the human-computer interaction interface of the device, the only information that the staff needs to input is "the duration of the target video" and "select the video to be processed". The rest of reading files, performing calculations, determining valid segments, editing and outputting can be completed automatically using a computer program.
[0085] According to another aspect of the present invention, a test method for the misoperation of a dynamic airbag of an automobile is provided, comprising: using a camera to record the process of a test vehicle passing through a test module, the camera is located next to the test module, and the camera includes a fixed-view camera and / or a mobile-view camera; the fixed-view camera has a fixed view and is aimed at the test module; the mobile-view camera moves with the test vehicle to capture the test vehicle in real time. By editing the original video shot by the camera using the above-mentioned editing method, an effective video clip with redundancy eliminated can be obtained, thereby realizing intelligent editing and solving the problems of video redundancy, low efficiency, and large human resource investment in the prior art.
[0086] The above are only preferred embodiments of the present invention, which are only illustrative and not restrictive. The structures and connection modes of the components in the present invention can be changed, and any equivalent transformations and improvements based on the technical solution of the present invention should not be excluded from the protection scope of the present invention.
Claims
1. A method for intelligently editing dynamic test videos, characterized in that: The following steps are involved: Calculate the feature value of each frame image in the original test video; All eigenvalues are normalized and fitted to obtain the fitting curve; The moment when the image changes the most in the original video is obtained through the fitting curve; Determine the duration of the valid video segment to be captured, and determine the start time and end time of the valid video segment based on the duration and the time when the maximum change occurs; The start time and the end time are converted into corresponding frame numbers, and editing is performed accordingly.
2. A method for intelligently editing dynamic test videos as claimed in claim 1, characterized in that: The step of calculating the characteristic value of each frame of the original test video includes: Read the RGB value of each pixel or all equally spaced pixels in each frame of the original test video; For each pixel read in each frame, select the pixel with the closest color value in the same position and surrounding positions in the previous frame, and calculate the color value difference between the two, which is a positive number; The sum of all color value differences of each frame is used to obtain the characteristic value of the video image of that frame.
3. A method for intelligently editing dynamic test videos as claimed in claim 2, characterized in that: The step of selecting the pixel points with the closest color value in the same position and the surrounding positions of the previous frame and calculating the color value difference between the two includes: Select the pixel point closest to the red R pixel value among the pixels at the same position and surrounding positions in the previous frame, and calculate the difference between the red R pixel values of the two pixels; Similarly, the difference between the green G pixel value and the blue B pixel value is calculated; the sum of the three differences is the color value difference.
4. A method for intelligently editing dynamic test videos as claimed in claim 1, characterized in that: The step of normalizing all characteristic values and fitting to obtain a fitting curve includes: The logarithm of the eigenvalue of each frame of image with base 10 is taken as the final eigenvalue of the frame of image; Normalize the final feature values of all frames of video images so that all values are distributed between 0 and 1; The normalized final eigenvalues are fitted according to the following formula to obtain the fitting curve: y=o / [(x-u) 2 +o]; Among them, x represents the moment of the video corresponding to each frame, and y represents the final feature value; o and u are function parameters; o is a positive number, u represents the moment of the video corresponding to the highest point of the fitting curve, that is, the moment when the image in the original video changes the most, and the value range of u is from 0 to the maximum duration of the video; the specific values of o and u are determined according to the least squares method.
5. A method for intelligently editing dynamic test videos as claimed in claim 4, characterized in that: The final feature values of all frames of video images are normalized so that all values are distributed between 0 and 1. Including: obtaining the minimum value of all final eigenvalues; Subtract the minimum value from all final eigenvalues to obtain a set of values, and then divide the set of values by the maximum value among them so that the normalized maximum value is 1 and the minimum value is 0.
6. A method for intelligently editing dynamic test videos as claimed in claim 1, characterized in that: The step of determining the start time and the end time of the valid video segment based on the duration and the time with the largest change includes: The moment with the largest change is placed in the middle of the desired duration, thereby determining the start and end times for editing the original test video.
7. A dynamic test video intelligent editing device, characterized in that: including memory and processor; The memory is configured to store a computer program, which, when executed by the processor, implements the steps of the method according to any one of claims 1 to 6.
8. A test method for malfunction of a dynamic airbag of an automobile, characterized in that: include: A camera is used to record the process of the test vehicle passing through the test module. The camera is located next to the test module. The camera includes a fixed-viewing angle camera and / or a mobile-viewing angle camera. The fixed-viewing angle camera has a fixed viewing angle and is aimed at the test module. The mobile-viewing angle camera moves with the test vehicle to capture the test vehicle in real time. The original video shot by the camera is edited using the editing method described in any one of claims 1 to 6.
