WO2015192545A1 - Photographing method and apparatus and computer storage medium - Google Patents

Photographing method and apparatus and computer storage medium Download PDF

Info

Publication number
WO2015192545A1
WO2015192545A1 PCT/CN2014/088191 CN2014088191W WO2015192545A1 WO 2015192545 A1 WO2015192545 A1 WO 2015192545A1 CN 2014088191 W CN2014088191 W CN 2014088191W WO 2015192545 A1 WO2015192545 A1 WO 2015192545A1
Authority
WO
WIPO (PCT)
Prior art keywords
exposure
area
picture
normal
values
Prior art date
Application number
PCT/CN2014/088191
Other languages
French (fr)
Chinese (zh)
Inventor
李黎国
李振华
张文娜
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2015192545A1 publication Critical patent/WO2015192545A1/en

Links

Images

Classifications

    • GPHYSICS
    • G03PHOTOGRAPHY; CINEMATOGRAPHY; ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ELECTROGRAPHY; HOLOGRAPHY
    • G03BAPPARATUS OR ARRANGEMENTS FOR TAKING PHOTOGRAPHS OR FOR PROJECTING OR VIEWING THEM; APPARATUS OR ARRANGEMENTS EMPLOYING ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ACCESSORIES THEREFOR
    • G03B15/00Special procedures for taking photographs; Apparatus therefor

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, and a computer storage medium for photographing.
  • the flash light as an important fill light module for taking pictures under low light, is becoming more and more important.
  • the pre-flash phase calculates an exposure value (AE, Auto Exposure) of the photometric target (the subject to be photographed) under the luminance of the pre-flashed LED.
  • AE Exposure
  • the main flash the AE value at the main flash is directly obtained based on the difference in brightness directly from the pre-flash.
  • the pre-flash and main flash LED current values are fixed, that is to say, the brightness value is fixed. Due to the addition of the pre-flash process, the metering target can ensure that the AE converges to normal during the pre-flash phase, that is, the exposure value on the metering target is just right. Thus, since the difference between the pre-flash and the main luminance values is determined, it is ensured that the metering target AE at the main flash is just right, so that a good quality photograph can be taken.
  • the fill light of the flash has a large difference in the reflection of the close-up and the distant view. It is difficult to make the exposure of the close-up and the distant view just right when photographing: if the close-up brightness is normal, the foreground will be black, and if the brightness of the foreground is normal, the close-up There will be overexposure.
  • the embodiments of the present invention are directed to a method, a device, and a computer storage medium for solving a photo in the prior art.
  • the difference in the reflection of the scene is large, and the brightness of the picture taken by the flash is not uniform.
  • the embodiment of the present invention is mainly implemented by the following technical solutions:
  • An embodiment of the present invention provides a method for photographing, the method comprising:
  • the exposure values of the normal exposure area, the overexposed area and the underexposed area determined during the pre-flash are respectively converged to be normal, to obtain three pictures of different exposure values;
  • the method before the exposing the exposure values of the normal exposure area, the overexposed area, and the underexposed area determined at the pre-flash, respectively, the method further includes:
  • the method further includes:
  • the exposure values of the normal exposure area, the overexposed area, and the underexposed area are respectively converge to normal to obtain three pictures of different exposure values;
  • the preset unit is any one of N*N block regions pre-divided by the effective photosensitive area of the photosensitive device.
  • the exposure values of the normal exposure area, the overexposed area, and the underexposed area determined during the pre-flash are respectively converged to obtain three pictures of different exposure values, including:
  • the exposure value converges based on the underexposed area, so that the exposure value of the underexposed area converges normally, and an underexposed picture is obtained.
  • the area in which the exposure values of the three different exposure values converge normally is combined into one picture, including:
  • the embodiment of the invention further provides a device for photographing, the device comprising:
  • the convergence module is configured to converge the exposure values of the normal exposure area, the overexposed area and the underexposed area determined during the pre-flash to the normal flash to obtain three pictures of different exposure values;
  • the processing module is configured to synthesize a region in which the exposure values of the three different exposure values obtained by the convergence module converge to a normal picture into one picture.
  • the device further includes: a recording module and a setting module;
  • the recording module is configured to record an exposure value of each preset unit in the effective exposure area under pre-flash;
  • the setting module is configured to determine the normal exposure area, the overexposed area, and the underexposed area according to an exposure value of each preset unit recorded by the recording module, wherein the preset unit is a photosensitive device
  • the effective photosensitive area is pre-divided into any one of the N*N block areas.
  • the device further includes: a calculation module and a determination module;
  • the calculating module is configured to separately calculate a square of a difference between an exposure value of each of the preset units and a preset value of a pre-flash of a preset unit when previewing, and a difference value of exposure values of all preset units Square summation, get the accumulated value;
  • the determining module is configured to trigger the convergence module when determining that the accumulated value is greater than a preset threshold
  • the preset unit is any one of N*N block regions pre-divided by the effective photosensitive area of the photosensitive device.
  • the convergence module is further configured to: when the flash main flashes, the exposure value is converge based on the normal exposure area, so that the exposure value of the normal exposure area converges normally, and a normal exposure picture is obtained; Exposing the exposure value to make the exposure value converge, so that the exposure value of the overexposed area converges normally, and the overexposed picture is obtained; the exposure value converges based on the underexposed area, so that the exposure value of the underexposed area converges normally, and the underexposure is obtained. image.
  • the processing module includes: a setting submodule and a computing submodule;
  • the setting sub-module is configured to set weights of respective corresponding pixel points according to exposure values of respective preset units in the normal exposure picture, the over-exposed picture, and the under-exposed picture;
  • the calculation sub-module is configured to perform weighted averaging of the corresponding YUV information of each of the pixel points according to the weight of the pixel points set by the setting sub-module, and integrate the processing into one picture.
  • the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the foregoing photographing method.
  • the embodiment of the present invention processes the overexposed area and the underexposed area in the preflash to be normal Exposure value area, and re-integration of the processed area, finally making the brightness of the picture taken by the flash more uniform, thus effectively solving the difference in the prior art due to the difference in the reflection of the flash light to the close-range and the distant view.
  • FIG. 1 is a flowchart of a method for photographing according to an embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of a device for photographing according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of another apparatus for photographing according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of still another apparatus for photographing according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of still another apparatus for photographing according to an embodiment of the present invention.
  • the main purpose of the embodiments of the present invention is to provide a method, a device, and a computer storage medium for photographing.
  • the exposure values of the normal exposure area, the overexposed area, and the underexposed area of the preflash are respectively converged normally, and Three images of different exposure values, and the areas in which the exposure values of the three different exposure values converge normally are combined into a more uniform picture. In this way, the distant view and the close-up view in the picture are clear, which greatly improves the photo effect of the flash.
  • the technical solutions of the present invention will be described in detail below through several specific embodiments.
  • An embodiment of the present invention provides a method for photographing. Referring to FIG. 1, the method includes:
  • the exposure value AE of the target area (the target being photographed) is made to converge normally, thereby determining the normal exposure area, the overexposed area, and the underexposed area
  • the flash main flashes according to the preflash a normal exposure area, an overexposed area, and an underexposed area respectively converge the exposure values of the normal exposure area, the overexposed area, and the underexposed area to obtain three pictures of different exposure values;
  • the normal exposure area in the embodiment of the present invention is a block area in the picture obtained by normalizing the exposure value of the target area, and the overexposed area and the underexposed area are defined with respect to the exposure value of the normal exposure area.
  • the overexposed area and the underexposed area in the preflash are processed into a normal exposure value area, and the processed area is re-integrated, thereby finally obtaining a picture with more uniform brightness, thereby greatly improving the image.
  • the photo effect of the flash is not limited to the embodiment of the present invention.
  • the terminal in the embodiment of the present invention may be a mobile phone, a notebook or a tablet computer or the like that performs photographing by a flash.
  • the step of determining the normal exposure area, the overexposed area, and the underexposed area in the embodiment of the present invention specifically includes: recording the exposure values of each preset unit in the effective exposure area under the pre-flashing under the normal condition of AE convergence; according to each preset The exposure value of the unit determines the normal exposure area, the overexposed area, and the underexposed area, wherein the predetermined unit is a pre-divided N*N (N is a positive integer) block of the photosensitive photosensitive area of the photosensitive device Any area in the area.
  • the embodiment of the present invention divides the effective photosensitive area of the photosensitive device into N*N block areas in advance, and the preset unit is any one of the N*N block areas, and pre-flashes, so that the exposure value AE of the target area converges normally. And recording the exposure values of the respective preset units, and determining the normal exposure area, the overexposed area, and the underexposed area according to the exposure values of the respective preset units pre-flashed.
  • the effective exposure regions of the embodiments of the present invention include a normal exposure region, an overexposed region, and an underexposed region.
  • the method of the embodiment of the present invention further includes: respectively calculating a difference between an exposure value of each preset unit and an exposure value of a corresponding preset unit pre-flash when previewing (previewing a state of the pre-flash front terminal) Squared, and summed the square of the difference of the exposure values of all the preset units to obtain an accumulated value;
  • the accumulated value is less than the preset threshold, it indicates that the flash does not substantially function as a fill light, and the picture output of the overexposed area and the underexposed area is not performed;
  • the exposure values of the normal exposure area, the overexposed area, and the underexposed area are respectively converged to obtain three pictures of different exposure values;
  • the preset unit is any one of N*N block regions pre-divided by the effective photosensitive area of the photosensitive device.
  • the embodiment of the present invention first obtains the square of the difference between the exposure value of the preview of all the preset units and the exposure value of the pre-flash, and then accumulates the square of the difference of the exposure values of all the preset units to obtain An accumulated value is compared with a preset threshold to further determine whether to output three pictures of different exposure values.
  • the exposure values of the normal exposure area, the overexposed area, and the underexposed area are respectively condensed to be normal, and the step of obtaining three pictures of different exposure values specifically includes:
  • the exposure value is condensed based on the normal exposure area, so that the exposure value of the normal exposure area converges normally, and a normal exposure picture is obtained, that is, a picture with a clear target area is obtained.
  • the exposure value converges based on the overexposed area, so that the exposure value of the overexposed area converges normally, and an overexposed picture is obtained, that is, a picture with a clear overexposed area is obtained, in which case the normal exposed area and the underexposed area may not be clear. .
  • the step of synthesizing the regions in which the exposure values of the three different exposure values are normalized into one picture comprises:
  • the weight of the pixel corresponding to the preset unit in which the exposure value in the picture is converged is set to be high, and the weight of the pixel corresponding to the preset unit in which the exposure value of the picture is not converged is low, and then
  • the corresponding YUV information of the pixel points are respectively weighted and averaged, and further synthesized into a picture with more uniform brightness.
  • the method of calculating the weighted average of the YUV information of the i-th pixel is as follows:
  • Y i (aY iH + b Y iM + c Y iL ) / a + b + c;
  • V i (aV iH +b V iM +c V iL )/a+b+c;
  • H represents an overexposed picture
  • M represents an exposure normal picture
  • L represents an underexposed picture
  • the YUV information of the i-th pixel point is obtained, and so on, the YUV information of all the pixel points in the picture is obtained, thereby obtaining a picture with uniform final brightness.
  • the above method for calculating the YUV information of the picture is only a specific example for better understanding of the present invention, and those skilled in the art may also use the other algorithms to perform the above three sheets.
  • the image is processed as long as the final processed image is made clearer.
  • FIG. 2 is a flowchart of another method for photographing according to an embodiment of the present invention. The following describes the embodiment of the present invention in detail with reference to FIG. 2:
  • the camera flash mode is set to the Auto mode, determine whether the current environment needs to open the flash, and if necessary, turn on the flash. If the camera flash mode is set to the On mode, the flash is directly turned on when photographing;
  • the pre-flash current value is fixed, and the target area is exposed as an exposure object, and the exposure values of each preset unit are respectively calculated, and the normal exposure area, the overexposed area, and the underexposure are determined according to the exposure values of the respective preset units in the preflash.
  • S204 the main flash of the flash, and three images are respectively output based on the exposure values during the pre-flash, respectively: a normal exposure picture, an overexposed picture, and an underexposed picture;
  • the AE value at the main flash can be calculated, and the main flash is based on the pre-flash.
  • the normal exposure area, the overexposed area and the underexposed area respectively converge the exposure values of the normal exposure area, the overexposed area and the underexposed area to obtain three pictures of different exposure values;
  • the exposure value is condensed based on the normal exposure area, so that the exposure value of the normal exposure area converges normally, and a normal exposure picture is obtained; and the exposure value is condensed based on the over-exposed area. So that the exposure value of the overexposed area converges normally, and an overexposed picture is obtained; the exposure value converges based on the underexposed area, so that the exposure value of the underexposed area converges normally, and an underexposed picture is obtained;
  • the regions in which the exposure values of the three different exposure values converge normally are combined into one picture, specifically, according to the preset positions of the normal exposure picture, the overexposed picture, and the underexposed picture, respectively.
  • the exposure value sets the weight of each corresponding pixel point, and weights the corresponding YUV information of each of the pixel points to form a picture.
  • the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the foregoing photographing method.
  • An embodiment of the present invention further provides a device for photographing.
  • the device includes: a convergence module 11 and a processing module 12 connected to each other;
  • the convergence module 11 is configured to converge the exposure values of the normal exposure area, the overexposed area and the underexposed area determined during the preflash to the normal flash to obtain three pictures of different exposure values;
  • the processing module 12 is configured to combine the regions in which the exposure values of the three different exposure values obtained by the convergence module 11 converge to a normal picture into one picture.
  • FIG. 4 is a schematic structural diagram of another apparatus for photographing according to an embodiment of the present invention. As shown in FIG. 4, FIG. 4 is a preferred apparatus according to an embodiment of the present invention, and the apparatus further includes Recording module 13 and setting module 14;
  • the setting module 14 determines the normal exposure area, the overexposed area, and the underexposed area according to the exposure values of the respective preset units recorded by the recording module 13, wherein the preset unit is Any one of the N*N block regions pre-divided by the effective photosensitive area of the photosensitive device.
  • FIG. 5 is a schematic structural diagram of still another apparatus for photographing according to an embodiment of the present invention. As shown in FIG. 5, FIG. 5 is a preferred apparatus according to an embodiment of the present invention.
  • the device further includes a calculation module 15 and a determination module 16;
  • the calculating module 15 respectively calculates the square of the difference between the exposure value of each preset unit and the exposure value of the corresponding preset unit pre-flash when previewing, and the square of the difference between the exposure values of all the preset units Summing, getting the accumulated value;
  • the convergence module 11 is triggered;
  • the convergence module 11 is configured to converge the exposure value based on the normal exposure area, the overexposed area, and the underexposed area according to the pre-flash, when the main flash is flashed, so that the normal exposure area is The exposure value converges normally, and a normal exposure picture is obtained; the exposure value converges based on the overexposed area, so that the exposure value of the overexposed area converges normally, and an overexposed picture is obtained; and the exposure value converges based on the underexposed area, so that The exposure value of the underexposed area converges normally, and an underexposed picture is obtained.
  • FIG. 6 is a schematic structural diagram of still another apparatus for photographing according to an embodiment of the present invention.
  • the processing module 12 further includes: a setting sub-module 121 and a computing sub-module 122;
  • the setting sub-module 121 sets the weights of the respective corresponding pixel points according to the exposure values of the preset units in the normal exposure picture, the over-exposed picture, and the under-exposed picture, respectively;
  • the calculation sub-module 122 performs the weighted average of the YUV information of each of the pixel points according to the weight of the pixel points set by the setting sub-module 121, and synthesizes a picture.
  • the content of the device in the embodiment of the present invention can be understood by referring to related content in the method part, and details are not described herein again.
  • the overexposed area and the underexposed area in the preflash are processed into a normal exposure value area, and the processed area is re-integrated, thereby finally obtaining a picture with uniform brightness, and the picture is made in this way.
  • the medium and long-range scenes are clear, which greatly improves the photo effect of the flash.
  • the photographing method and device and the computer storage medium provided by the embodiment of the invention converge the exposure values of the normal exposure area, the overexposed area and the underexposed area determined during the preflash to the normal flash to obtain three sheets.
  • a picture of different exposure values; the areas in which the exposure values of the three different exposure values converge normally are combined into one picture.
  • the overexposed area and the underexposed area in the preflash are processed into a normal exposure value area, and the processed area is re-integrated, and finally a picture with uniform brightness is obtained, and the picture is made in this way.
  • the medium and long-range scenes are clear, which greatly improves the photo effect of the flash.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Studio Devices (AREA)
  • Exposure Control For Cameras (AREA)

