Imaging method, electronic device, vehicle and medium

By using a preset exposure control model, the exposure parameters of the captured image are regenerated when the preview and shooting exposure parameters do not match, thus solving the problem of poor image quality in existing technologies and achieving high-quality imaging in complex scenes.

CN121603784APending Publication Date: 2026-03-03BYD CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Existing automatic exposure algorithms cannot adapt to changing exposure parameters in complex and varied shooting scenarios, resulting in poor image quality, especially in scenes with localized bright and dark areas.

Method used

By using a preset exposure control model, the captured image is regenerated based on the matching of the preview exposure parameters and the shooting exposure parameters. Adaptive exposure parameters are generated using the preset exposure control model to ensure that the exposure effect of the image meets expectations and avoids overexposure or underexposure.

Benefits of technology

It improves image quality, ensuring that captured images accurately present scene details and layers, thus enhancing shooting applicability and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121603784A_ABST
    Figure CN121603784A_ABST
Patent Text Reader

Abstract

The invention discloses an imaging method, an electronic device, a vehicle and a storage medium, and is used for the technical field of vehicles, and the method comprises the steps: generating a shot image through employing the preview exposure parameter of a preview image under the condition that a shooting instruction is received; under the condition that the shooting exposure parameter of the shot image is not matched with the preview exposure parameter, the shot image is regenerated based on the shooting exposure parameter and output, and the preview exposure parameter and the shooting exposure parameter are both generated based on a preset exposure control model. The shot image obtained based on the shooting exposure parameter can accurately present a shot scene and show details and levels of the shot image, and under the condition that the shooting exposure parameter and the preview exposure parameter of the shot image are not matched, the shot image regenerated based on the shooting exposure parameter is taken as output, so that the imaging quality of the image can be ensured; overexposure or underexposure of the shot image is avoided, and the shooting applicability and the user experience are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle technology, and more specifically, to an imaging method, electronic device, vehicle, and non-volatile computer-readable storage medium. Background Technology

[0002] Current automatic exposure algorithms typically obtain the average ambient light intensity of the current environment through metering, and determine the corresponding exposure parameters based on the mapping relationship between ambient light intensity and exposure parameters.

[0003] However, since the mapping relationship between ambient light and exposure parameters is usually measured by engineers in a specific environment (e.g., a laboratory environment with relatively uniform ambient light), in actual applications, the content of the scene is more complex and varied, and the mapping relationship cannot be applied to multiple scenes, resulting in poor image quality. Summary of the Invention

[0004] In view of this, embodiments of this application provide an imaging method, electronic device, vehicle, and non-volatile computer-readable storage medium that can guarantee the imaging quality of images.

[0005] The imaging method of this application includes: upon receiving a shooting instruction, generating a captured image using the preview exposure parameters of a preview image; and if the shooting exposure parameters of the captured image and the preview exposure parameters do not match, regenerating the captured image based on the shooting exposure parameters and outputting it, wherein both the preview exposure parameters and the shooting exposure parameters are generated based on a preset exposure control model.

[0006] In some embodiments, the method further includes: outputting the captured image when the shooting exposure parameters of the captured image and the preview exposure parameters match.

[0007] In some embodiments, the method further includes: determining an exposure parameter range based on the shooting exposure parameters and a preset exposure latitude; determining that the shooting exposure parameters of the captured image and the preview exposure parameters do not match if the preview exposure parameters are outside the exposure parameter range; and determining that the shooting exposure parameters of the captured image and the preview exposure parameters match if the preview exposure parameters are within the exposure parameter range.

[0008] In some embodiments, the method further includes: generating the preview exposure parameters based on a preset exposure control model and the preview image; and generating the shooting exposure parameters based on the preset exposure control model and the captured image.

[0009] In some embodiments, the method further includes: acquiring multiple training images and corresponding exposure metrics; and training the exposure control model until convergence based on the training images and corresponding exposure metrics.

[0010] In some implementations, acquiring multiple training images includes: acquiring multiple exposure images; performing inverse tone mapping on the exposure images to obtain high dynamic range images; and performing exposure compensation processing on the high dynamic range images to obtain multiple training images under different exposure parameters.

[0011] In some implementations, the exposure metrics corresponding to the training images are determined based on at least one of the following: mean brightness, range of black areas, range of overexposure, effective exposure range based on a brightness threshold range, effective exposure range based on Gaussian statistics, contrast, and saturation.

[0012] In some implementations, the exposure model includes a first feature extraction module, a second feature extraction module, and a logistic regression layer. Generating the preview exposure parameters based on a preset exposure control model and the preview image includes: extracting features from the preview image using the first feature extraction module to obtain a first feature of the preview image; extracting features from the first feature of the preview image using the second feature extraction module to obtain a second feature of the preview image, wherein the receptive field of the second feature extraction module is larger than that of the first feature extraction module; processing the second feature of the preview image using the logistic regression layer to determine a first exposure index corresponding to the preview image; and determining the preview exposure parameters based on the first exposure index and the initial exposure parameters of the preview image.

[0013] In some implementations, the exposure model includes a first feature extraction module, a second feature extraction module, and a logistic regression layer. Generating the shooting exposure parameters based on the preset exposure model and the captured image includes: extracting features from the captured image using the first feature extraction module to obtain a first feature of the captured image; extracting features from the first feature of the captured image using the second feature extraction module to obtain a second feature of the captured image, wherein the receptive field of the second feature extraction module is larger than that of the first feature extraction module; processing the second feature of the captured image using the logistic regression layer to determine a second exposure index corresponding to the captured image; and determining the shooting exposure parameters based on the second exposure index and the preview exposure parameters.

[0014] In some embodiments, the method further includes preprocessing the input image of the exposure control model, the preprocessing including at least one of format conversion, resolution adjustment, and normalization.

[0015] In some implementations, the preview exposure parameters include the exposure parameters of the preview image that has the smallest time difference between the acquisition time and the acquisition time of the captured image among a series of consecutive preview images.

[0016] In some implementations, the step of regenerating and outputting the captured image based on the shooting exposure parameters includes: regenerating the captured image based on the shooting exposure parameters; generating verification exposure parameters based on a preset exposure control model and the regenerated captured image; if the shooting exposure parameters and the verification exposure parameters match, then outputting the regenerated captured image; if the shooting exposure parameters and the verification exposure parameters do not match, then updating the shooting exposure parameters based on the verification exposure parameters, and re-entering the step of regenerating the captured image based on the shooting exposure parameters.

[0017] In some embodiments, the method further includes: outputting the captured image when the number of times the captured image is regenerated based on the captured exposure parameters reaches a preset threshold.

