Local image brightness adjusting method
By adjusting the brightness of local images in real time in the panoramic imaging system, the problem of darkening of panoramic stitched video images in low-light environments is solved, the brightness of local areas is enhanced, and the driver's safety perception and driving safety are improved.
Patent Information
- Application Number
- CN202510841551.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2025-09-05
AI Technical Summary
In a panoramic imaging system, when the rear-view camera is in a low-light environment, the rear area in the panoramic stitched video is significantly darkened, resulting in blurred obstacle outlines and difficult-to-identify parking space lines, affecting the driver's effective perception of the environment behind the vehicle. Manually adjusting the screen brightness also causes an imbalance in the brightness of the picture, causing eye fatigue and threatening driving safety.
By collecting images in real time, using shaders and samplers to adjust the RGB parameters or RGBA values of the local area on the graphics processor, multiplying them by the brightness factor, and combining the user's interactive touch operation to adjust the local brightness in real time, the brightness of the local area can be enhanced.
In low-light environments, users can interactively enhance the brightness of the corresponding area of the rear surround view in the panoramic stitched video to improve driving safety without affecting the real-time and robustness of the algorithm.
Smart Images

Figure CN120602787A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of smart cars, and in particular to a method for adjusting the brightness of a local image. Background Art
[0002] In practical applications, panoramic imaging systems face the technical pain point of uneven local illumination. When the rear-view camera is in low-light conditions, the rear area in the panoramic stitched video becomes significantly darker, blurring the outlines of obstacles and making it difficult to discern parking spaces, severely impacting the driver's ability to effectively perceive the environment behind the vehicle. In stark contrast, images captured by cameras in other high-light areas retain a high brightness after stitching.
[0003] The current solution is to manually adjust the screen brightness to enhance the overall brightness of the image. However, this method can exacerbate the imbalance between bright and dark areas, causing overexposure in areas with high brightness. This not only causes a loss of image detail, but also causes visual stimulation to the driver due to the strong contrast between light and dark, leading to eye fatigue and potentially posing a threat to driving safety. Summary of the Invention
[0004] The present application provides a method for adjusting the brightness of a local image.
[0005] In a first aspect, the present application provides a method for adjusting the brightness of a local image. The method comprises: capturing a first image, the first image being captured in real time by a vehicle camera; adjusting the brightness of a target area in the first image to obtain a second image, and displaying the second image on the vehicle's display device. Using the method provided in the first aspect, a user can interactively enhance the brightness of a localized area in a panoramic stitched video when the lighting is low, such as in a rearview camera, thereby improving driving safety.
[0006] In a possible design, adjusting the brightness of the target area in the first image includes: adjusting rendering parameters of the target area in the first image.
[0007] In a possible design, adjusting the rendering parameters of the target area in the first image includes: adjusting the RGB parameters or RGBA values of the target area in the first image; the RGB parameters or RGBA values are set by a shader.
[0008] In one possible design, the RGB parameters of the target area in the first image are adjusted, specifically including: setting texture coordinates for the target area in the first image; associating a sampler with the target area through the texture coordinates; and obtaining the target area through the sampler by a shader, and multiplying the RGB parameters of the target area by a brightness factor.
[0009] In one possible design, the brightness factor has an initial value of 1 and a range of 0-10.
[0010] In a possible design, adjusting the brightness of the target area in the first image further includes: collecting a touch signal, where the display device of the vehicle is configured with a touch screen; and adjusting the brightness of the target area according to the touch signal.
[0011] In one possible design, adjusting the brightness of the target area according to the touch signal includes: determining the texture coordinates of the target area according to the touch signal; the touch signal includes a touch trajectory, and determining whether the brightness of the target area increases or decreases according to the direction of the touch trajectory; and determining the amplitude of the increase or decrease in the brightness of the target area according to the amplitude of the touch trajectory.
[0012] In a second aspect, the present application provides an electronic device, comprising: a memory for storing executable code; and a processor for executing the executable code to implement the above method.
[0013] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the above method.
[0014] In a fourth aspect, the present application provides a computer program comprising instructions, which implement the above method when the instructions are executed.
[0015] In a fifth aspect, the present application provides a vehicle comprising the above-mentioned electronic device.
[0016] Based on the area adjusted by the user, the brightness of the local area of the panoramic stitching video can be interactively enhanced to improve driving safety without affecting the real-time and robustness of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A flow chart of a method for adjusting the brightness of a local image provided in an embodiment of the present application
[0018] Figure 2 A flow chart of a panoramic video stitching display method provided in an embodiment of the present application
[0019] Figure 3 A flow chart of an interactive local brightness factor adjustment method provided in an embodiment of the present application DETAILED DESCRIPTION
[0020] In order to make the purpose, technical solutions and advantages of this application clearer, this application will be further described in detail below with reference to the accompanying drawings.
[0021] The terms "first" and "second" and the like in the specification, claims, and drawings of this application are used to distinguish between different objects, not to describe a particular order. Furthermore, the terms "including" and "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of operations or units is not limited to the listed operations or units, but may optionally include operations or units not listed, or may optionally include other operations or units inherent to the process, method, product, or apparatus.
[0022] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0023] In the present application, "at least one (item)" refers to one or more, "more than one" refers to two or more, "at least two (items)" refers to two or three and more than three, and "and / or" is used to describe the corresponding relationship between corresponding objects, indicating that there can be three relationships. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the corresponding objects before and after are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0024] See also Figure 1 , Figure 1 FIG. 1 is a flow chart of a method for adjusting the brightness of a local image provided by an embodiment of the present application. Figure 1 As shown, the method includes:
[0025] S110 collects a first image, where the first image is collected in real time by a camera of the vehicle.
[0026] The vehicle captures raw images from cameras positioned around the vehicle body (e.g., four cameras at the front, left front, right front, and rear, or six fisheye cameras at the sides and rear). The cameras cover a 360-degree angle of the vehicle body. When the system renders the raw images, it uses texture mapping to assign texture coordinates to the image. A shader then uses a sampler to retrieve pixels in the corresponding area. These pixels are then multiplied by a brightness factor to create the initial image, laying the foundation for subsequent local dimming.
[0027] Fisheye cameras are specialized wide-angle cameras with a viewing angle typically exceeding 180°, and sometimes exceeding 270°, capable of capturing a nearly hemispherical field of view. They exhibit optical distortion and typically utilize short focal lengths and curved lenses, which can produce strong barrel distortion (where the edges of the image bend outward), requiring algorithmic correction. In-vehicle panoramic systems typically employ four to six fisheye cameras positioned around the vehicle, providing full frontal, rear, left, and right coverage.
[0028] Rendering is the process of converting a 3D model or scene into a 2D image, encompassing steps such as geometry processing, lighting calculation, and texture mapping. In this paper, raw images captured by multiple fisheye cameras are rendered into a unified panoramic bird's-eye view through coordinate transformation and texture mapping. Brightness factor calculation is integrated into the rendering pipeline to achieve localized brightness adjustment.
[0029] Texture mapping is a technique for applying a 2D image (texture) to the surface of a 3D model, imbuing the model with detail and realism. Texture coordinates are first assigned: each vertex of the 3D model is assigned a corresponding texture coordinate. Texture sampling then occurs: during rendering, the texture coordinates corresponding to each pixel are calculated by interpolation, extracting color values from the texture image. In this method, the original image from each fisheye camera is used as a texture and mapped onto a virtual cylindrical or spherical model, creating a panoramic view.
[0030] Texture coordinates are a two-dimensional coordinate system (U, V) that are used to locate pixel positions in texture images.
[0031] U axis: Horizontal direction, from left (0) to right (1).
[0032] V-axis: Vertical direction, from bottom (0) to top (1) (some systems use the convention of top-to-bottom). In addition to spatial coordinates (X, Y, Z), each vertex of a 3D model must also be associated with a set of texture coordinates (U, V). During rendering, the texture coordinates of the pixels within the triangle are calculated through linear interpolation.
[0033] Shaders are programs that run on the graphics processing unit (GPU) and perform specific computational tasks in the rendering pipeline. They can be categorized into: vertex shaders, which process vertex positions, normals, texture coordinates, and other attributes, performing coordinate transformations; and fragment shaders, which calculate the final color of each pixel and perform operations such as texture sampling and lighting modeling. In this paper, the vertex shader converts the world coordinates of the panoramic model's vertices into screen coordinates; and the fragment shader samples pixel values from the camera image based on the texture coordinates and multiplies them by a brightness factor to adjust the brightness.
[0034] Samplers are tools used in shaders to retrieve color values from textures, supporting different sampling methods (e.g., nearest neighbor, bilinear, and trilinear). As you can understand, in a fragment shader, a sampler and texture coordinates are used to retrieve pixel values from a texture image. When texture coordinates don't exactly correspond to pixel centers, the sampler interpolates the values based on the specified filtering mode.
[0035] In the present invention, the fragment shader obtains the color value corresponding to the current pixel in the fisheye camera texture through a sampler and multiplies it by a brightness factor.
[0036] The brightness factor is a coefficient used to adjust the brightness of the image, and brightness is increased or decreased through multiplication.
[0037] Calculation formula: Output brightness = original brightness × brightness factor
[0038] Factor > 1: The image becomes brighter (e.g., when factor = 1.5, the brightness increases by 50%).
[0039] Factor < 1: The image becomes darker (e.g., when factor = 0.7, the brightness is reduced by 30%).
[0040] In the present invention, the user adjusts the brightness factor corresponding to a specific area through touch and slide operations, and the system updates the rendering results in real time to achieve local dimming.
[0041] S120 adjusts the brightness of the target area in the first image to obtain a second image, and the second image is displayed on the display device of the vehicle.
[0042] After acquiring the rendered first image, the first image needs to be stitched together to obtain a panoramic bird's-eye view of the vehicle (the second image). First, the system performs coordinate transformation on the first image based on the camera intrinsic and extrinsic parameters previously obtained through the checkerboard calibration plate and bundle adjustment method. The camera intrinsic parameters include the intrinsic matrix and distortion parameters, which are used to correct the barrel distortion produced by the fisheye camera image acquisition and restore the image to a normal perspective; the extrinsic parameters specify the rotation matrix and translation vector of each camera in the world coordinate system, determining the spatial position and orientation relationship of the camera.
[0043] During coordinate conversion, the pixel coordinates of the first image are first converted from the image coordinate system to the camera coordinate system using an intrinsic parameter matrix to eliminate the distortion caused by the fisheye lens. Then, using extrinsic parameters, the coordinates in the camera coordinate system are further converted to the world coordinate system, unifying the images captured by different cameras under the same spatial reference. After completing the coordinate conversion, the system stitches and fuses the images, fitting the images from each camera to the corresponding positions in the panoramic bird's-eye view. In the overlapping areas of the images, algorithms such as weighted smoothing filtering are used. By setting weight coefficients, the pixel values of the overlapping parts are weighted averaged to achieve a natural transition, avoiding stitching gaps and color discontinuities. Ultimately, a complete and continuous panoramic bird's-eye view of the vehicle is formed, namely the second image, providing the driver with a comprehensive and clear view of the vehicle's surrounding environment.
[0044] When a user touches the vehicle's touchscreen, the system collects touch coordinates and touch trajectory in real time. It first determines whether the touch point is within the panoramic bird's-eye view display area. If so, the touch coordinates are converted to logical regions within the panoramic view based on predefined panoramic mapping relationships and mapped to specific camera channels. For example, touching the bottom of the panoramic view will locate the texture region of the rearview camera image. If the touch is a swipe, the system targets the entire area covered by the swipe. After determining the target region, the system dynamically adjusts the brightness factor based on the direction and length of the touch trajectory. Swiping upward increases the brightness factor, while swiping downward decreases it. The trajectory length is mapped to the adjustment step size, and the brightness factor is constrained to a reasonable range of 0.5 to 2.0. The system then passes the updated brightness factor to the GPU shader. The shader uses texture coordinates to precisely locate the target camera image region. The shader then calculates the output color for each pixel in that region, multiplying the original color by the new brightness factor. Only the target region is re-rendered for fast response. Furthermore, the system supports simultaneous brightness adjustment of multiple regions, with each camera channel having its own brightness factor. Brightness changes are smoothly interpolated to avoid visual abruptness. Ultimately, drivers can use intuitive touch interaction to precisely enhance the brightness of specific areas in low-light environments without affecting other areas of the panoramic image, thereby improving driving safety.
[0045] See also Figure 2 , Figure 2 This is a flow chart of a panoramic video splicing display method provided in an embodiment of the present application. Figure 2 As shown, the method includes:
[0046] S210: Acquire real-time image videos from four or six cameras. The panoramic stitching video display method realizes the complete process from original image acquisition to final video display through three closely connected steps. First, the system will acquire real-time image videos from four or six cameras. Specifically, the system will establish a connection with cameras installed in different positions around the vehicle body through a data transmission interface. After the connection is successful, the camera begins to collect image data of the environment around the vehicle body in real time and transmits it to the system in the form of a video stream. During this process, the system will initialize the configuration of the camera, including setting parameters such as video frame rate and resolution to ensure that the acquired image video meets the subsequent processing requirements, and will use technologies such as timestamp synchronization to ensure the time consistency of multiple video streams to avoid the occurrence of asynchronous images.
[0047] S220: Rendering and stitching the video images of four or six cameras according to the pre-calibrated intrinsic and extrinsic parameters of each camera, wherein the texture sampling of each image is multiplied by a brightness factor during rendering to synthesize a 360° panoramic bird's-eye view video around the vehicle body.
[0048] Next, the video images from four or six cameras are rendered and stitched together based on the pre-calibrated intrinsic and extrinsic parameters of each camera. In this step, the system first reads the calibrated camera intrinsic parameters, such as focal length, principal point coordinates, distortion coefficient, etc., as well as the extrinsic parameters, namely the camera's position and attitude information in the world coordinate system. Using these parameters, the system performs geometric correction on the video images captured by each camera to eliminate image distortion caused by the camera's inherent characteristics. Subsequently, during the rendering phase, each image texture is multiplied by a brightness factor when sampling. This brightness factor can be pre-set based on the actual ambient lighting conditions and is used to adjust the brightness of the images from different cameras to achieve a balanced state. Finally, based on the corrected images and brightness adjustment results, the system stitches the multiple images together according to their respective spatial positional relationships, processes the overlapping image areas through an image fusion algorithm, and synthesizes a 360-degree panoramic bird's-eye view video around the vehicle body.
[0049] S230: Output the panoramic stitched video to the display output terminal. Finally, the system outputs the completed panoramic stitched video to the display output terminal. Based on the display output terminal's interface type and communication protocol, the system converts and encodes the panoramic video data to suit the terminal's display requirements. The processed video data is transmitted to the display output terminal via the corresponding connection cable, displaying a complete 360° bird's-eye view on the screen, allowing users to view all-round environmental information surrounding the vehicle in real time.
[0050] See also Figure 3 , Figure 3 This is a flow chart of an interactive local brightness factor adjustment method provided in an embodiment of the present application. Figure 3As shown, the method includes:
[0051] S310: Obtain the user's screen touch signal. The interactive local adjustment brightness factor method implements the user's flexible brightness control of the panoramic video through four steps. First, the system starts to obtain the user's screen touch signal. When the user operates a capacitive touch screen, electromagnetic pen or other device, the touch sensor of the screen converts the touch behavior into an electrical signal. The system captures these signals in real time through the driver, and records the precise coordinates of the touch (X, Y axis position), the sliding direction (such as horizontally to the left, vertically upward) and the sliding amplitude (i.e., the sliding distance, in pixels). For example, if the user slides from the lower left corner of the screen to the upper right, the system will record the starting coordinates and the ending coordinates, and calculate the sliding angle and distance.
[0052] S320: Determine whether the area where the user touches and slides is the panoramic stitching video area. If so, go to S340; if not, go to S330. Then the system determines whether the area where the user touches and slides is the panoramic stitching video area. The system pre-sets the display boundary range of the panoramic video on the screen, and makes a judgment by comparing the touch coordinates with the range. If the touch coordinates are completely within the panoramic video display area, it is determined to be a panoramic video area touch, and directly enters step S340; if the touch coordinates are outside the panoramic video area, such as the function button area at the edge of the screen, it is determined to be a non-panoramic video area touch, and enters step S330.
[0053] S330: Determine which camera image the touch-sliding area corresponds to and the direction of the slide, and adjust the rendering brightness factor of the corresponding camera image texture based on the slide direction and slide amplitude. In step S330, the system further determines which camera image the touch-sliding area corresponds to and the slide direction. The system divides the panoramic video image into multiple sub-areas based on the camera's perspective. For example, four cameras correspond to four sector-shaped areas: front, back, left, and right. The positional relationship between the touch coordinates and each sub-area determines the camera corresponding to the user's operation. Simultaneously, based on the recorded slide direction (up / down, left / right) and amplitude (distance), the rendering brightness factor of the corresponding camera image texture is adjusted according to preset rules. For example, if the user slides upward in the area representing the left camera with a slide amplitude of 20 pixels, the brightness factor of the left camera image is increased by 0.2 according to the rule of "increase the brightness factor by 0.1 for every 10 pixels slid." If the user slides downward, the brightness factor is correspondingly decreased, thereby achieving fine-grained brightness adjustment of the specific camera image.
[0054] S340: Output the rendering brightness factor of the image texture of each camera. Finally, in step S340, the system outputs the rendering brightness factor of the image texture of each camera. Regardless of whether it enters directly in step S320 or enters after adjustment in step S330, the system will send the brightness factor data corresponding to each current camera to the panoramic stitching module. After receiving the new brightness factor, the panoramic stitching module immediately updates the rendering parameters. When rendering the next frame of video, these adjusted brightness factors are applied to the image texture sampling process of the corresponding camera, thereby refreshing the display screen in real time, allowing users to immediately see the panoramic video effect after local brightness adjustment.
Claims
1. A method for adjusting the brightness of a local image, used in a vehicle, characterized in that: Acquire a first image, where the first image is acquired in real time by a camera of the vehicle; The brightness of the target area in the first image is adjusted to obtain a second image, and the second image is displayed on a display device of the vehicle.
2. The local image brightness adjustment method according to claim 1, characterized in that: Adjusting the brightness of the target area in the first image includes: Adjust rendering parameters of the target area in the first image.
3. The local image brightness adjustment method according to claim 2, characterized in that: The adjusting the rendering parameters of the target area in the first image includes: Adjusting the RGB parameters or RGBA values of the target area in the first image; the RGB parameters or RGBA values are set by a shader.
4. The local image brightness adjustment method according to claim 3, characterized in that: The adjusting the RGB parameters of the target area in the first image specifically includes: The target area in the first image is provided with texture coordinates; A sampler is associated with the target area via the texture coordinates; The shader obtains the target area through the sampler and multiplies the RGB parameters of the target area by a brightness factor.
5. The local image brightness adjustment method according to claim 4, characterized in that: The initial value of the brightness factor is 1 and the range is 0-10.
6. The local image brightness adjustment method according to claim 1, characterized in that: The adjusting the brightness of the target area in the first image further includes: collecting a touch signal, wherein the display device of the vehicle is configured with a touch screen; The brightness of the target area is adjusted according to the touch signal.
7. The local image brightness adjustment method according to claim 6, characterized in that: The adjusting the brightness of the target area according to the touch signal includes: determining the texture coordinates of the target area according to the touch signal; The touch signal includes a touch track, and the brightness of the target area is determined to increase or decrease according to the direction of the touch track; The magnitude of the increase or decrease in brightness of the target area is determined according to the magnitude of the touch track.
8. An electronic device, characterized in that: include: a memory for storing executable code; A processor, configured to execute the executable code to implement the method according to any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed in a computer, the computer is caused to execute the method according to any one of claims 1 to 7.
10. A computer program, characterized in that The computer program includes instructions, and when the instructions are executed, the method according to any one of claims 1 to 7 is implemented.
11. A vehicle, characterized in that: The electronic device according to claim 8.