Channel numerical calculation method, ring view generation method, device, equipment, medium

By calculating and adjusting the exposure parameters of each camera, the problem of visual differences caused by different exposure parameters in the vehicle surround view system is solved, and high-quality surround view stitching is achieved.

CN117177076BActive Publication Date: 2024-09-06GLENFLY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210567975.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-24
Publication Date
2024-09-06
Estimated Expiration
2042-05-24

AI Technical Summary

Technical Problem

The exposure parameters of each camera in the vehicle-mounted surround view system are different, resulting in obvious visual differences in the spliced ​​surround view, which affects the display effect.

Method used

By acquiring the images collected by each camera, extracting the target common view area, performing color space conversion, calculating the channel parameter adjustment value, adjusting the exposure parameters of each camera to ensure that the target channel values ​​captured by adjacent cameras are equal, thereby generating a surround view without visual differences. picture.

Benefits of technology

It effectively reduces the visual difference of the surround view, improves the splicing effect, improves the calculation efficiency, and ensures the quality of the surround view.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117177076B
    Figure CN117177076B
Patent Text Reader

Abstract

The present application relates to a channel value calculation method, a surround view generation method, an apparatus, a device, and a medium. The channel value calculation method includes: obtaining images collected by each camera, extracting the target common view area in the image, and obtaining an initial image according to the target common view area; performing color space conversion on the initial image to obtain a channel-separated image to be processed; calculating the channel parameter adjustment value of each camera according to the image to be processed; and obtaining the target channel value based on the channel parameter adjustment value and the original channel value of the image collected by each camera. The surround view generation method includes: obtaining images collected by each camera; and processing the images collected by each of the cameras according to the target channel value and the surround view model to generate a surround view. The present method can adjust the target channel value of the image collected by each camera so that there is no visual difference in the surround view.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of vehicle technology, and in particular to a channel numerical calculation method, a surround view generation method, an apparatus, a computer device, a storage medium and a computer program product. Background Art

[0002] With the development of the automobile industry, in-vehicle surround view systems have emerged. In-vehicle surround view systems are usually equipped with 4 or more cameras. The surround view system stitches the images collected by the cameras to generate a panoramic image of the vehicle's surroundings. Since each camera collects images independently, its exposure parameters are determined by the properties of the photographed area. For example, the ISO sensitivity parameter is automatically adjusted according to the average brightness of the photographed area. Therefore, the exposure parameters of each camera are different at the same time, and the properties of the same scene captured by adjacent cameras, such as brightness, are also different. Directly using the collected original images for stitching will result in obvious stitching areas, affecting the display effect. Therefore, there is an urgent need for a method that can adjust the exposure parameters of each camera at the same time. Summary of the invention

[0003] Based on this, it is necessary to provide a channel numerical calculation method, a surround view generation method, device, computer equipment, storage medium and computer program product that can adjust the exposure parameters of each camera and reduce the visual differences of the surround view to address the above technical problems.

[0004] In a first aspect, the present application provides a channel numerical calculation method, the channel numerical calculation method comprising:

[0005] Acquire images captured by each camera, extract target common viewing areas in the images, and obtain an initial image based on the target common viewing areas;

[0006] Performing color space conversion on the initial image to obtain a channel-separated image to be processed;

[0007] Calculating channel parameter adjustment values ​​of each of the cameras according to the image to be processed;

[0008] A target channel value is obtained based on the channel parameter adjustment value and the original channel value of the image collected by each camera.

[0009] In one embodiment, the step of calculating the channel parameter adjustment value of each camera according to the image to be processed includes:

[0010] Determining a target channel value according to current channel values ​​of each target common viewing area in the image to be processed and a channel parameter adjustment value to be calculated;

[0011] According to the equal values ​​of the target channels of the adjacent cameras, a channel parameter equation is obtained;

[0012] According to the fact that the cumulative sum of the target channel values ​​of each camera remains unchanged overall, a constraint equation is obtained;

[0013] Obtaining a target equation group according to the channel parameter equation and the constraint equation;

[0014] The target equation group is solved to obtain the channel parameter adjustment values ​​of each camera.

[0015] In one embodiment, obtaining the target channel value based on the channel parameter adjustment value and the original channel value of the image captured by each camera includes:

[0016] An intermediate channel value is calculated based on the channel parameter adjustment value and the original channel value of the image collected by each of the cameras;

[0017] The intermediate channel value is mapped to a reasonable value interval to obtain the target channel value.

[0018] In one embodiment, the method further comprises:

[0019] Calibrate each of the cameras to obtain camera parameters;

[0020] The extracting the target common view area in the image and obtaining the initial image according to the target common view area includes:

[0021] The target common viewing area in each of the images is extracted, and the target common viewing area is processed according to the camera parameters to obtain an initial image.

[0022] In one embodiment, calibrating each of the cameras to obtain camera parameters includes:

[0023] The camera position of each camera is obtained by calculating the external parameters of each camera;

[0024] Calculate the vehicle body length, vehicle width and camera height based on the camera position;

[0025] Calculating model parameters of a surround view model according to the vehicle width and the vehicle body length;

[0026] Determine an initial observation height value and an initial observation radius value of the observation position according to the lowest bowl height in the model parameters, and adjust the initial observation height value and the initial observation radius value until the observation angle meets the requirements, thereby obtaining a target observation position;

[0027] The camera parameters of each camera are calculated according to the target observation position.

[0028] In one embodiment, the color space conversion of the initial image to obtain a channel-separated image to be processed includes:

[0029] The color space of each pixel in the initial image is converted in parallel to obtain a channel-separated image to be processed.

[0030] In a second aspect, the present application further provides a method for generating a surround view, the surround view generating method comprising:

[0031] Get the images collected by each camera;

[0032] The images collected by each camera are processed according to the target channel value and the surround view model to generate a surround view image, and the target channel value is calculated according to the above-mentioned channel value calculation method.

[0033] In one embodiment, the processing of the images collected by each camera according to the channel value and the surround view model to generate a surround view includes:

[0034] By means of parallel processing, each pixel in the image captured by each camera is processed according to the channel value and the surround view model to generate a surround view.

[0035] In one embodiment, the generating of the surround view by processing each pixel in the image captured by each camera according to the target channel value and the surround view model in a parallel processing manner includes:

[0036] Processing the images captured by each camera according to the camera parameters to obtain target pixel points in the surround view;

[0037] Convert each of the target pixels from the RGB space to the YUV space in parallel;

[0038] In parallel, adjusting the channel value of the target channel in the YUV space according to the target channel value;

[0039] Each pixel point in the YUV space is converted into the RGB space in parallel according to the adjusted channel value, and a surround view model is used to generate a surround view.

[0040] In one embodiment, the method further comprises:

