Vehicle video display method and device, equipment and storage medium
By receiving and processing vehicle video frame data line by line, calculating the global atmospheric light intensity and media propagation coefficient, and using the similarity of the previous and next frame data to perform defogging processing, the problem of video defogging delay in vehicle video display technology is solved and improved Video performance and driving safety.
Patent Information
- Application Number
- CN202410681513.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-29
- Publication Date
- 2024-09-03
AI Technical Summary
Existing vehicle video display technology needs to cache one frame of image when driving in foggy weather, resulting in increased latency and affecting the accuracy and safety of driver judgment.
By receiving and processing the video frame data uploaded by the vehicle line by line, the global atmospheric light intensity and media propagation coefficient are calculated, and the similarity of the previous and subsequent frame data is used for defogging processing, which reduces the delay in video defogging processing.
Without the need to cache one frame of video frame data, the video performance is improved, the delay in video defogging processing is reduced, and driving safety is enhanced.
Smart Images

Figure CN118590769A
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle technology, and in particular to a vehicle video display method and device, an electronic device and a storage medium. Background Art
[0002] When a vehicle is driving in foggy weather, in order to improve the overall display effect of the CMS (Content Management System) on the vehicle, it is usually necessary to use a software algorithm to defog. There are many defog methods in the prior art, but they are all based on overall defog of frames of images, that is, after receiving a frame of image, the whole frame of image is defogged using deep learning or dark channel defog algorithms before output. Since processing needs to be based on a frame of image, a frame of image also needs to be cached, which introduces additional delay in this link.
[0003] Assume that a vehicle is traveling on a highway, and the normal speed is 120km / h (kilometers per hour), or 33.33m / s (meters per second). The distance delay of 50ms (milliseconds) is 1.67m (meters), and when the driver is speeding, the distance delay will be further increased on this basis. The increase in distance delay will affect the driver's judgment accuracy, especially when the vehicle changes lanes to overtake, the CMS shows that there is enough safe distance, but in fact the distance between the two vehicles does not reach the safe distance. Changing lanes to overtake will bring greater safety hazards to both the vehicle and the other vehicle, increasing the probability of safety accidents.
[0004] Therefore, how to reduce the delay of video defog processing while ensuring the CMS video performance is an urgent problem to be solved. Summary of the invention
[0005] The embodiment of the present application provides a vehicle video display method to solve the problem of how to reduce the delay of video defog processing while ensuring the CMS video performance.
[0006] Correspondingly, an embodiment of the present application also provides a vehicle video display device, an electronic device and a storage medium to ensure the implementation and application of the above method.
[0007] In order to solve the above problems, an embodiment of the present application discloses a vehicle video display method, which is applied to a server, the server is communicatively connected with the vehicle, and the vehicle includes a camera and a terminal device. The method includes:
[0008] Receive pixel data of pixels in the first video frame data captured by the camera uploaded by the vehicle line by line;
[0009] Calculate the global atmospheric light intensity of the first video frame data and the medium propagation coefficient of each pixel of the first video frame data according to the pixel data of each pixel;
[0010] When receiving the second video frame data shot by the camera uploaded by the vehicle, performing a defogging process on the second video frame data according to the global atmospheric light intensity and the medium propagation coefficient to obtain the defogging second video frame data;
[0011] The second video frame data after defogging is output to the terminal device so that the second video frame data after defogging is displayed through the terminal device.
[0012] Optionally, the calculating the global atmospheric light intensity of the first video frame data and the medium propagation coefficient of each pixel of the first video frame data according to the pixel data of each pixel includes:
[0013] Calculating a dark channel value according to the color component data corresponding to the pixel data of each pixel, and updating the temporary atmospheric light intensity of the first video frame data according to the dark channel value;
[0014] After receiving the pixel data of all pixels of the first video frame data, the temporary atmospheric light intensity is used as the global atmospheric light intensity of the first video frame data, and the medium propagation coefficient of each pixel of the first video frame data is calculated according to the dark channel value of each pixel and the global atmospheric light intensity.
[0015] Optionally, the first video frame data includes first red component data, first green component data, and first blue component data, and calculating the dark channel value according to the color component data corresponding to the pixel data of each pixel includes:
[0016] For each pixel in the first video frame data, compare a minimum value among the first red component data, the first green component data, and the first blue component data of each pixel in the first video frame data with a preset threshold to obtain a comparison result;
[0017] The dark channel value of the pixel is obtained according to the comparison result.
[0018] Optionally, obtaining the dark channel value of the pixel according to the comparison result includes:
[0019] If the comparison result is that the minimum value is greater than or equal to the preset threshold, the minimum value is the dark channel value of the pixel;
[0020] If the comparison result is that the minimum value is less than the preset threshold, then the preset threshold is the dark channel value of the pixel.
[0021] Optionally, updating the temporary atmospheric light intensity of the first video frame data according to the dark channel value includes:
[0022] Compare the maximum dark channel value among the dark channel values of all pixels in each row of pixels of the first video frame data with the temporary atmospheric light intensity;
[0023] If the maximum dark channel value is greater than or equal to the temporary atmospheric light intensity, the maximum dark channel value is updated to the temporary atmospheric light intensity.
[0024] Optionally, calculating the medium propagation coefficient of each pixel of the first video frame data according to the dark channel value of each pixel and the global atmospheric light intensity includes:
[0025] The medium propagation coefficient of each pixel of the first video frame data is calculated according to the dark channel value of each pixel, the global atmospheric light intensity and a preset defog factor.
[0026] Optionally, the second video frame data includes second red component data, second green component data, and second blue component data, and the defogging process is performed on the second video frame data according to the global atmospheric light intensity and the medium propagation coefficient to obtain the defogging second video frame data, including:
[0027] The second red component data, the second green component data and the second blue component data in the second video frame data are respectively defogged according to the global atmospheric light intensity and the medium propagation coefficient.
[0028] The embodiment of the present application further discloses a vehicle video display device, which is applied to a server, wherein the server is communicatively connected with the vehicle, and the vehicle includes a camera and a terminal device, and the device includes:
[0029] A first video frame data receiving module, used for receiving pixel data of pixels in the first video frame data shot by the camera uploaded by the vehicle line by line;
[0030] A parameter calculation module, used for calculating the global atmospheric light intensity of the first video frame data and the medium propagation coefficient of each pixel of the first video frame data according to the pixel data of each pixel;
[0031] a defogging processing module, configured to, when receiving the second video frame data shot by the camera uploaded by the vehicle, perform defogging processing on the second video frame data according to the global atmospheric light intensity and the medium propagation coefficient to obtain the defogged second video frame data;
[0032] A video output module is used to output the second video frame data after defog to the terminal device so that the second video frame data after defog is displayed through the terminal device.
[0033] An embodiment of the present application also discloses an electronic device, including: a processor; and a memory, on which executable code is stored. When the executable code is executed, the processor executes the vehicle video display method as described in one or more of the embodiments of the present application.
[0034] The embodiments of the present application also disclose one or more machine-readable media on which executable codes are stored. When the executable codes are executed, the processor executes the vehicle video display method as described in one or more of the embodiments of the present application.
[0035] Compared with the prior art, the embodiments of the present application have the following advantages:
[0036] In an embodiment of the present application, pixel data of pixels in the first video frame data captured by the camera uploaded by the vehicle are received line by line; the global atmospheric light intensity of the first video frame data and the medium propagation coefficient of each pixel of the first video frame data are calculated according to the pixel data of each pixel; when the second video frame data captured by the camera uploaded by the vehicle is received, the second video frame data is defogged according to the global atmospheric light intensity and the medium propagation coefficient to obtain the second video frame data after defogging; the second video frame data after defogging is output to the terminal device so as to display the second video frame data after defogging through the terminal device. According to the similarity between the previous and next frames of video frame data, the embodiment of the present application can use the global atmospheric light intensity and the medium propagation coefficient of the previous frame of video to defog the row of video frame data each time a row of video frame data is received, and the global atmospheric light intensity and the medium propagation coefficient required for defogging the next frame of video are updated, and video defogging is performed without caching a frame of video frame data, so that video performance is improved, the delay of video defogging processing is reduced, and driving safety is further ensured. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 is a flowchart of a vehicle video display method embodiment of the present application;
[0038] Figure 2 It is a schematic diagram of the intermediate steps of an embodiment of a vehicle video display method of the present application;
[0039] Figure 3 It is a schematic diagram of the intermediate steps of an embodiment of a vehicle video display method of the present application;
[0040] Figure 4 It is a schematic diagram of the intermediate steps of an embodiment of a vehicle video display method of the present application;
[0041] Figure 5 is a structural block diagram of an embodiment of a vehicle video display device of the present application;
[0042] Figure 6 It is a schematic diagram of the structure of a device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0043] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0044] Reference Figure 1 , is a flowchart of a vehicle video display method embodiment of the present application, comprising the following steps:
[0045] Step 101: Receive pixel data of pixels in a first video frame data captured by the camera and uploaded by the vehicle line by line.
[0046] In this embodiment, the vehicle includes a camera and a terminal device, and the terminal device is equipped with a CMS for managing information and content related to the vehicle. The vehicle is connected to the server in communication, and the video frame data captured by the camera on the vehicle is uploaded to the server for defogging and then output. In one embodiment of the present application, the server receives the first video frame data captured by the camera uploaded by the vehicle line by line. The first video frame data consists of multiple lines of data, and the server receives a new line of the first video frame data each time; each line of data consists of multiple pixels, and each pixel includes its corresponding pixel data.
[0047] In one embodiment, the pixel data may include color component data of corresponding three components, namely red component data, green component data and blue component data, that is, three components R, G and B.
[0048] Step 102: Calculate the global atmospheric light intensity of the first video frame data and the medium propagation coefficient of each pixel of the first video frame data according to the pixel data of each pixel.
[0049] In this embodiment, after a new line of first video frame data is received, the global atmospheric light intensity of the first video frame data and the medium propagation coefficient corresponding to each pixel in the first video frame data are calculated according to the pixel data of each pixel therein.
[0050] Specifically, in one embodiment of the present application, before starting to receive a new frame of video frame data, an initial temporary atmospheric light intensity is set for the frame. Exemplarily, the initial temporary atmospheric light intensity can be set to 0. In this embodiment, the initial temporary atmospheric light intensity is set to 0 for the first video frame data, and then the first video frame data is received line by line. When each new line of data is received, the dark channel values corresponding to all pixels in the line of data are first calculated based on the color component data of the three components in the pixel data, and then the temporary atmospheric light intensity of the frame is updated based on the dark channel values of all pixels in the line. After all the data of the frame is received, the temporary atmospheric light intensity is the global atmospheric light intensity of the first video frame data. Finally, according to the dark channel values of all pixels in the first video frame data and the global atmospheric light intensity of the first video frame data, the medium propagation coefficients corresponding to all pixels in the first video frame data are calculated.
[0051] The global atmospheric light intensity of the first video frame data and the medium propagation coefficient of each pixel of the first video frame data obtained in step 102 are used to perform defogging processing on the next frame.
[0052] Step 103: When receiving the second video frame data shot by the camera uploaded by the vehicle, the second video frame data is defogged according to the global atmospheric light intensity and the medium propagation coefficient to obtain the second video frame data after defogger processing.
[0053] The frame rate of the on-board CMS camera is usually 60Hz, and the time interval between each frame is 16.67ms; when the driving speed is 120km / h, the distance the vehicle moves between two frames is 0.56m. If the vehicle is driving at a low speed, the distance the vehicle moves between two frames will be smaller. The short interval in time and distance leads to a small difference between the images of the two frames. Therefore, when defogging, the global atmospheric light intensity and medium propagation coefficient of the current frame image can be approximately estimated by the global atmospheric light intensity and medium propagation coefficient of the previous frame image.
[0054] In this embodiment, the shooting time of the first video frame data is earlier than that of the second video frame data, and the second video frame data is defogged using the global atmospheric light intensity and medium propagation coefficient obtained from the first video frame data.
[0055] In step 103, the second video frame data captured by the camera on the vehicle is received line by line. Each time a line of the second video frame data is received, the second video frame data is defogged according to the global atmospheric light intensity of the first video frame data and the medium propagation coefficient corresponding to each pixel in the first video frame data to obtain the defogged second video frame data. That is, each time a new line of the second video frame data is received, the corresponding defogging parameters of the previous frame are used to perform defogging on it. In one embodiment, the dark channel algorithm can be used to perform defogging on the second video frame data.
[0056] Step 104: output the second video frame data after defog to the terminal device, so that the second video frame data after defog is displayed through the terminal device.
[0057] After a new line of received second video frame data is defogged, the defogged second video frame data is output to a terminal device on the vehicle, and the defogged second video frame data is displayed on the terminal device. In this embodiment, each time a line of second video frame data is received, it is defogged and then output, that is, a line of defogged data is output each time. Since the time for line-by-line reception, defog processing, and output of a frame of video data is actually very short, the human eye cannot feel that the defogged video is output line by line. Therefore, without caching a frame of video, the video defog capability is improved, the video performance is improved, and the video delay is reduced.
[0058] In an embodiment of the present application, pixel data of pixels in the first video frame data captured by the camera uploaded by the vehicle are received line by line; the global atmospheric light intensity of the first video frame data and the medium propagation coefficient of each pixel of the first video frame data are calculated according to the pixel data of each pixel; when the second video frame data captured by the camera uploaded by the vehicle is received, the second video frame data is defogged according to the global atmospheric light intensity and the medium propagation coefficient to obtain the second video frame data after defogging; the second video frame data after defogging is output to the terminal device so as to display the second video frame data after defogging through the terminal device. According to the similarity between the previous and next frames of video frame data, the embodiment of the present application can use the global atmospheric light intensity and the medium propagation coefficient of the previous frame of video to defog the row of video frame data each time a row of video frame data is received, and the global atmospheric light intensity and the medium propagation coefficient required for defogging the next frame of video are updated, and video defogging is performed without caching a frame of video frame data, so that video performance is improved, the delay of video defogging processing is reduced, and driving safety is further ensured.
[0059] In one embodiment of the present application, the calculating the global atmospheric light intensity of the first video frame data and the medium propagation coefficient of each pixel of the first video frame data according to the pixel data of each pixel includes:
[0060] Calculating a dark channel value according to the color component data corresponding to the pixel data of each pixel, and updating the temporary atmospheric light intensity of the first video frame data according to the dark channel value;
[0061] After receiving the pixel data of all pixels of the first video frame data, the temporary atmospheric light intensity is used as the global atmospheric light intensity of the first video frame data, and the medium propagation coefficient of each pixel of the first video frame data is calculated according to the dark channel value of each pixel and the global atmospheric light intensity.
[0062] In this embodiment, after receiving a new row of first video frame data, the dark channel value corresponding to the pixel is calculated according to the color component data corresponding to the pixel data of each pixel, that is, the dark channel value corresponding to each pixel in the row of first video frame data is calculated. After calculating the dark channel values of all pixels in the row, the temporary atmospheric light intensity of the first video frame data is updated according to the dark channel values of all pixels in the row. After receiving the pixel data of all pixels of the first video frame data, the temporary atmospheric light intensity is the global atmospheric light intensity of the first video frame data. According to the global atmospheric light intensity of the first video frame data and the dark channel value corresponding to each pixel in the first video frame data, the medium propagation coefficient corresponding to each pixel in the first video frame data is calculated. That is, each pixel in the first video frame data has its corresponding dark channel value and medium propagation coefficient, and the first video frame data has a unique corresponding global atmospheric light intensity. In this embodiment, the global atmospheric light intensity of the first video frame data and the medium propagation coefficient of each pixel of the first video frame data are calculated for the subsequent defogging of the second video frame data.
[0063] In an embodiment of the present application, the first video frame data includes first red component data, first green component data, and first blue component data, and the calculating of the dark channel value according to the color component data corresponding to the pixel data of each pixel includes:
[0064] For each pixel in the first video frame data, compare a minimum value among the first red component data, the first green component data, and the first blue component data of each pixel in the first video frame data with a preset threshold to obtain a comparison result;
[0065] The dark channel value of the pixel is obtained according to the comparison result.
[0066] In this embodiment, the pixel data of each pixel in the first video frame data includes color component data of three components, namely, first red component data, first green component data, and first blue component data, that is, three components of R, G, and B. After comparing the first red component data, the first green component data, and the first blue component data in the pixel data of each pixel to obtain a minimum value, the minimum value is compared with a preset threshold to obtain a dark channel value of the pixel, which is used for subsequent calculation of the medium propagation coefficient of each pixel in the first video frame data. In one embodiment, the larger value between the minimum value and the preset threshold can be used as the dark channel value of the pixel.
[0067] In one embodiment of the present application, obtaining the dark channel value of the pixel according to the comparison result includes:
[0068] If the comparison result is that the minimum value is greater than or equal to the preset threshold, the minimum value is the dark channel value of the pixel;
[0069] If the comparison result is that the minimum value is less than the preset threshold, then the preset threshold is the dark channel value of the pixel.
[0070] In this embodiment, after obtaining the minimum value among the first red component data, the first green component data and the first blue component data of a pixel, the minimum value is compared with a preset threshold. If the minimum value is greater than or equal to the preset threshold, the minimum value is used as the dark channel value of the pixel; if the minimum value is less than the preset threshold, the preset threshold is used as the dark channel value of the pixel, thereby obtaining the dark channel values of all pixels in the first video frame data. If the dark channel value is too small, it may cause insufficient dark details in the image, or the image as a whole may be too bright. Therefore, setting a preset threshold, comparing the minimum value of the color component with the preset threshold, and then determining the dark channel value can avoid this situation.
[0071] In one embodiment of the present application, updating the temporary atmospheric light intensity of the first video frame data according to the dark channel value includes:
[0072] Compare the maximum dark channel value among the dark channel values of all pixels in each row of pixels of the first video frame data with the temporary atmospheric light intensity;
[0073] If the maximum dark channel value is greater than or equal to the temporary atmospheric light intensity, the maximum dark channel value is updated to the temporary atmospheric light intensity.
[0074] In this embodiment, each time a new row of the first video frame data is received, the temporary atmospheric light intensity of the first video frame data needs to be updated once. After calculating the dark channel values of all pixels in the row, the maximum dark channel value in the dark channel values of the row is compared with the current temporary atmospheric light intensity. If the maximum dark channel value of the row is greater than or equal to the temporary atmospheric light intensity, the maximum dark channel value of the row is updated to the temporary atmospheric light intensity; if the maximum dark channel value of the row is less than the temporary atmospheric light intensity, the temporary atmospheric light intensity is not updated. After the dark channel values of all pixels are calculated, the temporary atmospheric light intensity is the global atmospheric light intensity of the first video frame data. Updating the temporary atmospheric light intensity using the dark channel value can prevent the dark part of the image from being over-enhanced during the defogging process, causing the image to look unnatural or distorted.
[0075] In one embodiment of the present application, the calculating the medium propagation coefficient of each pixel of the first video frame data according to the dark channel value of each pixel and the global atmospheric light intensity includes:
[0076] The medium propagation coefficient of each pixel of the first video frame data is calculated according to the dark channel value of each pixel, the global atmospheric light intensity and a preset defog factor.
[0077] In this embodiment, when calculating the medium propagation coefficient, it can be calculated based on the dark channel value of each pixel, the global atmospheric light intensity and the preset defog factor. The preset defog factor can adjust the intensity of the defog effect to meet different defog requirements. In one embodiment, let the dark channel value of the xth row and yth column in the first video frame data be d(x, y), the calculated global atmospheric light intensity of the first video frame data be A, and the preset defog factor be w0, then the medium propagation coefficient T(x, y) of the xth row and yth column can be calculated by formula (1):
[0078]
[0079] In an embodiment of the present application, the second video frame data includes second red component data, second green component data, and second blue component data, and the second video frame data is defogged according to the global atmospheric light intensity and the medium propagation coefficient to obtain the defogged second video frame data including:
[0080] The second red component data, the second green component data and the second blue component data in the second video frame data are respectively defogged according to the global atmospheric light intensity and the medium propagation coefficient.
[0081] In this embodiment, the pixel data of each pixel in the second video frame data also includes three-component color component data, namely, second red component data, second green component data and second blue component data, that is, three components of R, G and B. When the second video frame data is defogged, the second red component data, second green component data and second blue component data of each pixel in the second video frame data are defogged according to the global atmospheric light intensity of the first video frame data and the medium propagation coefficient of each pixel in the first video frame data, thereby reducing the video delay. In one embodiment, assuming that the global atmospheric light intensity of the first video frame data is A pre , the medium propagation coefficient matrix of the first video frame data is T pre Among them, T pre is a matrix with m rows and n columns, T pre (x,y) represents the medium propagation coefficient of the xth row and yth column in the first video frame data. For the pixel data P(x,y) of the xth row and yth column in the second video frame data, P(x,y,1) is the R component of the pixel, P(x,y,2) is the G component of the pixel, P(x,y,3) is the B component of the pixel, and P s (x, y, 1) is the R component after defogging, P s (x, y, 2) is the G component after defogging, P s (x, y, 3) is the B component after defogging. The defogging calculation process can be expressed as formula (2):
[0082]
[0083] In one embodiment of the present application, when the second video frame data is the first frame of video data captured by the vehicle camera, that is, when there is no global atmospheric light intensity and medium propagation coefficient calculated by the first video frame data, the initial medium propagation coefficient is set to the unit matrix (a matrix of all 1s), and the initial global atmospheric light intensity is initialized to 1, so that the above-mentioned defogging calculation process is performed on the second video frame data according to the initial medium propagation coefficient and the initial global atmospheric light intensity. In fact, if the second video frame data is the first frame of video data captured by the vehicle camera, it is calculated in a manner that the initial medium propagation coefficient is the unit matrix and the initial global atmospheric light intensity is initialized to 1, which is equivalent to not performing defogging on the second video frame data. However, since the display time of a frame of video is very short, the driver's naked eye cannot recognize that the first frame of video has not been defogged, so it will not affect driving safety. At the same time, the corresponding global atmospheric light intensity and medium propagation coefficient can be calculated based on the second video frame data, which is used to perform defogging on the video frame data after the second video frame data.
[0084] In an embodiment of the present application, pixel data of pixels in the first video frame data captured by the camera uploaded by the vehicle are received line by line; the global atmospheric light intensity of the first video frame data and the medium propagation coefficient of each pixel of the first video frame data are calculated according to the pixel data of each pixel; when the second video frame data captured by the camera uploaded by the vehicle is received, the second video frame data is defogged according to the global atmospheric light intensity and the medium propagation coefficient to obtain the second video frame data after defogging; the second video frame data after defogging is output to the terminal device so as to display the second video frame data after defogging through the terminal device. According to the similarity between the previous and next frames of video frame data, the embodiment of the present application can use the global atmospheric light intensity and the medium propagation coefficient of the previous frame of video to defog the row of video frame data each time a row of video frame data is received, and the global atmospheric light intensity and the medium propagation coefficient required for defogging the next frame of video are updated, and video defogging is performed without caching a frame of video frame data, so that video performance is improved, the delay of video defogging processing is reduced, and driving safety is further ensured.
[0085] The following will describe in detail a vehicle video display method provided by the present application by splitting a series of intermediate process steps of an embodiment of a vehicle video display method of the present application. Figure 2-Figure 4 , is a schematic diagram of an intermediate step of an embodiment of a vehicle video display method of the present application.
[0086] Among them, refer to Figure 2 , is a schematic diagram of the intermediate steps of an embodiment of a vehicle video display method of the present application, and the specific steps are as follows:
[0087] First, the original data of a frame of video is received line by line. Assume that the currently received original data P1 to P1 of the mth line of the video frame data is n , the data format of this element is RGB888, and n is the column resolution. The mth row of data is defogged using the global atmospheric light intensity of the previous frame and the media propagation coefficient of the mth row of the previous frame of video frame data to obtain the defogged data of the mth row, and the video frame data of this row is output and displayed. At the same time, according to the original data P1~P n Update the temporary atmospheric light intensity and medium propagation coefficient of the video frame data.
[0088] Reference Figure 3 , is a schematic diagram of the intermediate steps of an embodiment of a vehicle video display method of the present application, and the specific steps are as follows:
[0089] According to the received video frame data, the pixels P1 to P n Original data, calculate the mth row P1~P of the video frame data nThe dark channel value of the calculated dark channel value is different from the RGB888 format of the original data. The dark channel value of the current video frame data is updated. The dark channel value of the current video frame data after the update includes the dark channel values of the 0th row to the mth row; and the temporary atmospheric light intensity of the current frame is updated according to the dark channel value of the mth row.
[0090] Reference Figure 4 , is a schematic diagram of the intermediate steps of an embodiment of a vehicle video display method of the present application, and the specific steps are as follows:
[0091] After the calculation of the last row of dark channel is completed, the dark channel values of the video frame data of row 0 to row I-1 are obtained. Each row of dark channel values includes pixels P1 to P n The dark channel value of each pixel in the 0th to I-1th row is calculated based on the global atmospheric light intensity and the dark channel value of each pixel in the video frame data. n When the next frame of data is received, the global atmospheric light intensity and the medium propagation coefficient of the video frame data are used for defogging.
[0092] In an embodiment of the present application, pixel data of pixels in the first video frame data captured by the camera uploaded by the vehicle are received line by line; the global atmospheric light intensity of the first video frame data and the medium propagation coefficient of each pixel of the first video frame data are calculated according to the pixel data of each pixel; when the second video frame data captured by the camera uploaded by the vehicle is received, the second video frame data is defogged according to the global atmospheric light intensity and the medium propagation coefficient to obtain the second video frame data after defogging; the second video frame data after defogging is output to the terminal device so as to display the second video frame data after defogging through the terminal device. According to the similarity between the previous and next frames of video frame data, the embodiment of the present application can use the global atmospheric light intensity and the medium propagation coefficient of the previous frame of video to defog the row of video frame data each time a row of video frame data is received, and the global atmospheric light intensity and the medium propagation coefficient required for defogging the next frame of video are updated, and video defogging is performed without caching a frame of video frame data, so that video performance is improved, the delay of video defogging processing is reduced, and driving safety is further ensured.
[0093] It should be noted that, for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the described order of actions, because according to the embodiments of the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present application.
[0094] On the basis of the above-mentioned embodiments, this embodiment further provides a vehicle video display device, which is applied to electronic devices such as terminal devices and servers.
[0095] Reference Figure 5 , shows a structural block diagram of an embodiment of a vehicle video display device of the present application, which may specifically include the following modules:
[0096] A first video frame data receiving module 501 is used to receive pixel data of pixels in the first video frame data shot by the camera uploaded by the vehicle line by line;
[0097] A parameter calculation module 502, configured to calculate the global atmospheric light intensity of the first video frame data and the medium propagation coefficient of each pixel of the first video frame data according to the pixel data of each pixel;
[0098] A defogging processing module 503 is used for, when receiving the second video frame data shot by the camera uploaded by the vehicle, performing defogging processing on the second video frame data according to the global atmospheric light intensity and the medium propagation coefficient to obtain the second video frame data after defogging;
[0099] The video output module 504 is used to output the second video frame data after defog to the terminal device, so that the second video frame data after defog is displayed through the terminal device.
[0100] Optionally, the parameter calculation module 502 further includes:
[0101] a temporary atmospheric light intensity updating submodule, configured to calculate a dark channel value according to the color component data corresponding to the pixel data of each pixel, and update the temporary atmospheric light intensity of the first video frame data according to the dark channel value;
[0102] The medium propagation coefficient calculation submodule is used to, after receiving the pixel data of all pixels of the first video frame data, use the temporary atmospheric light intensity as the global atmospheric light intensity of the first video frame data, and calculate the medium propagation coefficient of each pixel of the first video frame data according to the dark channel value of each pixel and the global atmospheric light intensity.
[0103] Optionally, the first video frame data includes first red component data, first green component data and first blue component data, and the temporary atmospheric light intensity update submodule further includes:
[0104] a minimum value comparison submodule, for comparing, for each pixel in the first video frame data, a minimum value among the first red component data, the first green component data, and the first blue component data of each pixel in the first video frame data with a preset threshold value to obtain a comparison result;
[0105] A dark channel value calculation submodule is used to obtain the dark channel value of the pixel according to the comparison result.
[0106] Optionally, the dark channel value calculation submodule is further used for:
[0107] If the comparison result is that the minimum value is greater than or equal to the preset threshold, the minimum value is the dark channel value of the pixel;
[0108] If the comparison result is that the minimum value is less than the preset threshold, then the preset threshold is the dark channel value of the pixel.
[0109] Optionally, the temporary atmospheric light intensity updating submodule further includes:
[0110] a maximum dark channel value comparison submodule, configured to compare a maximum dark channel value among the dark channel values of all pixels in each row of pixels of the first video frame data with the temporary atmospheric light intensity;
[0111] The maximum dark channel value updating submodule is used to update the maximum dark channel value to the temporary atmospheric light intensity if the maximum dark channel value is greater than or equal to the temporary atmospheric light intensity.
[0112] Optionally, the medium propagation coefficient calculation submodule is further used to:
[0113] The medium propagation coefficient of each pixel of the first video frame data is calculated according to the dark channel value of each pixel, the global atmospheric light intensity and a preset defog factor.
[0114] Optionally, the second video frame data includes second red component data, second green component data and second blue component data, and the defogging processing module 503 further includes:
[0115] The color component data processing submodule is used to perform defogging processing on the second red component data, the second green component data and the second blue component data in the second video frame data according to the global atmospheric light intensity and the medium propagation coefficient.
[0116] The embodiment of the present application also provides a non-volatile readable storage medium, which stores one or more modules (programs). When the one or more modules are applied to a device, the device can execute instructions (instructions) of each method step in the embodiment of the present application.
[0117] The present application embodiment provides one or more machine-readable media on which instructions are stored, and when executed by one or more processors, an electronic device executes one or more of the methods described in the above embodiments. In the present application embodiment, the electronic device includes various types of devices such as terminal devices and servers (clusters).
[0118] The embodiments of the present disclosure may be implemented as a device configured as desired using any appropriate hardware, firmware, software, or any combination thereof, and the device may include electronic devices such as terminal devices and servers (clusters). Figure 6 An exemplary apparatus 600 that may be used to implement various embodiments described in this application is schematically illustrated.
[0119] For one embodiment, Figure 6 An exemplary apparatus 600 is shown having one or more processors 602, a control module (chip set) 604 coupled to at least one of the processor(s) 602, a memory 606 coupled to the control module 604, a non-volatile memory (NVM) / storage device 608 coupled to the control module 604, one or more input / output devices 610 coupled to the control module 604, and a network interface 612 coupled to the control module 604.
[0120] The processor 602 may include one or more single-core or multi-core processors, and the processor 602 may include any combination of general-purpose processors or special-purpose processors (such as graphics processors, application processors, baseband processors, etc.). In some embodiments, the device 600 can be used as a terminal device, server (cluster), etc. described in the embodiments of the present application.
[0121] In some embodiments, the apparatus 600 may include one or more computer-readable media (e.g., memory 606 or NVM / storage device 608) having instructions 614 and one or more processors 602 combined with the one or more computer-readable media and configured to execute the instructions 614 to implement a module to perform the actions described in the present disclosure.
[0122] For one embodiment, control module 604 may include any suitable interface controller to provide any suitable interface to at least one of processor(s) 602 and / or any suitable device or component in communication with control module 604 .
[0123] The control module 604 may include a memory controller module to provide an interface to the memory 606. The memory controller module may be a hardware module, a software module, and / or a firmware module.
[0124] The memory 606 may be used, for example, to load and store data and / or instructions 614 for the device 600. For one embodiment, the memory 606 may include any suitable volatile memory, such as a suitable DRAM. In some embodiments, the memory 606 may include double data rate type four synchronous dynamic random access memory (DDR4 SDRAM).
[0125] For one embodiment, control module 604 may include one or more input / output controllers to provide an interface to NVM / storage device 608 and input / output device(s) 610 .
[0126] For example, NVM / storage 608 may be used to store data and / or instructions 614. NVM / storage 608 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable non-volatile storage device(s) (e.g., one or more hard disk drives (HDDs), one or more compact disk (CD) drives, and / or one or more digital versatile disk (DVD) drives).
[0127] NVM / storage device 608 may include storage resources that are physically part of the device on which apparatus 600 is installed, or it may be accessible to the device without being part of the device. For example, NVM / storage device 608 may be accessed via input / output device(s) 610 over a network.
[0128] (One or more) input / output devices 610 may provide an interface for the apparatus 600 to communicate with any other appropriate device, and the input / output device 610 may include a communication component, an audio component, a sensor component, etc. The network interface 612 may provide an interface for the apparatus 600 to communicate through one or more networks, and the apparatus 600 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and / or protocols, for example, access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 5G, etc., or a combination thereof for wireless communication.
[0129] For one embodiment, at least one of the processor(s) 602 may be packaged together with the logic of one or more controllers (e.g., a memory controller module) of the control module 604. For one embodiment, at least one of the processor(s) 602 may be packaged together with the logic of one or more controllers of the control module 604 to form a system-in-package (SiP). For one embodiment, at least one of the processor(s) 602 may be integrated on the same die with the logic of one or more controllers of the control module 604. For one embodiment, at least one of the processor(s) 602 may be integrated on the same die with the logic of one or more controllers of the control module 604 to form a system-on-chip (SoC).
[0130] In various embodiments, the device 600 may be, but is not limited to, a terminal device such as a server, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet computer, a netbook, etc.). In various embodiments, the device 600 may have more or fewer components and / or different architectures. For example, in some embodiments, the device 600 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touch screen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.
[0131] Among them, the main control chip can be used as a processor or control module in the detection device, sensor data, location information, etc. are stored in a memory or NVM / storage device, the sensor group can be used as an input / output device, and the communication interface may include a network interface.
[0132] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0133] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0134] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable vehicle video display terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable vehicle video display terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0135] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable vehicle video display terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0136] These computer program instructions can also be loaded onto a computer or other programmable vehicle video display terminal device, so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable terminal device provide for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0137] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
[0138] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0139] The above is a detailed introduction to a vehicle video display method and device, an electronic device and a storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A vehicle video display method, characterized in that: Applied to a server, the server is in communication connection with the vehicle, the vehicle includes a camera and a terminal device, the method includes: Receiving pixel data of pixels in the first video frame data captured by the camera uploaded by the vehicle line by line; Calculate the global atmospheric light intensity of the first video frame data and the medium propagation coefficient of each pixel of the first video frame data according to the pixel data of each pixel; When receiving the second video frame data shot by the camera uploaded by the vehicle, performing a defogging process on the second video frame data according to the global atmospheric light intensity and the medium propagation coefficient to obtain the defogging second video frame data; The second video frame data after defogging is output to the terminal device so that the second video frame data after defogging is displayed through the terminal device.
2. The method according to claim 1, characterized in that The calculating, according to the pixel data of each pixel, the global atmospheric light intensity of the first video frame data and the medium propagation coefficient of each pixel of the first video frame data comprises: Calculating a dark channel value according to the color component data corresponding to the pixel data of each pixel, and updating the temporary atmospheric light intensity of the first video frame data according to the dark channel value; After receiving the pixel data of all pixels of the first video frame data, the temporary atmospheric light intensity is used as the global atmospheric light intensity of the first video frame data, and the medium propagation coefficient of each pixel of the first video frame data is calculated according to the dark channel value of each pixel and the global atmospheric light intensity.
3. The method according to claim 2, characterized in that The first video frame data includes first red component data, first green component data, and first blue component data, and calculating the dark channel value according to the color component data corresponding to the pixel data of each pixel includes: For each pixel in the first video frame data, compare a minimum value among the first red component data, the first green component data, and the first blue component data of each pixel in the first video frame data with a preset threshold to obtain a comparison result; The dark channel value of the pixel is obtained according to the comparison result.
4. The method according to claim 3, characterized in that The obtaining the dark channel value of the pixel according to the comparison result comprises: If the comparison result is that the minimum value is greater than or equal to the preset threshold, the minimum value is the dark channel value of the pixel; If the comparison result is that the minimum value is less than the preset threshold, then the preset threshold is the dark channel value of the pixel.
5. The method according to claim 2, characterized in that: The updating of the temporary atmospheric light intensity of the first video frame data according to the dark channel value comprises: Compare the maximum dark channel value among the dark channel values of all pixels in each row of pixels of the first video frame data with the temporary atmospheric light intensity; If the maximum dark channel value is greater than or equal to the temporary atmospheric light intensity, the maximum dark channel value is updated to the temporary atmospheric light intensity.
6. The method according to claim 2, characterized in that The calculating the medium propagation coefficient of each pixel of the first video frame data according to the dark channel value of each pixel and the global atmospheric light intensity includes: The medium propagation coefficient of each pixel of the first video frame data is calculated according to the dark channel value of each pixel, the global atmospheric light intensity and a preset defog factor.
7. The method according to claim 1, characterized in that The second video frame data includes second red component data, second green component data, and second blue component data. The second video frame data is defogged according to the global atmospheric light intensity and the medium propagation coefficient to obtain the defogged second video frame data. The second red component data, the second green component data and the second blue component data in the second video frame data are respectively defogged according to the global atmospheric light intensity and the medium propagation coefficient.
8. A vehicle video display device, characterized in that: Applied to a server, the server is in communication connection with the vehicle, the vehicle includes a camera and a terminal device, and the device includes: A first video frame data receiving module, used for receiving pixel data of pixels in the first video frame data shot by the camera uploaded by the vehicle line by line; A parameter calculation module, used for calculating the global atmospheric light intensity of the first video frame data and the medium propagation coefficient of each pixel of the first video frame data according to the pixel data of each pixel; a defogging processing module, configured to, when receiving the second video frame data shot by the camera uploaded by the vehicle, perform defogging processing on the second video frame data according to the global atmospheric light intensity and the medium propagation coefficient to obtain the defogged second video frame data; A video output module is used to output the second video frame data after defog to the terminal device so that the second video frame data after defog is displayed through the terminal device.
9. An electronic device, characterized in that: include: processor; and A memory having executable codes stored thereon, which, when executed, causes the processor to execute the vehicle video display method as described in one or more of claims 1-7.
10. One or more machine-readable media having executable codes stored thereon, which, when executed, cause a processor to perform the vehicle video display method according to one or more of claims 1-7.
