Video injection real-time delay evaluation method and system

By outputting real-time timestamps to the injection host in the HiL bench and reading timestamps from the injected device, the problem of the inability of existing technology to evaluate video delay in real time is solved, and accurate analysis of HiL video injection delay and frame rate is achieved. The reliability of the test results is ensured.

CN118660189APending Publication Date: 2024-09-17DONGFENG MOTOR CO LTD DONGFENG NISSAN PASSENGER VEHICLE CO
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410854225.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

The existing video injection performance evaluation method of HiL bench cannot evaluate video delay in real time, and it is difficult to consider frame rate changes caused by electromagnetic interference and CPU performance fluctuations, which affects test accuracy.

Method used

Without modifying the video transmission protocol, add real-time timestamp information to the virtual scene video frame image output by the injected host, and read the deserialized frame image timestamp information from the injected device, and calculate the delay time and frame Rate is evaluated.

Benefits of technology

Real-time acquisition and quantitative analysis of HiL video injection delay are achieved, ensuring the accuracy and credibility of the test results, and helping to evaluate whether the test results of the HiL bench are usable.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118660189A
    Figure CN118660189A
Patent Text Reader

Abstract

The invention discloses a video injection real-time delay evaluation method and system. The method comprises the following steps: adding real-time timestamp information to a frame image of a virtual scene video output by an injection host; stringing the frame image and then transmitting the frame image to injected equipment; obtaining a deserialized frame deserialized image from the injected device, and reading frame deserialized image timestamp information of the frame deserialized image from the frame deserialized image; and performing delay evaluation according to the time stamp information of the deserialized frame image and the real-time time stamp information when the deserialized frame image is acquired. The HiL video injection delay can be acquired in real time, and the delay condition and the frame rate of the video injection system can be quantitatively analyzed, so that whether the test result of the whole HiL rack is available or not can be judged, and testers are helped to evaluate whether the test result of the HiL rack is credible or not.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field related to vehicle testing, and in particular to a video injection real-time delay evaluation method, a video injection real-time delay evaluation system, an electronic device, a storage medium and a computer program product. Background Art

[0002] The video injection hardware-in-the-Loop (HiL) test bench is usually used to test the reaction of the vehicle's electronic control unit (ECU) that requires video input to the video generated by the simulation software in a simulation environment. The video end that generates the virtual scene is the injection host, and the ECU being injected is called the injected ECU.

[0003] The existing video injection performance evaluation method of HiL test bench usually involves the injected ECU of the black box, and can only verify the reliability of the injection system through a third-party host during the equipment acceptance. It does not take into account the frame rate fluctuation caused by other reasons such as electromagnetic interference and CPU performance fluctuation at the receiving end when the video is actually injected into the injected ECU, making it difficult to evaluate the performance of the injection device in real time.

[0004] The performance of the injection device is crucial in vehicle HiL simulation: usually the delay of video injection needs to be below a certain delay, without frame skipping or frame loss, so that the injected ECU can operate normally. When the delay of the injected video signal is too large, the result of the HiL simulation may be far from the actual vehicle test result.

[0005] The existing method for measuring video delay requires changing the video transmission protocol, adding a timestamp with the sending time when stringing the video, and then reading it during deserialization and comparing it with the timestamp of the receiving time.

[0006] However, this method requires changing the video transmission protocol and modifying the video transmission process, which affects the test accuracy. Summary of the invention

[0007] Based on this, it is necessary to provide a video injection real-time delay evaluation method, a video injection real-time delay evaluation system, an electronic device, a storage medium and a computer program product to address the technical problem that the existing technology lacks the ability to evaluate the real-time delay time between the injected video and the injected ECU without modifying the video transmission protocol.

[0008] The present invention provides a video injection real-time delay evaluation method, comprising:

[0009] Adding real-time timestamp information to the frame images of the virtual scene video output by the injection host;

[0010] Adding a string to the frame image and transmitting it to the injected device;

[0011] Acquire a deserialized frame image after deserialization from the injected device, and read deserialized frame image timestamp information of the deserialized frame image from the deserialized frame image;

[0012] Delay evaluation is performed according to the deserialized frame image timestamp information and the real-time timestamp information when the deserialized frame image is obtained.

[0013] Furthermore, the adding of real-time timestamp information to the frame image of the virtual scene video output by the injection host comprises:

[0014] Get the real-time timestamp information of the current moment;

[0015] The real-time timestamp information is added to a preset position of a frame image of the virtual scene video output by the injection host.

[0016] Furthermore, the reading the deserialized frame image timestamp information of the deserialized frame image from the deserialized frame image includes:

[0017] The timestamp information is identified from a preset position of the deserialized frame image as the timestamp information of the deserialized frame image.

[0018] Furthermore, the adding of real-time timestamp information to the frame image of the virtual scene video output by the injection host comprises:

[0019] When the virtual scene video is a virtual scene video of a fisheye camera, real-time timestamp information of the current moment is obtained;

[0020] The dark corner area of ​​the frame image of the virtual scene video of the fisheye camera is replaced with the real-time timestamp information.

[0021] Furthermore, the reading the deserialized frame image timestamp information of the deserialized frame image from the deserialized frame image includes:

[0022] The timestamp information is identified from the dark corner area of ​​the deserialized frame image as the deserialized frame image timestamp information.

[0023] Furthermore, the adding of real-time timestamp information to the frame image of the virtual scene video output by the injection host comprises:

[0024] Get the real-time timestamp information of the current moment;

[0025] Converting the frame image of the virtual scene video into first frequency domain data, and adding the real-time timestamp information to the first frequency domain data;

[0026] The frequency domain data with the real-time timestamp information added thereto is converted into a frame image in the spatial domain.

[0027] Furthermore, the reading the deserialized frame image timestamp information of the deserialized frame image from the deserialized frame image includes:

[0028] Converting the deserialized frame image into second frequency domain data;

[0029] Timestamp information is identified from the second frequency domain data as deserialized frame image timestamp information.

[0030] Furthermore, the timestamp information includes a timestamp and a rolling time count, and the delay evaluation is performed based on the deserialized frame image timestamp information and the real-time timestamp information when the deserialized frame image is obtained, including: calculating the delay time based on the difference between the timestamp of the real-time timestamp information when the deserialized frame image is obtained and the timestamp of the deserialized frame image timestamp information, judging whether the deserialized frame image timestamp information is correct timestamp information based on the rolling time count of the deserialized frame image timestamp information, and calculating the frame rate based on the number of deserialized frame images with correct timestamp information within a preset time.

[0031] The present invention provides a video injection real-time delay evaluation system, comprising: an injection host, an injected device and a real-time delay evaluation platform, wherein the real-time delay evaluation platform is respectively connected to the injection host and the injected device for communication, and the real-time delay side platform comprises:

[0032] A timestamp information adding module, used for adding the timestamp information of the current time to the frame image of the virtual scene video output by the injection host;

[0033] An injection module, used for adding a string to the frame image and transmitting it to the injected device;

[0034] A deserialization module, used for obtaining a deserialized frame image after deserialization from the injected device, and reading deserialized frame image timestamp information of the deserialized frame image from the deserialized frame image;

[0035] The delay time determination module is used to perform delay evaluation according to the deserialized frame image timestamp information and the real-time timestamp information when the deserialized frame image is obtained.

[0036] The present invention provides an electronic device, comprising:

[0037] at least one processor; and,

[0038] a memory communicatively connected to at least one of the processors; wherein,

[0039] The memory stores instructions that can be executed by at least one of the processors, and the instructions are executed by at least one of the processors to enable at least one of the processors to execute the video injection real-time delay evaluation method as described above.

[0040] The present invention provides a storage medium, wherein the storage medium stores computer instructions. When a computer executes the computer instructions, the storage medium is used to execute all steps of the video injection real-time delay evaluation method as described above.

[0041] The present invention provides a computer program product, comprising a computer program / instruction, which implements the above-mentioned video injection real-time delay evaluation method when executed by a processor.

[0042] The present invention adds real-time timestamp information to the frame image of the virtual scene video output by the injection host, and reads the timestamp information of the deserialized frame image from the deserialized frame image after deserialization in the injected device, and performs delay evaluation according to the deserialized frame image timestamp information and the real-time timestamp information when the deserialized frame image is obtained. The present invention can obtain the delay of HiL video injection in real time, quantitatively analyze the delay and frame rate of the video injection system, so as to determine whether the test results of the entire HiL bench are available, and help testers evaluate whether the test results of the HiL bench are credible. Since the real-time timestamp information is added before the injected device is injected, and the timestamp information of the deserialized frame image and the delay evaluation are read after the deserialized frame image after the injected video output is deserialized, the video transmission process will not be modified, thereby ensuring the accuracy of the test. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 This is a workflow diagram of a video injection real-time delay evaluation method according to an embodiment of the present invention;

[0044] Figure 2 A flowchart of a method for evaluating video injection delay in real time in the best embodiment of the present invention;

[0045] Figure 3 This is a workflow diagram of a video injection real-time delay evaluation method according to another embodiment of the present invention;

[0046] Figure 4 This is a workflow diagram of a video injection real-time delay evaluation method according to yet another embodiment of the present invention;

[0047] Figure 5 This is a workflow diagram of a video injection real-time delay evaluation method according to another embodiment of the present invention;

[0048] Figure 6 A schematic diagram of directly displaying time stamp information superimposed on a frame image in an example of the present invention;

[0049] Figure 7 A schematic diagram of replacing the dark corner area with timestamp information in a fisheye camera in an example of the present invention using a QR code;

[0050] Figure 8 It is a schematic diagram of superimposing a two-dimensional code in the frequency domain in an original frame image after Fourier transform is performed on the image in an example of the present invention;

[0051] Fig. 9 A schematic diagram of identifying a two-dimensional code in the frequency domain after Fourier transforming an image in an example of the present invention;

[0052] Fig.10 This is a system principle diagram of a video injection real-time delay evaluation system of the present invention;

[0053] Fig.11 The figure is a schematic diagram of the hardware structure of an electronic device of the present invention. DETAILED DESCRIPTION