[0041] receiving a channel parameter adjustment instruction, wherein the channel parameter adjustment instruction carries an adjustment coefficient;

[0042] The target channel value is adjusted according to the adjustment coefficient.

[0043] In a third aspect, the present application further provides a channel numerical calculation device, the channel numerical calculation device comprising:

[0044] A first drawing module is used to obtain images collected by each camera, extract a target common viewing area in the image, and obtain an initial image according to the target common viewing area;

[0045] A first conversion module, used for performing color space conversion on the initial image to obtain a channel-separated image to be processed;

[0046] A channel parameter adjustment value calculation module, used for calculating the channel parameter adjustment value of each camera according to the image to be processed;

[0047] The target exposure parameter calculation module is used to obtain the target channel value based on the channel parameter adjustment value and the original channel value of the image collected by each camera.

[0048] In a fourth aspect, the present application further provides a surround view generation device, the surround view generation device comprising:

[0049] An image acquisition module, used to obtain images collected by each camera;

[0050] The second drawing module is used to process the images collected by each camera to generate a surround view according to the target channel value and the surround view model, and the target channel value is calculated according to the channel value calculation device mentioned above.

[0051] In a fifth aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described in any one of the above embodiments when executing the computer program.

[0052] In a sixth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method described in any one of the above embodiments are implemented.

[0053] In a seventh aspect, the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the method described in any one of the above embodiments.

[0054] The above-mentioned exposure parameter calculation method, surround view generation method, device, equipment, and medium can select the target common view area to ensure that the same scene is extracted, and the channel parameter adjustment value is calculated according to the image to be processed, that is, the channel parameter adjustment value of each camera is calculated based on the same scene in the target common view area corresponding to the images collected by adjacent cameras, and the adjusted target channel values ​​corresponding to each adjacent camera are equal, so as to calculate the target channel value, so that there is no visual difference in the stitched surround view. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1 A diagram showing an application environment of a channel numerical calculation method in an embodiment;

[0056] Figure 2 A schematic diagram of a flow chart of a channel value calculation method in one embodiment;

[0057] Figure 3 is a schematic diagram of the positions of a camera and a reference object in one embodiment;

[0058] Figure 4 is a schematic diagram of a calibration cloth in one embodiment;

[0059] Figure 5 is a schematic diagram of an initial image in one embodiment;

[0060] Figure 6 for Figure 2 A schematic diagram of the flow of step S206 in the illustrated embodiment;

[0061] Figure 7 is a flowchart of a camera calibration process in one embodiment;

[0062] Figure 8 A surround view model based on a circular base or an elliptical base in one embodiment;

[0063] Fig. 9 is a schematic diagram of a perspective projection in one embodiment;

[0064] Fig.10 is a schematic diagram of an actual bowl model in one embodiment;

[0065] Fig.11 is a schematic diagram of a simplified model in one embodiment;

[0066] Fig.12 is a schematic diagram of a flow chart of a method for generating a ring view in one embodiment;

[0067] Fig.13 is a structural block diagram of a channel value calculation device in one embodiment;

[0068] Fig.14is a structural block diagram of a surround view generating device in one embodiment;

[0069] Fig.15 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0070] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0071] The channel value calculation method and the ring view generation method provided in the embodiments of the present application can be applied to Figure 1 In the application environment shown, the vehicle terminal 102 communicates with the camera 104. The data storage system can store data that the vehicle terminal 102 needs to process. The data storage system can be integrated on the vehicle terminal 102, or placed on the cloud or other network servers.

[0072] Among them, vehicles need to be calibrated before using the panoramic system. This is because the camera installation angle, position and the parameters of the camera itself cannot be completely consistent. These parameters need to be determined through the calibration process, and the surround view model is generated based on these parameters. Even for cars produced on the same assembly line in a car factory, their surround view systems need to be calibrated; in the later modification mode, the calibration process cannot be omitted. This application is an improvement on the calculation of channel values ​​during the calibration process.

[0073] Among them, the camera 104 collects images around the vehicle and sends the collected images to the vehicle terminal 102. The vehicle terminal 102 extracts the target common view area in each image and obtains the initial image according to the target common view area; and performs color space conversion on the initial image to obtain a channel-separated image to be processed; calculates the channel parameter adjustment value of each camera according to the image to be processed; and obtains the target channel value based on the channel parameter adjustment value and the original channel value of the image collected by each camera. In this way, the target common view area is selected to ensure that the same scene is extracted, and the channel parameter adjustment value is calculated according to the target common view area corresponding to the image collected by the adjacent cameras in the image to be processed, that is, the channel parameter adjustment value of each camera is calculated according to the same scene in the target common view area corresponding to the image collected by the adjacent cameras. The adjusted target channel values ​​corresponding to each adjacent camera are equal, so as to calculate the target channel value, thereby making the stitched surround view have no visual differences, and in the calculation process, only the target common view area in the image is extracted and the channel conversion is performed, which can reduce the calculation of the data volume and improve the calculation efficiency.

[0074] The vehicle terminal 102 may be, but is not limited to, various intelligent vehicle-mounted devices, etc. Preferably, the vehicle terminal 102 is a vehicle-mounted control device, specifically, it may refer to a hardware processor corresponding to the vehicle-mounted surround view system, wherein in order to improve processing efficiency, the hardware processor includes a CPU (Central Processing Unit, central processing unit, referred to as CPU) and a GPU (Graphics Processing Unit, also known as display core, visual processor, display chip or graphics chip, referred to as GPU), and the processing efficiency of the entire algorithm is improved through the cooperative processing of the CPU and GPU. The camera 104 may be a vehicle-mounted camera.

[0075] In one embodiment, Figure 2 As shown, a channel numerical calculation method is provided, which is applied to Figure 1 Taking the vehicle terminal 102 in the example as an example, the method includes the following steps:

[0076] S202: Acquire images collected by each camera, extract target common viewing areas in the images, and obtain an initial image according to the target common viewing areas.

[0077] Specifically, the camera refers to a vehicle-mounted camera installed around the vehicle, and the image is collected by the vehicle-mounted camera. The target common view area is a specific area set manually for calibrating the channel value, and the target common view area is arranged with a corresponding reference object. Optionally, the reference object has a single color to facilitate the adjustment of the channel parameters, for example, preferably, white or black, and other solid color reference objects can also be used in other embodiments, which are not specifically limited here.

[0078] Specifically, combined Figure 3 As shown, the specific positions of the vehicle-mounted cameras and the target common viewing areas are given. In other embodiments, the number and positions of the vehicle-mounted cameras, the number and positions of the target common viewing areas can be adjusted according to actual applications, and no specific restrictions are made here. Figure 3 Only a specific deployment method of one embodiment is given.