Abstract

A photographing method and apparatus and a computer storage medium. The method comprises: when a flash light enters a main-flash stage, separately converging exposure values, determined in a pre-flash stage, of a normal exposure area, an overexposure area, and an underexposure area to be normal, so as to obtain three pictures with different exposure values (S101); and synthesizing areas, with exposure values converged to be normal, in the three pictures with different exposure values into one picture (S102).

Description

拍照的方法、装置及计算机存储介质Photographing method, device and computer storage medium 技术领域Technical field
本发明涉及通信技术领域,尤其涉及一种拍照的方法、装置及计算机存储介质。The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, and a computer storage medium for photographing.
背景技术Background technique
随着各种终端相机感光器件的发展,暗光下的拍照效果越来越能体现感光器件的技术优势。而闪光灯作为弱光下拍照的重要补光模块,其地位也越发重要。With the development of various terminal camera photosensitive devices, the photo effect under the dark light can more and more reflect the technical advantages of the photosensitive device. The flash light, as an important fill light module for taking pictures under low light, is becoming more and more important.
目前终端使用闪光灯拍照时,一般分为预闪和主闪两部分。预闪阶段计算在预闪的发光二极管LED亮度下的测光目标(被拍摄的聚焦对象)的曝光值(AE,Auto Exposure)。主闪时,根据与预闪直接的亮度差异做差值直接得出主闪时的AE值。其中预闪和主闪LED电流值固定,也就是说亮度值固定,由于添加预闪流程,可以保证测光目标在预闪阶段AE收敛到正常,即保证了测光目标上的曝光值恰到好处,这样,由于预闪和主闪亮度值的差值是确定的,也就可以保证主闪时测光目标AE是恰到好处的,从而可以拍出质量良好的照片。At present, when the terminal uses the flash to take pictures, it is generally divided into two parts: pre-flash and main flash. The pre-flash phase calculates an exposure value (AE, Auto Exposure) of the photometric target (the subject to be photographed) under the luminance of the pre-flashed LED. In the main flash, the AE value at the main flash is directly obtained based on the difference in brightness directly from the pre-flash. The pre-flash and main flash LED current values are fixed, that is to say, the brightness value is fixed. Due to the addition of the pre-flash process, the metering target can ensure that the AE converges to normal during the pre-flash phase, that is, the exposure value on the metering target is just right. Thus, since the difference between the pre-flash and the main luminance values is determined, it is ensured that the metering target AE at the main flash is just right, so that a good quality photograph can be taken.
然而,闪光灯的补光对近景和远景的反光存在较大差异,拍照时难以使近景和远景的曝光程度都恰到好处:如果近景亮度正常,那么远景会出现过黑情况,而如果远景亮度正常,近景就会出现过曝情况。However, the fill light of the flash has a large difference in the reflection of the close-up and the distant view. It is difficult to make the exposure of the close-up and the distant view just right when photographing: if the close-up brightness is normal, the foreground will be black, and if the brightness of the foreground is normal, the close-up There will be overexposure.
发明内容Summary of the invention
为解决现有存在的技术问题,本发明实施例旨在提供一种拍照的方法、装置及计算机存储介质,用以解决现有技术中由于闪光灯补光对近景和远 景的反光差异较大,而使闪光灯拍出的图片亮度不均匀的问题。In order to solve the existing technical problems, the embodiments of the present invention are directed to a method, a device, and a computer storage medium for solving a photo in the prior art. The difference in the reflection of the scene is large, and the brightness of the picture taken by the flash is not uniform.
为解决上述问题,本发明实施例主要是通过以下技术方案实现的:To solve the above problem, the embodiment of the present invention is mainly implemented by the following technical solutions:
本发明实施例提供了一种拍照的方法,该方法包括:An embodiment of the present invention provides a method for photographing, the method comprising:
在闪光灯主闪时,使预闪时确定的正常曝光区域、过曝区域和曝光不足区域的曝光值分别收敛正常,以得到三张不同曝光值的图片;When the flash main flashes, the exposure values of the normal exposure area, the overexposed area and the underexposed area determined during the pre-flash are respectively converged to be normal, to obtain three pictures of different exposure values;
将该三张不同曝光值的图片中曝光值收敛正常的区域合成为一张图片。The areas in which the exposure values of the three different exposure values converge normally are combined into one picture.
上述方案中,在所述使预闪时确定的正常曝光区域、过曝区域和曝光不足区域的曝光值分别收敛正常之前,所述方法还包括:In the above solution, before the exposing the exposure values of the normal exposure area, the overexposed area, and the underexposed area determined at the pre-flash, respectively, the method further includes:
记录预闪下有效曝光区域中的各个预设单元的曝光值;Recording the exposure values of the respective preset units in the effective exposure area under the pre-flash;
根据各个预设单元的曝光值确定所述正常曝光区域、所述过曝区域和所述曝光不足区域,其中,所述预设单元为感光器件的有效感光区域预划分的N*N块区域中的任一个区域,N为正整数。Determining the normal exposure area, the overexposed area, and the underexposed area according to exposure values of respective preset units, wherein the preset unit is in an N*N block area pre-divided by an effective photosensitive area of the photosensitive device Any of the regions, N is a positive integer.
上述方案中,在使预闪时确定的正常曝光区域、过曝区域和曝光不足区域的曝光值分别收敛正常之前,所述方法还包括:In the above solution, before the exposure values of the normal exposure area, the overexposed area, and the underexposed area determined during the pre-flashing are respectively converge to normal, the method further includes:
分别计算预览时各个预设单元的曝光值与相应的预设单元预闪时的曝光值的差值的平方,并对所有预设单元的曝光值的差值的平方求和,得到累加值;Calculating, respectively, the square of the difference between the exposure value of each preset unit in the preview and the exposure value of the corresponding preset unit pre-flash, and summing the squares of the difference values of the exposure values of all the preset units to obtain an accumulated value;
相应的,当所述累加值大于预设的阈值时,使所述正常曝光区域、所述过曝区域和所述曝光不足区域的曝光值分别收敛正常,以得到三张不同曝光值的图片;Correspondingly, when the accumulated value is greater than a preset threshold, the exposure values of the normal exposure area, the overexposed area, and the underexposed area are respectively converge to normal to obtain three pictures of different exposure values;
其中,所述预设单元为感光器件的有效感光区域预划分的N*N块区域中的任一个区域。Wherein, the preset unit is any one of N*N block regions pre-divided by the effective photosensitive area of the photosensitive device.
上述方案中,所述使预闪时确定的正常曝光区域、过曝区域和曝光不足区域的曝光值分别收敛正常,以得到三张不同曝光值的图片,包括: In the above solution, the exposure values of the normal exposure area, the overexposed area, and the underexposed area determined during the pre-flash are respectively converged to obtain three pictures of different exposure values, including:
基于所述正常曝光区域做曝光值收敛,使得所述正常曝光区域的曝光值收敛正常,得到正常曝光图片;Exposing the exposure value based on the normal exposure area, so that the exposure value of the normal exposure area converges normally, and a normal exposure picture is obtained;
基于所述过曝光区域做曝光值收敛,使得所述过曝区域的曝光值收敛正常,得到过曝图片;Exposing the exposure value based on the overexposed area, so that the exposure value of the overexposed area converges normally, and an overexposed picture is obtained;
基于所述曝光不足区域做曝光值收敛,使得所述曝光不足区域的曝光值收敛正常,得到曝光不足图片。The exposure value converges based on the underexposed area, so that the exposure value of the underexposed area converges normally, and an underexposed picture is obtained.
上述方案中,所述将该三张不同曝光值的图片中曝光值收敛正常的区域合成为一张图片,包括:In the above solution, the area in which the exposure values of the three different exposure values converge normally is combined into one picture, including:
分别按照所述正常曝光图片、所述过曝图片和所述曝光不足图片中各个预设单元的曝光值设置各个相应的像素点的权重,并以此权重将各个所述像素点相应的颜色编码YUV信息分别做加权平均,整合处理为一张图片。Setting weights of respective corresponding pixel points according to exposure values of respective preset units in the normal exposure picture, the overexposed picture, and the underexposed picture, respectively, and encoding the corresponding color of each pixel point by using the weight The YUV information is weighted averaged separately and integrated into one picture.
本发明实施例还提供了一种拍照的装置,所述装置包括:The embodiment of the invention further provides a device for photographing, the device comprising:
收敛模块,配置为在闪光灯主闪时,使预闪时确定的正常曝光区域、过曝区域和曝光不足区域的曝光值分别收敛正常,以得到三张不同曝光值的图片;The convergence module is configured to converge the exposure values of the normal exposure area, the overexposed area and the underexposed area determined during the pre-flash to the normal flash to obtain three pictures of different exposure values;
处理模块,配置为将所述收敛模块得到的三张不同曝光值的图片中曝光值收敛正常的区域合成为一张图片。The processing module is configured to synthesize a region in which the exposure values of the three different exposure values obtained by the convergence module converge to a normal picture into one picture.
上述方案中,所述装置还包括:记录模块和设置模块;In the above solution, the device further includes: a recording module and a setting module;
所述记录模块,配置为记录预闪下有效曝光区域中的各个预设单元的曝光值;The recording module is configured to record an exposure value of each preset unit in the effective exposure area under pre-flash;
所述设置模块,配置为根据所述记录模块记录的各个预设单元的曝光值确定所述正常曝光区域、所述过曝区域和所述曝光不足区域,其中,所述预设单元为感光器件的有效感光区域预划分的N*N块区域中的任一个区域。 The setting module is configured to determine the normal exposure area, the overexposed area, and the underexposed area according to an exposure value of each preset unit recorded by the recording module, wherein the preset unit is a photosensitive device The effective photosensitive area is pre-divided into any one of the N*N block areas.
上述方案中,所述装置还包括:计算模块和判断模块;In the above solution, the device further includes: a calculation module and a determination module;
所述计算模块,配置为分别计算预览时各个所述预设单元的曝光值与相应的预设单元预闪时的曝光值的差值的平方,并对所有预设单元的曝光值的差值的平方求和,得到累加值;The calculating module is configured to separately calculate a square of a difference between an exposure value of each of the preset units and a preset value of a pre-flash of a preset unit when previewing, and a difference value of exposure values of all preset units Square summation, get the accumulated value;
所述判断模块,配置为当判断所述累加值大于预设的阈值时,触发所述收敛模块;The determining module is configured to trigger the convergence module when determining that the accumulated value is greater than a preset threshold;
其中,所述预设单元为感光器件的有效感光区域预划分的N*N块区域中的任一个区域。Wherein, the preset unit is any one of N*N block regions pre-divided by the effective photosensitive area of the photosensitive device.
上述方案中,所述收敛模块还配置为,在闪光灯主闪时,基于所述正常曝光区域做曝光值收敛,使得所述正常曝光区域的曝光值收敛正常,得到正常曝光图片;基于所述过曝光区域做曝光值收敛,使得所述过曝区域的曝光值收敛正常,得到过曝图片;基于所述曝光不足区域做曝光值收敛,使得所述曝光不足区域的曝光值收敛正常,得到曝光不足图片。In the above solution, the convergence module is further configured to: when the flash main flashes, the exposure value is converge based on the normal exposure area, so that the exposure value of the normal exposure area converges normally, and a normal exposure picture is obtained; Exposing the exposure value to make the exposure value converge, so that the exposure value of the overexposed area converges normally, and the overexposed picture is obtained; the exposure value converges based on the underexposed area, so that the exposure value of the underexposed area converges normally, and the underexposure is obtained. image.
上述方案中,所述处理模块包括:设置子模块和计算子模块;In the above solution, the processing module includes: a setting submodule and a computing submodule;
所述设置子模块,配置为分别按照所述正常曝光图片、所述过曝图片和所述曝光不足图片中各个预设单元的曝光值设置各个相应的像素点的权重;The setting sub-module is configured to set weights of respective corresponding pixel points according to exposure values of respective preset units in the normal exposure picture, the over-exposed picture, and the under-exposed picture;
所述计算子模块,配置为按照所述设置子模块设置的所述像素点的权重,以此权重将各个所述像素点相应的YUV信息分别做加权平均,整合处理为一张图片。The calculation sub-module is configured to perform weighted averaging of the corresponding YUV information of each of the pixel points according to the weight of the pixel points set by the setting sub-module, and integrate the processing into one picture.
本发明实施例还提供了一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行前述的拍照方法。The embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the foregoing photographing method.
本发明实施例有益效果如下:The beneficial effects of the embodiments of the present invention are as follows:
本发明实施例通过将预闪中的过曝区域和曝光不足区域处理为正常的 曝光值区域,并将处理后的区域进行重新整合,最终使闪光灯拍出的图片亮度更均匀,从而有效解决了现有技术中由于闪光灯补光对近景和远景的反光差异较大,而使闪光灯拍出的图片亮度不均匀的问题。The embodiment of the present invention processes the overexposed area and the underexposed area in the preflash to be normal Exposure value area, and re-integration of the processed area, finally making the brightness of the picture taken by the flash more uniform, thus effectively solving the difference in the prior art due to the difference in the reflection of the flash light to the close-range and the distant view. The problem of uneven brightness of the pictures taken.
本发明的其他特征和优点将在随后的说明书中阐述,并且部分的从说明书中变得显而易见,或者通过实施本发明而了解。本发明的目的和其他优点可通过在所写的说明书、权利要求书、以及附图中所特别指出的结构来实现和获得。Other features and advantages of the invention will be set forth in the description in the description which follows. The objectives and other advantages of the invention may be realized and obtained by means of the structure particularly pointed in the appended claims.
附图说明DRAWINGS
图1为本发明实施例的拍照的方法的流程图;1 is a flowchart of a method for photographing according to an embodiment of the present invention;
图2为本发明实施例的另一种拍照的方法的流程图;2 is a flowchart of another method for photographing according to an embodiment of the present invention;
图3为本发明实施例的一种拍照的装置的结构示意图;FIG. 3 is a schematic structural diagram of a device for photographing according to an embodiment of the present invention; FIG.
图4是本发明实施例的另一种拍照的装置的结构示意图;4 is a schematic structural diagram of another apparatus for photographing according to an embodiment of the present invention;
图5为本发明实施例的再一种拍照的装置的结构示意图;FIG. 5 is a schematic structural diagram of still another apparatus for photographing according to an embodiment of the present invention; FIG.
图6为本发明实施例的又再一种拍照的装置的结构示意图。FIG. 6 is a schematic structural diagram of still another apparatus for photographing according to an embodiment of the present invention.
具体实施方式detailed description
下面结合附图来具体描述本发明的优选实施例,其中,附图构成本申请一部分,并与本发明的实施例一起用于阐释本发明的原理。为了清楚和简化目的,当其可能使本发明的主题模糊不清时,将省略本文所描述的器件中已知功能和结构的详细具体说明。The preferred embodiments of the present invention are described in detail below with reference to the accompanying drawings, in which FIG. For the sake of clarity and simplicity, detailed descriptions of known functions and structures in the devices described herein will be omitted when they may obscure the subject matter of the present invention.
本发明实施例的主要目的在于提供一种拍照的方法、装置及计算机存储介质,在主闪状态下,分别使预闪的正常曝光区域、过曝区域和曝光不足区域的曝光值收敛正常,得到三张不同曝光值的图片,并将该三张不同曝光值的图片中曝光值收敛正常的区域合成为一张亮度更均匀的图片,通 过这种方式使图片中远景和近景均清楚,从而大大提高了闪光灯的拍照效果。下面就通过几个具体实施例对本发明的技术方案进行详细说明。The main purpose of the embodiments of the present invention is to provide a method, a device, and a computer storage medium for photographing. In the main flash state, the exposure values of the normal exposure area, the overexposed area, and the underexposed area of the preflash are respectively converged normally, and Three images of different exposure values, and the areas in which the exposure values of the three different exposure values converge normally are combined into a more uniform picture. In this way, the distant view and the close-up view in the picture are clear, which greatly improves the photo effect of the flash. The technical solutions of the present invention will be described in detail below through several specific embodiments.
本发明实施例提供了一种拍照的方法,参见图1,所述方法包括:An embodiment of the present invention provides a method for photographing. Referring to FIG. 1, the method includes:
S101、在闪光灯主闪时,使预闪时确定的正常曝光区域、过曝区域和曝光不足区域的曝光值分别收敛正常,以得到三张不同曝光值的图片;S101. When the flash main flashes, the exposure values of the normal exposure area, the overexposed area, and the underexposed area determined during the preflash are respectively converged to be normal to obtain three pictures of different exposure values;
具体的,在闪光灯预闪时,使目标区域(被拍的目标)的曝光值AE收敛正常,从而确定正常曝光区域、过曝区域和曝光不足区域,在闪光灯主闪时,根据预闪下的正常曝光区域、过曝区域和曝光不足区域,分别使所述正常曝光区域、所述过曝区域和所述曝光不足区域的曝光值收敛正常,得到三张不同曝光值的图片;Specifically, when the flash is pre-flashed, the exposure value AE of the target area (the target being photographed) is made to converge normally, thereby determining the normal exposure area, the overexposed area, and the underexposed area, when the flash main flashes, according to the preflash a normal exposure area, an overexposed area, and an underexposed area respectively converge the exposure values of the normal exposure area, the overexposed area, and the underexposed area to obtain three pictures of different exposure values;
本发明实施例中的正常曝光区域是使目标区域的曝光值正常而得到的图片中的某一块区域,过曝区域和曝光不足区域是相对该正常曝光区域的曝光值来界定的。The normal exposure area in the embodiment of the present invention is a block area in the picture obtained by normalizing the exposure value of the target area, and the overexposed area and the underexposed area are defined with respect to the exposure value of the normal exposure area.
S102、将该三张不同曝光值的图片中曝光值收敛正常的区域合成为一张图片。S102. Combine the regions in which the exposure values of the three different exposure values converge normally into one picture.
本发明实施例中,将预闪中的过曝区域和曝光不足区域处理为正常的曝光值区域,并将处理后的区域进行重新整合,最终得到一张亮度更均匀的图片,从而大大提高了闪光灯的拍照效果。In the embodiment of the present invention, the overexposed area and the underexposed area in the preflash are processed into a normal exposure value area, and the processed area is re-integrated, thereby finally obtaining a picture with more uniform brightness, thereby greatly improving the image. The photo effect of the flash.
本发明实施例中的终端可以是通过闪光灯进行拍照的手机、笔记本或者平板电脑等等。The terminal in the embodiment of the present invention may be a mobile phone, a notebook or a tablet computer or the like that performs photographing by a flash.
本发明实施例中确定正常曝光区域、过曝区域和曝光不足区域的步骤具体包括:在AE收敛正常情况下,记录预闪下有效曝光区域中的各个预设单元的曝光值;根据各个预设单元的曝光值确定所述正常曝光区域、所述过曝区域和所述曝光不足区域,其中,所述预设单元为感光器件的有效感光区域预划分的N*N(N为正整数)块区域中的任一个区域。 The step of determining the normal exposure area, the overexposed area, and the underexposed area in the embodiment of the present invention specifically includes: recording the exposure values of each preset unit in the effective exposure area under the pre-flashing under the normal condition of AE convergence; according to each preset The exposure value of the unit determines the normal exposure area, the overexposed area, and the underexposed area, wherein the predetermined unit is a pre-divided N*N (N is a positive integer) block of the photosensitive photosensitive area of the photosensitive device Any area in the area.
即,本发明实施例预先将感光器件的有效感光区域划分为N*N块区域,预设单元为N*N块区域中的任一个区域,预闪下,使得目标区域的曝光值AE收敛正常,记录各个预设单元的曝光值,并根据预闪下各个预设单元的曝光值确定所述正常曝光区域、所述过曝区域和所述曝光不足区域。That is, the embodiment of the present invention divides the effective photosensitive area of the photosensitive device into N*N block areas in advance, and the preset unit is any one of the N*N block areas, and pre-flashes, so that the exposure value AE of the target area converges normally. And recording the exposure values of the respective preset units, and determining the normal exposure area, the overexposed area, and the underexposed area according to the exposure values of the respective preset units pre-flashed.
本发明实施例的有效曝光区域包括正常曝光区域、过曝区域和曝光不足区域。The effective exposure regions of the embodiments of the present invention include a normal exposure region, an overexposed region, and an underexposed region.
本发明实施例所述的方法还包括:分别计算预览时(预览为预闪前终端的一种状态)各个预设单元的曝光值与相应的预设单元预闪时的曝光值的差值的平方,并对所有预设单元的曝光值的差值的平方求和,得到累加值;The method of the embodiment of the present invention further includes: respectively calculating a difference between an exposure value of each preset unit and an exposure value of a corresponding preset unit pre-flash when previewing (previewing a state of the pre-flash front terminal) Squared, and summed the square of the difference of the exposure values of all the preset units to obtain an accumulated value;
当所述累加值小于预设的阈值时,则表明闪光灯基本没有起到补光作用,不进行过曝区域和曝光不足区域的图片输出;When the accumulated value is less than the preset threshold, it indicates that the flash does not substantially function as a fill light, and the picture output of the overexposed area and the underexposed area is not performed;
当所述累加值大于预设的阈值时,使所述正常曝光区域、所述过曝区域和所述曝光不足区域的曝光值分别收敛正常,以得到三张不同曝光值的图片;When the accumulated value is greater than a preset threshold, the exposure values of the normal exposure area, the overexposed area, and the underexposed area are respectively converged to obtain three pictures of different exposure values;
其中,所述预设单元为感光器件的有效感光区域预划分的N*N块区域中的任一个区域。Wherein, the preset unit is any one of N*N block regions pre-divided by the effective photosensitive area of the photosensitive device.
即,本发明实施例先求得所有预设单元的预览时的曝光值与预闪时的曝光值的差值的平方,再将所有预设单元的曝光值的差值的平方进行累加,得到一个累加值,并将该累加值与预设的阈值进行比较,在进一步判断是否输出三张不同曝光值的图片。That is, the embodiment of the present invention first obtains the square of the difference between the exposure value of the preview of all the preset units and the exposure value of the pre-flash, and then accumulates the square of the difference of the exposure values of all the preset units to obtain An accumulated value is compared with a preset threshold to further determine whether to output three pictures of different exposure values.
本发明实施例的分别使所述正常曝光区域、所述过曝区域和所述曝光不足区域的曝光值收敛正常,得到三张不同曝光值的图片的步骤具体包括:In the embodiment of the present invention, the exposure values of the normal exposure area, the overexposed area, and the underexposed area are respectively condensed to be normal, and the step of obtaining three pictures of different exposure values specifically includes:
基于所述正常曝光区域做曝光值收敛,使得所述正常曝光区域的曝光值收敛正常,得到正常曝光图片,即得到目标区域清晰的图片。 The exposure value is condensed based on the normal exposure area, so that the exposure value of the normal exposure area converges normally, and a normal exposure picture is obtained, that is, a picture with a clear target area is obtained.
基于所述过曝光区域做曝光值收敛,使得所述过曝区域的曝光值收敛正常,得到过曝图片,即得到过曝光区域清晰的图片,该情况下正常曝光区域和曝光不足区域可能不清晰。The exposure value converges based on the overexposed area, so that the exposure value of the overexposed area converges normally, and an overexposed picture is obtained, that is, a picture with a clear overexposed area is obtained, in which case the normal exposed area and the underexposed area may not be clear. .
基于所述曝光不足区域做曝光值收敛,使得所述曝光不足区域的曝光值收敛正常,得到曝光不足图片,即得到曝光不足区域清晰的图片,该情况下正常曝光区域和过曝区域可能不清晰。And exposing the exposure value based on the underexposed area, so that the exposure value of the underexposed area converges normally, and an underexposed picture is obtained, that is, a picture with a clear underexposed area is obtained, in which case the normal exposed area and the overexposed area may not be clear. .
本发明实施例将该三张不同曝光值的图片中曝光值收敛正常的区域合成为一张图片的步骤具体包括:In the embodiment of the present invention, the step of synthesizing the regions in which the exposure values of the three different exposure values are normalized into one picture comprises:
分别按照所述正常曝光图片、所述过曝图片和所述曝光不足图片中各个预设单元的曝光值设置各个相应的像素点的权重,并以此权重将各个所述像素点相应的颜色编码YUV信息分别做加权平均,合成为一张图片。Setting weights of respective corresponding pixel points according to exposure values of respective preset units in the normal exposure picture, the overexposed picture, and the underexposed picture, respectively, and encoding the corresponding color of each pixel point by using the weight The YUV information is weighted averaged and combined into one picture.
具体为,将图片中曝光值收敛正常的预设单元对应的像素点的权重设置的高,而将图片中曝光值收敛不正常的预设单元对应的像素点的权重设置的低,然后对各个所述像素点相应的YUV信息分别做加权平均,在进一步合成为一张亮度更均匀的图片。Specifically, the weight of the pixel corresponding to the preset unit in which the exposure value in the picture is converged is set to be high, and the weight of the pixel corresponding to the preset unit in which the exposure value of the picture is not converged is low, and then The corresponding YUV information of the pixel points are respectively weighted and averaged, and further synthesized into a picture with more uniform brightness.
例如,对第i个像素点的YUV信息进行加权平均的计算方法如下:For example, the method of calculating the weighted average of the YUV information of the i-th pixel is as follows:
Yi=(aYiH+b YiM+c YiL)/a+b+c;Y i = (aY iH + b Y iM + c Y iL ) / a + b + c;
Ui=(aUiH+b UiM+c UiL)/a+b+c;U i =(aU iH +b U iM +c U iL )/a+b+c;
Vi=(aViH+b ViM+c ViL)/a+b+c;V i =(aV iH +b V iM +c V iL )/a+b+c;
其中:a=0.1,b=0.8,c=0.1,H:代表过曝图片;M:代表曝光正常图片;L:代表曝光不足图片;Wherein: a=0.1, b=0.8, c=0.1, H: represents an overexposed picture; M: represents an exposure normal picture; L: represents an underexposed picture;
加权平均后,得到第i个像素点的YUV信息,并依此类推,得到图片中所有像素点的YUV信息,进而得到最终亮度均匀的图片。After the weighted averaging, the YUV information of the i-th pixel point is obtained, and so on, the YUV information of all the pixel points in the picture is obtained, thereby obtaining a picture with uniform final brightness.
上述计算图片的YUV信息的方法仅仅是为了更好的理解本发明而做的一个具体的例子,本领域的技术人员也可以通过其他的算法对上述三张 图片进行处理,只要使最终处理后的图片更清晰即可。The above method for calculating the YUV information of the picture is only a specific example for better understanding of the present invention, and those skilled in the art may also use the other algorithms to perform the above three sheets. The image is processed as long as the final processed image is made clearer.
图2为本发明实施例的另一种拍照的方法的流程图,下面结合图2对本发明实施例进行详细的解释和说明:FIG. 2 is a flowchart of another method for photographing according to an embodiment of the present invention. The following describes the embodiment of the present invention in detail with reference to FIG. 2:
S201、开启手机摄像头,进入相机预览模式,使得AE收敛正常,并记录曝光值;S201, turning on the mobile phone camera, entering the camera preview mode, so that the AE convergence is normal, and recording the exposure value;
具体的,以拍摄的目标区域为曝光对象,分别计算每块预设单元的曝光情况,并保存;Specifically, taking the target area of the shot as an exposure object, respectively calculating the exposure condition of each preset unit, and saving;
S202、如果相机闪光灯模式设置为Auto模式,判断当前环境是否需要打开闪光灯,需要则打开闪光灯,如果相机闪光灯模式设置为On模式,拍照时直接打开闪光灯;S202. If the camera flash mode is set to the Auto mode, determine whether the current environment needs to open the flash, and if necessary, turn on the flash. If the camera flash mode is set to the On mode, the flash is directly turned on when photographing;
S203、如果需要打开闪光灯,按下拍照键,打开预闪功能,使得目标区域AE收敛正常,并记录曝光值;S203. If the flash needs to be turned on, press the camera button to turn on the pre-flash function, so that the target area AE converges normally, and the exposure value is recorded;
预闪电流值固定,且以目标区域为曝光对象进行曝光,分别计算每个预设单元的曝光值,并根据预闪下各个预设单元的曝光值确定正常曝光区域、过曝区域和曝光不足区域,进行保存;The pre-flash current value is fixed, and the target area is exposed as an exposure object, and the exposure values of each preset unit are respectively calculated, and the normal exposure area, the overexposed area, and the underexposure are determined according to the exposure values of the respective preset units in the preflash. Area, save;
S204、闪光灯主闪,并基于预闪时的曝光值分别输出三张图片,分别为:正常曝光图片、过曝图片和曝光不足图片;S204, the main flash of the flash, and three images are respectively output based on the exposure values during the pre-flash, respectively: a normal exposure picture, an overexposed picture, and an underexposed picture;
由于预闪时LED电流值和主闪时LED电流值固定,其亮度属线性关系,因此,根据预闪时的AE,即可计算出主闪时的AE值,主闪时,基于预闪下的正常曝光区域、过曝区域和曝光不足区域,分别使所述正常曝光区域、所述过曝区域和所述曝光不足区域的曝光值收敛正常,得到三张不同曝光值的图片;Since the LED current value during the pre-flash and the LED current value at the main flash are fixed, the brightness is linear. Therefore, according to the AE at the pre-flash, the AE value at the main flash can be calculated, and the main flash is based on the pre-flash. The normal exposure area, the overexposed area and the underexposed area respectively converge the exposure values of the normal exposure area, the overexposed area and the underexposed area to obtain three pictures of different exposure values;
输出三张图片前,还需要进行如下的判断过程,具体为:Before outputting three pictures, you need to make the following judgment process, specifically:
分别计算预览时各个所述预设单元的曝光值与相应的预设单元预闪时的曝光值的差值的平方,并对所有预设单元的曝光值的差值的平方求和, 得到累加值;Calculating, respectively, the square of the difference between the exposure value of each of the preset units and the exposure value of the corresponding preset unit pre-flash when previewing, and summing the squares of the difference values of the exposure values of all the preset units, Get the accumulated value;
当所述累加值大于预设的阈值时,基于所述正常曝光区域做曝光值收敛,使得所述正常曝光区域的曝光值收敛正常,得到正常曝光图片;基于所述过曝光区域做曝光值收敛,使得所述过曝区域的曝光值收敛正常,得到过曝图片;基于所述曝光不足区域做曝光值收敛,使得所述曝光不足区域的曝光值收敛正常,得到曝光不足图片;When the accumulated value is greater than a preset threshold, the exposure value is condensed based on the normal exposure area, so that the exposure value of the normal exposure area converges normally, and a normal exposure picture is obtained; and the exposure value is condensed based on the over-exposed area. So that the exposure value of the overexposed area converges normally, and an overexposed picture is obtained; the exposure value converges based on the underexposed area, so that the exposure value of the underexposed area converges normally, and an underexposed picture is obtained;
S205、将三张图片合成一张图片,并保存。S205. Combine the three pictures into one picture and save it.
即将该三张不同曝光值的图片中曝光值收敛正常的区域合成为一张图片,具体为,分别按照所述正常曝光图片、所述过曝图片和所述曝光不足图片中各个预设单元的曝光值设置各个相应的像素点的权重,并将各个所述像素点相应的YUV信息分别做加权平均,合成为一张图片。That is, the regions in which the exposure values of the three different exposure values converge normally are combined into one picture, specifically, according to the preset positions of the normal exposure picture, the overexposed picture, and the underexposed picture, respectively. The exposure value sets the weight of each corresponding pixel point, and weights the corresponding YUV information of each of the pixel points to form a picture.
本发明实施例还提供了一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行前述的拍照方法。The embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the foregoing photographing method.
本发明实施例还提供了一种拍照的装置,参见图3,所述装置包括:相互连接的收敛模块11和处理模块12;An embodiment of the present invention further provides a device for photographing. Referring to FIG. 3, the device includes: a convergence module 11 and a processing module 12 connected to each other;
收敛模块11,配置为在闪光灯主闪时,使预闪时确定的正常曝光区域、过曝区域和曝光不足区域的曝光值分别收敛正常,以得到三张不同曝光值的图片;The convergence module 11 is configured to converge the exposure values of the normal exposure area, the overexposed area and the underexposed area determined during the preflash to the normal flash to obtain three pictures of different exposure values;
处理模块12,配置为将所述收敛模块11得到的三张不同曝光值的图片中曝光值收敛正常的区域合成为一张图片。The processing module 12 is configured to combine the regions in which the exposure values of the three different exposure values obtained by the convergence module 11 converge to a normal picture into one picture.
图4是本发明实施例的另一种拍照的装置的结构示意图,如图4所示,图4为本发明实施例的一种优选的装置,与图3的装置相比,该装置还包括记录模块13和设置模块14;FIG. 4 is a schematic structural diagram of another apparatus for photographing according to an embodiment of the present invention. As shown in FIG. 4, FIG. 4 is a preferred apparatus according to an embodiment of the present invention, and the apparatus further includes Recording module 13 and setting module 14;
通过所述记录模块13记录预闪下有效曝光区域中的各个预设单元的曝 光值;所述设置模块14根据所述记录模块13记录的各个预设单元的曝光值确定所述正常曝光区域、所述过曝区域和所述曝光不足区域,其中,所述预设单元为感光器件的有效感光区域预划分的N*N块区域中的任一个区域。Recording, by the recording module 13, the exposure of each preset unit in the effective exposure area under the pre-flash a light value; the setting module 14 determines the normal exposure area, the overexposed area, and the underexposed area according to the exposure values of the respective preset units recorded by the recording module 13, wherein the preset unit is Any one of the N*N block regions pre-divided by the effective photosensitive area of the photosensitive device.
图5为本发明实施例的再一种拍照的装置的结构示意图,如图5所示,图5为本发明实施例提供的一种优选的装置,与图4所对应的装置相比,该装置还包括计算模块15和判断模块16;FIG. 5 is a schematic structural diagram of still another apparatus for photographing according to an embodiment of the present invention. As shown in FIG. 5, FIG. 5 is a preferred apparatus according to an embodiment of the present invention. The device further includes a calculation module 15 and a determination module 16;
所述计算模块15分别计算预览时各个预设单元的曝光值与相应的预设单元预闪时的曝光值的差值的平方,并对所有所述预设单元的曝光值的差值的平方求和,得到累加值;The calculating module 15 respectively calculates the square of the difference between the exposure value of each preset unit and the exposure value of the corresponding preset unit pre-flash when previewing, and the square of the difference between the exposure values of all the preset units Summing, getting the accumulated value;
当所述判断模块16判断所述累加值大于预设的阈值时,触发所述收敛模块11;When the determining module 16 determines that the accumulated value is greater than a preset threshold, the convergence module 11 is triggered;
具体的,收敛模块11配置为,在闪光灯主闪时,根据预闪下的正常曝光区域、过曝区域和曝光不足区域,基于所述正常曝光区域做曝光值收敛,使得所述正常曝光区域的曝光值收敛正常,得到正常曝光图片;基于所述过曝光区域做曝光值收敛,使得所述过曝区域的曝光值收敛正常,得到过曝图片;基于所述曝光不足区域做曝光值收敛,使得所述曝光不足区域的曝光值收敛正常,得到曝光不足图片。Specifically, the convergence module 11 is configured to converge the exposure value based on the normal exposure area, the overexposed area, and the underexposed area according to the pre-flash, when the main flash is flashed, so that the normal exposure area is The exposure value converges normally, and a normal exposure picture is obtained; the exposure value converges based on the overexposed area, so that the exposure value of the overexposed area converges normally, and an overexposed picture is obtained; and the exposure value converges based on the underexposed area, so that The exposure value of the underexposed area converges normally, and an underexposed picture is obtained.
图6为本发明实施例的又再一种拍照的装置的结构示意图,如图6所示,所述处理模块12进一步包括:设置子模块121和计算子模块122;FIG. 6 is a schematic structural diagram of still another apparatus for photographing according to an embodiment of the present invention. As shown in FIG. 6, the processing module 12 further includes: a setting sub-module 121 and a computing sub-module 122;
所述设置子模块121分别按照所述正常曝光图片、所述过曝图片和所述曝光不足图片中各个预设单元的曝光值设置各个相应的像素点的权重;The setting sub-module 121 sets the weights of the respective corresponding pixel points according to the exposure values of the preset units in the normal exposure picture, the over-exposed picture, and the under-exposed picture, respectively;
所述计算子模块122按照所述设置子模块121设置的所述像素点的权重,以此权重将各个所述像素点相应的YUV信息分别做加权平均,合成为 一张图片。The calculation sub-module 122 performs the weighted average of the YUV information of each of the pixel points according to the weight of the pixel points set by the setting sub-module 121, and synthesizes a picture.
本发明实施例的装置中的内容可参考方法部分的相关内容进行理解,在此不再赘述。The content of the device in the embodiment of the present invention can be understood by referring to related content in the method part, and details are not described herein again.
本发明实施例提供的拍照的方法、装置及计算机存储介质,能够带来以下有益效果:The method, device and computer storage medium provided by the embodiments of the present invention can bring the following beneficial effects:
本发明实施例通过将预闪中的过曝区域和曝光不足区域处理为正常的曝光值区域,并将处理后的区域进行重新整合,最终得到一张亮度均匀的图片,通过这种方式使图片中远景和近景均清楚,从而大大提高了闪光灯的拍照效果。In the embodiment of the present invention, the overexposed area and the underexposed area in the preflash are processed into a normal exposure value area, and the processed area is re-integrated, thereby finally obtaining a picture with uniform brightness, and the picture is made in this way. The medium and long-range scenes are clear, which greatly improves the photo effect of the flash.
以上所述,仅为本发明较佳的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应该以权利要求书的保护范围为准。The above is only a preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of changes or within the technical scope disclosed by the present invention. Alternatives are intended to be covered by the scope of the present invention. Therefore, the scope of the invention should be determined by the scope of the claims.
工业实用性Industrial applicability
本发明实施例提供的拍照的方法、装置及计算机存储介质,在闪光灯主闪时,使预闪时确定的正常曝光区域、过曝区域和曝光不足区域的曝光值分别收敛正常,以得到三张不同曝光值的图片;将该三张不同曝光值的图片中曝光值收敛正常的区域合成为一张图片。本发明实施例,将预闪中的过曝区域和曝光不足区域处理为正常的曝光值区域,并将处理后的区域进行重新整合,最终得到一张亮度均匀的图片,通过这种方式使图片中远景和近景均清楚,从而大大提高了闪光灯的拍照效果。 The photographing method and device and the computer storage medium provided by the embodiment of the invention converge the exposure values of the normal exposure area, the overexposed area and the underexposed area determined during the preflash to the normal flash to obtain three sheets. A picture of different exposure values; the areas in which the exposure values of the three different exposure values converge normally are combined into one picture. In the embodiment of the present invention, the overexposed area and the underexposed area in the preflash are processed into a normal exposure value area, and the processed area is re-integrated, and finally a picture with uniform brightness is obtained, and the picture is made in this way. The medium and long-range scenes are clear, which greatly improves the photo effect of the flash.