[0054] The specific embodiments of the present invention are further described below in conjunction with the accompanying drawings. The same components are represented by the same reference numerals. It should be noted that the words "front", "rear", "left", "right", "upper" and "lower" used in the following description refer to directions in the accompanying drawings, and the words "inner" and "outer" refer to directions toward or away from the geometric center of a specific component, respectively.

[0055] like Figure 1 The figure shows a workflow diagram of a video injection real-time delay evaluation method according to an embodiment of the present invention, including:

[0056] Step S101, adding real-time timestamp information to the frame image of the virtual scene video output by the injection host;

[0057] Step S102, stringing the frame image and transmitting it to the injected device;

[0058] Step S103, obtaining a deserialized frame image after deserialization from the injected device, and reading deserialized frame image timestamp information of the deserialized frame image from the deserialized frame image;

[0059] Step S104 , performing delay evaluation according to the deserialized frame image timestamp information and the real-time timestamp information when the deserialized frame image is obtained.

[0060] Specifically, the present invention can be applied to electronic devices with processing capabilities, such as computers.

[0061] The generalized clock synchronization protocol gPTP can be used to synchronize the time between the injection host and the injected ECU to ensure that the time of the two hosts is consistent.

[0062] First, step S101 is performed to add real-time timestamp information to the frame image of the virtual scene video output by the injection host.

[0063] Specifically, a virtual scene video of each camera is generated according to the vehicle dynamics information by virtual scene simulation software, and then real-time timestamp information is added to the frame image. Preferably, real-time timestamp information is added to each frame image of the virtual scene video.

[0064] The timestamp information can be added directly or converted into a QR code before being added.

[0065] Then, step S102 is executed to string the frame image and transmit it to the injected device.

[0066] Among them, serialization in video transmission is the process of converting video signals or data into serial data so as to transmit through a communication channel (such as a cable, optical fiber or wireless network). Specifically, the video including the frame image after adding timestamp information can be transmitted to the injection board through a multi-channel high-definition multimedia interface (HDMI). The injection board is preferably a video format conversion board. The injection board serializes the video signal and transmits it to the injected device through an interface. The injected device is preferably an injected ECU. The interface can use a Fakra interface.

[0067] Then, step S103 is executed to obtain the deserialized frame image from the injected device, and read the deserialized frame image timestamp information of the deserialized frame image from the deserialized frame image.

[0068] Deserialization is the reverse process of serialization, which involves converting the serial data received from the communication channel back to the original video signal or data format. Specifically, the injected device deserializes the video signal to obtain a deserialized frame image, to which timestamp information has been added before serialization, and then reads the deserialized frame image timestamp information from the deserialized frame image.

[0069] Among them, when the injected device is correctly deserialized and there is no error in the transmission process, the deserialized frame image timestamp information is consistent with the real-time timestamp information added to the frame image of the virtual scene video output to the injection host.

[0070] Finally, step S104 is executed to perform delay evaluation according to the deserialized frame image timestamp information and the real-time timestamp information when the deserialized frame image is obtained.

[0071] Specifically, since the deserialized frame image timestamp information is consistent with the injected timestamp information when there is no fault in the transmission process, when executing step S103 to obtain the deserialized frame image after deserialization from the injected device, the real-time timestamp information is synchronously recorded as the deserialized timestamp information. Delay evaluation is performed based on the deserialized frame image timestamp information and the real-time timestamp information when the deserialized frame image is obtained. The delay evaluation includes determining the delay time and the actual frame rate of the video transmission.

[0072] In one embodiment, the timestamp information includes a timestamp and a rolling time count, and the delay evaluation is performed based on the deserialized frame image timestamp information and the real-time timestamp information when the deserialized frame image is obtained, including: calculating the delay time based on the difference between the timestamp of the real-time timestamp information when the deserialized frame image is obtained and the timestamp of the deserialized frame image timestamp information, judging whether the deserialized frame image timestamp information is correct timestamp information based on the rolling time count of the deserialized frame image timestamp information, and calculating the frame rate based on the number of deserialized frame images with correct timestamp information within a preset time.

[0073] Specifically, the timestamp information added to the image includes but is not limited to the following information: Unix timestamp, accurate to nanoseconds, refers to the total number of seconds from January 1, 1970 (00:00:00 GMT) to the current time; a rolling time count generated by a rolling counter, which is a counter that increments each time a message is sent. The receiver can verify the freshness and order of the message by checking this counter. In order to ensure the loop effect, a size of more than 2^11 is used to ensure that the image will be transmitted at 30fps for more than 1 minute before it will loop to the same number.

[0074] Calculate the difference between the timestamp at the time of deserialization and the timestamp of the timestamp information of the deserialized frame image (i.e., the injection timestamp), and convert it into the corresponding time to obtain the delay time. Count the multiple frame images received by the injected device, and obtain the actual frame rate of the video transmission according to the number of deserialized frame images with correct timestamp information within the preset time. Among them, if the difference between the rolling time count of a deserialized frame image and the rolling time count of the previous deserialized frame image is 1, then it is judged that the timestamp information of the deserialized frame image is correct, and the number of deserialized frame images with correct timestamp information within the preset time is counted, and divided by the preset time to obtain the frame rate. For example, within a certain range of 1s, the injected device reads 30 deserialized frame images, of which 29 have timestamp information, and 28 have correct timestamp information among the deserialized frame images with timestamp information, then the actual frame rate is 28 frames / s.

