Shooting method and device, electronic equipment, readable storage medium and program product
By obtaining environmental brightness information and judging light occlusion, brightness compensation is performed, which solves the problem of low recognition accuracy of spectral sensors in close-range shooting, improves the effect of close-range shooting, and ensures the accuracy of brightness compensation and shooting performance.
Patent Information
- Application Number
- CN202410643183.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-22
- Publication Date
- 2024-08-13
AI Technical Summary
In close-range shooting scenes, the recognition accuracy of the spectral sensor is low, resulting in poor shooting results, and the avoidance solution will sacrifice some of the unique effects of the shooting scene.
By obtaining environmental brightness information, it determines the distance between the camera and the subject, determines whether there is light occlusion, and compensates the brightness of the imaging screen based on the distance to avoid abnormal use of color temperature data and improve the accuracy of brightness compensation.
In close-range shooting scenes, brightness compensation is used to improve image effects, avoid abnormal color temperature data, enhance shooting performance, and match actual application scenarios.
Smart Images

Figure CN118488317A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of camera technology, and in particular to a shooting method, device, electronic device, computer-readable storage medium and computer program product. Background Art
[0002] With the rapid development of intelligent electronic devices and the continuous upgrading of camera technology, users have higher and higher requirements for shooting. In order to meet the shooting requirements, the contrast and clarity of the captured image can be improved by using spectral sensor to assist focusing, thereby improving the shooting effect. However, in the process of using spectral assisted focusing, the accuracy of spectral recognition is not high for close-range shooting scenes, resulting in poor close-range shooting effects. Summary of the invention
[0003] The embodiments of the present application provide a shooting method, device, electronic device, and computer-readable storage medium, which can improve close-range shooting effects.
[0004] In a first aspect, the present application provides a shooting method, comprising:
[0005] Acquire first environment brightness information;
[0006] If the first environment brightness information is less than a first brightness threshold, obtaining a distance between the first camera of the electronic device and the photographed object;
[0007] Determining whether there is light obstruction to the first camera according to the distance between the first camera and the photographed object;
[0008] If it is determined that the first camera is blocked by light, determining whether the distance between the electronic device and the photographed object is greater than a first distance threshold;
[0009] If it is determined that the distance between the electronic device and the photographed object is greater than the first distance threshold, the brightness of the imaging picture of the first camera is compensated according to the distance between the electronic device and the photographed object.
[0010] In a second aspect, the present application further provides a photographing device, including:
[0011] A brightness acquisition module, used to acquire first environment brightness information;
[0012] a distance acquisition module, configured to acquire the distance between the first camera of the electronic device and the photographed object if the first environment brightness information is less than a first brightness threshold;
[0013] an occlusion determination module, configured to determine whether the first camera is blocked by light according to the distance between the first camera and the photographed object;
[0014] a distance determination module, configured to determine whether the distance between the electronic device and the photographed object is greater than a first distance threshold if it is determined that the first camera is blocked by light;
[0015] The brightness compensation module is used to compensate the brightness of the imaging picture of the first camera according to the distance between the electronic device and the object if it is determined that the distance between the electronic device and the object is greater than the first distance threshold.
[0016] In a third aspect, the present application further provides an electronic device, comprising a first camera, a second camera, a first color temperature sensor, a second color temperature sensor, a gyroscope, a fill light component, a light sensor, a memory and a processor, wherein the first camera and the second camera are respectively located on opposite surfaces of the electronic device, the distance between the first camera and the first color temperature sensor is less than a first target distance, the distance between the first color temperature sensor and at least one edge of the electronic device is less than a second target distance, the distance between the first camera and the gyroscope is less than a third target distance, and the distance between the first camera and the fill light component is less than a fourth target distance; the distance between the first color temperature sensor and the light sensor is less than a fifth target distance; the first camera is used to shoot a shooting object in a first direction, and the second camera is used to shoot a shooting object in a second direction, and the first direction and the second direction are opposite directions; the first color temperature sensor is used to collect color temperature data used by the first camera; the second color temperature sensor is used to collect color temperature data used by the second camera; the gyroscope is used to collect posture data of the electronic device; the fill light component is used to fill light for the shooting picture; the light sensor is used to detect ambient brightness information; the memory stores a computer program, and the processor implements the steps of the above-mentioned shooting method when executing the computer program.
[0017] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the above-mentioned shooting method are implemented.
[0018] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned shooting method when executed by a processor.
[0019] The above-mentioned shooting method, device, electronic device, computer-readable storage medium and computer program product obtain the first environment brightness information. If the first environment brightness information is less than the first brightness threshold, the distance between the first camera of the electronic device and the shooting object is obtained. According to the distance between the first camera and the shooting object, it is determined whether the first camera is light-blocked. If it is determined that the first camera is light-blocked, it is determined whether the distance between the electronic device and the shooting object is greater than the first distance threshold. If it is determined that the distance between the electronic device and the shooting object is greater than the first distance threshold, the brightness of the imaging picture of the first camera is compensated according to the distance between the electronic device and the shooting object. In the case where the camera is blocked, that is, in a close-up shooting scene, the brightness of the imaging picture of the camera is compensated according to the distance between the electronic device and the shooting object, so that the brightness compensation is more matched with the actual application scene, the accuracy of the brightness compensation can be improved, and the abnormal use of color temperature data due to blockage during close-up shooting can be avoided, thereby improving the shooting effect of close-up images. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions 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 related drawings can be obtained based on these drawings without paying creative work.
[0021] Figure 1 is a schematic flow chart of a shooting method in one embodiment;
[0022] Figure 2 A schematic diagram of an imaging screen in an embodiment;
[0023] Figure 3 is a schematic flow chart of a photographing method in another embodiment;
[0024] Figure 4 is a schematic flow chart of a photographing method in another embodiment;
[0025] Figure 5 is a structural block diagram of a shooting device in one embodiment;
[0026] Figure 6 is a schematic diagram of a device layout of an electronic device in an embodiment;
[0027] Figure 7 is a schematic diagram of device layout of an electronic device in another embodiment;
[0028] Figure 8 is a schematic structural diagram of a fill light assembly in one embodiment;
[0029] Fig. 9 FIG. 4 is a diagram showing the internal structure of an electronic device in one embodiment. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0031] In order to meet the shooting requirements, the relevant technology uses spectral sensors to assist in focusing, which can improve the contrast and clarity of the captured image, thereby improving the shooting effect. Therefore, spectral assisted focusing often becomes a must for many high-end devices. However, when shooting at close range, it is easy to have low accuracy in close-range spectral recognition, resulting in abnormal image color. Based on this, the relevant technology adopts an avoidance solution, that is, when the ambient brightness or the distance between the camera and the subject is less than the set value, the spectral sensor is not used for auxiliary focusing, thereby avoiding the problem of inaccurate spectral recognition in close-range shooting scenes. However, this avoidance solution will sacrifice the characteristic effects of some shooting scenes. For example, the spectrum has obvious improvements in details such as macro shooting of flowers and insects. If the spectral sensor is not used, the improvement of these effects will be sacrificed, resulting in a decline in the overall shooting performance.
[0032] In response to the technical problem of poor close-range shooting effect in traditional technologies, an embodiment of the present application provides a shooting method, which obtains first ambient brightness information. If the first ambient brightness information is less than a first brightness threshold, the distance between a first camera of an electronic device and a shooting object is obtained. According to the distance between the first camera and the shooting object, it is determined whether there is light obstruction in the first camera. If it is determined that there is light obstruction in the first camera, it is determined whether the distance between the electronic device and the shooting object is greater than the first distance threshold. If it is determined that the distance between the electronic device and the shooting object is greater than the first distance threshold, the brightness of the imaging picture of the first camera is compensated according to the distance between the electronic device and the shooting object. This can achieve compensation for the brightness of the imaging picture of the camera in a close-range scene when the camera is obstructed, achieve brightness compensation for close-range scenes, optimize the brightness of the shooting picture, thereby avoiding the situation where color difference caused by inaccurate color temperature data collected by the color temperature sensor, and improving the shooting effect of close-range images.
[0033] The shooting method provided in the embodiment of the present application is described by taking the application on an electronic device as an example. Among them, the electronic device may include but is not limited to various personal computers, laptops, smart phones, tablet computers, cameras, Internet of Things devices and portable wearable devices. The Internet of Things devices may be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The head-mounted device may be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The electronic device may be a terminal or a server.
[0034] In one embodiment, Figure 1 As shown, a shooting method is provided, including the following steps 102 to 110.
[0035] Step 102: Obtain first environment brightness information.
[0036] The first environment brightness information refers to the brightness information of the shooting environment.
[0037] Optionally, the electronic device may obtain the image sensor gain in the camera, and obtain the first environment brightness information based on the image sensor gain. It is understandable that when the environment brightness is low, the image sensor needs a higher image sensor gain to enhance the strength of the sensor signal, so that the image can be captured more clearly, that is, the lower the environment brightness, the greater the image sensor gain, and the higher the environment brightness, the smaller the image sensor gain. There is a negative correlation between the environment brightness and the image sensor gain. Therefore, the brightness information of the first environment can be obtained according to the image sensor gain through the corresponding relationship between the image sensor gain and the environment brightness.
[0038] Optionally, the electronic device may measure the ambient brightness information through a brightness measuring device to obtain the first ambient brightness information, for example, by measuring the brightness information of the shooting environment through a light meter, an illuminometer or a light sensor.
[0039] Step 104: If the first environment brightness information is less than the first brightness threshold, obtain the distance between the first camera of the electronic device and the photographed object.
[0040] The first camera may be any camera on the electronic device, such as a main camera, and the main camera may be a camera with the highest pixel among all cameras in the electronic device. The first camera may be the main camera or another camera except the main camera.
[0041] In this embodiment, the first environment brightness information is compared with the first brightness threshold. If the first environment brightness information is less than the first brightness threshold, the distance between the first camera of the electronic device and the photographed object is obtained. The first brightness threshold can be set according to the actual application scenario. Different shooting scenarios may correspond to different first brightness thresholds. For example, the range of the first brightness threshold may be 15lux (lux) to 35lux, such as 15lux, 20lux or 30lux. The first brightness threshold can be set according to the performance of the color temperature data of the color temperature sensor. For example, for the color temperature data of the first color temperature sensor used by the first camera, if the color temperature data has better performance at the target brightness, but worse performance below the target brightness, the target brightness can be used as the first brightness threshold.
[0042] Optionally, the distance between the first camera of the electronic device and the photographed object can be measured by laser ranging. For example, the electronic device includes a laser, and the laser is emitted by the laser. The photographed object receives the laser and reflects it. According to the time it takes for the photographed object to reflect the laser back to the electronic device, combined with the speed of light, the distance between the first camera and the photographed object can be obtained. It is understandable that the distance between the first camera and the photographed object can also be obtained by other ranging methods.
[0043] Step 106: Determine whether there is light blocking the first camera according to the distance between the first camera and the photographed object.
[0044] In this embodiment, light blocking refers to the blocking of light received by the first camera by the photographed object. When the first camera is close to the photographed object, the first camera will be blocked by the photographed object, while when the first camera is far from the photographed object, the first camera will not be blocked by the photographed object. Therefore, it can be determined whether the first camera is blocked by light according to the distance between the first camera and the photographed object.
[0045] Optionally, whether the first camera is blocked by light may be determined based on the relationship between the distance between the first camera and the photographed object and the second distance threshold. For example, if the distance between the first camera and the photographed object is greater than the second distance threshold, then the first camera is not blocked by light; if the distance between the first camera and the photographed object is not greater than the second distance threshold, then the first camera is not blocked by light.
[0046] Step 108: If it is determined that the first camera is blocked by light, determine whether the distance between the electronic device and the photographed object is greater than a first distance threshold.
[0047] When it is determined that the first camera is light-blocked, the first camera is close to the subject, and then it is determined whether the distance between the electronic device and the subject is greater than the first distance threshold, and the first distance threshold is less than the distance between the first camera and the subject corresponding to when it is determined that the first camera is light-blocked. Among them, the first distance threshold can be set according to the actual application scenario. For example, the first distance threshold can be 3cm (centimeter) to 4cm, such as 3cm, 3.5cm or 4cm. The first distance threshold can be determined according to the ranging accuracy. For example, the distance between the electronic device and the subject can be determined by a proximity sensor, and the first distance threshold can be the maximum perception distance of the proximity sensor. For example, the proximity sensor can perceive objects within 3cm, then the first distance threshold can be 3cm.
[0048] Optionally, the electronic device includes a proximity sensor, and the proximity sensor can be located at the top of the electronic device, that is, at the end of the electronic device on the side closer to the first camera. If the first camera is blocked by light, the proximity sensor is activated. If the proximity sensor receives a signal, it is determined that the distance between the electronic device and the subject is not greater than a first distance threshold. If the proximity sensor does not receive a signal, it is determined that the distance between the electronic device and the subject is greater than the first distance threshold. By using the proximity sensor to assist in determining the distance between the electronic device and the subject, the accuracy of close-range judgment can be improved.
[0049] Step 110: If it is determined that the distance between the electronic device and the photographed object is greater than a first distance threshold, the brightness of the imaging picture of the first camera is compensated according to the distance between the electronic device and the photographed object.
[0050] In this embodiment, when it is determined that the first camera is blocked by light and the distance between the electronic device and the subject is greater than a first distance threshold, the brightness of the imaging picture of the first camera is compensated according to the distance between the electronic device and the subject.
[0051] Optionally, in the process of compensating the brightness of the imaging picture of the first camera according to the distance between the electronic device and the photographed object, the central area of the imaging picture can be compensated by the fill light component so that the brightness of the central area reaches a preset brightness, and then the brightness of the peripheral area of the imaging picture is adjusted according to the distance between the electronic device and the photographed object so that the brightness of the peripheral area reaches the preset brightness. It can be understood that the degree of adjustment of the brightness of the peripheral area of the imaging picture is different depending on the distance between the electronic device and the photographed object.
[0052] In the above shooting method, by obtaining the first ambient brightness information, if the first ambient brightness information is less than the first brightness threshold, the distance between the first camera of the electronic device and the shooting object is obtained, and according to the distance between the first camera and the shooting object, it is determined whether the first camera is light-blocked, and if it is determined that the first camera is light-blocked, it is determined whether the distance between the electronic device and the shooting object is greater than the first distance threshold, and if it is determined that the distance between the electronic device and the shooting object is greater than the first distance threshold, the brightness of the imaging picture of the first camera is compensated according to the distance between the electronic device and the shooting object. In the case where the camera is blocked, that is, in a close-up shooting scene, the brightness of the imaging picture of the camera is compensated according to the distance between the electronic device and the shooting object, so that the brightness compensation is more matched with the actual application scene, and the accuracy of the brightness compensation can be improved, and the abnormal use of color temperature data due to blockage during close-up shooting can be avoided, thereby improving the shooting effect of close-up images.
[0053] In some embodiments, the step 110 of compensating the brightness of the image of the first camera according to the distance between the electronic device and the photographed object includes:
[0054] The brightness of the central area of the imaging picture of the first camera is compensated so that the brightness of the central area reaches a preset brightness; the brightness of the peripheral area of the imaging picture of the first camera is adjusted according to the distance between the electronic device and the photographed object; the peripheral area is the area in the imaging picture except the central area.
[0055] In this embodiment, the imaging picture can be divided into a central area and a peripheral area, and the peripheral area is the area in the imaging picture other than the central area, wherein the central area can be an area located at the geometric center of the imaging picture, or it can be other areas, and the shape, position and size of the central area can be set according to the actual application scenario. It can be understood that the peripheral area can be an integral area or divided into multiple sub-areas. The preset brightness is a pre-set brightness threshold that characterizes the target brightness that the imaging picture needs to achieve. The preset brightness can be set according to the actual application scenario. For example, the preset brightness can be 15lux to 35lux, such as 20lux.
[0056] Optionally, the brightness of the central area of the imaging picture of the first camera can be compensated by a fill light so that the brightness of the central area reaches a preset brightness. The brightness of the central area of the imaging picture of the first camera can be compensated by a preset compensation amount each time by the fill light, and after multiple compensations, the brightness of the central area reaches the preset brightness. Alternatively, the current brightness value of the central area can be obtained, and the difference between the current brightness value and the preset brightness can be obtained according to the current brightness value and the preset brightness, and the corresponding gain adjustment value of the image sensor can be calculated according to the difference, and the target gain value of the image sensor can be obtained according to the gain adjustment value, and the gain of the image sensor is adjusted to the target gain value so that the brightness of the central area reaches the preset brightness.
[0057] Optionally, the brightness uniformity of the imaging picture of the first camera is adjusted according to the distance between the electronic device and the photographed object. It can be understood that the greater the distance between the electronic device and the photographed object, the better the uniformity of the imaging picture of the first camera, and conversely, the smaller the distance between the electronic device and the photographed object, the worse the uniformity of the imaging picture of the first camera. The distance between the electronic device and the photographed object is different, and the brightness uniformity of the corresponding imaging picture is also different. The brightness uniformity of the imaging picture of the first camera can be adjusted according to the brightness uniformity compensation value corresponding to different distances, so that the brightness of the imaging picture of the first camera is more uniform. Among them, the brightness uniformity compensation value refers to the brightness compensation value corresponding to different brightness areas.
[0058] In one example, the image is as follows: Figure 2 As shown, the brightness of the central area 202 is compensated so that the brightness of the central area 202 reaches a preset brightness, and the brightness of the peripheral area 204 of the imaging screen is adjusted according to the distance between the electronic device and the photographed object so that the brightness of the peripheral area 204 reaches a preset brightness.
[0059] In this embodiment, brightness compensation is performed on the central area of the imaging picture of the first camera so that the brightness of the central area reaches a preset brightness. The brightness of the peripheral area of the imaging picture is adjusted according to the distance between the electronic device and the photographed object to achieve brightness compensation in different areas. While achieving brightness compensation for the imaging picture, the brightness uniformity of the imaging picture is improved, thereby improving the imaging effect of the captured image.
[0060] In an exemplary embodiment, compensating the brightness of the central area of the imaging picture of the first camera so that the brightness of the central area reaches a preset brightness includes:
[0061] Each time, the brightness of the central area of the imaging picture of the first camera is compensated according to the preset compensation amount until the brightness of the central area reaches the preset brightness.
[0062] The preset compensation amount may refer to the brightness value of each compensation, or include the sensor gain value of each adjustment. The image sensor obtains the brightness value, which can be reflected by the gain value, that is, the brightness of the central area reaches the preset brightness, which is equivalent to the gain value corresponding to the image sensor gain adjustment to the preset brightness. The preset compensation amount can be set according to the actual application scenario. It can be understood that the smaller the preset compensation amount, the closer the brightness of the central area can be to the preset brightness during the actual adjustment process, and the higher the adjustment accuracy; for a larger preset compensation amount, the adjustment efficiency can be improved during the actual adjustment process, but the adjustment accuracy may be sacrificed. Therefore, when setting the preset compensation amount, it is necessary to take into account both the adjustment efficiency and the adjustment accuracy.
[0063] In one example, if the initial gain value of the image sensor is G0, the brightness of the central area is adjusted each time according to a preset compensation amount of 5% of the initial gain value, and the above process is repeated until the image sensor gain reaches the target gain value G corresponding to the preset brightness. d , that is, G d =G0(1+5%) n , where n represents the number of adjustments.
[0064] In this embodiment, the brightness of the central area of the imaging picture is compensated each time according to a preset compensation amount. After multiple compensations, the brightness of the central area reaches the preset brightness. That is, the brightness of the central area is adjusted according to the gain step, which can improve the precision and accuracy of the brightness compensation of the central area.
[0065] In an exemplary embodiment, adjusting the brightness of a peripheral area of an imaging image of a first camera according to a distance between the electronic device and a photographed object includes:
[0066] According to the distance between the first camera and the photographed object, a brightness uniformity compensation value corresponding to the distance is determined; and according to the brightness uniformity compensation value, the brightness of the peripheral area of the imaging picture of the first camera is adjusted.
[0067] The brightness uniformity compensation value refers to the brightness compensation value corresponding to different brightness areas, and the brightness uniformity compensation value is used to characterize the distribution of the brightness compensation value. The distance between the first camera and the photographed object is different, and the corresponding brightness uniformity compensation value of the imaging picture of the first camera is different. It is easy to understand that the greater the distance, the smaller the brightness uniformity compensation value, and the more uniform the brightness of the imaging picture; the smaller the distance, the larger the brightness uniformity compensation value, and the more uneven the brightness of the imaging picture. Optionally, according to the brightness uniformity compensation value, the brightness of the peripheral areas of the imaging picture is adjusted, and the brightness of each peripheral area is adjusted according to the corresponding brightness uniformity compensation value, so that the imaging picture after uniformity adjustment can be obtained.
[0068] It can be understood that the electronic device can save the correspondence between the distance between the first camera and the photographed object and the brightness uniformity compensation value. According to the correspondence, the brightness uniformity compensation value corresponding to the distance can be obtained if the distance between the first camera and the photographed object is known. The brightness uniformity compensation values corresponding to each distance can be obtained based on a large number of experimental measurements.
[0069] Optionally, for the same distance, if the imaging screen includes multiple peripheral areas, the brightness compensation adjustment is performed on the corresponding peripheral area according to the brightness uniformity compensation value corresponding to each peripheral area. It can be understood that the brightness of the corresponding area is compensated according to the brightness compensation value so that the brightness of the area after compensation reaches the brightness threshold.
[0070] In this embodiment, by determining the brightness uniformity compensation value corresponding to the distance between the first camera and the photographed object, and adjusting the brightness of the peripheral area of the imaging picture according to the brightness uniformity compensation value, the uniformity of the imaging picture can be adjusted according to different distances, thereby improving the accuracy of the adjustment of the uniformity of the imaging picture.
[0071] In some embodiments, the above method further comprises:
[0072] If it is determined that the distance between the electronic device and the photographed object is not greater than the first distance threshold, the second ambient brightness information is obtained through the light sensor; if the second ambient brightness information is greater than the second brightness threshold, the posture data collected by the gyroscope is obtained, and the brightness of the imaging picture of the first camera is compensated according to the posture data; wherein the second brightness threshold is less than the first brightness threshold.
[0073] In this embodiment, the electronic device includes a light sensor and a gyroscope, the straight-line distance between the light sensor and the first color temperature sensor is less than the fifth target distance, the straight-line distance between the gyroscope and the first camera is less than the third target distance, and the third target distance and the fifth target distance are preset distances, for example, the third target distance is 8 mm (millimeter) and the fifth target distance is 20 mm (millimeter). When it is determined that the distance between the electronic device and the photographed object is less than or equal to the first distance threshold, the second ambient brightness information is obtained through the light sensor, wherein the second ambient brightness information refers to the ambient brightness information obtained by the light sensor.
[0074] If the second environment brightness information is greater than the second brightness threshold, the posture data collected by the gyroscope is obtained, and the brightness of the imaging screen of the first camera is compensated according to the posture data, wherein the second brightness threshold is a preset environment brightness threshold, the second brightness threshold is less than the first brightness threshold, and the second brightness threshold is, for example, 2 lux. The posture data collected by the gyroscope is used to characterize the posture information of the electronic device.
[0075] Optionally, when the distance between the electronic device and the photographed object is not greater than a first distance threshold, and the second ambient brightness information is greater than a second brightness threshold, posture data collected by the gyroscope is obtained, the posture information of the electronic device is determined based on the posture data, and the brightness of the imaging picture of the first camera is compensated based on the posture information.
[0076] In this embodiment, when the distance between the electronic device and the photographed object is not greater than the first distance threshold, and the second environment brightness information is greater than the second brightness threshold, that is, when the corresponding distance conditions and brightness conditions are met, the brightness of the imaging picture of the first camera is compensated by the posture data collected by the gyroscope, and different brightness compensations are performed for different posture data. It is possible to achieve corresponding brightness adjustment of images taken in different postures at close range, thereby improving the shooting effect of close-range images.
[0077] In an exemplary embodiment, compensating the brightness of an image of a first camera according to the posture data includes:
[0078] According to the posture data, current posture information of the electronic device is determined; and according to the posture difference between the current posture information and the reference posture information, the brightness of the imaging picture of the first camera is compensated.
[0079] The posture data collected by the gyroscope may include angular velocity data, which is used to characterize the rotation angle of the electronic device. The current posture information of the electronic device can be determined based on the posture data, and the brightness of the imaging picture of the first camera is compensated based on the posture difference between the current posture information and the reference posture information. Different posture differences correspond to different compensated brightness.
[0080] Optionally, different posture differences correspond to different brightness uniformity compensation values, and the corresponding brightness uniformity compensation value is determined according to the posture difference, and the brightness of the imaging picture is compensated according to the brightness uniformity compensation value. Among them, the correspondence between the posture difference and the brightness uniformity compensation value can be stored in an electronic device, or obtained by downloading network data. The brightness uniformity compensation value includes the brightness compensation value of each area. According to the brightness compensation value of each area, the brightness compensation is performed on the corresponding area, so that the brightness of the imaging picture obtained after the brightness compensation can be more uniform. It can be understood that the brightness compensation of the corresponding area according to the brightness compensation value can make the brightness of the area reach the brightness threshold after compensation.
[0081] In this embodiment, by determining the current posture information of the electronic device based on the posture data, and compensating the brightness of the imaging picture of the first camera based on the posture difference between the current posture information and the reference posture information, different brightness compensations can be achieved for different postures, so that the brightness uniformity of the image captured in any posture is better, and the brightness of the image captured by the electronic device in different postures is balanced, thereby improving the shooting effect of close-range images.
[0082] In some embodiments, the above method also includes: if the second ambient brightness information is not greater than the second brightness threshold, adjusting the imaging picture of the first camera through the color temperature data collected by the second color temperature sensor in the electronic device; the second color temperature sensor is used to collect the color temperature data used by the second camera, and the second camera and the first camera are respectively located on opposite surfaces of the electronic device.
[0083] In this embodiment, the electronic device includes a second color temperature sensor, and the second color temperature sensor is used to collect color temperature data used by the second camera, that is, the second camera uses the color temperature data collected by the second color temperature sensor to adjust the color balance of the image, and the color balance includes white balance, so that the imaging picture of the second camera can present real and accurate colors. The first camera and the second camera are respectively located on opposite sides of the electronic device. Exemplarily, the first camera is a rear camera on the back side of the electronic device opposite to the screen side, and the second camera is a front camera on the screen side of the electronic device.
[0084] If the second ambient brightness information collected by the light sensor is not greater than the second brightness threshold, it means that the first color temperature sensor has been blocked, and the color balance of the imaging picture of the first camera is adjusted by the color temperature data collected by the second color temperature sensor. It can be understood that the embodiment of the present application does not specifically limit the method of adjusting the color balance of the imaging picture by color temperature data.
[0085] In this embodiment, when the distance between the electronic device and the photographed object is less than or equal to the first distance threshold, and the second ambient brightness information is less than or equal to the second brightness threshold, that is, in a scene where the distance is close and the light is dim, the color balance of the imaging picture of the first camera is adjusted through the color temperature data collected by the second color temperature sensor to improve the shooting effect of the captured image.
[0086] In an exemplary embodiment, determining whether there is light obstruction on the first camera according to the distance between the first camera and the photographed object includes:
[0087] If the distance between the first camera and the photographed object is less than the second distance threshold, it is determined that there is light obstruction in the first camera; if the distance between the first camera and the photographed object is not less than the second distance threshold, it is determined that there is no light obstruction in the first camera; the second distance threshold is greater than the first distance threshold.
[0088] The second distance threshold is a distance threshold for determining whether there is light obstruction in the first camera. If the distance between the first camera and the photographed object is less than the distance threshold, it is determined that there is light obstruction in the first camera. If the distance between the first camera and the photographed object is greater than or equal to the distance threshold, it is determined that there is no light obstruction in the first camera. The second distance threshold can be set according to the actual application scenario. The second distance threshold can be different for different application scenarios. The second distance threshold can be 6 cm to 12 cm, such as 6 cm, 8 cm or 10 cm. The second distance threshold can also be set according to the macro of the first camera. Macro refers to the ability to capture an image that is the same size (1:1) as the actual photographed object or slightly smaller than the actual photographed object.
[0089] In this embodiment, by determining whether there is light obstruction in the first camera through the relationship between the distance between the first camera and the photographed object and the second distance threshold, it is possible to quickly and accurately determine whether there is light obstruction in the first camera, thereby improving image capture efficiency.
[0090] In some embodiments, the above method further comprises:
[0091] If the first environment brightness information is not less than the first brightness threshold, the imaging picture is adjusted using the color temperature data collected by the first color temperature sensor.
[0092] In this embodiment, the electronic device includes a first color temperature sensor, and the straight-line distance between the first color temperature sensor and the first camera is less than the first target distance, and the first target distance is, for example, 10 mm, 9 cm, or 8 cm. The first color temperature sensor is used to collect color temperature data used by the first camera, that is, the first camera can adjust the color or hue through the color temperature data collected by the first color temperature sensor, so that the picture taken by the first camera is more natural and accurate.
[0093] If the first environment brightness information is greater than or equal to the first brightness threshold, it means that the current shooting environment is brighter, and the color temperature data collected by the first color temperature sensor corresponding to the first camera can be directly called to adjust the color or hue of the imaged picture, without compensating the brightness of the imaged picture of the first camera. It should be noted here that the specific method of adjusting the color or hue of the imaged picture by using the color temperature data collected by the color temperature sensor is not specifically limited in this embodiment.
[0094] In this embodiment, when the first environment brightness information is not less than the first brightness threshold, the imaging picture is adjusted by the color temperature data collected by the first color temperature sensor. That is, when the shooting environment is brighter, the color temperature data of the corresponding color temperature sensor is directly called to adjust the imaging picture, so that the captured image can fully display the detail features and improve the shooting effect.
[0095] In some embodiments, the above method further comprises:
[0096] If it is determined that there is no light obstruction on the first camera, the brightness of the imaging picture of the first camera is compensated by the fill light component.
[0097] In this embodiment, when the first environment brightness information is less than the first brightness threshold, if it is determined that the first camera is not blocked by light, the brightness of the image of the first camera is compensated by the fill light component. In other words, when the environment brightness is relatively dark, but the first camera is not blocked, the brightness of the image is compensated so that the environment brightness reaches the preset brightness, and the brightness uniformity of the image may not be adjusted.
[0098] Exemplarily, when the first ambient brightness information is less than 20 lux and there is no light obstruction to the first camera, the brightness of the imaging picture of the first camera is compensated by the fill light component so that the ambient brightness reaches 20 lux. Alternatively, it can be understood that the ambient brightness is compensated by the fill light component until the image sensor gain is the gain value corresponding to 20 lux.
[0099] Optionally, the electronic device includes a fill light component, and the distance between the fill light component and the first camera is less than the fourth target distance, and the fourth target distance is, for example, 5 mm or 4 mm. The fill light component includes a fill light and a lampshade, and the fill light can form a corresponding fill light angle through the lampshade, and the fill light compensates for the ambient brightness through the light projected by the fill light angle, and the same lampshade can correspond to one or more fill lights. The fill light angle in this embodiment is less than the angle threshold, and the angle threshold is, for example, 100 degrees, 90 degrees or 80 degrees, etc. It can be understood that the smaller the fill light angle, the more conducive to the collection of color temperature data.
[0100] In this embodiment, when it is determined that there is no light obstruction to the first camera, the brightness of the imaging picture of the first camera is compensated by the fill light component, so that the image can be captured in a brighter environment. The brighter environment is conducive to the collection of color temperature data, and the color temperature data can be fully utilized to adjust the imaging picture to improve the shooting effect of the captured image.
[0101] In one embodiment, Figure 3 As shown, the shooting method includes the following steps 302 to 320.
[0102] Step 302: Acquire first environment brightness information.
[0103] Step 304: If the first environment brightness information is not less than the first brightness threshold, the imaging picture of the first camera is adjusted using the color temperature data collected by the first color temperature sensor.
[0104] Step 306: if the first environment brightness information is less than the first brightness threshold, obtaining the distance between the first camera of the electronic device and the photographed object;
[0105] Step 308: Determine whether there is light blocking the first camera according to the distance between the first camera and the photographed object.
[0106] Step 310: If it is determined that there is no light shielding on the first camera, the brightness of the imaging picture of the first camera is compensated by a fill light component.
[0107] Step 312: If it is determined that the first camera is blocked by light, determine whether the distance between the electronic device and the photographed object is greater than a first distance threshold.
[0108] Step 314: If it is determined that the distance between the electronic device and the photographed object is greater than the first distance threshold, the brightness of the imaging picture of the first camera is compensated according to the distance between the electronic device and the photographed object.
[0109] Step 316: If it is determined that the distance between the electronic device and the photographed object is not greater than the first distance threshold, the second environment brightness information is obtained through the light sensor.
[0110] Step 318, if the second environment brightness information is greater than the second brightness threshold, obtain the posture data collected by the gyroscope, and compensate the brightness of the imaging picture of the first camera according to the posture data; wherein the second brightness threshold is less than the first brightness threshold.
[0111] Step 320: If the second ambient brightness information is not greater than the second brightness threshold, the imaging picture of the first camera is adjusted through the color temperature data collected by the second color temperature sensor in the electronic device; the second color temperature sensor is used to collect the color temperature data used by the second camera, and the second camera and the first camera are respectively located on opposite surfaces of the electronic device.
[0112] In one example, if Figure 4As shown, the first camera is the main camera of the electronic device, that is, the camera with the highest pixel among multiple cameras. The main camera of the electronic device collects the first environment brightness information, and the corresponding first environment brightness information can be obtained by obtaining the gain value of the image sensor in the main camera; it is judged whether the first environment brightness information is greater than the first brightness threshold of 20lux. If the first environment brightness information is greater than 20lux, the color temperature data collected by the first color temperature sensor is called to adjust the color of the picture taken by the main camera. If the first environment brightness information is not greater than 20lux, the distance between the electronic device and the photographed object is obtained by laser ranging, and it is judged whether the distance is greater than the second distance threshold of 8cm. If the distance is greater than 8cm, it means that there is no light obstruction in the main camera, and the brightness of the imaging picture of the main camera is compensated by the fill light component; if the distance is not greater than 8cm, it means that there is light obstruction in the main camera, and the proximity sensor is started to work, and the measurement range of the laser ranging is expanded by the proximity sensor. Because the laser ranging may be inaccurate within 3cm, the proximity sensor is introduced to assist in distance judgment; it is determined that the electronic device and the photographed object are close to each other. Whether the distance between the electronic device and the photographed object is greater than the first distance threshold value of 3cm; if the proximity sensor does not detect a signal, it means that the distance between the electronic device and the photographed object is greater than 3cm, that is, the distance between the electronic device and the photographed object is greater than 3cm and not greater than 8cm, then the brightness of the imaging picture of the main camera is compensated according to the distance between the electronic device and the photographed object; if the proximity sensor detects a signal, it means that the distance between the electronic device and the photographed object is not greater than 3cm, that is, the distance between the electronic device and the photographed object is less than or equal to 3cm, then the second ambient brightness information detected by the light sensor is obtained, if the second ambient brightness information is greater than the second brightness threshold value 2lux, then the posture data collected by the gyroscope is obtained, and the brightness of the imaging picture of the main camera is compensated according to the posture difference between the posture data and the reference posture; if the second ambient brightness information is not greater than the second brightness threshold value 2lux, it indicates that the first color temperature sensor is blocked, then the imaging picture of the main camera is adjusted by the color temperature data collected by the second color temperature sensor. Among them, the first color temperature sensor can be a front color temperature sensor, which is a color temperature sensor arranged on one side of the electronic device display screen, and the second color temperature sensor can be a rear color temperature sensor, which is a color temperature sensor arranged on the opposite side of the display screen.
[0113] In the above embodiment, when it is determined that the first ambient brightness information is less than the first brightness threshold, the distance between the electronic device and the photographed object is obtained, and the brightness compensation and adjustment of the corresponding imaging picture are performed according to the distance between the electronic device and the photographed object, as well as the ambient brightness conditions. This can achieve full use of the color temperature data for picture adjustment through fill light during close-range shooting, thereby avoiding abnormal use of color temperature data due to occlusion during close-range shooting. In addition, the proximity sensor can effectively expand the accuracy range of laser ranging, making close-range judgment more accurate. At different distances, different brightness compensation methods can be used to make the brightness compensation more suitable for actual application scenarios, thereby improving the shooting effect of the captured image.
[0114] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0115] Based on the same inventive concept, the embodiment of the present application also provides a photographing device for implementing the photographing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments of the photographing device provided below can refer to the limitations on the photographing method above, and will not be repeated here.
[0116] In an exemplary embodiment, Figure 5 As shown, a shooting device is provided, including: a brightness acquisition module 502, a distance acquisition module 504, an occlusion determination module 506, a distance judgment module 508 and a brightness compensation module 510, wherein:
[0117] The brightness acquisition module 502 is used to acquire the first environment brightness information;
[0118] The distance acquisition module 504 is used to acquire the distance between the first camera of the electronic device and the photographed object if the first environment brightness information is less than the first brightness threshold;
[0119] The occlusion determination module 506 is used to determine whether there is light occlusion on the first camera according to the distance between the first camera and the photographed object;
[0120] The distance determination module 508 is used to determine whether the distance between the electronic device and the photographed object is greater than a first distance threshold if it is determined that the first camera is blocked by light;
[0121] The brightness compensation module 510 is used to compensate the brightness of the imaging picture of the first camera according to the distance between the electronic device and the photographed object if it is determined that the distance between the electronic device and the photographed object is greater than a first distance threshold.
[0122] In one embodiment, the brightness compensation module 510 is also used to compensate for the brightness of the central area of the imaging picture of the first camera so that the brightness of the central area reaches a preset brightness; according to the distance between the electronic device and the photographed object, the brightness of the peripheral area of the imaging picture of the first camera is adjusted; the peripheral area is the area in the imaging picture except the central area.
[0123] In one embodiment, the brightness compensation module 510 is further configured to compensate the brightness of the central area of the imaging picture of the first camera according to a preset compensation amount each time until the brightness of the central area reaches a preset brightness.
[0124] In one embodiment, the brightness compensation module 510 is further used to determine a brightness uniformity compensation value corresponding to the distance between the first camera and the photographed object; and adjust the brightness of the peripheral area of the imaging picture of the first camera according to the brightness uniformity compensation value.
[0125] In one embodiment, the above-mentioned device also includes a posture judgment module, which is used to obtain second ambient brightness information through a light sensor if it is determined that the distance between the electronic device and the photographed object is not greater than a first distance threshold; if the second ambient brightness information is greater than a second brightness threshold, obtain the posture data collected by the gyroscope, and compensate the brightness of the imaging picture of the first camera according to the posture data; wherein the second brightness threshold is less than the first brightness threshold.
[0126] In one embodiment, the posture judgment module is further used to determine the current posture information of the electronic device according to the posture data; and to compensate the brightness of the imaging picture of the first camera according to the posture difference between the current posture information and the reference posture information.
[0127] In one embodiment, the above device further includes a first color temperature adjustment module, which is used to adjust the imaging picture through the color temperature data collected by the first color temperature sensor if the first environment brightness information is not less than the first brightness threshold.
[0128] In one embodiment, the above-mentioned device also includes a second color temperature adjustment module, which is used to adjust the imaging picture of the first camera through the color temperature data collected by the second color temperature sensor in the electronic device if the second ambient brightness information is not greater than the second brightness threshold; the second color temperature sensor is used to collect the color temperature data used by the second camera, and the second camera and the first camera are respectively located on opposite surfaces of the electronic device.
[0129] In one embodiment, the occlusion determination module 506 is also used to determine that there is light occlusion in the first camera if the distance between the first camera and the photographed object is less than a second distance threshold; if the distance between the first camera and the photographed object is not less than the second distance threshold, determine that there is no light occlusion in the first camera; the second distance threshold is greater than the first distance threshold.
[0130] In one embodiment, the brightness compensation module 510 is further configured to compensate the brightness of the imaging picture of the first camera by using a fill light component if it is determined that there is no light shielding of the first camera.
[0131] Each module in the above-mentioned shooting device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in an electronic device in the form of hardware, or can be stored in a memory in an electronic device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0132] In one embodiment, an electronic device is provided, which includes a first camera, a second camera, a first color temperature sensor, a second color temperature sensor, a gyroscope, a fill light component, a light sensor, a memory and a processor, wherein the first camera and the second camera are respectively located on opposite surfaces of the electronic device, the distance between the first camera and the first color temperature sensor is less than the first target distance, the distance between the first color temperature sensor and at least one edge of the electronic device is less than the second target distance, the distance between the first camera and the gyroscope is less than the third target distance, and the distance between the first camera and the fill light component is less than the fourth target distance; the distance between the first color temperature sensor and the light sensor is less than the fifth target distance; the first camera is used to shoot a shooting object in a first direction, and the second camera is used to shoot a shooting object in a second direction, and the first direction and the second direction are opposite directions; the first color temperature sensor is used to collect color temperature data used by the first camera; the second color temperature sensor is used to collect color temperature data used by the second camera; the gyroscope is used to collect posture data of the electronic device; the fill light component is used to fill light for the shooting picture; the light sensor is used to detect ambient brightness information; the memory stores a computer program, and the processor implements the steps of the above-mentioned shooting method when executing the computer program.
[0133] In this embodiment, the first target distance, the second target distance, the third target distance, the fourth target distance and the fifth target distance are all pre-set distance thresholds, which can be set according to the actual application scenario. For example, the first target distance can be 8mm to 10mm, the second target distance can be 4mm to 5mm, the third target distance can be 6mm to 8mm, the fourth target distance can be 3mm to 5mm, the fifth target distance can be 15mm to 20mm, etc.
[0134] In one example, a schematic diagram of a device layout of an electronic device is shown as follows: Figure 6 As shown, the first camera is a main camera 602, the second camera is a front camera (not shown in the figure), the first color temperature sensor is a rear color temperature 604, and the second color temperature sensor is a front color temperature 606. The distance between the main camera 602 and the rear color temperature 604 is less than the first target distance of 10 mm, and the distance between the rear color temperature and at least one edge of the electronic device 600 is less than the first target distance of 5 mm, wherein the edge includes Figure 6 The electronic device may further include other edges, which are not shown. The distance between the main camera 602 and the gyroscope 612 is less than the third target distance of 8 mm, the distance between the main camera 602 and the fill light component 614 is less than the fourth target distance of 5 mm, and the distance between the rear color temperature sensor 604 and the light sensor 616 is less than the fifth target distance of 20 mm.
[0135] The device layout of the electronic device in this embodiment can reduce the risk of the color temperature sensor being blocked, and avoid the problem of color cast in the main camera's shooting picture caused by the color temperature sensor being blocked. The fill light component can be used to fill light the environment in close-range shooting scenes, thereby improving the effectiveness of the color temperature sensor data and improving the shooting effect of the captured image.
[0136] It should be noted here that the meanings of the terms and execution steps involved in the electronic device provided in the embodiments of the present application can be found in the meaning descriptions and explanations of the corresponding terms in the above-mentioned shooting method, as well as the corresponding execution processes and steps.
[0137] In an optional embodiment, the electronic device also includes a laser and a proximity sensor, and the distance between the first color temperature sensor and the proximity sensor is less than the sixth target distance, wherein the laser is used to measure the distance between the first camera and the subject; and the proximity sensor is used to detect whether the distance between the electronic device and the subject is greater than the first distance threshold.
[0138] In this embodiment, the laser is used to measure the distance between the first camera and the photographed object. According to the distance between the first camera and the photographed object, it can be determined whether the first camera is blocked by light. In the case of light blocking of the first camera, the proximity sensor is used to determine whether the distance between the electronic device and the photographed object is greater than the first distance threshold. If it is determined that the distance between the electronic device and the photographed object is greater than the first distance threshold, the brightness of the imaging picture of the first camera is compensated according to the distance between the electronic device and the photographed object. For example, the device layout diagram of the electronic device is as follows: Figure 7 As shown, the distance between the rear color temperature sensor 702 and the proximity sensor 704 is less than the sixth target distance of 5 mm. The position of the laser is not specifically limited. The proximity sensor can assist in broadening the range of laser ranging and improving the accuracy of close-range measurement, thereby improving the accuracy of brightness compensation and further improving the shooting effect of the captured image.
[0139] In some embodiments, the fill light assembly includes a lampshade, a first fill light and a second fill light. The first fill light forms a first fill light angle through the lampshade, and the second fill light forms a second fill light angle through the lampshade. The first fill light angle is smaller than the second fill light angle. The first fill light is used to compensate for the brightness of the imaging picture of the first camera; the second fill light is used to shoot flash fill light.
[0140] The lampshade is used to emit light at a target angle. The lampshade can be obtained by setting a pattern on the lens, that is, the lampshade includes a lens provided with a pattern, through which the light can be emitted at a target angle. The parameters of the pattern include the pattern shape, the pattern density, and the inclination angle of the pattern, among which the pattern shape includes a straight line, an arc or a circle, and the pattern density is also called the number of line pairs.
[0141] Optionally, the same lampshade can correspond to multiple fill-in lights, and by setting different patterns in different areas of the lampshade, the fill-in angle of each fill-in light can be obtained. For example, the first fill-in light can be transmitted through the first pattern in the first area of the lampshade to obtain the first fill-in angle, the second fill-in light can be transmitted through the second pattern in the second area of the lampshade to obtain the second fill-in angle, the third fill-in light can be transmitted through the third pattern in the third area of the lampshade to obtain the third fill-in angle, and so on.
[0142] For example, Figure 8 As shown, the first fill light forms a first fill light angle 804 through the first area of the lampshade 802, and the first fill light is used to compensate the brightness of the imaging picture of the first camera. The second fill light forms a second fill light angle 806 through the second area of the lampshade 802, and the second fill light is used to shoot flash fill light. Among them, the first fill light angle is less than the first angle threshold, the second fill light angle is greater than the second angle threshold, and the first angle threshold is less than the second angle threshold. For example, the first angle threshold is 100 degrees, and the second angle threshold is 120 degrees.
[0143] This embodiment can obtain light at multiple different angles through one lampshade, which can save layout space and improve the space utilization efficiency of electronic equipment.
[0144] In an exemplary embodiment, an electronic device is provided. The electronic device may be a terminal, and its internal structure diagram may be as shown in FIG. Fig. 9 As shown. The electronic device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the electronic device is used to exchange information between the processor and an external device. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (Near Field Communication, NFC) or other technologies. When the computer program is executed by the processor, a shooting method is implemented. The display unit of the electronic device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the electronic device casing, or an external keyboard, touchpad or mouse.
[0145] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0146] In an exemplary embodiment, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps of the above-mentioned shooting method when executing the computer program.
[0147] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned shooting method are implemented.
[0148] In one embodiment, a computer program product is provided, including a computer program, which implements the steps of the above-mentioned shooting method when executed by a processor.
[0149] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0150] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0151] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0152] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A shooting method, characterized in that: Applied to electronic equipment, the method comprises: Acquire first environment brightness information; If the first environment brightness information is less than a first brightness threshold, obtaining a distance between the first camera of the electronic device and the photographed object; Determining whether there is light obstruction to the first camera according to the distance between the first camera and the photographed object; If it is determined that the first camera is blocked by light, determining whether the distance between the electronic device and the photographed object is greater than a first distance threshold; If it is determined that the distance between the electronic device and the photographed object is greater than the first distance threshold, the brightness of the imaging picture of the first camera is compensated according to the distance between the electronic device and the photographed object.
2. The method according to claim 1, characterized in that The compensating the brightness of the imaging picture of the first camera according to the distance between the electronic device and the photographed object includes: Compensating the brightness of the central area of the imaging picture of the first camera so that the brightness of the central area reaches a preset brightness; According to the distance between the electronic device and the photographed object, the brightness of the peripheral area of the imaging picture of the first camera is adjusted; the peripheral area is the area in the imaging picture except the central area.
3. The method according to claim 2, characterized in that The compensating the brightness of the central area of the imaging picture of the first camera so that the brightness of the central area reaches a preset brightness includes: The brightness of the central area of the imaging picture of the first camera is compensated according to the preset compensation amount each time until the brightness of the central area reaches the preset brightness.
4. The method according to claim 2, characterized in that: The step of adjusting the brightness of the peripheral area of the imaging picture of the first camera according to the distance between the electronic device and the photographed object includes: Determine, according to the distance between the first camera and the photographed object, a brightness uniformity compensation value corresponding to the distance; According to the brightness uniformity compensation value, the brightness of the peripheral area of the imaging picture of the first camera is adjusted.
5. The method according to claim 1, characterized in that: The method further comprises: If it is determined that the distance between the electronic device and the photographed object is not greater than the first distance threshold, obtaining second ambient brightness information through a light sensor; If the second environment brightness information is greater than a second brightness threshold, the posture data collected by the gyroscope is obtained, and the brightness of the imaging picture of the first camera is compensated according to the posture data; wherein the second brightness threshold is less than the first brightness threshold.
6. The method according to claim 5, characterized in that The compensating the brightness of the imaging picture of the first camera according to the posture data includes: Determining current posture information of the electronic device according to the posture data; The brightness of the imaging picture of the first camera is compensated according to the posture difference between the current posture information and the reference posture information.
7. The method according to claim 5, characterized in that The method further comprises: If the second environment brightness information is not greater than a second brightness threshold, adjusting the imaging picture of the first camera by using the color temperature data collected by the second color temperature sensor in the electronic device; The second color temperature sensor is used to collect color temperature data used by a second camera, and the second camera and the first camera are respectively located on opposite surfaces of the electronic device.
8. The method according to claim 1, characterized in that The determining, according to the distance between the first camera and the photographed object, whether the first camera is blocked by light includes: If the distance between the first camera and the photographed object is less than a second distance threshold, it is determined that the first camera is blocked by light; If the distance between the first camera and the photographed object is not less than a second distance threshold, it is determined that there is no light obstruction to the first camera; and the second distance threshold is greater than the first distance threshold.
9. The method according to claim 1, characterized in that: The method further comprises: If the first environment brightness information is not less than a first brightness threshold, the imaging picture is adjusted using the color temperature data collected by the first color temperature sensor.
10. The method according to claim 1, characterized in that The method further comprises: If it is determined that there is no light obstruction to the first camera, the brightness of the imaging picture of the first camera is compensated by a fill light component.
11. A photographing device, characterized in that: The device comprises: A brightness acquisition module, used to acquire first environment brightness information; a distance acquisition module, configured to acquire the distance between the first camera of the electronic device and the photographed object if the first environment brightness information is less than a first brightness threshold; an occlusion determination module, configured to determine whether the first camera is blocked by light according to the distance between the first camera and the photographed object; a distance determination module, configured to determine whether the distance between the electronic device and the photographed object is greater than a first distance threshold if it is determined that the first camera is blocked by light; The brightness compensation module is used to compensate the brightness of the imaging picture of the first camera according to the distance between the electronic device and the object if it is determined that the distance between the electronic device and the object is greater than the first distance threshold.
12. An electronic device, comprising a first camera, a second camera, a first color temperature sensor, a second color temperature sensor, a gyroscope, a fill light component, a light sensor, a memory and a processor, wherein the first camera and the second camera are respectively located on opposite surfaces of the electronic device, the distance between the first camera and the first color temperature sensor is less than a first target distance, the distance between the first color temperature sensor and at least one edge of the electronic device is less than a second target distance, the distance between the first camera and the gyroscope is less than a third target distance, the distance between the first camera and the fill light component is less than a fourth target distance; the distance between the first color temperature sensor and the light sensor is less than a fifth target distance; the first camera is used to photograph an object in a first direction, and the second camera is used to photograph an object in a second direction, the first direction and the second direction are opposite directions; the first color temperature sensor is used to collect color temperature data used by the first camera; the second color temperature sensor is used to collect color temperature data used by the second camera; the gyroscope is used to collect posture data of the electronic device; the fill light component is used to fill light for the photographed image; the light sensor is used to detect ambient brightness information; the memory stores a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 10 are implemented.
13. The electronic device according to claim 12, characterized in that: The electronic device further includes a laser and a proximity sensor, and the distance between the first color temperature sensor and the proximity sensor is less than a sixth target distance, wherein: The laser is used to measure the distance between the first camera and the photographed object; The proximity sensor is used to detect whether the distance between the electronic device and the photographed object is greater than a first distance threshold.
14. The electronic device according to claim 12, characterized in that: The fill light assembly includes a lampshade, a first fill light and a second fill light, the first fill light forms a first fill light angle through the lampshade, the second fill light forms a second fill light angle through the lampshade, and the first fill light angle is smaller than the second fill light angle; The first fill light is used to perform brightness compensation on the imaging picture of the first camera; The second fill light is used for shooting flash fill light.
15. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.
16. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.