Claims (11)

  1. 一种拍照的方法,所述方法包括:A method of photographing, the method comprising:
    在闪光灯主闪时,使预闪时确定的正常曝光区域、过曝区域和曝光不足区域的曝光值分别收敛正常,以得到三张不同曝光值的图片;When the flash main flashes, the exposure values of the normal exposure area, the overexposed area and the underexposed area determined during the pre-flash are respectively converged to be normal, to obtain three pictures of different exposure values;
    将该三张不同曝光值的图片中曝光值收敛正常的区域合成为一张图片。The areas in which the exposure values of the three different exposure values converge normally are combined into one picture.
  2. 根据权利要求1所述的方法,其中,在所述使预闪时确定的正常曝光区域、过曝区域和曝光不足区域的曝光值分别收敛正常之前,所述方法还包括:The method according to claim 1, wherein before the exposing the exposure values of the normal exposure area, the overexposed area, and the underexposed area determined at the pre-flash, respectively, the method further comprises:
    记录预闪下有效曝光区域中的各个预设单元的曝光值;Recording the exposure values of the respective preset units in the effective exposure area under the pre-flash;
    根据各个预设单元的曝光值确定所述正常曝光区域、所述过曝区域和所述曝光不足区域,其中,所述预设单元为感光器件的有效感光区域预划分的N*N块区域中的任一个区域,N为正整数。Determining the normal exposure area, the overexposed area, and the underexposed area according to exposure values of respective preset units, wherein the preset unit is in an N*N block area pre-divided by an effective photosensitive area of the photosensitive device Any of the regions, N is a positive integer.
  3. 根据权利要求1所述的方法,其中,在使预闪时确定的正常曝光区域、过曝区域和曝光不足区域的曝光值分别收敛正常之前,所述方法还包括:The method according to claim 1, wherein before the exposure values of the normal exposure area, the overexposed area, and the underexposed area determined at the pre-flash are respectively converge to normal, the method further includes:
    分别计算预览时各个预设单元的曝光值与相应的预设单元预闪时的曝光值的差值的平方,并对所有预设单元的曝光值的差值的平方求和,得到累加值;Calculating, respectively, the square of the difference between the exposure value of each preset unit in the preview and the exposure value of the corresponding preset unit pre-flash, and summing the squares of the difference values of the exposure values of all the preset units to obtain an accumulated value;
    相应的,当所述累加值大于预设的阈值时,使所述正常曝光区域、所述过曝区域和所述曝光不足区域的曝光值分别收敛正常,以得到三张不同曝光值的图片;Correspondingly, when the accumulated value is greater than a preset threshold, the exposure values of the normal exposure area, the overexposed area, and the underexposed area are respectively converge to normal to obtain three pictures of different exposure values;
    其中,所述预设单元为感光器件的有效感光区域预划分的N*N块区域中的任一个区域,N为正整数。Wherein, the preset unit is any one of N*N block regions pre-divided by the effective photosensitive area of the photosensitive device, and N is a positive integer.
  4. 根据权利要求1至3中任一项所述的方法,其中,所述使预闪时确 定的正常曝光区域、过曝区域和曝光不足区域的曝光值分别收敛正常,以得到三张不同曝光值的图片,包括:The method according to any one of claims 1 to 3, wherein said pre-flashing time The exposure values of the normal exposure area, the overexposed area, and the underexposed area respectively converge to normal to obtain three pictures of different exposure values, including:
    基于所述正常曝光区域做曝光值收敛,使得所述正常曝光区域的曝光值收敛正常,得到正常曝光图片;Exposing the exposure value based on the normal exposure area, so that the exposure value of the normal exposure area converges normally, and a normal exposure picture is obtained;
    基于所述过曝光区域做曝光值收敛,使得所述过曝区域的曝光值收敛正常,得到过曝图片;Exposing the exposure value based on the overexposed area, so that the exposure value of the overexposed area converges normally, and an overexposed picture is obtained;
    基于所述曝光不足区域做曝光值收敛,使得所述曝光不足区域的曝光值收敛正常,得到曝光不足图片。The exposure value converges based on the underexposed area, so that the exposure value of the underexposed area converges normally, and an underexposed picture is obtained.
  5. 根据权利要求4所述的方法,其中,所述将该三张不同曝光值的图片中曝光值收敛正常的区域合成为一张图片,包括:The method according to claim 4, wherein said synthesizing the areas in which the exposure values of the three different exposure values converge normally into a picture comprises:
    分别按照所述正常曝光图片、所述过曝图片和所述曝光不足图片中各个预设单元的曝光值设置各个相应的像素点的权重,并以此权重将各个所述像素点相应的颜色编码YUV信息分别做加权平均,整合处理为一张图片。Setting weights of respective corresponding pixel points according to exposure values of respective preset units in the normal exposure picture, the overexposed picture, and the underexposed picture, respectively, and encoding the corresponding color of each pixel point by using the weight The YUV information is weighted averaged separately and integrated into one picture.
  6. 一种拍照的装置,所述装置包括:A device for photographing, the device comprising:
    收敛模块,配置为在闪光灯主闪时,使预闪时确定的正常曝光区域、过曝区域和曝光不足区域的曝光值分别收敛正常,以得到三张不同曝光值的图片;The convergence module is configured to converge the exposure values of the normal exposure area, the overexposed area and the underexposed area determined during the pre-flash to the normal flash to obtain three pictures of different exposure values;
    处理模块,配置为将所述收敛模块得到的三张不同曝光值的图片中曝光值收敛正常的区域合成为一张图片。The processing module is configured to synthesize a region in which the exposure values of the three different exposure values obtained by the convergence module converge to a normal picture into one picture.
  7. 根据权利要求6所述的装置,其中,所述装置还包括:记录模块和设置模块;The device according to claim 6, wherein the device further comprises: a recording module and a setting module;
    所述记录模块,配置为记录预闪下有效曝光区域中的各个预设单元的曝光值;The recording module is configured to record an exposure value of each preset unit in the effective exposure area under pre-flash;
    所述设置模块,配置为根据所述记录模块记录的各个预设单元的曝光 值确定所述正常曝光区域、所述过曝区域和所述曝光不足区域,其中,所述预设单元为感光器件的有效感光区域预划分的N*N块区域中的任一个区域,N为正整数。The setting module is configured to perform exposure according to each preset unit recorded by the recording module The value determines the normal exposure area, the overexposed area, and the underexposed area, wherein the predetermined unit is any one of N*N block areas pre-divided by the effective photosensitive area of the photosensitive device, N is A positive integer.
  8. 根据权利要求6所述的装置,其中,所述装置还包括:计算模块和判断模块;The device according to claim 6, wherein the device further comprises: a calculation module and a determination module;
    所述计算模块,配置为分别计算预览时各个预设单元的曝光值与相应的预设单元预闪时的曝光值的差值的平方,并对所有预设单元的曝光值的差值的平方求和,得到累加值;The calculating module is configured to separately calculate a square of a difference between an exposure value of each preset unit in preview and an exposure value of a corresponding preset unit pre-flash, and a square of a difference between exposure values of all preset units Summing, getting the accumulated value;
    所述判断模块,配置为当判断所述累加值大于预设的阈值时,触发所述收敛模块;The determining module is configured to trigger the convergence module when determining that the accumulated value is greater than a preset threshold;
    其中,所述预设单元为感光器件的有效感光区域预划分的N*N块区域中的任一个区域,N为正整数。Wherein, the preset unit is any one of N*N block regions pre-divided by the effective photosensitive area of the photosensitive device, and N is a positive integer.
  9. 根据权利要求6至8中任一项所述的装置,其中,所述收敛模块,还配置为,在闪光灯主闪时,基于所述正常曝光区域做曝光值收敛,使得所述正常曝光区域的曝光值收敛正常,得到正常曝光图片;基于所述过曝光区域做曝光值收敛,使得所述过曝区域的曝光值收敛正常,得到过曝图片;基于所述曝光不足区域做曝光值收敛,使得所述曝光不足区域的曝光值收敛正常,得到曝光不足图片。The apparatus according to any one of claims 6 to 8, wherein the convergence module is further configured to cause an exposure value to converge based on the normal exposure area when the flash main flashes, such that the normal exposure area The exposure value converges normally, and a normal exposure picture is obtained; the exposure value converges based on the overexposed area, so that the exposure value of the overexposed area converges normally, and an overexposed picture is obtained; and the exposure value converges based on the underexposed area, so that The exposure value of the underexposed area converges normally, and an underexposed picture is obtained.
  10. 根据权利要求9所述的装置,其中,所述处理模块包括:设置子模块和计算子模块;The apparatus according to claim 9, wherein the processing module comprises: a setting submodule and a computing submodule;
    所述设置子模块,配置为分别按照所述正常曝光图片、所述过曝图片和所述曝光不足图片中各个预设单元的曝光值设置各个相应的像素点的权重;The setting sub-module is configured to set weights of respective corresponding pixel points according to exposure values of respective preset units in the normal exposure picture, the over-exposed picture, and the under-exposed picture;
    所述计算子模块,配置为按照所述设置子模块设置的所述像素点的权重,以此权重将各个所述像素点相应的颜色编码YUV信息分别做加权平 均,整合处理为一张图片。The calculating sub-module is configured to weight the corresponding color-coded YUV information of each of the pixel points according to the weight of the pixel points set by the setting sub-module Both are integrated into one picture.
  11. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求1至5任一项所述的方法。 A computer storage medium having stored therein computer executable instructions for performing the method of any one of claims 1 to 5.