[0075] The present invention adds real-time timestamp information to the frame image of the virtual scene video output by the injection host, and reads the timestamp information of the deserialized frame image from the deserialized frame image after deserialization in the injected device, and performs delay evaluation according to the deserialized frame image timestamp information and the real-time timestamp information when the deserialized frame image is obtained. The present invention can obtain the delay of HiL video injection in real time, quantitatively analyze the delay and frame rate of the video injection system, so as to determine whether the test results of the entire HiL bench are available, and help testers evaluate whether the test results of the HiL bench are credible. Since the real-time timestamp information is added before the injected device is injected, and the timestamp information of the deserialized frame image and the delay evaluation are read after the deserialized frame image after the injected video output is deserialized, the video transmission process will not be modified, thereby ensuring the accuracy of the test.

[0076] like Figure 2 The flowchart of a method for evaluating real-time delay of video injection in a preferred embodiment of the present invention is shown, comprising:

[0077] Step S201, using a clock synchronization protocol to synchronize the time between the injection host and the injected ECU to ensure that the time of the two hosts is consistent.

[0078] Step S202, in the injection host 1, a virtual scene video of each camera is generated according to the vehicle dynamics information by using a virtual scene simulation software;

[0079] Step S203, adding real-time timestamp information to each frame of image;

[0080] Step S204, transmitting to the injection board via multiple HDMI channels;

[0081] Step S205, the injection board adds a string to the video signal and transmits it to the injected ECU 2 through the Fakra interface;

[0082] Step S206, the injected ECU 2 deserializes the video signal to obtain the original image;

[0083] Step S207, read the frame image timestamp information, compare the real-time timestamp information during deserialization with the frame image timestamp information, obtain the delay time, perform statistics on the connected images, and obtain the actual frame rate of the video transmission.

[0084] like Figure 3 FIG. 1 is a flowchart of a method for evaluating video injection delay in real time according to another embodiment of the present invention, comprising:

[0085] Step S301, obtaining real-time timestamp information of the current moment;

[0086] Step S302, adding the real-time timestamp information to a preset position of a frame image of the virtual scene video output by the injection host;

[0087] Step S303, stringing the frame image and transmitting it to the injected device;

[0088] Step S304, obtaining the deserialized frame image after deserialization from the injected device;

[0089] Step S305, identifying timestamp information from a preset position of the deserialized frame image as the deserialized frame image timestamp information;

[0090] Step S306 , performing delay evaluation according to the deserialized frame image timestamp information and the real-time timestamp information when the deserialized frame image is obtained.

[0091] Specifically, this embodiment is a first timestamp information superposition method. After obtaining the current time in step S301, step S302 is executed to add the real-time timestamp information to the preset position of the frame image of the virtual scene video output by the injection host. The timestamp information will be superimposed on the frame image and directly displayed.

[0092] The timestamp information can be directly displayed as a number, or the timestamp information can be converted into a QR code and then added to a preset position of the frame image.

[0093] like Figure 6 It is a schematic diagram showing that time stamp information is directly superimposed and displayed on a frame image, where time stamp information 62 is directly superimposed and displayed on a frame image 61 .

[0094] Then, after executing step S303 to add a string to the frame image and transmit it to the injected device, execute step S304 to obtain the deserialized frame image after deserialization from the injected device, and execute step S305 to identify the timestamp information from the preset position of the deserialized frame image as the timestamp information of the deserialized frame image. Specifically, the timestamp information on the deserialized frame image can be directly identified from the preset position of the deserialized frame image through the existing image recognition method. For example, a two-dimensional code recognition method is used to directly identify the two-dimensional code of the timestamp information on the deserialized frame image from the preset position of the deserialized frame image, and the two-dimensional code is parsed to obtain the timestamp information of the deserialized frame image.

[0095] Finally, step S306 is executed to perform delay evaluation according to the timestamp information of the deserialized frame image and the real-time timestamp information when the deserialized frame image is obtained.

[0096] This embodiment directly superimposes the timestamp information on the frame image for display. Compared with directly writing the timestamp on the image, the image modification is small and has no effect on the image recognition function of the injected ECU. Compared with modifying the serialization and deserialization system, this injection method does not need to modify the serialization and deserialization system. At the same time, since the operation time of direct superposition is very small, a more accurate delay time can be obtained.

[0097] like Figure 4 The flowchart of a method for evaluating video injection delay in real time according to another embodiment of the present invention is shown, comprising:

[0098] Step S401, when the virtual scene video is a virtual scene video of a fisheye camera, obtaining real-time timestamp information of the current moment;

[0099] Step S402, replacing the dark corner area of ​​the frame image of the virtual scene video of the fisheye camera with the real-time timestamp information;

[0100] Step S403, adding a string to the frame image and transmitting it to the injected device;

[0101] Step S404, obtaining the deserialized frame image after deserialization from the injected device;

[0102] Step S405, identifying timestamp information from the dark corner area of ​​the deserialized frame image as the timestamp information of the deserialized frame image;