[0079] like Figure 3In the image captured by two adjacent cameras, there is a certain overlap area, and the target common viewing area is selected in the overlap area to deploy the corresponding reference object. Preferably, there is a large black block of a certain size, preferably one square meter, around the vehicle body as a reference for camera calibration. These four large black blocks must be completely captured by two adjacent cameras. After the calibration is completed, these four large black blocks are also the areas with the best stitching effect. Moreover, for normal driving, the possibility of interference objects above the ground appearing in these areas is also small, so this embodiment uses the large black block area of ​​the calibration cloth as the target common viewing area for camera brightness adjustment (the overall picture in the target common viewing area is used as a reference for channel value comparison).

[0080] In actual applications, the big black block can be deployed through calibration. The calibration cloth is actually two pieces of white cloth with black squares (one piece in front of the vehicle body and one piece behind the vehicle body). For common cars, the size is fixed (the size of the calibration cloth for large buses is different). During calibration, a calibration cloth will be placed in front of the vehicle body and another one at the back. The center line of the calibration cloth is aligned with the center axis of the vehicle body. The distance between the edge of the calibration cloth and the vehicle body is related to the camera installation height, angle and other factors. Generally, it is 30-60cm. For details, please refer to Figure 4 As shown, Figure 4 The calibration cloth in the embodiment is preferred. In other embodiments, the user can change it as needed. One thing to note is that if the angle between the central axis of the front camera and the horizontal plane is smaller, the calibration cloth will be farther away from the vehicle body because the ground cannot be photographed nearby. If the anti-collision beam blocks the view of the camera, the calibration cloth will also need to be moved away from the vehicle body.

[0081] Please continue to combine Figure 3 For the camera, four cameras are selected as an example for illustration in this embodiment, which are Figure 3 Cameras C1 to C4 in .

[0082] The initial image is generated according to the target common viewing area in the image collected by each camera, wherein the target common viewing area in the image collected by each camera can be arranged according to a certain rule, which can be specifically combined with Figure 5 As shown, Figure 5 Each target common viewing area Aij in , where i represents the camera and j represents the target common viewing area. It should be noted that, in other embodiments, the target common viewing areas may not be spliced, but only used as a single initial image, that is, Figure 5 There are 8 initial images included.

[0083] In one of the embodiments, the process of generating the initial image includes: the vehicle terminal obtains the images captured by each camera, extracts the target common view area of ​​the images captured by each camera, such as extracting according to pixel value information, etc., and adjusts the perspective of the target common view area according to the camera calibration parameters, for example, adjusting the target common view area to a corresponding perspective, such as a top-down perspective, so that multiple initial images are obtained. In one of the preferred embodiments, the vehicle terminal can also splice the target common view area after the perspective adjustment to obtain an initial image, and there is no specific restriction on splicing here.

[0084] S204: Performing color space conversion on the initial image to obtain a channel-separated image to be processed.

[0085] Specifically, the initial image is captured by a camera, which is generally an RGB image, and visual perception is generally the perception of brightness, saturation and contrast. Therefore, the RGB image needs to be converted into a color space to obtain the image to be processed under the corresponding channel. Preferably, the vehicle terminal converts at least one channel of the RGB image to obtain the corresponding image to be processed. For example, when the brightness difference between adjacent cameras needs to be adjusted, the RGB image can be converted only to a grayscale image of the brightness channel, and the grayscale image is the image to be processed; when the saturation difference or contrast difference between adjacent cameras needs to be adjusted, the saturation channel and the contrast channel can be adjusted accordingly, and no specific restrictions are made here.

[0086] For the convenience of explanation, the brightness channel is used as an example in this embodiment. The vehicle terminal converts the RGB image into a grayscale image, that is, converts the RGB format into the YUV format. In order to reduce the amount of processing, only the corresponding channel, that is, the brightness channel, is converted. The specific formula is as follows:

[0087] Y=R*0.299+G*0.587+B*0.104 (1)

[0088] S206: Calculate the channel parameter adjustment value of each camera according to the image to be processed.

[0089] Specifically, the channel parameter adjustment value is calculated under the premise of minimizing the brightness difference of the target common viewing area corresponding to the images captured by adjacent cameras.

[0090] Among them, the vehicle terminal can obtain the channel parameter equation according to the adjusted target channel value of the target common viewing area corresponding to the image captured by the adjacent cameras, and obtain the constraint equation according to the channel parameter constraint, and then obtain the equation group according to the channel parameter equation and the constraint equation, and solve the unknowns therein to obtain the channel parameter adjustment value.

[0091] The channel parameter equation can be obtained based on the equal adjusted target channel values ​​of the target common viewing areas corresponding to the images captured by adjacent cameras. For example, the average brightness of the target common viewing areas corresponding to the images captured by adjacent cameras is basically equal after adjustment. However, in practice, due to the different channel values ​​of each camera, the average brightness of the target common viewing areas corresponding to the images captured by adjacent cameras is not equal. Therefore, it is necessary to assume a channel parameter adjustment value to be calculated for each camera so that the adjusted average brightness of the target common viewing areas corresponding to the images captured by adjacent cameras is basically equal.

[0092] The constraint equation can be obtained based on the principle that the target channel values ​​in the target common view area remain unchanged overall after adjustment, that is, the sum of the brightness gains of all cameras is 0, that is, if some cameras are brightened, some cameras must be dimmed to ensure that the overall brightness remains basically unchanged.

[0093] In practical applications, the above equations may be solved by the least square method. In other embodiments, the equations may be solved by other methods.

[0094] S208: Obtaining target channel values ​​based on the channel parameter adjustment values ​​and original channel values ​​of the images collected by each camera.

[0095] Specifically, the original channel value of the image collected by each camera is the channel value of each pixel of the image collected by the camera, and the target channel value=original channel value+channel parameter adjustment value.

[0096] The vehicle terminal calculates the target channel value based on the original channel value of the image captured by the camera and the channel parameter adjustment value, so that when subsequently generating the surround view, it can be based on the target channel value to ensure that the generated surround view has no visual difference.

[0097] The above-mentioned channel value calculation method selects the target common view area to ensure that the same scene is extracted, and the channel parameter adjustment value is calculated according to the image to be processed, that is, the channel parameter adjustment value of each camera is calculated based on the same scene in the target common view area corresponding to the image captured by the adjacent cameras, and the adjusted target channel values ​​corresponding to each adjacent camera are equal, so as to calculate the target channel value, so that there is no visual difference in the spliced ​​ring view, and in the calculation process, only the target common view area in the image is extracted and the channel conversion is performed, which can reduce the calculation of data volume and improve calculation efficiency.

[0098] In one embodiment, see Figure 6 As shown, Figure 6 for Figure 2The flowchart of step S206 in the embodiment shown in the figure is described by taking the brightness channel as an example, but those skilled in the art should understand that it can also be a saturation channel and a contrast channel, and the processing steps are basically similar to those of the brightness channel, which will not be described in detail here. Step S206, i.e., calculating the channel parameter adjustment values ​​of each camera according to the image to be processed, includes:

[0099] S602: Determine a target channel value according to the current channel value of each target common viewing area in the image to be processed and the channel parameter adjustment value to be calculated.

[0100] Specifically, the current channel value is a channel parameter calculated based on the target common viewing area, such as the average brightness. For convenience, the current channel value of each target common viewing area is expressed as Indicated by, where c represents the camera, n represents the corresponding target common viewing area, and for convenience, the camera numbers start from the front camera and count clockwise. The channel parameter adjustment value to be calculated can be obtained by F c In this way, the target channel parameter of the target common viewing area 1 captured by camera 1 after adjustment is Similarly, the adjusted target channel parameters of the target common viewing area captured by each camera can be calculated.

[0101] S604: According to the fact that the target channel values ​​of adjacent cameras are substantially equal, a channel parameter equation is obtained.

[0102] Specifically, since the current channel values ​​of each camera are different, the current channel values ​​of the target common viewing area obtained by adjacent cameras when taking photos of the same target common viewing area are not equal. In theory, the adjusted channel parameters of adjacent cameras when taking photos of the same target common viewing area should be equal. Therefore, based on this condition, the channel parameter equation can be obtained, in which Figure 3 Taking the camera and target co-viewing area in as an example, the following channel parameter equation can be obtained:

[0103] (The average brightness of the second target common viewing area photographed by the first camera and the second target common viewing area photographed by the second camera are basically the same after adding the corresponding brightness gain)

[0104] (The average brightness of the third target common viewing area photographed by the second camera and the third target common viewing area photographed by the third camera are basically the same after adding the corresponding brightness gain)

[0105] (The average brightness of the fourth target common viewing area photographed by the third camera and the fourth target common viewing area photographed by the fourth camera are basically the same after adding the corresponding brightness gain)

[0106] (The average brightness of the first target common viewing area photographed by the fourth camera and the first target common viewing area photographed by the first camera are basically the same after adding the corresponding brightness gain)

[0107] S606: Obtain a constraint equation based on the fact that the cumulative sum of the target channel values ​​of each camera remains unchanged overall.

[0108] Specifically, since D'=D+F is needed to adjust the brightness, but the overall brightness does not want to change, the sum of the channel parameter adjustment values ​​F of each camera is equal to 0, that is, if one camera is brightened, then another camera must be dimmed to ensure that the overall brightness remains basically unchanged. Figure 3 Taking the camera and target co-viewing area in as an example, the following constraint equation can be obtained:

[0109] F1+F2+F3+F4=0

[0110] S608: Obtain a target equation group according to the channel parameter equation and the constraint equation.

[0111] S610: Solve the target equation group to obtain the channel parameter adjustment value of each camera.

[0112] Specifically, the target equations can be:

[0113]

[0114] Among them, the vehicle terminal can solve the above equations by the least squares method to obtain each gain F c .

[0115] In order to facilitate calculation in practical applications, the above equations can be rewritten as:

[0116]

[0117] There are 4 unknowns and 5 equations, so we cannot get a unique solution. We can only get a solution with the minimum error. Therefore, the vehicle terminal can obtain the solution with the minimum error through the least square method. Substituting the two matrices M and b into the following formula (3), we can solve a matrix [F1, F2, F3, F4], which is the F1-F4 we want to calculate. This F1-F4 is the F in I'=I+F, which is the brightness increase value. So let

[0118]

[0119]

[0120] The vehicle terminal then uses the least squares method to calculate the following overdetermined equation to obtain the gain F corresponding to each camera c , which is the channel parameter adjustment value to be calculated:

[0121] F=(M T M) -1 M T b (3)

[0122] In the above embodiment, a complete calculation method for the channel parameter adjustment value to be calculated is provided, and the channel parameter adjustment value to be calculated is obtained by solving the equation with the minimum error.

[0123] In one embodiment, a target channel value is obtained based on the channel parameter adjustment value and the original channel value of the image captured by each camera, including: calculating an intermediate channel value based on the channel parameter adjustment value and the original channel value of the original image captured by each camera; and mapping the intermediate channel value to a reasonable value range to obtain the target channel value.

[0124] Among them, the middle channel value is the middle value of the channel parameters of the pixel points in each target common viewing area calculated, I'=I+F, but because the existence of F will cause its value to exceed [0,1], so the brightness must be remapped to the range of [0,1].

[0125] Specifically, in general, for a well-exposed photo (each camera will calculate the channel value according to this standard), the brightness of the darkest part is 0 and the brightness of the brightest part is 255. Therefore, it is normalized to [0,1]. After the brightness adjustment of I'=I+F, the brightest part of the entire picture must be >1 and the darkest part <0, which exceeds the range represented by the system. Therefore, the smoothstep function in OGL is used to compress the overall brightness back to the [0,1] range without losing too much detail. The R, G, and B value ranges in formula 1 are all [0,1], and the calculated maximum value of Y is also 1, which will not exceed 1.

[0126] rl=min(F1:F4)

[0127] rh=max(F1:F4)+1

[0128] I'=(I+Fc-rl) / (rh–rl) (3)

[0129] In the above embodiment, the calculated intermediate channel values ​​are mapped to the target interval so that no details are lost.

[0130] In one of the embodiments, the method also includes: calibrating each camera to obtain camera parameters; extracting the target common view area in the image, and obtaining an initial image based on the target common view area, including: extracting the target common view area in the individual images, and processing the reference target common view area according to the camera parameters to obtain the initial image.

[0131] The camera parameters need to be calibrated in advance, including but not limited to the position of the camera, the height of the camera, the installation angle of the camera, etc. According to the camera parameters, a surround view can be generated based on the images collected by each camera. The camera parameters are also the basis for obtaining the initial image of the target common viewing area, that is, the images collected by each camera are converted to the same perspective, such as a bird's-eye view, to ensure the premise of stitching, so that they are comparable.

[0132] In one embodiment, see Figure 7 As shown, Figure 7 The present invention is a flowchart of a camera calibration process in an embodiment. In this embodiment, each camera is calibrated to obtain camera parameters, including: calculating the camera position of each camera according to the external parameters of each camera; calculating the vehicle body length, vehicle width and camera height based on the camera position; calculating the model parameters of the surround model according to the vehicle width and body length; determining the initial observation height value and the initial observation radius value of the observation position according to the lowest bowl height in the model parameters, and adjusting the initial observation height value and the initial observation radius value until the observation angle meets the requirements, and obtaining the target observation position; and calculating the camera parameters of each camera according to the target observation position.

[0133] Among them, the surround view model is needed when generating the surround view. The surround view model is a bowl-shaped surface with a virtual car body in the center of the bowl. The surround view model generation module will generate this bowl-shaped surface based on the parameters obtained during the calibration process and some proprietary algorithms. When the surround view system is running, the image captured by the camera will be pasted onto the bowl-shaped surface through OpenGL. The image seen by the surround view system is the view from the virtual car body looking outwards at the surrounding scene of the car body mapped on the bowl-shaped surface.

[0134] In this embodiment, a 3D bowl model is first constructed based on a 3D bowl model with a round bottom or an elliptical bottom. For details, see Figure 8 As shown, Figure 8 A surround view model based on a circular base or an elliptical base in one embodiment.

[0135] The center point of the bottom plane of the vehicle is located at (0,0,0) coordinates, and the length of the vehicle is parallel to the y-axis, the width of the vehicle is parallel to the x-axis, and the height of the vehicle is parallel to the z-axis. The bottom plane of the bowl model is located in the xoy plane, and the center of the circle is located at the origin. When the surround model selects a 3D bowl model with a round bottom, its mathematical expression is:

[0136]

[0137] Among them, minR is the radius of the bowl bottom circle.

[0138] When the surround model selects a 3D bowl model with an elliptical bottom, its mathematical expression is:

[0139]

[0140] in, Among them, a is the major semi-axis of the ellipse, and b is the minor semi-axis of the ellipse.

[0141] After the 3D bowl model is built, the viewing angle is calculated, and the perspective projection is used for the whole view. Fig. 9 As shown: the eye position moves on a circle with a radius of eyeR, parallel to the xy plane z=eyeH, with the center of the circle being (0, 0, eyeH), and the corresponding target position is a circle with a radius of targetR located in the xy plane, with the center being (0, 0, 0); the line connecting the eye position and the corresponding target position intersects with the z-axis.

[0142] The terminal calculates the vehicle width based on the camera external parameters with carW, the vehicle length with carL, the vehicle height with carH, and the average height of the camera with cameraH. The height of the lowest point on the upper edge of the bowl model is mMinHeight, and its corresponding three-dimensional coordinate point is recorded as mMinHeightP. The FOV value of the target perspective is targetFov. The radius of the bowl bottom is recorded as bowlR. The height of the eye is recorded as eyeH, and the distance between the projection of the eye on the xoy plane and the origin is recorded as eyeR. The specific calculation method is combined with Figure 7 As shown, the coordinate position of the camera is first calculated based on the external parameters of the camera, where the rotation vector is rcw, the translation vector is tcw, cv::Roclrigues(-rcw, R), and the three-dimensional coordinate vector P = -R·tcw.

[0143] Among them, Figure 3 Take the four cameras in as an example, where the front camera is denoted as P1, the left camera is denoted as P2, the right camera is denoted as P3, and the rear camera is denoted as P4, then the following relationship exists:

[0144] Car length carL = P1y - P4y

[0145] Car width carW = P3x-P2x

[0146] Camera height cameraH = (P1z + P2z + P3z + P4z) / 4

[0147] The vehicle height carH = carW × 1459 / 1901 (where the two constants are the width-to-height ratio of the vehicle model, and other values can be selected in other embodiments).

[0148] Calculate the minor semi-axis of the ellipse or the radius of the circle. Among them, the radius of the circular bottom bowlR = 2 × carW, the minor semi-axis of the elliptical bottom b = 1.8carW, the major semi-axis a = 1.8 × carL, and bowlR = b (these constants are adjusted according to the final display effect).

[0149] Specifically, in combination with Fig.10 As shown, where the actual bowl model projected by the camera is as Fig.10 shown. There are height fluctuations at the edge of the bowl mouth (determined by the visible viewing angle range of the camera), and the three-dimensional coordinates of the bowl mouth are all mapped from the upper edge of the camera photo. Therefore, during the mapping process, record the three-dimensional coordinate values of each mapped point, and the minimum z value is the mMinHeight to be obtained, and the corresponding point is recorded as the lowest point mMinHeightP of the bowl mouth.

[0150] The positions of the eyes, the target position, and the 2D simplified models of the vehicle and the bowl model are as Fig.11 shown. According to the relationship between the height of the bowl model and the vehicle height, it is divided into two cases: the bowl model is lower than the vehicle height, and the bowl model is higher than the vehicle height. Based on reducing the three-dimensional model to two dimensions, establish a simple mathematical model, and then推算 the optimal eye position and target position. The basic principle is to move the radius targetR of the target point from the origin to the left, and the maximum movement distance does not exceed bowlR / 3. The eye position radius eyeR moves from the initial value to the right, and the maximum movement distance does not exceed bowlR / 2 (that is, it cannot exceed the left boundary of the vehicle). When the angle between vector a and vector b is exactly half of the target targetFov (the angle between vector c and vector b is targetFov), then the optimal viewing point is found. Among them, vector a refers to the vector from the eye position to the target position, vector b refers to the vector from the eye position to the lowest point position, and vector c refers to the vector from the eye position to the left half-axis position of the bowl bottom edge on the x-axis.

[0151] Among them, for the convenience of understanding, the calculation process is described in two cases. One is that the bowl model is lower than the vehicle height. First, introduce the variable k, where k < hSteps, and minBowlH = mMinHeight + stepH × k. Increase the value of the variable i in sequence, and calculate tEyeR = eyeR - (bowlR / 2 / steps) * i. Increase the value of the variable j in sequence, and calculate tTargetR = (bowlR / 3 / steps) * j. If the angle between vector a and b is half of the targetFov, determine the optimal viewing angle.

[0152] Another case is when the bowl model is higher than the vehicle height. First, introduce a variable k, where k < hSteps, and eyeH = eyeHBase * (1.0 + k * 0.05). Increase the value of variable i in sequence, and calculate tEyeR = eyeR - (bowlR / 2 / steps) * i. Increase the value of variable j in sequence, and calculate tTargetR = (bowlR / 3 / steps) * j. When the included angle between vectors a and b is half of targetFov, determine the best viewing angle.

[0153] Among them, for the top-down view, orthographic projection is adopted, and the eye position is (0, 0, eyeZ), where eyeZ = carH * 2 (2 is adjusted according to the viewing angle effect and is other values in other embodiments). The target position is (0, 0, 0), the half-width a of the viewing range in the x direction = carW × 2.5 / 2, and the half-width b in the y direction = a × ratio, where ratio is the aspect ratio of the display window.

[0154] Among them, for the other 9 viewing angles, perspective projection is adopted, and the constants without special instructions are coefficients adjusted according to the visual effect:

[0155] The parameters of the left front view are as follows: double lf_eye_x = carW / 2 × 1.2 × (-1) (dividing by 2 represents the coordinate of the left boundary of the vehicle. Since the vehicle center is at the origin, multiplying by 1.2 represents a coefficient for the eye position to be to the left of the left boundary of the vehicle, and multiplying by -1 represents that the coordinate point is on the negative half-axis);

