WO2020244374A1 - 高动态范围hdr图像生成方法和装置、电子设备、计算机可读存储介质 - Google Patents

高动态范围hdr图像生成方法和装置、电子设备、计算机可读存储介质 Download PDF

Info

Publication number
WO2020244374A1
WO2020244374A1 PCT/CN2020/090803 CN2020090803W WO2020244374A1 WO 2020244374 A1 WO2020244374 A1 WO 2020244374A1 CN 2020090803 W CN2020090803 W CN 2020090803W WO 2020244374 A1 WO2020244374 A1 WO 2020244374A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
original image
exposure
shooting scene
camera
Prior art date
Application number
PCT/CN2020/090803
Other languages
English (en)
French (fr)
Inventor
康健
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to EP20818577.7A priority Critical patent/EP3975547A4/en
Publication of WO2020244374A1 publication Critical patent/WO2020244374A1/zh
Priority to US17/541,394 priority patent/US20220094838A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/72Combination of two or more compensation controls
    • GPHYSICS
    • G03PHOTOGRAPHY; CINEMATOGRAPHY; ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ELECTROGRAPHY; HOLOGRAPHY
    • G03HHOLOGRAPHIC PROCESSES OR APPARATUS
    • G03H1/00Holographic processes or apparatus using light, infrared or ultraviolet waves for obtaining holograms or for obtaining an image from them; Details peculiar thereto
    • G03H1/22Processes or apparatus for obtaining an optical image from holograms
    • G03H1/2294Addressing the hologram to an active spatial light modulator
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/71Circuitry for evaluating the brightness variation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/73Circuitry for compensating brightness variation in the scene by influencing the exposure time
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/741Circuitry for compensating brightness variation in the scene by increasing the dynamic range of the image compared to the dynamic range of the electronic image sensors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/90Arrangement of cameras or camera modules, e.g. multiple cameras in TV studios or sports stadiums

Definitions

  • This application relates to the field of computer technology, in particular to a high dynamic range HDR image generation method and device, electronic equipment, and computer-readable storage media.
  • the embodiments of the present application provide a high dynamic range HDR image generation method, device, electronic equipment, and computer-readable storage medium, which can improve the photographing quality of electronic equipment and meet higher photographing requirements.
  • a high dynamic range HDR image generation method including:
  • the at least two target images are synthesized to obtain an HDR image.
  • a high dynamic range HDR image generation device including:
  • the target original image generating module is used to generate the target original image by shooting the shooting scene through at least two second cameras when previewing the shooting scene through the first camera;
  • a brightness holographic data acquisition module configured to obtain brightness holographic data of the shooting scene according to the original target image
  • the target image generation module is configured to determine at least two sets of target exposure parameters according to the brightness holographic data of the shooting scene, configure the exposure parameters of the first camera as the at least two sets of target exposure parameters, and configure them respectively The first camera of, shoots the shooting scene to generate at least two target images;
  • the HDR image synthesis module is used to synthesize the at least two target images to obtain an HDR image.
  • An electronic device includes a memory and a processor, and a computer program is stored in the memory.
  • the processor executes the operations of the method described above.
  • FIG. 1 is an application environment diagram of a method for generating a high dynamic range HDR image in an embodiment
  • FIG. 2 is a flowchart of a method for generating a high dynamic range HDR image in an embodiment
  • FIG. 3 is a schematic diagram of a histogram of brightness distribution in an embodiment
  • FIG. 4 is a flowchart of a method of generating original images of the target by respectively shooting the shooting scene through at least two second cameras in FIG. 2;
  • FIG. 5 is a flowchart of the method for generating a second target original image in FIG. 4;
  • Fig. 6 is a flowchart of the method for generating the third target original image in Fig. 4;
  • Fig. 7 is a flowchart of the target image generation method in Fig. 2;
  • Fig. 8 is a structural block diagram of a high dynamic range HDR image generating device in an embodiment
  • FIG. 9 is a schematic diagram of the internal structure of an electronic device in an embodiment.
  • Fig. 10 is a schematic diagram of an image processing circuit in an embodiment.
  • first the terms “first”, “second”, etc. used in this application can be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from another element.
  • the first camera may be referred to as the second camera, and similarly, the second camera may be referred to as the first camera. Both the first camera and the second camera are cameras, but they are not the same camera.
  • Fig. 1 is a schematic diagram of an application environment of a method for generating a high dynamic range HDR image in an embodiment.
  • the application environment includes an electronic device 100.
  • the electronic device 100 includes at least one first camera 110 and at least two second cameras 120.
  • the electronic device 100 previews the shooting scene through the first camera, it uses at least two second cameras to respectively shoot the shooting scene to generate the original target image.
  • the aforementioned electronic device 100 may not be limited to various mobile phones, computers, portable devices, and the like.
  • FIG. 2 is a flowchart of a method for generating a high dynamic range HDR image in an embodiment. As shown in FIG. 2, the method for generating a high dynamic range HDR image includes operations 220 to 280.
  • the shooting scene when the shooting scene is previewed by the first camera, the shooting scene is respectively captured by the at least two second cameras to generate the original target image.
  • the electronic device When the electronic device receives the instruction to turn on the camera, it can call the first camera to enter the shooting state, that is, preview the shooting scene through the first camera, and the first camera includes the main camera. Then, when the shooting scene is previewed by the first camera, the shooting scene is respectively captured by at least two second cameras to generate the original target image, and the second camera includes a main camera and a secondary camera. The object in the shooting scene can be scanned by the second camera to form an image frame, which is the original image of the target.
  • the electronic device contains a main camera and two sub-cameras
  • the electronic device when it receives the instruction to turn on the camera, it can call the main camera to enter the shooting state, that is, preview the shooting scene through the main camera (the preview page that the user sees) ). Then, when previewing the shooting scene through the main camera, call two sub-cameras to shoot the shooting scene respectively to generate the original image of the target.
  • one sub-camera can only take one frame of image, or a sub-camera can shoot continuously Multi-frame images, so the number of target original images generated is two frames or more.
  • the sub-camera uses different exposure parameters to capture different images each time, that is, two sub-cameras use different exposure parameters to capture images, and the exposure parameters of each sub-camera are also different each time.
  • one sub-camera is used to shoot according to the normal exposure parameters to obtain a frame of the original target image; then the exposure parameters that are underexposed relative to the normal exposure parameters are used to shoot to obtain another Frame the original image of the target; secondly, use the overexposed exposure parameters relative to the normal exposure parameters to shoot to obtain another frame of the original target image.
  • the exposure parameters here include but are not limited to one or more of sensitivity, exposure, exposure duration, etc. When other parameters remain unchanged, the exposure time is increased to obtain the overexposure parameters; when other parameters remain unchanged When, shorten the exposure time to get the under-exposure exposure parameters.
  • the brightness holographic data of the shooting scene is obtained according to the original image of the target.
  • the brightness distribution data of each target original image in the target original image is acquired, and the brightness distribution data of each target original image is obtained. Synthesize the brightness holographic data of the shooting scene.
  • the number of target original images is at least two frames or more.
  • two frames of images can be obtained through the two sub-cameras respectively.
  • One of the frames can be the image obtained by the overexposure shooting, and the other frame can be the underexposure shooting.
  • the resulting image Then, the brightness distribution data of the two frames of images are acquired, where the brightness distribution data specifically refers to the brightness distribution histogram, and the brightness holographic data refers to the brightness distribution histogram of the shooting scene.
  • the horizontal axis represents the brightness in the image, and the brightness gradually transitions from full black to full white from left to right; the vertical axis represents the relative number of pixels in this brightness range in the image.
  • the brightness distribution histogram can accurately evaluate the brightness of an image.
  • the brightness distribution histograms of the two frames of images can be synthesized to obtain the brightness holographic data of the shooting scene.
  • FIG. 3 it is a schematic diagram of the brightness distribution histogram of the shooting scene obtained by synthesizing the brightness distribution histograms of three frames of images.
  • the histogram of brightness distribution is a quantitative tool used to view the brightness of a picture. Among them, the horizontal axis represents brightness, and the closer to the right, the higher the brightness. The vertical axis represents the quantity, and the higher the upper end, the greater the quantity. Therefore, the brightness distribution histogram shows the brightness distribution of each pixel in the picture.
  • Figure 3(a) is the histogram of the brightness distribution of the original target image obtained by performing a short exposure on the shooting scene
  • Figure 3(b) is the histogram of the brightness distribution of the original image of the target obtained by performing a normal exposure on the shooting scene
  • Figure 3(c) is a histogram of the brightness distribution of the original target image obtained by long exposure of the shooting scene
  • Fig. 3(d) is the brightness distribution histogram of the shooting scene obtained by synthesizing the three brightness distribution histograms of Fig. 3(a), Fig. 3(b) and Fig. 3(c), that is, the brightness holographic data.
  • the short exposure refers to shooting with a shorter exposure time relative to the normal exposure time
  • the long exposure refers to shooting with a longer exposure time relative to the normal exposure time.
  • At least two sets of target exposure parameters are determined according to the brightness holographic data of the shooting scene, the exposure parameters of the first camera are configured as at least two sets of target exposure parameters respectively, and the shooting scene is generated by the configured first camera respectively. At least two target images.
  • the brightness hologram data of the shooting scene that is, the brightness distribution histogram
  • the brightness of an image can be accurately evaluated, so at least two sets of target exposure parameters can be determined according to the brightness holographic data of the shooting scene.
  • the two sets of target exposure parameters may include one set of overexposure parameters and one set of underexposure parameters, and of course, may also include a set of normal exposure parameters.
  • the electronic device may receive a shooting instruction, configure the exposure parameters of the first camera to any one of the at least two sets of target exposure parameters, and shoot to generate a target image. Then, continue to configure the exposure parameters of the first camera as another set of parameters for shooting to generate another target image. In this way, continue to configure the exposure parameters of the first camera as other sets of parameters for shooting to generate another target image.
  • the shooting instruction may be a shooting instruction triggered by a detected related touch operation, a pressing operation of a physical button, or a voice control operation.
  • the touch operation can be a touch click operation, a touch long press operation, a touch slide operation, and a multi-touch operation.
  • the electronic device may provide a shooting button for triggering shooting, and when a click operation on the button is detected, a shooting instruction is triggered.
  • the electronic device may also preset shooting voice information used to trigger the shooting instruction. By calling the voice receiving device, receiving the corresponding voice information, and analyzing the voice information, when it is detected that the voice information matches the shooting voice information, the shooting instruction can be triggered.
  • At least two target images are synthesized to obtain an HDR image.
  • HDR refers to (High-Dynamic Range, high dynamic range image). Compared with ordinary images, HDR images can provide more dynamic range and image details.
  • At least two second cameras are used to separately capture the shooting scene to generate the original target image, the shooting speed is faster, and then the brightness holographic data of the shooting scene is obtained according to the target original image. Then determine at least two sets of target exposure parameters based on the brightness holographic data of the shooting scene, configure the exposure parameters of the first camera as at least two sets of target exposure parameters, and respectively use the configured first camera to shoot the shooting scene to generate at least two Target image.
  • the image information contained in the at least two target images is more comprehensive, and the HDR image obtained by synthesizing the at least two target images can provide more dynamic range and image details.
  • the target original image includes a first target original image, a second target original image, and a third target original image
  • operation 220 of separately photographing the shooting scene through at least two second cameras to generate the original image of the target includes:
  • any one of the at least two second cameras is used to photograph the shooting scene according to preset exposure parameters to generate a first target original image.
  • the preset exposure parameters are the exposure parameters matched by the electronic device camera according to the shooting scene.
  • the electronic device camera has pre-stored a table of correspondences between the shooting scene and the matched exposure parameters, and the camera is configured with the matching exposure parameters.
  • the configured camera captures an image that is normally exposed in the shooting scene.
  • the electronic device can find the exposure parameter matching the shooting scene by querying the table, and then configure any one of the at least two second cameras as the exposure parameter matching the shooting scene, and then shoot the shooting scene to generate the first An original image of the target.
  • the first target original image is a normally exposed image.
  • Operation 224 Use any one of the at least two second cameras to shoot the shooting scene according to the overexposure parameters relative to the preset exposure parameters to generate an original image, and when it is detected that the original image is displayed in the shooting scene If the dark area meets the preset requirement, the original image is acquired as the second target original image.
  • the overexposure parameter relative to the preset exposure parameter is acquired at a preset interval, as the current exposure parameter, and the exposure parameter of any one of the at least two second cameras is configured as the current exposure parameter.
  • Use the configured second camera to shoot the shooting scene to generate the original image, determine whether the dark area in the shooting scene shown in the original image meets the preset requirements, and when the judgment result is yes, the original image is acquired as the second target original image
  • the judgment result is no, it returns to obtaining the overexposure parameter relative to the current exposure parameter according to the preset interval as a loop of the new current exposure parameter until the second target original image is obtained.
  • the preset interval may be 1 EV.
  • EV is the abbreviation of Exposure Values, which is a quantity that reflects the exposure.
  • the initial definition is: when the sensitivity is ISO100, the aperture factor is F1, and the exposure time is 1 second, the exposure is defined as 0EV; the exposure is reduced by one level (shutter time is reduced by half or the aperture is reduced by one level) to -1EV; The amount increased by one gear (the shutter time is doubled or the aperture is increased by one gear) is +1EV.
  • the overexposure parameter +1EV relative to the preset exposure parameter acquired at a preset interval of 1EV is acquired as the current exposure parameter.
  • any one of the at least two second cameras is used to shoot the shooting scene according to the underexposure parameter relative to the preset exposure parameter to generate an original image, and when it is detected that the original image is displayed in the shooting scene If the bright area meets the preset requirement, the original image is acquired as the third target original image.
  • the under-exposure parameter relative to the preset exposure parameter at a preset interval as the current exposure parameter, and configure the exposure parameter of any one of the at least two second cameras as the current exposure parameter.
  • Use the configured second camera to shoot the shooting scene to generate the original image, determine whether the bright area in the shooting scene shown in the original image meets the preset requirements, and when the judgment result is yes, the original image is acquired as the third target original image
  • the judgment result is negative, it returns to obtaining the under-exposure parameter relative to the current exposure parameter according to the preset interval as a loop of the new current exposure parameter until the third target original image is obtained.
  • the preset interval may be 1 EV.
  • the exposure parameter when the original image of the first target is generated as 0EV the parameter -1EV that is under-exposed relative to the preset exposure parameter obtained at a preset interval of 1EV is obtained as the current exposure parameter.
  • any one of the at least two second cameras is used to photograph a shooting scene according to preset exposure parameters to generate a first target original image, and the first target original image is a normally exposed image. Then, according to the preset interval, the overexposure parameter relative to the preset exposure parameter is obtained as the current exposure parameter, and the exposure parameter of any one of the at least two second cameras is configured as the current exposure parameter for shooting to obtain the second The target original image, and the second target original image is an overexposed image. Finally, the parameters under exposure relative to the preset exposure parameters are acquired at preset intervals as the current exposure parameters, and the exposure parameters of any one of the at least two second cameras are configured as the current exposure parameters.
  • the third target original image is generated by shooting the shooting scene through the configured second camera.
  • the obtained brightness holographic data is more comprehensive and accurate.
  • operation 224 is to use any one of the at least two second cameras to shoot the shooting scene according to the overexposure parameters relative to the preset exposure parameters to generate the original image. It is detected that the dark area in the shooting scene shown in the original image meets the preset requirements, then the original image is acquired as the second target original image, including:
  • an overexposure parameter relative to a preset exposure parameter is obtained at a preset interval as the current exposure parameter
  • Operation 224b configure the exposure parameter of any one of the at least two second cameras as the current exposure parameter
  • an original image is generated by shooting the shooting scene through the configured second camera
  • operation 224d it is judged whether the dark area in the shooting scene shown in the original image meets the preset requirement, and when the judgment result is yes, it proceeds to operation 224e to acquire the original image as the second target original image;
  • the preset interval may be 1 EV.
  • the exposure parameter when the original image of the first target is generated as 0EV the overexposure parameter +1EV relative to the preset exposure parameter acquired at a preset interval of 1EV is acquired as the current exposure parameter.
  • Increasing the exposure parameter from 0EV to +1EV can be achieved by doubling the shutter time or increasing the aperture by one stop.
  • the aperture size in electronic devices is generally fixed, the exposure can be increased from 0EV to +1EV by doubling the shutter time while other exposure parameters remain unchanged.
  • other methods can also be used to increase the exposure parameter from 0EV to +1EV.
  • the exposure parameter of any one of the at least two second cameras is configured as the current exposure parameter.
  • the exposure parameter of the camera that shoots the original image of the first target may be adjusted, specifically increasing the exposure of the camera from 0EV to +1EV. Then, the original image is generated by shooting with the camera with an exposure of +1EV. Because it is an overexposed image, it is further judged whether the dark area of the original image meets the preset requirements, that is, whether the definition of the dark area meets the preset standard, and when the judgment result is yes, the original image is used as the second target original image .
  • the preset standards here can be defined according to actual conditions.
  • the exposure parameter of another second camera may be adjusted, specifically, the exposure of the camera may be directly adjusted to +1 EV. Then, the original image is generated by shooting with the camera with an exposure of +1EV. Because it is an overexposed image, it is further judged whether the dark area of the original image meets the preset requirements, that is, whether the definition of the dark area meets the preset standard, and when the judgment result is yes, the original image is used as the second target original image .
  • the preset standards here can be defined according to actual conditions.
  • the exposure of the second camera is continuously adjusted according to the preset interval, so that the definition of the captured dark area meets the preset standard, and the original image whose definition of the dark area meets the preset standard is regarded as the first 2.
  • the original image of the target is regarded as the first 2.
  • operation 226 is to use any one of the at least two second cameras to shoot the shooting scene according to the underexposure parameter relative to the preset exposure parameter to generate the original image. It is detected that the bright area in the shooting scene shown in the original image meets the preset requirements, and the original image is acquired as the third target original image, including:
  • the under-exposure parameter relative to the preset exposure parameter is obtained at a preset interval as the current exposure parameter
  • Operation 226b configure the exposure parameter of any one of the at least two second cameras as the current exposure parameter
  • an original image is generated by shooting the shooting scene through the configured second camera
  • operation 226d it is judged whether the bright area in the shooting scene shown in the original image meets the preset requirements, and when the judgment result is yes, it enters operation 226e to acquire the original image as the third target original image;
  • the preset interval may be 1 EV.
  • the exposure parameter when the original image of the first target is generated as 0EV, the parameter -1EV that is under-exposed relative to the preset exposure parameter obtained at a preset interval of 1EV is obtained as the current exposure parameter.
  • the exposure can be reduced from 0EV to -1EV, which can be achieved by reducing the shutter time by one time or reducing the aperture by one gear.
  • the exposure parameter can be reduced from 0EV to -1EV by reducing the shutter time by a factor of two without changing other exposure parameters.
  • other methods can also be used to reduce the exposure parameter from 0EV to -1EV.
  • the exposure parameter of any one of the at least two second cameras is configured as the current exposure parameter.
  • the exposure parameters of another second camera specifically to directly adjust the exposure of the camera to -1EV, where the camera that generates the original image of the third target, the camera that generates the original image of the second target, and the second target
  • the cameras of the original image of a target can be the same in pairs.
  • the original image is generated by shooting with the camera with an exposure of -1EV. Because it is an underexposed image, it is further judged whether the bright area of the original image meets the preset requirements, that is, whether the definition of the bright area meets the preset standard, and when the judgment result is yes, the original image is used as the third target original image .
  • the preset standards here can be defined according to actual conditions.
  • the exposure of the second camera is continuously adjusted at preset intervals, so that the sharpness of the captured bright area meets the preset standard, and the original image whose sharpness of the bright area meets the preset standard is taken as the first Three target original images.
  • the exposure level obtained after constant adjustment the amount of information in the bright area contained in the captured image tends to become more and more comprehensive.
  • capturing the shooting scene by at least two second cameras to generate the original target image includes:
  • At the same time, at least two second cameras are used to separately photograph the shooting scene to generate the original target image.
  • the electronic device may include at least two second cameras, namely secondary cameras.
  • the secondary camera on the electronic device can be called at the same time to capture the original image. Get all target original images. In this way, the secondary camera on the electronic device is called at the same time to shoot the original image.
  • the shooting time is greatly reduced, and the shooting scene according to the original image of the target is improved.
  • the efficiency of the brightness holographic data It avoids the user's long wait in the preview interface.
  • obtaining the brightness holographic data of the shooting scene according to the original image of the target includes:
  • the brightness holographic data of the shooting scene is synthesized.
  • FIG. 3 it is a schematic diagram of synthesizing the brightness distribution histograms of three frames of images to obtain the brightness distribution histogram of the shooting scene.
  • Figure 3(a) is the brightness distribution histogram of the original target image obtained by short exposure (underexplosion) of the shooting scene
  • Figure 3(b) is the brightness of the original target image obtained by normal exposure of the shooting scene Distribution histogram
  • Fig. 3(c) is the brightness distribution histogram of the target original image obtained by long exposure (overexposure) of the shooting scene
  • Fig. 3(d) is the brightness distribution histogram of the shooting scene obtained by synthesizing the three brightness distribution histograms of Fig. 3(a), Fig. 3(b) and Fig. 3(c), that is, the brightness holographic data.
  • the short exposure refers to shooting with a shorter exposure time relative to the normal exposure time
  • the long exposure refers to shooting with a longer exposure time relative to the normal exposure time.
  • the number of second cameras is at least two, so the number of target original images is at least two.
  • the number of target original images can also be three or more.
  • Each second camera can capture at least one original target image.
  • each second camera can also capture two or more original target images.
  • the dark area of the target original image obtained by performing long exposure (overexposure) on the shooting scene Meet the preset standards.
  • the brightness distribution histogram of the target original image obtained by the short exposure (under-explosion), the original target image obtained by the long exposure (overexposure), and the original target image obtained by the normal exposure are synthesized to obtain the shooting scene
  • the histogram of brightness distribution is brightness holographic data.
  • the brightness holographic data covers all the data of the bright and dark areas in the shooting scene.
  • operation 260 is to determine at least two sets of target exposure parameters according to the brightness holographic data of the shooting scene, configure the exposure parameters of the first camera as at least two sets of target exposure parameters, and pass the The configured first camera shoots the shooting scene to generate at least two target images, including:
  • At least two sets of target exposure parameters are determined according to the brightness holographic data of the shooting scene, and the at least two sets of target exposure parameters include normal exposure parameters, overexposure exposure parameters, and underexposure exposure parameters.
  • At least two second cameras separately shoot the shooting scene to generate the original target image, and then obtain the brightness holographic data of the shooting scene according to the target original image.
  • the exposure parameters of the first camera can be configured according to the brightness holographic data.
  • the exposure parameter when the second camera generates the original image of the target can be directly configured as the exposure parameter of the first camera.
  • the exposure parameters when the second camera generates the first target original image, the second target original image, and the third target original image are respectively acquired, and these three sets of exposure parameters are configured as the exposure parameters of the first camera.
  • the original image of the first target is generated by the second camera shooting the shooting scene according to preset exposure parameters, and the preset exposure parameters are normal exposure parameters.
  • the second target original image is generated by the second camera shooting the shooting scene according to the overexposure parameter relative to the preset exposure parameter, and the overexposed parameter relative to the preset exposure parameter is the overexposure exposure parameter.
  • the original image of the third target is generated by the second camera shooting the shooting scene according to the underexposure parameter relative to the preset exposure parameter, and the underexposure parameter relative to the preset exposure parameter is the underexposure exposure parameter.
  • the normal exposure parameters, overexposure exposure parameters, and underexposure exposure parameters obtained in the foregoing embodiment are the optimal shooting parameters in the shooting scene, the images captured under these parameters contain the most information. Comprehensive and most detailed. However, when HDR is actually synthesized, these three sets of exposure parameters can be used as references to fine-tune these three sets of exposure parameters to capture images, and then synthesize HDR images with different expressive power.
  • the overexposure and underexposure exposure parameters can be slightly adjusted to the normal exposure parameters, so that the first camera is configured to the adjusted overexposure and underexposure parameters respectively Parameters and capture an image, then configure the first camera as the normal exposure parameter and capture the image, and then synthesize the images captured by the first camera to obtain an HDR image with less contrast.
  • the number of overexposure exposure parameters and underexposure exposure parameters can be one or more groups, and each group of exposure parameters corresponds to a frame of image.
  • the overexposure, underexposure and normal exposure parameters can also be dynamically adjusted according to the light ratio of the shooting scene.
  • the light ratio refers to the ratio of the brightness of the main part of the subject's light-receiving surface to the brightness of the shadow surface, usually the ratio of the main light to the auxiliary light.
  • Light ratio is of great significance for contrast control of photos.
  • the light ratio is large, the contrast is large, which is conducive to the "rigid" effect of the surface; the light ratio is small, the contrast is small, which is conducive to the surface "soft” effect.
  • the screen lighting is average, the light ratio is 1:1.
  • the biggest significance of light ratio for photography is the contrast of light and dark in the picture.
  • a large contrast means a strong visual tension of the picture, while a small contrast means soft and gentle.
  • contrast can well express the character of a character. For example, high contrast appears to be strong and powerful, and low contrast appears to be soft and captivating.
  • high-contrast texture is hard, while low-contrast is objective and flat.
  • the exposure parameter of the first camera is configured as a normal exposure parameter, and a first target image is generated by shooting the shooting scene through the configured first camera.
  • the normal exposure parameter may be the exposure parameter of the second camera when shooting the original image of the first target.
  • the second camera captures the shooting scene according to the preset exposure parameters to generate the original image of the first target, so the normal exposure parameters are the preset exposure parameters.
  • the preset exposure parameter is directly configured as the exposure parameter of the first camera, and the first target image is generated by shooting the shooting scene through the configured first camera.
  • the preset exposure parameter is the exposure parameter matched by the electronic device camera according to the shooting scene, the electronic device camera pre-stores the correspondence table between the shooting scene and the matched exposure parameter, and the second camera is configured as the matched exposure parameter , You can use the configured camera to capture images that are normally exposed in the shooting scene.
  • the electronic device can find the exposure parameter matching the shooting scene by querying the table, and then configure any one of the at least two second cameras as the exposure parameter matching the shooting scene, and then shoot the shooting scene to generate the first An original image of the target.
  • the first target original image is a normally exposed image.
  • Operation 266 Configure the exposure parameter of the first camera as an overexposure exposure parameter, and use the configured first camera to shoot the shooting scene to generate a second target image.
  • the overexposure parameter here can be directly the exposure parameter when the second camera shoots the original image of the second target, or it can be the parameter after adjusting the overexposure parameter. Then, the exposure parameter of the first camera is configured as the parameter, and the second target image is generated by shooting the shooting scene by the configured first camera.
  • the exposure parameter of the first camera is configured as the under-explosion exposure parameter, and the shooting scene is captured by the configured first camera to generate a third target image.
  • the underexposure exposure parameter here can be directly the exposure parameter when the third camera shoots the original image of the third target, or it can be the parameter after the underexposure exposure parameter is adjusted. Then, the exposure parameter of the first camera is configured as the parameter, and a third target image is generated by shooting the shooting scene by the configured first camera.
  • the second camera is photographed under normal, overexposed, and underexposed conditions, and the captured images are screened to filter out images that meet the requirements, and then obtain the brightness holographic data of the shooting scene.
  • the target exposure parameter is determined according to the brightness holographic data of the shooting scene, where the target exposure parameter may be directly the exposure parameter when the second camera shoots the image used for synthesizing the brightness holographic data.
  • the first camera is set as the target exposure parameter and images are captured, and these images are then synthesized into an HDR image, which includes more image information in the shooting scene.
  • the target exposure parameter here may also be: the exposure parameter of the image when the second camera shoots and synthesizes the brightness holographic data, and is obtained after adjusting it according to the brightness holographic data. It can be dynamically adjusted to show different image expressiveness.
  • the normal exposure parameter is a preset exposure parameter
  • the overexposure exposure parameter is an exposure parameter for generating the original image of the second target
  • the underexposure exposure parameter is an exposure parameter for generating the original image of the third target.
  • the target exposure parameters include normal exposure parameters, overexposure exposure parameters, and underexposure exposure parameters.
  • the target exposure parameter can be directly the exposure parameter when the second camera shoots the image used to synthesize the brightness holographic data. That is, the normal exposure parameter is the preset exposure parameter when the second camera generates the original image of the first target, the overexposure parameter is the overexposure parameter when the second camera generates the original image of the second target, and the second camera generates the original image of the third target. Exposure parameters at the time of exposure. In this way, the first camera is set as the target exposure parameter and images are captured, and these images are then synthesized into an HDR image, which includes more image information in the shooting scene.
  • the electronic device includes one first camera 110 and three second cameras 120 as an example for description.
  • the first camera is the main camera
  • the second camera is a secondary camera.
  • the three sub-cameras respectively shoot the shooting scene to generate the original target image.
  • the first target original image is generated by simultaneously shooting the shooting scene by the auxiliary camera A of the three auxiliary cameras according to the preset exposure parameter (0EV).
  • the overexposure parameter (+1EV) relative to the preset exposure parameter (0EV) at a preset interval (1EV) as the current exposure parameter Obtain the overexposure parameter (+1EV) relative to the preset exposure parameter (0EV) at a preset interval (1EV) as the current exposure parameter.
  • the original image is generated by shooting the shooting scene through the configured secondary camera C; it is judged whether the bright area in the shooting scene shown in the original image meets the preset requirements, and when the judgment result is yes, the original image is acquired as the third target original image ; When the judgment result is no, it returns to obtaining the under-exposure parameter relative to the current exposure parameter according to the preset interval, as a loop of the new current exposure parameter, until the third target original image is obtained.
  • the three sets of target exposure parameters include normal exposure parameters, overexposure exposure parameters and underexposure exposure parameters; among them, the normal exposure parameters are preset exposure parameters,
  • the overexposure exposure parameter is the exposure parameter for generating the original image of the second target, and the underexposure exposure parameter is the exposure parameter for generating the original image of the third target.
  • the exposure parameter of the first camera is configured as the under-explosion exposure parameter, and a third target image is generated by shooting the shooting scene through the configured first camera.
  • the first, second, and third target images are synthesized to obtain an HDR image.
  • the electronic device includes one main camera and three sub-cameras, and the first, second, and third original images of the target are obtained through simultaneous shooting by the three sub-cameras.
  • the exposure parameters of the first, second, and third target original images are directly used as the exposure parameters of the main camera, so that the first, second, and third target images are generated by shooting the shooting scene with the configured main camera respectively.
  • the first, second, and third target images are synthesized to obtain an HDR image.
  • the exposure parameters of the original images of the first, second, and third targets are directly used as the exposure parameters of the main camera, which is convenient and quick, and shortens the waiting time of the camera in the preview image.
  • the image captured by the main camera contains the most comprehensive and rich information, and then these images are synthesized into an HDR image, and the HDR image includes the most comprehensive and rich image information in the shooting scene.
  • a high dynamic range HDR image generation device 800 including:
  • the target original image generating module 820 is configured to generate the target original image by shooting the shooting scene through at least two second cameras when previewing the shooting scene through the first camera;
  • the brightness holographic data obtaining module 840 is used to obtain brightness holographic data of the shooting scene according to the original image of the target;
  • the target image generation module 860 is configured to determine at least two sets of target exposure parameters according to the brightness holographic data of the shooting scene, configure the exposure parameters of the first camera as at least two sets of target exposure parameters, and respectively pass the configured first camera pair At least two target images are generated by shooting the shooting scene;
  • the HDR image synthesis module 880 is used to synthesize at least two target images to obtain an HDR image.
  • the target original image generation module 820 includes:
  • the first target original image generating unit is configured to use any one of the at least two second cameras to shoot the shooting scene according to preset exposure parameters to generate the first target original image;
  • the second target original image generating unit is configured to use any one of the at least two second cameras to shoot the shooting scene according to the overexposure parameter relative to the preset exposure parameter to generate the original image, when the original image is detected If the dark area in the displayed shooting scene meets the preset requirement, the original image is acquired as the second target original image;
  • the third target original image generating unit is configured to use any one of the at least two second cameras to generate an original image by shooting the shooting scene according to the under-exposure parameter relative to the preset exposure parameter.
  • the original image is detected If the bright area in the displayed shooting scene meets the preset requirement, the original image is acquired as the third target original image.
  • the second target original image generating unit is further configured to obtain the overexposure parameter relative to the preset exposure parameter at a preset interval as the current exposure parameter; and set any one of the at least two second cameras as the current exposure parameter.
  • the exposure parameter of the second camera is configured as the current exposure parameter; the original image is generated by shooting the shooting scene through the configured second camera; it is judged whether the dark area in the shooting scene shown in the original image meets the preset requirements, when the judgment result is If yes, obtain the original image as the second target original image; when the judgment result is no, return to obtaining the overexposure parameter relative to the current exposure parameter according to the preset interval, as a loop of the new current exposure parameter, until the second The original image of the target.
  • the third target original image generating unit is further configured to obtain the under-exposure parameter relative to the preset exposure parameter at a preset interval as the current exposure parameter; and set any one of the at least two second cameras to the first The exposure parameters of the second camera are configured as the current exposure parameters; the original image is generated by shooting the shooting scene through the configured second camera; it is judged whether the bright area in the shooting scene shown in the original image meets the preset requirements, when the judgment result is If yes, obtain the original image as the third target original image; when the judgment result is no, return to obtaining the under-exposure parameter relative to the current exposure parameter according to the preset interval, as a loop of the new current exposure parameter, until the third The original image of the target.
  • the target original image generating module 820 is further configured to simultaneously use at least two second cameras to respectively photograph the shooting scene to generate the target original image.
  • the brightness holographic data acquisition module 840 is also used to acquire the brightness distribution data of each target original image in the target original image; according to the brightness distribution data of each target original image, the brightness holographic data of the shooting scene is synthesized .
  • the target image generation module 860 is further configured to determine at least two sets of target exposure parameters according to the brightness holographic data of the shooting scene.
  • the at least two sets of target exposure parameters include normal exposure parameters, overexposure exposure parameters, and underexposure exposure parameters. ; Configure the exposure parameters of the first camera as normal exposure parameters, and use the configured first camera to shoot the shooting scene to generate the first target image; configure the exposure parameters of the first camera as overexposure exposure parameters, and pass the configured The first camera shoots the shooting scene to generate a second target image; the exposure parameter of the first camera is configured as an under-explosion exposure parameter, and the configured first camera shoots the shooting scene to generate a third target image.
  • the high dynamic range HDR image generation device can be divided into different modules as needed to complete the high dynamic range HDR image. Generate all or part of the function of the device.
  • Fig. 9 is a schematic diagram of the internal structure of an electronic device in an embodiment.
  • the electronic device includes a processor and a memory connected through a system bus.
  • the processor is used to provide computing and control capabilities to support the operation of the entire electronic device.
  • the memory may include a non-volatile storage medium and internal memory.
  • the non-volatile storage medium stores an operating system and a computer program.
  • the computer program may be executed by the processor to implement a high dynamic range HDR image generation method provided by the following embodiments.
  • the internal memory provides a cached operating environment for the operating system computer program in the non-volatile storage medium.
  • the electronic device can be a mobile phone, a tablet computer or a personal digital assistant or a wearable device.
  • each module in the high dynamic range HDR image generation device may be in the form of a computer program.
  • the computer program can be run on a terminal or server.
  • the program module composed of the computer program can be stored in the memory of the terminal or server.
  • the embodiment of the application also provides an electronic device.
  • the above-mentioned electronic equipment includes an image processing circuit.
  • the image processing circuit may be implemented by hardware and/or software components, and may include various processing units that define an ISP (Image Signal Processing, image signal processing) pipeline.
  • Fig. 10 is a schematic diagram of an image processing circuit in an embodiment. As shown in FIG. 10, for ease of description, only various aspects of the high dynamic range HDR image generation technology related to the embodiments of the present application are shown.
  • the image processing circuit includes a first ISP processor 1030, a second ISP processor 1040, and a control logic 1050.
  • the first camera 1010 includes one or more first lenses 1012 and a first image sensor 1014.
  • the first image sensor 1014 may include a color filter array (such as a Bayer filter).
  • the first image sensor 1014 may acquire the light intensity and wavelength information captured by each imaging pixel of the first image sensor 1014, and provide information that can be obtained by the first ISP.
  • the second camera 1020 includes one or more second lenses 1022 and a second image sensor 1024.
  • the second image sensor 1024 may include a color filter array (such as a Bayer filter).
  • the second image sensor 1024 may acquire the light intensity and wavelength information captured by each imaging pixel of the second image sensor 1024, and provide information that can be used by the second ISP.
  • the first image collected by the first camera 1010 is transmitted to the first ISP processor 1030 for processing.
  • the statistical data of the first image (such as image brightness, image contrast , The color of the image, etc.) are sent to the control logic 1050, and the control logic 1050 can determine the control parameters of the first camera 1010 according to the statistical data, so that the first camera 1010 can perform operations such as auto focus and auto exposure according to the control parameters.
  • the first image can be stored in the image memory 1060 after being processed by the first ISP processor 1030, and the first ISP processor 1030 can also read the image stored in the image memory 1060 for processing.
  • the first image can be directly sent to the display 1070 for display after being processed by the ISP processor 1030, and the display 1070 can also read the image in the image memory 1060 for display.
  • the first ISP processor 1030 processes image data pixel by pixel in multiple formats.
  • each image pixel can have a bit depth of 8, 10, 12, or 14 bits, and the first ISP processor 1030 can perform one or more high dynamic range HDR image generation operations on the image data, and collect statistical information about the image data.
  • the high dynamic range HDR image generation operation can be performed with the same or different bit depth accuracy.
  • the image memory 1060 may be a part of a memory device, a storage device, or an independent dedicated memory in an electronic device, and may include DMA (Direct Memory Access, direct memory access) features.
  • DMA Direct Memory Access, direct memory access
  • the first ISP processor 1030 may perform one or more high dynamic range HDR image generation operations, such as temporal filtering.
  • the processed image data can be sent to the image memory 1060 for additional processing before being displayed.
  • the first ISP processor 1030 receives the processed data from the image memory 1060, and performs image data processing in the RGB and YCbCr color spaces on the processed data.
  • the image data processed by the first ISP processor 1030 may be output to the display 1070 for viewing by the user and/or further processed by a graphics engine or GPU (Graphics Processing Unit, graphics processor).
  • the output of the first ISP processor 1030 can also be sent to the image memory 1060, and the display 1070 can read image data from the image memory 1060.
  • the image memory 1060 may be configured to implement one or more frame buffers.
  • the statistical data determined by the first ISP processor 1030 may be sent to the control logic 1050.
  • the statistical data may include first image sensor 1014 statistical information such as automatic exposure, automatic white balance, automatic focus, flicker detection, black level compensation, and shading correction of the first lens 1012.
  • the control logic 1050 may include a processor and/or a microcontroller that executes one or more routines (such as firmware). The one or more routines can determine the control parameters and the first camera 1010 according to the received statistical data.
  • the control parameters of the first camera 1010 may include gain, integration time of exposure control, anti-shake parameters, flash control parameters, first lens 1012 control parameters (for example, 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 (for example, during RGB processing), and first lens 1012 shading correction parameters.
  • the second image collected by the second camera 1020 is transmitted to the second ISP processor 1040 for processing.
  • the statistical data of the second image (such as image brightness, image The contrast value of the image, the color of the image, etc.) are sent to the control logic 1050, and the control logic 1050 can determine the control parameters of the second camera 1020 according to the statistical data, so that the second camera 1020 can perform automatic focusing, automatic exposure and other operations according to the control parameters .
  • the second image can be stored in the image memory 1060 after being processed by the second ISP processor 1040, and the second ISP processor 1040 can also read the image stored in the image memory 1060 for processing.
  • the second image can be directly sent to the display 1070 for display after being processed by the ISP processor 1040, and the display 1070 can also read the image in the image memory 1060 for display.
  • the second camera 1020 and the second ISP processor 1040 may also implement the processing procedures described by the first camera 1010 and the first ISP processor 1030.
  • the image processing circuit provided according to the embodiments of the present application can implement the above-mentioned high dynamic range HDR image generation method.
  • the electronic device may have multiple cameras, the cameras include lenses and image sensors corresponding to the lenses, and the image sensors in the multiple cameras are arranged in a rectangular diagonal manner.
  • the process by which the electronic device realizes the method for generating the high dynamic range HDR image is the same as the above-mentioned embodiment, which will not be repeated here.
  • the embodiment of the present application also provides a computer-readable storage medium.
  • One or more non-volatile computer-readable storage media containing computer-executable instructions when the computer-executable instructions are executed by one or more processors, cause the processors to perform operations of the high dynamic range HDR image generation method.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM), which acts as external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDRSDRAM double data rate SDRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM synchronous chain Channel
  • RDRAM synchronous chain Channel
  • RDRAM direct RAM
  • DRAM direct memory bus dynamic RAM
  • RDRAM memory bus dynamic RAM

