Image acquisition method and device, equipment, storage medium and program product
By determining the brightness characteristics of the preview image in the image acquisition device and adjusting the exposure parameters using the exposure compensation model, the problem of inaccurate exposure in traditional exposure technology is solved, achieving higher quality image acquisition and a more efficient automatic exposure process.
Patent Information
- Application Number
- CN202511469046.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-14
- Publication Date
- 2026-01-09
AI Technical Summary
In traditional automatic exposure technology, the accuracy of adjusting the brightness target based on experience values is insufficient, resulting in inaccurate exposure, which affects the adaptability of image brightness to ambient brightness, and thus affects image quality.
By determining the brightness characteristics of the preview image in the viewfinder of the image acquisition device and inputting them into a pre-trained exposure compensation model, the target compensation ratio is obtained. The exposure parameters are then adjusted to achieve exposure compensation, ensuring the accuracy of the exposure.
It improves the accuracy of exposure, enhances the adaptability of target image brightness to ambient brightness, improves image quality, and increases the automatic exposure efficiency of image acquisition equipment.
Smart Images

Figure CN121309976A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of exposure control technology, and in particular to an image acquisition method, apparatus, device, storage medium, and program product. Background Technology
[0002] With the development of image acquisition devices such as smartphones, action cameras, tablets, camcorders, and drones, automatic exposure technology has emerged. This allows image acquisition devices to use more appropriate exposure levels when acquiring images, resulting in images with more suitable brightness. This is the foundation for image acquisition devices to acquire high-quality, high-definition images.
[0003] Traditional automatic exposure processing typically includes steps such as light intensity measurement, scene analysis, adjusting the brightness target, and convergence to determine the exposure amount. The brightness target is usually adjusted based on empirical values, and after adjustment, automatic exposure convergence is used to determine the exposure amount used during image acquisition, ensuring that the acquired image brightness matches the adjusted brightness target.
[0004] However, in the aforementioned traditional techniques, the accuracy of the brightness target obtained by adjusting based on empirical values needs to be improved, which affects the accuracy of the final exposure amount used. Furthermore, determining the exposure amount used during image acquisition through automatic exposure convergence is prone to convergence overshoot or convergence oscillation, which also affects the accuracy of the final exposure amount used. This, in turn, affects the adaptability of the acquired image brightness to the ambient brightness, and consequently affects the image quality. Summary of the Invention
[0005] Therefore, it is necessary to provide an image acquisition method, apparatus, device, storage medium, and program product to address the aforementioned technical problems. This method can improve the accuracy of the exposure used during image acquisition, thereby improving the adaptability of the acquired image brightness to the ambient brightness and ultimately enhancing image quality.
[0006] In a first aspect, this application provides an image acquisition method, including:
[0007] Determine the brightness characteristics of the preview image displayed in the viewfinder of the image acquisition device;
[0008] The brightness features are input into the exposure compensation model to obtain the target compensation ratio;
[0009] Exposure compensation is performed on the exposure parameters of the image acquisition device according to the target compensation ratio;
[0010] In response to the image acquisition command, the preview image is acquired based on the exposure parameters after exposure compensation to obtain the target image.
[0011] In one embodiment, the exposure compensation model is trained in the following manner:
[0012] Multiple image groups are acquired; each image group includes different reference images acquired at different exposure levels under the same field of view, and the field of view corresponding to different image groups is different; for each reference image, the brightness features of the reference image are determined, and the reference compensation ratio of the reference image is determined according to the ratio between the expected brightness value corresponding to the image group to which the reference image belongs and the brightness value of the reference image; using the brightness features of each reference image as samples and the reference compensation ratio of the reference image as labels, a preset initial model is trained to obtain an exposure compensation model.
[0013] In one embodiment, determining the brightness characteristics of the reference image includes:
[0014] Determine the brightness statistical region corresponding to the reference image; determine the brightness characteristics of the reference image based on the brightness information corresponding to the brightness statistical region; wherein, the brightness information includes at least one of ambient brightness, weighted average brightness, brightness histogram information, brightness dynamic range distribution information, overexposure ratio, interval brightness distribution ratio, backlighting degree, solid color ratio, color temperature information, and color distribution information.
[0015] In one embodiment, determining the brightness statistics region corresponding to the reference image includes:
[0016] The reference image is cropped to obtain a cropped image with a width-to-height ratio that meets a preset ratio. The cropped image is then downsampled according to a preset sampling factor to obtain the brightness statistics region corresponding to the reference image. Alternatively, the reference image is scaled according to its scaling ratio to obtain the brightness statistics region corresponding to the reference image.
[0017] In one embodiment, the image acquisition method further includes:
[0018] For each image group, candidate brightness values are selected from the brightness values of different reference images in the image group based on the subordinate relationship between the brightness value of each reference image in the image group and the corresponding reference brightness value range of the image group; candidate brightness values are determined based on the difference between the converged brightness value obtained by simulating the convergence processing of each candidate brightness value and the midpoint value of the reference brightness value range; and the desired brightness value corresponding to the image group is selected from the candidate brightness values based on the frequency of occurrence of each candidate brightness value.
[0019] In one embodiment, a preset initial model is trained using the brightness features of each reference image as samples and the reference compensation ratio of the reference image as labels to obtain an exposure compensation model, including:
[0020] The brightness features of each reference image are input into a preset initial model to obtain the predicted compensation ratio of the reference image output by the preset initial model; the loss value of the preset initial model is determined based on the difference between the predicted compensation ratio and the reference compensation ratio of each reference image; the model parameters of the preset initial model are adjusted based on the loss value to obtain the exposure compensation model.
[0021] Secondly, this application also provides an image acquisition device, comprising:
[0022] The feature determination module is used to determine the brightness characteristics of the preview image displayed in the viewfinder of the image acquisition device;
[0023] The ratio acquisition module is used to input brightness features into the exposure compensation model to obtain the target compensation ratio;
[0024] The exposure compensation module is used to compensate the exposure parameters of the image acquisition device according to the target compensation ratio.
[0025] The image acquisition module is used to respond to image acquisition commands and acquire images from the preview image according to the exposure parameters after exposure compensation to obtain the target image.
[0026] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the various method embodiments of the first aspect described above.
[0027] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the method embodiments of the first aspect described above.
[0028] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps in the method embodiments of the first aspect described above.
[0029] The aforementioned image acquisition method, apparatus, device, storage medium, and program product, during the image acquisition process, when a preview image is displayed in the viewfinder of the image acquisition device, determine the brightness characteristics of the preview image and input these brightness characteristics into a pre-trained exposure compensation model. The exposure compensation model then outputs a target compensation ratio based on the input brightness characteristics. Therefore, the exposure parameters of the image acquisition device can be adjusted according to this target compensation ratio to compensate for the exposure, thereby adjusting the exposure level of the image acquisition device. In response to an image acquisition command, the image acquisition device can acquire the preview image displayed in the viewfinder based on the exposure parameters after the exposure compensation to obtain the target image. In other words, when acquiring the target image, the exposure level used by the image acquisition device is determined by adjusting the exposure parameters of the image acquisition device according to the target compensation ratio. In this way, on the one hand, by pre-training the exposure compensation model, the accuracy of the target compensation ratio obtained by the exposure compensation model can be improved, thereby improving the accuracy of the exposure amount used by the image acquisition device when acquiring the target image, and thus improving the adaptability of the target image brightness to the ambient brightness, thereby improving image quality. On the other hand, by using the exposure compensation model, the target compensation ratio can be directly determined by the brightness characteristics of the preview image. Thus, the exposure ratio can be directly obtained during the image acquisition process through end-to-end learning, thereby achieving direct determination of the exposure amount without having to complete the exposure amount convergence through multiple frames of images. This improves the automatic exposure efficiency of the image acquisition device, and thus improves the image acquisition efficiency of the image acquisition device. Attached Figure Description
[0030] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0031] Figure 1 This application provides an application environment diagram for the image acquisition method provided in some embodiments of this application.
[0032] Figure 2 A schematic flowchart illustrating the image acquisition method provided in some embodiments of this application;
[0033] Figure 3 A schematic flowchart illustrating the training of an exposure compensation model provided in some embodiments of this application;
[0034] Figure 4 A flowchart illustrating the process of determining the brightness features of a reference image, provided for some embodiments of this application;
[0035] Figure 5 A flowchart illustrating the process of determining the desired brightness value corresponding to an image group, provided in some embodiments of this application;
[0036] Figure 6 A schematic diagram illustrating the process of training a preset initial model provided in some embodiments of this application;
[0037] Figure 7 A schematic flowchart illustrating an image acquisition method provided in other embodiments of this application;
[0038] Figure 8 Structural block diagrams of image acquisition devices provided in some embodiments of this application;
[0039] Figure 9 Internal structural diagrams of a computer device provided in some embodiments of this application;
[0040] Figure 10 Internal structural diagrams of a computer device provided for other embodiments of this application. Detailed Implementation
[0041] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0042] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments or any combination of multiple embodiments.
[0043] Traditional automatic exposure processing typically includes steps such as light intensity measurement, scene analysis, adjusting the brightness target, and convergence to determine the exposure amount. The brightness target is usually adjusted based on empirical values, and after adjustment, automatic exposure convergence is used to determine the exposure amount used during image acquisition, ensuring that the acquired image brightness matches the adjusted brightness target.
[0044] However, in the aforementioned traditional techniques, the accuracy of the brightness target obtained by adjusting based on empirical values needs to be improved, which affects the accuracy of the final exposure amount used. Furthermore, determining the exposure amount used during image acquisition through automatic exposure convergence is prone to convergence overshoot or convergence oscillation, which also affects the accuracy of the final exposure amount used. This, in turn, affects the adaptability of the acquired image brightness to the ambient brightness, and consequently affects the image quality.
[0045] In view of this, and to solve the above-mentioned technical problems, an exemplary embodiment provides an image acquisition method. This method can be applied to a computer device, which can be a server or an image acquisition device. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The image acquisition device can be, but is not limited to, various smartphones, action cameras, tablets, camcorders, digital cameras, drones, industrial cameras, smartwatches, smart glasses, and other devices with image acquisition capabilities.
[0046] In an exemplary embodiment, the above-described image acquisition method can be executed by a device such as a chip or a chip module.
[0047] In one exemplary embodiment, the image acquisition method provided in this application can be applied to, for example, Figure 1 In the application environment shown, the image acquisition device 102 communicates with the server 104 via a network. A data storage system can store the data that the server 104 needs to process. The data storage system can be integrated onto the server 104 or located in the cloud or on another network server. The image acquisition device 102 stores the brightness characteristics of the preview image displayed in the viewfinder into the data storage system, and then the server 104 retrieves these brightness characteristics from the data storage system to execute the image acquisition method provided in this embodiment.
[0048] In one exemplary embodiment, such as Figure 2 As shown, an image acquisition method is provided, which can be applied to... Figure 1 Taking the image acquisition device 102 as an example, the following steps may be included:
[0049] S201, Determine the brightness characteristics of the preview image displayed in the viewfinder of the image acquisition device.
[0050] The viewfinder is a component in an image acquisition device used to preview the shooting scene, determine the scope and composition of the frame. Its core function is to allow users to see the "image to be captured (i.e. the shooting result)" in advance before shooting, so as to avoid compositional deviations and ensure that the image content of the final acquired image meets the user's needs.
[0051] In the process of image acquisition by the image acquisition device, the "image to be captured" displayed in the viewfinder of the image acquisition device can be called the preview image. In order to accurately determine the exposure used by the image acquisition device when acquiring the preview image and improve the image quality of the final acquired image, the brightness characteristics of the preview image can be determined first.
[0052] In one optional embodiment, the brightness features of the preview image are determined based on the brightness information of the preview image. Optionally, feature fusion is performed on the brightness information of the preview image to concatenate the brightness information of the preview image into a multi-dimensional feature vector, which serves as the brightness feature of the preview image; or, data preprocessing is performed on the brightness information of the preview image to process it into feature vectors of specified dimensions, and a combination of feature vectors is obtained as the brightness feature of the preview image. The specified dimensions can be set based on empirical values, experimental values from multiple trials, and application requirements of actual applications, etc., and are not specifically limited in this regard.
[0053] In another alternative embodiment, the brightness information of the preview image is determined as a brightness feature of the preview image.
[0054] Optionally, the aforementioned brightness information may include at least one of the following: ambient brightness, average brightness, weighted average brightness, brightness histogram information, brightness dynamic range distribution information, overexposure ratio, interval brightness distribution ratio, backlighting degree, solid color ratio, color temperature information, and color distribution information. Optionally, if the preview image includes a face, the aforementioned brightness information may also include face information.
[0055] In another optional embodiment, a brightness statistics region corresponding to the preview image is determined, and the brightness characteristics of the preview image are determined based on the brightness information of the brightness statistics region corresponding to the preview image. Optionally, the brightness statistics region corresponding to the preview image can be the complete image region of the preview image; or, the preview image is cropped so that the aspect ratio of the cropped preview image meets a preset ratio, and the cropped preview image is downsampled according to a preset sampling factor, then the downsampled preview image can be used as the brightness statistics region corresponding to the preview image; or, the preview image is scaled according to the scaling ratio of the preview image so that the image size of the scaled preview image is the same as the preset original image size, then the scaled preview image can be used as the brightness statistics region corresponding to the preview image. The preset ratio and preset original image size can be set based on empirical values, experimental values from multiple trials, and application requirements in actual applications (such as the data volume limit of the exposure compensation model input data, the original image size of the image acquisition device, etc.), and are not specifically limited in these respects.
[0056] S202, input the brightness features into the exposure compensation model to obtain the target compensation ratio.
[0057] Since the exposure compensation model learns by targeting the desired brightness of the image under different field of view angles, and uses the brightness features of each reference image as samples and the reference compensation ratio of the reference image as labels, it is trained on a preset initial model. Therefore, after obtaining the brightness features of the preview image, the brightness features of the preview image can be input into the exposure compensation model so that the exposure compensation model can perform model inference based on the input brightness features and output the inferred compensation ratio as the target compensation ratio.
[0058] The aforementioned target compensation ratio characterizes the ratio between the desired brightness value of the shooting scene corresponding to the preview image and the brightness value of the preview image. Based on this target compensation ratio, the exposure of the image acquisition device is adjusted to ensure appropriate exposure, avoiding overexposure or underexposure. By using the adjusted exposure to acquire the preview image, the brightness value of the acquired target image can meet (as closely as possible to or even reach) the aforementioned desired brightness value. This makes the target image as close as possible to or even reach the optimal image brightness value in the shooting scene of the preview image, improving the adaptability of the target image's brightness to the current ambient brightness and enhancing the image quality of the target image.
[0059] S203, perform exposure compensation on the exposure parameters of the image acquisition device according to the target compensation ratio.
[0060] Exposure compensation refers to increasing or decreasing the exposure of an image acquisition device by adjusting its exposure parameters.
[0061] Exposure refers to the total amount of light actually received by the image sensor of an image acquisition device during image acquisition. It directly determines the sensitivity of the acquired image and is usually determined by light intensity and the time the sensor receives light. It is a physical quantity that measures whether an image is underexposed or overexposed. Optionally, exposure value (EV) can also be used to characterize exposure. Exposure value is a standardized relative unit for measuring the degree of image exposure, and its core function is to describe the exposure level under different aperture and shutter speed combinations.
[0062] Exposure parameters are those used in image acquisition devices to control the amount of light exposure, including aperture, shutter speed, and ISO (International Organization for Standardization) sensitivity. Adjusting these exposure parameters allows you to control the overall exposure of the image acquisition device.
[0063] In this way, after obtaining the target compensation ratio, the exposure parameters of the image acquisition device can be compensated according to the target compensation ratio so that the exposure of the image acquisition device after exposure compensation is as close as possible to or even reaches the expected exposure corresponding to the expected brightness value of the shooting scene to which the preview image belongs, that is, the exposure compensation of the exposure of the image acquisition device is achieved.
[0064] In one optional embodiment, after obtaining the target compensation ratio, the current brightness value of the preview image is first determined. Then, based on the target compensation ratio and the current brightness value of the preview image, the brightness value to be compensated is determined as the brightness compensation value. This brightness compensation value includes a compensation direction (e.g., increase or decrease) and a compensation amount (the specific amount of brightness increase or decrease). Next, the adjustment direction and amount of the exposure of the image acquisition device corresponding to the compensation value are determined. Then, based on the adjustment direction and amount of the exposure, the exposure parameters of the image acquisition device (e.g., at least one of aperture, shutter speed, and ISO sensitivity) are adjusted to complete the exposure compensation of the image acquisition device's exposure parameters. Optionally, the aperture and shutter speed of the image acquisition device can be adjusted first based on the adjustment direction and amount of the exposure, and the ISO sensitivity of the image acquisition device can be adjusted when the aperture and / or shutter speed reach their limits.
[0065] In another optional embodiment, a pre-determined correspondence between different compensation ratios and the adjustment amounts of the exposure parameters of the image acquisition device is established. After obtaining the target compensation ratio, the adjustment amount corresponding to the target compensation ratio is found in the aforementioned correspondence. Then, based on the found adjustment amount, the exposure parameters of the image acquisition device are adjusted to complete the exposure compensation of the image acquisition device's exposure parameters. Optionally, if no compensation ratio identical to the target compensation ratio exists in the aforementioned correspondence, the adjustment amount corresponding to the compensation ratio with the smallest difference from the target compensation ratio in the aforementioned correspondence is used to adjust the exposure parameters of the image acquisition device based on the found adjustment amount.
[0066] The process of compensating for the exposure parameters of the image acquisition device described above can be called the automatic exposure control process of the image acquisition device.
[0067] S204, in response to the image acquisition command, acquires the preview image based on the exposure parameters after exposure compensation to obtain the target image.
[0068] After completing the exposure compensation of the exposure parameters of the image acquisition device, it can be assumed that the exposure of the image acquisition device after exposure compensation satisfies (as close as possible to or reaches) the expected exposure corresponding to the expected brightness value of the shooting scene to which the preview image belongs. Therefore, the brightness value of the target image obtained by the image acquisition device using this exposure to acquire the preview image can satisfy (as close as possible to or reach) the expected brightness value corresponding to the shooting scene to which the preview image belongs.
[0069] Based on this, after completing the exposure compensation of the exposure parameters of the image acquisition device, upon receiving an image acquisition command, the image acquisition device can acquire the preview image according to the exposure parameters after the exposure compensation, and obtain the target image.
[0070] Optionally, the user can send an image acquisition command to the image acquisition device by pressing the shutter button. The image acquisition device will then respond to the shutter button press and acquire the image from the preview image according to the exposure parameters after exposure compensation to obtain the target image. Alternatively, the image acquisition device can be pre-set to automatically acquire the image after automatic exposure is completed and a specified time has elapsed. In other words, after exposure compensation of the image acquisition device's exposure parameters is completed and a specified time has elapsed, the image acquisition device automatically generates an image acquisition command and, in response to its own automatically generated image acquisition command, acquires the image from the preview image according to the exposure parameters after exposure compensation to obtain the target image. The specified time can be set based on empirical values, experimental values from multiple trials, and the actual image acquisition requirements of the application, and is not specifically limited in this regard.
[0071] In the above image acquisition method, during the image acquisition process, when a preview image is displayed in the viewfinder of the image acquisition device, the brightness characteristics of the preview image are determined, and these brightness characteristics are input into a pre-trained exposure compensation model. The exposure compensation model then outputs a target compensation ratio based on the input brightness characteristics. Therefore, the exposure parameters of the image acquisition device can be adjusted according to this target compensation ratio to compensate for the exposure, thereby adjusting the exposure level of the image acquisition device. In response to an image acquisition command, the image acquisition device can acquire the preview image displayed in the viewfinder based on the exposure parameters after the exposure compensation to obtain the target image. In other words, when acquiring the target image, the exposure level used by the image acquisition device is determined by adjusting the exposure parameters of the image acquisition device according to the target compensation ratio. In this way, on the one hand, by pre-training the exposure compensation model, the accuracy of the target compensation ratio obtained by the exposure compensation model can be improved, thereby improving the accuracy of the exposure amount used by the image acquisition device when acquiring the target image, and thus improving the adaptability of the target image brightness to the ambient brightness, thereby improving image quality. On the other hand, by using the exposure compensation model, the target compensation ratio can be directly determined by the brightness characteristics of the preview image. Thus, the exposure ratio can be directly obtained during the image acquisition process through end-to-end learning, thereby achieving direct determination of the exposure amount without having to complete the exposure amount convergence through multiple frames of images. This improves the automatic exposure efficiency of the image acquisition device, and thus improves the image acquisition efficiency of the image acquisition device.
[0072] Based on the above embodiments, in one exemplary embodiment, the training of the exposure compensation model is further refined. Optionally, such as Figure 3 As shown, the following steps may be included:
[0073] S301, acquire multiple image groups.
[0074] Each image group includes different reference images acquired at different exposures under the same field of view, and the field of view is different for different image groups.
[0075] To obtain multiple samples for training the exposure compensation model, multiple different field-of-view angles can be selected, and multiple different exposure levels can be set for each field-of-view angle. Images are then sequentially acquired using these different exposure levels within that field-of-view angle, resulting in multiple images that form a set of reference images. This allows for the acquisition of multiple image sets, each containing different reference images acquired at different exposure levels within the same field-of-view angle, with different field-of-view angles corresponding to different image sets. Optionally, for each field-of-view angle, the exposure levels within the automatic exposure range of the image acquisition device can be set as the exposure levels used for acquiring the reference images within that field-of-view angle. Optionally, the shooting scenes corresponding to different image sets can be the same, for example, all shooting buildings in a daytime scene. Alternatively, the shooting scenes corresponding to different image sets can not be completely identical, for example, some shooting people in a daytime scene, some shooting trees in a daytime scene, and some shooting buildings in a nighttime scene, etc.
[0076] Optionally, each image group includes n reference images, each with a width of W, a height of H, and a single-channel bit count of m bits; where n>1. The single-channel bit count refers to the number of binary bits used to store luminance or color information in a single color difference channel of the image. Its core function is to determine the number of luminance levels that the channel can represent, directly affecting the color detail of the image and the ability to retain details in shadows and / or highlights. The values of n, W, H, and m can be set based on empirical values, experimental values from multiple trials, and application requirements (such as image acquisition requirements, data volume limitations of model input data, etc.), and no specific limitations are imposed on them.
[0077] S302, for each reference image, determine the brightness characteristics of the reference image, and determine the reference compensation ratio of the reference image based on the ratio between the expected brightness value corresponding to the image group to which the reference image belongs and the brightness value of the reference image.
[0078] After obtaining the above multiple image groups, multiple reference images can be obtained, thereby determining the brightness characteristics and reference compensation ratio of each reference image.
[0079] The method for determining the brightness characteristics of each reference image is the same as the method for determining the image characteristics of the preview image in S201 above, and no specific limitations are made thereto.
[0080] Accordingly, for each reference image, a reference compensation ratio can be determined based on the ratio between the expected brightness value of the image group to which the reference image belongs and the brightness value of the reference image itself. The brightness value of the reference image can be the average brightness value, weighted average brightness value, etc., and is not specifically limited thereto. Optionally, for each reference image, the ratio between the expected brightness value of the image group to which the reference image belongs and the brightness value of the reference image itself is determined as the reference compensation ratio for that reference image; or, for each reference image, the ratio between the expected brightness value of the image group to which the reference image belongs and the brightness value of the reference image itself is determined, and the product of the above ratio and a preset coefficient is determined as the reference compensation ratio for that reference image; wherein the preset coefficient can be set based on empirical values, experimental values from multiple trials, and application requirements of actual applications, and is not specifically limited thereto.
[0081] The desired brightness value corresponding to an image group refers to the image brightness value that best matches the ambient brightness when the image acquired at the corresponding field of view of the image group presents an "ideal visual effect." Optionally, the desired brightness value corresponding to the image group can also be referred to as the optimal brightness value or target brightness value corresponding to the image group.
[0082] In one optional embodiment, the method for determining the expected brightness value corresponding to each image group may include: for each image group, performing brightness score statistics on each reference image in the image group, and selecting the brightness value of the reference image with the highest brightness score to obtain the expected brightness value corresponding to the image group. Specifically, for each image group, the brightness of each reference image in the image group can be scored based on the presentation effect of the reference image by the user, image quality evaluation model, etc., and the brightness score statistics for each reference image in the image group can be performed. For example, the combined brightness scores obtained for each reference image in the image group can be determined as the statistical result of the brightness score for that reference image. A higher brightness score for a reference image indicates a higher presentation effect (i.e., image quality), thus indicating a higher probability that the brightness value of the reference image is the expected brightness value corresponding to that image group. In this way, the reference image with the highest statistical brightness score can be selected, and the brightness value of the selected reference image can be used as the expected brightness value corresponding to that image group. Optionally, multiple users can be invited to vote on multiple reference images for each image group. For each image group, each user selects the reference image they believe has the best brightness value from the multiple reference images in that group. Then, for each image group, the number of times each reference image is selected is counted. The brightness value of the reference image with the highest number of selections can be used as the expected brightness value for that image group. In other words, the image acquisition device can obtain the voting results of each reference image in each image group and, for each image group, select the brightness value of the reference image with the highest number of votes in that image group as the expected brightness value for that image group.
[0083] S303, using the brightness features of each reference image as samples and the reference compensation ratio of the reference image as labels, trains the preset initial model to obtain the exposure compensation model.
[0084] After obtaining the brightness features and reference compensation ratio of each reference image, the brightness features of each reference image are used as samples, and the reference compensation ratio of that reference image is used as a label to train a preset initial model to obtain an exposure compensation model. During the training of the preset initial model, the expected brightness value corresponding to the aforementioned image group is the learning objective of the preset initial model. Optionally, during the training of the preset initial model, the brightness value of the reference image is adjusted according to the compensation ratio learned by the preset initial model. The difference between the adjusted brightness value of the reference image and the expected brightness value corresponding to the image group to which the reference image belongs is used as the optimization objective function. Through iterative training, the difference between the adjusted brightness value of the reference image and the expected brightness value corresponding to the image group to which the reference image belongs is gradually reduced until the difference is minimized (i.e., the function value of the optimization objective function is minimized).
[0085] Optionally, the aforementioned preset initial model can be a Multilayer Perceptron (MLP). Before training the MLP, model parameters such as the number of layers, bias dimension, loss function, learning optimizer, number of iterations, batch size, and learning rate can be preset. During training, the weights of the MLP can be gradually adjusted to obtain the exposure compensation model. These model parameters can be set based on empirical values, experimental results from multiple trials, and the specific application requirements; no specific limitations are imposed.
[0086] Optionally, the aforementioned preset initial model can also be other types of models, such as CNN (Convolutional Neural Network) models, RNN (Recurrent Neural Network) models, support vector machines (SVM), etc. The type of the aforementioned preset initial model can be set based on empirical values, experimental values from multiple trials, and the application requirements of actual applications, and there are no specific limitations on this.
[0087] In this embodiment, the brightness features of each reference image are used as samples, and the reference compensation ratio of the reference image is used as a label to train a preset initial model to obtain an exposure compensation model. This can improve the accuracy of the target compensation ratio obtained by the exposure compensation model, thereby improving the adaptability of the target image brightness to the ambient brightness and thus improving image quality. Furthermore, by using end-to-end learning, the exposure ratio during the image acquisition process can be directly obtained, thereby directly determining the exposure amount without having to complete the exposure amount convergence through multiple frames of images. This improves the automatic exposure efficiency of the image acquisition device and thus improves the image acquisition efficiency.
[0088] Based on the above embodiments, in an exemplary embodiment, the determination of the brightness characteristics of the reference image in S302 is further refined. Optionally, such as Figure 4 As shown, the following steps may be included:
[0089] S401, Determine the brightness statistics region corresponding to the reference image.
[0090] Optionally, the entire image region of the reference image can be defined as the brightness statistics region corresponding to the reference image.
[0091] In one optional embodiment, S401 may include cropping the reference image to obtain a cropped image whose aspect ratio satisfies a preset ratio, and downsampling the cropped image according to a preset sampling factor to obtain the brightness statistics region corresponding to the reference image.
[0092] In some cases, due to limitations in the amount of input data for the preset initial model, the brightness features of the complete image region of the reference image cannot be directly input into the preset initial model. Therefore, it is necessary to downsample the reference image to reduce the amount of data for its brightness features. Furthermore, downsampling the reference image often requires its aspect ratio to meet a set ratio, such as 4:3. Therefore, if the original aspect ratio of the reference image does not meet the set ratio, the reference image can first be cropped to obtain a cropped image with the desired aspect ratio. Then, based on a preset sampling factor, the cropped image can be downsampled to obtain the corresponding brightness statistical region of the reference image. Optionally, if the original aspect ratio of the reference image meets the set ratio, the reference image can be directly downsampled based on a preset sampling factor to obtain the corresponding brightness statistical region. The brightness statistical region of the reference image is the image region obtained after downsampling. The aforementioned preset ratio and preset sampling multiple can be set based on empirical values, experimental values from multiple trials, and application requirements in actual applications (such as the data volume limit of the preset initial model input data, etc.), and no specific limitations are imposed on them.
[0093] In another optional embodiment, S401 may include scaling the reference image according to the scaling ratio of the reference image to obtain the brightness statistics region corresponding to the reference image.
[0094] In some cases, the reference image is acquired by scaling up the original preview image captured by the image acquisition device. For example, if the original preview image is magnified 4 times during image acquisition, the width and height of the resulting reference image will be twice that of the original preview image, respectively. Therefore, to ensure the accuracy of the image features of the obtained reference image, it can be scaled according to its scaling ratio. That is, the size of the reference image is restored to the size of the original preview image by scaling, and the scaled reference image is then used as the corresponding brightness statistical region. Optionally, if the reference image is acquired by magnifying the original preview image, the reference image can be reduced in size according to its magnification ratio relative to the original preview image to obtain the corresponding brightness statistical region; or, if the reference image is acquired by reducing the size of the original preview image, the reference image can be magnified according to its reduction ratio relative to the original preview image to obtain the corresponding brightness statistical region.
[0095] S402, determine the brightness characteristics of the reference image based on the brightness information corresponding to the brightness statistics area.
[0096] The brightness information includes at least one of the following: ambient brightness, weighted average brightness, brightness histogram information, brightness dynamic range distribution information, overexposure ratio, interval brightness distribution ratio, backlighting degree, pure color ratio, color temperature information, and color distribution information.
[0097] In one optional embodiment, feature fusion is performed on the brightness information corresponding to the brightness statistics region to concatenate the brightness information corresponding to the brightness statistics region into a multi-dimensional feature vector, which serves as the brightness feature of the reference image; or, data preprocessing is performed on the brightness information corresponding to the brightness statistics region to process it into feature vectors of a specified dimension, and a combination of feature vectors is obtained, which serves as the brightness feature of the reference image.
[0098] Among the aforementioned brightness information, the so-called dynamic range distribution information refers to the brightness span from the darkest to the brightest pixel in the image, and the proportion of pixels at different brightness levels within this span. The overexposure ratio refers to the proportion of pixels whose brightness values exceed a preset overexposure threshold in the total number of pixels in the image. The interval brightness distribution ratio refers to the proportion of pixels whose brightness values belong to each fixed interval in the image, when the overall brightness range of the image is divided into several intervals. The backlighting degree is an indicator used to describe the strength of the contrast between light and dark areas in an image caused by the light source direction being opposite to the shooting direction, quantifying the brightness difference between dark and bright areas in backlit scenes and judging the degree of impact of backlighting on the presentation of image details. The pure color ratio refers to the proportion of pixels in pure color areas (such as pure red, pure blue, pure white, etc.) in the total number of pixels in the image. Optionally, if the preview image includes a face, the aforementioned brightness information may also include face information. Optionally, the aforementioned brightness information may also include average brightness. Specifically, the average brightness of an image is determined by the ratio of the sum of the brightness values of all pixels in the image to the total number of pixels in the image. Correspondingly, the image is divided into regions, and a weight is assigned to each region. Then, for each region, the ratio of the sum of the brightness values of all pixels in that region to the total number of pixels in that region is determined as the average brightness of that region. The product of the average brightness of each region and the weight of that region is then determined, and the sum of the resulting products is determined. This sum is the weighted average brightness of the image.
[0099] In this embodiment, by determining the brightness statistics region of the reference image and determining the brightness features of the reference image based on the brightness information corresponding to the brightness statistics region, it is possible to ensure that the data volume of the brightness features of the reference image meets the preset data volume limit of the initial model input data, and improve the accuracy of the obtained brightness features of the reference image, thereby improving the inference accuracy of the exposure compensation model finally trained.
[0100] Based on the above embodiments, in an exemplary embodiment, the determination of the desired brightness value corresponding to the image group in S302 is further refined. Optionally, such as Figure 5 As shown, the following steps may be included:
[0101] S501, for each image group, select candidate brightness values from the brightness values of different reference images in the image group according to the subordinate relationship between the brightness value of each reference image in the image group and the reference brightness value range corresponding to the image group.
[0102] Generally, the required image brightness varies depending on the imaging and optical principles of the image acquisition device, as well as empirical values. For example, the brightness requirement for night scene photography is typically between 90-130, while for everyday landscape photography it is typically between 130-170. Therefore, a baseline brightness range can be set for different shooting scenarios. This baseline range refers to the range of image brightness values that achieves a relatively high degree of adaptation to ambient brightness while maintaining an "ideal visual effect" in the captured image. Thus, for each image group, the corresponding baseline brightness range can be determined based on the shooting scenario associated with that image group.
[0103] In this way, for each image group, it can be determined whether the brightness value of each reference image in the image group belongs to the reference brightness value range corresponding to the image group, so as to obtain the subordinate relationship between the brightness value of each reference image in the image group and the reference brightness value range corresponding to the image group. Then, brightness values that do not belong to the reference brightness value range corresponding to the image group are removed from the brightness values of different reference images in the image group. The remaining brightness values that are not removed can be used as candidate brightness values.
[0104] S502, determine the candidate brightness value based on the difference between the converged brightness value obtained by simulating the convergence process of each candidate brightness value and the midpoint value of the reference brightness value range.
[0105] The midpoint value of the reference brightness range refers to the average of the starting and ending values of the reference brightness range.
[0106] As mentioned earlier, for each image group, each selected candidate brightness value is located within the reference brightness value range corresponding to that image group. The difference between different candidate brightness values and the midpoint value of the reference brightness value range corresponding to that image group can be different. Therefore, the difference between each candidate brightness value and the midpoint value of the reference brightness value range can be further determined. Based on this difference, each candidate brightness value is simulated to converge to obtain the converged brightness value of the candidate brightness value. Then, the difference between the converged brightness value and the midpoint value of the aforementioned reference brightness value range can be determined to determine the candidate brightness value based on the aforementioned difference.
[0107] In one optional embodiment, for each candidate brightness value, a simulated convergence process is performed to obtain a converged brightness value. If the difference between the converged brightness value and the midpoint value of the reference brightness value range is less than a first threshold, the converged brightness value is determined as a candidate brightness value. Alternatively, if the difference between the converged brightness value and the midpoint value of the reference brightness value range is less than the first threshold, and the image quality of the image after simulated convergence processing meets the image quality requirements, the converged brightness value is determined as a candidate brightness value. For example, if the difference between the converged brightness value and the midpoint value of the reference brightness value range is less than the first threshold, and the image quality of the image after simulated convergence does not meet the image quality requirements due to blurred distant details, then the converged brightness value is not determined as a candidate brightness value.
[0108] In another optional embodiment, for each candidate brightness value, it can first be determined whether simulated convergence is needed for that candidate brightness value based on the difference between the candidate brightness value and the midpoint value of the reference brightness value range. Specifically, for each candidate brightness value, if the difference between the candidate brightness value and the midpoint value of the reference brightness value range is less than a second threshold, it is determined that simulated convergence is not needed for that candidate brightness value, and the candidate brightness value is directly determined as a candidate brightness value. Correspondingly, if the difference between the candidate brightness value and the midpoint value of the reference brightness value range is not less than a first threshold, simulated convergence is performed on the candidate brightness value by fine-tuning the exposure parameters to obtain a converged brightness value. If the difference between the converged brightness value and the midpoint value of the reference brightness value range is not less than the first threshold, the converged brightness value is determined as a candidate brightness value. The first threshold and the second threshold can be the same or different, and both the first threshold and the second threshold can be set based on empirical values, experimental values from multiple experiments, and application requirements of actual applications. No specific limitations are imposed on them.
[0109] Optionally, different candidate brightness values correspond to converged brightness values, and the converged intensity value corresponding to any candidate brightness value can also be the same as other candidate brightness values. Therefore, in the process of traversing each candidate brightness value to determine the candidate brightness value one by one, multiple identical candidate brightness values can be determined. Thus, after traversing all candidate brightness values, the determined candidate brightness values can be deduplicated to obtain the final candidate brightness value.
[0110] It should be noted that the above optional embodiments are merely examples of methods for determining candidate brightness values and are not intended to limit the scope of protection of the embodiments of this application. Any specific implementation method that can determine candidate brightness values is within the scope of protection of the embodiments of this application.
[0111] S503, select the desired brightness value corresponding to the image group from the candidate brightness values based on the frequency of occurrence of each candidate brightness value.
[0112] After obtaining the aforementioned candidate brightness values, the frequency of occurrence of each candidate brightness value can be determined. This frequency, also known as the adaptation frequency, refers to the number of times a candidate brightness value appears during the process of traversing the candidate brightness values and determining the candidate brightness value. For example, for each candidate brightness value, if three candidate brightness values have converged brightness values that are identical to the candidate brightness value, then the candidate brightness value appears three times. Or, for another example, if three candidate brightness values have converged brightness values that are identical to the candidate brightness value, and one candidate brightness value is identical to the candidate brightness value, then the candidate brightness value appears four times. Therefore, the candidate brightness value with the highest frequency can be selected as the desired brightness value for that image group.
[0113] Optionally, the process of determining the desired brightness value described above can be called the automatic exposure algorithm convergence process, that is, the desired brightness value corresponding to each image group is determined by the convergence of the automatic exposure algorithm.
[0114] In this embodiment, by setting a reference brightness value range for each image group, and by comparing the subordinate relationship between the brightness value of each reference image and the reference brightness value range, candidate brightness values are determined. Furthermore, by comparing the converged brightness value obtained from the simulated convergence processing of each candidate brightness value with the midpoint value of the reference brightness value range, candidate brightness values are determined. Then, based on the frequency of occurrence of the candidate brightness values, the expected brightness value corresponding to the image group is determined. This improves the accuracy of the determined expected brightness value for each image group, thereby increasing the accuracy of the reference compensation ratio for each reference image and improving the inference accuracy of the trained exposure compensation model.
[0115] Based on the above embodiments, in an exemplary embodiment, the training of the preset initial model in S303 is further refined. Optionally, such as Figure 6 As shown, the following steps may be included:
[0116] S601, input the brightness features of each reference image into the preset initial model to obtain the prediction compensation ratio of the reference image output by the preset initial model.
[0117] When the brightness features of each reference image are used as samples and the reference compensation ratio of the reference image is used as a label, the preset initial model is trained. After the brightness features of each reference image are input into the preset initial model, the preset initial model can perform compensation ratio inference based on the input brightness features and output the compensation ratio corresponding to the input brightness features. The compensation ratio output by the preset initial model is the predicted compensation ratio of the reference image.
[0118] S602, determine the loss value of the preset initial model based on the difference between the predicted compensation ratio and the reference compensation ratio of each reference image.
[0119] Given the prediction compensation ratio of each reference image output by the preset initial model, the difference between the prediction compensation ratio and the reference compensation ratio of each reference image can be determined, and the loss value of the preset initial model can be determined based on the determined difference.
[0120] Optionally, the difference between the predicted compensation ratio and the reference compensation ratio for each reference image is determined, resulting in multiple differences. The average of these differences is then used as the loss value of the preset initial model. Alternatively, for each reference image, brightness compensation is applied to the reference image based on its predicted compensation ratio to obtain a first image. Then, brightness compensation is applied to the reference image based on its reference compensation ratio to obtain a second image. The feature differences between the image feature points of the first and second images are determined, and the loss value of the preset initial model is determined based on these feature differences. The method for determining the loss value can be set based on experience, the results of multiple trials, and the application requirements of the actual application; no specific limitations are imposed on this method.
[0121] S603, based on the loss value, adjusts the model parameters of the preset initial model to obtain the exposure compensation model.
[0122] Optionally, if the determined loss value is greater than a preset loss threshold, the model parameters of the preset initial model are adjusted, and the process returns to S601 above until the determined loss value is no greater than the preset loss threshold. At this point, the preset initial model can be considered to have converged, thus completing the model training process and obtaining the exposure compensation model. The preset loss threshold can be set based on empirical values, experimental values from multiple trials, and the application requirements of the actual application; no specific limitations are imposed on it.
[0123] In this embodiment, by comparing the difference between the predicted compensation ratio and the reference compensation ratio of each reference image, the model parameters of the preset initial model are determined, and the model parameters of the preset initial model are adjusted according to the above loss value, which can improve the inference accuracy of the trained exposure compensation model.
[0124] Based on the above embodiments, in an exemplary embodiment, such as Figure 7 As shown, the image acquisition method may include the following steps:
[0125] S701, acquire multiple image groups; wherein, each image group includes different reference images acquired with different exposures at the same field of view, and the field of view corresponding to different image groups is different.
[0126] S702, for each reference image, crop the reference image to obtain a cropped image whose width and height ratio meets the preset ratio, and downsample the cropped image according to the preset sampling multiple to obtain the brightness statistics region corresponding to the reference image, or scale the reference image according to the scaling ratio of the reference image to obtain the brightness statistics region corresponding to the reference image.
[0127] S703, for each reference image, determine the brightness characteristics of the reference image based on the brightness information corresponding to the brightness statistics area.
[0128] S704, for each image group, select candidate brightness values from the brightness values of different reference images in the image group according to the subordinate relationship between the brightness value of each reference image in the image group and the reference brightness value range corresponding to the image group; determine candidate brightness values based on the difference between the converged brightness value obtained by simulating convergence processing of each candidate brightness value and the midpoint value of the reference brightness value range; select the desired brightness value corresponding to the image group from the candidate brightness values based on the frequency of occurrence of each candidate brightness value.
[0129] S705, for each reference image, determine the reference compensation ratio of the reference image based on the ratio between the expected brightness value corresponding to the image group to which the reference image belongs and the brightness value of the reference image.
[0130] S706, input the brightness features of each reference image into the preset initial model to obtain the predicted compensation ratio of the reference image output by the preset initial model; determine the loss value of the preset initial model based on the difference between the predicted compensation ratio and the reference compensation ratio of each reference image; adjust the model parameters of the preset initial model based on the loss value to obtain the exposure compensation model.
[0131] S707, determine the brightness characteristics of the preview image displayed in the viewfinder of the image acquisition device, and input the brightness characteristics into the exposure compensation model to obtain the target compensation ratio.
[0132] S708 performs exposure compensation on the exposure parameters of the image acquisition device according to the target compensation ratio; and in response to the image acquisition command, performs image acquisition on the preview image according to the exposure parameters after exposure compensation to obtain the target image.
[0133] The specific implementation methods of S701-S708 are the same as those in the above method embodiments, and will not be repeated here.
[0134] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0135] Based on the same inventive concept, this application also provides an image acquisition device for implementing the image acquisition method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more image acquisition device embodiments provided below can be found in the limitations of the image acquisition method described above, and will not be repeated here.
[0136] In one exemplary embodiment, such as Figure 8 As shown, an image acquisition device is provided, including: a feature determination module 810, a ratio acquisition module 820, an exposure compensation module 830, and an image acquisition module 840, wherein:
[0137] The feature determination module 810 is used to determine the brightness characteristics of the preview image displayed in the viewfinder of the image acquisition device;
[0138] The ratio acquisition module 820 is used to input the brightness features into the exposure compensation model to obtain the target compensation ratio;
[0139] The exposure compensation module 830 is used to perform exposure compensation on the exposure parameters of the image acquisition device according to the target compensation ratio.
[0140] The image acquisition module 840 is used to acquire the target image from the preview image in response to the image acquisition command and based on the exposure parameters after exposure compensation.
[0141] In one exemplary embodiment, the image acquisition device further includes:
[0142] The image acquisition module is used to acquire multiple image groups; each image group includes different reference images acquired at different exposures under the same field of view, and the field of view corresponding to different image groups is different;
[0143] The image processing module is used to determine the brightness characteristics of each reference image and to determine the reference compensation ratio of the reference image based on the ratio between the expected brightness value of the image group to which the reference image belongs and the brightness value of the reference image.
[0144] The model training module is used to train a preset initial model using the brightness features of each reference image as samples and the reference compensation ratio of the reference image as labels, so as to obtain an exposure compensation model.
[0145] In one exemplary embodiment, the image processing module includes:
[0146] The region determination unit is used to determine the brightness statistics region corresponding to the reference image;
[0147] The feature determination unit is used to determine the brightness features of the reference image based on the brightness information corresponding to the brightness statistics region;
[0148] The brightness information includes at least one of the following: ambient brightness, weighted average brightness, brightness histogram information, brightness dynamic range distribution information, overexposure ratio, interval brightness distribution ratio, backlighting degree, pure color ratio, color temperature information, and color distribution information.
[0149] In one exemplary embodiment, the region determination unit is specifically used for:
[0150] The reference image is cropped to obtain a cropped image with a width-to-height ratio that meets a preset ratio. The cropped image is then downsampled according to a preset sampling factor to obtain the brightness statistics region corresponding to the reference image. Alternatively, the reference image is scaled according to its scaling ratio to obtain the brightness statistics region corresponding to the reference image.
[0151] In one exemplary embodiment, the image acquisition device further includes:
[0152] The first selection module is used to select candidate brightness values from the brightness values of different reference images in the image group for each image group, based on the subordinate relationship between the brightness value of each reference image in the image group and the corresponding reference brightness value range of the image group.
[0153] The brightness value determination module is used to determine the candidate brightness value based on the difference between the converged brightness value obtained by simulating the convergence process of each candidate brightness value and the midpoint value of the reference brightness value range.
[0154] The second selection module is used to select the desired brightness value corresponding to the image group from the candidate brightness values based on the frequency of occurrence of each candidate brightness value.
[0155] In one exemplary embodiment, the model training module is specifically used for:
[0156] The brightness features of each reference image are input into a preset initial model to obtain the predicted compensation ratio of the reference image output by the preset initial model; the loss value of the preset initial model is determined based on the difference between the predicted compensation ratio and the reference compensation ratio of each reference image; the model parameters of the preset initial model are adjusted based on the loss value to obtain the exposure compensation model.
[0157] Each module in the aforementioned image acquisition device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0158] In one exemplary embodiment, the image acquisition device described above may be a chip or a chip module.
[0159] Regarding the modules / units included in the various image acquisition devices described in the above embodiments, they can be software modules / units, hardware modules / units, or a combination of both. For example, for image acquisition devices applied to or integrated into a chip, each module / unit can be implemented using hardware methods such as circuits, or at least some modules / units can be implemented using software programs running on a processor integrated within the chip, while the remaining modules / units can be implemented using hardware methods such as circuits. For image acquisition devices applied to or integrated into a chip module, each module / unit can be implemented using hardware methods such as circuits, and different modules / units can be located in the same component (e.g., chip, circuit module, etc.) or different components of the chip module, or at least some modules / units can be implemented using hardware methods such as circuits. Blocks / units can be implemented using software programs that run on the processor integrated within the chip module. The remaining modules / units can be implemented using hardware methods such as circuits. For each image acquisition device applied to or integrated into the terminal, each of its modules / units can be implemented using hardware methods such as circuits. Different modules / units can be located in the same component (e.g., chip, circuit module, etc.) or in different components within the terminal. Alternatively, at least some modules / units can be implemented using software programs that run on the processor integrated within the terminal, while the remaining modules / units can be implemented using hardware methods such as circuits.
[0160] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 9As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data such as the brightness characteristics of preview images. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements an image acquisition method.
[0161] In one exemplary embodiment, a computer device is provided, which may be an image acquisition device, and its internal structure diagram may be as follows: Figure 10 As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements an image acquisition method. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0162] Those skilled in the art will understand that Figure 9 and Figure 10The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0163] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the various method embodiments of the image acquisition method described above.
[0164] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the various method embodiments of the image acquisition method described above.
[0165] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the various method embodiments of the image acquisition method described above.
[0166] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0167] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0168] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. An image acquisition method, characterized in that, The method includes: Determine the brightness characteristics of the preview image displayed in the viewfinder of the image acquisition device; The brightness features are input into the exposure compensation model to obtain the target compensation ratio; Exposure compensation is performed on the exposure parameters of the image acquisition device according to the target compensation ratio; In response to the image acquisition command, the preview image is acquired according to the exposure parameters after exposure compensation to obtain the target image.
2. The method according to claim 1, characterized in that, The exposure compensation model is trained in the following way: Acquire multiple image groups; each image group includes different reference images acquired at different exposures under the same field of view, and the field of view corresponding to different image groups is different; For each reference image, the brightness characteristics of the reference image are determined, and the reference compensation ratio of the reference image is determined based on the ratio between the expected brightness value corresponding to the image group to which the reference image belongs and the brightness value of the reference image. Using the brightness features of each reference image as samples and the reference compensation ratio of the reference image as labels, a preset initial model is trained to obtain an exposure compensation model.
3. The method according to claim 2, characterized in that, Determining the brightness characteristics of the reference image includes: Determine the brightness statistics region corresponding to the reference image; The brightness characteristics of the reference image are determined based on the brightness information corresponding to the brightness statistics region. The brightness information includes at least one of the following: ambient brightness, weighted average brightness, brightness histogram information, brightness dynamic range distribution information, overexposure ratio, interval brightness distribution ratio, backlighting degree, pure color ratio, color temperature information, and color distribution information.
4. The method according to claim 3, characterized in that, Determining the brightness statistics region corresponding to the reference image includes: The reference image is cropped to obtain a cropped image with a width-to-height ratio that meets a preset ratio. Then, the cropped image is downsampled according to a preset sampling factor to obtain the brightness statistical region corresponding to the reference image; or... Based on the scaling ratio of the reference image, the reference image is scaled to obtain the brightness statistics region corresponding to the reference image.
5. The method according to claim 2, characterized in that, The method further includes: For each image group, candidate brightness values are selected from the brightness values of different reference images in the image group based on the subordinate relationship between the brightness value of each reference image in the image group and the reference brightness value range corresponding to the image group. Candidate brightness values are determined based on the difference between the converged brightness value obtained by simulating the convergence process of each candidate brightness value and the midpoint value of the reference brightness value range. Based on the frequency of occurrence of each candidate brightness value, the desired brightness value corresponding to the image group is selected from the candidate brightness values.
6. The method according to any one of claims 2-5, characterized in that, The step of training a preset initial model using the brightness features of each reference image as samples and the reference compensation ratio of the reference image as labels to obtain an exposure compensation model includes: The brightness features of each reference image are input into a preset initial model to obtain the prediction compensation ratio of the reference image output by the preset initial model. The loss value of the preset initial model is determined based on the difference between the predicted compensation ratio and the reference compensation ratio for each reference image. Based on the loss value, the model parameters of the preset initial model are adjusted to obtain the exposure compensation model.
7. An image acquisition device, characterized in that, The device includes: The feature determination module is used to determine the brightness characteristics of the preview image displayed in the viewfinder of the image acquisition device; The ratio acquisition module is used to input the brightness features into the exposure compensation model to obtain the target compensation ratio; An exposure compensation module is used to perform exposure compensation on the exposure parameters of the image acquisition device according to the target compensation ratio; The image acquisition module is used to acquire the target image from the preview image in response to the image acquisition command and according to the exposure parameters after exposure compensation.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A 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 steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
Citation Information
Cited By
Spatial information display method and system based on intelligent wearable device
CN121680650A