[0156] double lf_eye_y = carL / 5 × (-1);

[0157] double lf_eye_z = cameraH × 2.5;

[0158] double f_target_x = lf_eye_x

[0159] double lf_target_y = carL × 5 / 7;

[0160] double f_target_z = 0

[0161] double fov = 45.

[0162] The calculation of the parameters of the right front view is as follows:

[0163] double rf_eye_x = lf_eye_x × (-1);

[0164] double rf_eye_y = lf_eye_y;

[0165] double rf_eye_z = lf_eye_z;

[0166] double rf_target_x = rf_eye_x;

[0167] double rf_target_y = lf_target_y;

[0168] double rf_target_z = 0;

[0169] double fov = 45.

[0170] The left rear view parameters are calculated as follows:

[0171] double lb_eye_x = lf_eye_x;

[0172] double lb_eye_y = lf_eye_y * (-1);

[0173] double lb_eye_z = lf_eye_z;

[0174] double lb_target_x = lb_eye_x;

[0175] double lb_target_y = lf_target_y * (-1);

[0176] double lb_target_y = 0;

[0177] double fov = 45.

[0178] The right rear view parameters are calculated as follows:

[0179] double rb_eye_x = lb_eye_x * (-1);

[0180] double rb_eye_y = lb_eye_y;

[0181] double rb_eye_z = lb_eye_z;

[0182] double rb_target_x = rb_eye_x;

[0183] double rb_target_y = lb_target_y;

[0184] double rb_target_z = 0;

[0185] double fov=45.

[0186] The following four views, front view, back view, left view and right view, all adopt the perspective of looking vertically downward from the eye position parallel to the z axis, so only the eye position needs to be listed, the x and y of the target are the same as eye, and z = 0;

[0187] The forward-looking parameters are calculated as follows:

[0188] double f_x = 0;

[0189] double f_y = (carL / 2) × 1.2; (dividing by 2 means half the length of the vehicle, and multiplying by 1.2 means a coefficient slightly larger than half the coordinate value of the vehicle, which is adjusted by the final visual effect)

[0190] double f_z=carW / tan(targetFov / 2).

[0191] The backsight parameters are calculated as follows:

[0192] double b_x = 0;

[0193] double b_y=-f_y;

[0194] double b_z=f_h.

[0195] The left view parameters are calculated as follows:

[0196] double l_x = -carW;

[0197] double l_y = 0;

[0198] double l_z=carW / tan(targetFov / 2).

[0199] The right view parameters are calculated as follows:

[0200] double r_x=-l_x;

[0201] double r_y = 0;

[0202] double r_z=l_h.

[0203] The rearview mirror parameters are calculated as follows:

[0204] double rear_eye_x = 0;

[0205] double rear_eye_y=carL / 4×(-1);

[0206] double rear_eye_z=cameraH×2.3;

[0207] double rear_target_x = 0;

[0208] double rear_target_y=carL×(-0.9);

[0209] double rear_target_z=0.

[0210] The automatic calculation of the viewing angle in the above embodiment can not only improve the efficiency of manually adjusting the viewing angle, but also automatically adapt to the viewing angles of different vehicles in actual installation, giving the driver the maximum effective viewing angle.

[0211] In one embodiment, performing color space conversion on the initial image to obtain the channel-separated image to be processed includes: performing color space conversion on each pixel in the initial image in parallel to obtain the channel-separated image to be processed.

[0212] Among them, the color space conversion needs to be calculated pixel by pixel, which has a great impact on the overall efficiency, especially when the output resolution is high. Therefore, in order to improve the efficiency, each pixel in the initial image is processed in parallel. In a preferred embodiment, the calculation can be performed by hardware acceleration, such as by GPU, because there are many computing units in the GPU, and the value of each pixel can be calculated in parallel. The GPU3D calculation and drawing interfaces include D3D, OpenGL, OpenGL ES, and OpenCL. In this embodiment, OpenGL / OES is used to illustrate the use of GPU hardware acceleration as an example.

[0213] Before using the vehicle-mounted surround view system, there is usually a "calibration" process to obtain the camera position, angle, and lens parameters, and generate a surround view model based on the obtained parameters. When the vehicle-mounted surround view system is used, the camera image is obtained, and then the stitched surround view is drawn based on the surround view model.

[0214] Among them, when performing color space conversion, the terminal uses OpenGL / OES drawing model M2 to generate a low-resolution Y grayscale image, and the GLSL script converts the RGB format to the Y format. This step is accelerated by the GPU.

[0215] For the entire calculation process of the channel parameter adjustment value, the CPU can be used for calculation, for example, the CPU can be used to calculate the average brightness of the Y grayscale image in blocks. (This step can be accelerated by GPU hardware using OpenCL, but due to the low resolution of the Y grayscale image, the acceleration effect is limited, but the complexity will increase a lot, and there will be additional overhead). Use the CPU to solve the equation group and obtain F1-F4, rl, and rh.

[0216] In the above embodiments, the processing efficiency is improved by means of parallel computing.

[0217] In one embodiment, Fig.12 As shown, a ring view generation method is provided, and the method is applied to Figure 1 The vehicle terminal in the example is used as an example to illustrate, including the following steps:

[0218] S1202: Acquire images collected by each camera.

[0219] S1204: Processing the images collected by each camera according to the target channel value and the surround view model to generate a surround view image, wherein the target channel value is calculated according to the channel value calculation method in any one of the above embodiments.

[0220] Specifically, the calculation of the target channel value can be referred to above, that is, the initial image of the target common view area in the above text, that is, the model M2 in the above text, the visible area of ​​the model M2 is small and the accuracy is low. In this embodiment, the model M1 of the normal surround view is drawn, that is, the surround view.

[0221] In the above embodiment, the target channel value is calculated so that there is no visual difference in the spliced ​​ring view, and during the calculation process, only the target common view area in the image is extracted and the color space is converted, which can reduce the calculation of data volume and improve calculation efficiency.

[0222] In one embodiment, the images captured by each camera are processed according to the target channel value and the surround view model to generate a surround view, including: by parallel processing, each pixel in the image captured by each camera is processed according to the target channel value and the surround view model to generate a surround view.

[0223] Among them, the adjustment of the channel values ​​in the ring view needs to be calculated pixel by pixel, which has a great impact on the overall efficiency, especially when the output resolution is high. Therefore, in order to improve efficiency, each pixel in the image captured by each camera is processed in parallel according to the target channel value to generate a ring view.

[0224] Specifically, the vehicle terminal uses OpenGL / OES to draw the model M1, and inputs the F1-F4, rl, and Rh parameters. The GLSL script completes the RGB to YUV conversion, and the channel value adjustment is completed by the GLSL built-in y=smoothstep(rl, rh, y+Fc) function to further utilize the GPU's hardware acceleration capabilities and YUV to RGB conversion.

[0225] In one of the embodiments, each pixel in the image captured by each camera is processed according to the target channel value and the surround view model in a parallel processing manner to generate a surround view, including: processing the image captured by each camera according to the camera parameters to obtain the target pixel points in the surround view; converting each target pixel point from the RGB space to the YUV space in parallel; adjusting the channel value of the target channel in the YUV space in parallel according to the target channel value; converting each pixel point in the YUV space to the RGB space in parallel according to the adjusted channel value, and generating the surround view using the surround view model.

[0226] Among them, the terminal converts each target pixel from RGB space to YUV space in parallel, which can be calculated by the following formula:

[0227]

[0228] The terminal converts each pixel in the YUV space to the RGB space in parallel according to the adjusted channel values, which can be calculated by the following formula:

[0229]

[0230] Specifically, see Fig.12 As shown, the pixel points are first converted from RGB space to YUV space, and then the corresponding channel values ​​are adjusted, such as adjusting the parameter value of the brightness channel, which is specifically completed by the GLSL built-in y=smoothstep(rl, rh, y+Fc) function, and finally the pixel points are converted from YUV space to RGB space.

[0231] In the above embodiment, the problem of changes in brightness, contrast and / or saturation of the vehicle surround view stitching area caused by inconsistent camera channel values ​​is basically eliminated, bringing a more realistic experience. The black square area is used to calculate the channel parameter adjustment value. One point that needs to be explained is that when the brightness is actually adjusted, the entire photo taken by the camera is processed. Therefore, the brightness of the entire photo is adjusted, not just the area where the black block is located.

[0232] In addition, in this embodiment, GPU hardware can be used to accelerate the uniform light processing process, reducing the impact on the operating speed of the vehicle-mounted surround view system.

[0233] In one of the embodiments, the method further includes: receiving a channel value adjustment instruction, the channel value adjustment instruction carrying an adjustment coefficient; and adjusting the target channel value according to the adjustment coefficient.

[0234] Specifically, in this embodiment, the entire surround view is processed, including overall adjustment of brightness, saturation, and contrast.

[0235] In practical applications, I'=I×F is used to adjust the brightness, where F is the brightness adjustment coefficient; U'=U×Contrast is used to adjust the contrast, where Contrast is the contrast adjustment coefficient; and V'=V×saturation is used to adjust the saturation, where saturation is the saturation adjustment coefficient.

[0236] In the above embodiment, not only the channel values ​​of different cameras are adjusted, but also the overall parameters of the surround view can be adjusted.

[0237] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0238] Based on the same inventive concept, the embodiment of the present application also provides a channel numerical calculation device and a ring view generation device for implementing the channel numerical calculation method and the ring view generation method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more channel numerical calculation devices and the ring view generation device embodiments provided below can refer to the limitations of the channel numerical calculation method and the ring view generation method above, and will not be repeated here.

[0239] In one embodiment, Fig.13 As shown, a channel value calculation device is provided, including: a first drawing module 1301, a first conversion module 1302, a channel parameter adjustment value calculation module 1303 and a target channel value calculation module 1304, wherein:

[0240] The first drawing module 1301 is used to obtain images collected by various cameras, extract target common viewing areas in the images, and obtain an initial image according to the target common viewing areas.

[0241] The first conversion module 1302 is used to perform color space conversion on the initial image to obtain a channel-separated image to be processed.

[0242] The channel parameter adjustment value calculation module 1303 is used to calculate the channel parameter adjustment value of each camera according to the image to be processed.

[0243] The target channel value calculation module 1304 is used to obtain the target channel value based on the channel parameter adjustment value and the original channel value of the image collected by each camera.

[0244] In one embodiment, the adjustment value calculation module 1303 may include:

[0245] The target channel parameter calculation unit is used to determine the target channel value according to the current channel value of each target common viewing area in the image to be processed and the channel parameter adjustment value to be calculated.

[0246] The first equation generating unit is used to obtain a channel parameter equation according to that target channel values ​​of adjacent cameras are substantially equal.

[0247] The second equation generating unit is used to obtain the constraint equation according to the cumulative sum of the target channel values ​​of each camera which is generally unchanged.

[0248] The equation group generating unit is used to obtain the target equation group according to the channel parameter equation and the constraint equation.

[0249] The channel parameter adjustment value calculation unit is used to solve the target equation group to obtain the channel parameter adjustment value of each camera.

[0250] In one embodiment, the target channel value calculation module 1304 includes:

[0251] The intermediate value calculation unit is used to calculate the intermediate channel value based on the channel parameter adjustment value and the original channel value of the original image collected by each camera.

[0252] The mapping unit is used to map the intermediate channel value to a reasonable value interval to obtain the target channel value.

[0253] In one embodiment, the channel value calculation device further includes:

[0254] A calibration module, used to calibrate each camera to obtain camera parameters;

[0255] The above-mentioned first drawing module 1301 is also used to extract the target common view area in the personal image, and process the reference target common view area according to the camera parameters to obtain the initial image.

[0256] In one embodiment, the calibration module may include:

[0257] A camera position calculation unit, used to calculate the camera position of each camera according to the external parameters of each camera;

[0258] A vehicle parameter calculation unit, used to calculate the vehicle body length, vehicle width and camera height based on the camera position;

[0259] A model parameter calculation unit, used for calculating model parameters of a surround view model according to a vehicle width and a vehicle body length;

[0260] A target observation position calculation unit is used to determine an initial observation height value and an initial observation radius value of the observation position according to the lowest bowl height in the model parameters, and adjust the initial observation height value and the initial observation radius value until the observation angle meets the requirements, thereby obtaining the target observation position;

[0261] The camera parameter calculation unit is used to calculate the camera parameters of each camera according to the target observation position.

[0262] In one embodiment, the first conversion module 1302 is further used to perform color space conversion on each pixel in the initial image in parallel to obtain a channel-separated image to be processed.

[0263] In one embodiment, Fig.14 As shown, a surround view generation device is provided, including: an image acquisition module 1401 and a second drawing module 1402, wherein:

[0264] An image acquisition module 1401 is used to acquire images acquired by each camera;

[0265] The second drawing module 1402 is used to process the images collected by each camera according to the target channel value and the surround view model to generate a surround view image, and the target channel value is calculated by the channel value calculation device in any one of the above embodiments.

[0266] In one embodiment, the second drawing module 1402 is further configured to generate a surround view by processing each pixel in the image captured by each camera according to the target channel value and the surround view model in a parallel processing manner.

[0267] In one embodiment, the second drawing module 1402 may include:

[0268] A target pixel point acquisition unit is used to process the images collected by each camera according to the camera parameters to obtain the target pixel points in the surround view;