[0018] The electronic device according to the embodiments of this application includes a processor connected to a memory; the memory stores a computer program, and the processor executes the computer program to implement instructions for the imaging method described in any of the above embodiments.

[0019] The vehicle described in this application includes the electronic device described in any of the above embodiments.

[0020] The non-volatile computer-readable storage medium of this application includes a computer program that, when executed by a processor, causes the processor to perform the imaging method described in any of the above embodiments.

[0021] The imaging method, electronic device, vehicle, and non-volatile computer-readable storage medium of this application generate a captured image using the preview exposure parameters of a preview image upon receiving a shooting command. If the shooting exposure parameters of the captured image and the preview exposure parameters do not match, the captured image is regenerated based on the shooting exposure parameters and output. Both the preview exposure parameters and the shooting exposure parameters are generated based on a preset exposure control model. Since the exposure control model can adaptively output corresponding exposure parameters according to different images obtained from different shooting scenarios, the captured image obtained based on the shooting exposure parameters can accurately present the shooting scene and showcase the details and layers of the captured image. When the shooting exposure parameters of the captured image and the preview exposure parameters do not match, using the captured image regenerated based on the shooting exposure parameters as the output ensures image quality, avoids overexposure or underexposure, and improves shooting applicability and user experience.

[0022] Additional aspects and advantages of embodiments of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of embodiments of this application. Attached Figure Description

[0023] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, wherein:

[0024] Figure 1 This is a schematic diagram illustrating the background technology of the imaging method according to certain embodiments of this application;

[0025] Figure 2 This is a schematic diagram illustrating an application scenario of the imaging method according to certain embodiments of this application;

[0026] Figure 3 This is a schematic flowchart of an imaging method according to certain embodiments of this application;

[0027] Figure 4 This is a schematic flowchart of an imaging method according to certain embodiments of this application;

[0028] Figure 5 This is a schematic flowchart of an imaging method according to certain embodiments of this application;

[0029] Figure 6 This is a schematic flowchart of an imaging method according to certain embodiments of this application;

[0030] Figure 7 This is a schematic flowchart of an imaging method according to certain embodiments of this application;

[0031] Figure 8 This is a schematic flowchart of an imaging method according to certain embodiments of this application;

[0032] Figure 9 This is a scene illustration of an imaging method according to certain embodiments of this application;

[0033] Figure 10 This is a schematic flowchart of an imaging method according to certain embodiments of this application;

[0034] Figure 11 This is a schematic flowchart of an imaging method according to certain embodiments of this application;

[0035] Figure 12 This is a schematic flowchart of an imaging method according to certain embodiments of this application;

[0036] Figure 13 This is a schematic flowchart of an imaging method according to certain embodiments of this application;

[0037] Figure 14 This is a schematic flowchart of an imaging method according to certain embodiments of this application;

[0038] Figure 15 This is a schematic diagram of the imaging apparatus according to certain embodiments of this application;

[0039] Figure 16 This is a schematic diagram of the architecture of the imaging method of some embodiments of this application implemented in a vehicle;

[0040] Figure 17 This is a schematic diagram illustrating the connection state of a non-volatile computer-readable storage medium and a processor in certain embodiments of this application. Detailed Implementation

[0041] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the embodiments of this application, and should not be construed as limiting the embodiments of this application.

[0042] To facilitate understanding of this application, the following explanations are provided for the terms used in this application:

[0043] 1. Artificial Intelligence (AI) is the theory, methods, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to have perception, reasoning, and decision-making functions. AI technology is a comprehensive discipline involving a wide range of fields, including both hardware and software technologies. Basic AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operating / interactive systems, and mechatronics. AI software technologies mainly include computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning. The technical solutions provided in this application mainly relate to machine learning / deep learning in artificial intelligence.

[0044] 2. Machine Learning (ML) is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and instructional learning.

[0045] 3. Deep Learning (DL): A branch of machine learning, it's an algorithm that attempts to perform high-level abstraction of data using multiple processing layers containing complex structures or multiple nonlinear transformations. Deep learning learns the inherent patterns and hierarchical representations of training sample data. The information gained during this learning process greatly aids in interpreting data such as text, images, and sound. The ultimate goal of deep learning is to enable machines to possess analytical and learning capabilities like humans, capable of recognizing data such as text, images, and sound. Deep learning is a complex machine learning algorithm, and its performance in speech and image recognition far surpasses previous related technologies.

[0046] With technological advancements, in-vehicle cameras have become an essential component of modern vehicles. The automotive industry is introducing imaging systems to enhance vehicle perception and intelligence. Imaging systems acquire environmental information based on various sensors (e.g., image sensors such as in-vehicle cameras, radar sensors, etc.), providing drivers with visual feedback to assess the vehicle's environment and make driving decisions. The performance of sensors (taking in-vehicle cameras as an example) and the accuracy of algorithms affect vehicle safety, autonomy, and intelligence. In other words, the development of in-vehicle camera technology not only improves driving safety but also ensures a superior passenger experience.

[0047] In-vehicle cameras offer a variety of functions, such as driver assistance systems, panoramic parking assistance, driving recording, and photo-taking for rear-seat passengers. Because the working environment of in-vehicle cameras is far more complex and variable than that of everyday cameras and mobile phones, changes in lighting conditions, adjustments to the shooting angle, and even vehicle movement can all affect image quality. Ensuring image quality in such complex and diverse environments is a major challenge for in-vehicle camera technology.

[0048] Therefore, in order to ensure image quality, the current practice is to set an automatic exposure method for vehicle cameras, so that the vehicle cameras can automatically adjust the exposure parameters (such as exposure time) according to environmental conditions, so as to obtain clear and accurate photos under different lighting and angles, thereby improving driving safety and user experience.

