CN109788207B - Image synthesis method and device, electronic equipment and readable storage medium - Google Patents
Image synthesis method and device, electronic equipment and readable storage medium Download PDFInfo
- Publication number
- CN109788207B CN109788207B CN201910094208.7A CN201910094208A CN109788207B CN 109788207 B CN109788207 B CN 109788207B CN 201910094208 A CN201910094208 A CN 201910094208A CN 109788207 B CN109788207 B CN 109788207B
- Authority
- CN
- China
- Prior art keywords
- image
- exposure
- frame
- original
- brightness
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Studio Devices (AREA)
Abstract
The application provides an image synthesis method, an image synthesis device, an electronic device and a readable storage medium, wherein the method comprises the following steps: acquiring multiple frames of original images frame by controlling an image sensor under the starting state of a light supplement lamp; the multi-frame original image comprises a short exposure image, a middle exposure image and a long exposure image, wherein the exposure degrees of the short exposure image, the middle exposure image and the long exposure image are sequentially increased; and identifying a target area with the brightness larger than a set brightness threshold value for the long exposure image in the multi-frame original image, reducing the brightness of the target area, and synthesizing the short exposure image, the medium exposure image and the adjusted long exposure image to obtain a synthesized image. According to the method, under the condition that a shooting scene is extremely dark, a plurality of frames of original images are collected under the state that the light supplement lamp is turned on, the technical problem that in the related technology, when shooting is carried out on a night scene, a long exposure is adopted to collect the plurality of frames of images, so that the images are blurred is solved, meanwhile, the shooting details of a shot object in a close-distance dark area are improved, and further, the integral imaging quality is improved.
Description
Technical Field
The present application relates to the field of imaging technologies, and in particular, to an image synthesis method and apparatus, an electronic device, and a readable storage medium.
Background
With the continuous development of the intelligent terminal technology, the use of mobile terminal devices (such as smart phones, tablet computers and the like) is more and more popular. The camera is built in most mobile terminal equipment, and along with the enhancement of mobile terminal processing capacity and the development of camera technology, the performance of built-in camera is more and more powerful, and the quality of shooting images is also more and more high. The mobile terminal device brings convenience to daily photographing of people, and meanwhile, the requirements of people on the quality of photographed images are higher and higher.
Particularly, in a night scene shooting scene, in order to enable a foreground to be clearly imaged, exposure is often performed for a long time, but when the exposure time is too long, an acquired image may blur a shot picture due to shaking and the like.
Disclosure of Invention
The application provides an image synthesis method, an image synthesis device, an electronic device and a readable storage medium, a light supplement lamp is turned on to supplement light to a foreground in a shooting scene with extremely dark ambient light brightness, so that the exposure time is shortened, the technical problem that in the related art, when a night scene is shot, a long exposure is adopted to collect multi-frame images to cause blurred images is solved, meanwhile, the shooting details of a shot object in a close-distance dark area are improved, and the overall imaging quality is further improved.
An embodiment of an aspect of the present application provides an image synthesis method, including:
controlling an image sensor to collect multiple frames of original images frame by frame under the starting state of a light supplement lamp; wherein the multi-frame original image comprises a short exposure image, a middle exposure image and a long exposure image with sequentially increased exposure;
identifying a target area with the brightness larger than a set brightness threshold value for the long exposure image in the multi-frame original image;
reducing the brightness of the target area;
and synthesizing the short exposure image, the middle exposure image and the adjusted long exposure image to obtain a synthesized image.
According to the image synthesis method, the image sensor is controlled to acquire multiple frames of original images frame by frame in the on state of the light supplement lamp; the multi-frame original image comprises a short exposure image, a middle exposure image and a long exposure image, wherein the exposure degrees of the short exposure image, the middle exposure image and the long exposure image are sequentially increased; and identifying a target area with the brightness larger than a set brightness threshold value for the long exposure image in the multi-frame original image, reducing the brightness of the target area, and synthesizing the short exposure image, the medium exposure image and the adjusted long exposure image to obtain a synthesized image. According to the method, under the condition that a shooting scene is extremely dark, a plurality of frames of original images are collected under the state that the light supplement lamp is turned on, the technical problem that in the related technology, when shooting is carried out on a night scene, a long exposure is adopted to collect the plurality of frames of images, so that the images are blurred is solved, meanwhile, the shooting details of a shot object in a close-distance dark area are improved, and further the overall imaging quality is improved.
Another embodiment of the present application provides an image synthesizing apparatus, including:
the control module is used for controlling the image sensor to collect multiple frames of original images frame by frame under the starting state of the light supplementing lamp; wherein the multi-frame original image comprises a short exposure image, a middle exposure image and a long exposure image with sequentially increased exposure;
the identification module is used for identifying a target area with the brightness larger than a set brightness threshold value for the long-exposure image in the multi-frame original image;
the adjusting module is used for reducing the brightness of the target area;
and the synthesis module is used for synthesizing the short exposure image, the middle exposure image and the adjusted long exposure image to obtain a synthesized image.
The image synthesis device of the embodiment of the application acquires multiple frames of original images frame by controlling the image sensor under the on state of the light supplement lamp; the multi-frame original image comprises a short exposure image, a middle exposure image and a long exposure image, wherein the exposure degrees of the short exposure image, the middle exposure image and the long exposure image are sequentially increased; and identifying a target area with the brightness larger than a set brightness threshold value for the long exposure image in the multi-frame original image, reducing the brightness of the target area, and synthesizing the short exposure image, the medium exposure image and the adjusted long exposure image to obtain a synthesized image. According to the method, under the condition that a shooting scene is extremely dark, a plurality of frames of original images are collected under the state that the light supplement lamp is turned on, the technical problem that in the related technology, when shooting is carried out on a night scene, a long exposure is adopted to collect the plurality of frames of images, so that the images are blurred is solved, meanwhile, the shooting details of a shot object in a close-distance dark area are improved, and further the overall imaging quality is improved.
An embodiment of another aspect of the present application provides an electronic device, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the image synthesis method as described in the above embodiments when executing the program.
In yet another aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, wherein the computer program is executed by a processor to implement the image synthesis method according to the above embodiments.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flowchart of an image synthesis method according to an embodiment of the present application;
fig. 2 is an exemplary diagram of an imaging of a shooting scene according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of another image synthesis method according to an embodiment of the present application.
FIG. 4 is a flowchart illustrating a method for determining a target exposure of an original image according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an image synthesis apparatus according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
FIG. 7 is a block diagram of an image processing circuit according to some embodiments of the present disclosure.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary and intended to be used for explaining the present application and should not be construed as limiting the present application.
An image synthesis method and apparatus of an embodiment of the present application are described below with reference to the drawings.
Fig. 1 is a schematic flowchart of an image synthesis method according to an embodiment of the present application.
The embodiment of the present application is exemplified by the image synthesis method being configured in an image synthesis apparatus, and the image synthesis apparatus may be applied to any electronic device with a shooting function, where the electronic device may be a hardware device with various operating systems and imaging devices, such as a smart phone, a tablet computer, a personal digital assistant, and a wearable device.
As shown in fig. 1, the image synthesis method includes the steps of:
The RAW image is an image which is obtained directly from an image sensor CCD or CMOS and is almost unprocessed, for example, the RAW image is in RAW format, the RAW image contains more image details, and the imaged image obtained by acquiring and processing the RAW image can make the details of the brightness and dark portion in the imaged image clearer, thereby improving the imaging quality.
In the embodiment of the application, because environmental factors such as light intensity and the influence that measured object surface material, structure, roughness distribute differently in shooting scene for the image quality that the shooting obtained is not good, consequently, the electronic equipment that has the shooting function need gather multiframe original image when shooting the image, is used for the synthetic formation of image, in order to improve the imaging quality. Wherein, the multi-frame original image comprises a short exposure image, a middle exposure image and a long exposure image with sequentially increased exposure.
The exposure level refers to the degree to which a photosensitive device of an image forming apparatus is irradiated with light. The more light rays are received by the photosensitive device, the higher the exposure degree is, and the brighter the shot image is; the less light the photosensitive device receives, the less exposure, and the darker the image taken.
In the embodiment of the application, when the electronic equipment with the shooting function collects multiple frames of original images, the electronic equipment can inform a user whether to agree to collect the images under the state of turning on the light supplement lamp. In a night scene with extremely dark light, for example, when the ambient light brightness is less than 5lux, the electronic device detects that the user triggers the operation of turning on the light supplement lamp, and then controls the image sensor to collect multiple frames of original images with different exposure degrees in the state that the light supplement lamp is turned on.
As another possible scenario, in some occasions where the light supplement lamp is not allowed to be turned on for shooting, the electronic device does not detect an operation of turning on the light supplement lamp triggered by a user, and at this time, the image sensor needs to be controlled to collect multiple frames of original images in a state where the light supplement lamp is turned off.
In the embodiment of the application, the electronic device may include a visible light image sensor, and may acquire multiple frames of original images based on the visible light image sensor in the electronic device. In particular, the visible light image sensor may include a visible light camera that may capture visible light reflected by an imaging subject for imaging.
As another possible scenario, in this embodiment of the application, the electronic device may further include a structured light image sensor, and multiple frames of raw images may be collected based on the structured light image sensor in the electronic device. Alternatively, the structured light image sensor may include a laser lamp and a laser camera. Pulse Width Modulation (PWM) can modulate the laser lamp to emit structured light, the structured light irradiates to the imaging object, and the laser camera can capture the structured light reflected by the imaging object to perform imaging, so as to obtain a structured light image corresponding to the imaging object.
And 102, identifying a target area with the brightness larger than a set brightness threshold value for a long exposure image in a plurality of frames of original images.
The brightness threshold is a preset brightness value.
In the embodiment of the application, because the collected multi-frame original images are acquired by the electronic equipment controlling the image sensor frame by frame under the on state of the light supplement lamp, the brightness of the far and near scenes in the collected images is different due to the light supplement effect of the light supplement lamp, and the over-exposure condition can occur in partial areas, so that the unnatural phenomenon occurs in the synthesized images.
Therefore, in the embodiment of the application, for a long exposure image in multiple frames of acquired original images, by identifying the brightness value of the image, a highlight area with a brightness greater than a preset brightness threshold value, that is, the aforementioned target area, is identified, so as to reduce the brightness of the target area. The brightness of the image is essentially the brightness of each pixel point in the image, the brightness value of the pixel is between 0 and 255, the brightness of the pixel close to 255 is higher, and the brightness close to 0is lower. When the brightness value of the pixel is 0, the pixel point of the image is black, and when the brightness value of the pixel is 255, the pixel point is brightest and is white.
As an example, if the preset brightness threshold is 180, by performing brightness recognition on the long-exposure image, when regions having brightness values all greater than 180 or regions having an average brightness value greater than 180 are recognized, the brightness of the recognized target region is further reduced.
And 104, synthesizing the short exposure image, the medium exposure image and the adjusted long exposure image to obtain a synthesized image.
In the embodiment of the application, the electronic device is used for controlling the image sensor to acquire the short exposure image, the medium exposure image and the adjusted long exposure image in the light supplement starting state, and the composite image is obtained by performing weighted synthesis in different areas.
In order to make the overall brightness of the synthesized image natural, the weight of the target region in the long-exposure image is smaller than the weight of the corresponding region in the short-exposure image and the medium-exposure image in the image synthesis process.
Further, when the brightness level of the environment brightness is extremely dark, noise may exist in the original images of the frames, and at this time, the multiple frames of original images obtained by shooting need to be subjected to synthesis noise reduction processing, so as to obtain an image subjected to synthesis noise reduction processing.
As an example, referring to fig. 2, the leftmost picture in fig. 2 is a captured picture in a capturing scene with extremely dark ambient light; the intermediate image is an image obtained by shooting through the imaging equipment under the state that the light supplement lamp is not turned on; the right image is an image obtained by shooting through the imaging equipment in the state of turning on the light supplement lamp. It can be observed from fig. 2 that the shooting details of the object in the dark area in the close range are improved by the image obtained by shooting in the state of turning on the light supplement lamp, and then the overall imaging quality is improved.
According to the image synthesis method, the image sensor is controlled to acquire multiple frames of original images frame by frame in the on state of the light supplement lamp; the multi-frame original image comprises a short exposure image, a middle exposure image and a long exposure image, wherein the exposure degrees of the short exposure image, the middle exposure image and the long exposure image are sequentially increased; and identifying a target area with the brightness larger than a set brightness threshold value for the long exposure image in the multi-frame original image, reducing the brightness of the target area, and synthesizing the short exposure image, the medium exposure image and the adjusted long exposure image to obtain a synthesized image. According to the method, under the condition that a shooting scene is extremely dark, a plurality of frames of original images are collected under the state that the light supplement lamp is turned on, the technical problem that in the related technology, when a night scene is shot, a long exposure is adopted to collect a plurality of frames of images, so that the images are blurred is solved, the shooting details of a shot object in a short-distance dark area are improved, and the integral imaging quality is improved.
As a possible implementation manner, referring to fig. 3, the method for acquiring multiple frames of original images in step 101 specifically includes the following steps:
Specifically, after the imaging device detects an operation of opening the camera triggered by a user, a preview picture of a current shooting scene can be acquired through the imaging device.
The threshold value is a maximum value that the brightness and/or screen light ratio of the preview image set in advance should satisfy. The screen light ratio is a ratio of light reception of a dark surface to a light surface of a subject in a preview image.
In the embodiment of the application, whether the light supplement lamp is turned on or not is determined by determining whether the brightness and/or the picture light ratio of the image previewed on the display interface of the imaging device are/is smaller than the corresponding threshold value or not.
And as a possible scene, when the determined brightness of the image previewed on the display interface of the imaging device is smaller than the corresponding threshold value, the light supplement lamp is further determined to be started.
As another possible scene, when the determined picture light ratio of the image previewed on the display interface of the imaging device is smaller than the corresponding threshold, the light supplement lamp is further determined to be turned on.
As another possible scene, when the determined brightness and the determined picture light ratio of the image previewed on the display interface of the imaging device are both smaller than the corresponding threshold values, the light supplement lamp is further determined to be turned on.
And step 203, under the on state of the light supplement lamp, performing photometry to determine the target exposure of each frame of original image.
The exposure amount refers to how much a photosensitive device in the imaging apparatus receives light within an exposure time, and the exposure amount is related to an aperture, the exposure time, and sensitivity. Wherein, the aperture, namely the clear aperture, determines the quantity of light passing in unit time; the exposure duration refers to the time when light passes through the lens; the sensitivity, also called ISO value, is an index for measuring the sensitivity of the negative film to light, and is used for representing the photosensitive speed of the photosensitive element, and the higher the ISO value is, the stronger the photosensitive capability of the photosensitive element is.
It should be noted that when the sensitivity of the imaging apparatus is low, it takes longer exposure time to achieve the same imaging effect as when the sensitivity is high. Of course, using a relatively high sensitivity generally introduces more noise in order to reduce the exposure time, which can result in reduced image quality. Therefore, in a night scene, in order to obtain a better noise suppression effect, it is desirable to set a lower sensitivity, such as 100ISO or 200ISO, and at the same time, since the aperture of an electronic device such as a mobile phone is usually fixed, it is necessary to increase the exposure time, i.e., the shutter time, accordingly.
Specifically, a preview image of a current shooting scene is acquired through imaging equipment, the ambient light brightness of each region of the preview image is further obtained through measurement of a photosensitive device, and then when the brightness and/or the picture light ratio of the preview image is smaller than a corresponding threshold value, the target exposure of each frame of original image is determined through measurement of the ambient light brightness in the state that a light supplement lamp is turned on.
And 204, determining the exposure duration of each frame of original image according to the target exposure of each frame of original image and the preset sensitivity of each frame of original image.
In the embodiment of the present application, as a possible implementation manner, when the preset sensitivity of each frame of original image is the same, the preset sensitivity of each frame of original image may be determined according to the ambient light brightness of the shooting scene. Under the condition that the light rays of a shooting scene are dark, the light sensitivity is improved, the shutter speed can be accelerated, and therefore the picture shake is reduced.
As another possible implementation, when the preset sensitivity of each frame of the original image is the same, the preset sensitivity of each frame of the original image may be determined according to the degree of shake of the imaging apparatus.
Specifically, in order to determine the degree of shaking, displacement information may be collected according to a displacement sensor provided in the imaging device, and then, the degree of shaking of the imaging device may be determined according to the collected displacement information of the imaging device. When the jitter degree of the imaging equipment is greater than or equal to a jitter threshold value, determining a preset light sensitivity value of each frame of image to be acquired in the current shooting scene as a first light sensitivity value; and when the shaking degree of the imaging equipment is smaller than the shaking threshold value, determining that the preset sensitivity value of each frame of original image in the current shooting scene is a second sensitivity value. The dithering threshold is a dithering value preset in the imaging equipment and used for determining a preset sensitivity value.
The first photosensitive value is larger than the second photosensitive value, the first photosensitive value is a preset multiple of the second photosensitive value, and the value of the preset multiple is larger than or equal to 2. As a possible implementation manner, in order to obtain lower noise, the second photosensitive value may be the minimum sensitivity of the imaging device, that is, the second photosensitive value has a value of 100ISO, and accordingly, the first photosensitive value may have a value range of 200, 400, 800, or higher.
Since the exposure amount is equal to the sensitivity multiplied by the exposure duration, in the embodiment of the present application, the exposure duration of each frame of original image can be determined according to the target exposure amount of each frame of original image and the preset sensitivity of each frame of original image.
As an example, if the target exposure of a frame of image to be captured determined by photometry is 800, and the preset sensitivity of the frame of original image is 400ISO, the exposure time for capturing the frame of original image is 2 s. By this method, the exposure time length of each frame of original image can be determined.
In step 205, if the exposure duration of the at least one frame of original image is greater than the set duration upper limit, the exposure duration of the at least one frame of original image is updated according to the duration upper limit.
As a possible implementation manner, in the embodiment of the present application, the upper limit of the exposure time of the original image of each frame may be determined according to the shake degree of the imaging device.
Specifically, in order to determine the degree of shaking, displacement information may be collected according to a displacement sensor provided in the imaging device, and then, the degree of shaking of the imaging device may be determined according to the collected displacement information of the imaging device. When the jitter degree of the imaging equipment is greater than or equal to a jitter threshold value, determining the upper limit of the exposure duration of each frame of original image in the current shooting scene as a first exposure duration; and when the shaking degree of the imaging equipment is smaller than the shaking threshold value, determining that the exposure time length upper limit of each frame of original image in the current shooting scene is the second exposure time length. The dithering threshold is a dithering value preset in the imaging equipment and used for determining a preset sensitivity value.
Wherein, the upper limit of the duration ranges from 4.5s to 5.5 s.
In the embodiment of the present application, when the exposure duration of at least one frame of image to be acquired is greater than the upper limit of the exposure duration, the exposure duration of the at least one frame of image to be acquired is set as the upper limit of the duration. And then, updating the sensitivity of the at least one frame of image to be acquired according to the target exposure and the upper limit of the time length of the at least one frame of image to be acquired and the relationship between the exposure and the sensitivity and the exposure time length. And then updating the exposure duration of the at least one frame of image to be acquired according to the upper limit of the exposure duration.
It can be understood that, if the exposure time corresponding to at least one frame of image to be acquired is greater than the preset upper limit of time, the overall shooting time may be extended, and the shake degree of the imaging device may be increased, so that a ghost and an image obvious blur may occur in the finally shot image due to shake; if the exposure time corresponding to the image to be acquired is less than the preset time lower limit, the noise in the image may be too large to be eliminated.
Therefore, after the exposure duration corresponding to each frame of original image is determined, each exposure duration can be compared with the preset duration range to judge whether the exposure duration corresponding to each frame of original image is within the preset duration range. Wherein, the upper limit of the exposure time is in the range of 4.5s to 5.5s, and the lower limit of the exposure time is greater than or equal to 10 ms. When the exposure time corresponding to a certain frame of image to be acquired is less than the set exposure time lower limit, setting the exposure time corresponding to the frame of original image as the minimum value of the time lower limit, namely 10 ms; and when the exposure duration corresponding to a certain frame of image to be acquired is greater than the exposure duration upper limit, setting the exposure duration corresponding to the frame of original image as the maximum value of the duration upper limit, namely 5.5 s.
As a possible situation, if the exposure time of a certain frame of original image is greater than the upper time limit, the exposure time of the frame of image to be acquired is updated to the upper time limit, further, the ratio between the updated exposure time and the exposure time before updating is determined, and the sensitivity or the exposure time of the other frames of original images with the exposure time greater than or equal to the lower time limit is updated according to the ratio.
As another possible scenario, when the exposure duration of the original image is less than the lower duration limit, the exposure duration is set to the minimum of the lower exposure duration limit, and since the exposure amount is the product of the sensitivity and the exposure duration, the sensitivity or the exposure duration of the original image of each of the other frames is updated according to the corresponding target exposure amount and the lower exposure duration limit.
In the embodiment of the application, if the exposure time of at least one frame of original image is less than the set time lower limit, the exposure time is set as the minimum value of the exposure time lower limit, the ratio between the updated exposure time and the exposure time before updating is determined, and the product of the ratio and the sensitivity of the rest frames of original images before updating is used as the sensitivity of the rest frames of original images after updating. Or taking the product of the ratio and the exposure duration before updating of the original images of the other frames as the exposure duration after updating of the original images of the other frames.
For example, assuming that the exposure duration of a certain frame of original image is set to be less than the lower limit of the duration, the exposure duration is set to be the minimum value of the lower limit of the duration, i.e., 10ms, so as to determine the ratio between the updated exposure duration and the exposure duration before updating, and correspondingly update the sensitivity values or the exposure durations of the rest frames of original images. For example: according to the brightness information of the current shot scene, the current exposure value is determined to be EV 0. When the exposure value of the image to be collected is EV +2, the exposure time length and the sensitivity are respectively 8ms and 100ISO, and because the exposure time length is less than the time length lower limit 10ms when the exposure time length is 8ms, the exposure time length of the EV +2 is 10ms, and the ISO value is determined to be 8/10 x 100ISO, namely 80 ISO. Therefore, the exposure duration of the frame of image to be acquired is updated, the image brightness is improved while the exposure is ensured, and image distortion caused by overexposure due to overlong exposure time is avoided.
And step 206, carrying out exposure control on the image sensor according to the exposure time and the sensitivity of each frame of original image so as to acquire multiple frames of original images frame by frame.
In the embodiment of the application, the imaging device may perform exposure control on the image sensor according to the determined exposure duration and sensitivity of each frame of original image to obtain each frame of original image.
As a possible implementation, referring to fig. 4, step 203 may further include the following steps:
In the embodiment of the application, the preview picture of the current shooting scene can be acquired through the imaging device, and is used for determining whether the current shooting scene belongs to a night scene.
Specifically, because the environmental brightness values in different scenes are different, the contents of the preview image are also different, and whether the current shooting scene belongs to a night scene or not is judged according to the image contents of the current shooting scene preview image and the environmental brightness values of the areas.
For example, the picture content of the preview picture includes a night sky, a night scene light source, or the like, or the environmental brightness value in each region of the preview picture conforms to the brightness distribution characteristic of the image in the night scene environment, so that it can be determined that the current shooting scene belongs to the night scene.
In the embodiment of the application, displacement information of the imaging device in the shooting process can be acquired through the displacement sensor arranged on the imaging device, and then the current shaking degree of the imaging device is determined according to the acquired displacement information. Therefore, whether the user fixes the imaging device on the foot rest for shooting or shooting in a handheld mode can be judged through the shaking degree of the imaging device. And then, identifying a night scene mode applicable to the current shooting scene according to the current shaking degree of the imaging device. Wherein, the night scene mode adopts the foot rest mode or the hand-held mode.
As an example, the current shaking degree of the imaging device may be determined by acquiring current gyroscope (Gyro-sensor) information of the electronic device.
The gyroscope is also called an angular velocity sensor, and can measure the rotation angular velocity of the physical quantity during deflection and inclination. In the imaging device, the gyroscope can well measure the actions of rotation and deflection, so that the actual actions of a user can be accurately analyzed and judged. The gyroscope information (gyro information) of the electronic device may include motion information of the imaging device in three dimensional directions in a three-dimensional space, and the three dimensions of the three-dimensional space may be respectively expressed as three directions of an X axis, a Y axis, and a Z axis, where the X axis, the Y axis, and the Z axis are in a pairwise perpendicular relationship.
Therefore, in the embodiment of the application, the current shaking degree of the imaging device can be determined according to the current gyro information of the electronic device. The larger the absolute value of gyro motion of the electronic apparatus in three directions, the larger the degree of shake of the imaging apparatus. Specifically, absolute value thresholds of gyro motion in three directions may be preset, and the current shake degree of the imaging device may be determined according to a relationship between the sum of the acquired absolute values of gyro motion in the three directions and the preset threshold.
For example, it is assumed that the preset threshold values are a first threshold value a, a second threshold value B, and a third threshold value C, where a < B < C, and the sum of absolute values of gyro motion in three directions currently acquired is S. If S < A, determining the current jitter degree of the imaging equipment as 'no jitter'; if A < S < B, the current shaking degree of the imaging device can be determined to be 'slight shaking'; if B < S < C, it may be determined that the current degree of shake of the imaging device is "small shake"; if S > C, it can be determined that the current shake degree of the imaging apparatus is "large shake".
It should be noted that the above examples are only illustrative and should not be construed as limiting the present application. In actual use, the number of the threshold values and the specific numerical values of the threshold values can be preset according to actual needs, and the mapping relation between gyro information and the jitter degree of the imaging device can be preset according to the relation between gyro information and the threshold values.
As another possible implementation manner, a night scene mode applicable to a current shooting scene may be identified by determining whether a preview picture of the imaging device contains a human face.
In the embodiment of the application, whether the preview picture contains a human face or not can be determined by a human face recognition technology. The face recognition technology is to analyze and compare face visual characteristic information to identify identity, belongs to the biological characteristic recognition technology, and is to distinguish organism individuals from the biological characteristics of organisms (generally specially people). Currently, face recognition technology has been applied in many fields, such as digital camera face auto-focus and smiling face shutter technology; enterprise, residential security and management; an access control system; camera surveillance systems, and the like.
It should be noted that, when it is detected that the preview picture contains a human face, the photometry module of the imaging device may automatically perform photometry mainly based on the human face area, and determine the reference exposure amount according to the photometry result of the human face area. However, in a night scene, the illuminance of a face region is generally low, which results in a determined reference exposure amount, which is higher than the reference exposure amount determined when the face is not included, and if too many overexposed frames are still acquired when the face is included, the face region is easily overexposed, which results in a poor imaging effect of the acquired image. Therefore, for the same shake degree, the night scene mode adopted when the preview picture contains a human face is different from that when the preview picture does not contain a human face.
The preset Exposure compensation Value is an Exposure Value (EV) preset according to the ambient light brightness of the current shooting scene. In the initial definition of exposure value, exposure value does not mean an exact numerical value, but means "a combination of all camera apertures and exposure periods that can give a uniform exposure amount". The sensitivity, aperture and exposure time determine the exposure of the camera, and different combinations of parameters can produce equal exposures, i.e. the EV values of these different combinations are the same, e.g. using an 1/125 second exposure time and f11 aperture combination and using a 1/250 second exposure time and f8 shutter combination, the exposure obtained is the same, i.e. the EV values are the same, with the same sensitivity.
As a possible implementation manner, the shake degrees of the imaging devices are different, and the night scene modes suitable for the current shooting scene are also different, so that the exposure compensation values preset for the determined original images of the frames are also different. In the embodiment of the present application, a mapping relationship between the shake degree of the imaging device and the exposure compensation value may be preset, so as to determine the preset exposure compensation value of the original image of each current frame according to the shake degree of the imaging device.
For example, when the shake degree of the imaging device is "no shake", the EV value range of the exposure compensation value corresponding to each frame of original image may be preset to-6-2, and the difference between the adjacent EV values is 0.5; the shaking degree of the imaging device is 'slight shaking', the EV value range of the exposure compensation value corresponding to each frame of original image is preset to be-5-1, the difference value between the adjacent EV values is 1, and the like.
As another possible implementation form, detecting whether a preview picture of the imaging device contains a human face, wherein when the preview picture contains the human face and does not contain the human face, the night scene mode applicable to the current shooting scene is different, and the exposure compensation values preset for each determined frame of original image are also different.
As another possible implementation manner, for the same shaking degree, it may be determined that different exposure compensation values are used for each frame of original image according to whether the preview picture contains a human face. Therefore, for the same degree of shaking, a plurality of exposure compensation values may be corresponded. For example, the degree of shake of the imaging device is "slight shake", and the exposure compensation value preset for each frame of original image includes both a face and a face.
In the night view mode, when an original image includes a face, the illumination intensity of a face region is usually low, so that a determined reference exposure is caused to be higher than the reference exposure determined when the face is not included, if too many overexposed frames are still acquired when the face is included, the face region is easily overexposed, so that the imaging effect of the acquired image is poor, and the corresponding exposure compensation mode needs to have a low exposure compensation range. Therefore, for the same shake degree, when the preview picture contains a human face, compared with the preview picture without the human face, after the current shake degree of the imaging device is determined and whether the preview picture contains the human face or not, the preset exposure compensation value which is consistent with the current actual situation can be determined.
And step 304, determining the reference exposure according to the brightness information of the preview image.
Specifically, a preview image of a current shooting scene is acquired through imaging equipment, the ambient light brightness of each area of the preview image is further obtained through measurement of a photosensitive device, and then the reference exposure is determined according to the brightness information of the preview image. In the case where the aperture is fixed, the reference exposure amount may specifically include a reference exposure time period and a reference sensitivity.
In the embodiment of the present application, the reference exposure amount is an exposure amount that is determined according to the luminance information of the current shooting scene, which is obtained by performing photometry on the preview image. The value of the reference exposure amount may be a product between the reference sensitivity and the reference exposure time period.
The reference sensitivity may be a sensitivity that is determined according to the current shake degree of the imaging apparatus and is suitable for the current shake degree, or may be a sensitivity obtained by photometry, which is not limited in this embodiment. It can be understood that, because the exposure and the sensitivity affect the overall shooting duration, if the shooting duration is too long, the shake degree of the imaging device may be increased during the handheld shooting, and the image quality may be affected. Therefore, when the reference sensitivity is determined according to the current degree of shake of the imaging apparatus, the photographing time period should be controlled within an appropriate range.
And 305, determining the target exposure amount of each frame of original image according to the reference exposure amount and the exposure compensation value set by each frame of original image.
Specifically, since the exposure amount is related to the aperture, the exposure time period, and the sensitivity, when the size of the aperture is fixed, the reference exposure time period can be determined from the reference exposure amount and the reference sensitivity. With the reference exposure time length being EV0, the target exposure amount of each frame of original image can be determined according to the exposure compensation value preset for each frame of original image.
As an example, if the imaging apparatus determines that the reference exposure amount of the original image of each frame is 400 from the measured brightness information of the preview image, and the reference sensitivity ISO value is 100 at this time, the reference exposure time period is 4 s. If the preset exposure compensation values of the original images of the frames are EV +1, the target exposure amount at the moment can be determined to be 800. Here, the exposure compensation of EV +1 means that the exposure amount corresponding to the photometric data of the imaging device is increased by one exposure step, that is, the actual exposure amount is twice the exposure amount corresponding to the photometric data.
In the embodiment of the present application, when the exposure compensation value is preset, the EV value corresponding to the determined reference exposure amount may be preset to 0, EV +1 refers to increasing one-stage exposure, that is, the exposure amount is 2 times of the reference exposure amount, EV +2 refers to increasing two-stage exposure, that is, the exposure amount is 4 times of the reference exposure amount, EV-1 refers to decreasing one-stage exposure, that is, the exposure amount is 0.5 times of the reference exposure amount, and so on.
For example, if the number of raw images captured by the image sensor is 7 frames, the corresponding preset exposure compensation value EV may be [ +1, +1, +1, +1,0, -3, -6 ]. The frame with the exposure compensation value EV +1 is preset, so that the noise problem can be solved, time domain noise reduction is carried out through the frame with higher brightness, and noise is suppressed while the details of a dark part are improved; presetting a frame with an exposure compensation value EV-6, solving the problem of high light overexposure and keeping the details of a high light area; the frames with preset exposure compensation values of EV0 and EV-3 can be used for maintaining the transition between highlight and dark areas and maintaining the good effect of bright-dark transition.
The image synthesis method of the embodiment of the application determines the target exposure of each frame of original image through photometry, determines the exposure duration of each frame of original image according to the target exposure of each frame of original image and the preset sensitivity of each frame of original image, updates the exposure duration of at least one frame of original image according to the upper duration limit if the exposure duration of at least one frame of original image is greater than the upper duration limit, and finally performs exposure control according to the exposure duration and the sensitivity of each frame of original image. Therefore, the exposure duration of each frame of original image is determined according to the jitter degree of the imaging equipment, the exposure duration of at least one frame of original image is updated according to the duration upper limit, and finally, exposure control is performed according to the exposure duration and the light sensitivity of each updated frame of original image to obtain each frame of original image.
In order to implement the above embodiments, the present application also proposes an image synthesizing apparatus.
Fig. 5 is a schematic structural diagram of an image synthesis apparatus according to an embodiment of the present application.
As shown in fig. 5, the image synthesizing apparatus 100 includes: a control module 110, an identification module 120, an adjustment module 130, and a synthesis module 140.
The control module 110 is configured to control the image sensor to acquire multiple frames of original images frame by frame in a state where the fill-in light is turned on; wherein, the multi-frame original image comprises a short exposure image, a middle exposure image and a long exposure image with sequentially increased exposure.
The identifying module 120 is configured to identify a target area with a brightness greater than a set brightness threshold for a long-exposure image in multiple frames of original images.
And an adjusting module 130, configured to adjust the brightness of the target area.
And a synthesizing module 140, configured to synthesize the short-exposure image, the medium-exposure image, and the adjusted long-exposure image to obtain a synthesized image.
Further, in a possible implementation manner of the embodiment of the present application, referring to fig. 5, on the basis of the embodiment shown in fig. 4, the image synthesis apparatus 100 may further include:
the obtaining module 150 obtains the preview image by the user.
A determining module 160, configured to determine that the brightness and/or the picture light ratio of the preview image is smaller than the corresponding threshold.
As a possible implementation manner, the control module 110 is specifically configured to, in a state where the fill light is turned on, perform photometry to determine a target exposure amount of each frame of the original image, determine an exposure duration of each frame of the original image according to the target exposure amount of each frame of the original image and a preset sensitivity of each frame of the original image, and perform exposure control on the image sensor according to the exposure duration and the sensitivity of each frame of the original image, so as to acquire multiple frames of the original images frame by frame.
As a possible implementation manner, the control module 110 may be further specifically configured to update the exposure duration of the at least one frame of original image according to the upper duration limit if the exposure duration of the at least one frame of original image is greater than the set upper duration limit; the upper limit of the duration ranges from 4.5s to 5.5 s.
As a possible implementation manner, the control module 110 may be further specifically configured to, if the exposure duration of at least one frame of original image is less than the set lower limit of duration, update the exposure duration of each frame of original image whose exposure duration is less than the set lower limit of duration according to the lower limit of duration; the lower limit of the duration is greater than or equal to 10 ms; and then, determining the ratio of the updated exposure time to the exposure time before updating, and updating the sensitivity or the exposure time of the original images of the other frames according to the ratio for the original images of the other frames with the exposure time being greater than or equal to the lower limit of the time.
As another possible implementation manner, the control module 110 may further include:
and the first processing unit is used for taking the product of the ratio and the sensitivity of the original images of the other frames before updating as the sensitivity of the original images of the other frames after updating.
Or, the ratio is multiplied by the exposure duration before updating of the original images of the other frames to serve as the exposure duration after updating of the original images of the other frames.
As another possible implementation manner, the control module 110 may further include:
and an acquisition unit configured to acquire the preview screen.
And the first determining unit is used for determining the scene belonging to the night scene according to the picture content of the preview picture.
And the identification unit is used for identifying an applicable night scene mode according to the shaking degree of the imaging equipment and/or whether the preview picture contains a human face.
And the second determining unit is used for determining the exposure compensation value set by each frame of original image according to the night scene mode.
And a third determining unit configured to determine the reference exposure amount based on the luminance information of the preview image.
And a fourth determination unit for determining the target exposure amount of each frame of original image according to the reference exposure amount and the exposure compensation value set for each frame of original image.
As another possible implementation manner, the synthesis module 140 is specifically configured to perform weighted synthesis on the short-exposure image, the medium-exposure image, and the adjusted long-exposure image in different regions to obtain a synthesized image;
the weight of the target area in the long exposure image is smaller than the weight of the corresponding area in the short exposure image and the middle exposure image.
It should be noted that the foregoing explanation of the embodiment of the image synthesis method is also applicable to the image synthesis apparatus of this embodiment, and is not repeated here.
The image synthesis device of the embodiment of the application acquires multiple frames of original images frame by controlling the image sensor under the on state of the light supplement lamp; the multi-frame original image comprises a short exposure image, a middle exposure image and a long exposure image, wherein the exposure degrees of the short exposure image, the middle exposure image and the long exposure image are sequentially increased; and identifying a target area with the brightness larger than a set brightness threshold value for the long exposure image in the multi-frame original image, reducing the brightness of the target area, and synthesizing the short exposure image, the medium exposure image and the adjusted long exposure image to obtain a synthesized image.
In order to implement the above embodiments, the present application also proposes an electronic device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the program, the image synthesis method as described in the above embodiments is implemented.
Referring to fig. 6, the present application further provides another electronic device 200. The electronic device 200 comprises a memory 50 and a processor 60. The memory 50 has stored therein computer readable instructions. The computer readable instructions, when executed by the memory 50, cause the processor 60 to perform the exposure control method of any of the above embodiments.
Fig. 6 is a schematic diagram of the internal structure of the electronic device 200 in one embodiment. The electronic device 200 includes a processor 60, a memory 50 (e.g., a non-volatile storage medium), an internal memory 82, a display screen 83, and an input device 84 connected by a system bus 81. The memory 50 of the electronic device 200 stores, among other things, an operating system and computer-readable instructions. The computer readable instructions can be executed by the processor 60 to implement the exposure control method according to the embodiment of the present application. The processor 60 is used to provide computing and control capabilities that support the operation of the overall electronic device 200. The internal memory 50 of the electronic device 200 provides an environment for the execution of computer readable instructions in the memory 52. The display 83 of the electronic device 200 may be a liquid crystal display or an electronic ink display, and the input device 84 may be a touch layer covered on the display 83, a button, a trackball or a touch pad arranged on a housing of the electronic device 200, or an external keyboard, a touch pad or a mouse. The electronic device 200 may be a mobile phone, a tablet computer, a notebook computer, a personal digital assistant, or a wearable device (e.g., a smart bracelet, a smart watch, a smart helmet, smart glasses), etc. Those skilled in the art will appreciate that the configuration shown in fig. 6 is merely a schematic diagram of a portion of the configuration associated with the present application, and does not constitute a limitation on the electronic device 200 to which the present application is applied, and that a particular electronic device 200 may include more or less components than those shown in the drawings, or combine certain components, or have a different arrangement of components.
Referring to fig. 7, the electronic device 200 according to the embodiment of the present disclosure includes an Image Processing circuit 90, and the Image Processing circuit 90 may be implemented by hardware and/or software components, including various Processing units defining an ISP (Image Signal Processing) pipeline. FIG. 7 is a schematic diagram of image processing circuitry 90 in one embodiment. As shown in fig. 7, for convenience of explanation, only aspects of the image processing technology related to the embodiments of the present application are shown.
As shown in fig. 7, the image processing circuit 90 includes an ISP processor 91 (the ISP processor 91 may be the processor 60) and a control logic 92. The image data captured by the camera 93 is first processed by the ISP processor 91, and the ISP processor 91 analyzes the image data to capture image statistics that may be used to determine one or more control parameters of the camera 93. The camera 93 may include one or more lenses 932 and an image sensor 934. Image sensor 934 may include an array of color filters (e.g., Bayer filters), and image sensor 934 may acquire light intensity and wavelength information captured by each imaging pixel and provide a set of raw image data that may be processed by ISP processor 91. The sensor 94 (e.g., a gyroscope) may provide parameters of the acquired image processing (e.g., anti-shake parameters) to the ISP processor 91 based on the type of interface of the sensor 94. The sensor 94 interface may be a SMIA (Standard Mobile Imaging Architecture) interface, other serial or parallel camera interface, or a combination thereof.
In addition, the image sensor 934 may also send raw image data to the sensor 94, the sensor 94 may provide the raw image data to the ISP processor 91 based on the type of interface of the sensor 94, or the sensor 94 may store the raw image data in the image memory 95.
The ISP processor 91 processes the raw image data pixel by pixel in a variety of formats. For example, each image pixel may have a bit depth of 8, 10, 12, or 14 bits, and the ISP processor 91 may perform one or more image processing operations on the raw image data, gathering statistical information about the image data. Wherein the image processing operations may be performed with the same or different bit depth precision.
The ISP processor 91 may also receive image data from the image memory 95. For example, the sensor 94 interface sends raw image data to the image memory 95, and the raw image data in the image memory 95 is then provided to the ISP processor 91 for processing. The image Memory 95 may be the Memory 50, a portion of the Memory 50, a storage device, or a separate dedicated Memory within the electronic device, and may include a DMA (Direct Memory Access) feature.
Upon receiving raw image data from the image sensor 934 interface or from the sensor 94 interface or from the image memory 95, the ISP processor 91 may perform one or more image processing operations, such as temporal filtering. The processed image data may be sent to image memory 95 for additional processing before being displayed. The ISP processor 91 receives the processed data from the image memory 95 and performs image data processing on the processed data in the raw domain and in the RGB and YCbCr color spaces. The image data processed by ISP processor 91 may be output to display 97 (display 97 may include display screen 83) for viewing by a user and/or further processed by a Graphics Processing Unit (GPU). Further, the output of the ISP processor 91 may also be sent to an image memory 95, and the display 97 may read image data from the image memory 95. In one embodiment, image memory 95 may be configured to implement one or more frame buffers. Further, the output of the ISP processor 91 may be transmitted to an encoder/decoder 96 for encoding/decoding the image data. The encoded image data may be saved and decompressed before being displayed on the display 97 device. The encoder/decoder 96 may be implemented by a CPU or GPU or coprocessor.
The statistical data determined by the ISP processor 91 may be sent to the control logic 92 unit. For example, the statistical data may include image sensor 934 statistics such as auto-exposure, auto-white balance, auto-focus, flicker detection, black level compensation, lens 932 shading correction, and the like. The control logic 92 may include a processing element and/or microcontroller that executes one or more routines (e.g., firmware) that determine control parameters of the camera 93 and control parameters of the ISP processor 91 based on the received statistical data. For example, the control parameters of camera 93 may include sensor 94 control parameters (e.g., gain, integration time for exposure control, anti-shake parameters, etc.), camera flash control parameters, lens 932 control parameters (e.g., focal length for focusing or zooming), or a combination of these parameters. The ISP control parameters may include gain levels and color correction matrices for automatic white balance and color adjustment (e.g., during RGB processing), and lens 932 shading correction parameters.
The following steps are used for realizing the image synthesis method by using the image processing technology in the figure 7:
controlling an image sensor to collect multiple frames of original images frame by frame under the starting state of a light supplement lamp; the multi-frame original image comprises a short exposure image, a middle exposure image and a long exposure image, wherein the exposure degrees of the short exposure image, the middle exposure image and the long exposure image are sequentially increased;
identifying a target area with the brightness larger than a set brightness threshold value for a long exposure image in a plurality of frames of original images;
adjusting the brightness of the target area;
and synthesizing the short exposure image, the medium exposure image and the adjusted long exposure image to obtain a synthesized image.
In order to implement the above embodiments, the present application also proposes a computer-readable storage medium having a computer program stored thereon, characterized in that the program, when executed by a processor, implements the image synthesis method as described in the above embodiments.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.
Claims (9)
1. An image synthesis method, characterized in that it comprises the steps of:
acquiring a preview image;
judging whether the brightness and/or the picture light ratio of the preview image is smaller than a corresponding threshold value, and if so, executing the step of turning on a light supplement lamp;
controlling an image sensor to collect multiple frames of original images frame by frame under the starting state of a light supplement lamp; wherein the multi-frame original image comprises a short exposure image, a middle exposure image and a long exposure image with sequentially increased exposure;
identifying a target area with the brightness larger than a set brightness threshold value for the long exposure image in the multi-frame original image;
reducing the brightness of the target area;
and performing regional weighting synthesis on the short-exposure image, the medium-exposure image and the adjusted long-exposure image to obtain a synthetic image, wherein the weight of a target region in the long-exposure image is smaller than the weight of a corresponding region in the short-exposure image and the medium-exposure image.
2. The image synthesis method according to claim 1, wherein the controlling the image sensor to collect multiple frames of original images frame by frame in a state that a fill-in light is turned on comprises:
under the on state of the light supplement lamp, photometry is carried out to determine the target exposure of each frame of original image;
determining the exposure duration of each frame of original image according to the target exposure of each frame of original image and the preset sensitivity of each frame of original image;
and carrying out exposure control on the image sensor according to the exposure time and the sensitivity of each frame of original image so as to acquire the multiple frames of original images frame by frame.
3. The image synthesis method according to claim 2, wherein after determining the exposure duration of each frame of original image according to the target exposure of each frame of original image and the preset sensitivity of each frame of original image, the method further comprises:
if the exposure duration of at least one frame of original image is greater than the set duration upper limit, updating the exposure duration of at least one frame of original image according to the duration upper limit; the upper limit of the duration ranges from 4.5s to 5.5 s.
4. The image synthesis method according to claim 2, wherein after determining the exposure duration of each frame of original image according to the target exposure of each frame of original image and the preset sensitivity of each frame of original image, the method further comprises:
if the exposure time of at least one frame of original image is less than the set time lower limit, updating the exposure time of each frame of original image with the exposure time less than the set time lower limit according to the time lower limit; the lower limit of the duration is greater than or equal to 10 ms;
determining the ratio of the updated exposure time length to the exposure time length before updating;
and updating the sensitivity or the exposure time of the original images of the other frames with the exposure time being greater than or equal to the lower limit of the time according to the ratio.
5. The method according to claim 4, wherein the updating the sensitivity or the exposure duration of the original images of the remaining frames according to the ratio comprises:
multiplying the ratio with the sensitivity of the original images of the other frames before updating to obtain the sensitivity of the original images of the other frames after updating;
or, taking the product of the ratio and the exposure duration before the updating of the original images of the other frames as the exposure duration after the updating of the original images of the other frames.
6. The image synthesis method of claim 2, wherein the metering to determine the target exposure for each frame of the original image comprises:
acquiring a preview picture;
determining a scene belonging to a night scene according to the picture content of the preview picture;
identifying an applicable night scene mode according to the shaking degree of the imaging equipment and/or whether the preview picture contains a human face;
determining exposure compensation values set by the original images of each frame according to the night scene mode;
determining the reference exposure according to the brightness information of the preview image;
and determining the target exposure of each frame of original image according to the reference exposure and the exposure compensation value set by each frame of original image.
7. An image synthesizing apparatus, characterized in that the apparatus comprises:
the acquisition module is used for acquiring a preview image by a user;
the determining module is used for judging whether the brightness and/or the picture light ratio of the preview image is smaller than a corresponding threshold value or not, and if the brightness and/or the picture light ratio of the preview image is smaller than the corresponding threshold value, the step of turning on a light supplement lamp is executed;
the control module is used for controlling the image sensor to collect multiple frames of original images frame by frame under the starting state of the light supplementing lamp; wherein the multi-frame original image comprises a short exposure image, a middle exposure image and a long exposure image with sequentially increased exposure;
the identification module is used for identifying a target area with the brightness larger than a set brightness threshold value for the long-exposure image in the multi-frame original image;
the adjusting module is used for reducing the brightness of the target area;
and the synthesis module is used for carrying out weighted synthesis on the short-exposure image, the medium-exposure image and the adjusted long-exposure image in regions to obtain a synthesized image, wherein the weight of the target region in the long-exposure image is less than the weight of the corresponding region in the short-exposure image and the medium-exposure image.
8. An electronic device, comprising: memory, processor and computer program stored on the memory and executable on the processor, which when executed by the processor implements the image composition method as claimed in any one of claims 1 to 6.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the image synthesis method according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910094208.7A CN109788207B (en) | 2019-01-30 | 2019-01-30 | Image synthesis method and device, electronic equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910094208.7A CN109788207B (en) | 2019-01-30 | 2019-01-30 | Image synthesis method and device, electronic equipment and readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109788207A CN109788207A (en) | 2019-05-21 |
CN109788207B true CN109788207B (en) | 2021-03-23 |
Family
ID=66503814
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910094208.7A Active CN109788207B (en) | 2019-01-30 | 2019-01-30 | Image synthesis method and device, electronic equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109788207B (en) |
Families Citing this family (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108156392B (en) * | 2017-12-28 | 2020-01-14 | 深圳市方度电子有限公司 | Shooting method, terminal and computer readable storage medium |
CN110661972B (en) * | 2019-09-27 | 2021-02-23 | 维沃移动通信有限公司 | Image processing method, image processing apparatus, electronic device, and medium |
CN112907701B (en) * | 2019-11-19 | 2022-08-05 | 杭州海康威视数字技术股份有限公司 | Method and device for acquiring image, computer equipment and storage medium |
CN111064898B (en) * | 2019-12-02 | 2021-07-16 | 联想(北京)有限公司 | Image shooting method and device, equipment and storage medium |
CN111405205B (en) * | 2020-03-24 | 2023-02-24 | 维沃移动通信有限公司 | Image processing method and electronic device |
CN112235512B (en) * | 2020-09-16 | 2022-01-14 | 浙江大华技术股份有限公司 | Image exposure parameter adjusting method, equipment and device |
CN112367458B (en) * | 2020-09-18 | 2022-04-22 | 格科微电子(上海)有限公司 | HDR image generation method and device, storage medium and image processing device |
CN113038026B (en) * | 2021-03-01 | 2023-07-25 | 维沃移动通信有限公司 | Image processing method and electronic device |
CN114095666B (en) * | 2021-08-12 | 2023-09-22 | 荣耀终端有限公司 | Photographing method, electronic device, and computer-readable storage medium |
CN115802133A (en) * | 2021-09-10 | 2023-03-14 | Oppo广东移动通信有限公司 | Camera module, electronic equipment, image acquisition method and device and storage medium |
CN116437222B (en) * | 2021-12-29 | 2024-04-19 | 荣耀终端有限公司 | Image processing method and electronic equipment |
CN116452475B (en) * | 2022-01-10 | 2024-05-31 | 荣耀终端有限公司 | Image processing method and related device |
CN117710265A (en) * | 2022-01-25 | 2024-03-15 | 荣耀终端有限公司 | Image processing method and related device |
CN115412678B (en) * | 2022-10-20 | 2023-05-26 | 荣耀终端有限公司 | Exposure processing method and device and electronic equipment |
CN117278864B (en) * | 2023-11-15 | 2024-04-05 | 荣耀终端有限公司 | Image capturing method, electronic device, and storage medium |
CN118450263A (en) * | 2023-11-27 | 2024-08-06 | 荣耀终端有限公司 | Exposure control method for high dynamic range mode, electronic device and storage medium |
CN117499779B (en) * | 2023-12-27 | 2024-05-10 | 荣耀终端有限公司 | Image preview method, device and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108683862A (en) * | 2018-08-13 | 2018-10-19 | Oppo广东移动通信有限公司 | Image formation control method, device, electronic equipment and computer readable storage medium |
CN108900782A (en) * | 2018-08-22 | 2018-11-27 | Oppo广东移动通信有限公司 | Exposal control method, device and electronic equipment |
CN109194855A (en) * | 2018-09-20 | 2019-01-11 | Oppo广东移动通信有限公司 | Imaging method, device and electronic equipment |
CN109218628A (en) * | 2018-09-20 | 2019-01-15 | Oppo广东移动通信有限公司 | Image processing method, device, electronic equipment and storage medium |
CN109218613A (en) * | 2018-09-18 | 2019-01-15 | Oppo广东移动通信有限公司 | High dynamic-range image synthesis method, device, terminal device and storage medium |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8885978B2 (en) * | 2010-07-05 | 2014-11-11 | Apple Inc. | Operating a device to capture high dynamic range images |
JP6137792B2 (en) * | 2012-07-10 | 2017-05-31 | キヤノン株式会社 | IMAGING DEVICE, CONTROL METHOD FOR IMAGING DEVICE, PROGRAM, AND STORAGE MEDIUM |
CN108965729A (en) * | 2018-08-13 | 2018-12-07 | Oppo广东移动通信有限公司 | Control method, device, electronic equipment and computer readable storage medium |
-
2019
- 2019-01-30 CN CN201910094208.7A patent/CN109788207B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108683862A (en) * | 2018-08-13 | 2018-10-19 | Oppo广东移动通信有限公司 | Image formation control method, device, electronic equipment and computer readable storage medium |
CN108900782A (en) * | 2018-08-22 | 2018-11-27 | Oppo广东移动通信有限公司 | Exposal control method, device and electronic equipment |
CN109218613A (en) * | 2018-09-18 | 2019-01-15 | Oppo广东移动通信有限公司 | High dynamic-range image synthesis method, device, terminal device and storage medium |
CN109194855A (en) * | 2018-09-20 | 2019-01-11 | Oppo广东移动通信有限公司 | Imaging method, device and electronic equipment |
CN109218628A (en) * | 2018-09-20 | 2019-01-15 | Oppo广东移动通信有限公司 | Image processing method, device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109788207A (en) | 2019-05-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109788207B (en) | Image synthesis method and device, electronic equipment and readable storage medium | |
CN108900782B (en) | Exposure control method, exposure control device and electronic equipment | |
CN109005364B (en) | Imaging control method, imaging control device, electronic device, and computer-readable storage medium | |
CN110072051B (en) | Image processing method and device based on multi-frame images | |
CN108683862B (en) | Imaging control method, imaging control device, electronic equipment and computer-readable storage medium | |
AU2019326496B2 (en) | Method for capturing images at night, apparatus, electronic device, and storage medium | |
CN109040609B (en) | Exposure control method, exposure control device, electronic equipment and computer-readable storage medium | |
JP6911202B2 (en) | Imaging control method and imaging device | |
CN109068067B (en) | Exposure control method and device and electronic equipment | |
CN108989700B (en) | Imaging control method, imaging control device, electronic device, and computer-readable storage medium | |
CN110072052B (en) | Image processing method and device based on multi-frame image and electronic equipment | |
CN110062160B (en) | Image processing method and device | |
CN110290289B (en) | Image noise reduction method and device, electronic equipment and storage medium | |
CN110166708B (en) | Night scene image processing method and device, electronic equipment and storage medium | |
CN109005369B (en) | Exposure control method, exposure control device, electronic apparatus, and computer-readable storage medium | |
CN109194882B (en) | Image processing method, image processing device, electronic equipment and storage medium | |
CN110191291B (en) | Image processing method and device based on multi-frame images | |
CN110248106B (en) | Image noise reduction method and device, electronic equipment and storage medium | |
CN109068058B (en) | Shooting control method and device in super night scene mode and electronic equipment | |
CN110166707B (en) | Image processing method, image processing apparatus, electronic device, and storage medium | |
WO2020207261A1 (en) | Image processing method and apparatus based on multiple frames of images, and electronic device | |
CN108683863B (en) | Imaging control method, imaging control device, electronic equipment and readable storage medium | |
CN108683861A (en) | Shoot exposal control method, device, imaging device and electronic equipment | |
CN109005361A (en) | Control method, device, imaging device, electronic equipment and readable storage medium storing program for executing | |
CN110166706B (en) | Image processing method, image processing apparatus, electronic device, and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |