技术领域technical field
本发明涉及图像处理技术领域,特别是涉及一种局部HDR的实现方法及系统。The present invention relates to the technical field of image processing, in particular to a method and system for realizing partial HDR.
背景技术Background technique
HDR(高动态范围图像:High-Dynamic Range)主要适用于光线反差比较大或者逆光的场景。拍摄原理为一次拍摄不同曝光值的照片,最后得到一张光线反差小的照片或者光线不是很暗的照片。HDR (High-Dynamic Range: High-Dynamic Range) is mainly suitable for scenes with large light contrast or backlighting. The shooting principle is to take photos with different exposure values at one time, and finally get a photo with little light contrast or a photo with not very dark light.
在实现过程中,发明人发现传统技术中至少存在如下问题:在拍摄一些光线反差比较大的场景的时候,例如办公桌的上下场景(办公桌上面的光线比较亮、办公桌下面的光线比较暗)、有太阳照射的风景照(太阳光线上面的光线比较亮、太阳光线下面的光线比较暗),只需要将比较暗的区域拍的亮一点即可,而不需要更改光线比较好的区域的曝光值;但是传统技术无法对图像部分区域进行局部HDR处理。During the implementation process, the inventor found that at least the following problems existed in the traditional technology: when shooting some scenes with relatively large light contrast, such as the upper and lower scenes of the desk (the light above the desk is brighter, and the light below the desk is darker) ), landscape photos with sunlight (the light above the sun is brighter, and the light below the sun is darker), you only need to make the darker areas brighter, without changing the area with better light Exposure value; however, traditional techniques cannot perform local HDR processing on some areas of the image.
发明内容Contents of the invention
基于此,有必要针对传统技术无法对图像部分区域进行局部HDR处理的技术问题,提供一种局部HDR的实现方法及系统。Based on this, it is necessary to provide a partial HDR implementation method and system for the technical problem that the traditional technology cannot perform local HDR processing on some areas of the image.
为了实现上述目的,本发明技术方案的实施例为:In order to achieve the above object, the embodiment of the technical solution of the present invention is:
一方面,提供了局部HDR的实现方法,包括以下步骤:On the one hand, a partial HDR implementation method is provided, including the following steps:
获取图像获取设备的当前预览帧;Get the current preview frame of the image acquisition device;
对当前预览帧进行区域选取,得到当前预览帧的一个或多个局部曝光区域;Perform area selection on the current preview frame to obtain one or more partial exposure areas of the current preview frame;
根据局部曝光区域的区域灰度数据,对局部曝光区域的像素点进行HDR合成处理,得到局部HDR图像。According to the regional grayscale data of the partial exposure area, HDR composite processing is performed on the pixels of the partial exposure area to obtain a partial HDR image.
另一方面,提供了一种局部HDR的实现系统,包括:On the other hand, a partial HDR implementation system is provided, including:
获取预览帧单元,用于获取图像获取设备的当前预览帧;Obtaining a preview frame unit, used to obtain the current preview frame of the image acquisition device;
区域选取单元,用于对当前预览帧进行区域选取,得到当前预览帧的一个或多个局部曝光区域;an area selection unit, configured to perform area selection on the current preview frame to obtain one or more partial exposure areas of the current preview frame;
HDR合成处理单元,用于根据局部曝光区域的区域灰度数据,对局部曝光区域的像素点进行HDR合成处理,得到局部HDR图像。The HDR synthesis processing unit is configured to perform HDR synthesis processing on pixels in the local exposure area according to the regional grayscale data of the local exposure area to obtain a local HDR image.
上述技术方案具有如下有益效果:The above technical scheme has the following beneficial effects:
本发明局部HDR的实现方法及系统,提供了一种局部HDR的实现方式,在用户通过图像获取设备获取光线反差大的场景的图像时,可以通过本发明选择局部HDR功能,选取多个曝光区域;根据选取出的需要调整曝光值的部分区域,本发明对需要局部调节曝光值的区域进行HDR拍摄,可以得到具有局部HDR效果的图像。本发明能够根据用户实际需求对图像部分区域进行局部HDR处理。The implementation method and system of partial HDR of the present invention provide a partial HDR implementation. When the user obtains an image of a scene with a large light contrast through an image acquisition device, the partial HDR function can be selected through the present invention, and multiple exposure areas can be selected. ; According to the selected partial area that needs to adjust the exposure value, the present invention performs HDR shooting on the area where the exposure value needs to be adjusted locally, and an image with a partial HDR effect can be obtained. The present invention can perform local HDR processing on partial areas of images according to actual needs of users.
附图说明Description of drawings
图1为本发明局部HDR的实现方法实施例1的流程示意图;FIG. 1 is a schematic flow diagram of Embodiment 1 of the implementation method of local HDR in the present invention;
图2为本发明局部HDR的实现方法实施例2的流程示意图;FIG. 2 is a schematic flow diagram of Embodiment 2 of the implementation method of local HDR in the present invention;
图3为本发明局部HDR的实现方法实施例3的流程示意图;FIG. 3 is a schematic flow diagram of Embodiment 3 of the implementation method of local HDR in the present invention;
图4为本发明局部HDR的实现方法一具体实施例的流程示意图;FIG. 4 is a schematic flow diagram of a specific embodiment of a partial HDR implementation method in the present invention;
图5为本发明局部HDR的实现系统实施例1的结构示意图;FIG. 5 is a schematic structural diagram of Embodiment 1 of the realization system of partial HDR of the present invention;
图6为本发明局部HDR的实现系统实施例2的结构示意图;FIG. 6 is a schematic structural diagram of Embodiment 2 of the implementation system of partial HDR in the present invention;
图7为本发明局部HDR的实现系统实施例3的结构示意图;FIG. 7 is a schematic structural diagram of Embodiment 3 of the implementation system of partial HDR in the present invention;
图8为本发明局部HDR的实现系统一具体实施例的结构示意图。FIG. 8 is a schematic structural diagram of a specific embodiment of a partial HDR implementation system according to the present invention.
具体实施方式detailed description
为了便于理解本发明,下面将参照相关附图对本发明进行更全面的描述。附图中给出了本发明的首选实施例。但是,本发明可以以许多不同的形式来实现,并不限于本文所描述的实施例。相反地,提供这些实施例的目的是使对本发明的公开内容更加透彻全面。In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the associated drawings. A preferred embodiment of the invention is shown in the drawings. However, the present invention can be embodied in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that the disclosure of the present invention will be thorough and complete.
除非另有定义,本文所使用的所有的技术和科学术语与属于本发明的技术领域的技术人员通常理解的含义相同。本文中在本发明的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本发明。本文所使用的术语“及/或”包括一个或多个相关的所列项目的任意的和所有的组合。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field of the invention. The terms used herein in the description of the present invention are for the purpose of describing specific embodiments only, and are not intended to limit the present invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
本发明局部HDR的实现方法实施例1:Embodiment 1 of the implementation method of local HDR in the present invention:
为了解决传统技术无法对图像部分区域进行局部HDR处理的技术问题,本发明提供了一种局部HDR的实现方法实施例1;图1为本发明局部HDR的实现方法实施例1的流程示意图,如图1所示,可以包括以下步骤:In order to solve the technical problem that the traditional technology cannot perform partial HDR processing on some areas of the image, the present invention provides a partial HDR implementation method embodiment 1; FIG. 1 is a schematic flow diagram of the partial HDR implementation method embodiment 1 of the present invention, as shown in As shown in Figure 1, the following steps may be included:
步骤S110:获取图像获取设备的当前预览帧;Step S110: Obtain the current preview frame of the image acquisition device;
步骤S120:对当前预览帧进行区域选取,得到当前预览帧的一个或多个局部曝光区域;Step S120: performing area selection on the current preview frame to obtain one or more partial exposure areas of the current preview frame;
步骤S130:根据局部曝光区域的区域灰度数据,对局部曝光区域的像素点进行HDR合成处理,得到局部HDR图像。Step S130: According to the regional grayscale data of the partial exposure region, perform HDR composition processing on the pixels in the partial exposure region to obtain a partial HDR image.
具体而言,不同于传统技术中HDR(高动态范围图像:High-Dynamic Range)仅仅对一帧数据的所有像素点做曝光处理,这一帧数据的所有像素点曝光都是一样,即整个数据帧区域的曝光值都是一样的;而本发明在获取当前预览帧后,对当前预览帧进行区域选取,得到当前预览帧的一个或多个局部曝光区域,只对需要进行曝光的区域(局部曝光区域)的所有像素点进行曝光处理。并且根据不同区域的实际需求(区域灰度数据不同),不同的区域的曝光值可以不同。因此在本发明步骤S130中,局部曝光区域的区域灰度数据可以包括根据相关图像灰度算法得到的灰度平均值、灰度平均方差以及灰度值,基于不同区域灰度数据,针对不同的局部曝光区域可以采用不同曝光值的HDR合成处理,从而得到局部HDR图像。Specifically, unlike the traditional HDR (High-Dynamic Range image: High-Dynamic Range) which only exposes all pixels of a frame of data, the exposure of all pixels of this frame of data is the same, that is, the entire data The exposure values of the frame areas are all the same; and the present invention selects the area of the current preview frame after obtaining the current preview frame, obtains one or more partial exposure areas of the current preview frame, and only needs to expose the area (local All pixels in the exposure area) are subjected to exposure processing. And according to the actual needs of different regions (regional grayscale data is different), the exposure values of different regions may be different. Therefore, in step S130 of the present invention, the regional grayscale data of the local exposure region may include the grayscale average value, grayscale average variance, and grayscale value obtained according to the relevant image grayscale algorithm, based on different regional grayscale data, for different The partial exposure area can be processed by HDR composition with different exposure values, so as to obtain a partial HDR image.
在一个具体示例中,图像获取设备可以为各类具备HDR功能的摄像机、相机或摄像头等设备。In a specific example, the image acquisition device may be various types of video cameras, cameras, or cameras with HDR functions.
本发明局部HDR的实现方法实施例1,提供了一种局部HDR的实现方式,在用户通过图像获取设备获取光线反差大的场景的图像时,可以通过本发明选择局部HDR功能,选取多个曝光区域;根据选取出的需要调整曝光值的部分区域,本发明对需要局部调节曝光值的区域进行HDR拍摄,可以得到具有局部HDR效果的图像。本发明能够根据用户实际需求对图像部分区域进行局部HDR处理。Embodiment 1 of the implementation method of partial HDR of the present invention provides a partial HDR implementation. When the user obtains an image of a scene with a large light contrast through an image acquisition device, the partial HDR function can be selected through the present invention, and multiple exposures can be selected. Area: According to the selected partial area where the exposure value needs to be adjusted, the present invention performs HDR shooting on the area where the exposure value needs to be adjusted locally, and an image with a partial HDR effect can be obtained. The present invention can perform local HDR processing on partial areas of images according to actual needs of users.
图2为本发明局部HDR的实现方法实施例2的流程示意图;如图2所示,在一个具体的实施例中,步骤S120对所述当前预览帧进行区域选取,得到所述当前预览帧的一个或多个局部曝光区域的步骤可以包括:Fig. 2 is a schematic flow diagram of Embodiment 2 of the implementation method of partial HDR of the present invention; as shown in Fig. 2, in a specific embodiment, step S120 performs area selection on the current preview frame to obtain the current preview frame The step of partially exposing one or more regions may include:
步骤S210:监听当前预览帧的选框事件,获取一个或多个区域框;Step S210: Listening to the marquee event of the current preview frame to obtain one or more area frames;
步骤S220:将区域框包含的像素区域确定为局部曝光区域。Step S220: Determine the pixel area included in the area frame as the partial exposure area.
具体而言,可以通过用户的手动选框操作,让用户根据自身需求在移动终端上移动、放大、缩小曝光区域矩形框,并将用户选取的区域框包含的像素区域确定为局部曝光区域,从而进行根据局部曝光区域的区域灰度数据,对局部曝光区域的像素点进行HDR合成处理,得到局部HDR图像的步骤。Specifically, through the user's manual frame selection operation, the user can move, zoom in, and shrink the rectangular frame of the exposure area on the mobile terminal according to his own needs, and determine the pixel area included in the area frame selected by the user as the partial exposure area, thereby A step of performing HDR composition processing on pixels in the partially exposed area according to the regional grayscale data of the partially exposed area to obtain a partially HDR image.
在一个具体示例中,用户可以手动选择一个或多个局部曝光区域;然后由图像获取设备获取HDR照片,假如获取的是3张曝光值照片,可分别对三张照片做出处理,并只对曝光区域进行HDR合成处理;合成处理完毕后,即可得到一张具有局部HDR效果的图像。In a specific example, the user can manually select one or more partial exposure areas; then the image acquisition device acquires HDR photos. If three exposure value photos are obtained, the three photos can be processed separately, and only The exposure area is subjected to HDR synthesis processing; after the synthesis processing is completed, an image with a local HDR effect can be obtained.
图3为本发明局部HDR的实现方法实施例3的流程示意图;如图3所示,在一个具体的实施例中,在一个具体的实施例中,步骤S120对当前预览帧进行区域选取,得到当前预览帧的一个或多个局部曝光区域的步骤可以包括:Fig. 3 is a schematic flow chart of Embodiment 3 of the implementation method of partial HDR of the present invention; as shown in Fig. 3, in a specific embodiment, in a specific embodiment, step S120 performs region selection on the current preview frame, and obtains The step of previewing one or more partial exposure regions of the current frame may include:
步骤S310:根据图像获取设备的拍摄参数,对当前预览帧进行区域划分,得到当前预览帧的多个待曝光区域;Step S310: according to the shooting parameters of the image acquisition device, perform region division on the current preview frame to obtain multiple to-be-exposed regions of the current preview frame;
步骤S320:对多个待曝光区域进行选取,得到局部曝光区域。Step S320: Select a plurality of regions to be exposed to obtain partial exposure regions.
具体而言,若用户没有进行手动选取曝光区域的操作,可以通过本发明中的局部HDR算法自动获取局部曝光区域。从而根据用户实际需求对图像部分区域的曝光值进行调整。其中,对当前预览帧进行区域划分的步骤中,具体划分出的待曝光区域的个数可在实际应用中进行设定;例如,根据图像获取设备的拍摄参数(可以是图像获取设备自身的参数,例如拍摄条件、相机设置、色彩编码等;也可以是拍摄照片时使用的参数,例如快门、光圈、ISO、EV值、是否开闪光灯等),可以将图像获取设备屏幕上的预览区域平分为6等份(基于设备和拍摄场景的实际情况,以及用户的实际需求,也可采取其它区域划分的方式)。Specifically, if the user does not manually select the exposure area, the partial exposure area can be automatically obtained through the local HDR algorithm in the present invention. In this way, the exposure value of some areas of the image is adjusted according to the actual needs of the user. Wherein, in the step of dividing the area of the current preview frame, the number of areas to be exposed can be set in practical applications; for example, according to the shooting parameters of the image acquisition device (which can be the parameters of the image acquisition device , such as shooting conditions, camera settings, color coding, etc.; it can also be the parameters used when taking photos, such as shutter speed, aperture, ISO, EV value, whether to open the flash, etc.), the preview area on the screen of the image acquisition device can be divided into two equal parts 6 equal parts (based on the actual situation of the equipment and the shooting scene, as well as the actual needs of the user, other ways of dividing the area can also be adopted).
在一个具体的实施例中,对多个待曝光区域进行选取,得到局部曝光区域的步骤包括:In a specific embodiment, the step of selecting a plurality of regions to be exposed to obtain a partial exposure region includes:
对待曝光区域的YUV数据进行亮度分析,获取待曝光区域的灰度均值;Perform brightness analysis on the YUV data of the area to be exposed to obtain the average gray value of the area to be exposed;
在灰度均值小于预设的正常亮度下限阈值或大于预设的正常亮度上限阈值时,将灰度均值对应的待曝光区域确定为局部曝光区域。When the average gray value is smaller than the preset lower threshold of normal brightness or greater than the upper threshold of preset normal brightness, the area to be exposed corresponding to the average gray value is determined as the partial exposure area.
具体而言,如果用户选择自动处理,本发明可对当前预览帧进行分析,通过对预览的YUV数据进行亮度分析,具体分析办法就是对Y数据进行判断,例如预设的正常亮度范围为60到190,那么亮度范围为0到60、190到255的区域就被识别为局部曝光区域,正常的亮度范围可由局部HDR算法预先进行设定,在实际应用中,也可以对正常的亮度范围更改;其中,YUV数据包括为三个分量,“Y”表示明亮度(Luminance或Luma),也就是灰度值;而“U”和“V”表示色度(Chrominance或Chroma),一帧YUV数据由Y数据和UV数据组成。Specifically, if the user selects automatic processing, the present invention can analyze the current preview frame, by performing brightness analysis on the previewed YUV data, the specific analysis method is to judge the Y data, for example, the preset normal brightness range is 60 to 190, then the area with a brightness range of 0 to 60, 190 to 255 is recognized as a partial exposure area. The normal brightness range can be pre-set by the local HDR algorithm. In practical applications, the normal brightness range can also be changed; Among them, YUV data includes three components, "Y" represents brightness (Luminance or Luma), that is, grayscale value; while "U" and "V" represent chroma (Chrominance or Chroma), a frame of YUV data consists of Composed of Y data and UV data.
在一个具体的实施例中,对待曝光区域的YUV数据进行亮度分析,获取待曝光区域的灰度均值的步骤包括:In a specific embodiment, the brightness analysis is performed on the YUV data of the area to be exposed, and the step of obtaining the average gray value of the area to be exposed includes:
分别获取待曝光区域各像素点的灰度值,对灰度值进行求和处理,得到灰度和值;Obtain the gray value of each pixel in the area to be exposed, and sum the gray value to obtain the gray value;
根据灰度和值,得到灰度均值。According to the gray level sum value, the gray level mean value is obtained.
具体而言,可以对灰度和值进行求取平均值处理,得到灰度均值;也可以对灰度和值进行参数的拟合、修正或特征提取处理,得到相应的灰度特征值后,再根据灰度特征值得到灰度均值。Specifically, the average value of the gray level and value can be calculated to obtain the gray mean value; the parameter fitting, correction or feature extraction can also be performed on the gray level and value, and after the corresponding gray level feature value is obtained, Then the gray mean value is obtained according to the gray feature value.
在一个具体示例中,一个像素点对应一个Y值,而一帧YUV数据对应一组Y数据;当前区域的Y值决定了当前区域的曝光值;在将当前预览帧分为多个待曝光区域后,分别获取待曝光区域中每个像素点的Y值,然后对像素点(N个)的Y值求取平均值,最后得到该曝光区域(多个待曝光区域中的某一个)的Y值;具体可以通过以下公式得到该曝光区域的整个区域的Y值(灰度均值):In a specific example, a pixel corresponds to a Y value, and a frame of YUV data corresponds to a set of Y data; the Y value of the current area determines the exposure value of the current area; when the current preview frame is divided into multiple areas to be exposed Finally, obtain the Y value of each pixel in the area to be exposed respectively, then calculate the average value of the Y values of the pixels (N), and finally obtain the Y value of the exposed area (one of the multiple areas to be exposed) Value; Specifically, the Y value (mean gray value) of the entire area of the exposure area can be obtained by the following formula:
其中,Y表示某个曝光区域的灰度均值;YN表示该曝光区域中每个像素点的Y值;N表示该曝光区域中像素点的个数。Among them, Y represents the average gray value of a certain exposure area; YN represents the Y value of each pixel in the exposure area; N represents the number of pixels in the exposure area.
综上,可以通过本发明局部HDR的实现方法实施例3自动选择一个或多个局部曝光区域;然后由图像获取设备获取HDR照片,假如获取的是3张曝光值照片,可分别对三张照片做的局部曝光区域进行HDR合成处理;合成处理完毕后,即可得到一张具有局部HDR效果的图像。To sum up, one or more partial exposure areas can be automatically selected through Embodiment 3 of the implementation method of partial HDR of the present invention; then the HDR photos are obtained by the image acquisition device. If three exposure value photos are obtained, the three photos can be respectively The partial exposure area is processed by HDR synthesis; after the synthesis processing is completed, an image with partial HDR effect can be obtained.
为了进一步详细阐述本发明的技术方案,特以将本发明应用于具备HDR功能的移动终端为例,说明本发明方法的实现过程;图4为本发明局部HDR的实现方法一具体实施例的流程示意图;如图4所示,可以包括:In order to further elaborate on the technical solution of the present invention, the application of the present invention to a mobile terminal with HDR function is taken as an example to illustrate the implementation process of the method of the present invention; FIG. 4 is a flow chart of a specific embodiment of the partial HDR implementation method of the present invention Schematic diagram; as shown in Figure 4, may include:
步骤S410:拍摄光线反差大的场景时,由用户选取局部HDR功能或者在移动终端根据获取的场景灰度值(在获取的场景灰度值超过预设阈值时,确定图像获取设备所处的场景光线反差较大),直接自动进入局部HDR功能;Step S410: When shooting a scene with high light contrast, the user selects the local HDR function or the mobile terminal determines the scene where the image acquisition device is located according to the acquired scene gray value (when the acquired scene gray value exceeds the preset threshold value) Light contrast is large), directly and automatically enter the local HDR function;
步骤S420:选择局部曝光区域,包括手动和自动两种(在一个具体示例中,手动和自动是互斥的,选择了手动,自动就失效):Step S420: Select a partial exposure area, including manual and automatic (in a specific example, manual and automatic are mutually exclusive, if manual is selected, automatic will be invalid):
如果用户选择手动,用户可在移动终端屏幕上移动、放大、缩小曝光区域矩形框;If the user chooses manual, the user can move, zoom in, and zoom out the rectangular frame of the exposure area on the screen of the mobile terminal;
如果用户选择自动,局部HDR的实现系统可自动对当前的预览场景(当前预览帧)进行自动识别分析,通过对预览的YUV数据进行亮度分析,即通过对Y数据的判断,假如正常的亮度范围为60到190,那么亮度范围为0到60、190到255的区域就被识别为局部曝光区域;具体方案是把当前预览帧分为多个区域,然后分别对每个区域中的像素点的Y值求取平均值,最后得到某区域的整个区域Y数据;If the user selects automatic, the partial HDR implementation system can automatically identify and analyze the current preview scene (current preview frame), and analyze the brightness of the previewed YUV data, that is, through the judgment of the Y data, if the normal brightness range is 60 to 190, then the area with a brightness range of 0 to 60 and 190 to 255 is recognized as a partial exposure area; the specific solution is to divide the current preview frame into multiple areas, and then separately evaluate the pixel points in each area Calculate the average value of the Y value, and finally get the Y data of the entire area in a certain area;
步骤S430:可以通过用户手动或者系统自动选取,获得一个或多个局部曝光区域;通过移动终端拍摄HDR照片,假如拍摄的是3张曝光值照片,然后根据上述选取的局部曝光区域分别对三张照片做出处理,只对局部曝光区域进行HDR合成处理;拍照完毕,最后得到一张具有局部HDR效果的照片。Step S430: One or more local exposure areas can be obtained through manual selection by the user or automatically by the system; take HDR photos through the mobile terminal, if three exposure value photos are taken, then respectively compare the three exposure areas according to the above selected partial exposure areas The photo is processed, and only the HDR composite processing is performed on the partial exposure area; after the photo is taken, a photo with a partial HDR effect is finally obtained.
本发明局部HDR的实现方法,提供了一种局部HDR的实现方式,在用户通过图像获取设备获取光线反差大的场景的图像时,可以通过本发明选择局部HDR功能,通过手动或自动方式选取多个曝光区域;根据选取出的需要调整曝光值的部分区域,本发明对需要局部调节曝光值的区域进行HDR拍摄,可以得到具有局部HDR效果的图像。本发明能够根据用户实际需求对图像部分区域进行局部HDR处理。The implementation method of partial HDR of the present invention provides a partial HDR implementation. When the user obtains an image of a scene with a large light contrast through an image acquisition device, the partial HDR function can be selected through the present invention, and multiple images can be selected manually or automatically. exposure area; according to the selected partial area where the exposure value needs to be adjusted, the present invention performs HDR shooting on the area where the exposure value needs to be adjusted locally, and an image with a partial HDR effect can be obtained. The present invention can perform local HDR processing on partial areas of images according to actual needs of users.
本发明局部HDR的实现系统实施例1:Implementation system embodiment 1 of partial HDR of the present invention:
基于上述方法的技术思想,同时为了解决传统技术无法对图像部分区域进行局部HDR处理的技术问题,本发明还提供了一种局部HDR的实现系统实施例1;图5为本发明局部HDR的实现系统实施例1的结构示意图;如图5所示,局部HDR的实现系统实施例1可以包括:Based on the technical idea of the above method, and in order to solve the technical problem that the traditional technology cannot perform local HDR processing on some areas of the image, the present invention also provides a partial HDR implementation system embodiment 1; Figure 5 is the realization of the partial HDR of the present invention A schematic structural diagram of the system embodiment 1; as shown in FIG. 5 , the implementation of the partial HDR system embodiment 1 may include:
获取预览帧单元510,用于获取图像获取设备的当前预览帧;Acquiring a preview frame unit 510, configured to acquire the current preview frame of the image acquisition device;
区域选取单元520,用于对当前预览帧进行区域选取,得到当前预览帧的一个或多个局部曝光区域;The area selection unit 520 is configured to perform area selection on the current preview frame to obtain one or more partial exposure areas of the current preview frame;
HDR合成处理单元530,用于根据局部曝光区域的区域灰度数据,对局部曝光区域的像素点进行HDR合成处理,得到局部HDR图像。The HDR synthesis processing unit 530 is configured to perform HDR synthesis processing on pixels in the partial exposure area according to the regional grayscale data of the partial exposure area to obtain a partial HDR image.
图6为本发明局部HDR的实现系统实施例2的结构示意图;如图6所示,在一个具体的实施例中,局部HDR的实现系统还可以包括:Fig. 6 is a schematic structural diagram of Embodiment 2 of the partial HDR implementation system of the present invention; as shown in Fig. 6, in a specific embodiment, the partial HDR implementation system may further include:
监听模块610,用于监听当前预览帧的选框事件;A monitoring module 610, configured to monitor the marquee event of the current preview frame;
获取区域框模块620,用于根据选框事件,获取一个或多个区域框;Obtaining a region frame module 620, configured to obtain one or more region frames according to a frame selection event;
区域选取单元520包括:The area selection unit 520 includes:
区域框确定模块630,用于将区域框包含的像素区域确定为局部曝光区域。The area frame determining module 630 is configured to determine the pixel area included in the area frame as a partial exposure area.
图7为本发明局部HDR的实现系统实施例3的结构示意图;如图7所示,在一个具体的实施例中,局部HDR的实现系统还可以包括:Fig. 7 is a schematic structural diagram of Embodiment 3 of the realization system of partial HDR of the present invention; as shown in Fig. 7, in a specific embodiment, the realization system of partial HDR may further include:
区域划分模块710,用于根据图像获取设备的拍摄参数,对当前预览帧进行区域划分,得到当前预览帧的多个待曝光区域;The area division module 710 is configured to perform area division on the current preview frame according to the shooting parameters of the image acquisition device, so as to obtain multiple to-be-exposed areas of the current preview frame;
区域选取单元520包括:The area selection unit 520 includes:
区域选取模块720,用于对多个待曝光区域进行选取,得到局部曝光区域。The area selection module 720 is configured to select a plurality of areas to be exposed to obtain a partial exposure area.
在一个具体的实施例中,区域选取模块720包括:In a specific embodiment, the area selection module 720 includes:
获取灰度均值模块722,用于对待曝光区域的YUV数据进行亮度分析,获取待曝光区域的灰度均值;Obtaining the grayscale mean value module 722, used for performing brightness analysis on the YUV data of the region to be exposed, and obtaining the grayscale mean value of the region to be exposed;
区域确定模块724,用于在灰度均值小于预设的正常亮度下限阈值或大于预设的正常亮度上限阈值时,将灰度均值对应的待曝光区域确定为局部曝光区域。The area determination module 724 is configured to determine the area to be exposed corresponding to the gray-scale average value as a partial exposure area when the gray-scale average value is smaller than the preset normal brightness lower threshold or greater than the preset normal brightness upper threshold.
在一个具体的实施例中,获取灰度均值模块722包括:In a specific embodiment, the module 722 of obtaining the gray mean value includes:
获取灰度和值模块,用于分别获取待曝光区域各像素点的灰度值,并对灰度值进行求和处理,得到灰度和值;Obtain the grayscale and value module, which is used to respectively obtain the grayscale value of each pixel in the area to be exposed, and sum the grayscale values to obtain the grayscale and value;
平均值模块,用于根据灰度和值,得到灰度均值。The mean value module is used to obtain the mean value of the gray level according to the sum of the gray levels.
图8为本发明局部HDR的实现系统一具体实施例的结构示意图;如图8所示,局部HDR的实现系统还可以包括:Fig. 8 is a schematic structural diagram of a specific embodiment of a partial HDR implementation system of the present invention; as shown in Fig. 8, the partial HDR implementation system may also include:
获取预览帧单元510,用于获取图像获取设备的当前预览帧;Acquiring a preview frame unit 510, configured to acquire the current preview frame of the image acquisition device;
区域选取单元520,用于对当前预览帧进行区域选取,得到当前预览帧的一个或多个局部曝光区域;The area selection unit 520 is configured to perform area selection on the current preview frame to obtain one or more partial exposure areas of the current preview frame;
HDR合成处理单元530,用于根据局部曝光区域的区域灰度数据,对局部曝光区域的像素点进行HDR合成处理,得到局部HDR图像。The HDR synthesis processing unit 530 is configured to perform HDR synthesis processing on pixels in the partial exposure area according to the regional grayscale data of the partial exposure area to obtain a partial HDR image.
其中,区域选取单元520可以包括手动选取区域模块810和自动选取区域模块820;其中手动选取区域模块810的功能可以由图6所示系统中相应的模块实现,自动选取区域模块820的功能可以由图7所示系统中相应的模块实现。Wherein, the area selection unit 520 can include a manual area selection module 810 and an automatic area selection module 820; wherein the function of the manual area selection module 810 can be realized by corresponding modules in the system shown in FIG. 6 , and the automatic area selection module 820 can be implemented by The corresponding modules in the system shown in Figure 7 are implemented.
本发明局部HDR的实现系统,提供了一种局部HDR的实现方式,在用户通过图像获取设备获取光线反差大的场景的图像时,可以通过本发明选择局部HDR功能,选取多个曝光区域;根据选取出的需要调整曝光值的部分区域,本发明对需要局部调节曝光值的区域进行HDR拍摄,可以得到具有局部HDR效果的图像。本发明能够根据用户实际需求对图像部分区域进行局部HDR处理。The partial HDR realization system of the present invention provides a kind of partial HDR realization method, when the user obtains the image of the scene with large light contrast through the image acquisition device, the local HDR function can be selected through the present invention, and multiple exposure areas can be selected; according to For the selected partial area where the exposure value needs to be adjusted, the present invention performs HDR shooting on the area where the exposure value needs to be adjusted locally, and an image with a local HDR effect can be obtained. The present invention can perform local HDR processing on partial areas of images according to actual needs of users.
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above-mentioned embodiments can be combined arbitrarily. To make the description concise, all possible combinations of the technical features in the above-mentioned embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, should be considered as within the scope of this specification.
以上所述实施例仅表达了本发明的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation modes of the present invention, and the descriptions thereof are relatively specific and detailed, but should not be construed as limiting the patent scope of the invention. It should be pointed out that those skilled in the art can make several modifications and improvements without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent for the present invention should be based on the appended claims.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610374020.4ACN105959591A (en) | 2016-05-30 | 2016-05-30 | Implementation method and system of partial HDR |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610374020.4ACN105959591A (en) | 2016-05-30 | 2016-05-30 | Implementation method and system of partial HDR |
| Publication Number | Publication Date |
|---|---|
| CN105959591Atrue CN105959591A (en) | 2016-09-21 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201610374020.4APendingCN105959591A (en) | 2016-05-30 | 2016-05-30 | Implementation method and system of partial HDR |
| Country | Link |
|---|---|
| CN (1) | CN105959591A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107292230A (en)* | 2017-05-09 | 2017-10-24 | 华南理工大学 | Embedded finger vein identification method based on convolutional neural network and having counterfeit detection capability |
| CN109510946A (en)* | 2017-09-15 | 2019-03-22 | 展讯通信(上海)有限公司 | HDR scene detection method and system |
| CN110602401A (en)* | 2019-09-17 | 2019-12-20 | 维沃移动通信有限公司 | Photographing method and terminal |
| CN110620878A (en)* | 2019-09-27 | 2019-12-27 | 思特威(上海)电子科技有限公司 | On-chip area exposure imaging method |
| US10630911B2 (en) | 2018-09-06 | 2020-04-21 | Altek Corporation | Image processing method and image processing device |
| WO2020207387A1 (en)* | 2019-04-09 | 2020-10-15 | Oppo广东移动通信有限公司 | Image processing method and apparatus, storage medium, and electronic device |
| CN112399091A (en)* | 2020-10-26 | 2021-02-23 | 维沃移动通信有限公司 | Image processing method and device and electronic equipment |
| CN115628579A (en)* | 2021-07-13 | 2023-01-20 | 海信集团控股股份有限公司 | A kind of intelligent refrigerator and item identification method |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20110211732A1 (en)* | 2009-04-23 | 2011-09-01 | Guy Rapaport | Multiple exposure high dynamic range image capture |
| US20120002082A1 (en)* | 2010-07-05 | 2012-01-05 | Johnson Garrett M | Capturing and Rendering High Dynamic Range Images |
| CN102497490A (en)* | 2011-12-16 | 2012-06-13 | 上海富瀚微电子有限公司 | System and method for realizing image high dynamic range compression |
| US20130335438A1 (en)* | 2008-01-07 | 2013-12-19 | Dolby Laboratories Licensing Corporation | Local multiscale tone-mapping operator |
| CN103957362A (en)* | 2014-05-05 | 2014-07-30 | 广东欧珀移动通信有限公司 | Method and system for automatically adjusting exposure effect of camera |
| CN104333710A (en)* | 2014-11-28 | 2015-02-04 | 广东欧珀移动通信有限公司 | Camera exposure method, device and equipment |
| CN104881644A (en)* | 2015-05-25 | 2015-09-02 | 华南理工大学 | Face image acquisition method under uneven lighting condition |
| CN105100637A (en)* | 2015-08-31 | 2015-11-25 | 联想(北京)有限公司 | Image processing method and electronic equipment |
| CN105096267A (en)* | 2015-07-02 | 2015-11-25 | 广东欧珀移动通信有限公司 | Method and device for adjusting brightness of eye portion based on shooting identification |
| CN105208281A (en)* | 2015-10-09 | 2015-12-30 | 广东欧珀移动通信有限公司 | Night scene shooting method and device |
| CN105227857A (en)* | 2015-10-08 | 2016-01-06 | 广东欧珀移动通信有限公司 | A kind of method and apparatus of automatic exposure |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20130335438A1 (en)* | 2008-01-07 | 2013-12-19 | Dolby Laboratories Licensing Corporation | Local multiscale tone-mapping operator |
| US20110211732A1 (en)* | 2009-04-23 | 2011-09-01 | Guy Rapaport | Multiple exposure high dynamic range image capture |
| US20120002082A1 (en)* | 2010-07-05 | 2012-01-05 | Johnson Garrett M | Capturing and Rendering High Dynamic Range Images |
| CN102497490A (en)* | 2011-12-16 | 2012-06-13 | 上海富瀚微电子有限公司 | System and method for realizing image high dynamic range compression |
| CN103957362A (en)* | 2014-05-05 | 2014-07-30 | 广东欧珀移动通信有限公司 | Method and system for automatically adjusting exposure effect of camera |
| CN104333710A (en)* | 2014-11-28 | 2015-02-04 | 广东欧珀移动通信有限公司 | Camera exposure method, device and equipment |
| CN104881644A (en)* | 2015-05-25 | 2015-09-02 | 华南理工大学 | Face image acquisition method under uneven lighting condition |
| CN105096267A (en)* | 2015-07-02 | 2015-11-25 | 广东欧珀移动通信有限公司 | Method and device for adjusting brightness of eye portion based on shooting identification |
| CN105100637A (en)* | 2015-08-31 | 2015-11-25 | 联想(北京)有限公司 | Image processing method and electronic equipment |
| CN105227857A (en)* | 2015-10-08 | 2016-01-06 | 广东欧珀移动通信有限公司 | A kind of method and apparatus of automatic exposure |
| CN105208281A (en)* | 2015-10-09 | 2015-12-30 | 广东欧珀移动通信有限公司 | Night scene shooting method and device |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107292230A (en)* | 2017-05-09 | 2017-10-24 | 华南理工大学 | Embedded finger vein identification method based on convolutional neural network and having counterfeit detection capability |
| CN107292230B (en)* | 2017-05-09 | 2020-07-28 | 华南理工大学 | Embedded finger vein recognition method based on convolutional neural network and capable of counterfeiting detection |
| CN109510946A (en)* | 2017-09-15 | 2019-03-22 | 展讯通信(上海)有限公司 | HDR scene detection method and system |
| CN109510946B (en)* | 2017-09-15 | 2020-07-17 | 展讯通信(上海)有限公司 | HDR scene detection method and system |
| US10630911B2 (en) | 2018-09-06 | 2020-04-21 | Altek Corporation | Image processing method and image processing device |
| WO2020207387A1 (en)* | 2019-04-09 | 2020-10-15 | Oppo广东移动通信有限公司 | Image processing method and apparatus, storage medium, and electronic device |
| CN110602401A (en)* | 2019-09-17 | 2019-12-20 | 维沃移动通信有限公司 | Photographing method and terminal |
| CN110620878A (en)* | 2019-09-27 | 2019-12-27 | 思特威(上海)电子科技有限公司 | On-chip area exposure imaging method |
| CN112399091A (en)* | 2020-10-26 | 2021-02-23 | 维沃移动通信有限公司 | Image processing method and device and electronic equipment |
| CN115628579A (en)* | 2021-07-13 | 2023-01-20 | 海信集团控股股份有限公司 | A kind of intelligent refrigerator and item identification method |
| Publication | Publication Date | Title |
|---|---|---|
| CN105959591A (en) | Implementation method and system of partial HDR | |
| CN111418201B (en) | Shooting method and equipment | |
| US9961273B2 (en) | Mobile terminal and shooting method thereof | |
| TWI454139B (en) | High dynamic range conversion | |
| US9813635B2 (en) | Method and apparatus for auto exposure value detection for high dynamic range imaging | |
| US20120127336A1 (en) | Imaging apparatus, imaging method and computer program | |
| US9591231B2 (en) | Image processing apparatus capable of properly emphasizing differences in brightness between bright spots, image processing method, and storage medium | |
| CN103973983A (en) | Method for intelligently adjusting brightness of picture on basis of detection of environmental brightness in photographing | |
| CN105578068A (en) | A high dynamic range image generation method, device and mobile terminal | |
| CN101273624A (en) | Compensation for improperly exposed areas in digital images | |
| CN104052933A (en) | Method for judging dynamic range mode and image acquisition device thereof | |
| WO2016011877A1 (en) | Method for filming light painting video, mobile terminal, and storage medium | |
| CN103957362A (en) | Method and system for automatically adjusting exposure effect of camera | |
| CN102946513A (en) | Method, device and terminal for starting HDR (high-dynamic range) function of shooting device | |
| CN108616689A (en) | Portrait-based high dynamic range image acquisition method, device and equipment | |
| CN111835982A (en) | Image acquisition method, image acquisition device, electronic device and storage medium | |
| CN105812670B (en) | A kind of method and terminal taken pictures | |
| US20150312487A1 (en) | Image processor and method for controlling the same | |
| US20190082092A1 (en) | Imaging apparatus, image processing apparatus, imaging method, image processing method, and storage medium | |
| JP4999871B2 (en) | Imaging apparatus and control method thereof | |
| CN102510502B (en) | Method and system for generating high-dynamic-range image | |
| CN104469131A (en) | Method, device and terminal for displaying shooting control | |
| CN104394320B (en) | Handle the method, apparatus and electronic equipment of image | |
| JP2010011153A (en) | Imaging apparatus, imaging method and program | |
| JP5335964B2 (en) | Imaging apparatus and control method thereof |
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication | Application publication date:20160921 |