[0049] Current automatic exposure methods are usually based on metering, which means that the ambient light intensity of the current shooting scene is measured by a light sensor to determine the scene brightness. Then, according to a preset mapping table (which can be used to represent the mapping relationship between scene brightness and exposure parameters (such as exposure time, ISO value, etc.), the corresponding exposure parameters are determined, and then the image of the current scene is captured by shooting with the corresponding exposure parameters.

[0050] Currently used metering methods typically include global metering (which calculates the average brightness based on the lighting conditions of the entire scene to determine the corresponding exposure parameters) and center-weighted metering (which focuses on the lighting conditions at the center of the scene to determine the corresponding exposure parameters). While metering-based exposure algorithms can improve image quality to some extent, the following problems still exist:

[0051] First, metering-based exposure methods are highly sensitive to ambient light levels (scene brightness). They typically only focus on the overall brightness of the metering area (i.e., the captured image) and neglect the scene content within the image. This results in poor image quality in certain scenarios (such as scenes where there are both bright and dark areas within the image), meaning that metering-based exposure methods have poor robustness.

[0052] Secondly, the pre-defined mapping tables are typically established based on the subjective adjustments made by image quality engineers (tuning engineers). For example, please refer to [link to relevant documentation]. Figure 1 , Figure 1 An exemplary mapping table is shown between scene brightness and exposure parameters (taking exposure time and exposure gain (a technique that changes image brightness by adjusting the sensitivity of a camera's image sensor to light)). The horizontal axis represents scene brightness, and the vertical axis represents exposure gain and exposure time (in milliseconds (ms)). Figure 1 As shown, there is a discontinuous nonlinear relationship between scene brightness and exposure parameters, which may result in the inability to provide corresponding exposure parameters for different lighting scene brightness, thus affecting image quality.

[0053] Furthermore, exposure compensation strategies typically adjust the average brightness of an image to a predetermined threshold parameter (such as 128 nits). Since the mapping table is usually based on measurements taken by tuning engineers in a specific environment (e.g., a laboratory environment with relatively uniform brightness), in real-world applications, the scenes are far more complex and varied. Preset exposure tables cannot be applied to all scenarios, easily leading to poor image quality and failing to achieve the optimization goal of the exposure compensation strategy (i.e., adjusting the average brightness to the predetermined threshold parameter).

[0054] In summary, exposure methods based on photometering have poor robustness, which can easily affect image quality and fail to achieve the optimization goals of exposure compensation strategies.

[0055] To address the aforementioned technical problems, embodiments of this application provide an imaging method.

[0056] The following section will first introduce one application scenario of the technical solution of this application, such as... Figure 1 As shown, the imaging method provided in this application can be applied to, for example... Figure 1 In the application scenario shown, this imaging method can be applied to a vehicle 100, which includes a body 10 and an image sensor 20.

[0057] Vehicle 100 is any vehicle 100 from which an image can be acquired, such as a car, truck, etc.

[0058] Image sensor 20 is used to acquire scene images; image sensor 20 can be a visible light camera (Red-Green-Blue, RGB), a visible light depth camera (Red-Green-Blue-Depth, RGBD), an infrared camera, a thermal imaging camera, a depth camera, etc. RGB cameras and RGBD cameras can acquire visible light images of the scene, infrared cameras can acquire infrared images of the scene, thermal imaging cameras can acquire thermal imaging images of the scene, and depth cameras can acquire depth images.

[0059] Optionally, the image sensor 20 may include one or more. The image sensor 20 may be disposed in front of, behind or to the side of the vehicle body 10. For example, the image sensor 20 may be disposed in front of the vehicle body to acquire scene images directly in front of the vehicle body 100; or the image sensor 20 may be disposed to the side of the vehicle body to acquire scene images on both sides as the vehicle body 100 moves forward.

[0060] In one embodiment, the vehicle 100 further includes a processor 30 and a memory 40. The processor 30 is located inside the vehicle body 10, and the memory 40 can be used to store preview exposure parameters, exposure control models, etc.

[0061] In one embodiment, the exposure control model can be deployed locally on the vehicle 100 to acquire the corresponding exposure parameters offline; or, the exposure control model can be deployed on a server that communicates with the vehicle 100 via a network; or, the exposure control model can be deployed locally on the vehicle 100 and on a server that communicates with the vehicle 100 via a network.

[0062] The server can be a standalone physical server, a server cluster consisting of multiple physical servers, or a distributed system. It can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. This application's embodiments do not impose any limitations on this.

[0063] The imaging method of this application will be described in detail below:

[0064] Please see Figure 2 and Figure 3 This application provides an imaging method, which will be described using an example of the imaging method being applied to a vehicle-mounted camera. The imaging method includes:

[0065] Step 011: Upon receiving the shooting instruction, generate the captured image using the preview exposure parameters of the preview image.

[0066] The shooting command can be a command used to control the vehicle-mounted camera to capture the current scene and generate a corresponding image. For example, when a user presses the shooting button on the vehicle-mounted camera, it can be considered that a shooting command has been received; or, in response to a shooting request from a vehicle system (such as a dashcam system), a shooting command can be generated and received.

[0067] The preview image can be an image generated by the camera capturing the current scene before receiving the shooting instruction. The preview image can serve as a reference for the user when shooting.

[0068] Among them, the preview exposure parameters can be the exposure parameters corresponding to the preview image. Exposure parameters can include exposure value (EV value), which is a quantity that reflects the degree of exposure. By adjusting the EV value (i.e., the exposure parameter), exposure compensation of the image can be achieved. For example, exposure parameters can also be exposure time (i.e., the time it takes for light to shine into the camera and be converted into a digital signal by the electronic image sensor to form an image), aperture size, ISO sensitivity, etc. Since different exposure parameters can provide different exposure effects for the image and affect the image quality, this application uses the EV value as an example for explanation.

[0069] Specifically, upon receiving a shooting instruction (e.g., when the user clicks the shooting button), the camera is controlled to capture an image of the current shooting scene based on the preview exposure parameters, in order to generate the captured image.

[0070] Step 012: If the shooting exposure parameters and preview exposure parameters of the captured image do not match, regenerate the captured image based on the shooting exposure parameters and output it. Both the preview exposure parameters and the shooting exposure parameters are generated based on the preset exposure control model.

[0071] The preset exposure control model can be used to determine the corresponding exposure parameters of the input image, so that the image obtained by shooting based on the exposure parameters can accurately present the details and layers in the picture, without overexposure or underexposure, and can guarantee the imaging effect of the image. In other words, the preset exposure control model can output the appropriate exposure parameters corresponding to the image to ensure the imaging quality of the image.

[0072] The preset exposure control model can be a relatively lightweight and easy-to-deploy network structure, such as a computer vision model (Mobilenet), SqueezeNet (a lightweight convolutional neural network that reduces the number of channels in the model's convolutional layers through channel squeezing), and ShuffleNet (a lightweight convolutional neural network based on pointwise group convolution and channel shuffle).

[0073] The preview exposure parameters and shooting exposure parameters are both generated based on a preset exposure control model.

[0074] Optionally, please refer to Figure 4 Imaging methods also include:

[0075] Step 013: Generate preview exposure parameters based on the preset exposure control model and preview image;

[0076] Step 014: Generate shooting exposure parameters based on the preset exposure control model and the captured image.

[0077] Specifically, the initial exposure parameters of the camera can be determined by presetting them or by using a light sensor. The camera is then controlled to acquire scene information (such as lighting information) based on these initial exposure parameters to obtain a preview image. This preview image is then input into a preset exposure control model to obtain preview exposure parameters. Upon receiving a shooting command, the camera is controlled to acquire scene information based on the preview exposure parameters to generate the corresponding captured image. This captured image is then input into a preset exposure control model to obtain shooting exposure parameters. If the shooting exposure parameters and preview exposure parameters do not match, the image quality is considered poor. The image obtained based on the preview exposure parameters may not accurately represent the scene, retain details and tonal range, and may even be overexposed or underexposed, affecting image quality. Therefore, a new captured image can be generated based on the shooting exposure parameters and used as the output.

[0078] Thus, upon receiving a shooting command, the system generates a captured image using the preview exposure parameters of the preview image. If the shooting exposure parameters of the captured image and the preview exposure parameters do not match, the system regenerates and outputs the captured image based on the shooting exposure parameters. Both the preview exposure parameters and the shooting exposure parameters are generated based on a preset exposure control model. Since the exposure control model can adaptively output corresponding exposure parameters according to different images obtained from different shooting scenarios, the captured image obtained based on the shooting exposure parameters can accurately present the shooting scene and show the details and layers of the captured image. When the shooting exposure parameters of the captured image and the preview exposure parameters do not match, the system uses the captured image regenerated based on the shooting exposure parameters as the output, which can ensure the image quality, avoid overexposure or underexposure of the captured image, improve the shooting applicability and user experience.

[0079] Please see Figure 5 In some embodiments, the imaging method further includes:

[0080] Step 015: Output the captured image if the shooting exposure parameters and preview exposure parameters match.

[0081] Specifically, when the shooting exposure parameters and preview exposure parameters of the captured image match, it can be assumed that the generated image, based on the preview exposure parameters, can accurately represent the scene, ensuring image quality and effect. Therefore, the captured image is output. It's understandable that since the lighting conditions when the camera captures the preview image and the captured image are not significantly different (or even essentially the same), the preview exposure parameters and shooting exposure parameters usually won't differ too much, meaning they can match. Therefore, imaging speed can also be guaranteed.

[0082] Optionally, the preview exposure parameters include the exposure parameters of the preview image with the smallest time difference between the acquisition time and the acquisition time of the captured image among multiple consecutive preview images.

[0083] Specifically, when the camera enters the preview stage (i.e., the camera is framing the current scene but has not yet received a shooting command), it can acquire multiple consecutive preview images to ensure that the exposure of the captured image is as close as possible to the preview effect. In other words, before receiving a shooting command, the exposure parameters can be continuously updated based on the preview images and the exposure control model by acquiring multiple preview images. When a shooting command is received, the exposure parameters of the preview image with the smallest time difference between the acquisition time and the capture time are used as the preview exposure parameters. This reduces the difference between the preview exposure parameters and the capture exposure parameters, thereby increasing the speed of outputting the captured image and improving the user experience.

[0084] Please see Figure 6 In some embodiments, the imaging method further includes:

[0085] Step 016: Determine the exposure parameter range based on the shooting exposure parameters and the preset exposure latitude;

[0086] Step 017: If the preview exposure parameters are outside the exposure parameter range, determine that the shooting exposure parameters and the preview exposure parameters of the captured image do not match;

[0087] Step 018: If the preview exposure parameters are within the exposure parameter range, determine that the shooting exposure parameters and the preview exposure parameters of the captured image match.

[0088] The preset exposure tolerance can be ±0.1EV; ±0.2EV; ±0.3EV, etc.

[0089] Specifically, because the eye's photoreceptors can quickly adjust their perception to adapt to new brightness conditions when ambient light changes, and because the image formed by the human eye is the result of brain processing and stitching together, rather than a direct reflection of a single image, the brain processes and optimizes the information received by the eye. Therefore, even with slight changes in brightness, the human visual system can integrate these changes into a continuous and smooth visual experience. In other words, the human eye is usually not very perceptible to subtle changes in exposure parameters (e.g., minor adjustments to the exposure EV value), meaning it has a certain degree of exposure tolerance. Therefore, the exposure parameter range can be determined based on the shooting exposure parameters and the preset exposure latitude. Images obtained using exposure parameters within this range will provide details and tones that the human eye can perceive, thus ensuring image quality. Therefore, if the preview exposure parameters are outside the exposure parameter range, it can be determined that the shooting exposure parameters and preview exposure parameters of the captured image do not match; if the preview exposure parameters are within the exposure parameter range, it can be determined that the shooting exposure parameters and preview exposure parameters of the captured image match.

[0090] Please see Figure 7 In some embodiments, the imaging method includes:

[0091] Step 019: Obtain multiple training images and their corresponding exposure metrics;

[0092] Step 020: Based on the training images and corresponding exposure metrics, train the exposure control model until convergence.

[0093] Exposure metrics can be used to characterize the exposure level of a training image, such as whether it is overexposed, underexposed, or properly exposed. They can also characterize the overall exposure of a training image: a training image with an exposure metric of 0 is properly exposed; a training image with an exposure metric less than 0 is underexposed, with a greater degree of underexposure as the exposure metric is less than 0; and a training image with an exposure metric greater than 0 is overexposed, with a greater degree of overexposure as the exposure metric is greater than 0. Exposure metrics can also represent the exposure parameters that need to be adjusted based on the exposure parameters used to capture the image.

[0094] Optionally, the exposure metrics corresponding to the training images are determined based on at least one of the following: mean brightness, range of black areas, range of overexposure, effective exposure range based on a brightness threshold range, effective exposure range based on Gaussian statistics, contrast, and saturation.

[0095] Among them, the average brightness E gray It can be the average brightness value of each pixel in the training image. Assuming the training image has N pixels, and i is the brightness value, then:

[0096]

[0097] Among them, "dead black" can refer to a situation where the brightness of the training image is insufficient, resulting in the loss of detail or even turning it into pure black. The range of dead black is E. dead This could be the percentage of completely black pixels in the training image out of all pixels. For example, a black threshold Thh1 can be set (a pixel is considered completely black in the training image if its brightness value is less than Thh1; Thh1 can be a brightness value of 8 nits, 9 nits, 10 nits, 11 nits, 12 nits, 15 nits, etc.). The black range E can be determined by calculating the percentage of pixels with brightness values ​​less than Thh1 out of all pixels (assuming N pixels). dead ,Right now:

[0098]

[0099] Overexposure can refer to a situation where the brightness of the training image is too high, resulting in a lack of detail. The overexposure range is E. over This could be the percentage of overexposed pixels in the training image out of all pixels in the training image. For example, an overexposure threshold Thh2 can be set (a pixel is considered overexposed in the training image if its brightness value is greater than the overexposure threshold Thh2; the overexposure threshold Thh2 can be a brightness value of 180 nit, 190 nit, 195 nit, 200 nit, 210 nit, 220 nit, 230 nit, 240 nit, etc.). By calculating the percentage of pixels with a brightness greater than the overexposure threshold Thh2 out of all pixels (assuming it includes N pixels), the overexposure range E can be determined. over ,Right now:

[0100]

[0101] Among them, the brightness threshold range E well The range can be [60,200], [61,198], [64,192] (unit: nit), etc. It can be considered that the pixel brightness is within the brightness threshold range E. well Within a certain range, the details of that pixel can be captured by the human eye, i.e., effective exposure. Therefore, it is possible to calculate the brightness within the brightness threshold range E. well The percentage of pixels in a training image (assuming it includes N pixels) is used to determine the effective exposure of the training image. Thhmax1 is the maximum value in the brightness threshold range, and Thhmin1 is the minimum value in the brightness threshold range.

[0102]

[0103] One approach is to set the brightness perception range of the training image. Within this range, the human eye perceives the image more accurately. For example, it could be [125, 130], [120, 135], [127, 129] (unit: nits), etc. The effective exposure based on Gaussian mapping statistics can be determined by calculating the difference in brightness between each pixel (assuming N pixels) and the brightness perception range, thus assigning a weight to each pixel (the smaller the difference, the larger the weight). These weights are then summed to determine the effective exposure range value for the training image based on Gaussian statistics. Thhmax2 is the maximum value within the luminance perception range, and Thhmin2 is the minimum value within the luminance perception range, that is:

[0104]

[0105] Among them, contrast ratio E contrast Contrast is a measure of the difference between bright and dark areas in an image. High-contrast images have a clear contrast between light and dark areas, and details are more prominent; low-contrast images present a flatter brightness variation, and details may appear blurry. The contrast of a training image can be calculated using the Laplacian operator, where H is the number of pixels in the training image in the vertical direction, W is the number of pixels in the training image in the horizontal direction, h is the row index of the pixel, and w is the column index of the pixel, i.e.:

[0106]

[0107] Among them, saturation E saturation This refers to the intensity and purity of colors in an image. High saturation indicates vibrant and pure colors; low saturation makes colors appear soft and close to gray. The saturation of a training image can be determined by calculating the standard deviation of the brightness of each pixel's color. Here, H is the number of pixels in the training image in the vertical direction, W is the number of pixels in the training image in the horizontal direction, h is the row index of the pixel, w is the column index of the pixel, r is the brightness value of the red channel, g is the brightness value of the green channel, and b is the brightness value of the blue channel.

[0108]

[0109] The process involves calculating a score for each image based on at least one of the following: average brightness, range of dark areas, range of overexposure, effective exposure range based on a brightness threshold range, effective exposure range based on Gaussian statistics, contrast, and chroma. Based on these scores, the exposure index of each image is determined. For example, the image with the highest score can be considered to have the best image quality. Therefore, the exposure parameter corresponding to the image with the highest score can be determined as the optimal exposure parameter, and the exposure index for that image can be determined as the index threshold (taking 0 as an example). Then, using the optimal exposure parameter, such as setting a corresponding exposure step size (taking 0.33EV as an example), the exposure parameter is increased or decreased according to the exposure step size, and then mapped to various exposure indices. For example, assuming an exposure parameter of 1EV is the optimal exposure parameter, and the corresponding exposure index is 0, then the exposure index corresponding to the exposure parameter of 1.33EV is set to 1, the exposure index corresponding to the exposure parameter of 1.66EV is set to 2, the exposure index corresponding to the exposure parameter of 0.66EV is set to -1, and the exposure index corresponding to the exposure parameter of 0.33EV is set to -2. In this way, the various exposure indices can be determined.

[0110] Continuing with the previous example, if the exposure index corresponding to a certain image is 1, it can be assumed that the exposure parameters of the image need to be reduced by (1-0)*preset step size (0.33EV) to obtain the appropriate exposure parameters. Thus, based on the various exposure indices and the exposure parameters used when capturing the image, the exposure parameters corresponding to the image can be determined.

[0111] The score can be determined based on at least one of the following methods:

[0112] Since the human eye perceives medium brightness more accurately, taking the brightness range [0, 255] (unit: nit) as an example, it can be considered that the human eye perceives most accurately when the brightness value is 128 nit. Therefore, when calculating the scores of each image based on the average brightness, it can be considered that the closer the average brightness is to 128 nit, the higher the score of the image; when calculating the scores of each image based on the dead black range, by setting the dead black range threshold, among the images with the dead black range smaller than the dead black range threshold, the image with the smallest exposure parameter has the highest score; when calculating the scores of each image based on the overexposure range, by setting the overexposure range threshold, among the images with the overexposure range smaller than the overexposure range threshold, the image with the largest exposure parameter has the highest score; when calculating the scores of each image based on the effective exposure range within the brightness threshold range (or the effective exposure range based on Gaussian statistics), the image with the largest effective exposure range (or the largest weight value) of the image can be determined as the image with the highest score; when calculating the scores of each image based on the contrast, it can be considered that the larger the calculated contrast value, the higher the score of the image; when calculating the scores of each image based on the saturation, it can be considered that the larger the calculated saturation value, the higher the score of the image.

[0113] Among them, the exposure index corresponding to the training image is determined based on at least one of the average brightness, dead black range, overexposure range, effective exposure range within the brightness threshold range, effective exposure range based on Gaussian statistics, contrast, and colorfulness. For example, it can be determined based on the overexposure range and the average brightness, that is: I corretexp =(argmax[E over <Thh2]+argmin[E gray -Thh3) / 2; It can also be determined based on the effective exposure range based on Gaussian statistics, contrast, and saturation, that is: I corretexp =(argmax[E well +rgmax[E contrast +rgmax[E saturation ) / 3; It can also be determined based on the average brightness, overexposure range, effective exposure range based on Gaussian statistics, contrast, and colorfulness, that is: I corretexp =(argmax[e well +rgmax[E contrast +rgmax[E saturation +argmin[E gray -Thh3+arg over <Thh2]) / 5, and so on. This application does not limit this and will not list them all here.

[0114] After determining the training image with the highest score, the range of exposure parameters can be determined based on the exposure parameters corresponding to the training image and the preset exposure tolerance, and the range of exposure parameters can be mapped to the exposure index.

[0115] Please refer to the figure. Optionally, step 019: Obtain multiple training images, including:

[0116] Step 0191: Acquire multiple exposure images;

[0117] Step 0192: Perform inverse tone mapping on the exposed image to obtain a high dynamic range image;

[0118] Step 0193: Perform exposure compensation processing on the high dynamic range image to obtain multiple training images under different exposure parameters.

[0119] Specifically, a sequence of bracketed exposure images in various scenes can be acquired using mobile devices (e.g., in-vehicle cameras, mobile phones, etc.). (Bracketing refers to creating 3 or 5 images with different exposure levels in a single shot, using intermediate, reduced, and increased exposure values.) This results in multiple Low-Dynamic Range (LDR) exposure images: imgs = {img1, img2, ...}. Then, an Inverse Tone Mapping Operator (iTMO) algorithm is used to obtain a High Dynamic Range (HDR) image: HDR = iTMO(img1, img2, ...). Finally, exposure compensation processing is applied to the HDR images to obtain a dense exposure image sequence at any exposure level: LDR. i =TMO(HDR, ev) i This involves obtaining multiple LDR training images; based on the training images and their corresponding exposure metrics (e.g., determined through annotation models, vector machines, etc.); inputting the training images into a pre-defined exposure control model for training, outputting the corresponding training exposure metrics to determine the corresponding training exposure parameters; and adjusting the exposure control model based on the loss values ​​between the training exposure metrics and the exposure metrics until the exposure control model converges (e.g., adjusting the exposure control model based on Coral Loss (a loss function used to measure the difference between features in the source and target domains) and Corn Loss to supervise the training of the exposure control model).

[0120] Please see Figure 9 and Figure 10In some implementations, the exposure model includes a first feature extraction module 11, a second feature extraction module 12, and a logistic regression layer 13. Step 013: Based on a preset exposure control model and a preview image, generate preview exposure parameters, including:

[0121] Step 0131: Extract features from the preview image based on the first feature extraction module to obtain the first feature of the preview image;

[0122] Step 0132: Based on the second feature extraction module, perform feature extraction on the first feature of the preview image to obtain the second feature of the preview image. The receptive field of the second feature extraction module is larger than that of the first feature extraction module.

[0123] Step 0133: Process the second feature of the preview image based on the logistic regression layer to determine the first exposure index corresponding to the preview image;

[0124] Step 0134: Determine the preview exposure parameters based on the first exposure index and the initial exposure parameters of the preview image.

[0125] The first feature can be a low-level feature of the image, such as local color, texture, shape, and key points; the second feature can be a high-level feature of the image, such as the global brightness of the image.

[0126] The first feature extraction module may include at least one of convolutional layers, ReLU activation function (a linear activation function), and batch normalization (BN).

[0127] The second feature extraction module may include multiple feature extraction modules (such as convolutional layers, pooling layers, and normalization layers). The receptive field of the second feature extraction module is larger than that of the first feature extraction module, and it can learn more abstract and high-level feature representations.

[0128] The initial exposure parameters of the image can be preset exposure parameters, which can be determined by sensing the brightness of the scene through a light sensor or similar means, and then determining the corresponding initial exposure parameters based on the brightness.

[0129] Specifically, the preview image I can be extracted using the first feature extraction module. RGB预览 Feature extraction is performed on the 3-channel preview image I. RGB预览 Mapped to high-dimensional features F of the C channel Shallow预览(i.e., the first feature), provides a higher-level abstract feature foundation for the second feature extraction module, which is beneficial to improving the performance of the exposure control model; then F Shallow预览 The data is fed into the second feature extraction module to extract F. Deep (i.e., the second characteristic); then F Deep The data is fed into a logistic regression layer to obtain the corresponding first exposure metric I. Result预览 According to I Result预览 Based on the initial exposure parameters, determine the preview exposure parameters corresponding to the preview image.

[0130] Please see Figure 9 and Figure 11 In some implementations, the exposure model includes a first feature extraction module, a second feature extraction module, and a logistic regression layer. Step 014: Based on the preset exposure model and the captured image, generate shooting exposure parameters, including:

[0131] Step 0141: Extract features from the captured image based on the first feature extraction module to obtain the first feature of the captured image;

[0132] Step 0142: Based on the second feature extraction module, the first feature of the captured image is extracted to obtain the second feature of the captured image. The receptive field of the second feature extraction module is larger than that of the first feature extraction module.

[0133] Step 0143: Process the second feature of the captured image based on the logistic regression layer to determine the second exposure index corresponding to the captured image;

[0134] Step 0144: Determine the shooting exposure parameters based on the second exposure index and the preview exposure parameters.

[0135] Specifically, the first feature extraction module can be used to extract features from the captured image I. RGB拍摄 Feature extraction is performed on the 3-channel captured image I RGB拍摄 Mapped to high-dimensional features F of the C channel Shallow拍摄 (i.e., the first feature), provides a higher-level abstract feature foundation for the second feature extraction module, which is beneficial to improving the performance of the exposure control model; then F Shallow拍摄 The data is fed into the second feature extraction module to extract F. Deep (i.e., the second characteristic); then F Deep The data is fed into a logistic regression layer to obtain the corresponding first exposure metric I. Result拍摄 According to I Result拍摄 Based on the initial exposure parameters, determine the corresponding shooting exposure parameters for the captured image.

[0136] Please see Figure 12 In some implementations, the method further includes:

[0137] Step 021: Preprocess the input image of the exposure control model. The preprocessing includes at least one of the following: format conversion, resolution adjustment, and normalization.

[0138] The input image can be an image fed into the exposure control model, such as a preview image, a captured image, or a training image.

[0139] Normalization can be pixel value normalization, etc.; conversion format can be conversion of the input image format (such as RGBA format, RGB format, etc.).

[0140] The preprocessing includes at least one of format conversion and resolution adjustment. For example, preprocessing includes format conversion; or, preprocessing includes format conversion and resolution adjustment; or, preprocessing includes format conversion, resolution adjustment and normalization. This application does not limit the scope of the preprocessing and will not list them all here.

[0141] Specifically, the input image can be preprocessed before entering the exposure control model. The resolution of the input image is usually much larger than the resolution required for the exposure control model's calculations. By adjusting the input image resolution to a preset threshold (e.g., 256*256), information redundancy can be avoided, saving computational resources. Exposure control models are typically trained using RGB format training images, and performance is better in RGB format. Therefore, the input image format can be converted to RGB, and the resolution adjusted to 256*256, etc., before entering the exposure control model. For example, preprocessing includes format conversion, resolution adjustment, and normalization. Taking an input image in RGBA format as an example, by adjusting the resolution of the 4-channel I... RGBA输入图像 Convert to a 3-channel RGB image I RGB输入图像 That is, take the first three channels (I) of the input image in RGBA format. RGB输入图像 =I RGBA输入图像 [0:3]); then I RGB输入图像 Normalize by dividing by 255 to make I RGB输入图像 The data range remains between 0 and 1.

[0142] Please see Figure 13 In some implementations, step 012: regenerating and outputting the captured image based on the shooting exposure parameters, includes:

[0143] Step 0121: Regenerate the captured image based on the shooting exposure parameters;

[0144] Step 0122: Generate verification exposure parameters based on the preset exposure control model and the regenerated captured image;

[0145] Step 0123: If the shooting exposure parameters and the verification exposure parameters match, output the regenerated shooting image;

[0146] Step 0124: If the shooting exposure parameters and the verification exposure parameters do not match, update the shooting exposure parameters based on the verification exposure parameters, and re-enter the step of regenerating the shooting image based on the shooting exposure parameters.

[0147] Specifically, if the preview exposure parameters and the shooting exposure parameters do not match, a new shooting image is generated based on the shooting exposure parameters. Then, based on a preset exposure control model and the regenerated shooting image, a verification exposure parameter is generated to verify the shooting exposure parameters and ensure the image quality. If the shooting exposure parameters and the verification exposure parameters match, the regenerated shooting image is output. If the shooting exposure parameters and the verification exposure parameters do not match, the shooting exposure parameters are updated based on the verification exposure parameters, and the image is shot again to ensure the image quality of the output shooting image.

[0148] Please see Figure 14 Optionally, the imaging method further includes:

[0149] Step 022: If the number of times the captured image is regenerated based on the shooting exposure parameters reaches a preset threshold, output the captured image.

[0150] The preset number of times threshold can be 3 times, 4 times, 5 times, etc.

[0151] Specifically, to avoid excessively long waiting times for users and negatively impacting their user experience, the system outputs an image generated based on the exposure parameters of the third shot when the number of times the image is regenerated based on the shooting exposure parameters reaches a preset threshold (taking 3 times as an example).

[0152] Please see Figure 15 To facilitate better implementation of the imaging method of this application, this application also provides an imaging device 300. The imaging device 300 may include a generation module 301 and an output module 302. The generation module 301 generates a captured image using the preview exposure parameters of a preview image upon receiving a shooting instruction. The output module 302 regenerates and outputs the captured image based on the shooting exposure parameters when the shooting exposure parameters and preview exposure parameters do not match. Both the preview exposure parameters and the shooting exposure parameters are generated based on a preset exposure control model.

[0153] In one embodiment, the output module 302 can also be used to output the captured image when the shooting exposure parameters and preview exposure parameters of the captured image match.

[0154] In one embodiment, the imaging device 300 further includes a determining module 303, which is used to determine an exposure parameter range based on the shooting exposure parameters and a preset exposure latitude; if the preview exposure parameters are outside the exposure parameter range, determine that the shooting exposure parameters and the preview exposure parameters of the captured image do not match; and if the preview exposure parameters are within the exposure parameter range, determine that the shooting exposure parameters and the preview exposure parameters of the captured image match.

[0155] In one embodiment, the generation module 301 can also be used to generate preview exposure parameters based on a preset exposure control model and a preview image; and to generate shooting exposure parameters based on a preset exposure control model and a captured image.

[0156] In one embodiment, the imaging device 300 further includes a training module 304, which is used to acquire multiple training images and corresponding exposure indices; and to train an exposure control model until convergence based on the training images and corresponding exposure indices.

[0157] In one embodiment, the training module 304 is further configured to acquire multiple exposure images; perform inverse tone mapping on the exposure images to obtain high dynamic range images; and perform exposure compensation processing on the high dynamic range images to obtain multiple training images under different exposure parameters.

[0158] In one embodiment, the exposure model includes a first feature extraction module, a second feature extraction module, and a logistic regression layer. The generation module 301 is further configured to: extract features from the preview image based on the first feature extraction module to obtain a first feature of the preview image; extract features from the first feature of the preview image based on the second feature extraction module to obtain a second feature of the preview image, wherein the receptive field of the second feature extraction module is larger than that of the first feature extraction module; process the second feature of the preview image based on the logistic regression layer to determine a first exposure index corresponding to the preview image; and determine preview exposure parameters based on the first exposure index and the initial exposure parameters of the preview image.

[0159] In one embodiment, the exposure model includes a first feature extraction module, a second feature extraction module, and a logistic regression layer. The generation module 301 is further configured to: extract features from the captured image based on the first feature extraction module to obtain a first feature of the captured image; extract features from the first feature of the captured image based on the second feature extraction module to obtain a second feature of the captured image, wherein the receptive field of the second feature extraction module is larger than that of the first feature extraction module; process the second feature of the captured image based on the logistic regression layer to determine a second exposure index corresponding to the captured image; and determine the shooting exposure parameters based on the second exposure index and the preview exposure parameters.

[0160] In one embodiment, the imaging device 300 further includes a preprocessing module 306, which is used to preprocess the input image of the exposure control model. The preprocessing includes at least one of format conversion, resolution adjustment, and normalization.

[0161] In one embodiment, the output module 302 is further configured to regenerate the captured image based on the captured exposure parameters; generate verification exposure parameters based on a preset exposure control model and the regenerated captured image; if the captured exposure parameters and the verification exposure parameters match, output the regenerated captured image; if the captured exposure parameters and the verification exposure parameters do not match, update the captured exposure parameters based on the verification exposure parameters, and re-enter the step of regenerating the captured image based on the captured exposure parameters.

[0162] In one embodiment, the output module 302 is further configured to output the captured image when the number of times the captured image is regenerated based on the captured exposure parameters reaches a preset threshold.

[0163] The imaging device 300 has been described above from the perspective of functional modules with reference to the accompanying drawings. These functional modules can be implemented in hardware, in software instructions, or in a combination of hardware and software modules. Specifically, the steps of the method embodiments in this application can be completed by integrated logic circuits in the processor's hardware and / or by software instructions. The steps of the method disclosed in the embodiments of this application can be directly manifested as execution by a hardware encoding processor, or execution by a combination of hardware and software modules in the encoding processor. Optionally, the software module can reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps in the above method embodiments.

[0164] Please see Figure 16For example, taking the vehicle system as an Android system, when the in-vehicle camera is activated, the application (Android APP, a specific business application in the Android system) can call the Camera API (a collection of interface classes that provide interfaces for APPs to use camera functions), and then call the Android Camera HAL interface (the interaction layer in the Android system that connects the Android Framework layer and the driver layer for camera function operations) to allow the in-vehicle camera to make calls. The in-vehicle camera captures scene images of the current scene, and then inputs these images into the Camera API of the Android Framework layer (the interface layer provided by the Android system for APPs to use system-related functions). The Camera API then inputs the scene images into the imaging device to implement the imaging method. Based on the exposure control model, the exposure parameters corresponding to the scene image are determined, and then the imaging device inputs the exposure parameters into the Android Camera HAL to input the exposure parameters into the Camera application business module for imaging.

[0165] The electronic device according to the embodiments of this application includes a processor connected to a memory, which stores a computer program. The processor executes the computer program to implement the imaging method described in any of the above-mentioned embodiments. For the sake of brevity, it will not be described in detail here.

[0166] Please see Figure 2 The electronic device can be used as the processor 30 of the vehicle 100. The electronic device can be installed in the vehicle so that the vehicle can realize the imaging method of any of the above embodiments through the electronic device.

[0167] The vehicle described in this application includes the imaging device or electronic device described in the above embodiments, such as the vehicle's processor. The vehicle implements the imaging method described in any one of the above embodiments through the imaging device or electronic device.

[0168] Please see Figure 17 This application also provides a computer-readable storage medium 600 storing a computer program 610. When the computer program 610 is executed by the processor 620, it implements the steps of the imaging method of any of the above embodiments. For the sake of brevity, these steps will not be repeated here.

[0169] In the description of this specification, the references to terms such as "some embodiments," "in one example," "exemplarily," etc., indicate that a specific feature, structure, material, or characteristic described in connection with an embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0170] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the function involved, as will be understood by those skilled in the art to which embodiments of this application pertain.

[0171] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.

Claims

1. An imaging method, characterized in that, include: Upon receiving a shooting instruction, the system generates the captured image using the preview exposure parameters of the preview image. If the shooting exposure parameters of the captured image and the preview exposure parameters do not match, the captured image is regenerated and output based on the shooting exposure parameters. Both the preview exposure parameters and the shooting exposure parameters are generated based on a preset exposure control model.

2. The imaging method according to claim 1, characterized in that, The method further includes: If the shooting exposure parameters of the captured image and the preview exposure parameters match, the captured image is output.

3. The imaging method according to claim 1 or 2, characterized in that, The method further includes: Based on the shooting exposure parameters and the preset exposure latitude, the exposure parameter range is determined; If the preview exposure parameters are outside the range of the exposure parameters, it is determined that the shooting exposure parameters of the captured image and the preview exposure parameters do not match. If the preview exposure parameters are within the range of the exposure parameters, it is determined that the shooting exposure parameters of the captured image and the preview exposure parameters match.

4. The imaging method according to any one of claims 1-3, characterized in that, The method further includes: Based on the preset exposure control model and the preview image, the preview exposure parameters are generated; The shooting exposure parameters are generated based on the preset exposure control model and the captured image.

5. The imaging method according to claim 4, characterized in that, The method further includes: Acquire multiple training images and their corresponding exposure metrics; Based on the training images and corresponding exposure metrics, the exposure control model is trained until convergence.

6. The imaging method according to claim 5, characterized in that, The acquisition of multiple training images includes: Collect multiple exposure images; The exposed image is subjected to inverse tone mapping to obtain a high dynamic range image; Exposure compensation processing is performed on the high dynamic range image to obtain multiple training images under different exposure parameters.

7. The imaging method according to claim 5, characterized in that, The exposure index corresponding to the training image is determined based on at least one of the following: mean brightness, range of black areas, range of overexposure, effective exposure range based on brightness threshold range, effective exposure range based on Gaussian statistics, contrast, and saturation.

8. The imaging method according to claim 4, characterized in that, The exposure model includes a first feature extraction module, a second feature extraction module, and a logistic regression layer. The step of generating the preview exposure parameters based on a preset exposure control model and the preview image includes: Based on the first feature extraction module, feature extraction is performed on the preview image to obtain the first feature of the preview image; Based on the second feature extraction module, the first feature of the preview image is extracted to obtain the second feature of the preview image. The receptive field of the second feature extraction module is larger than that of the first feature extraction module. The second feature of the preview image is processed based on the logistic regression layer to determine the first exposure index corresponding to the preview image; The preview exposure parameters are determined based on the first exposure index and the initial exposure parameters of the preview image.

9. The imaging method according to claim 4, characterized in that, The exposure model includes a first feature extraction module, a second feature extraction module, and a logistic regression layer. The generation of the shooting exposure parameters based on the preset exposure model and the captured image includes: Based on the first feature extraction module, feature extraction is performed on the captured image to obtain the first feature of the captured image; Based on the second feature extraction module, the first feature of the captured image is extracted to obtain the second feature of the captured image. The receptive field of the second feature extraction module is larger than that of the first feature extraction module. The second feature of the captured image is processed based on the logistic regression layer to determine the second exposure index corresponding to the captured image; The shooting exposure parameters are determined based on the second exposure index and the preview exposure parameters.

10. The imaging method according to any one of claims 4, 5, 8 or 9, characterized in that, The method further includes: The input image of the exposure control model is preprocessed, and the preprocessing includes at least one of format conversion, resolution adjustment, and normalization.

11. The imaging method according to claim 1, characterized in that, The preview exposure parameters include the exposure parameters of the preview image with the smallest time difference between the acquisition time and the acquisition time of the captured image among multiple consecutive preview images.

12. The imaging method according to claim 1, characterized in that, The step of regenerating and outputting the captured image based on the captured exposure parameters includes: The captured image is regenerated based on the captured exposure parameters; Based on the preset exposure control model and the regenerated captured image, a verification exposure parameter is generated; If the shooting exposure parameters and the verification exposure parameters match, the regenerated shooting image is output; If the shooting exposure parameters and the verification exposure parameters do not match, the shooting exposure parameters are updated based on the verification exposure parameters, and the process re-enters the step of regenerating the shooting image based on the shooting exposure parameters.

13. The imaging method according to claim 12, characterized in that, The method further includes: If the number of times the captured image is regenerated based on the captured exposure parameters reaches a preset threshold, the captured image is output.

14. An electronic device, characterized in that, include: A processor connected to a memory; the memory stores a computer program, and the processor executes the computer program to implement the instructions of the imaging method according to any one of claims 1 to 13.

15. A vehicle, characterized in that, include: The electronic device according to claim 14.

16. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the imaging method as described in any one of claims 1-13.