Abstract

本申请涉及一种高动态范围HDR图像生成方法、装置、电子设备、计算机可读存储介质,包括:在通过第一摄像头对拍摄场景进行预览时,通过至少两个第二摄像头分别对拍摄场景进行拍摄生成目标原始图像。根据目标原始图像得到拍摄场景的亮度全息数据,根据拍摄场景的亮度全息数据确定至少两组目标曝光参数,将第一摄像头的曝光参数分别配置为至少两组目标曝光参数,并分别通过配置后的第一摄像头对拍摄场景进行拍摄生成至少两张目标图像。将至少两张目标图像进行合成得到HDR图像。

Description

高动态范围HDR图像生成方法和装置、电子设备、计算机可读存储介质
本申请要求于2019年06月06日提交中国专利局,申请号为201910492947.1,发明名称为“高动态范围HDR图像生成方法和装置、电子设备、计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,特别是涉及一种高动态范围HDR图像生成方法和装置、电子设备、计算机可读存储介质。
背景技术
随着摄像技术的不断发展,人们对电子设备摄像头的拍照要求日益提高。传统的电子设备从单摄像头发展到后来的双摄像头,拍照质量有了显著的提高。但是人们对电子设备的拍照要求也随之日益提高,例如在不同的光照环境下,如何进一步提高电子设备的拍照质量、满足用户更高的拍照需求,就是一个亟待解决的问题。
发明内容
本申请实施例提供一种高动态范围HDR图像生成方法、装置、电子设备、计算机可读存储介质,可以提高电子设备的拍照质量、满足更高的拍照需求。
一种高动态范围HDR图像生成方法,包括:
在通过第一摄像头对拍摄场景进行预览时,通过至少两个第二摄像头分别对所述拍摄场景进行拍摄生成目标原始图像;
根据所述目标原始图像得到所述拍摄场景的亮度全息数据;
根据所述拍摄场景的亮度全息数据确定至少两组目标曝光参数,将所述第一摄像头的曝光参数分别配置为所述至少两组目标曝光参数,并分别通过配置后的第一摄像头对所述拍摄场景进行拍摄生成至少两张目标图像;
将所述至少两张目标图像进行合成得到HDR图像。
一种高动态范围HDR图像生成装置,包括:
目标原始图像生成模块,用于在通过第一摄像头对拍摄场景进行预览时,通过至少两个第二摄像头分别对所述拍摄场景进行拍摄生成目标原始图像;
亮度全息数据获取模块,用于根据所述目标原始图像得到所述拍摄场景的亮度全息数据;
目标图像生成模块,用于根据所述拍摄场景的亮度全息数据确定至少两组目标曝光参数,将所述第一摄像头的曝光参数分别配置为所述至少两组目标曝光参数,并分别通过配置后的第一摄像头对所述拍摄场景进行拍摄生成至少两张目标图像;
HDR图像合成模块,用于将所述至少两张目标图像进行合成得到HDR图像。
一种电子设备,包括存储器及处理器,所述存储器中储存有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如上所述方法的操作。
一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现如上方法的操作。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根 据这些附图获得其他的附图。
图1为一个实施例中高动态范围HDR图像生成方法的应用环境图;
图2为一个实施例中高动态范围HDR图像生成方法的流程图;
图3为一个实施例中亮度分布直方图的示意图;
图4为图2中通过至少两个第二摄像头分别对所述拍摄场景进行拍摄生成目标原始图像方法的流程图;
图5为图4中生成第二目标原始图像方法的流程图;
图6为图4中生成第三目标原始图像方法的流程图;
图7为图2中目标图像生成方法的流程图;
图8为一个实施例中高动态范围HDR图像生成装置的结构框图;
图9为一个实施例中电子设备的内部结构示意图;
图10为一个实施例中图像处理电路的示意图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
可以理解,本申请所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。举例来说,在不脱离本申请的范围的情况下,可以将第一摄像头称为第二摄像头,且类似地,可将第二摄像头称为第一摄像头。第一摄像头和第二摄像头两者都是摄像头,但其不是同一摄像头。
图1为一个实施例中高动态范围HDR图像生成方法的应用环境示意图。如图1所示,该应用环境包括电子设备100。电子设备100包含有至少一个第一摄像头110和至少两个第二摄像头120。电子设备100在通过第一摄像头对拍摄场景进行预览时,通过至少两个第二摄像头分别对拍摄场景进行拍摄生成目标原始图像。根据目标原始图像得到拍摄场景的亮度全息数据,根据拍摄场景的亮度全息数据确定至少两组目标曝光参数,将第一摄像头的曝光参数分别配置为至少两组目标曝光参数,并分别通过配置后的第一摄像头对拍摄场景进行拍摄生成至少两张目标图像,将至少两张目标图像进行合成得到HDR图像。可以理解的是,上述电子设备100可以不限于是各种手机、电脑、可携带设备等。
图2为一个实施例中高动态范围HDR图像生成方法的流程图,如图2所示,高动态范围HDR图像生成方法包括操作220至操作280。
操作220,在通过第一摄像头对拍摄场景进行预览时,通过至少两个第二摄像头分别对拍摄场景进行拍摄生成目标原始图像。
电子设备接收到开启摄像头的指令时,可调用第一摄像头进入拍摄状态,即通过第一摄像头对拍摄场景进行预览,该第一摄像头包括主摄像头。然后,在通过第一摄像头对拍摄场景进行预览时,通过至少两个第二摄像头分别对拍摄场景进行拍摄生成目标原始图像,该第二摄像头包括主摄像头和副摄像头。可通过该第二摄像头对拍摄场景中的物体进行扫描形成图像帧,即为目标原始图像。
当电子设备包含一个主摄像头和两个副摄像头时,则电子设备接收到开启摄像头的指令时,可调用主摄像头进入拍摄状态,即通过主摄像头对拍摄场景进行预览(用户所看到的预览页面)。然后,在通过主摄像头对拍摄场景进行预览时,调用两个副摄像头分别对拍摄场景进行拍摄生成目标原始图像,此处可以是一个副摄像头只拍摄一帧图像,也可以是一个副摄像头连续拍摄多帧图像,所以,所生成的目标原始图像的数量为两帧及以上。且副摄像头每次采用不同的曝光参数去拍摄得到不同的图像,即两个副摄像头采用不同的 曝光参数去拍摄图像,且每一个副摄像头每次拍摄的曝光参数也是不同的。
在通过至少两个副摄像头进行拍摄时,具体为,首先通过一个副摄像头按照正常的曝光参数进行拍摄得到一帧目标原始图像;然后采用相对于正常曝光参数欠曝的曝光参数进行拍摄得到另一帧目标原始图像;其次采用相对于正常曝光参数过曝的曝光参数进行拍摄得到另一帧目标原始图像。显然,这三帧目标原始图像所包含的图像信息是不同的,从而根据这三帧目标原始图像得到拍摄场景的亮度全息数据,就会更加准确、全面。此处的曝光参数包括但不限于感光度、曝光量、曝光时长等其中的一种或多种,当其他参数不变时,则增长曝光时间即得到过曝的曝光参数;当其他参数不变时,缩短曝光时间即得到欠曝的曝光参数。
操作240,根据目标原始图像得到拍摄场景的亮度全息数据。
具体的,在通过至少两个第二摄像头分别对拍摄场景进行拍摄生成目标原始图像之后,获取目标原始图像中每一张目标原始图像的亮度分布数据,根据每一张目标原始图像的亮度分布数据合成拍摄场景的亮度全息数据。
其中,目标原始图像的数目为至少两帧及以上。例如,当电子设备只包含两个副摄像头时,分别通过这两个副摄像头拍摄得到两帧图像,其中一帧可以是进行过曝拍摄所得到的图像,另一帧可以是进行欠曝拍摄所得到的图像。然后,获取这两帧图像的亮度分布数据,这里的亮度分布数据具体指的是亮度分布直方图,亮度全息数据指的是拍摄场景的亮度分布直方图。在亮度分布直方图中,横轴代表的是图像中的亮度,且由左向右亮度从全黑逐渐过渡到全白;纵轴代表的则是图像中处于这个亮度范围的像素的相对数量。通过亮度分布直方图便可以对一张图像的明暗程度进行准确的评估。在得到了这两帧图像的亮度分布直方图之后,可以将这两帧图像的亮度分布直方图进行合成,就得到了拍摄场景的亮度全息数据。
当然,当通过至少两个第二摄像头分别对拍摄场景进行拍摄生成了至少两帧目标原始图像,则分别获取这些目标原始图像的亮度分布直方图,再将所有的亮度分布直方图进行合成得到拍摄场景的亮度全息数据。如图3所示,为将三帧图像的亮度分布直方图进行合成得到拍摄场景的亮度分布直方图的示意图。亮度分布直方图是用来检视图片亮度的一种量化工具。其中,横轴代表亮度,越靠右端亮度越高。纵轴代表数量,越靠上端数量越多。所以亮度分布直方图表示了该图片中各个像素亮度的分布情况。
其中,图3(a)为对拍摄场景进行短曝光所得到的目标原始图像的亮度分布直方图,图3(b)为对拍摄场景进行正常曝光所得到的目标原始图像的亮度分布直方图,图3(c)为对拍摄场景进行长曝光所得到的目标原始图像的亮度分布直方图。图3(d)为对图3(a)、图3(b)及图3(c)三张亮度分布直方图进行合成后所得到的拍摄场景的亮度分布直方图即亮度全息数据。其中,短曝光指的是采用相对于正常曝光的时间较短的曝光时间进行拍摄,长曝光指的是采用相对于正常曝光的时间较长的曝光时间进行拍摄。
操作260,根据拍摄场景的亮度全息数据确定至少两组目标曝光参数,将第一摄像头的曝光参数分别配置为至少两组目标曝光参数,并分别通过配置后的第一摄像头对拍摄场景进行拍摄生成至少两张目标图像。
因为,通过拍摄场景的亮度全息数据即亮度分布直方图便可以对一张图像的明暗程度进行准确的评估,所以就可以根据拍摄场景的亮度全息数据确定至少两组目标曝光参数。这两组目标曝光参数可以一组是过曝的曝光参数,一组是欠曝的曝光参数,当然也可以还包含一组正常曝光的参数。
在确定了至少两组目标曝光参数之后,电子设备可接收拍摄指令,将第一摄像头的曝光参数配置为至少两组目标曝光参数中的任意一组参数进行拍摄生成一张目标图像。然后,继续将第一摄像头的曝光参数配置为另外一组参数进行拍摄生成另一张目标图像。如此,继续将第一摄像头的曝光参数配置为其他组参数进行拍摄生成另一张目标图像。
其中,拍摄指令可以是通过侦测到的相关触控操作、物理按键的按压操作或语音控制操作等触发的拍摄指令。触控操作可为触摸点击操作、触摸长按操作、触摸滑动操作、多点触控操作等操作。电子设备可提供用于触发进行拍摄的拍摄按钮,当侦测到对该按钮的点击操作时,触发拍摄指令。电子设备还可预设用于触发该拍摄指令的拍摄语音信息。通过调用语音接收装置,接收对应的语音信息,通过解析该语音信息,当检测到该语音信息与该拍摄语音信息匹配时,可触发该拍摄指令。
操作280,将至少两张目标图像进行合成得到HDR图像。
在得到了至少两张目标图像之后,将至少两张目标图像进行合成得到HDR图像。HDR是指(High-Dynamic Range,高动态范围图像),相比普通的图像,HDR图像可以提供更多的动态范围和图像细节。
本实施例中的高动态范围HDR图像生成方法,通过至少两个第二摄像头分别对拍摄场景进行拍摄生成目标原始图像,拍摄速度更快,然后根据目标原始图像得到拍摄场景的亮度全息数据。再根据拍摄场景的亮度全息数据确定至少两组目标曝光参数,将第一摄像头的曝光参数分别配置为至少两组目标曝光参数,并分别通过配置后的第一摄像头对拍摄场景进行拍摄生成至少两张目标图像。至少两张目标图像所包含的图像信息更加全面,进而将至少两张目标图像进行合成得到HDR图像的可以提供更多的动态范围和图像细节。
在一个实施例中,目标原始图像包括第一目标原始图像、第二目标原始图像及第三目标原始图像;
如图4所示,操作220,通过至少两个第二摄像头分别对拍摄场景进行拍摄生成目标原始图像,包括:
操作222,通过至少两个第二摄像头中的任意一个第二摄像头按照预设曝光参数对拍摄场景进行拍摄生成第一目标原始图像。
预设曝光参数为电子设备相机根据拍摄场景所匹配的曝光参数,电子设备相机中预先存储了拍摄场景和所匹配的曝光参数的对应关系表,将摄像头配置为该匹配的曝光参数,就可以通过配置后的摄像头拍摄到在该拍摄场景下正常曝光的图像。电子设备通过查询该表就可以找到与拍摄场景匹配的曝光参数,然后将至少两个第二摄像头中的任意一个第二摄像头配置为该与拍摄场景匹配的曝光参数,对拍摄场景进行拍摄生成第一目标原始图像。该第一目标原始图像为正常曝光的图像。
操作224,通过至少两个第二摄像头中的任意一个第二摄像头按照相对于预设曝光参数过曝的参数对拍摄场景进行拍摄生成原始图像,当检测到原始图像中所展示的拍摄场景中的暗区满足预设要求,则获取原始图像作为第二目标原始图像。
按照预设间隔获取相对于预设曝光参数过曝的参数,作为当前曝光参数,将至少两个第二摄像头中的任意一个第二摄像头的曝光参数配置为当前曝光参数。通过配置后的第二摄像头对拍摄场景进行拍摄生成原始图像,判断原始图像中所展示的拍摄场景中的暗区是否满足预设要求,当判断结果为是则获取原始图像作为第二目标原始图像,当判断结果为否,则返回至按照预设区间获取相对于当前曝光参数过曝的参数,作为新的当前曝光参数的循环,直至获取到第二目标原始图像。
例如,当此处的曝光参数为曝光量(曝光量对应的值用EV来表示)时,该预设间隔可以是1EV。其中,EV是Exposure Values的缩写,是反映曝光多少的一个量。其最初定义为:当感光度为ISO100、光圈系数为F1、曝光时间为1秒时,曝光量定义为0EV;曝光量减少一档(快门时间减少一半或者光圈缩小一档)为-1EV;曝光量增一档(快门时间增加一倍或者光圈增加一档)为+1EV。
将生成第一目标原始图像时的曝光参数视为0EV,则获取按照预设间隔1EV获取相对于预设曝光参数过曝的参数+1EV,作为当前曝光参数。
操作226,通过至少两个第二摄像头中的任意一个第二摄像头按照相对于预设曝光参 数欠曝的参数对拍摄场景进行拍摄生成原始图像,当检测到原始图像中所展示的拍摄场景中的亮区满足预设要求,则获取原始图像作为第三目标原始图像。
按照预设间隔获取相对于预设曝光参数欠曝的参数,作为当前曝光参数,将至少两个第二摄像头中的任意一个第二摄像头的曝光参数配置为当前曝光参数。通过配置后的第二摄像头对拍摄场景进行拍摄生成原始图像,判断原始图像中所展示的拍摄场景中的亮区是否满足预设要求,当判断结果为是则获取原始图像作为第三目标原始图像,当判断结果为否,则返回至按照预设区间获取相对于当前曝光参数欠曝的参数,作为新的当前曝光参数的循环,直至获取到第三目标原始图像。
例如,当此处的曝光参数为曝光量(曝光量对应的值用EV来表示)时,该预设间隔可以是1EV。将生成第一目标原始图像时的曝光参数视为0EV,则获取按照预设间隔1EV获取相对于预设曝光参数欠曝的参数-1EV,作为当前曝光参数。
本申请实施例中,通过至少两个第二摄像头中的任意一个第二摄像头按照预设曝光参数对拍摄场景进行拍摄生成第一目标原始图像,该第一目标原始图像为正常曝光的图像。然后,再按照预设间隔获取相对于预设曝光参数过曝的参数作为当前曝光参数,将至少两个第二摄像头中的任意一个第二摄像头的曝光参数配置为当前曝光参数进行拍摄得到第二目标原始图像,该第二目标原始图像为过曝的图像。最后,按照预设间隔获取相对于预设曝光参数欠曝的参数作为当前曝光参数,将至少两个第二摄像头中的任意一个第二摄像头的曝光参数配置为当前曝光参数。通过配置后的第二摄像头对拍摄场景进行拍摄生成第三目标原始图像。这样分别具备了正常曝光、过曝及欠曝三种图像,因为不同曝光程度的图像中所包含的图像信息是不同的,所以正常曝光、过曝及欠曝三种图像所覆盖的图像信息更加全面、详细。以便后续根据这三种图像得到拍摄场景的亮度全息数据,且得到的亮度全息数据更加全面、准确。
在一个实施例中,如图5所示,操作224,通过至少两个第二摄像头中的任意一个第二摄像头按照相对于预设曝光参数过曝的参数对拍摄场景进行拍摄生成原始图像,当检测到原始图像中所展示的拍摄场景中的暗区满足预设要求,则获取原始图像作为第二目标原始图像,包括:
操作224a,按照预设间隔获取相对于预设曝光参数过曝的参数,作为当前曝光参数;
操作224b,将至少两个第二摄像头中的任意一个第二摄像头的曝光参数配置为当前曝光参数;
操作224c,通过配置后的第二摄像头对拍摄场景进行拍摄生成原始图像;
操作224d,判断原始图像中所展示的拍摄场景中的暗区是否满足预设要求,当判断结果为是则进入操作224e,获取原始图像作为第二目标原始图像;
当判断结果为否,则返回至操作224a,按照预设区间获取相对于当前曝光参数过曝的参数,作为新的当前曝光参数的循环,直至获取到第二目标原始图像。
具体的,例如,当此处的曝光参数为曝光量(曝光量对应的值用EV来表示)时,该预设间隔可以是1EV。将生成第一目标原始图像时的曝光参数视为0EV,则获取按照预设间隔1EV获取相对于预设曝光参数过曝的参数+1EV,作为当前曝光参数。曝光参数从0EV增加至+1EV,可以通过将快门时间增加一倍或者光圈增加一档来实现。一般情况下,因为电子设备中的光圈大小一般是固定的,所以可以在其他曝光参数不变的情况下,通过将快门时间增加一倍来将曝光量从0EV增加至+1EV。当然,还可以通过其他方法将曝光参数从0EV增加至+1EV。将至少两个第二摄像头中的任意一个第二摄像头的曝光参数配置为当前曝光参数。
一种情况下,可以是把拍摄第一目标原始图像的摄像头的曝光参数进行调整,具体是将该摄像头的曝光量从0EV增加至+1EV。然后,通过曝光量为+1EV的该摄像头进行拍摄生成原始图像。因为是过曝的图像,所以进一步判断该原始图像的暗区是否满足预设要 求,即暗区的清晰度是否达到预设标准,当判断结果为是则将该原始图像作为第二目标原始图像。此处的预设标准可以根据实际情况进行定义。
当判断出暗区的清晰度未达到预设标准,则返回至第一步中重新定义当前曝光参数:再次按照预设间隔1EV获取相对于+1EV过曝的曝光量+2EV,作为当前曝光量,并进入上述操作操作224a-操作224d循环,直到判断出原始图像的暗区的清晰度达到预设标准,则将该原始图像作为第二目标原始图像为止。
另一种情况下,可以是把另外的第二摄像头的曝光参数进行调整,具体是直接将该摄像头的曝光量调整至+1EV。然后,通过曝光量为+1EV的该摄像头进行拍摄生成原始图像。因为是过曝的图像,所以进一步判断该原始图像的暗区是否满足预设要求,即暗区的清晰度是否达到预设标准,当判断结果为是则将该原始图像作为第二目标原始图像。此处的预设标准可以根据实际情况进行定义。
当判断出暗区的清晰度未达到预设标准,则返回至第一步中重新定义当前曝光参数:具体为再次按照预设间隔1EV获取相对于+1EV过曝的曝光量+2EV,作为当前曝光量,并进入上述操作操作224a-操作224d循环,直到判断出原始图像的暗区的清晰度达到预设标准,则将该原始图像作为第二目标原始图像为止。
本申请实施例中,不断按照预设间隔调整第二摄像头的曝光量,从而使得拍摄出的暗区的清晰度符合预设标准,将该暗区的清晰度符合预设标准的原始图像作为第二目标原始图像。这样在不断调整后所得到的曝光量下,所拍摄的图像所包含的暗区的信息量趋向于越来越全面。
接前一个实施例,如图6所示,操作226,通过至少两个第二摄像头中的任意一个第二摄像头按照相对于预设曝光参数欠曝的参数对拍摄场景进行拍摄生成原始图像,当检测到原始图像中所展示的拍摄场景中的亮区满足预设要求,则获取原始图像作为第三目标原始图像,包括:
操作226a,按照预设间隔获取相对于预设曝光参数欠曝的参数,作为当前曝光参数;
操作226b,将至少两个第二摄像头中的任意一个第二摄像头的曝光参数配置为当前曝光参数;
操作226c,通过配置后的第二摄像头对拍摄场景进行拍摄生成原始图像;
操作226d,判断原始图像中所展示的拍摄场景中的亮区是否满足预设要求,当判断结果为是则进入操作226e,获取原始图像作为第三目标原始图像;
当判断结果为否,则返回至操作226a,按照预设区间获取相对于当前曝光参数欠曝的参数,作为新的当前曝光参数的循环,直至获取到第三目标原始图像。
具体的,例如,当此处的曝光参数为曝光量(曝光量对应的值用EV来表示)时,该预设间隔可以是1EV。将生成第一目标原始图像时的曝光参数视为0EV,则获取按照预设间隔1EV获取相对于预设曝光参数欠曝的参数-1EV,作为当前曝光参数。曝光量从0EV减小至-1EV,可以通过将快门时间减小一倍或者光圈减小一档来实现。一般情况下,因为电子设备中的光圈大小一般是固定的,所以可以在其他曝光参数不变的情况下,通过将快门时间减小一倍来将曝光参数从0EV减小至-1EV。当然,还可以通过其他方法将曝光参数从0EV减小至-1EV。将至少两个第二摄像头中的任意一个第二摄像头的曝光参数配置为当前曝光参数。
可以是把另外的第二摄像头的曝光参数进行调整,具体是直接将该摄像头的曝光量调整至-1EV,此处生成第三目标原始图像的摄像头、生成第二目标原始图像的摄像头、生成第一目标原始图像的摄像头,可以两两相同。然后,通过曝光量为-1EV的该摄像头进行拍摄生成原始图像。因为是欠曝的图像,所以进一步判断该原始图像的亮区是否满足预设要求,即亮区的清晰度是否达到预设标准,当判断结果为是则将该原始图像作为第三目标原始图像。此处的预设标准可以根据实际情况进行定义。
当判断出亮区的清晰度未达到预设标准,则返回至第一步中重新定义当前曝光参数:具体为再次按照预设间隔1EV获取相对于-1EV欠曝的曝光量-2EV,作为当前曝光量,并进入上述操作操作226a-操作226d循环,直到判断出原始图像的亮区的清晰度达到预设标准,则将该原始图像作为第三目标原始图像为止。
本申请实施例中,不断按照预设间隔调整第二摄像头的曝光量,从而使得拍摄出的亮区的清晰度符合预设标准,将该亮区的清晰度符合预设标准的原始图像作为第三目标原始图像。这样在不断调整后所得到的曝光量下,所拍摄的图像所包含的亮区的信息量趋向于越来越全面。
一个实施例中,通过至少两个第二摄像头分别对拍摄场景进行拍摄生成目标原始图像,包括:
同时通过至少两个第二摄像头分别对拍摄场景进行拍摄生成目标原始图像。
本申请实施例中,电子设备可以包括至少两个第二摄像头即副摄像头,在采用第二摄像头进行拍摄出原始图像的时候,就可以同时调用电子设备上的副摄像头进行拍摄出原始图像,进而得到所有的目标原始图像。这样,同时调用电子设备上的副摄像头进行拍摄出原始图像,相比较与仅仅采用一颗副摄像头依次拍摄出不同的原始图像,就大大缩减了拍摄时间,进而提高了根据目标原始图像得到拍摄场景的亮度全息数据的效率。避免了用户在预览界面进行长时间的等待。
在一个实施例中,根据目标原始图像得到拍摄场景的亮度全息数据,包括:
获取目标原始图像中每一张目标原始图像的亮度分布数据;
根据每一张目标原始图像的亮度分布数据合成拍摄场景的亮度全息数据。
具体的,如图3所示,为将三帧图像的亮度分布直方图进行合成得到拍摄场景的亮度分布直方图的示意图。其中,图3(a)为对拍摄场景进行短曝光(欠爆)所得到的目标原始图像的亮度分布直方图,图3(b)为对拍摄场景进行正常曝光所得到的目标原始图像的亮度分布直方图,图3(c)为对拍摄场景进行长曝光(过曝)所得到的目标原始图像的亮度分布直方图。图3(d)为对图3(a)、图3(b)及图3(c)三张亮度分布直方图进行合成后所得到的拍摄场景的亮度分布直方图即亮度全息数据。其中,短曝光指的是采用相对于正常曝光的时间较短的曝光时间进行拍摄,长曝光指的是采用相对于正常曝光的时间较长的曝光时间进行拍摄。
其中,第二摄像头的数目至少为两个,所以目标原始图像的数目至少为两个,当然,目标原始图像的数目也可以为三个及以上。每一个第二摄像头至少拍摄得到一帧目标原始图像,当然,每一个第二摄像头也可以拍摄得到两帧及以上数目的目标原始图像。本申请实施例中,因为对拍摄场景进行短曝光(欠爆)所得到的目标原始图像的亮区符合预设标准,对拍摄场景进行长曝光(过曝)所得到的目标原始图像的暗区符合预设标准。所以将短曝光(欠爆)所得到的目标原始图像、长曝光(过曝)所得到的目标原始图像及正常曝光所得到的目标原始图像的亮度分布直方图进行合成,就得到了拍摄场景的亮度分布直方图即亮度全息数据。该亮度全息数据覆盖了拍摄场景中的亮区和暗区的全部数据。
在一个实施例中,如图7所示,操作260,根据拍摄场景的亮度全息数据确定至少两组目标曝光参数,将第一摄像头的曝光参数分别配置为至少两组目标曝光参数,并分别通过配置后的第一摄像头对拍摄场景进行拍摄生成至少两张目标图像,包括:
操作262,根据拍摄场景的亮度全息数据确定至少两组目标曝光参数,至少两组目标曝光参数包括正常曝光参数、过曝曝光参数及欠爆曝光参数。
在通过第一摄像头对拍摄场景进行预览时,通过至少两个第二摄像头分别对拍摄场景进行拍摄生成目标原始图像,再根据目标原始图像得到拍摄场景的亮度全息数据。在得到了拍摄场景的亮度全息数据之后,就可以根据该亮度全息数据去配置第一摄像头的曝光参数。
具体的,可以直接将第二摄像头生成目标原始图像时的曝光参数,配置为第一摄像头的曝光参数。例如,分别获取第二摄像头生成第一目标原始图像、第二目标原始图像及第三目标原始图像时的曝光参数,将这三组曝光参数配置为第一摄像头的曝光参数。其中,第一目标原始图像为第二摄像头按照预设曝光参数对拍摄场景进行拍摄所生成的,预设曝光参数为正常曝光参数。第二目标原始图像为第二摄像头按照相对于预设曝光参数过曝的参数对拍摄场景进行拍摄所生成的,相对于预设曝光参数过曝的参数为过曝曝光参数。第三目标原始图像为第二摄像头按照相对于预设曝光参数欠曝的参数对拍摄场景进行拍摄所生成的,相对于预设曝光参数欠曝的参数为欠曝曝光参数。
具体的,因为在上述实施例中所获得的正常曝光参数、过曝曝光参数及欠爆曝光参数为该拍摄场景下最优的拍摄参数,在这些参数下所拍摄出的图像所包含的信息最全面、最详细。但是,在实际合成HDR的时候,可以将这三组曝光参数作为参考,去对这三组曝光参数进行微调去拍摄图像,进而合成具有不同表现力的HDR图像。例如,当不需要对比太强烈时,则可以将过曝曝光参数和欠爆曝光参数都稍微向正常曝光参数微调,这样将第一摄像头分别配置为经过调整之后的过曝曝光参数和欠爆曝光参数并拍摄出图像,再将第一摄像头配置为正常曝光参数且拍摄出图像,将第一摄像头所拍摄出的图像进行合成,就可以得到对比不是太强烈的HDR图像。此处的过曝曝光参数和欠爆曝光参数的数目可以是一组或多组,那么每一组曝光参数都对应生成一帧图像。
当然,还可以根据拍摄场景的光比进行动态调整过曝曝光参数、欠爆曝光参数及正常曝光参数。其中,光比是摄影上重要的参数之一,光比是指被摄物体的主要部分受光面亮度与阴影面亮度的比值,通常是指主光和辅光的比值。光比对照片的反差控制有着重要意义。光比大,反差就大,有利于表面“刚”的效果;光比小,反差就小,有利于表面“柔”的效果。例如画面照明平均,则光比为1比1。光比对于摄影最大的意义是画面的明暗反差,反差大则画面视觉张力强,反差小则柔和平缓。在人像摄影中,反差能很好的表现人物的性格,例如高反差显得刚强有力,低反差显得柔媚。风光摄影、产品摄影中高反差质感坚硬,低反差则客观平淡。
因此,当拍摄场景的光比较大时,则当希望图像表现出“刚”的效果,那么就可以尽量将过曝曝光参数和欠爆曝光参数都向远离正常曝光参数方向微调,以实现合成后的HDR图像表现出“刚”的效果。当希望图像表现出“柔”的效果,那么就可以尽量将过曝曝光参数和欠爆曝光参数都朝向正常曝光参数方向微调,以实现合成后的HDR图像表现出“柔”的效果。对于光比较小的情况,同理进行调整以实现相应的效果。
操作264,将第一摄像头的曝光参数配置为正常曝光参数,通过配置后的第一摄像头对拍摄场景进行拍摄生成第一目标图像。
该正常曝光参数可以是第二摄像头在拍摄第一目标原始图像时的曝光参数。而第二摄像头是按照预设曝光参数对拍摄场景进行拍摄生成第一目标原始图像,所以正常曝光参数即为预设曝光参数。此处,将预设曝光参数直接配置为第一摄像头的曝光参数,并通过配置后的第一摄像头对拍摄场景进行拍摄生成第一目标图像。
其中,预设曝光参数为电子设备相机根据拍摄场景所匹配的曝光参数,电子设备相机中预先存储了拍摄场景和所匹配的曝光参数的对应关系表,将第二摄像头配置为该匹配的曝光参数,就可以通过配置后的摄像头拍摄到在该拍摄场景下正常曝光的图像。电子设备通过查询该表就可以找到与拍摄场景匹配的曝光参数,然后将至少两个第二摄像头中的任意一个第二摄像头配置为该与拍摄场景匹配的曝光参数,对拍摄场景进行拍摄生成第一目标原始图像。该第一目标原始图像为正常曝光的图像。
操作266,将第一摄像头的曝光参数配置为过曝曝光参数,通过配置后的第一摄像头对拍摄场景进行拍摄生成第二目标图像。
此处的过曝曝光参数可以直接是第二摄像头进行拍摄第二目标原始图像时的曝光参 数,也可以是对该过曝曝光参数进行调整后的参数。然后,将第一摄像头的曝光参数配置为该参数,通过配置后的第一摄像头对拍摄场景进行拍摄生成第二目标图像。
操作268,将第一摄像头的曝光参数配置为欠爆曝光参数,通过配置后的第一摄像头对拍摄场景进行拍摄生成第三目标图像。
此处的欠曝曝光参数可以直接是第三摄像头进行拍摄第三目标原始图像时的曝光参数,也可以是对该欠曝曝光参数进行调整后的参数。然后,将第一摄像头的曝光参数配置为该参数,通过配置后的第一摄像头对拍摄场景进行拍摄生成第三目标图像。
本申请实施例中,通过对第二摄像头在正常、过曝、欠曝情况下进行拍摄,并对拍摄出的图像进行筛选,筛选出符合要求的图像,进而得到拍摄场景的亮度全息数据。然后,根据拍摄场景的亮度全息数据确定目标曝光参数,这里目标曝光参数可以直接是第二摄像头拍摄合成亮度全息数据所使用到的图像时的曝光参数。这样,将第一摄像头设置为目标曝光参数并拍摄出图像,进而将这些图像合成为HDR图像,该HDR图像中包括了拍摄场景中比较多的图像信息。
这里的目标曝光参数还可以是:对第二摄像头拍摄合成亮度全息数据时的图像的曝光参数,根据亮度全息数据去对之进行调整之后所得到。可以动态调整,以呈现出不同的图像表现力。
在一个实施例中,正常曝光参数为预设曝光参数,过曝曝光参数为生成第二目标原始图像的曝光参数,欠爆曝光参数为生成第三目标原始图像的曝光参数。
本申请实施例中,目标曝光参数包括正常曝光参数、过曝曝光参数及欠爆曝光参数。这里目标曝光参数可以直接是第二摄像头拍摄合成亮度全息数据所使用到的图像时的曝光参数。即正常曝光参数为第二摄像头生成第一目标原始图像时的预设曝光参数,过曝曝光参数第二摄像头生成第二目标原始图像时的过曝曝光参数,第二摄像头生成第三目标原始图像时的欠曝曝光参数。这样,将第一摄像头设置为目标曝光参数并拍摄出图像,进而将这些图像合成为HDR图像,该HDR图像中包括了拍摄场景中比较多的图像信息。
在一个具体的实施例中,如图1所示,电子设备包含1个第一摄像头110和3个第二摄像头120为例进行说明,第一摄像头为主摄像头,第二摄像头维副摄像头。
在通过主摄像头对拍摄场景进行预览时,通过三个副摄像头分别对拍摄场景进行拍摄生成目标原始图像。具体的,同时通过三个副摄像头中的副摄像头A按照预设曝光参数(0EV)对拍摄场景进行拍摄生成第一目标原始图像。
按照预设间隔(1EV)获取相对于预设曝光参数(0EV)过曝的参数(+1EV),作为当前曝光参数。将三个副摄像头中的副摄像头B的曝光参数配置为当前曝光参数;通过配置后的副摄像头B对拍摄场景进行拍摄生成原始图像;判断原始图像中所展示的拍摄场景中的暗区是否满足预设要求,当判断结果为是则获取原始图像作为第二目标原始图像;当判断结果为否,则返回至按照预设区间获取相对于当前曝光参数过曝的参数,作为新的当前曝光参数的循环,直至获取到第二目标原始图像。
按照预设间隔(1EV)获取相对于预设曝光参数(0EV)欠曝的参数(-1EV),作为当前曝光参数;将三个副摄像头中的副摄像头C的曝光参数配置为当前曝光参数;通过配置后的副摄像头C对拍摄场景进行拍摄生成原始图像;判断原始图像中所展示的拍摄场景中的亮区是否满足预设要求,当判断结果为是则获取原始图像作为第三目标原始图像;当判断结果为否,则返回至按照预设区间获取相对于当前曝光参数欠曝的参数,作为新的当前曝光参数的循环,直至获取到第三目标原始图像。
根据第一、第二、第三目标原始图像确定三组目标曝光参数,三组目标曝光参数包括正常曝光参数、过曝曝光参数及欠爆曝光参数;其中,正常曝光参数为预设曝光参数,过曝曝光参数为生成第二目标原始图像的曝光参数,欠爆曝光参数为生成第三目标原始图像的曝光参数。
将第一摄像头的曝光参数配置为正常曝光参数,通过配置后的第一摄像头对拍摄场景进行拍摄生成第一目标图像;
将第一摄像头的曝光参数配置为过曝曝光参数,通过配置后的第一摄像头对拍摄场景进行拍摄生成第二目标图像;
将第一摄像头的曝光参数配置为欠爆曝光参数,通过配置后的第一摄像头对拍摄场景进行拍摄生成第三目标图像。
将第一、第二、第三目标图像进行合成得到HDR图像。
本申请实施例中,电子设备包含1个主摄像头和3个副摄像头,通过3个副摄像头同时进行拍摄得到第一、第二及第三目标原始图像。直接将第一、第二、第三目标原始图像拍摄时的曝光参数作为主摄像头的曝光参数,从而分别通过配置后的主摄像头对拍摄场景进行拍摄生成第一、第二及第三目标图像。将第一、第二、第三目标图像进行合成得到HDR图像。
其中,直接将第一、第二、第三目标原始图像拍摄时的曝光参数作为主摄像头的曝光参数,方便快捷,缩短相机处于预览画面的等待时间。且此时主摄像头所拍摄的图像所包含的信息最全面、丰富,继而将这些图像合成为HDR图像,则该HDR图像中包括了拍摄场景中最全面、丰富的图像信息。
应该理解的是,虽然图2的流程图中的各个操作按照箭头的指示依次显示,但是这些操作并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些操作的执行并没有严格的顺序限制,这些操作可以以其它的顺序执行。而且,图2中的至少一部分操作可以包括多个子操作或者多个阶段,这些子操作或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子操作或者阶段的执行顺序也不必然是依次进行,而是可以与其它操作或者其它操作的子操作或者阶段的至少一部分轮流或者交替地执行。
在一个实施例中,如图8所示,提供了一种高动态范围HDR图像生成装置800,包括:
目标原始图像生成模块820,用于在通过第一摄像头对拍摄场景进行预览时,通过至少两个第二摄像头分别对拍摄场景进行拍摄生成目标原始图像;
亮度全息数据获取模块840,用于根据目标原始图像得到拍摄场景的亮度全息数据;
目标图像生成模块860,用于根据拍摄场景的亮度全息数据确定至少两组目标曝光参数,将第一摄像头的曝光参数分别配置为至少两组目标曝光参数,并分别通过配置后的第一摄像头对拍摄场景进行拍摄生成至少两张目标图像;
HDR图像合成模块880,用于将至少两张目标图像进行合成得到HDR图像。
在一个实施例中,目标原始图像生成模块820,包括:
第一目标原始图像生成单元,用于通过至少两个第二摄像头中的任意一个第二摄像头按照预设曝光参数对拍摄场景进行拍摄生成第一目标原始图像;
第二目标原始图像生成单元,用于通过至少两个第二摄像头中的任意一个第二摄像头按照相对于预设曝光参数过曝的参数对拍摄场景进行拍摄生成原始图像,当检测到原始图像中所展示的拍摄场景中的暗区满足预设要求,则获取原始图像作为第二目标原始图像;
第三目标原始图像生成单元,用于通过至少两个第二摄像头中的任意一个第二摄像头按照相对于预设曝光参数欠曝的参数对拍摄场景进行拍摄生成原始图像,当检测到原始图像中所展示的拍摄场景中的亮区满足预设要求,则获取原始图像作为第三目标原始图像。
在一个实施例中,第二目标原始图像生成单元,还用于按照预设间隔获取相对于预设曝光参数过曝的参数,作为当前曝光参数;将至少两个第二摄像头中的任意一个第二摄像头的曝光参数配置为当前曝光参数;通过配置后的第二摄像头对拍摄场景进行拍摄生成原始图像;判断原始图像中所展示的拍摄场景中的暗区是否满足预设要求,当判断结果为是 则获取原始图像作为第二目标原始图像;当判断结果为否,则返回至按照预设区间获取相对于当前曝光参数过曝的参数,作为新的当前曝光参数的循环,直至获取到第二目标原始图像。
在一个实施例中,第三目标原始图像生成单元,还用于按照预设间隔获取相对于预设曝光参数欠曝的参数,作为当前曝光参数;将至少两个第二摄像头中的任意一个第二摄像头的曝光参数配置为当前曝光参数;通过配置后的第二摄像头对拍摄场景进行拍摄生成原始图像;判断原始图像中所展示的拍摄场景中的亮区是否满足预设要求,当判断结果为是则获取原始图像作为第三目标原始图像;当判断结果为否,则返回至按照预设区间获取相对于当前曝光参数欠曝的参数,作为新的当前曝光参数的循环,直至获取到第三目标原始图像。
在一个实施例中,目标原始图像生成模块820,还用于同时通过至少两个第二摄像头分别对拍摄场景进行拍摄生成目标原始图像。
在一个实施例中,亮度全息数据获取模块840,还用于获取目标原始图像中每一张目标原始图像的亮度分布数据;根据每一张目标原始图像的亮度分布数据合成拍摄场景的亮度全息数据。
在一个实施例中,目标图像生成模块860,还用于根据拍摄场景的亮度全息数据确定至少两组目标曝光参数,至少两组目标曝光参数包括正常曝光参数、过曝曝光参数及欠爆曝光参数;将第一摄像头的曝光参数配置为正常曝光参数,通过配置后的第一摄像头对拍摄场景进行拍摄生成第一目标图像;将第一摄像头的曝光参数配置为过曝曝光参数,通过配置后的第一摄像头对拍摄场景进行拍摄生成第二目标图像;将第一摄像头的曝光参数配置为欠爆曝光参数,通过配置后的第一摄像头对拍摄场景进行拍摄生成第三目标图像。
上述高动态范围HDR图像生成装置中各个模块的划分仅用于举例说明,在其他实施例中,可将高动态范围HDR图像生成装置按照需要划分为不同的模块,以完成上述高动态范围HDR图像生成装置的全部或部分功能。
图9为一个实施例中电子设备的内部结构示意图。如图9所示,该电子设备包括通过系统总线连接的处理器和存储器。其中,该处理器用于提供计算和控制能力,支撑整个电子设备的运行。存储器可包括非易失性存储介质及内存储器。非易失性存储介质存储有操作系统和计算机程序。该计算机程序可被处理器所执行,以用于实现以下各个实施例所提供的一种高动态范围HDR图像生成方法。内存储器为非易失性存储介质中的操作系统计算机程序提供高速缓存的运行环境。该电子设备可以是手机、平板电脑或者个人数字助理或穿戴式设备等。
本申请实施例中提供的高动态范围HDR图像生成装置中的各个模块的实现可为计算机程序的形式。该计算机程序可在终端或服务器上运行。该计算机程序构成的程序模块可存储在终端或服务器的存储器上。该计算机程序被处理器执行时,实现本申请实施例中所描述方法的操作。
本申请实施例还提供一种电子设备。上述电子设备中包括图像处理电路,图像处理电路可以利用硬件和/或软件组件实现,可包括定义ISP(Image Signal Processing,图像信号处理)管线的各种处理单元。图10为一个实施例中图像处理电路的示意图。如图10所示,为便于说明,仅示出与本申请实施例相关的高动态范围HDR图像生成技术的各个方面。
如图10所示,图像处理电路包括第一ISP处理器1030、第二ISP处理器1040和控制逻辑器1050。第一摄像头1010包括一个或多个第一透镜1012和第一图像传感器1014。第一图像传感器1014可包括色彩滤镜阵列(如Bayer滤镜),第一图像传感器1014可获取用第一图像传感器1014的每个成像像素捕捉的光强度和波长信息,并提供可由第一ISP处理器1030处理的一组图像数据。第二摄像头1020包括一个或多个第二透镜1022和第二图像传感器1024。 第二图像传感器1024可包括色彩滤镜阵列(如Bayer滤镜),第二图像传感器1024可获取用第二图像传感器1024的每个成像像素捕捉的光强度和波长信息,并提供可由第二ISP处理器1040处理的一组图像数据。
第一摄像头1010采集的第一图像传输给第一ISP处理器1030进行处理,第一ISP处理器1030处理第一图像后,可将第一图像的统计数据(如图像的亮度、图像的反差值、图像的颜色等)发送给控制逻辑器1050,控制逻辑器1050可根据统计数据确定第一摄像头1010的控制参数,从而第一摄像头1010可根据控制参数进行自动对焦、自动曝光等操作。第一图像经过第一ISP处理器1030进行处理后可存储至图像存储器1060中,第一ISP处理器1030也可以读取图像存储器1060中存储的图像以对进行处理。另外,第一图像经过ISP处理器1030进行处理后可直接发送至显示器1070进行显示,显示器1070也可以读取图像存储器1060中的图像以进行显示。
其中,第一ISP处理器1030按多种格式逐个像素地处理图像数据。例如,每个图像像素可具有8、10、12或14比特的位深度,第一ISP处理器1030可对图像数据进行一个或多个高动态范围HDR图像生成操作、收集关于图像数据的统计信息。其中,高动态范围HDR图像生成操作可按相同或不同的位深度精度进行。
图像存储器1060可为存储器装置的一部分、存储设备、或电子设备内的独立的专用存储器,并可包括DMA(Direct Memory Access,直接直接存储器存取)特征。
当接收到来自第一图像传感器1014接口时,第一ISP处理器1030可进行一个或多个高动态范围HDR图像生成操作,如时域滤波。处理后的图像数据可发送给图像存储器1060,以便在被显示之前进行另外的处理。第一ISP处理器1030从图像存储器1060接收处理数据,并对处理数据进行RGB和YCbCr颜色空间中的图像数据处理。第一ISP处理器1030处理后的图像数据可输出给显示器1070,以供用户观看和/或由图形引擎或GPU(Graphics Processing Unit,图形处理器)进一步处理。此外,第一ISP处理器1030的输出还可发送给图像存储器1060,且显示器1070可从图像存储器1060读取图像数据。在一个实施例中,图像存储器1060可被配置为实现一个或多个帧缓冲器。
第一ISP处理器1030确定的统计数据可发送给控制逻辑器1050。例如,统计数据可包括自动曝光、自动白平衡、自动聚焦、闪烁检测、黑电平补偿、第一透镜1012阴影校正等第一图像传感器1014统计信息。控制逻辑器1050可包括执行一个或多个例程(如固件)的处理器和/或微控制器,一个或多个例程可根据接收的统计数据,确定第一摄像头1010的控制参数及第一ISP处理器1030的控制参数。例如,第一摄像头1010的控制参数可包括增益、曝光控制的积分时间、防抖参数、闪光控制参数、第一透镜1012控制参数(例如聚焦或变焦用焦距)、或这些参数的组合等。ISP控制参数可包括用于自动白平衡和颜色调整(例如,在RGB处理期间)的增益水平和色彩校正矩阵,以及第一透镜1012阴影校正参数。
同样地,第二摄像头1020采集的第二图像传输给第二ISP处理器1040进行处理,第二ISP处理器1040处理第一图像后,可将第二图像的统计数据(如图像的亮度、图像的反差值、图像的颜色等)发送给控制逻辑器1050,控制逻辑器1050可根据统计数据确定第二摄像头1020的控制参数,从而第二摄像头1020可根据控制参数进行自动对焦、自动曝光等操作。第二图像经过第二ISP处理器1040进行处理后可存储至图像存储器1060中,第二ISP处理器1040也可以读取图像存储器1060中存储的图像以对进行处理。另外,第二图像经过ISP处理器1040进行处理后可直接发送至显示器1070进行显示,显示器1070也可以读取图像存储器1060中的图像以进行显示。第二摄像头1020和第二ISP处理器1040也可以实现如第一摄像头1010和第一ISP处理器1030所描述的处理过程。
根据本申请实施例提供的图像处理电路可以实现上述高动态范围HDR图像生成方法。其中,电子设备可以多个摄像头,摄像头包括镜头及与镜头对应设置的图像传感器,多个摄像头中的图像传感器采用矩形对角线的方式排列。电子设备实现该高动态范围HDR图 像生成方法的过程如上述实施例,在此不再赘述。
本申请实施例还提供了一种计算机可读存储介质。一个或多个包含计算机可执行指令的非易失性计算机可读存储介质,当计算机可执行指令被一个或多个处理器执行时,使得处理器执行高动态范围HDR图像生成方法的操作。
一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行高动态范围HDR图像生成方法。
本申请实施例所使用的对存储器、存储、数据库或其它介质的任何引用可包括非易失性和/或易失性存储器。合适的非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM),它用作外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (20)

  1. 一种高动态范围HDR图像生成方法,其特征在于,包括:
    在通过第一摄像头对拍摄场景进行预览时,通过至少两个第二摄像头分别对所述拍摄场景进行拍摄生成目标原始图像;
    根据所述目标原始图像得到所述拍摄场景的亮度全息数据;
    根据所述拍摄场景的亮度全息数据确定至少两组目标曝光参数,将所述第一摄像头的曝光参数分别配置为所述至少两组目标曝光参数,并分别通过配置后的第一摄像头对所述拍摄场景进行拍摄生成至少两张目标图像;及
    将所述至少两张目标图像进行合成得到HDR图像。
  2. 根据权利要求1所述的方法,其特征在于,所述通过至少两个第二摄像头分别对所述拍摄场景进行拍摄生成目标原始图像,包括:
    从所述至少两个第二摄像头中任意选取一个摄像头,通过所述摄像头连续采用不同的曝光参数拍摄得到不同的目标原始图像。
  3. 根据权利要求1所述的方法,其特征在于,所述通过至少两个第二摄像头分别对所述拍摄场景进行拍摄生成目标原始图像,包括:
    通过至少两个第二摄像头分别对所述拍摄场景进行过曝或欠曝拍摄生成目标原始图像。
  4. 根据权利要求1所述的方法,其特征在于,所述目标原始图像包括第一目标原始图像、第二目标原始图像及第三目标原始图像;
    所述通过至少两个第二摄像头分别对所述拍摄场景进行拍摄生成目标原始图像,包括:
    通过所述至少两个第二摄像头中的任意一个第二摄像头按照预设曝光参数对所述拍摄场景进行拍摄生成第一目标原始图像;
    通过所述至少两个第二摄像头中的任意一个第二摄像头按照相对于所述预设曝光参数过曝的参数对所述拍摄场景进行拍摄生成原始图像,当检测到所述原始图像中所展示的所述拍摄场景中的暗区满足预设要求,则获取所述原始图像作为第二目标原始图像;及
    通过所述至少两个第二摄像头中的任意一个第二摄像头按照相对于所述预设曝光参数欠曝的参数对所述拍摄场景进行拍摄生成原始图像,当检测到所述原始图像中所展示的所述拍摄场景中的亮区满足预设要求,则获取所述原始图像作为第三目标原始图像。
  5. 根据权利要求4所述的方法,其特征在于,所述通过所述至少两个第二摄像头中的任意一个第二摄像头按照相对于所述预设曝光参数过曝的参数对所述拍摄场景进行拍摄生成原始图像,当检测到所述原始图像中所展示的所述拍摄场景中的暗区满足预设要求,则获取所述原始图像作为第二目标原始图像,包括:
    按照预设间隔获取相对于所述预设曝光参数过曝的参数,作为当前曝光参数;
    将所述至少两个第二摄像头中的任意一个第二摄像头的曝光参数配置为所述当前曝光参数;
    通过配置后的所述第二摄像头对所述拍摄场景进行拍摄生成原始图像;
    判断所述原始图像中所展示的所述拍摄场景中的暗区是否满足预设要求,当判断结果为是则获取所述原始图像作为第二目标原始图像;及
    当判断结果为否,则返回至按照所述预设区间获取相对于所述当前曝光参数过曝的参数,作为新的当前曝光参数的循环,直至获取到第二目标原始图像。
  6. 根据权利要求4所述的方法,其特征在于,所述通过所述至少两个第二摄像头中的任意一个第二摄像头按照相对于所述预设曝光参数欠曝的参数对所述拍摄场景进行拍摄生成原始图像,当检测到所述原始图像中所展示的所述拍摄场景中的亮区满足预设要求,则获取所述原始图像作为第三目标原始图像,包括:
    按照预设间隔获取相对于所述预设曝光参数欠曝的参数,作为当前曝光参数;
    将所述至少两个第二摄像头中的任意一个第二摄像头的曝光参数配置为所述当前曝光参数;
    通过配置后的所述第二摄像头对所述拍摄场景进行拍摄生成原始图像;
    判断所述原始图像中所展示的所述拍摄场景中的亮区是否满足预设要求,当判断结果为是则获取所述原始图像作为第三目标原始图像;及
    当判断结果为否,则返回至按照所述预设区间获取相对于所述当前曝光参数欠曝的参数,作为新的当前曝光参数的循环,直至获取到第三目标原始图像。
  7. 根据权利要求1所述的方法,其特征在于,所述通过至少两个第二摄像头分别对所述拍摄场景进行拍摄生成目标原始图像,包括:
    同时通过至少两个第二摄像头分别对所述拍摄场景进行拍摄生成目标原始图像。
  8. 根据权利要求1所述的方法,其特征在于,所述根据所述目标原始图像得到所述拍摄场景的亮度全息数据,包括:
    获取所述目标原始图像中每一张目标原始图像的亮度分布数据;及
    根据所述每一张目标原始图像的亮度分布数据合成所述拍摄场景的亮度全息数据。
  9. 根据权利要求4所述的方法,其特征在于,所述根据所述拍摄场景的亮度全息数据确定至少两组目标曝光参数,将所述第一摄像头的曝光参数分别配置为所述至少两组目标曝光参数,并分别通过配置后的第一摄像头对所述拍摄场景进行拍摄生成至少两张目标图像,包括:
    根据所述拍摄场景的亮度全息数据确定至少两组目标曝光参数,所述至少两组目标曝光参数包括正常曝光参数、过曝曝光参数及欠爆曝光参数;
    将所述第一摄像头的曝光参数配置为所述正常曝光参数,通过配置后的第一摄像头对所述拍摄场景进行拍摄生成第一目标图像;
    将所述第一摄像头的曝光参数配置为所述过曝曝光参数,通过配置后的第一摄像头对所述拍摄场景进行拍摄生成第二目标图像;及
    将所述第一摄像头的曝光参数配置为所述欠爆曝光参数,通过配置后的第一摄像头对所述拍摄场景进行拍摄生成第三目标图像。
  10. 根据权利要求4所述的方法,其特征在于,所述根据所述拍摄场景的亮度全息数据确定至少两组目标曝光参数,将所述第一摄像头的曝光参数分别配置为所述至少两组目标曝光参数,并分别通过配置后的第一摄像头对所述拍摄场景进行拍摄生成至少两张目标图像,包括:
    根据所述拍摄场景的亮度全息数据确定至少两组目标曝光参数,所述至少两组目标曝光参数包括正常曝光参数、过曝曝光参数及欠爆曝光参数;
    对所述过曝曝光参数及所述欠爆曝光参数进行调整;
    将所述第一摄像头的曝光参数配置为所述正常曝光参数,通过配置后的第一摄像头对所述拍摄场景进行拍摄生成第一目标图像;
    将所述第一摄像头的曝光参数配置为调整后的过曝曝光参数,通过配置后的第一摄像头对所述拍摄场景进行拍摄生成第二目标图像;及
    将所述第一摄像头的曝光参数配置为调整后的欠爆曝光参数,通过配置后的第一摄像头对所述拍摄场景进行拍摄生成第三目标图像。
  11. 根据权利要求10所述的方法,其特征在于,所述对所述过曝曝光参数及所述欠爆曝光参数进行调整,包括:
    根据对比强烈与否或光比需求对所述过曝曝光参数及所述欠爆曝光参数进行调整。
  12. 根据权利要求1至11中任意一项所述的方法,其特征在于,所述正常曝光参数为所述预设曝光参数,所述过曝曝光参数为生成所述第二目标原始图像的曝光参数,所述 欠爆曝光参数为生成所述第三目标原始图像的曝光参数。
  13. 根据权利要求12所述的方法,其特征在于,所述预设曝光参数为根据拍摄场景所匹配的曝光参数。
  14. 一种高动态范围HDR图像生成装置,其特征在于,包括:
    目标原始图像生成模块,用于在通过第一摄像头对拍摄场景进行预览时,通过至少两个第二摄像头分别对所述拍摄场景进行拍摄生成目标原始图像;
    亮度全息数据获取模块,用于根据所述目标原始图像得到所述拍摄场景的亮度全息数据;
    目标图像生成模块,用于根据所述拍摄场景的亮度全息数据确定至少两组目标曝光参数,将所述第一摄像头的曝光参数分别配置为所述至少两组目标曝光参数,并分别通过配置后的第一摄像头对所述拍摄场景进行拍摄生成至少两张目标图像;及
    HDR图像合成模块,用于将所述至少两张目标图像进行合成得到HDR图像。
  15. 根据权利要求14所述的装置,其特征在于,所述目标原始图像生成模块,还用于从所述至少两个第二摄像头中任意选取一个摄像头,通过所述摄像头连续采用不同的曝光参数拍摄得到不同的目标原始图像。
  16. 根据权利要求14所述的装置,其特征在于,所述目标原始图像生成模块,还用于通过至少两个第二摄像头分别对所述拍摄场景进行过曝或欠曝拍摄生成目标原始图像。
  17. 根据权利要求14所述的装置,其特征在于,所述目标原始图像包括第一目标原始图像、第二目标原始图像及第三目标原始图像;所述目标原始图像生成模块,包括:
    第一目标原始图像生成单元,用于通过至少两个第二摄像头中的任意一个第二摄像头按照预设曝光参数对拍摄场景进行拍摄生成第一目标原始图像;
    第二目标原始图像生成单元,用于通过至少两个第二摄像头中的任意一个第二摄像头按照相对于预设曝光参数过曝的参数对拍摄场景进行拍摄生成原始图像,当检测到原始图像中所展示的拍摄场景中的暗区满足预设要求,则获取原始图像作为第二目标原始图像;
    第三目标原始图像生成单元,用于通过至少两个第二摄像头中的任意一个第二摄像头按照相对于预设曝光参数欠曝的参数对拍摄场景进行拍摄生成原始图像,当检测到原始图像中所展示的拍摄场景中的亮区满足预设要求,则获取原始图像作为第三目标原始图像。
  18. 根据权利要求17所述的装置,其特征在于,第二目标原始图像生成单元,还用于按照预设间隔获取相对于预设曝光参数过曝的参数,作为当前曝光参数;将至少两个第二摄像头中的任意一个第二摄像头的曝光参数配置为当前曝光参数;通过配置后的第二摄像头对拍摄场景进行拍摄生成原始图像;判断原始图像中所展示的拍摄场景中的暗区是否满足预设要求,若是则获取原始图像作为第二目标原始图像;若否,则返回至按照预设区间获取相对于当前曝光参数过曝的参数,作为新的当前曝光参数的循环,直至获取到第二目标原始图像。
  19. 一种电子设备,包括存储器及处理器,其特征在于,所述存储器中储存有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如权利要求1至13中任一项所述的高动态范围HDR图像生成方法的操作。
  20. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至13中任一项所述的方法的操作。