[0103] Step S406 , performing delay evaluation according to the deserialized frame image timestamp information and the real-time timestamp information when the deserialized frame image is obtained.

[0104] Specifically, this embodiment is a second timestamp information superposition method, which is mainly aimed at the virtual video scene of the fisheye camera. By pre-setting the specific channel as the fisheye camera, when the virtual scene video is determined to be the virtual scene video of the fisheye camera, step S401 is executed to obtain the real-time timestamp information of the current moment. Then step S402 is executed to replace the dark corner area of ​​the frame image of the virtual scene video of the fisheye camera with the real-time timestamp information. For fisheye cameras, there are circular dark corners (black edges). According to the distortion table and field of view provided by the camera manufacturer, the position and size of the black edges of each frame of the image can be calculated during imaging. Replace the black edges with real-time timestamp information at the corresponding black edge positions. QR code.

[0105] The timestamp information can be displayed directly as numbers, or the timestamp information can be converted into a QR code and then the black border can be replaced.

[0106] like Figure 7 The diagram shown is a schematic diagram of a fisheye camera, in which a dark corner area 71 is replaced with timestamp information 72 in a QR code manner.

[0107] Then, after executing step S403 to add strings to the frame image and transmit it to the injected device, execute step S404 to obtain the deserialized frame image after deserialization from the injected device, and execute step S405 to identify the timestamp information from the dark corner area of ​​the deserialized frame image as the timestamp information of the deserialized frame image. Specifically, the timestamp information on the deserialized frame image can be directly identified from the dark corner area of ​​the deserialized frame image through existing image recognition methods. For example, a two-dimensional code recognition method is used to directly identify the two-dimensional code of the timestamp information on the deserialized frame image from the dark corner area of ​​the deserialized frame image, and the two-dimensional code is parsed to obtain the timestamp information of the deserialized frame image.

[0108] Finally, step S406 is executed to perform delay evaluation according to the timestamp information of the deserialized frame image and the real-time timestamp information when the deserialized frame image is obtained.

[0109] In this embodiment, the dark corner area of ​​the fisheye camera frame image is replaced by the timestamp information, so as to avoid the influence of the timestamp information on the image and avoid the erroneous operation of the injected device.

[0110] like Figure 5 FIG. 1 is a flowchart of a method for evaluating video injection delay in real time according to another embodiment of the present invention, comprising:

[0111] Step S501, obtaining real-time timestamp information of the current moment;

[0112] Step S502, converting the frame image of the virtual scene video into first frequency domain data, and adding the real-time timestamp information to the first frequency domain data;

[0113] Step S503, converting the frequency domain data with the real-time timestamp information added thereto into a frame image in the spatial domain;

[0114] Step S504, stringing the frame image and transmitting it to the injected device;

[0115] Step S505, obtaining the deserialized frame image after deserialization from the injected device;

[0116] Step S506, converting the deserialized frame image into second frequency domain data;

[0117] Step S507, identifying timestamp information from the second frequency domain data as timestamp information of the deserialized frame image;

[0118] Step S508 , performing delay evaluation according to the deserialized frame image timestamp information and the real-time timestamp information when the deserialized frame image is obtained.

[0119] Specifically, this embodiment is a third timestamp information superposition method. After executing step S501 to obtain the real-time timestamp information of the current moment, executing step S502 to convert the frame image of the virtual scene video into the first frequency domain data, and adding the real-time timestamp information to the first frequency domain data.

[0120] For example, after Fourier transforming the image, real-time timestamp information is superimposed in the frequency domain of the original frame image.

[0121] The timestamp information can be displayed directly as a number, or the timestamp information can be converted into a QR code and then superimposed in the frequency domain.

[0122] In some embodiments, converting the frame image of the virtual scene video into first frequency domain data, and adding the real-time timestamp information to the first frequency domain data includes:

[0123] Convert the real-time timestamp information into a two-dimensional code, perform block processing on the two-dimensional code to obtain a plurality of two-dimensional code blocks, binarize each two-dimensional code block to obtain a binary value of each two-dimensional code block;

[0124] Performing wavelet transform on each channel of the frame image of the virtual scene video;

[0125] The low-frequency matrix after wavelet transformation of each channel is processed into blocks to obtain a plurality of low-frequency matrix blocks of the low-frequency matrix;

[0126] After converting the multiple low-frequency matrix blocks into the first frequency domain data, a binary value of a two-dimensional code is embedded in the first frequency domain data of each low-frequency matrix block in turn.

[0127] As an example, the QR code of the real-time timestamp information to be injected is first processed in blocks and converted into binary, and the QR code is converted into a sequence of only 0s and 1s.

[0128] Then the frame image to be injected is converted from RGB format to YUV format, and each channel of the converted image is subjected to wavelet transform, and each channel obtains [cA, cH, cV, cD], which respectively represent the approximate, horizontal, vertical, and diagonal parts of the original image.

[0129] The input original frame image Image_original can be decomposed into four different matrices using [cA, cH, cV, cD] = dwt2 (Image_original, 'haar'), each matrix represents a different feature of the image:

[0130] cA-Approximation coefficients: This matrix contains the low-frequency part of the image, which is basically a rough approximation of the original image. In the image pyramid, this part corresponds to a reduced version of the image, which usually retains the main structural information of the image but removes the details.

[0131] cH-Horizontal detail coefficients: This matrix contains the high-frequency information of the image in the horizontal direction, usually associated with the vertical edges in the image.

[0132] cV - Vertical detail coefficients: This matrix stores the high-frequency information of the image in the vertical direction, usually related to the horizontal edges in the image.

[0133] cD-Diagonal detail coefficients: This matrix captures the high-frequency information of the image in two diagonal directions, related to the diagonal edges or corners in the image.

[0134] This decomposition can help analyze specific aspects of an image, such as edge detection, texture analysis, etc., and is also the basis for many modern image compression techniques such as JPEG 2000. In further applications, these coefficients can be modified and used to reconstruct the image to achieve different image processing goals, such as noise reduction, compression, etc.

[0135] Then the cA matrix is ​​divided into blocks (blocks), and the block size can be 4x4. For each block, one bit of information can be embedded (taking the nth block as an example): [U, S, V] = svd (dct2 (cA (block))), where dct2 (cA (block)) is the first frequency domain data of the block obtained by transforming the block from the spatial domain to the frequency domain through discrete cosine transform. U, S, V are three matrices obtained by performing singular value decomposition (SVD) on the frequency domain data of the block through the SVD function.

[0136] The binary value of the two-dimensional code block corresponding to the block is added to the first row and first column data S[1] of the S matrix. The binary value bit(n) of the nth two-dimensional code block is added to the first row and first column data S[1] of the nth low-frequency matrix block of each channel. The adding method is:

[0137] S[1]=(S[1] / / Strength+1 / 4+1 / 2*bit(n))*Strength.

[0138] Strength is a fixed value and can be determined through multiple tests.

[0139] Then, the matrix after SVD decomposition is reconstructed into the original matrix. Next, the idct() function is used to perform inverse discrete cosine transform (IDCT) on this matrix to obtain the reconstructed matrix and the image (YUV format) with the QR code added.

[0140] Finally, the image (YUV format) with the QR code added is restored to RGB data.

[0141] like Figure 8 The figure shows the frequency domain superposition of the QR code in the original frame image after Fourier transforming the image, and adding the QR code 82 to the original frame image 81 to obtain the frame image 83 after adding the QR code. As can be seen from the figure, the frame image 83 after adding the QR code is almost the same as the original frame image 81.

[0142] After adding the real-time timestamp information in the frequency domain, step S503 is performed to convert the frequency domain data with the real-time timestamp information into a frame image in the spatial domain. Specifically, an inverse Fourier transform is performed to convert the frequency domain data into spatial domain data.

[0143] Then, after performing step S504 to add strings to the frame image and transmit it to the injected device, performing step S505 to obtain the deserialized frame image from the injected device, and performing step S506 to convert the deserialized frame image into second frequency domain data. Specifically, Fourier transform is performed to convert the deserialized frame image into the second frequency domain data.

[0144] Then, step S507 is performed to identify the timestamp information from the second frequency domain data as the timestamp information of the deserialized frame image. Specifically, the timestamp information can be directly identified from the frequency domain data by using an existing frequency domain identification method. For example, a two-dimensional code identification method is used to directly identify the two-dimensional code of the timestamp information from the frequency domain data, and the two-dimensional code is parsed to obtain the timestamp information of the deserialized frame image.

[0145] In some embodiments, converting the deserialized frame image into second frequency domain data, and identifying timestamp information from the second frequency domain data, comprises:

[0146] Performing wavelet transform on each channel of the deserialized frame image;

[0147] The low-frequency matrix after wavelet transformation of each channel is processed into blocks to obtain a plurality of low-frequency matrix blocks of the low-frequency matrix;

[0148] Determine the quantity to be converted according to the preset size of the QR code;

[0149] For each channel, after converting the number of low-frequency matrix blocks to be converted into the second frequency domain data, the second frequency domain data of each low-frequency matrix block is detected in turn, and the binary value corresponding to each low-frequency matrix block is determined according to the detection result, and the average value of the binary values ​​of the low-frequency matrix blocks with the same serial number of multiple channels is calculated as the binary value of the two-dimensional code block with the serial number;

[0150] Converting the binary values ​​of all the two-dimensional code blocks into a one-dimensional sequence according to the sequence number, and converting the one-dimensional sequence into a two-dimensional matrix according to a preset size of the two-dimensional code;

[0151] The two-dimensional matrix is ​​converted into a two-dimensional code.

[0152] As an example, convert the deserialized frame image from RGB to YUV, perform wavelet transform on each channel to obtain four matrices [cA, cH, cV, cD], and then divide the low-frequency matrix cA into blocks to obtain multiple low-frequency matrix blocks. The block size is consistent with the size processed when loading the QR code. 1 bit of data can be extracted from each block (taking the nth block as an example): [U, S, V] = svd (dct2 (cA (block))), where dct2 (cA (block)) is the second frequency domain data of the low-frequency matrix block obtained by transforming the block block from the spatial domain to the frequency domain through discrete cosine transform. U, S, V are three matrices obtained by performing singular value decomposition (SVD) on the frequency domain data of the block through the svd function. Read out the first row and first column data S[1] of the S matrix:

[0153] bit=S[1]%Strength>Strength / 2, where Strength is a fixed value.

[0154] Since data is added to the three channels when the QR code is added, the data of the three channels are averaged to get an array. Then, if the QR code is known to be 100×100 data, the first 10,000 bits are taken and restored to a 100×100 array as YUV data, which is then converted to RGB data to get the QR code.

[0155] Among them, since the average value of the data of the three channels is taken, the obtained average value may not be 0 or 1. Therefore, all the average values ​​are clustered to obtain two categories. The category with a larger cluster center value is taken as the first category, and the category with a smaller cluster center is taken as the second category. If the average value is in the first category, then the average value is replaced by 1 in the series. If the average value is in the second category, then the average value is replaced by 0 in the series.

[0156] like Fig. 9 As shown, a two-dimensional code 92 is decoded from a deserialized frame image 91. Since the frequency domain transformation may cause some slight bit flipping, the decoded two-dimensional code 92 may have some visual noise.

[0157] Finally, step S508 is executed to perform delay evaluation according to the deserialized frame image timestamp information and the real-time timestamp information when the deserialized frame image is obtained.

[0158] This embodiment adds timestamp information in the frequency domain, so that the timestamp information is invisible in the spatial domain, thereby avoiding erroneous operation of the injected device.

[0159] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0160] like Fig.10 The system schematic diagram of a video injection real-time delay evaluation system of the present invention is shown, comprising: an injection host 1, an injected device 2 and a real-time delay evaluation platform 3, wherein the real-time delay evaluation platform 3 is respectively connected to the injection host 1 and the injected device 2 in communication, and the real-time delay side platform 3 comprises:

[0161] A timestamp information adding module 301 is used to add the timestamp information of the current time to the frame image of the virtual scene video output by the injection host 1;

[0162] An injection module 302, used for adding a string to the frame image and transmitting it to the injected device 2;

[0163] The deserialization module 303 is used to obtain the deserialized frame image after deserialization from the injected device 2, and read the deserialized frame image timestamp information of the deserialized frame image from the deserialized frame image;

[0164] The delay time determination module 304 is used to perform delay evaluation according to the timestamp information of the deserialized frame image and the real-time timestamp information when the deserialized frame image is obtained.

[0165] The present invention adds real-time timestamp information to the frame image of the virtual scene video output by the injection host, and reads the timestamp information of the deserialized frame image from the deserialized frame image after being deserialized in the injected device, and performs delay evaluation according to the timestamp information of the deserialized frame image and the real-time timestamp information when the deserialized frame image is obtained. The present invention can obtain the delay of HiL video injection in real time, quantitatively analyze the delay and frame rate of the video injection system, so as to determine whether the test results of the entire HiL bench are available, and help testers evaluate whether the test results of the HiL bench are credible.

[0166] like Fig.11 The figure shows a hardware structure diagram of an electronic device of the present invention, including:

[0167] at least one processor 1101; and,

[0168] A memory 1102 is communicatively connected to at least one of the processors 1101; wherein:

[0169] The memory 1102 stores instructions that can be executed by at least one of the processors. The instructions are executed by at least one of the processors so that the at least one processor can execute the video injection real-time delay evaluation method as described above.

[0170] Fig.11 A processor 1101 is taken as an example.

[0171] The electronic device may further include: an input device 1103 and a display device 1104 .

[0172] The processor 1101, the memory 1102, the input device 1103 and the display device 1104 may be connected via a bus or other means, and the figure takes the connection via a bus as an example.

[0173] The memory 1102 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the video injection real-time delay evaluation method in the embodiment of the present application, for example, Figure 1 , Figure 2 , Figure 3 , Figure 4 , Figure 5 The processor 1101 executes various functional applications and data processing by running the non-volatile software programs, instructions and modules stored in the memory 1102, that is, the video injection real-time delay evaluation method in the above embodiment is implemented.

[0174] The memory 1102 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required by at least one function; the data storage area may store data created according to the use of the video injection real-time delay evaluation method, etc. In addition, the memory 1102 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 1102 may optionally include a memory remotely arranged relative to the processor 1101, and these remote memories may be connected to the device for executing the video injection real-time delay evaluation method via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0175] The input device 1103 can receive user clicks and generate signal inputs related to user settings and function control of the video injection real-time delay evaluation method. The display device 1104 can include display devices such as a display screen.

[0176] The one or more modules are stored in the memory 1102, and when executed by the one or more processors 1101, the video injection real-time delay evaluation method in any of the above method embodiments is executed.

[0177] The present invention adds real-time timestamp information to the frame image of the virtual scene video output by the injection host, and reads the timestamp information of the deserialized frame image from the deserialized frame image after being deserialized in the injected device, and performs delay evaluation according to the timestamp information of the deserialized frame image and the real-time timestamp information when the deserialized frame image is obtained. The present invention can obtain the delay of HiL video injection in real time, quantitatively analyze the delay and frame rate of the video injection system, so as to determine whether the test results of the entire HiL bench are available, and help testers evaluate whether the test results of the HiL bench are credible.

[0178] An embodiment of the present invention provides a storage medium, wherein the storage medium stores computer instructions. When a computer executes the computer instructions, the storage medium is used to execute all steps of the video injection real-time delay evaluation method as described above.

[0179] In the context of the present disclosure, a storage medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or apparatus. The storage medium may be a machine-readable signal medium or a machine-readable storage medium. Alternatively, the storage medium may be a non-temporary computer-readable storage medium, for example, a non-temporary computer-readable storage medium may be a ROM, a random access memory (Random Access Memory, RAM), a compact disc read-only memory (Compact Disc ROM, CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device, etc.

[0180] An embodiment of the present invention provides a computer program product, including a computer program / instruction, which implements the above-mentioned video injection real-time delay evaluation method when executed by a processor.

[0181] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

Claims

1. A video injection real-time delay evaluation method, characterized in that: include: Adding real-time timestamp information to the frame images of the virtual scene video output by the injection host; Adding a string to the frame image and transmitting it to the injected device; Acquire a deserialized frame image after deserialization from the injected device, and read deserialized frame image timestamp information of the deserialized frame image from the deserialized frame image; Delay evaluation is performed according to the deserialized frame image timestamp information and the real-time timestamp information when the deserialized frame image is obtained.

2. The video injection real-time delay evaluation method according to claim 1 is characterized in that: The adding of real-time timestamp information to the frame image of the virtual scene video output by the injection host comprises: Get the real-time timestamp information of the current moment; The real-time timestamp information is added to a preset position of a frame image of the virtual scene video output by the injection host.

3. The video injection real-time delay evaluation method according to claim 2 is characterized in that: The step of reading the deserialized frame image timestamp information of the deserialized frame image from the deserialized frame image comprises: The timestamp information is identified from a preset position of the deserialized frame image as the timestamp information of the deserialized frame image.

4. The video injection real-time delay evaluation method according to claim 1 is characterized in that: The adding of real-time timestamp information to the frame image of the virtual scene video output by the injection host comprises: When the virtual scene video is a virtual scene video of a fisheye camera, real-time timestamp information of the current moment is obtained; The dark corner area of ​​the frame image of the virtual scene video of the fisheye camera is replaced with the real-time timestamp information.

5. The video injection real-time delay evaluation method according to claim 4 is characterized in that: The step of reading the deserialized frame image timestamp information of the deserialized frame image from the deserialized frame image comprises: The timestamp information is identified from the dark corner area of ​​the deserialized frame image as the deserialized frame image timestamp information.

6. The video injection real-time delay evaluation method according to claim 1 is characterized in that: The adding of real-time timestamp information to the frame image of the virtual scene video output by the injection host comprises: Get the real-time timestamp information of the current moment; Converting the frame image of the virtual scene video into first frequency domain data, and adding the real-time timestamp information to the first frequency domain data; The frequency domain data with the real-time timestamp information added thereto is converted into a frame image in the spatial domain.

7. The video injection real-time delay evaluation method according to claim 6 is characterized in that: The step of reading the deserialized frame image timestamp information of the deserialized frame image from the deserialized frame image comprises: Converting the deserialized frame image into second frequency domain data; Timestamp information is identified from the second frequency domain data as deserialized frame image timestamp information.

8. The video injection real-time delay evaluation method according to any one of claims 1 to 7, characterized in that: The timestamp information includes a timestamp and a rolling time count. The delay evaluation is performed based on the deserialized frame image timestamp information and the real-time timestamp information when the deserialized frame image is obtained, including: calculating the delay time based on the difference between the timestamp of the real-time timestamp information when the deserialized frame image is obtained and the timestamp of the deserialized frame image timestamp information; judging whether the deserialized frame image timestamp information is correct timestamp information based on the rolling time count of the deserialized frame image timestamp information; and calculating the frame rate based on the number of deserialized frame images with correct timestamp information within a preset time.

9. A video injection real-time delay evaluation system, characterized in that: include: An injection host (1), an injected device (2) and a real-time delay evaluation platform (3), wherein the real-time delay evaluation platform (3) is respectively connected to the injection host (1) and the injected device (2), and the real-time delay side platform (3) comprises: A timestamp information adding module, used for adding the timestamp information of the current time to the frame image of the virtual scene video output by the injection host (1); An injection module, used for stringing the frame image and transmitting it to the injected device (2); A deserialization module, used for obtaining a deserialized frame image after deserialization from the injected device (2), and reading deserialized frame image timestamp information of the deserialized frame image from the deserialized frame image; The delay time determination module is used to perform delay evaluation according to the deserialized frame image timestamp information and the real-time timestamp information when the deserialized frame image is obtained.

10. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to at least one of the processors; wherein, The memory stores instructions that can be executed by at least one of the processors, and the instructions are executed by at least one of the processors to enable at least one of the processors to execute the video injection real-time delay evaluation method as described in any one of claims 1 to 8.

11. A storage medium, characterized in that: The storage medium stores computer instructions, and when a computer executes the computer instructions, it is used to execute all steps of the video injection real-time delay evaluation method as described in any one of claims 1 to 8.

12. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the video injection real-time delay evaluation method as described in any one of claims 1 to 8 is implemented.