CN104052933A - Method for judging dynamic range mode and image acquisition device thereof - Google Patents
Method for judging dynamic range mode and image acquisition device thereof Download PDFInfo
- Publication number
- CN104052933A CN104052933A CN201310084357.8A CN201310084357A CN104052933A CN 104052933 A CN104052933 A CN 104052933A CN 201310084357 A CN201310084357 A CN 201310084357A CN 104052933 A CN104052933 A CN 104052933A
- Authority
- CN
- China
- Prior art keywords
- dynamic range
- estimated value
- overexposure
- region
- value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 35
- 238000012545 processing Methods 0.000 claims description 13
- 238000010586 diagram Methods 0.000 description 9
- 238000001514 detection method Methods 0.000 description 6
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000003384 imaging method Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000005282 brightening Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012805 post-processing Methods 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000011514 reflex Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Landscapes
- Studio Devices (AREA)
Abstract
Description
技术领域technical field
本发明是有关于一种动态范围模式的判定方法及其图像获取装置。The invention relates to a method for determining a dynamic range mode and an image acquisition device thereof.
背景技术Background technique
所谓“动态范围”,是指画面中的最大亮度值与最小亮度值的范围或比值。对于摄影而言,动态范围又可分为“相机的动态范围”和“场景的动态范围”。其中,相机的动态范围是指感光元件所能接受亮度变化的范围。场景的动态范围是指拍摄场景中的亮度差异范围,也就是画面中最亮区域和最暗区域的差异。The so-called "dynamic range" refers to the range or ratio between the maximum brightness value and the minimum brightness value in the picture. For photography, the dynamic range can be divided into "the dynamic range of the camera" and "the dynamic range of the scene". Among them, the dynamic range of the camera refers to the range in which the photosensitive element can accept brightness changes. The dynamic range of a scene refers to the range of brightness differences in the shooting scene, that is, the difference between the brightest area and the darkest area in the picture.
当场景的动态范围大于相机的动态范围时,代表拍摄场景中有极端的亮部与暗部,超出了感光元件所能记录的色阶,因此照片中会出现全黑或全白的区块。举例来说,在室内同时拍摄人像以及窗外景色、拍摄阳光下的树及树荫等,由于此类拍摄场景的明暗差异极大,明显降低图像品质。When the dynamic range of the scene is greater than the dynamic range of the camera, it means that there are extreme bright and dark parts in the shooting scene, which exceed the color gradation that the photosensitive element can record, so there will be completely black or completely white areas in the photo. For example, shooting portraits and scenery outside the window at the same time indoors, shooting trees under the sun and the shade of trees, etc., due to the huge difference between light and dark in such shooting scenes, the image quality will be significantly reduced.
为了克服上述缺陷,部分相机提供高动态范围模式,也就是通过图像处理技术,使得处理后图像的动态范围大于一般相机获取的单一图像所提供的动态范围。然而,相机是否使用高动态范围成像模式必须由相机使用者自行基于拍摄经验来进行设定。也就是说,相机使用者必须通过人眼判别目前的拍摄场景是否适合使用高动态范围成像模式进行拍摄,或使用一般模式进行拍摄。然而,大多数使用者常因缺乏经验或判断错误而无法正确使用高动态范围模式来拍出较佳图像。In order to overcome the above defects, some cameras provide a high dynamic range mode, that is, through image processing technology, the dynamic range of the processed image is greater than that provided by a single image captured by a general camera. However, whether the camera uses the high dynamic range imaging mode must be set by the camera user based on shooting experience. That is to say, the camera user must use human eyes to judge whether the current shooting scene is suitable for shooting in the high dynamic range imaging mode or in the normal mode. However, most users often fail to use the HDR mode correctly to capture better images due to inexperience or wrong judgment.
发明内容Contents of the invention
本发明提供一种动态范围模式的判定方法及其图像获取装置,可自动检测目前拍摄场景的变化,进而适应性选择并切换动态范围(Dynamic Range,DR)模式。The present invention provides a method for determining a dynamic range mode and an image acquisition device thereof, which can automatically detect changes in a current shooting scene, and then adaptively select and switch a dynamic range (Dynamic Range, DR) mode.
本发明的一种动态范围模式的判定方法,适用于进行视频处理(videoprocessing)的图像获取装置。此判定方法包括下列步骤。先获取来源图像。并分析来源图像的亮暗程度,以决定来源图像的过曝(overexposure)区域与曝光不足(underexposure)区域。再依据权重图(weighting map)来计算过曝区域的一过曝估测值与曝光不足区域的一曝光不足估测值。并且将过曝估测值与曝光不足估测值与一或多个临界值进行比较,据以判断适于图像获取装置使用的动态范围模式。A method for determining a dynamic range mode of the present invention is suitable for an image acquisition device performing video processing. This determination method includes the following steps. Get the source image first. And analyze the brightness and darkness of the source image to determine the overexposure area and underexposure area of the source image. An estimated overexposure value of the overexposed region and an estimated underexposure value of the underexposed region are calculated according to the weighting map. And compare the estimated overexposure value and the estimated underexposure value with one or more critical values, so as to determine the dynamic range mode suitable for the image acquisition device.
在本发明的一实施例中,上述的图像获取装置所能使用的动态范围模式包括正常动态范围(Normal DR,NDR)模式、宽动态范围(Wide DR,WDR)模式、高动态范围(High DR,HDR)模式以及超高动态范围(Ultra High DR,UHDR)模式。In an embodiment of the present invention, the dynamic range modes that the above-mentioned image acquisition device can use include normal dynamic range (Normal DR, NDR) mode, wide dynamic range (Wide DR, WDR) mode, high dynamic range (High DR , HDR) mode and Ultra High Dynamic Range (Ultra High DR, UHDR) mode.
在本发明的一实施例中,上述分析来源图像的亮暗程度,以决定过曝区域与曝光不足区域的步骤包括:分割来源图像为多个区块;分别计算各个区块的亮度平均值;以及依据各个亮度平均值来分别判断各个区块是否属于过曝区域或曝光不足区域。In an embodiment of the present invention, the step of analyzing the brightness and darkness of the source image to determine the overexposed area and the underexposed area includes: dividing the source image into a plurality of blocks; calculating the average brightness of each block; And judge whether each block belongs to an over-exposed area or an under-exposed area according to each brightness average value.
在本发明的一实施例中,上述在计算过曝估测值与曝光不足估测值的步骤之前还包括设定权重图的多个权重设定值。其中,各个权重设定值分别对应至来源图像的各个区块。In an embodiment of the present invention, before the step of calculating the estimated overexposure value and the estimated underexposure value, it further includes setting a plurality of weight setting values of the weight map. Wherein, each weight setting value corresponds to each block of the source image respectively.
在本发明的一实施例中,上述依据权重图来计算过曝区域的过曝估测值与曝光不足区域的曝光不足估测值的步骤包括:将过曝区域所对应的权重设定值进行运算以获得过曝估测值;并将曝光不足区域所对应的权重设定值进行运算以获得曝光不足估测值。In an embodiment of the present invention, the step of calculating the estimated overexposure value of the overexposed area and the estimated underexposure value of the underexposed area according to the weight map includes: calculating the weight setting value corresponding to the overexposed area The calculation is performed to obtain an estimated overexposure value; and the weight setting value corresponding to the underexposed area is calculated to obtain an estimated underexposure value.
在本发明的一实施例中,上述的判定方法还包括对来源图像执行人脸检测(face detection),以判断来源图像是否存在一或多个人脸区域。若是,则提高人脸区域所属区块对应的权重设定值。In an embodiment of the present invention, the above determination method further includes performing face detection on the source image to determine whether there are one or more human face regions in the source image. If yes, increase the weight setting value corresponding to the block to which the face area belongs.
在本发明的一实施例中,上述将过曝估测值与曝光不足估测值与至少一临界值进行比较,据以判断适于图像获取装置使用的动态范围模式的步骤包括:相加过曝估测值与曝光不足估测值,以获得估测值总和;并将估测值总和与第一、第二及第三临界值进行比较,据以判断适于图像获取装置使用的动态范围模式。In an embodiment of the present invention, the step of comparing the estimated overexposure value and the estimated underexposure value with at least one critical value to determine a dynamic range mode suitable for the image acquisition device includes: adding the overexposure an estimated value of exposure and an estimated value of underexposure to obtain a sum of the estimated values; and comparing the sum of the estimated values with the first, second and third critical values to determine the dynamic range suitable for use by the image acquisition device model.
在本发明的一实施例中,上述的判定方法还包括控制图像获取装置自动切换至适合使用的动态范围模式。In an embodiment of the present invention, the above determination method further includes controlling the image acquisition device to automatically switch to a suitable dynamic range mode.
本发明的一种图像获取装置,适于进行视频处理,其包括图像传感器、存储器以及处理器。其中,图像传感器用以获取来源图像。存储器用以储存来源图像以及权重图。处理器用以分析来源图像的亮暗程度,以决定来源图像的过曝区域与曝光不足区域,并依据权重图来计算过曝区域的过曝估测值与曝光不足区域的曝光不足估测值,再将过曝估测值与曝光不足估测值与一或多个临界值进行比较,据以判断适于图像获取装置使用的动态范围模式。An image acquisition device of the present invention is suitable for video processing, and includes an image sensor, a memory and a processor. Wherein, the image sensor is used to obtain the source image. The memory is used to store source images and weight maps. The processor is used to analyze the lightness and darkness of the source image to determine the overexposed area and the underexposed area of the source image, and calculate the estimated overexposure value of the overexposed area and the estimated underexposure value of the underexposed area according to the weight map, Then compare the estimated overexposure value and the estimated underexposure value with one or more critical values, so as to determine the dynamic range mode suitable for the image acquisition device.
基于上述,本发明所提供的动态范围模式的判定方法及其图像获取装置,可通过检测一来源图像的亮暗比例来判断目前拍摄场景的变化,进而适应性选择并自动切换适于图像获取装置使用的动态范围模式。Based on the above, the method for judging the dynamic range mode and its image acquisition device provided by the present invention can judge the change of the current shooting scene by detecting the light and dark ratio of a source image, and then adaptively select and automatically switch suitable image acquisition devices The dynamic range mode to use.
为让本发明的上述特征和优点能更明显易懂,下文特举实施例,并配合附图作详细说明如下。In order to make the above-mentioned features and advantages of the present invention more comprehensible, the following specific embodiments are described in detail with reference to the accompanying drawings.
附图说明Description of drawings
图1是依照本发明一实施例示出的一种图像获取装置的方块图;FIG. 1 is a block diagram of an image acquisition device according to an embodiment of the present invention;
图2是依照本发明一实施例示出的动态范围模式的判定方法流程图;Fig. 2 is a flowchart of a method for determining a dynamic range mode according to an embodiment of the present invention;
图3是依照本发明一实施例示出的动态范围模式的转换示意图;Fig. 3 is a schematic diagram of conversion of a dynamic range mode according to an embodiment of the present invention;
图4是依照本发明另一实施例示出的动态范围模式的判定方法流程图;Fig. 4 is a flowchart of a method for determining a dynamic range mode according to another embodiment of the present invention;
图5A是依照本发明另一实施例示出的过曝区域与曝光不足区域的示意图;5A is a schematic diagram showing overexposed areas and underexposed areas according to another embodiment of the present invention;
图5B是依照本发明另一实施例示出的权重图示意图。Fig. 5B is a schematic diagram of a weight map according to another embodiment of the present invention.
附图标记说明:Explanation of reference signs:
100:图像获取装置;100: image acquisition device;
110:图像传感器;110: image sensor;
120:存储器;120: memory;
130:处理器;130: processor;
b1~b25:区块;b1~b25: blocks;
W1~W25:权重设定值;W1~W25: Weight setting value;
N:曝光正常区域;N: exposure normal area;
O:过曝区域;O: overexposed area;
U:曝光不足区域;U: underexposed area;
S210~S240:一实施例的动态范围模式的判定方法的各步骤;S210-S240: each step of the determination method of the dynamic range mode in an embodiment;
S401~S425:另一实施例的动态范围模式的判定方法的各步骤。S401-S425: each step of the determination method of the dynamic range mode in another embodiment.
具体实施方式Detailed ways
本发明所提供的图像获取装置除了适于获取单张静态图像之外,也适合在进行视频处理(例如是录影)时,自动检测目前拍摄场景的变化,进而适应性选择并切换动态范围(Dynamic Range,DR)模式。图1是依照本发明一实施例示出的一种图像获取装置的方块图。本实施例的图像获取装置100例如是数码相机、数码单眼(Digital Single Lens Reflex,DSLR)相机、数码摄影机(Digital Video Camcorder,DVC)等,或是其他具有图像/视频获取功能的智能手机或平板电脑等等,不限于上述。The image acquisition device provided by the present invention is not only suitable for obtaining a single static image, but also suitable for automatically detecting changes in the current shooting scene when performing video processing (such as video recording), and then adaptively selects and switches the dynamic range (Dynamic Range, DR) mode. Fig. 1 is a block diagram of an image acquisition device according to an embodiment of the present invention. The image acquisition device 100 of this embodiment is, for example, a digital camera, a digital single-eye (Digital Single Lens Reflex, DSLR) camera, a digital video camera (Digital Video Camcorder, DVC), etc., or other smart phones or tablets with image/video acquisition functions Computers and the like are not limited to the above.
请参照图1,图像获取装置100至少包括图像传感器110、存储器120以及处理器130。图像传感器110包括镜头以及CCD/CMOS感光元件等,而可用以获取图像。存储器120可为任意形式的固定式或可移动式随机存取存储器(Random Access Memory,RAM)、只读存储器(Read-Only Memory,ROM)、快闪存储器(Flash memory)或其他类似元件,而可用以储存来源图像及数据。处理器130依据来源图像进行自动场景检测(scene detection),依据环境亮度判断目前适合使用的动态范围模式。Referring to FIG. 1 , the image acquisition device 100 at least includes an image sensor 110 , a memory 120 and a processor 130 . The image sensor 110 includes a lens, a CCD/CMOS photosensitive element, etc., and can be used to acquire images. The memory 120 can be any form of fixed or removable random access memory (Random Access Memory, RAM), read-only memory (Read-Only Memory, ROM), flash memory (Flash memory) or other similar components, and Can be used to store source images and data. The processor 130 performs automatic scene detection (scene detection) according to the source image, and judges the currently suitable dynamic range mode according to the ambient brightness.
其中,本实施例的图像获取装置100所能使用的动态范围模式包括正常动态范围(Normal DR,NDR)模式、宽动态范围(Wide DR,WDR)模式、高动态范围(High DR,HDR)模式以及超高动态范围(Ultra High DR,UHDR)模式。由于动态范围为最大亮度值与最小亮度值的比值,因此并无单位。在本实施例中,图像获取装置100所使用的NDR模式大约可记录8~9级的动态范围;WDR模式大约可记录10~11级的动态范围;HDR模式大约可记录12~13级的动态范围;UHDR模式大约可记录大于13级以上的动态范围。上述仅为一种范例实施例,动态范围模式的分类方法并不限于上述。Among them, the dynamic range modes that can be used by the image acquisition device 100 of this embodiment include normal dynamic range (Normal DR, NDR) mode, wide dynamic range (Wide DR, WDR) mode, high dynamic range (High DR, HDR) mode And Ultra High Dynamic Range (Ultra High DR, UHDR) mode. Since the dynamic range is the ratio of the maximum brightness value to the minimum brightness value, it has no units. In this embodiment, the NDR mode used by the image acquisition device 100 can record a dynamic range of about 8-9 levels; the WDR mode can record a dynamic range of about 10-11 levels; the HDR mode can record a dynamic range of about 12-13 levels. Range; UHDR mode can record approximately more than 13 levels of dynamic range. The above is only an exemplary embodiment, and the classification method of the dynamic range mode is not limited to the above.
图2是依照本发明一实施例示出的动态范围模式的判定方法流程图。本实施例的方法适用于图1的图像获取装置100,以下即配合图像获取装置100中的各部件说明本实施例判定方法的详细步骤:Fig. 2 is a flowchart of a method for determining a dynamic range mode according to an embodiment of the present invention. The method of this embodiment is applicable to the image acquisition device 100 of FIG. 1 , and the detailed steps of the determination method of this embodiment are described below in conjunction with each component in the image acquisition device 100:
步骤S210,图像传感器110获取来源图像,并将来源图像储存于存储器120。接着,步骤S220,处理器130分析来源图像的亮暗程度,以决定来源图像的过曝(overexposure)区域与曝光不足(underexposure)区域。In step S210 , the image sensor 110 acquires a source image and stores the source image in the memory 120 . Next, in step S220, the processor 130 analyzes the brightness and darkness of the source image to determine an overexposure area and an underexposure area of the source image.
步骤S230,处理器130再依据权重图(weighting map)来计算过曝区域的一过曝估测值与曝光不足区域的一曝光不足估测值。由于对于使用者来说,对于所拍摄的图像通常可分为前景与背景,前景常为使用者在意的主体部份,因此,权重图例如是根据来源图像的前景区域与背景区域来给予不同的权重设定值。再将过曝区域对应的权重设定值进行运算,以获得过曝估测值。类似地,将曝光不足区域对应的权重设定值进行运算,则可获得曝光不足估测值。In step S230, the processor 130 calculates an overexposure estimated value of the overexposed area and an underexposed estimated value of the underexposed area according to the weighting map. For the user, the captured image can usually be divided into foreground and background, and the foreground is often the main part that the user cares about. Therefore, the weight map, for example, gives different weights according to the foreground area and background area of the source image. set value. Then, the weight setting value corresponding to the overexposure area is calculated to obtain an estimated overexposure value. Similarly, the estimated value of underexposure can be obtained by calculating the weight setting value corresponding to the underexposed area.
步骤S240,处理器130将过曝估测值与曝光不足估测值与一或多个临界值进行比较,据以判断目前适于图像获取装置100使用的动态范围模式。其中,临界值可由本领域具通常知识者依据实际应用情况做预先的设定,在此不限制其范围。简单来说,当处理器130判断过曝估测值与曝光不足估测值过大,代表目前拍摄场景中的亮暗差异范围过大,可能超出了图像传感器110的感光元件所能记录的色阶。因此必须转换图像获取装置100所使用的动态范围模式。In step S240 , the processor 130 compares the estimated overexposure value and the estimated underexposure value with one or more critical values, so as to determine the current dynamic range mode suitable for the image capturing device 100 . Wherein, the threshold value can be preset by those skilled in the art according to actual application conditions, and the scope thereof is not limited here. To put it simply, when the processor 130 judges that the estimated overexposure value and the estimated underexposure value are too large, it means that the range of the difference between light and dark in the current shooting scene is too large, which may exceed the color that the photosensitive element of the image sensor 110 can record. order. It is therefore necessary to switch the dynamic range mode used by the image capture device 100 .
图3是依照本发明一实施例示出的动态范围模式的转换示意图。请参照图3,当场景动态范围较低(即,拍摄场景的亮暗差异范围较小)时,则使用NDR模式即可。当场景动态范围逐渐变高(即,拍摄场景的亮暗差异范围逐渐增加),则可渐进式地调整动态范围模式为WDR模式、HDR模式及UHDR模式。Fig. 3 is a schematic diagram showing a conversion of a dynamic range mode according to an embodiment of the present invention. Referring to FIG. 3 , when the dynamic range of the scene is low (that is, the range of difference between light and dark of the shooting scene is small), the NDR mode can be used. When the dynamic range of the scene gradually increases (that is, the range of the difference between light and dark of the shooting scene gradually increases), the dynamic range mode can be gradually adjusted to WDR mode, HDR mode and UHDR mode.
由于图像传感器110的感光元件所能记录的动态范围为固定。因此,若要增加输出图像的动态范围,势必采用图像处理方法来达成。举例来说,本实施例的WDR模式例如可获取单张图像,通过处理器130中的图像处理模组来调整伽码曲线,也就是通过将图像暗部调亮并将过曝区域调暗后再输出处理后图像。The dynamic range that can be recorded by the photosensitive element of the image sensor 110 is fixed. Therefore, if the dynamic range of the output image is to be increased, an image processing method must be used to achieve it. For example, the WDR mode of this embodiment can acquire a single image, and adjust the gamma curve through the image processing module in the processor 130, that is, by brightening the dark part of the image and darkening the overexposed area before Output the processed image.
然而,利用单张图像进行后处理的方法所能调整的范围有限,因此,若场景动态范围持续增加,超出WDR模式所能处理的范围,则改为使用HDR模式及UHDR模式。However, the post-processing method using a single image can only be adjusted in a limited range. Therefore, if the dynamic range of the scene continues to increase and exceeds the range that WDR mode can handle, HDR mode and UHDR mode should be used instead.
本实施例所使用的HDR模式及UHDR模式,例如采用多重曝光技术,也就是控制图像传感器110在不同曝光或不同光圈下多次拍摄同一场景,并将获取的多张图像合并为兼顾亮部与暗部细节的单一处理后图像。更详细地说,本实施例的HDR模式的视频处理速度为每秒拍摄60张图像(或称为画面)并且每秒输出30张图像。其中,奇数张图像例如为短曝光拍摄,偶数张图像例如为长曝光拍摄。也就是说,以短曝光、长曝光的方式进行交错拍摄,并且每两张图像合成一张输出图像。本实施例的UHDR模式的视频处理速度为每秒拍摄30张图像并且每秒输出30/15张图像。同样以短曝光、长曝光的方式进行交错拍摄,并且每两张图像合成一张输出图像。UHDR模式与HDR模式不同的地方在于UHDR模式的曝光时间可提高为HDR模式的2倍,因此可具有更多暗部细节数据。The HDR mode and UHDR mode used in this embodiment, for example, adopt the multiple exposure technology, that is, control the image sensor 110 to shoot the same scene multiple times under different exposures or different apertures, and combine the acquired multiple images into one that takes into account both the bright part and the A single processed image of dark detail. In more detail, the video processing speed of the HDR mode of this embodiment is to capture 60 images (or referred to as frames) per second and output 30 images per second. Wherein, the odd-numbered images are, for example, short-exposure shots, and the even-numbered images are, for example, long-exposure shots. That is to say, interlaced shooting is performed in the manner of short exposure and long exposure, and every two images are synthesized into one output image. The video processing speed of the UHDR mode of this embodiment is to capture 30 images per second and output 30/15 images per second. Interleaved shooting is also carried out in the way of short exposure and long exposure, and every two images are synthesized into one output image. The difference between UHDR mode and HDR mode is that the exposure time of UHDR mode can be increased to 2 times that of HDR mode, so it can have more dark part detail data.
为了使本发明的内容更为明了,以下再举一实施例作为本发明确实能够据以实施的范例。In order to make the content of the present invention clearer, another embodiment is given below as an example of the actual implementation of the present invention.
图4是依照本发明另一实施例示出的动态范围模式的判定方法流程图。其中,图4是图2的动态范围模式的判定方法的一种详细实施方式。Fig. 4 is a flowchart of a method for determining a dynamic range mode according to another embodiment of the present invention. Wherein, FIG. 4 is a detailed implementation of the method for determining the dynamic range mode in FIG. 2 .
请参照图4,首先,获取来源图像,其中来源图像的尺寸为P*Q,P、Q为正整数(步骤S401)。接着,将来源图像分割为多个区块(步骤S403)。每一区块的尺寸例如为N*N,其中N为2的倍数,N<P且N<Q。Please refer to FIG. 4 , firstly, acquire a source image, wherein the size of the source image is P*Q, where P and Q are positive integers (step S401 ). Next, the source image is divided into multiple blocks (step S403). The size of each block is, for example, N*N, where N is a multiple of 2, N<P and N<Q.
接下来,分别计算每一个区块的亮度平均值(步骤S405)。也就是对于每一个区块,计算该区块内的所有像素的亮度平均值。然后,便可依据各个亮度平均值来分别判断各个区块是否属于过曝区域或曝光不足区域(步骤S407)。举例来说,若来源图像是以256色阶(8个位元)来呈现,若区块的亮度平均值为251~256则记录为过曝区域O;若区块的亮度平均值为1~10则记录为曝光不足区域U。图5A是依照本发明另一实施例示出的过曝区域与曝光不足区域的示意图。请参照图5A,假设来源图像具有25个区块,分别标示为b1~b25。其中,区块b1、b2、b19、b20、b24、b25标示为“U”,代表其为曝光不足区域;区块b3、b4、b7~b9、b12~b13、b16~b17标示为“O”,代表其为过曝区域;其余标示为“N”的区块则为曝光正常区域。Next, the average brightness of each block is calculated (step S405). That is, for each block, the average brightness of all pixels in the block is calculated. Then, it can be judged whether each block belongs to an over-exposed area or an under-exposed area according to each brightness average value (step S407). For example, if the source image is presented in 256 color levels (8 bits), if the average brightness of the block is 251-256, it will be recorded as the overexposure area O; if the average brightness of the block is 1-256 10 is recorded as an underexposed area U. FIG. 5A is a schematic diagram showing overexposed areas and underexposed areas according to another embodiment of the present invention. Please refer to FIG. 5A , assuming that the source image has 25 blocks, which are respectively marked as b1˜b25. Among them, blocks b1, b2, b19, b20, b24, and b25 are marked as "U", which means they are underexposed areas; blocks b3, b4, b7-b9, b12-b13, b16-b17 are marked as "O" , which means it is an over-exposed area; the other blocks marked with "N" are normal-exposed areas.
步骤S409,设定权重图的多个权重设定值。其中,每一权重设定值分别对应至来源图像的每一区块。举例来说,图5B是依照本发明另一实施例示出的权重图示意图。请参照图5B,权重图共具有25个权重设定值,分别标示为W1~W25。其中,权重设定值W1是对应至图5A的所示的区块b1,权重设定值W1的数值例如设定为1;权重设定值W2是对应至图5A的所示的区块b2,权重设定值W2的数值例如设定为1;依此类推。由图5B所示的权重图可知:越接近图像中心的权重设定值越高;反之,越接近图像周围的权重设定值越低。此种权重设定值设定方法是因为图像中心大多为前景或是使用者在意的主体区域,因此提高其权重设定值所占比例。Step S409, setting multiple weight setting values of the weight map. Wherein, each weight setting value corresponds to each block of the source image respectively. For example, FIG. 5B is a schematic diagram of a weight map according to another embodiment of the present invention. Referring to FIG. 5B , the weight map has a total of 25 weight setting values, which are respectively marked as W1 - W25 . Wherein, the weight setting value W1 is corresponding to the block b1 shown in FIG. 5A, and the value of the weight setting value W1 is set to 1, for example; the weight setting value W2 is corresponding to the block b2 shown in FIG. 5A , the value of the weight setting value W2 is set to 1, for example; and so on. From the weight diagram shown in FIG. 5B , it can be seen that the closer to the center of the image, the higher the weight setting value; conversely, the closer to the image periphery, the lower the weight setting value. This method of setting the weight setting value is because the center of the image is mostly the foreground or the subject area that the user cares about, so the proportion of the weight setting value is increased.
在另一实施例中,权重设定值的设定方法还包括可对来源图像执行人脸检测(face detection),以判断来源图像是否存在人脸区域。若是,则可另外提高人脸区域所属区块对应的权重设定值。In another embodiment, the method for setting the weight setting value further includes performing face detection on the source image to determine whether there is a face area in the source image. If yes, the weight setting value corresponding to the block to which the face area belongs may be increased additionally.
需说明的是,权重图并不限于以图5B所示的形式体现,其也可储存为表格或其他形式而事先储存于图像获取装置的存储器(例如是图1的存储器120)中,且对应不同的拍摄场景可以有多种不同形态的权重图,因此可由本领域具通常知识者依据实际拍摄场景选取适合的权重图。It should be noted that the weight map is not limited to the form shown in FIG. 5B , it can also be stored in a table or other forms and stored in the memory of the image acquisition device (such as the memory 120 in FIG. 1 ), and corresponds to Different shooting scenes may have weight maps in various forms, so those skilled in the art can select a suitable weight map according to the actual shooting scene.
权重图设定完成后,便可接续步骤S411,依据权重图来计算过曝区域的过曝估测值与曝光不足区域的曝光不足估测值。将过曝区域所对应的权重设定值进行运算以获得过曝估测值;并将曝光不足区域所对应的权重设定值进行运算以获得曝光不足估测值。在一实施例中,可将过曝区域所对应的权重设定值进行相加,以获得过曝估测值;并将曝光不足区域所对应的权重设定值进行相加以获得曝光不足估测值。以图5A与图5B为例做说明,过曝估测值为17,曝光不足估测值为7。相加过曝估测值与曝光不足估测值便可获得一估测值总和。After the setting of the weight map is completed, step S411 can be continued to calculate the estimated overexposure value of the overexposed area and the estimated underexposure value of the underexposed area according to the weight map. The weight setting value corresponding to the overexposed area is calculated to obtain an estimated overexposure value; and the weight setting value corresponding to the underexposed area is calculated to obtain an estimated underexposure value. In one embodiment, the weight setting values corresponding to the overexposed areas can be added to obtain an overexposed estimated value; and the weighted settings corresponding to the underexposed areas can be added to obtain an underexposed estimated value value. Taking FIG. 5A and FIG. 5B as an example for illustration, the estimated value of overexposure is 17, and the estimated value of underexposure is 7. A sum of estimated values can be obtained by adding the estimated overexposure value and the estimated underexposure value.
在步骤S413,判断该估测值总和是否在第一临界值TH1与第二临界值TH2之间。若是,则适于图像获取装置使用的操作模式即为WDR模式(步骤S415)。若否,则接续步骤S417。In step S413, it is determined whether the sum of estimated values is between the first threshold TH1 and the second threshold TH2. If yes, the operation mode suitable for the image capture device is the WDR mode (step S415 ). If not, continue to step S417.
在步骤S417,判断估测值总和是否在第二临界值TH2与第三临界值TH3之间。若是,则适于图像获取装置使用的操作模式即为HDR模式(步骤S419)。若否,则接续步骤S421。In step S417, it is determined whether the sum of estimated values is between the second threshold TH2 and the third threshold TH3. If yes, the operating mode suitable for the image capturing device is the HDR mode (step S419 ). If not, continue to step S421.
步骤S421,判断估测值总和是否大于第三临界值TH3。若是,则适于图像获取装置使用的操作模式即为UHDR模式(步骤S423)。若否,则接续步骤S425,适于图像获取装置使用的操作模式即为NDR模式。上述的第一、第二以及第三临界值TH1、TH2以及TH3的设定会随权重设定值的数值不同而有所变动,因此可由本领域具通常知识者依据实际应用情况做设定,在此不加以限制。Step S421, judging whether the sum of estimated values is greater than a third threshold TH3. If yes, the operation mode suitable for the image capture device is the UHDR mode (step S423 ). If not, continue to step S425, and the operation mode suitable for the image acquisition device is the NDR mode. The setting of the above-mentioned first, second and third critical values TH1, TH2 and TH3 will vary with the value of the weight setting value, so it can be set by those skilled in the art according to the actual application situation. No limitation is imposed here.
须说明的是,当图像获取装置进行实时(real-time)视频处理时,仍适合使用图2或图4所示的方法流程来进行检测判断。因为本发明仅利用一张来源图像进行检测,便可判断适合使用的动态范围模式,具有复杂度低且运算速度快的优点,因此符合实时性的时间要求。另外,本发明虽可针对视频中的每一画面(frame)进行检测并判断动态范围模式,但在一实施例中,图像获取装置例如可设定当连续M(M为正整数)张画面都判断为相同的动态范围模式后,才进行切换。如此一来,可避免动态范围模式的切换过于频繁而影响图像获取装置的处理效率。It should be noted that when the image acquisition device performs real-time video processing, it is still suitable to use the method flow shown in FIG. 2 or FIG. 4 for detection and judgment. Because the present invention uses only one source image for detection, it can determine the suitable dynamic range mode, which has the advantages of low complexity and fast calculation speed, and thus meets the time requirement of real-time performance. In addition, although the present invention can detect and determine the dynamic range mode for each frame in the video, in one embodiment, the image acquisition device can be set, for example, when consecutive M (M is a positive integer) frames are Switching is performed after judging that the dynamic range modes are the same. In this way, it is possible to prevent the switching of the dynamic range mode from being too frequent and affecting the processing efficiency of the image acquisition device.
综上所述,本发明所提供的图像获取装置在进行视频处理时,可通过检测一来源图像的亮暗比例来判断目前拍摄场景的动态范围变化,进而适应性选择并自动切换适于图像获取装置使用的动态范围模式。据此,可省去使用者通过人眼判别拍摄场景变化并且手动调整动态范围模式的麻烦及困扰。此外,本发明所提供的动态范围模式的判定方法具有复杂度低且运算速度快的优点,因此符合视频处理的实时性要求。To sum up, when the image acquisition device provided by the present invention is performing video processing, it can judge the dynamic range change of the current shooting scene by detecting the ratio of light and dark of a source image, and then adaptively select and automatically switch suitable for image acquisition. The dynamic range mode used by the device. Accordingly, the user can save the trouble and trouble of judging the change of the shooting scene by human eyes and manually adjusting the dynamic range mode. In addition, the determination method of the dynamic range mode provided by the present invention has the advantages of low complexity and fast calculation speed, thus meeting the real-time requirements of video processing.
虽然本发明已举出实施例如上,但是其并不是用来限定本发明,任何所属技术领域中具有通常知识者,在不脱离本发明的精神和范围内,当可作些许的更动与润饰,故本发明的保护范围当视后面的权利要求书所界定的为准。Although the present invention has cited the above examples, it is not intended to limit the present invention. Anyone with ordinary knowledge in the technical field may make some changes and modifications without departing from the spirit and scope of the present invention. , so the protection scope of the present invention should be as defined by the following claims.
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than limiting them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: It is still possible to modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the various embodiments of the present invention. scope.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310084357.8A CN104052933A (en) | 2013-03-15 | 2013-03-15 | Method for judging dynamic range mode and image acquisition device thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310084357.8A CN104052933A (en) | 2013-03-15 | 2013-03-15 | Method for judging dynamic range mode and image acquisition device thereof |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104052933A true CN104052933A (en) | 2014-09-17 |
Family
ID=51505265
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310084357.8A Pending CN104052933A (en) | 2013-03-15 | 2013-03-15 | Method for judging dynamic range mode and image acquisition device thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104052933A (en) |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104639845A (en) * | 2015-03-17 | 2015-05-20 | 上海兆芯集成电路有限公司 | Generation method for high dynamic range image and device using method |
CN105376490A (en) * | 2015-11-19 | 2016-03-02 | 浙江宇视科技有限公司 | Mode switching method, mode switching apparatus and terminal device using mode switching method |
CN105407295A (en) * | 2015-10-30 | 2016-03-16 | 努比亚技术有限公司 | Mobile terminal photographing device and method |
CN105828065A (en) * | 2015-01-08 | 2016-08-03 | 中国移动通信集团浙江有限公司 | Method and device for detecting video picture overexposure |
CN106067177A (en) * | 2016-06-15 | 2016-11-02 | 深圳市万普拉斯科技有限公司 | HDR scene method for detecting and device |
CN107454343A (en) * | 2014-11-28 | 2017-12-08 | 广东欧珀移动通信有限公司 | Photographic method, camera arrangement and terminal |
CN108564558A (en) * | 2018-01-05 | 2018-09-21 | 广州广电运通金融电子股份有限公司 | Wide dynamic images processing method, device, equipment and storage medium |
WO2019072190A1 (en) * | 2017-10-12 | 2019-04-18 | Oppo广东移动通信有限公司 | Image processing method, electronic apparatus, and computer readable storage medium |
CN110381263A (en) * | 2019-08-20 | 2019-10-25 | Oppo广东移动通信有限公司 | Image processing method, image processing device, storage medium and electronic equipment |
CN110392214A (en) * | 2019-08-05 | 2019-10-29 | Oppo广东移动通信有限公司 | Image processing method, image processing device, storage medium and electronic equipment |
CN110830789A (en) * | 2018-08-07 | 2020-02-21 | 杭州海康威视数字技术股份有限公司 | Overexposure detection method and device and overexposure suppression method and device |
CN112217999A (en) * | 2020-09-23 | 2021-01-12 | 浙江大华技术股份有限公司 | Wide dynamic mode adjusting method and device, electronic equipment and storage medium |
CN114549359A (en) * | 2022-02-24 | 2022-05-27 | 中国传媒大学 | HDR video dynamic range reference-free quality evaluation method |
WO2022151054A1 (en) * | 2021-01-13 | 2022-07-21 | 深圳市大疆创新科技有限公司 | Image processing method and apparatus, and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002218326A (en) * | 2001-01-19 | 2002-08-02 | Olympus Optical Co Ltd | Imaging device |
US20030001962A1 (en) * | 2001-06-29 | 2003-01-02 | Tetsuo Sakurai | Image pickup device and video signal processing method |
CN101345820A (en) * | 2008-08-01 | 2009-01-14 | 中兴通讯股份有限公司 | Image brightness reinforcing method |
WO2012050728A1 (en) * | 2010-09-30 | 2012-04-19 | Apple Inc. | High dynamic range transition |
-
2013
- 2013-03-15 CN CN201310084357.8A patent/CN104052933A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002218326A (en) * | 2001-01-19 | 2002-08-02 | Olympus Optical Co Ltd | Imaging device |
US20030001962A1 (en) * | 2001-06-29 | 2003-01-02 | Tetsuo Sakurai | Image pickup device and video signal processing method |
CN101345820A (en) * | 2008-08-01 | 2009-01-14 | 中兴通讯股份有限公司 | Image brightness reinforcing method |
WO2012050728A1 (en) * | 2010-09-30 | 2012-04-19 | Apple Inc. | High dynamic range transition |
Cited By (22)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107454343B (en) * | 2014-11-28 | 2019-08-02 | Oppo广东移动通信有限公司 | Photographic method, camera arrangement and terminal |
CN107454343A (en) * | 2014-11-28 | 2017-12-08 | 广东欧珀移动通信有限公司 | Photographic method, camera arrangement and terminal |
CN105828065A (en) * | 2015-01-08 | 2016-08-03 | 中国移动通信集团浙江有限公司 | Method and device for detecting video picture overexposure |
CN105828065B (en) * | 2015-01-08 | 2017-11-21 | 中国移动通信集团浙江有限公司 | A kind of video pictures overexposure detection method and device |
CN104639845A (en) * | 2015-03-17 | 2015-05-20 | 上海兆芯集成电路有限公司 | Generation method for high dynamic range image and device using method |
CN104639845B (en) * | 2015-03-17 | 2017-12-26 | 上海兆芯集成电路有限公司 | High dynamic range images production method and the device using this method |
CN105407295B (en) * | 2015-10-30 | 2019-02-22 | 努比亚技术有限公司 | Mobile terminal filming apparatus and method |
CN105407295A (en) * | 2015-10-30 | 2016-03-16 | 努比亚技术有限公司 | Mobile terminal photographing device and method |
CN105376490B (en) * | 2015-11-19 | 2019-03-12 | 浙江宇视科技有限公司 | The terminal device of one mode switching method, device and use pattern switching method |
CN105376490A (en) * | 2015-11-19 | 2016-03-02 | 浙江宇视科技有限公司 | Mode switching method, mode switching apparatus and terminal device using mode switching method |
CN106067177A (en) * | 2016-06-15 | 2016-11-02 | 深圳市万普拉斯科技有限公司 | HDR scene method for detecting and device |
WO2019072190A1 (en) * | 2017-10-12 | 2019-04-18 | Oppo广东移动通信有限公司 | Image processing method, electronic apparatus, and computer readable storage medium |
CN108564558A (en) * | 2018-01-05 | 2018-09-21 | 广州广电运通金融电子股份有限公司 | Wide dynamic images processing method, device, equipment and storage medium |
CN110830789A (en) * | 2018-08-07 | 2020-02-21 | 杭州海康威视数字技术股份有限公司 | Overexposure detection method and device and overexposure suppression method and device |
CN110392214A (en) * | 2019-08-05 | 2019-10-29 | Oppo广东移动通信有限公司 | Image processing method, image processing device, storage medium and electronic equipment |
CN110381263A (en) * | 2019-08-20 | 2019-10-25 | Oppo广东移动通信有限公司 | Image processing method, image processing device, storage medium and electronic equipment |
CN110381263B (en) * | 2019-08-20 | 2021-04-13 | Oppo广东移动通信有限公司 | Image processing method, device, storage medium and electronic device |
CN112217999A (en) * | 2020-09-23 | 2021-01-12 | 浙江大华技术股份有限公司 | Wide dynamic mode adjusting method and device, electronic equipment and storage medium |
CN112217999B (en) * | 2020-09-23 | 2022-02-18 | 浙江大华技术股份有限公司 | Wide dynamic mode adjusting method and device, electronic equipment and storage medium |
WO2022151054A1 (en) * | 2021-01-13 | 2022-07-21 | 深圳市大疆创新科技有限公司 | Image processing method and apparatus, and storage medium |
CN114549359A (en) * | 2022-02-24 | 2022-05-27 | 中国传媒大学 | HDR video dynamic range reference-free quality evaluation method |
CN114549359B (en) * | 2022-02-24 | 2024-04-02 | 中国传媒大学 | HDR video dynamic range non-reference quality evaluation method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104052933A (en) | Method for judging dynamic range mode and image acquisition device thereof | |
CN111028189B (en) | Image processing method, device, storage medium and electronic equipment | |
CN107635102B (en) | Method and device for acquiring exposure compensation value of high-dynamic-range image | |
CN110225248B (en) | Image acquisition method and device, electronic equipment and computer readable storage medium | |
CN103826066B (en) | Automatic exposure adjusting method and system | |
WO2019183813A1 (en) | Image capture method and device | |
TWI682664B (en) | Method for generating an hdr image of a scene based on a tradeoff between brightness distribution and motion | |
US9357138B2 (en) | Image capture apparatus, method of controlling image capture apparatus, and electronic device | |
CN105578068B (en) | A kind of generation method of high dynamic range images, device and mobile terminal | |
CN108616689B (en) | Portrait-based high dynamic range image acquisition method, device and equipment | |
CN108337446B (en) | High dynamic range image acquisition method, device and equipment based on double cameras | |
KR20110043162A (en) | Multiple exposure control device and method | |
JP2010103634A (en) | Imaging apparatus, imaging method, and program | |
CN103973983A (en) | Method for intelligently adjusting brightness of picture on basis of detection of environmental brightness in photographing | |
CN108337449A (en) | High dynamic range image acquisition method, device and equipment based on double cameras | |
CN110493539B (en) | Automatic exposure processing method, processing device and electronic device | |
JP2015035796A (en) | Method for controlling exposure duration of high dynamic range image | |
US11496694B2 (en) | Dual sensor imaging system and imaging method thereof | |
CN110290325B (en) | Image processing method, device, storage medium and electronic device | |
JP2017112462A (en) | Imaging device and control method, program therefor and storage medium | |
EP2763396A1 (en) | Automatic exposure bracketing | |
CN113747062B (en) | HDR scene detection method and device, terminal and readable storage medium | |
JP5257487B2 (en) | Imaging apparatus, imaging method, and program | |
WO2015192545A1 (en) | Photographing method and apparatus and computer storage medium | |
CN110266965B (en) | Image processing method, image processing device, storage medium and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20140917 |
|
WD01 | Invention patent application deemed withdrawn after publication |