PCT/CN2020/090803 2019-06-06 2020-05-18 高动态范围hdr图像生成方法和装置、电子设备、计算机可读存储介质 WO2020244374A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP20818577.7A EP3975547A4 (en) 2019-06-06 2020-05-18 METHOD AND APPARATUS FOR GENERATION OF HIGH DYNAMIC RANGE (HDR) IMAGE, AND ELECTRONIC DEVICE AND COMPUTER READABLE STORAGE MEDIUM
US17/541,394 US20220094838A1 (en) 2019-06-06 2021-12-03 Method, Electronic Device and Computer-Readable Storage Medium for Generating a High Dynamic Range Image

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910492947.1A CN110166705B (zh) 2019-06-06 2019-06-06 高动态范围hdr图像生成方法和装置、电子设备、计算机可读存储介质
CN201910492947.1 2019-06-06

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/541,394 Continuation US20220094838A1 (en) 2019-06-06 2021-12-03 Method, Electronic Device and Computer-Readable Storage Medium for Generating a High Dynamic Range Image

Publications (1)

Publication Number Publication Date
WO2020244374A1 true WO2020244374A1 (zh) 2020-12-10

Family

ID=67628230

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/090803 WO2020244374A1 (zh) 2019-06-06 2020-05-18 高动态范围hdr图像生成方法和装置、电子设备、计算机可读存储介质