PCT/CN2014/088191 2014-06-20 2014-10-09 Photographing method and apparatus and computer storage medium WO2015192545A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410279489.0A CN105208294A (en) 2014-06-20 2014-06-20 Method and device for taking picture
CN201410279489.0 2014-06-20

Publications (1)

Publication Number Publication Date
WO2015192545A1 true WO2015192545A1 (en) 2015-12-23

Family

ID=54934782

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/088191 WO2015192545A1 (en) 2014-06-20 2014-10-09 Photographing method and apparatus and computer storage medium

Country Status (2)

Country Link
CN (1) CN105208294A (en)
WO (1) WO2015192545A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107071262B (en) * 2016-12-28 2019-09-17 尚云(广州)信息科技有限公司 Photographic method and camera arrangement
TW201915818A (en) * 2017-10-05 2019-04-16 香港商印芯科技股份有限公司 Optical identification module
CN107566752B (en) * 2017-10-31 2020-08-11 努比亚技术有限公司 Shooting method, terminal and computer storage medium
CN111064898B (en) * 2019-12-02 2021-07-16 联想(北京)有限公司 Image shooting method and device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7005235B2 (en) * 2002-12-04 2006-02-28 Taiwan Semiconductor Manufacturing Co., Ltd. Method and systems to print contact hole patterns
CN102129147A (en) * 2010-01-20 2011-07-20 鸿富锦精密工业(深圳)有限公司 Camera and photo shooting and processing method
CN102131051A (en) * 2010-12-28 2011-07-20 惠州Tcl移动通信有限公司 Image pick-up equipment and image acquisition method and device thereof
CN102129148A (en) * 2010-01-20 2011-07-20 鸿富锦精密工业(深圳)有限公司 Camera and photo shooting and processing method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8018525B2 (en) * 2007-12-21 2011-09-13 Nokia Corporation Camera flash module and method for controlling same
JP5749224B2 (en) * 2012-07-13 2015-07-15 株式会社東芝 The camera module

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7005235B2 (en) * 2002-12-04 2006-02-28 Taiwan Semiconductor Manufacturing Co., Ltd. Method and systems to print contact hole patterns
CN102129147A (en) * 2010-01-20 2011-07-20 鸿富锦精密工业(深圳)有限公司 Camera and photo shooting and processing method
CN102129148A (en) * 2010-01-20 2011-07-20 鸿富锦精密工业(深圳)有限公司 Camera and photo shooting and processing method
CN102131051A (en) * 2010-12-28 2011-07-20 惠州Tcl移动通信有限公司 Image pick-up equipment and image acquisition method and device thereof

