Image shooting method and device, computer equipment and storage medium
By obtaining the shooting distance and light brightness between the object and the camera, finding the target shooting parameter table, and directly shooting images, it solves the problem of long-term time caused by multiple adjustments to the exposure parameters in traditional methods, and improves image shooting efficiency.
Patent Information
- Application Number
- CN202310749344.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-21
- Publication Date
- 2024-12-24
AI Technical Summary
Traditional image shooting methods require multiple adjustments to the exposure parameters, resulting in a long image shooting time and affecting efficiency.
By obtaining the shooting distance and brightness between the object and the camera, find the corresponding target shooting parameter list, and directly shoot to obtain images that meet the brightness indicators.
It realizes that while ensuring image quality, reduce the number of shots, improve image shooting efficiency, and save time.
Smart Images

Figure CN119182999A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an image capturing method, apparatus, computer equipment and storage medium. Background Art
[0002] With the development of computer technology, images captured by cameras have been applied to all aspects of life. For example, in palm payment, the camera captures the palm print image of the object, and then completes the payment through the palm print image. Whether the payment can be successful depends on the quality of the palm print image. Therefore, how to improve the quality of the captured image is the focus of research in this field.
[0003] At present, in the traditional AE solution, the camera first captures an initial image and calculates the brightness of the initial image; then the brightness of the initial image is compared with the reference brightness. If the brightness of the initial image is too low, the exposure time of the camera is increased; if the brightness of the initial image is too high, the exposure time of the camera is reduced; then the image is recaptured according to the modified exposure time; the above process is repeated until the brightness of the captured image is consistent with the reference brightness.
[0004] However, in the above technical solution, it is usually necessary to capture images multiple times to obtain images that meet the reference brightness; that is, the above process needs to be repeated multiple times to obtain images that meet the quality requirements, which makes the image capture time longer and affects the efficiency of image capture. Summary of the invention
[0005] The embodiments of the present application provide an image shooting method, apparatus, computer equipment and storage medium, which can obtain an image that meets the brightness index by shooting once, thereby improving the image shooting efficiency while ensuring the image quality. The technical solution is as follows:
[0006] In one aspect, a method for capturing an image is provided, the method comprising:
[0007] Acquire the shooting distance between the object and the camera and the light brightness, where the light brightness is used to represent the brightness of the environment in which the object and the camera are currently located;
[0008] searching a target shooting parameter corresponding to the shooting distance and the light brightness from a shooting parameter table, wherein the shooting parameter table records the shooting parameters required for shooting an image that meets the brightness index at the shooting distance and the light brightness;
[0009] Based on the target shooting parameters, the object is photographed to obtain an image.
[0010] In another aspect, an image capturing device is provided, the device comprising:
[0011] A first acquisition module is used to acquire a shooting distance between an object and a camera and a light brightness, wherein the light brightness is used to represent the brightness of an environment in which the object and the camera are currently located;
[0012] A search module, used to search for target shooting parameters corresponding to the shooting distance and the light brightness from a shooting parameter table, wherein the shooting parameter table records the shooting parameters required to shoot an image that meets the brightness index at the shooting distance and the light brightness;
[0013] The shooting module is used to shoot the object based on the target shooting parameters to obtain an image.
[0014] In some embodiments, the search module is used to search the fill light parameters, exposure time and brightness gain corresponding to the shooting distance and the light brightness from the shooting parameter table;
[0015] The shooting module is used to shoot the object based on at least one of the fill light parameters, the exposure time and the brightness gain to obtain the image.
[0016] In some embodiments, the shooting module is used to shoot the object based on the fill light parameters to obtain the image when the sum of the image brightness corresponding to the light brightness and the image brightness corresponding to the fill light parameters reaches the brightness index; and to shoot the object based on the fill light parameters, the exposure time and the brightness gain to obtain the image when the sum of the image brightness corresponding to the light brightness and the image brightness corresponding to the fill light parameters does not reach the brightness index.
[0017] In some embodiments, the apparatus further comprises:
[0018] A second acquisition module is used to acquire a first corresponding relationship, where the first corresponding relationship is used to indicate the contribution degree of the ambient light brightness to the image brightness;
[0019] A generating module is used to generate the shooting parameter table based on the first corresponding relationship.
[0020] In some embodiments, the second acquisition module is used to acquire multiple sample light brightnesses; for any sample light brightness, photographing is performed in an environment of the sample light brightness to obtain a first sample image; the brightness of the first sample image is determined, and the brightness of the first sample image is used to represent the contribution of the sample light brightness; based on the brightness of the first sample image corresponding to the multiple sample light brightnesses, the first corresponding relationship is fitted.
[0021] In some embodiments, the generating module comprises:
[0022] An acquisition unit, used for acquiring a second corresponding relationship, where the second corresponding relationship is used for indicating the contribution degree of the shooting distance and the fill light parameter to the image brightness;
[0023] A generating unit is used to generate the shooting parameter table based on the first corresponding relationship and the second corresponding relationship.
[0024] In some embodiments, the acquisition unit is used to acquire multiple sample shooting distances; for any sample shooting distance, shooting is performed at the sample shooting distance to obtain a second sample image; the sample shooting distance is fixed, the sample fill light parameters are adjusted, and shooting is performed to obtain a third sample image; based on the brightness of the second sample image and the brightness of the third sample image, a brightness difference is determined, and the brightness difference is used to indicate the contribution of the fill light parameters to the image brightness at the sample shooting distance; based on the brightness difference corresponding to the sample fill light parameters, a corresponding sub-relationship between the fill light parameters and the image brightness at the sample shooting distance is determined, and multiple corresponding sub-relationships constitute the second corresponding relationship.
[0025] In some embodiments, the generating unit is used to obtain a third corresponding relationship, and the third corresponding relationship is used to indicate the contribution of exposure time and brightness gain to image brightness; based on the first corresponding relationship, the second corresponding relationship and the third corresponding relationship, the shooting parameter table is generated.
[0026] In some embodiments, the shooting module is used to perform multiple shootings based on the shooting parameters in the shooting parameter table to obtain multiple images;
[0027] The device also includes:
[0028] An updating module is used to update the shooting parameter table when there are a preset number of images among the multiple images whose brightness does not meet the brightness index.
[0029] On the other hand, a computer device is provided, which includes a processor and a memory, wherein the memory is used to store at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the image capture method in the embodiment of the present application.
[0030] On the other hand, a computer-readable storage medium is provided, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor to implement the image capturing method in the embodiment of the present application.
[0031] On the other hand, a computer program product is provided, including a computer program, which is stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the image capture method provided in the above-mentioned various aspects or various optional implementations of various aspects.
[0032] An embodiment of the present application provides an image capturing method, by recording the required capturing parameters for capturing an image that meets the brightness index at any shooting distance and any light brightness in a capturing record table, so that in the process of capturing the image, the corresponding target capturing parameters can be directly found in the capturing parameter table according to the shooting distance between the object and the camera in the current situation and the light brightness in the current environment, so that the object can be captured quickly using the target capturing parameters. Since the capturing record table records the capturing parameters required for capturing an image that meets the brightness index, the image captured based on the target capturing parameters meets the brightness index, that is, an image that meets the brightness index can be obtained by shooting once, thereby improving the image capturing efficiency while ensuring the image quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0034] Figure 1 is a schematic diagram of an implementation environment of an image capturing method provided according to an embodiment of the present application;
[0035] Figure 2 is a flow chart of an image capturing method provided according to an embodiment of the present application;
[0036] Figure 3 is a flow chart of another image capturing method provided according to an embodiment of the present application;
[0037] Figure 4 is a schematic diagram of the structure of an ambient light sensor provided according to an embodiment of the present application;
[0038] Figure 5 is a structural schematic diagram of a single-point D-TOF sensor provided according to an embodiment of the present application;
[0039] Figure 6 is a schematic diagram of obtaining a first corresponding relationship according to an embodiment of the present application;
[0040] Figure 7 is a schematic diagram of obtaining a second corresponding relationship according to an embodiment of the present application;
[0041] Figure 8 is a flow chart of an image capturing method provided according to an embodiment of the present application;
[0042] Fig. 9 is a block diagram of an image capturing device provided according to an embodiment of the present application;
[0043] Fig.10 is a block diagram of another image capturing device provided according to an embodiment of the present application;
[0044] Fig.11 It is a structural block diagram of a terminal provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0045] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0046] In this application, the terms "first", "second", etc. are used to distinguish identical or similar items with basically the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is there any limitation on quantity and execution order.
[0047] In the present application, the term "at least one" means one or more, and the term "plurality" means two or more.
[0048] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions. For example, the objects involved in this application are all obtained with full authorization.
[0049] For ease of understanding, the terms involved in this application are explained below.
[0050] ISP (Image Signal Processing): refers to the ISP chip, which is also the CPU (Central Processing Unit) chip with image processing function.
[0051] AE (Auto Exposure): refers to the automatic exposure strategy of the camera.
[0052] D-TOF (Direct-Time of Flight): refers to a sensor that measures distance directly based on the time difference between the emission and reception of light pulses.
[0053] The image capturing method provided in the embodiment of the present application can be executed by a computer device. In some embodiments, the computer device is a terminal or a server. The following first takes the computer device as an example to introduce the implementation environment of the image capturing method provided in the embodiment of the present application. Figure 1 Schematic diagram of an implementation environment of an image capturing method provided according to an embodiment of the present application. Figure 1 The implementation environment includes a terminal 101 and a server 102. The terminal 101 and the server 102 can be directly or indirectly connected via wired or wireless communication, which is not limited in this application.
[0054] In some embodiments, terminal 101 is a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, an intelligent voice interaction device, a smart home appliance, a vehicle-mounted terminal, etc., but is not limited thereto. Terminal 101 is equipped with a camera module. The camera module may include some components for capturing images, such as a camera and a fill light. Schematically, terminal 101 is a terminal used by a user. The user uses the camera module of terminal 101 to shoot. During the shooting process, the terminal can automatically set the shooting parameters or the user can set the shooting parameters. Then, the terminal controls the camera module to shoot using the set shooting parameters.
[0055] Those skilled in the art will appreciate that the number of the above terminals may be more or less. For example, the above terminal may be only one, or the above terminals may be dozens or hundreds, or more. The embodiment of the present application does not limit the number of terminals and device types.
[0056] In some embodiments, the server 102 is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), big data and artificial intelligence platforms. Server 102 is used to provide background services for supporting the shooting tasks of the camera module. For example, the server 102 can send the shooting parameters of the camera module to the terminal 101. Alternatively, the server 102 can also store images taken by the camera module, etc., which is not limited in the embodiments of the present application. In some embodiments, the server 102 undertakes the main computing work and the terminal 101 undertakes the secondary computing work; or, the server 102 undertakes the secondary computing work and the terminal 101 undertakes the main computing work; or, the server 102 and the terminal 101 use a distributed computing architecture for collaborative computing.
[0057] Figure 2 is a flowchart of an image capturing method provided according to an embodiment of the present application, see Figure 2 In the present embodiment of the present application, the method for capturing an image is described by taking the method executed by a terminal as an example. The method for capturing an image comprises the following steps:
[0058] 201. The terminal obtains the shooting distance between the object and the camera and the light brightness, where the light brightness is used to represent the brightness of the environment in which the object and the camera are currently located.
[0059] In the embodiment of the present application, the object may be a palm, a face, or a QR code, etc., which is not limited in the embodiment of the present application. A camera is installed on the terminal, which can shoot the object. In the process of shooting the object, the terminal can obtain the shooting distance between the object and the camera and the light brightness in the current environment. The shooting distance and light brightness can reflect the current external shooting conditions. Conditions such as shooting distance and light brightness will directly affect the image effect of subsequent shooting. That is, the brightness of the image shot at different shooting distances or different light brightness is different. However, not all images of any brightness meet the quality requirements. For example, if the brightness of the image is too low, the image will be dim and unclear, resulting in low image quality; or, if the brightness of the image is too high, the image will be unclear due to overexposure, resulting in low image quality. In order to be able to shoot an image that meets the quality requirements, the terminal can set appropriate shooting parameters for the camera. Accordingly, the terminal continues to execute step 202.
[0060] 202. The terminal searches for target shooting parameters corresponding to the shooting distance and light brightness from a shooting parameter table, where the shooting parameter table records shooting parameters required for shooting an image that meets a brightness index under shooting distance and light brightness.
[0061] In the embodiment of the present application, the brightness index reflects the quality requirements of the image to a certain extent. The brightness index can be a reference brightness or a brightness range, and the embodiment of the present application does not limit this. In order to be able to capture images that meet the brightness index, the terminal can find the target shooting parameters corresponding to the shooting distance and light brightness from the shooting parameter table. Among them, the shooting distance and light brightness can be regarded as external shooting conditions; the target shooting parameters can be regarded as internal setting parameters. That is, the terminal selects appropriate internal setting parameters for the camera from the shooting parameter table according to the external shooting conditions, so that the subsequent camera can capture images that meet the brightness index.
[0062] 203. The terminal shoots the object based on the target shooting parameters to obtain an image.
[0063] In the embodiment of the present application, the terminal uses the target shooting parameters to control the camera module to shoot the object to obtain an image. The brightness of the image meets the brightness index.
[0064] An embodiment of the present application provides an image capturing method, by recording the required capturing parameters for capturing an image that meets the brightness index at any shooting distance and any light brightness in a capturing record table, so that in the process of capturing the image, the corresponding target capturing parameters can be directly found in the capturing parameter table according to the shooting distance between the object and the camera in the current situation and the light brightness in the current environment, so that the object can be captured quickly using the target capturing parameters. Since the capturing record table records the capturing parameters required for capturing an image that meets the brightness index, the image captured based on the target capturing parameters meets the brightness index, that is, an image that meets the brightness index can be obtained by shooting once, thereby improving the image capturing efficiency while ensuring the image quality.
[0065] Figure 3 is a flowchart of another image capturing method provided according to an embodiment of the present application, see Figure 3 In the present embodiment of the present application, the method for capturing an image is described by taking the method executed by a terminal as an example. The method for capturing an image comprises the following steps:
[0066] 301. The terminal obtains the shooting distance between the object and the camera and the light brightness, where the light brightness is used to represent the brightness of the environment in which the object and the camera are currently located.
[0067] In an embodiment of the present application, the terminal can measure the shooting distance and light brightness through its own configuration; alternatively, the terminal can also obtain the shooting distance and light brightness from other computer devices. The embodiment of the present application does not limit the method for obtaining the shooting distance and light brightness.
[0068] In some embodiments, an ambient light sensor is configured on the terminal. The terminal can measure the light brightness in the current environment through the ambient light sensor. The embodiment of the present application does not limit the structure of the ambient light sensor.
[0069] For example, Figure 4 is a schematic diagram of the structure of an ambient light sensor provided according to an embodiment of the present application. Figure 4 When the light 401 in the environment shines on the photodiode (PD) 402 of the ambient light sensor, a current is generated in the ambient light sensor. The magnitude of the current generated by light of different brightness (intensity) is different. The current is amplified by the amplifier (AMP) 403, and the voltage conversion occurs through the capacitor 404. Then, the amplified and voltage-converted current enters the analog-to-digital converter (ADC) 405, and is converted from an analog signal to a digital signal. Then, the digital signal enters the logic processing unit 406. Then, the logic processing unit 406 calculates the brightness of the light in the current environment based on the digital signal. Then, the light brightness is output through the I2C interface 407 of the logic processing unit 406. The digital signal converted by the analog-to-digital converter 405 in the ambient light sensor can be 12 bits in size, which is not limited in this embodiment of the present application. That is, the ambient light sensor can divide the light in the environment into 2 12 =4096 kinds. Accordingly, there are 4096 levels of light brightness in the environment. The ambient light sensor may also include an oscillator (OSC) 408, a VCC (Volt Current Condenser) port 409, a DVI (Digital Visual Interface) port 410, a GND (Ground) port 411, an ADDR (Address) port 412, a SCL (Serial Clock Line) port 413, and an SDA (Serial Data Line) port 414.
[0070] In some embodiments, a single-point D-TOF sensor is configured on the terminal. The terminal can measure the shooting distance between the object and the camera through the single-point D-TOF sensor. The embodiment of the present application does not limit the structure of the single-point D-TOF sensor.
[0071] For example, Figure 5 is a schematic diagram of the structure of a single-point D-TOF sensor provided according to an embodiment of the present application. Figure 5 , there is a connection relationship between the single-point D-TOF sensor and the terminal. The single-point D-TOF sensor includes a control module (Control) and a data processing module (Data Process). The control module is used to control the laser to emit light. The laser can be a vertical cavity surface emitting laser (Vertical Cavity Surface Emitting Laser, VCSEL), which is not limited in the embodiment of the present application. After the light is irradiated to the surface of the object by the camera, it will be reflected back to the camera. The light received by the camera includes the light emitted by the laser and the light in the environment. The light in the environment is filtered out by an optical filter. The signal detection module includes a single photon avalanche photodiode (Single Photon Avalanche Diode, SPAD) and a time-to-digital converter (Time To Digital Converter, TDC). The arrival time of the reflected light can be recorded by the signal detection module. Then, the data processing module calculates the flight time of the light according to the time when the laser emits the light and the arrival time of the light. Then, the data processing module calculates the shooting distance between the object and the camera according to the flight time of the light. Shooting distance = speed of light * flight time / 2.
[0072] The above-mentioned ambient light sensor, single-point D-TOF sensor, camera and other components for capturing images can be collectively referred to as a camera module. For example, other components for capturing images can be fill lights, and the specific structure of the camera module is not limited in the embodiments of the present application.
[0073] 302. The terminal obtains a shooting parameter table, which records shooting parameters required for capturing an image that meets a brightness index under shooting distance and light brightness.
[0074] In an embodiment of the present application, the shooting parameter table includes the correspondence between the shooting distance and the light brightness and the shooting parameters. That is, for any set of shooting distances and light brightness, there is a corresponding set of shooting parameters. The shooting parameters of the camera module may include parameters such as fill light parameters, exposure time, and brightness gain. The fill light parameters are used to indicate the brightness of the fill light in the camera module. The exposure time is used to indicate the length of time the shutter is kept when the light is projected onto the photosensitive surface of the photosensitive material in the camera. The longer the exposure time, the more light the camera receives, and the higher the brightness of the captured image. The brightness gain is used to indicate the multiple by which the camera module amplifies the brightness of the image. The shooting parameters corresponding to different shooting distances or different light brightnesses are different. Before setting the shooting parameters, the terminal needs to obtain the shooting parameter table so that it is convenient to select the appropriate shooting parameters from the shooting parameter table later. The shooting parameter tables of terminals of different specifications are different.
[0075] The terminal can obtain the shooting parameter table locally or from other computer devices, and the embodiment of the present application does not limit this. Accordingly, the shooting parameter table can be generated by the above terminal or by other computer devices, and the embodiment of the present application does not limit this. The following takes the execution by the above terminal as an example to introduce the generation process of the shooting parameter table.
[0076] In some embodiments, the brightness of the ambient light may affect the image effect of subsequent shooting. Different light brightnesses contribute to different degrees to the image brightness. The higher the ambient light brightness, the greater the contribution to the image brightness, so that the brightness of the captured image will also be higher; the lower the ambient light brightness, the smaller the contribution to the image brightness, so that the brightness of the captured image will also be lower. The terminal may generate a shooting parameter table based on the light brightness. Accordingly, the process of the terminal generating the shooting parameter table includes: the terminal obtains a first corresponding relationship. The first corresponding relationship is used to indicate the contribution of the ambient light brightness to the image brightness. Then, the terminal generates a shooting parameter table based on the first corresponding relationship. The first corresponding relationship may be expressed in the form of a table, in the form of a relationship curve, in the form of a key-value pair, etc., and the embodiments of the present application do not limit this. The solution provided in the embodiment of the present application generates a shooting parameter table through a first corresponding relationship, so that the shooting parameter table can accurately record the contribution of different light brightnesses in the environment to the image brightness, so that when shooting an image, the contribution of the light brightness can be more accurately determined according to the light brightness in the current environment, thereby more accurately selecting shooting parameters to achieve the goal of shooting images that meet the brightness index, thereby helping to improve image shooting efficiency while ensuring image quality.
[0077] Among them, the process of the terminal obtaining the first corresponding relationship includes: the terminal obtains multiple sample light brightnesses. Then, for any sample light brightness, the terminal shoots in an environment of the sample light brightness to obtain a first sample image. Then, the terminal determines the brightness of the first sample image. The brightness of the first sample image is used to represent the contribution of the sample light brightness. Then, the terminal fits the first corresponding relationship based on the brightness of the first sample image corresponding to the multiple sample light brightnesses. The embodiment of the present application can calculate the brightness of the image through the ISP chip, and the embodiment of the present application is not limited to this. The solution provided by the embodiment of the present application, by shooting the first sample image in an environment of multiple sample light brightnesses respectively, and calculating the brightness of the first sample image, makes it possible to determine the corresponding relationship between the light brightness and the image brightness, so as to determine the contribution of the light brightness to the image brightness, so that when the image is subsequently shot, the contribution of the light brightness can be more accurately determined, so as to more accurately select the shooting parameters to achieve the goal of shooting images that meet the brightness index, thereby helping to improve the image shooting efficiency while ensuring the image quality.
[0078] The embodiment of the present application does not limit the number of multiple sample light brightnesses and the specific size of each sample light brightness. The terminal can randomly select multiple sample light brightnesses, or can obtain multiple sample light brightnesses by sampling based on the sampling step size, and the embodiment of the present application does not limit this. It should be noted that in the process of obtaining the first corresponding relationship, the terminal keeps other conditions and factors unchanged, adjusts the sample light brightness, takes the first sample images respectively, and calculates the brightness of the first sample images, thereby obtaining the contribution of the light brightness to the image brightness.
[0079] For example, Figure 6 is a schematic diagram of obtaining a first corresponding relationship according to an embodiment of the present application. Figure 6, multiple sample light brightnesses are 100LUX (a unit of light brightness), 1000LUX and 5000LUX respectively. For any sample light brightness, the terminal shoots in the environment of the sample light brightness, obtains the first sample image, and calculates the image brightness. The terminal can also read the light brightness in the environment through the ambient light sensor, that is, convert the sample light brightness from the above-mentioned numerical form into binary data that can be recognized by the computer device. In the subsequent process of determining the first corresponding relationship, binary data is also used, so that the terminal can quickly find the required shooting parameters during use. Then, the terminal determines the first corresponding relationship based on multiple groups of sample light brightness and image brightness. Optionally, the terminal can fit a relationship curve for representing the light brightness and image brightness based on the above-mentioned multiple groups of sample light brightness and image brightness. Then, the terminal determines the image brightness corresponding to any light brightness through the relationship curve. For example, the terminal can directly determine the image brightness corresponding to the light brightness with a value of 500LUX through the first corresponding relationship.
[0080] Optionally, the terminal may also increase or decrease the number of multiple sample light brightnesses according to the accuracy requirement of the first corresponding relationship. The more sample light brightnesses there are, the more image brightnesses are measured, thereby determining the relationship between more groups of light brightnesses and image brightnesses, and then obtaining the first corresponding relationship more accurately.
[0081] Optionally, when shooting at any sample light brightness to measure the image brightness contributed by the sample light brightness, multiple camera modules of the same specifications as the camera module of the above-mentioned terminal can be used to shoot simultaneously to obtain multiple first sample images. Then, the terminal calculates the brightness of the multiple first sample images. Then, the terminal can average the brightness of the multiple first sample images to determine the image brightness contributed by the sample light brightness. The method provided in the embodiment of the present application uses multiple camera modules of the same specifications to shoot simultaneously to measure the image brightness, which reduces the error of a single measurement of a single shooting module, so that a more accurate first corresponding relationship can be obtained.
[0082] Before averaging the brightness of multiple first sample images, the terminal may also determine the brightness distribution based on the brightness of multiple first sample images; then, the terminal may filter out the first sample images whose image brightness is more than a preset distance from the brightness distribution center; then, the terminal averages the brightness of the remaining first sample images to determine the image brightness contributed by the sample light brightness. The brightness distribution center may be the median of the brightness of multiple first sample images, or may be the mode of the brightness of multiple first sample images, and the embodiments of the present application are not limited to this. In the method provided by the embodiments of the present application, the image brightness that is more than a preset distance away from the brightness distribution center is likely to be erroneous data. By filtering out the first sample images whose image brightness is more than a preset distance away from the brightness distribution center, individual obvious erroneous data is avoided, and the accuracy of measuring the image brightness contributed by the sample light brightness can be improved, thereby improving the accuracy of the first corresponding relationship.
[0083] In some embodiments, in addition to the ambient light brightness affecting the image effect of subsequent shooting, the shooting distance between the object and the camera and the fill light parameters will affect the image effect of subsequent shooting. Different shooting distances or different fill light parameters contribute to different degrees to the image brightness. Shooting distances that are too close or too far may make it difficult for the camera to focus, and the contribution to the image brightness is small, resulting in low brightness of the captured image. The higher the fill light parameter, the greater the contribution to the image brightness, so that the brightness of the captured image will also be higher; the lower the fill light parameter, the smaller the contribution to the image brightness, so that the brightness of the captured image will also be lower. The terminal can generate a shooting parameter table based on the above-mentioned first corresponding relationship and consider the influence of the shooting distance and the fill light parameters on the image brightness. Accordingly, the process of the terminal generating the shooting parameter table based on the first corresponding relationship includes: the terminal obtains a second corresponding relationship. The second corresponding relationship is used to indicate the contribution of the shooting distance and the fill light parameters to the image brightness. Then, the terminal generates a shooting parameter table based on the first corresponding relationship and the second corresponding relationship. The second correspondence can be expressed in the form of a table, a relationship curve, a key-value pair, etc., and the embodiments of the present application do not limit this. The solution provided in the embodiments of the present application generates a shooting parameter table through the first correspondence and the second correspondence, so that the shooting parameter table can accurately record the contribution of different light brightness in the environment to the image brightness and the contribution of the shooting distance and the fill light parameters to the image brightness, so that when shooting an image, it is possible to more accurately determine the contribution of the light brightness, shooting distance and fill light parameters in the current environment to the light brightness, so that the shooting parameters can be selected more accurately to achieve the goal of shooting images that meet the brightness index, thereby improving the image shooting efficiency while ensuring the image quality.
[0084] Among them, the process of the terminal obtaining the second corresponding relationship includes: the terminal obtains multiple sample shooting distances. Then, for any sample shooting distance, the terminal shoots at the sample shooting distance to obtain a second sample image. Then, the terminal fixes the sample shooting distance, adjusts the sample fill light parameters, shoots, and obtains a third sample image. Then, the terminal determines the brightness difference based on the brightness of the second sample image and the brightness of the third sample image. The brightness difference is used to indicate the contribution of the fill light parameters to the image brightness at the sample shooting distance. Then, the terminal determines the corresponding sub-relationship between the fill light parameters and the image brightness at the sample shooting distance based on the brightness difference corresponding to the sample fill light parameters. Multiple corresponding sub-relationships constitute the second corresponding relationship. The solution provided in the embodiment of the present application measures the contribution of different fill light parameters to the brightness of the picture at different shooting distances by controlling variables. That is, for any sample shooting distance, while ensuring that the shooting distance remains unchanged, the brightness difference between the sample images taken before and after adjusting the fill light parameters is measured. The brightness difference is caused by the fill light parameters, that is, the brightness difference can accurately reflect the contribution of the fill light parameters to the image brightness, thereby determining the contribution of the current sample shooting distance and the fill light parameters to the image brightness. Repeating this process can obtain a second corresponding relationship, so that when subsequently shooting images, the shooting parameters can be more accurately selected based on the comprehensive contribution of light brightness, shooting distance and fill light parameters to achieve the goal of shooting images that meet the brightness index, thereby improving image shooting efficiency while ensuring image quality.
[0085] For example, Figure 7 is a schematic diagram of obtaining a second corresponding relationship according to an embodiment of the present application. Figure 7 , multiple sample shooting distances are 5 cm, 8 cm and 10 cm respectively. For any sample shooting distance, the terminal shoots at the sample shooting distance, obtains a second sample image, and calculates the image brightness. The terminal can also read the shooting distance between the object and the camera through a distance sensor (such as a single-point D-TOF sensor), that is, convert the sample shooting distance from the above numerical form into binary data that can be recognized by the computer device. In the subsequent process of determining the second corresponding relationship, binary data is also used, so that the terminal can quickly find the required shooting parameters during use. Then, the terminal adjusts the fill light parameters, shoots again, obtains the third sample image, and calculates the image brightness. Then, the terminal generates a second corresponding relationship based on the difference between the brightness of the second sample image and the brightness of the third sample image.
[0086] Optionally, the terminal may also increase or decrease the number of multiple sample shooting distances according to the accuracy requirement of the second corresponding relationship. The more sample shooting distances there are, the more image brightness is measured, thereby determining the relationship between more groups of shooting distances and fill light parameters and image brightness, and then obtaining the second corresponding relationship more accurately.
[0087] Optionally, when shooting at any sample shooting distance to measure the image brightness contributed by the fill light parameters at the sample shooting distance, multiple camera modules of the same specifications as the camera module of the above-mentioned terminal can also be used to shoot at the same time at the sample shooting distance to obtain multiple second sample images. Then, the terminal fixes the sample shooting distance, adjusts the same sample fill light parameters for multiple camera modules, and shoots to obtain multiple third sample images. Then, for any camera module, the terminal determines the brightness difference based on the brightness of the second sample image and the brightness of the third sample image shot by the camera module. Then, the terminal can average the brightness differences of multiple camera modules to determine the image brightness contributed by the sample fill light parameters. The solution provided in the embodiment of the present application uses multiple camera modules of the same specifications to shoot at the same time to measure the image brightness contributed by the sample fill light parameters, thereby reducing the error of a single measurement of a single shooting module, so as to obtain a more accurate second corresponding relationship.
[0088] In some embodiments, in addition to the brightness of the ambient light, the shooting distance between the object and the camera, and the fill light parameters that affect the image effect of the subsequent shooting, the exposure time and brightness gain of the camera will also affect the image effect of the subsequent shooting. Different exposure times and brightness gains have different degrees of contribution to the image brightness. The longer the exposure time, the more light the camera receives, and the greater the contribution to the image brightness, so that the brightness of the captured image will also be higher. The shorter the exposure time, the less light the camera receives, and the smaller the contribution to the image brightness, so that the brightness of the captured image will also be lower. The brightness gain is used to indicate the multiple of the brightness amplification of the image. The brightness gain is positively correlated with the contribution to the image brightness. The terminal can generate a shooting parameter table based on the above-mentioned first corresponding relationship and the second corresponding relationship, and then consider the impact of the exposure time and the brightness gain on the image brightness. Correspondingly, the process of the terminal generating the shooting parameter table based on the first corresponding relationship and the second corresponding relationship includes: the terminal obtains a third corresponding relationship. The third corresponding relationship is used to indicate the contribution of the exposure time and the brightness gain to the image brightness. Then, the terminal generates a shooting parameter table based on the first corresponding relationship, the second corresponding relationship, and the third corresponding relationship. The third correspondence can be expressed in the form of a table, a relationship curve, a key-value pair, etc., and the embodiment of the present application does not limit this. The solution provided in the embodiment of the present application generates a shooting parameter table through the first correspondence, the second correspondence, and the third correspondence, so that the shooting parameter table can accurately record the contribution of the light brightness, shooting distance, fill light parameters, exposure time, and brightness gain in the environment to the image brightness, so that when shooting an image, it is possible to more accurately determine the contribution of the light brightness, shooting distance, fill light parameters, exposure time, and brightness gain in the current environment to the light brightness, so that the shooting parameters can be selected more accurately to achieve the goal of shooting images that meet the brightness index, thereby helping to improve the image shooting efficiency while ensuring the image quality.
[0089] Optionally, the exposure time of the camera is generally related to the aperture of the camera and the sensitivity of the film. For a camera, since the performance of the film of the camera is basically unchanged, the sensitivity of the film of the camera is fixed. When the sensitivity of the film is fixed, the larger the aperture of the camera, the more light enters per unit time, and the greater the contribution to the image brightness. In this case, the exposure time required to capture an image that meets the brightness index is shorter. The smaller the aperture of the camera, the less light enters per unit time, and the smaller the contribution to the image brightness. In this case, the exposure time required to capture an image that meets the brightness index is longer. That is, the exposure time of the camera is negatively correlated with the aperture of the camera. In the process of acquiring the third corresponding relationship, the terminal can also determine the contribution of the exposure time and the aperture to the image brightness based on the relationship between the exposure time and the aperture. That is, on the basis of the third corresponding relationship in the above embodiment, the contribution of the size parameter of the aperture to the image brightness is supplemented in the third corresponding relationship. The solution provided in the embodiment of the present application further determines the contribution of the aperture to the image brightness based on the relationship between the exposure time and the aperture, thereby enriching the third corresponding relationship. In order to enable the camera's aperture to be directly adjusted in subsequent shooting based on the third corresponding relationship reflected in the shooting parameter table, the image shooting efficiency is improved while ensuring the image quality.
[0090] It should be noted that the embodiment of the present application does not limit the timing of the terminal obtaining the shooting parameter table. The terminal can obtain the shooting parameter table before obtaining the light brightness and the shooting distance. That is, the terminal can first execute step 302 and then execute step 301. Alternatively, the terminal can obtain the shooting parameter table while obtaining the light brightness and the shooting distance. That is, the terminal executes step 301 and step 302 at the same time.
[0091] 303. The terminal searches for target shooting parameters corresponding to the shooting distance and light brightness from a shooting parameter table.
[0092] In an embodiment of the present application, the target shooting parameters may include information such as fill light parameters, exposure time, and brightness gain. That is, the terminal uses the brightness index as a target and searches for fill light parameters, exposure time, and brightness gain corresponding to the shooting distance and light brightness from the shooting parameter table, so that when shooting is performed subsequently under the conditions of shooting distance and light brightness, the brightness of the image shot using the corresponding fill light parameters, exposure time, and brightness gain meets the brightness index. The solution provided in the embodiment of the present application can directly search for corresponding shooting parameters such as fill light parameters, exposure time, and brightness gain in the shooting parameter table according to the shooting distance between the object and the camera in the current situation and the light brightness in the current environment, so that the shooting parameters found above can be used more quickly for shooting, thereby improving the image shooting efficiency.
[0093] 304. The terminal shoots the object based on the target shooting parameters to obtain an image.
[0094] In an embodiment of the present application, the terminal can control the camera module to shoot the object based on at least one of the fill light parameter, the exposure time and the brightness gain to obtain an image. Specifically, when the sum of the image brightness corresponding to the light brightness and the image brightness corresponding to the fill light parameter reaches the brightness index, the terminal shoots the object based on the fill light parameter to obtain an image. When the sum of the image brightness corresponding to the light brightness and the image brightness corresponding to the fill light parameter does not reach the brightness index, the terminal shoots the object based on the fill light parameter, the exposure time and the brightness gain to obtain an image. Among them, the sum of the image brightness corresponding to the light brightness and the image brightness corresponding to the fill light parameter can be obtained by direct summation or by weighted summation, and the embodiment of the present application does not limit this. In other words, when the image brightness corresponding to the light brightness in the environment reaches the brightness index, the terminal can control the camera to shoot directly. When the image brightness corresponding to the light brightness in the environment does not reach the brightness index, the terminal first uses the fill light for fill light. That is, the terminal shoots the object through the fill light parameter. When the sum of the image brightness corresponding to the light brightness and the image brightness corresponding to the fill light parameters does not reach the brightness index, the terminal selects exposure and gain. That is, the terminal shoots the object based on the fill light parameters, exposure time and brightness gain. Therefore, the shooting parameters such as fill light parameters, exposure time and brightness gain can be regarded as having priorities, and the priority of the fill light parameters is higher than that of the exposure time and brightness gain. The solution provided in the embodiment of the present application selects part of the shooting parameters for shooting while ensuring the image quality, which can save operating consumption compared to selecting all the shooting parameters.
[0095] In order to more clearly describe the image capturing method provided in the embodiment of the present application, the image capturing method is further described below in conjunction with the accompanying drawings. Figure 8 is a flow chart of an image capturing method provided according to an embodiment of the present application. Figure 8, when shooting starts, the terminal obtains the shooting distance between the object and the camera and the light brightness in the environment. Then, the terminal searches the shooting parameter table for the fill light parameters, exposure time and brightness gain corresponding to the shooting distance and light brightness. Then, the terminal shoots based on the fill light parameters, exposure time and brightness gain to obtain an image. The brightness of the image meets the brightness index. The image shooting method provided in the embodiment of the present application can obtain an image that meets the brightness index by shooting once. Compared with the traditional AE solution that requires multiple adjustments and shootings to obtain an image that meets the brightness index, the solution of the present application can save about 1-4 frames of time. If calculated based on shooting 30 frames of images in 1 second, each frame of the image takes 33.3ms, and the entire shooting process can save 33.3ms-133.2ms of time. It can be seen that the solution provided in the embodiment of the present application can significantly improve the efficiency of image shooting, thereby improving the shooting experience. In addition, since the shooting parameter table in the present application includes shooting parameters corresponding to different light intensities in the environment, the solution provided in the embodiment of the present application can support different environments, such as indoor and outdoor environments.
[0096] In some embodiments, considering that the camera module of the terminal may age, wear, etc. over time, the original shooting parameter table may not be applicable to the current camera module. Accordingly, the shooting parameter table provided in the embodiment of the present application is not fixed. Specifically, the terminal can perform multiple shooting based on the shooting parameters in the shooting parameter table to obtain multiple images. Then, in the case where the brightness of a preset number of images in the multiple images does not meet the brightness index, the shooting parameter table is updated. Among them, the brightness of the preset number of images does not meet the brightness index can refer to the number of images that do not meet the brightness index that are continuously shot, or it can refer to the number of images that do not meet the brightness index that are not continuous, but the proportion of the preset number of images in the above multiple images reaches the threshold, and the embodiment of the present application does not limit this. The solution provided in the embodiment of the present application, when the images shot multiple times do not meet the brightness index, it means that the camera module is likely to age, wear, etc., and the original shooting parameter table is no longer applicable. In this case, the shooting parameter table can be updated to avoid not being able to shoot images that meet the brightness index in the future, and also avoid users from frequently changing devices, which is in line with user intentions.
[0097] The image capture method provided in the embodiment of the present application can be applied to payment scenarios such as palm payment, face payment, or code scanning payment, can also be applied to verification scenarios such as face verification, and can also be applied to ordinary shooting scenarios, which is not limited by the embodiment of the present application.
[0098] An embodiment of the present application provides an image capturing method, by recording the required capturing parameters for capturing an image that meets the brightness index at any shooting distance and any light brightness in a capturing record table, so that in the process of capturing the image, the corresponding target capturing parameters can be directly found in the capturing parameter table according to the shooting distance between the object and the camera in the current situation and the light brightness in the current environment, so that the object can be captured quickly using the target capturing parameters. Since the capturing record table records the capturing parameters required for capturing an image that meets the brightness index, the image captured based on the target capturing parameters meets the brightness index, that is, an image that meets the brightness index can be obtained by shooting once, thereby improving the image capturing efficiency while ensuring the image quality.
[0099] Fig. 9 is a block diagram of an image capturing device provided according to an embodiment of the present application. The device is used to execute the steps of the above-mentioned image capturing method. Fig. 9 The image capturing device includes: a first acquisition module 901, a search module 902 and a capturing module 903.
[0100] A first acquisition module 901 is used to acquire the shooting distance between the object and the camera and the light brightness, where the light brightness is used to represent the brightness of the environment in which the object and the camera are currently located;
[0101] A search module 902 is used to search for target shooting parameters corresponding to shooting distance and light brightness from a shooting parameter table, where the shooting parameter table records shooting parameters required to shoot an image that meets the brightness index under shooting distance and light brightness;
[0102] The shooting module 903 is used to shoot the object based on the target shooting parameters to obtain an image.
[0103] In some embodiments, Fig.10 is a block diagram of another image capturing device provided according to an embodiment of the present application. Fig.10 , a search module 902, used to search for fill light parameters, exposure time and brightness gain corresponding to the shooting distance and light brightness from a shooting parameter table;
[0104] The shooting module 903 is used to shoot the object based on at least one of the fill light parameters, exposure time and brightness gain to obtain an image.
[0105] In some embodiments, see Fig.10The shooting module 903 is used to shoot the object based on the fill light parameters to obtain an image when the sum of the image brightness corresponding to the light brightness and the image brightness corresponding to the fill light parameters reaches the brightness index; when the sum of the image brightness corresponding to the light brightness and the image brightness corresponding to the fill light parameters does not reach the brightness index, shoot the object based on the fill light parameters, exposure time and brightness gain to obtain an image.
[0106] In some embodiments, see Fig.10 , the device further comprises:
[0107] A second acquisition module 904 is used to acquire a first corresponding relationship, where the first corresponding relationship is used to indicate the contribution of the ambient light brightness to the image brightness;
[0108] The generating module 905 is used to generate a shooting parameter table based on the first corresponding relationship.
[0109] In some embodiments, see Fig.10 , a second acquisition module 904 is used to obtain multiple sample light brightnesses; for any sample light brightness, shooting is performed in an environment of the sample light brightness to obtain a first sample image; the brightness of the first sample image is determined, and the brightness of the first sample image is used to represent the contribution of the sample light brightness; based on the brightness of the first sample image corresponding to the multiple sample light brightnesses, a first corresponding relationship is fitted.
[0110] In some embodiments, see Fig.10 , generating module 905, including:
[0111] An acquisition unit 9051 is used to acquire a second corresponding relationship, where the second corresponding relationship is used to indicate the contribution of the shooting distance and the fill light parameters to the image brightness;
[0112] The generating unit 9052 is used to generate a shooting parameter table based on the first corresponding relationship and the second corresponding relationship.
[0113] In some embodiments, see Fig.10 , an acquisition unit 9051 is used to obtain multiple sample shooting distances; for any sample shooting distance, shooting is performed at the sample shooting distance to obtain a second sample image; the sample shooting distance is fixed, the sample fill light parameters are adjusted, shooting is performed, and a third sample image is obtained; based on the brightness of the second sample image and the brightness of the third sample image, a brightness difference is determined, and the brightness difference is used to indicate the contribution of the fill light parameters to the image brightness at the sample shooting distance; based on the brightness difference corresponding to the sample fill light parameters, a corresponding sub-relationship between the fill light parameters and the image brightness at the sample shooting distance is determined, and multiple corresponding sub-relationships constitute a second corresponding relationship.
[0114] In some embodiments, see Fig.10 , a generating unit 9052 is used to obtain a third corresponding relationship, where the third corresponding relationship is used to indicate the contribution of the exposure time and the brightness gain to the image brightness; and a shooting parameter table is generated based on the first corresponding relationship, the second corresponding relationship and the third corresponding relationship.
[0115] In some embodiments, the shooting module 903 is used to perform multiple shootings based on the shooting parameters in the shooting parameter table to obtain multiple images;
[0116] Continue to see Fig.10 , the device further comprises:
[0117] The updating module 906 is configured to update the shooting parameter table when the brightness of a preset number of images among the multiple images does not meet the brightness index.
[0118] An embodiment of the present application provides an image capturing device, which records the shooting parameters required for capturing an image that meets the brightness index at any shooting distance and any light brightness in a shooting record table, so that in the process of capturing the image, the corresponding target shooting parameters can be directly found in the shooting parameter table according to the shooting distance between the object and the camera in the current situation and the light brightness in the current environment, so that the object can be captured quickly using the target shooting parameters. Since the shooting record table records the shooting parameters required for capturing an image that meets the brightness index, the image captured based on the target shooting parameters meets the brightness index, that is, the image that meets the brightness index can be obtained by shooting once, thereby improving the image shooting efficiency while ensuring the image quality.
[0119] It should be noted that the image capture device provided in the above embodiment is only illustrated by the division of the above functional modules when running an application program. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the image capture device provided in the above embodiment and the image capture method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0120] In the embodiments of the present application, the computer device can be configured as a terminal or a server. When the computer device is configured as a terminal, the terminal can be used as the execution subject to implement the technical solution provided in the embodiments of the present application. When the computer device is configured as a server, the server can be used as the execution subject to implement the technical solution provided in the embodiments of the present application. The technical solution provided in the present application can also be implemented through interaction between the terminal and the server. The embodiments of the present application are not limited to this.
[0121] Fig.11 1 is a block diagram of a terminal 1100 provided according to an embodiment of the present application. The terminal 1100 may be a portable mobile terminal, such as a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer or a desktop computer. The terminal 1100 may also be referred to as a user device, a portable terminal, a laptop terminal, a desktop terminal or other names.
[0122] Typically, the terminal 1100 includes a processor 1101 and a memory 1102 .
[0123] The processor 1101 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1101 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1101 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU; the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1101 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1101 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0124] The memory 1102 may include one or more computer-readable storage media, which may be non-transitory. The memory 1102 may also include a high-speed random access memory and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1102 is used to store at least one computer program, which is executed by the processor 1101 to implement the image capture method provided in the method embodiment of the present application.
[0125] In some embodiments, the terminal 1100 may further optionally include: a peripheral device interface 1103 and at least one peripheral device. The processor 1101, the memory 1102 and the peripheral device interface 1103 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 1103 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 1104, a display screen 1105, a camera assembly 1106, an audio circuit 1107 and a power supply 1108.
[0126] The peripheral device interface 1103 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 1101 and the memory 1102. In some embodiments, the processor 1101, the memory 1102, and the peripheral device interface 1103 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1101, the memory 1102, and the peripheral device interface 1103 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
[0127] The radio frequency circuit 1104 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 1104 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 1104 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. In some embodiments, the radio frequency circuit 1104 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency circuit 1104 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 1104 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.
[0128] The display screen 1105 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1105 is a touch display screen, the display screen 1105 also has the ability to collect touch signals on the surface or above the surface of the display screen 1105. The touch signal can be input to the processor 1101 as a control signal for processing. At this time, the display screen 1105 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 1105 can be one, set on the front panel of the terminal 1100; in other embodiments, the display screen 1105 can be at least two, respectively set on different surfaces of the terminal 1100 or in a folding design; in other embodiments, the display screen 1105 can be a flexible display screen, set on a curved surface or a folding surface of the terminal 1100. Even, the display screen 1105 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 1105 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0129] The camera assembly 1106 is used to capture images or videos. In some embodiments, the camera assembly 1106 includes a front camera and a rear camera. Typically, the front camera is disposed on the front panel of the terminal, and the rear camera is disposed on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize the panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 1106 may also include a flash. The flash may be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.
[0130] The audio circuit 1107 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 1101 for processing, or input them into the radio frequency circuit 1104 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the terminal 1100. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 1101 or the radio frequency circuit 1104 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 1107 may also include a headphone jack.
[0131] The power supply 1108 is used to power various components in the terminal 1100. The power supply 1108 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 1108 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery charged through a wired line, and a wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0132] In some embodiments, the terminal 1100 further includes one or more sensors 1109 , including but not limited to: an acceleration sensor 1110 , a gyroscope sensor 1111 , a pressure sensor 1112 , an optical sensor 1113 , and a proximity sensor 1114 .
[0133] The acceleration sensor 1110 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the terminal 1100. For example, the acceleration sensor 1110 can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 1101 can control the display screen 1105 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 1110. The acceleration sensor 1110 can also be used for collecting game or user motion data.
[0134] The gyro sensor 1111 can detect the body direction and rotation angle of the terminal 1100, and the gyro sensor 1111 can cooperate with the acceleration sensor 1110 to collect the user's 3D actions on the terminal 1100. The processor 1101 can implement the following functions based on the data collected by the gyro sensor 1111: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
[0135] The pressure sensor 1112 may be provided at the side frame of the terminal 1100 and / or the lower layer of the display screen 1105. When the pressure sensor 1112 is provided at the side frame of the terminal 1100, it may detect the user's holding signal of the terminal 1100, and the processor 1101 may perform left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 1112. When the pressure sensor 1112 is provided at the lower layer of the display screen 1105, the processor 1101 may control the operability control on the UI interface according to the user's pressure operation on the display screen 1105. The operability control includes at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0136] The optical sensor 1113 is used to collect the ambient light intensity. In one embodiment, the processor 1101 can control the display brightness of the display screen 1105 according to the ambient light intensity collected by the optical sensor 1113. Specifically, when the ambient light intensity is high, the display brightness of the display screen 1105 is increased; when the ambient light intensity is low, the display brightness of the display screen 1105 is reduced. In another embodiment, the processor 1101 can also dynamically adjust the shooting parameters of the camera assembly 1106 according to the ambient light intensity collected by the optical sensor 1113.
[0137] The proximity sensor 1114, also called a distance sensor, is usually arranged on the front panel of the terminal 1100. The proximity sensor 1114 is used to collect the distance between the user and the front of the terminal 1100. In one embodiment, when the proximity sensor 1114 detects that the distance between the user and the front of the terminal 1100 is gradually decreasing, the processor 1101 controls the display screen 1105 to switch from the screen-on state to the screen-off state; when the proximity sensor 1114 detects that the distance between the user and the front of the terminal 1100 is gradually increasing, the processor 1101 controls the display screen 1105 to switch from the screen-off state to the screen-on state.
[0138] Those skilled in the art will understand that Fig.11 The structure shown in the figure does not constitute a limitation on the terminal 1100, and the terminal 1100 may include more or fewer components than those shown in the figure, or combine certain components, or adopt a different component arrangement.
[0139] The embodiment of the present application also provides a computer-readable storage medium, in which at least one computer program is stored, and the at least one computer program is loaded and executed by a processor of a computer device to implement the operation performed by the computer device in the image capturing method of the above embodiment. For example, the computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.
[0140] The embodiment of the present application also provides a computer program product, including a computer program, which is stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the image capture method provided in the above various optional implementations.
[0141] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0142] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. An image capturing method, characterized in that: The method comprises: Acquire the shooting distance between the object and the camera and the light brightness, where the light brightness is used to represent the brightness of the environment in which the object and the camera are currently located; searching a target shooting parameter corresponding to the shooting distance and the light brightness from a shooting parameter table, wherein the shooting parameter table records the shooting parameters required for shooting an image that meets the brightness index at the shooting distance and the light brightness; Based on the target shooting parameters, the object is photographed to obtain an image.
2. The method according to claim 1, characterized in that The searching the target shooting parameter corresponding to the shooting distance and the light brightness from the shooting parameter table includes: Searching for fill light parameters, exposure time, and brightness gain corresponding to the shooting distance and the light brightness from the shooting parameter table; The step of photographing the object based on the target photographing parameter to obtain an image includes: Based on at least one of the fill light parameter, the exposure time and the brightness gain, the object is photographed to obtain the image.
3. The method according to claim 2, characterized in that The step of photographing the object based on at least one of the fill light parameter, the exposure time, and the brightness gain to obtain the image includes: When the sum of the image brightness corresponding to the light brightness and the image brightness corresponding to the fill light parameter reaches the brightness index, photographing the object based on the fill light parameter to obtain the image; When the sum of the image brightness corresponding to the light brightness and the image brightness corresponding to the fill light parameter does not reach the brightness index, the object is photographed based on the fill light parameter, the exposure time and the brightness gain to obtain the image.
4. The method according to claim 1, characterized in that: The process of generating the shooting parameter table includes: Acquire a first corresponding relationship, where the first corresponding relationship is used to indicate the contribution degree of the ambient light brightness to the image brightness; Based on the first corresponding relationship, the shooting parameter table is generated.
5. The method according to claim 4, characterized in that The obtaining of the first corresponding relationship includes: Get multiple sample light brightness; For any sample light brightness, photographing is performed in an environment with the sample light brightness to obtain a first sample image; Determining the brightness of the first sample image, where the brightness of the first sample image is used to represent the contribution of the brightness of the sample light; The first corresponding relationship is fitted based on the brightness of the first sample image corresponding to the brightness of the multiple sample lights.
6. The method according to claim 4, characterized in that The generating the shooting parameter table based on the first corresponding relationship includes: Acquire a second corresponding relationship, where the second corresponding relationship is used to indicate the contribution of the shooting distance and the fill light parameters to the image brightness; The shooting parameter table is generated based on the first corresponding relationship and the second corresponding relationship.
7. The method according to claim 6, characterized in that The obtaining of the second corresponding relationship includes: Get multiple sample shooting distances; For any sample shooting distance, shooting is performed at the sample shooting distance to obtain a second sample image; Fix the sample shooting distance, adjust the sample fill light parameters, shoot, and obtain a third sample image; Determine a brightness difference value based on the brightness of the second sample image and the brightness of the third sample image, where the brightness difference value is used to indicate the contribution degree of the fill light parameter to the image brightness at the sample shooting distance; Based on the brightness difference corresponding to the sample fill light parameter, a corresponding sub-relationship between the fill light parameter and the image brightness at the sample shooting distance is determined, and a plurality of corresponding sub-relationships constitute the second corresponding relationship.
8. The method according to claim 6, characterized in that The generating the shooting parameter table based on the first corresponding relationship and the second corresponding relationship includes: Acquire a third corresponding relationship, where the third corresponding relationship is used to indicate the contribution of the exposure time and the brightness gain to the image brightness; The shooting parameter table is generated based on the first corresponding relationship, the second corresponding relationship, and the third corresponding relationship.
9. The method according to claim 1, characterized in that: The method further comprises: Based on the shooting parameters in the shooting parameter table, performing multiple shootings to obtain multiple images; When there are a preset number of images among the plurality of images whose brightness does not meet the brightness index, the shooting parameter table is updated.
10. An image capturing device, characterized in that: The device comprises: A first acquisition module is used to acquire a shooting distance between an object and a camera and a light brightness, wherein the light brightness is used to represent the brightness of an environment in which the object and the camera are currently located; A search module, used to search for target shooting parameters corresponding to the shooting distance and the light brightness from a shooting parameter table, wherein the shooting parameter table records the shooting parameters required for shooting an image that meets the brightness index at the shooting distance and the light brightness; The shooting module is used to shoot the object based on the target shooting parameters to obtain an image.
11. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory is used to store at least one computer program, and the at least one computer program is loaded by the processor to execute the image capturing method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store at least one computer program, and the at least one computer program is used to execute the image capturing method according to any one of claims 1 to 9.
13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the image capturing method according to any one of claims 1 to 9 is implemented.
Citation Information
Cited By
Low-power-consumption self-adaptive code scanning method and device and storage medium
CN121480537A