Country Status (4)

Country Link
US (1) US20220094838A1 (zh)
EP (1) EP3975547A4 (zh)
CN (1) CN110166705B (zh)
WO (1) WO2020244374A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112887593A (zh) * 2021-01-13 2021-06-01 浙江大华技术股份有限公司 图像获取方法及装置

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110166705B (zh) * 2019-06-06 2021-04-23 Oppo广东移动通信有限公司 高动态范围hdr图像生成方法和装置、电子设备、计算机可读存储介质
CN110958400B (zh) * 2019-12-13 2021-11-23 上海海鸥数码照相机有限公司 一种连续拍摄的照片曝光量一致的系统、方法及装置
CN111147753B (zh) * 2019-12-31 2022-01-28 维沃移动通信有限公司 照片处理的方法、电子设备及介质
CN112492208B (zh) * 2020-11-30 2022-03-22 维沃移动通信有限公司 拍摄方法和电子设备
CN113905194A (zh) * 2021-08-31 2022-01-07 浙江大华技术股份有限公司 一种曝光比处理方法、终端设备及计算机存储介质

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120242867A1 (en) * 2011-03-25 2012-09-27 Shuster Gary S Simulated Large Aperture Lens
CN103973989A (zh) * 2014-04-15 2014-08-06 北京理工大学 获取高动态图像的方法及系统
CN106331510A (zh) * 2016-10-31 2017-01-11 维沃移动通信有限公司 一种逆光拍照方法及移动终端
CN107040726A (zh) * 2017-04-19 2017-08-11 宇龙计算机通信科技(深圳)有限公司 双摄像头同步曝光方法及系统
CN108200351A (zh) * 2017-12-21 2018-06-22 深圳市金立通信设备有限公司 拍摄方法、终端及计算机可读介质
CN108337446A (zh) * 2018-04-12 2018-07-27 Oppo广东移动通信有限公司 基于双摄像头的高动态范围图像获取方法、装置及设备
CN108683862A (zh) * 2018-08-13 2018-10-19 Oppo广东移动通信有限公司 成像控制方法、装置、电子设备及计算机可读存储介质
CN109218626A (zh) * 2018-11-23 2019-01-15 维沃移动通信有限公司 一种拍照方法及终端
CN110166705A (zh) * 2019-06-06 2019-08-23 Oppo广东移动通信有限公司 高动态范围hdr图像生成方法和装置、电子设备、计算机可读存储介质

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6660989B2 (en) * 2001-07-11 2003-12-09 Texas Instruments Incorporated CMOS imager having asynchronous pixel readout in order of pixel illumination
CN103428410B (zh) * 2012-05-17 2016-08-31 华晶科技股份有限公司 影像撷取装置及其影像合成方法
CN106161967B (zh) * 2016-09-13 2020-03-17 维沃移动通信有限公司 一种逆光场景全景拍摄方法及移动终端
CN108090887B (zh) * 2016-11-23 2020-09-04 杭州海康威视数字技术股份有限公司 一种视频图像处理方法及装置
US20180352154A1 (en) * 2017-06-02 2018-12-06 Htc Corporation Image processing method, electronic device, and non-transitory computer readable storage medium
US10498971B2 (en) * 2017-11-03 2019-12-03 Qualcomm Incorporated Systems and methods for high-dynamic range imaging
CN108337445B (zh) * 2018-03-26 2020-06-26 华为技术有限公司 拍照方法、相关设备及计算机存储介质
CN108337449A (zh) * 2018-04-12 2018-07-27 Oppo广东移动通信有限公司 基于双摄像头的高动态范围图像获取方法、装置及设备
KR20200101207A (ko) * 2019-02-19 2020-08-27 삼성전자주식회사 복수의 카메라들을 이용하여 이미지의 배율을 변경하기 위한 전자 장치 및 방법

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120242867A1 (en) * 2011-03-25 2012-09-27 Shuster Gary S Simulated Large Aperture Lens
CN103973989A (zh) * 2014-04-15 2014-08-06 北京理工大学 获取高动态图像的方法及系统
CN106331510A (zh) * 2016-10-31 2017-01-11 维沃移动通信有限公司 一种逆光拍照方法及移动终端
CN107040726A (zh) * 2017-04-19 2017-08-11 宇龙计算机通信科技(深圳)有限公司 双摄像头同步曝光方法及系统
CN108200351A (zh) * 2017-12-21 2018-06-22 深圳市金立通信设备有限公司 拍摄方法、终端及计算机可读介质
CN108337446A (zh) * 2018-04-12 2018-07-27 Oppo广东移动通信有限公司 基于双摄像头的高动态范围图像获取方法、装置及设备
CN108683862A (zh) * 2018-08-13 2018-10-19 Oppo广东移动通信有限公司 成像控制方法、装置、电子设备及计算机可读存储介质
CN109218626A (zh) * 2018-11-23 2019-01-15 维沃移动通信有限公司 一种拍照方法及终端
CN110166705A (zh) * 2019-06-06 2019-08-23 Oppo广东移动通信有限公司 高动态范围hdr图像生成方法和装置、电子设备、计算机可读存储介质

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112887593A (zh) * 2021-01-13 2021-06-01 浙江大华技术股份有限公司 图像获取方法及装置

Also Published As

Publication number Publication date
CN110166705B (zh) 2021-04-23
EP3975547A4 (en) 2022-11-30
EP3975547A1 (en) 2022-03-30
CN110166705A (zh) 2019-08-23
US20220094838A1 (en) 2022-03-24

Similar Documents

Publication Publication Date Title
WO2020244374A1 (zh) 高动态范围hdr图像生成方法和装置、电子设备、计算机可读存储介质
JP7371081B2 (ja) 夜景撮影方法、装置、電子機器および記憶媒体
CN110225248B (zh) 图像采集方法和装置、电子设备、计算机可读存储介质
CN109089047B (zh) 控制对焦的方法和装置、存储介质、电子设备
CN110072051B (zh) 基于多帧图像的图像处理方法和装置
CN110445988B (zh) 图像处理方法、装置、存储介质及电子设备
WO2020168967A1 (zh) 图像采集方法、电子设备和计算机可读存储介质
WO2020029732A1 (zh) 全景拍摄方法、装置和成像设备
CN110072052B (zh) 基于多帧图像的图像处理方法、装置、电子设备
CN110198417A (zh) 图像处理方法、装置、存储介质及电子设备
CN111684788A (zh) 一种图像处理的方法和装置
CN107846556B (zh) 成像方法、装置、移动终端和存储介质
JP6605629B2 (ja) 撮影方法及び装置
CN108337446B (zh) 基于双摄像头的高动态范围图像获取方法、装置及设备
CN110213502B (zh) 图像处理方法、装置、存储介质及电子设备
WO2015117397A1 (zh) 一种拍照方法、装置及设备
CN110213498B (zh) 图像生成方法和装置、电子设备、计算机可读存储介质
CN110430370B (zh) 图像处理方法、装置、存储介质及电子设备
CN110290325B (zh) 图像处理方法、装置、存储介质及电子设备
CN110049240B (zh) 摄像头控制方法、装置、电子设备和计算机可读存储介质
CN110177212B (zh) 图像处理方法和装置、电子设备、计算机可读存储介质
CN110266966A (zh) 图像生成方法和装置、电子设备、计算机可读存储介质
CN110392211B (zh) 图像处理方法和装置、电子设备、计算机可读存储介质
CN115278069A (zh) 图像处理方法及装置、计算机可读存储介质、终端
CN110012227B (zh) 图像处理方法、装置、存储介质及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20818577

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2020818577

Country of ref document: EP

Effective date: 20211221