[0269] A first conversion unit, used for converting each target pixel point from the RGB space to the YUV space in parallel;

[0270] An adjustment unit, used for adjusting the channel value of the target channel in the YUV space in parallel according to the target channel value;

[0271] The second conversion unit is used to convert each pixel point in the YUV space into the RGB space in parallel according to the adjusted channel value, and generate a surround view using the surround view model.

[0272] In one embodiment, the surround view generating device further includes:

[0273] A receiving module, used for receiving a channel value adjustment instruction, wherein the channel value adjustment instruction carries an adjustment coefficient;

[0274] The adjustment module is used to adjust the target channel value according to the adjustment coefficient.

[0275] Each module in the above-mentioned channel numerical calculation device and the ring view generation device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0276] In one embodiment, a computer device is provided. The computer device may be a terminal, such as a vehicle terminal, and its internal structure diagram may be as shown in FIG. Fig.15As shown. The computer device includes a processor, a memory, a communication interface, a display screen, an input device and a camera connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a channel numerical calculation method and a ring view generation method are implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc. The camera can be an ordinary camera or a car camera.

[0277] Those skilled in the art will understand that Fig.15 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0278] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0279] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0280] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above-mentioned method embodiments when executed by a processor. A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to a memory, a database or other medium used in the embodiments provided in this application may include at least one of a non-volatile and a volatile memory. Non-volatile memory may include a read-only memory (ROM), a magnetic tape, a floppy disk, a flash memory, an optical memory, a high-density embedded non-volatile memory, a resistive random access memory (ReRAM), a magnetic random access memory (MRAM), a ferroelectric random access memory (FRAM), a phase change memory (PCM), a graphene memory, etc. Volatile memory may include a random access memory (RAM) or an external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited thereto.

[0281] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0282] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A channel numerical calculation method, characterized in that: The channel value calculation method comprises: Acquire images captured by each camera, extract target common viewing areas in the images, and obtain an initial image based on the target common viewing areas; Performing color space conversion on the initial image to obtain a channel-separated image to be processed; Calculating channel parameter adjustment values ​​of each of the cameras according to the image to be processed; Obtaining a target channel value based on the channel parameter adjustment value and the original channel value of the image collected by each of the cameras; Calibrate each of the cameras to obtain camera parameters; The extracting the target common view area in the image and obtaining the initial image according to the target common view area includes: The target common viewing area in each of the images is extracted, and the target common viewing area is processed according to the camera parameters to obtain an initial image.

2. The channel numerical calculation method according to claim 1, characterized in that: The step of calculating the channel parameter adjustment value of each camera according to the image to be processed includes: Determining a target channel value according to current channel values ​​of each target common viewing area in the image to be processed and a channel parameter adjustment value to be calculated; According to the equal values ​​of the target channels of the adjacent cameras, a channel parameter equation is obtained; According to the fact that the cumulative sum of the target channel values ​​of each camera remains unchanged overall, a constraint equation is obtained; Obtaining a target equation group according to the channel parameter equation and the constraint equation; The target equation group is solved to obtain the channel parameter adjustment values ​​of each camera.

3. The channel numerical calculation method according to claim 1, characterized in that: The obtaining of the target channel value based on the channel parameter adjustment value and the original channel value of the image collected by each camera includes: An intermediate channel value is calculated based on the channel parameter adjustment value and the original channel value of the image collected by each of the cameras; The intermediate channel value is mapped to a reasonable value interval to obtain the target channel value.

4. The channel numerical calculation method according to claim 1, characterized in that: The calibrating each of the cameras to obtain camera parameters includes: The camera position of each camera is obtained by calculating the external parameters of each camera; Calculate the vehicle body length, vehicle width and camera height based on the camera position; Calculating model parameters of a surround view model according to the vehicle width and the vehicle body length; Determine an initial observation height value and an initial observation radius value of the observation position according to the lowest bowl height in the model parameters, and adjust the initial observation height value and the initial observation radius value until the observation angle meets the requirements, thereby obtaining a target observation position; The camera parameters of each camera are calculated according to the target observation position.

5. The channel numerical calculation method according to any one of claims 1 to 4, characterized in that: The step of converting the initial image into a color space to obtain a channel-separated image to be processed includes: The color space of each pixel in the initial image is converted in parallel to obtain a channel-separated image to be processed.

6. A method for generating a ring view, characterized in that: The ring view generation method comprises: Get the images collected by each camera; The images captured by each of the cameras are processed according to the target channel value and the surround view model to generate a surround view image, wherein the target channel value is calculated by the channel value calculation method according to any one of claims 1 to 5.

7. The method for generating a ring view according to claim 6, characterized in that: The step of processing the images collected by each camera according to the target channel value and the surround view model to generate a surround view comprises: By means of parallel processing, each pixel in the image captured by each camera is processed according to the channel value and the surround view model to generate a surround view.

8. The method for generating a ring view according to claim 7, characterized in that: The method of processing each pixel in the image collected by each camera according to the target channel value and the surround view model in a parallel processing manner to generate a surround view includes: Processing the images captured by each camera according to the camera parameters to obtain target pixel points in the surround view; Convert each of the target pixels from the RGB space to the YUV space in parallel; In parallel, adjusting the channel value of the target channel in the YUV space according to the target channel value; Each pixel point in the YUV space is converted into the RGB space in parallel according to the adjusted channel value, and a surround view model is used to generate a surround view.

9. The method for generating a ring view according to claim 6, characterized in that: The method further comprises: receiving a channel parameter adjustment instruction, wherein the channel parameter adjustment instruction carries an adjustment coefficient; The target channel value is adjusted according to the adjustment coefficient.

10. A channel numerical calculation device, characterized in that: The channel numerical calculation device comprises: A first drawing module is used to obtain images collected by each camera, extract a target common viewing area in the image, and obtain an initial image according to the target common viewing area; A first conversion module, used for performing color space conversion on the initial image to obtain a channel-separated image to be processed; A channel parameter adjustment value calculation module, used for calculating the channel parameter adjustment value of each camera according to the image to be processed; A target exposure parameter calculation module, used to obtain a target channel value based on the channel parameter adjustment value and the original channel value of the image collected by each camera; A calibration module, used for calibrating each of the cameras to obtain camera parameters; The first drawing module is further used to extract a target common viewing area in each of the images, and process the target common viewing area according to the camera parameters to obtain an initial image.

11. A device for generating a surround view, characterized in that: The surround view generating device comprises: An image acquisition module, used to obtain images collected by each camera; The second drawing module is used to process the images collected by each camera to generate a surround view according to the target channel value and the surround view model, and the target channel value is calculated by the channel value calculation device according to claim 10.

12. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 or 6 to 9 are implemented.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 or 6 to 9 are implemented.

14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 or 6 to 9 are implemented.