Shooting method, shooting device, electronic device and readable storage medium
By obtaining depth information and ambient brightness information in the shooting preview interface, determining the brightness influence coefficient and adjusting the exposure parameters, the problem of users being difficult to accurately adjust the exposure parameters is solved, and the improvement of picture quality and optimization of user experience is achieved.
Patent Information
- Application Number
- CN202210227848.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-08
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2042-03-08
AI Technical Summary
It is difficult for users to accurately adjust exposure parameters when shooting videos, resulting in poor picture quality.
By acquiring the depth information and ambient brightness information of the first image area in the shooting preview interface, the brightness influence coefficient is determined, and the exposure parameters are adjusted according to the coefficient to achieve the best shooting effect.
Even if the user does not have rich shooting experience, he can still shoot videos with better picture quality in different scenes, reducing the difficulty of the user's operation and improving the shooting experience.
Smart Images

Figure CN114615440B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of camera technology, and particularly relates to a shooting method, a shooting device, an electronic device, and a readable storage medium. Background Art
[0002] Currently, more and more users share their lives and daily routines through photos or short videos.
[0003] Exposure parameters have a great impact on image quality. The exposure parameters need to be manually adjusted by the user before shooting, and accurately adjusting the exposure parameters requires the user to have rich shooting experience.
[0004] Limited by the user's shooting experience, it is usually difficult to accurately adjust the exposure parameters for different shooting scenarios, resulting in poor picture quality of the captured videos. Summary of the Invention
[0005] The purpose of the embodiments of this application is to provide a shooting method, a shooting device, an electronic device, and a readable storage medium, which can accurately adjust the exposure parameters and improve the picture quality.
[0006] In a first aspect, the embodiments of this application provide a shooting method, which includes:
[0007] When the shooting preview interface is displayed, obtain first parameter information corresponding to a first image area in the shooting preview interface, where the first parameter information includes first depth information and first ambient brightness information;
[0008] Determine a first brightness influence coefficient of the first image area according to the first depth information and the first ambient brightness information;
[0009] Determine a first exposure parameter according to the first brightness influence coefficient;
[0010] Capture a multimedia file according to the first exposure parameter.
[0011] In a second aspect, the embodiments of this application provide a shooting device, including:
[0012] An obtaining module, configured to obtain first parameter information corresponding to a first image area in the shooting preview interface when the shooting preview interface is displayed, where the first parameter information includes first depth information and first ambient brightness information;
[0013] A first determination module, configured to determine a first brightness influence coefficient of the first image area according to the first depth information and the first ambient brightness information;
[0014] A second determination module, configured to determine a first exposure parameter according to the first brightness influence coefficient;
[0015] The shooting module is used to shoot a multimedia file according to the first exposure parameter.
[0016] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory. The memory stores a program or instruction that can run on the processor. When the program or instruction is executed by the processor, the steps of the method in the first aspect are implemented.
[0017] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method in the first aspect are implemented.
[0018] In a fifth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method in the first aspect.
[0019] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method in the first aspect.
[0020] In the embodiment of the present application, after obtaining the first depth information and the first ambient brightness information of the first image area, with reference to the first depth information and the first ambient brightness information, the first brightness influence coefficient of the first image area can be determined. Through the first brightness influence coefficient, the influence degree of the exposure value on the image brightness within the first image area can be determined (the exposure value here can refer to the default exposure value or the basic set exposure value), so that the first exposure parameter with the best shooting effect on the first image area can be selected.
[0021] During the shooting process, the electronic device can automatically adjust the first exposure parameter with reference to the first depth information of the first image area. Therefore, even if the user has little shooting experience or no shooting experience, images or videos with better picture quality can be shot in different scenarios. Thus, even if the user does not actively adjust the exposure parameter, satisfactory images or videos can be obtained, reducing the user's operation difficulty and being beneficial to improving the user's shooting experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 is a schematic flowchart of the shooting method in the embodiment of the present application;
[0023] Figure 2 shows one of the schematic diagrams of the shooting preview interface in the electronic device;
[0024] Figure 3 shows another schematic diagram of the shooting preview interface in the electronic device;
[0025] Figure 4 The third schematic diagram of the shooting preview interface in the electronic device is shown;
[0026] Figure 5 The fourth schematic diagram of the shooting preview interface in the electronic device is shown;
[0027] Figure 6 It is a schematic block diagram of the shooting device in the embodiment of the present application;
[0028] Figure 7 It is a schematic block diagram of the electronic device in the embodiment of the present application;
[0029] Figure 8 It is a schematic diagram of the hardware structure of the electronic device in the embodiment of the present application. Specific embodiments
[0030] Next, the technical solutions in the embodiments of the present application will be clearly described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art belong to the scope of protection of the present application.
[0031] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. generally belong to the same category, and do not limit the number of objects. For example, the first object can be one or multiple. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / " generally represents an "or" relationship between the associated objects before and after.
[0032] Next, in conjunction with the accompanying drawings, the shooting method, shooting device, electronic device, and readable storage medium provided in the embodiments of the present application will be described in detail through specific embodiments and their application scenarios.
[0033] As Figure 1 shown, in the embodiment of the present application, a shooting method is proposed, including:
[0034] Step 102, when the shooting preview interface is displayed, obtain first parameter information corresponding to a first image area in the shooting preview interface, where the first parameter information includes first depth information and first ambient brightness information.
[0035] The ambient brightness information can reflect the brightness and darkness of the environment where the captured image is located, and the depth information can be obtained to perform three-dimensional depth detection on the captured object.
[0036] In a possible application, a TOF (Time of Flight) sensor can be used to obtain depth information of a subject.
[0037] Step 104: Determine a first brightness influence coefficient of a first image area according to the first depth information and the first ambient brightness information;
[0038] Step 106: Determine a first exposure parameter according to the first brightness influence coefficient;
[0039] After obtaining the first depth information and the first ambient brightness information of the first image area, with reference to the first depth information and the first ambient brightness information, the first brightness influence coefficient of the first image area can be determined. Through the first brightness influence coefficient, the influence degree of the exposure value on the image brightness within the first image area can be determined (the exposure value here can refer to the default exposure value or the basic set exposure value), so that the first exposure parameter with the best shooting effect on the first image area can be selected.
[0040] Step 108: Shoot a multimedia file according to the first exposure parameter.
[0041] After determining the first exposure parameter, the subject is shot to obtain a multimedia file. The TOF sensor detects depth information in real time. The depth information obtained by the TOF sensor fits the usage scenario of the flash and can meet the strict timing requirements of the flash. Moreover, using the TOF sensor to obtain the depth information of the subject can effectively improve the exposure accuracy in the flash scenario.
[0042] During the shooting process, the electronic device can automatically adjust the first exposure parameter with reference to the first depth information of the first image area. Therefore, even if the user has little shooting experience or no shooting experience, images or videos with better picture quality can be shot in different scenarios. Thus, even if the user does not actively adjust the exposure parameter, satisfactory images or videos can be obtained, reducing the operation difficulty of the user and being beneficial to improving the shooting experience of the user.
[0043] In a possible embodiment, when the shooting preview interface is displayed, the shooting method further includes: obtaining second parameter information corresponding to a second image area in the shooting preview interface, where the second parameter information includes second depth information and second ambient brightness information; determining a second brightness influence coefficient of the second image area according to the second depth information and the second ambient brightness information; determining a second exposure parameter according to the second brightness influence coefficient, where the second exposure parameter of the second image area is different from the first exposure parameter of the first image area; shooting a multimedia file according to the first exposure parameter, including: shooting a multimedia file according to the first exposure parameter and the second exposure parameter.
[0044] In this embodiment, there is also a second image area in the shooting preview interface, that is, the shooting preview interface can be composed of at least two image areas. By obtaining the second parameter information of the second image area, the influence degree of the exposure value on the exposure brightness of the image in the first image area can be determined. Considering the brightness influence coefficients of different image areas comprehensively, the first exposure parameter and the second exposure parameter can be obtained more accurately, and different exposure processes can be performed on different image areas, so that a multimedia file with better effects can be shot.
[0045] In other embodiments, there are multiple image areas in the shooting preview interface, for example, a third image area is also included.
[0046] In a possible embodiment, determining the first brightness influence coefficient of the first image area according to the first depth information and the first ambient brightness information includes: determining preset parameter information corresponding to the first depth information and the first ambient brightness information, where the first depth information corresponds to the calibrated depth information in the preset parameter information, and the first ambient brightness information corresponds to the calibrated ambient brightness information in the preset parameter information; determining the first brightness influence coefficient of the first image area according to the preset brightness influence coefficient associated with the preset parameter information.
[0047] In this embodiment, after obtaining the first depth information and the first ambient brightness information of the first image area, the first depth information and the first ambient brightness information are matched with the preset parameter information, so as to obtain the first brightness influence coefficient corresponding to the current first depth information and the first ambient brightness information.
[0048] Specifically, the preset parameter information is pre-set calibration information, which includes multiple calibration depth information and multiple calibration ambient brightness information. Different combinations of calibration depth information and calibration ambient brightness information correspond to different preset influence coefficients. The obtained first depth information and first ambient brightness information are matched with the preset parameter information to obtain the calibration depth information that matches the first depth information and the calibration ambient brightness information that matches the first ambient brightness information, and then the preset brightness influence coefficient associated with the calibration depth information and the calibration ambient brightness information is determined, and the obtained preset brightness influence coefficient is used as the first brightness influence coefficient of the first image area.
[0049] By pre-associating the preset parameter information and the preset influence coefficient, after obtaining the first parameter information of the photographed object, the first brightness influence coefficient can be quickly obtained, which is beneficial to improving the real-time performance of adjusting the exposure parameter value, and thus beneficial to improving the shooting effect.
[0050] In a possible embodiment, the first image area includes multiple sub-areas; determining the first brightness influence coefficient of the first image area according to the preset brightness influence coefficient associated with the preset parameter information includes: determining the average value of the depth information of the multiple sub-areas; and performing interpolation calculation based on the average value and the first ambient brightness information to determine the first brightness influence coefficient of the first image area.
[0051] In this embodiment, there are usually multiple sub-areas in the shooting preview interface. For example, as shown in Figure 2 and Figure 3 Suppose the shooting preview interface includes 64×48 sub-areas. To improve the calculation speed and convenience, the 64×48 sub-blocks can be mapped into 16×16 image areas. Each sub-area has its own depth information (the number shown in each square represents its depth information). It is necessary to obtain the average value of the multiple depth information to obtain the depth information of the image area.
[0052] The preset parameter information includes calibration depth information and calibration ambient brightness information. It is difficult to cover all values of the calibration depth information and the calibration ambient brightness information. Therefore, after obtaining the depth information of the image area, it may not be possible to find the calibration depth information that matches this depth information in the preset parameter information. At this time, it is necessary to obtain the brightness influence coefficient by interpolation calculation.
[0053] Exemplarily, an example is given using the value a corresponding to the depth information depth of a certain image (the average value obtained from multiple depth information), the value b corresponding to the ambient brightness information Lux, and the brightness influence coefficient c. The value a is within the range of 20 to 30 (20 and 30 are the values corresponding to the calibrated depth information in the preset parameter information), and the value b is within the range of 400 to 500 (400 and 500 are the values corresponding to the calibrated ambient brightness information in the preset parameter information). Interpolation calculation is performed in the following manner:
[0054] (1) depth = 20, Lux = 400, c = k1; (2) depth = 20, Lux = 500, c = k2;
[0055] (3) depth = 30, Lux = 400, c = k3; (4) depth = 30, Lux = 500, c = k4;
[0056] When Depth = a and Lux = 400, the interpolated brightness influence coefficient is temp1: temp1 = k1 + (k3 - k1) × (a - 20) / (30 - 20);
[0057] When Depth = a and Lux = 500, the interpolated brightness influence coefficient is temp2: temp2 = k2 + (k4 - k2) × (a - 20) / (30 - 20);
[0058] Therefore, the first brightness influence coefficient K of this display block is: temp1 + (temp2 - temp1) × (b - 400) / (500 - 400).
[0059] Through the above calculation method, 256 K values can be obtained, namely: K1, K2......K256.
[0060] Through the above method, the brightness influence coefficients of multiple image regions can be calculated. Determining the brightness influence coefficient of the image region by interpolation calculation can improve the accuracy of obtaining the brightness influence coefficient and reduce the calibration difficulty in the early stage.
[0061] As Figure 4 shown, in a possible embodiment, determining the first exposure parameter according to the first brightness influence coefficient includes: determining the weight of the first brightness influence coefficient according to the first position of the first image region in the shooting preview interface, where the weight of the first brightness influence coefficient is associated with the distance from the first position to the geometric center of the shooting preview interface; determining the second brightness influence coefficient of the first image region according to the weight of the first brightness influence coefficient and the first brightness influence coefficient.
[0062] In this embodiment, after determining the brightness influence coefficients of multiple image regions, it is necessary to determine the weights of the brightness influence coefficients of different image regions. When determining the first exposure parameter, it is necessary to consider the influence degree of multiple brightness influence coefficients on the overall shooting effect. For an image region closer to the geometric center of the shooting preview interface, the corresponding brightness influence coefficient has a greater influence on the shooting picture. Therefore, the closer to the geometric center of the shooting preview interface, the higher the weight of the brightness influence coefficient, and vice versa.
[0063] Assume that the first image region is the entire preview interface. Then the calculation formula for the second brightness influence coefficient H is: H = (K1×W1 + K2×W2 + …… + K256×W256) / (16×16). W represents the weight of the brightness influence coefficient. Use the K values corresponding to the image regions in the first image region to calculate the weighted average.
[0064] Through the above formula, the second brightness influence coefficient corresponding to the overall region within the shooting preview interface can be calculated, and the first exposure parameter is determined according to the second brightness influence coefficient.
[0065] By applying weights to the first brightness influence coefficient, the accuracy of determining the value of the first exposure parameter can be further improved, which is beneficial to improving the shooting effect.
[0066] In a possible embodiment, a multimedia file is captured according to the first exposure parameter, including: before pre-flash shooting, collecting the first brightness value and the first sub-exposure value of the image within the shooting preview interface; during pre-flash shooting, collecting the second brightness value and the second sub-exposure value of the image within the shooting preview interface; determining the brightness change amount of the image within the shooting preview interface according to the first brightness value, the first sub-exposure value, the second brightness value, and the second sub-exposure value; obtaining the current ratio of the flash during main flash shooting and pre-flash shooting, and determining the third brightness value of the image within the shooting preview interface during main flash shooting according to the current ratio, the brightness change amount, the second brightness influence coefficient, and the first brightness value; determining the first exposure parameter according to the third brightness value, the first brightness value, and the first sub-exposure value; and capturing a multimedia file according to the first exposure parameter.
[0067] In this embodiment, during the shooting process, the flash is divided into pre-flash and main flash. Before pre-flash shooting, first obtain the first brightness value Y1 and the first sub-exposure value E1 of the image within the shooting preview interface. During pre-flash shooting, obtain the second brightness value Y2 and the second sub-exposure value E2 of the image within the shooting preview interface. In a possible application, it is necessary to obtain the second brightness value and the second sub-exposure value when the pre-flash shooting is stable.
[0068] Calculate the brightness increase Y3 of the image in the shooting preview interface under the condition of consistent exposure according to the current ratio R between the reference pre-flash and the main flash and the second brightness influence coefficient H, where Y3 = (E1 / E2)×Y2 - Y1. Estimate the third brightness value Y4 of the image in the shooting preview interface during main flash shooting according to the brightness increase, where Y4 = Y3×R×H + Y1. Finally, obtain the first exposure parameter E = Y4 / Y1×E1.
[0069] Determining the first exposure parameter in the above manner is conducive to obtaining an accurate shooting exposure value, thereby facilitating the improvement of the shooting effect.
[0070] In a possible embodiment, before obtaining the first parameter information corresponding to the first image area in the shooting preview interface, it further includes: collecting the calibration brightness values of the shooting calibration object under different calibration depth information conditions while keeping the calibrated environmental brightness information unchanged; determining the preset brightness influence coefficients of the shooting calibration object under different calibration depth information conditions according to the calibration depth information and the calibration brightness values.
[0071] In this embodiment, before shooting, it is necessary to calibrate the camera parameters. While keeping the environmental brightness unchanged, change the calibration depth information to determine the brightness values of the shooting calibration object under different calibration depth information conditions, and then determine the preset brightness influence coefficients according to the calibration depth information and the calibration brightness values.
[0072] As Figure 5 shown, for example, in an environment with uniform light illumination, for example, fixing the environmental brightness Lux = 500 and the exposure value, calculate the brightness values of the image when the flash is turned on under different depths (10, 20, 30......100). For example, when the calibration depth information is 10, the image brightness is 30, and when the calibration depth information is 50, the image brightness is 20. Taking the depth 50 as a reference of 1.0, so the brightness influence coefficient of depth 10 is 1.5, and so on for others.
[0073] It should be noted that during the calibration process, it is necessary to ensure that the shooting calibration object is at the center position of the shooting screen. Figures 5(a) and 5(b) show that the area occupied by the shooting calibration object in the entire preview interface is different under different depth information, so the areas for calculating the brightness are also different.
[0074] In a possible embodiment, before obtaining the first parameter information corresponding to the first image area in the shooting preview interface, it further includes: collecting the calibration brightness values of the shooting calibration object under different calibrated environmental brightness information conditions while keeping the calibration depth information of the shooting calibration object unchanged; determining the preset brightness influence coefficients of the shooting calibration object under different calibrated environmental brightness information conditions according to the calibrated environmental brightness information and the calibration brightness values.
[0075] In this embodiment, when calibrating the camera parameters, it is also necessary to change the ambient brightness while keeping the depth calibration depth unchanged, so as to determine the brightness values of the captured calibration object under different calibration ambient brightness information conditions. Then, a preset brightness influence coefficient is determined according to the calibration ambient brightness information and the calibration brightness value.
[0076] Exemplarily, while keeping the calibration depth information unchanged, the calibration ambient brightness information (100, 200, 300... 1000) is changed, so as to obtain a plurality of preset brightness influence coefficients.
[0077] In the shooting method provided by the embodiment of the present application, the execution subject may be a shooting device. In the embodiment of the present application, the shooting method executed by the shooting device is taken as an example to illustrate the shooting device provided by the embodiment of the present application.
[0078] As Figure 6 shown, in some embodiments of the present application, a shooting device 200 is proposed, including:
[0079] An acquisition module 210, configured to acquire first parameter information corresponding to a first image area in the shooting preview interface when the shooting preview interface is displayed, where the first parameter information includes first depth information and first ambient brightness information;
[0080] A first determination module 220, configured to determine a first brightness influence coefficient of the first image area according to the first depth information and the first ambient brightness information;
[0081] A second determination module 230, configured to determine a first exposure parameter according to the first brightness influence coefficient;
[0082] A shooting module 240, configured to shoot a multimedia file according to the first exposure parameter.
[0083] During the shooting process, the electronic device can automatically adjust the first exposure parameter with reference to the first depth information of the first image area. Therefore, even if the user has little shooting experience or no shooting experience, images or videos with better picture quality can be shot in different scenarios. Thus, even if the user does not actively adjust the exposure parameter, satisfactory images or videos can be obtained, reducing the operation difficulty of the user and being beneficial to improving the user's shooting experience.
[0084] In a possible embodiment, the acquisition module is further configured to: acquire second parameter information corresponding to a second image area in the shooting preview interface, where the second parameter information includes second depth information and second ambient brightness information; the first determination module is further configured to: determine a second brightness influence coefficient of the second image area according to the second depth information and the second ambient brightness information; the second determination module is further configured to: determine a second exposure parameter according to the second brightness influence coefficient, where the second exposure parameter of the second image area is different from the first exposure parameter of the first image area; the shooting module is specifically configured to: shoot a multimedia file according to the first exposure parameter and the second exposure parameter.
[0085] In a possible embodiment, the first determination module is specifically configured to: determine preset parameter information corresponding to the first depth information and the first ambient brightness information, where the first depth information corresponds to the calibrated depth information in the preset parameter information, and the first ambient brightness information corresponds to the calibrated ambient brightness information in the preset parameter information; determine a first brightness influence coefficient of the first image area according to a preset brightness influence coefficient associated with the preset parameter information.
[0086] In a possible embodiment, the first image area includes multiple sub-areas; the first determination module is further configured to: determine an average value of the depth information of the multiple sub-areas; perform interpolation calculation based on the average value and the first ambient brightness information to determine a first brightness influence coefficient of the first image area.
[0087] In a possible embodiment, the second determination module is specifically configured to: determine a weight of the first brightness influence coefficient according to a first position of the first image area in the shooting preview interface, where the weight of the first brightness influence coefficient is associated with the distance from the first position to the geometric center of the shooting preview interface; determine a second brightness influence coefficient of the first image area according to the weight of the first brightness influence coefficient and the first brightness influence coefficient.
[0088] In a possible embodiment, the shooting module is specifically configured to: before pre-flash shooting, collect a first brightness value and a first sub-exposure value of the image in the shooting preview interface; during pre-flash shooting, collect a second brightness value and a second sub-exposure value of the image in the shooting preview interface; determine a brightness change amount of the image in the shooting preview interface according to the first brightness value, the first sub-exposure value, the second brightness value, and the second sub-exposure value; obtain a current ratio of the flash during main flash shooting and pre-flash shooting, and determine a third brightness value of the image in the shooting preview interface during main flash shooting according to the current ratio, the brightness change amount, the second brightness influence coefficient, and the first brightness value; determine a first exposure parameter according to the third brightness value, the first brightness value, and the first sub-exposure value; shoot a multimedia file according to the first exposure parameter.
[0089] In a possible embodiment, the photographing device further includes: a calibration module. Before obtaining the first parameter information corresponding to the first image area in the photographing preview interface, the calibration module is configured to collect the calibration brightness values of the photographed calibration object under different calibration depth information when the calibrated ambient brightness information remains unchanged; and determine the preset brightness influence coefficients of the photographed calibration object under different calibration depth information according to the calibration depth information and the calibration brightness values.
[0090] In a possible embodiment, the photographing device further includes: a calibration module. Before obtaining the first parameter information corresponding to the first image area in the photographing preview interface, the calibration module is configured to collect the calibration brightness values of the photographed calibration object under different calibrated ambient brightness information when the calibration depth information of the photographed calibration object remains unchanged; and determine the preset brightness influence coefficients of the photographed calibration object under different calibrated ambient brightness information according to the calibrated ambient brightness information and the calibration brightness values.
[0091] The photographing device in the embodiments of the present application may be an electronic device or a component in an electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal or other devices other than the terminal. Exemplarily, the electronic device may be a mobile phone, a tablet computer, a laptop computer, a handheld computer, a vehicle-mounted electronic device, a Mobile Internet Device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc., and may also be a server, a Network Attached Storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc. The embodiments of the present application do not make specific limitations.
[0092] The photographing device in the embodiments of the present application may be a device with an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems. The embodiments of the present application do not make specific limitations.
[0093] The photographing provided by the embodiments of the present application can achieve Figures 1 to 5 each process implemented by the method embodiments. To avoid repetition, it will not be described in detail here.
[0094] Optionally, asFigure 7 As shown in the figure, an embodiment of the present application further provides an electronic device 300, including a processor 310 and a memory 320. A program or instruction that can run on the processor 310 is stored on the memory 320. When the program or instruction is executed by the processor 310, each step of the above-mentioned shooting method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be elaborated here.
[0095] It should be noted that the electronic device in the embodiment of the present application includes the above-mentioned mobile electronic device and non-mobile electronic device.
[0096] Figure 8 FIG. is a schematic diagram of the hardware structure of an electronic device 400 according to an embodiment of the present application.
[0097] The electronic device 400 includes, but is not limited to: a radio frequency unit 401, a network module 402, an audio output unit 403, an input unit 404, a sensor 405, a display unit 406, a user input unit 407, an interface unit 408, a memory 409, and a processor 410 and other components.
[0098] Those skilled in the art can understand that the electronic device 400 may further include a power supply (such as a battery) for supplying power to each component. The power supply can be logically connected to the processor 410 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. Figure 8 The structure of the electronic device shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine some components, or have different component arrangements, which will not be elaborated here.
[0099] Among them, the processor 410 is used to obtain first parameter information corresponding to a first image area in the shooting preview interface when the shooting preview interface is displayed. The first parameter information includes first depth information and first ambient brightness information; determine a first brightness influence coefficient of the first image area according to the first depth information and the first ambient brightness information; determine a first exposure parameter according to the first brightness influence coefficient; and obtain a multimedia file according to the first exposure parameter.
[0100] Optionally, when the shooting preview interface is displayed, the processor 410 is further configured to obtain second parameter information corresponding to a second image area in the shooting preview interface, where the second parameter information includes second depth information and second ambient brightness information; determine a second brightness influence coefficient of the second image area according to the second depth information and the second ambient brightness information; determine a second exposure parameter according to the second brightness influence coefficient, where the second exposure parameter of the second image area is different from the first exposure parameter of the first image area; and capture a multimedia file according to the first exposure parameter, including: capturing a multimedia file according to the first exposure parameter and the second exposure parameter.
[0101] Optionally, the processor 410 is further configured to determine a first brightness influence coefficient of the first image area according to the first depth information and the first ambient brightness information, including: determining preset parameter information corresponding to the first depth information and the first ambient brightness information, where the first depth information corresponds to the calibrated depth information in the preset parameter information, and the first ambient brightness information corresponds to the calibrated ambient brightness information in the preset parameter information; and determining the first brightness influence coefficient of the first image area according to a preset brightness influence coefficient associated with the preset parameter information.
[0102] Optionally, the first image area includes multiple sub-areas; the processor 410 is further configured to determine an average value of the depth information of the multiple sub-areas; and perform interpolation calculation based on the average value and the first ambient brightness information to determine the first brightness influence coefficient of the first image area.
[0103] Optionally, the processor 410 is further configured to determine a weight of the first brightness influence coefficient according to a first position of the first image area in the shooting preview interface, where the weight of the first brightness influence coefficient is associated with the distance from the first position to the geometric center of the shooting preview interface; and determine a second brightness influence coefficient of the first image area according to the weight of the first brightness influence coefficient and the first brightness influence coefficient.
[0104] Optionally, the processor 410 is further configured to collect a first brightness value and a first sub-exposure value of an image in the shooting preview interface before pre-flash shooting; collect a second brightness value and a second sub-exposure value of the image in the shooting preview interface during pre-flash shooting; determine a brightness change amount of the image in the shooting preview interface according to the first brightness value, the first sub-exposure value, the second brightness value, and the second sub-exposure value; obtain a current ratio of the flash during main flash shooting and pre-flash shooting, and determine a third brightness value of the image in the shooting preview interface during main flash shooting according to the current ratio, the brightness change amount, the second brightness influence coefficient, and the first brightness value; determine the first exposure parameter according to the third brightness value, the first brightness value, and the first sub-exposure value; and capture a multimedia file according to the first exposure parameter.
[0105] Optionally, before obtaining the first parameter information corresponding to the first image area in the shooting preview interface, the processor 410 is further configured to collect the calibration brightness values of the shooting calibration object under different calibration depth information when the calibrated ambient brightness information remains unchanged; and determine the preset brightness influence coefficients of the shooting calibration object under different calibration depth information according to the calibration depth information and the calibration brightness values.
[0106] Optionally, before obtaining the first parameter information corresponding to the first image area in the shooting preview interface, the processor 410 is further configured to collect the calibration brightness values of the shooting calibration object under different calibrated ambient brightness information when the calibration depth information of the shooting calibration object remains unchanged; and determine the preset brightness influence coefficients of the shooting calibration object under different calibrated ambient brightness information according to the calibrated ambient brightness information and the calibration brightness values.
[0107] During the shooting process, the electronic device can automatically adjust the first exposure parameter with reference to the first depth information of the first image area. Therefore, even if the user has little or no shooting experience, videos with better picture quality can be shot in different scenarios. Thus, even if the user does not actively adjust the exposure parameter, a satisfactory video can be obtained, reducing the operation difficulty of the user and being beneficial to improving the shooting experience of the user.
[0108] It should be understood that in the embodiments of the present application, the input unit 404 may include a graphics processing unit (GPU) 4041 and a microphone 4042. The graphics processing unit 4041 processes the image data of static pictures or videos obtained by an image capturing device (such as a camera) in the video capture mode or the image capture mode. The display unit 406 may include a display panel 4061, and the display panel 4061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 407 includes at least one of a touch panel 4071 and other input devices 4072. The touch panel 4071 is also called a touch screen. The touch panel 4071 may include two parts: a touch detection device and a touch controller. The other input devices 4072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be elaborated here.
[0109] The memory 409 can be used to store software programs and various data. The memory 409 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data. Among them, the first storage area may store an operating system, application programs or instructions required for at least one function (such as a sound playback function, an image playback function, etc.). In addition, the memory 409 may include a volatile memory or a non-volatile memory, or the memory 409 may include both a volatile memory and a non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDR SDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synch link dynamic random access memory (SLDRAM), and a direct rambus random access memory (DRRAM). The memory 409 in the embodiments of the present application includes, but is not limited to, these and any other suitable types of memories.
[0110] The processor 410 may include one or more processing units; optionally, the processor 410 integrates an application processor and a modem processor. Among them, the application processor mainly processes operations related to the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above modem processor may not be integrated into the processor 410 either.
[0111] The embodiments of the present application also provide a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, it implements each process of the above-mentioned shooting method embodiment and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.
[0112] Among them, the processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media such as computer read-only memory ROM, random access memory RAM, magnetic disks, or optical discs, etc.
[0113] Another embodiment of the present application provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement each process of the above-mentioned shooting method embodiment and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.
[0114] It should be understood that the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, system chip, chip system, or system-on-chip, etc.
[0115] The embodiments of the present application provide a computer program product. The program product is stored in a storage medium and is executed by at least one processor to implement each process of the above-mentioned shooting method embodiment and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.
[0116] It should be noted that in this article, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without more limitations, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including that element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed. It may also include performing functions in a substantially simultaneous manner or in the reverse order according to the functions involved. For example, the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, the features described with reference to certain examples may be combined in other examples.
[0117] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases, the former is a better implementation method. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art can be embodied in the form of a computer software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions for causing a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present application.
[0118] The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present application, those of ordinary skill in the art can also make many forms without departing from the purpose of the present application and the scope protected by the claims, and all of them belong to the protection scope of the present application.
Claims
1. A shooting method, characterized in that, it includes: When the shooting preview interface is displayed, obtaining first parameter information corresponding to a first image area in the shooting preview interface, where the first parameter information includes first depth information and first ambient brightness information; According to the first depth information and the first ambient brightness information, determining a first brightness influence coefficient of the first image area, and through the first brightness influence coefficient, determining the influence degree of the exposure value on the image brightness in the first image area; Determining a first exposure parameter according to the first brightness influence coefficient; Shooting a multimedia file according to the first exposure parameter; When the shooting preview interface is displayed, the shooting method further includes: Obtaining second parameter information corresponding to a second image area in the shooting preview interface, where the second parameter information includes second depth information and second ambient brightness information; Determining a second brightness influence coefficient of the second image area according to the second depth information and the second ambient brightness information; Determining a second exposure parameter according to the second brightness influence coefficient, where the second exposure parameter of the second image area is different from the first exposure parameter of the first image area; The shooting a multimedia file according to the first exposure parameter includes: Shooting a multimedia file according to the first exposure parameter and the second exposure parameter; The determining the first brightness influence coefficient of the first image area according to the first depth information and the first ambient brightness information includes: Determining preset parameter information corresponding to the first depth information and the first ambient brightness information; Determining the first brightness influence coefficient of the first image area according to a preset brightness influence coefficient associated with the preset parameter information; The first image area includes a plurality of sub-areas, and each of the sub-areas has its own depth information; The determining the first brightness influence coefficient of the first image area according to the preset brightness influence coefficient associated with the preset parameter information includes: Determining an average value of the depth information of the plurality of sub-areas; Performing interpolation calculation based on the average value and the first ambient brightness information to determine the first brightness influence coefficient of the first image area.
2. The shooting method according to claim 1, characterized in that, the first depth information corresponds to the calibrated depth information in the preset parameter information, and the first ambient brightness information corresponds to the calibrated ambient brightness information in the preset parameter information.
3. The shooting method according to claim 1, characterized in that, the determining a first exposure parameter according to the first brightness influence coefficient includes: Determining a weight of the first brightness influence coefficient according to a first position of the first image area in the shooting preview interface, where the weight of the first brightness influence coefficient is associated with the distance from the first position to the geometric center of the shooting preview interface; Determining a second brightness influence coefficient of the first image area according to the weight of the first brightness influence coefficient and the first brightness influence coefficient.
4. The shooting method according to claim 3, wherein, shooting a multimedia file according to the first exposure parameter includes: before pre-flash shooting, collecting a first brightness value and a first sub-exposure value of an image in the shooting preview interface; during pre-flash shooting, collecting a second brightness value and a second sub-exposure value of an image in the shooting preview interface; determining a brightness change amount of the image in the shooting preview interface according to the first brightness value, the first sub-exposure value, the second brightness value, and the second sub-exposure value; obtaining a current ratio of the flash during main flash shooting and the pre-flash shooting, and determining a third brightness value of the image in the shooting preview interface during the main flash shooting according to the current ratio, the brightness change amount, the second brightness influence coefficient, and the first brightness value; determining a first exposure parameter according to the third brightness value, the first brightness value, and the first sub-exposure value; shooting a multimedia file according to the first exposure parameter.
5. The shooting method according to claim 2, wherein, before obtaining the first parameter information corresponding to the first image area in the shooting preview interface, further includes: collecting calibration brightness values of a shooting calibration object under different calibration depth information when the calibrated environmental brightness information remains unchanged; determining a preset brightness influence coefficient of the shooting calibration object under different calibration depth information according to the calibration depth information and the calibration brightness values.
6. The shooting method according to claim 2, wherein, before obtaining the first parameter information corresponding to the first image area in the shooting preview interface, further includes: collecting calibration brightness values of the shooting calibration object under different calibrated environmental brightness information when the calibration depth information of the shooting calibration object remains unchanged; determining a preset brightness influence coefficient of the shooting calibration object under different calibrated environmental brightness information according to the calibrated environmental brightness information and the calibration brightness values.
7. A shooting device, wherein, includes: an acquisition module, configured to obtain first parameter information corresponding to a first image area in the shooting preview interface when the shooting preview interface is displayed, where the first parameter information includes first depth information and first environmental brightness information; a first determination module, configured to determine a first brightness influence coefficient of the first image area according to the first depth information and the first environmental brightness information, and determine the influence degree of the exposure value on the image brightness in the first image area through the first brightness influence coefficient; a second determination module, configured to determine a first exposure parameter according to the first brightness influence coefficient; a shooting module, configured to shoot a multimedia file according to the first exposure parameter; The obtaining module is further configured to: obtain second parameter information corresponding to a second image area in the shooting preview interface, where the second parameter information includes second depth information and second ambient brightness information; the first determination module is further configured to: determine a second brightness influence coefficient of the second image area according to the second depth information and the second ambient brightness information; the second determination module is further configured to: determine a second exposure parameter according to the second brightness influence coefficient, where the second exposure parameter of the second image area is different from the first exposure parameter of the first image area; The shooting module is specifically configured to: shoot a multimedia file according to the first exposure parameter and the second exposure parameter; The first determination module is specifically configured to: determine preset parameter information corresponding to the first depth information and the first ambient brightness information; Determine a first brightness influence coefficient of the first image area according to a preset brightness influence coefficient associated with the preset parameter information; The first image area includes a plurality of sub-areas, and each of the sub-areas has its own depth information; The first determination module is further configured to: determine an average value of the depth information of the plurality of sub-areas; Based on the average value and the first ambient brightness information, perform interpolation calculation to determine the first brightness influence coefficient of the first image area.
8. An electronic device, Characterized in that, It includes a processor and a memory, and the memory stores a program or instruction that can run on the processor. When the program or instruction is executed by the processor, the steps of the shooting method according to any one of claims 1 to 6 are implemented.
9. A readable storage medium, Characterized in that, The readable storage medium stores a program or instruction. When the program or instruction is executed by a processor, the steps of the shooting method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Image processing method, apparatus, electronic device, and computer-readable storage medium
CN109242794A
Image processing method and electronic equipment
CN111083386A