Also Published As

Publication number Publication date
CN105208294A (en) 2015-12-30

Similar Documents

Publication Publication Date Title
CN111418201B (en) Shooting method and equipment
WO2020034737A1 (en) Imaging control method, apparatus, electronic device, and computer-readable storage medium
CN110445988B (en) Image processing method, image processing device, storage medium and electronic equipment
CN108322646B (en) Image processing method, image processing device, storage medium and electronic equipment
CN107948538B (en) Imaging method, imaging device, mobile terminal and storage medium
CN110445989B (en) Image processing method, image processing device, storage medium and electronic equipment
JP6110574B2 (en) High dynamic range imaging method and camera
CN107846556B (en) Imaging method, imaging device, mobile terminal and storage medium
WO2015101001A1 (en) Shooting method and device, and terminal
CN103780840A (en) High-quality imaging double camera shooting and imaging device and method thereof
CN109922275B (en) Self-adaptive adjustment method and device of exposure parameters and shooting equipment
CN108337446B (en) High dynamic range image acquisition method, device and equipment based on double cameras
WO2020034701A1 (en) Imaging control method and apparatus, electronic device, and readable storage medium
WO2020029679A1 (en) Control method and apparatus, imaging device, electronic device and readable storage medium
WO2020034702A1 (en) Control method, device, electronic equipment and computer readable storage medium
WO2016082414A1 (en) Brightness compensation method and device
TWI486057B (en) Image pickup device and image synthesis method thereof
JP2012109900A (en) Photographing device, photographing method and program
WO2020034739A1 (en) Control method and apparatus, electronic device, and computer readable storage medium
WO2015192545A1 (en) Photographing method and apparatus and computer storage medium
JP2014123915A (en) Imaging apparatus, and control method, program, and storage media for the same
JP2017112462A (en) Imaging device and control method, program therefor and storage medium
JP6741881B2 (en) Image processing device, imaging device, image processing method, and program
WO2016029380A1 (en) Image processing method, computer storage medium, device, and terminal
US11496694B2 (en) Dual sensor imaging system and imaging method thereof

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: 14895346

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14895346

Country of ref document: EP

Kind code of ref document: A1