WO2020124882A1 - 图片处理方法、装置及电子设备 - Google Patents
图片处理方法、装置及电子设备 Download PDFInfo
- Publication number
- WO2020124882A1 WO2020124882A1 PCT/CN2019/082171 CN2019082171W WO2020124882A1 WO 2020124882 A1 WO2020124882 A1 WO 2020124882A1 CN 2019082171 W CN2019082171 W CN 2019082171W WO 2020124882 A1 WO2020124882 A1 WO 2020124882A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- pictures
- sub
- picture
- data information
- brightness
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/50—Image enhancement or restoration using two or more images, e.g. averaging or subtraction
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/90—Dynamic range modification of images or parts thereof
- G06T5/94—Dynamic range modification of images or parts thereof based on local image properties, e.g. for local contrast enhancement
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10141—Special mode during image acquisition
- G06T2207/10144—Varying exposure
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20021—Dividing image into blocks, subimages or windows
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20212—Image combination
- G06T2207/20221—Image fusion; Image merging
Definitions
- This application relates to the field of electronic equipment, in particular to a picture processing method, device and electronic equipment.
- a multi-exposure fusion algorithm is usually used to construct an appropriate exposure function to generate multiple exposure pictures, and the weight of each picture is calculated to obtain the average brightness value of the picture as the central value, resulting in low picture contrast , The color is gray.
- Embodiments of the present application provide a picture processing method, device, and electronic equipment, so that the picture has high contrast and colorful colors.
- An embodiment of the present application provides a picture processing method, which is applied to an electronic device.
- the picture processing method includes:
- the input data information According to the input data information, generate first data information of N exposure pictures with different exposures corresponding to the input picture;
- N K ⁇ K sub-picture matrices Perform block division on the N base layer pictures to form N K ⁇ K sub-picture matrices.
- the N K ⁇ K sub-picture matrices include K ⁇ K sub-picture groups. In each sub-picture group In, the number of rows and columns of the sub-pictures are the same;
- each sub-picture group generate a maximum value C of the contrast of the N sub-pictures, generate a weighted sum S of the saturation of the N sub-pictures, and generate a weighted sum L of the average brightness of the N sub-pictures;
- the step of generating first data information of N exposure pictures corresponding to the input picture according to the input data information includes:
- first data information of N exposure pictures corresponding to the input picture with different exposure degrees is generated.
- L d (i,j) e ⁇ R(i,j)+f ⁇ G(i, j)+g ⁇ B(i,j)
- Ld(i,j) is the i-th line
- R(i,j) is the brightness of the red sub-pixel of the pixel unit in the i-th row and j-th column
- G(i,j) is the pixel unit in the i-th row and j-th column
- the brightness of the green sub-pixel, B(i, j) is the brightness of the blue sub-pixel of the pixel unit in the i-th row and the j-th column.
- the average brightness information L ad of the N exposure pictures is obtained, where L ad,k is the average brightness of the k-th exposure picture, EV k is the exposure degree, ⁇ is the coefficient,
- the formula Generate the first data information L wk(i,j) of the N exposure pictures with different exposures corresponding to the input picture, where P k is the scaling factor of the kth picture, and the first data information L wk(i, j) is the output brightness of the pixel unit in the i-th row and j-th column in the k- th graph.
- a maximum value C of the contrast of the N sub-pictures is generated, and the The weighted sum S of the saturation of the N sub-pictures to generate the average brightness weighted sum L of the N sub-pictures includes:
- the execution order of the steps 104, 105, 106, 107 and 108 is: 104, 105, 106, 107 and 108.
- the execution order of the steps 104, 105, 106, 107 and 108 is: 107, 108, 104, 105 and 106.
- the execution order of the steps 104, 105, 106, 107 and 108 is as follows: the steps 104, 105 and 106 are executed in order. While performing step 104, step 105, and step 106, step 107 and step 108 are executed in the order of step 107 and step 108.
- An embodiment of the present application provides an image processing apparatus, including:
- the acquisition module is used to acquire an input picture to obtain input data information
- An exposure processing module configured to generate first data information of N exposure pictures with different exposures corresponding to the input picture according to the input data information
- a first arithmetic module configured to perform filtering processing on the N exposure pictures according to the N first data information to generate second data information on the N base layer pictures;
- the partitioning module is used to partition the N base layer pictures to form N K ⁇ K sub-picture matrices.
- the N K ⁇ K sub-picture matrices include K ⁇ K sub-picture groups. In a sub-picture group, the sub-pictures have the same number of rows and columns;
- a second operation module configured to obtain the contrast c, saturation s, and average brightness l of each sub-picture according to the second data information
- the third operation module is used to generate the maximum value C of the contrast of the N sub-pictures in each sub-picture group, generate a weighted sum S of the saturation of the N sub-pictures, and generate a mean brightness weight of the N sub-pictures And L;
- the fourth arithmetic module is used to subtract the brightness in the second data information of the N base layer pictures from the brightness in the first data information of the N exposed pictures according to the first data information and the second data information Obtain the third data information about the N detail layer pictures;
- a fifth arithmetic module configured to obtain the average brightness D of the N detail layer pictures according to the third data information
- a fusion module configured to use the maximum contrast C of the N sub-pictures, the weighted sum S of the saturation of the N sub-pictures, the weighted sum L of the average brightness of the N sub-pictures, and the N detail layer pictures
- the average brightness D of K ⁇ K sub-pictures is calculated to obtain K ⁇ K fusion values Q;
- the output module is used to set the sliding step size N and generate an output picture according to the fusion value Q.
- the exposure processing module includes:
- a brightness extraction module for extracting the brightness of the input picture
- the generating module generates first data information of N exposure pictures with different exposures corresponding to the input picture according to the brightness of the input picture.
- the operation order of the partition module, the second calculation module, the third calculation module, the fourth calculation module, and the fifth calculation module is: the partition module, the second calculation module, The third arithmetic module, the fourth arithmetic module and the fifth arithmetic module.
- the operation sequence of the partition module, the second arithmetic module, the third arithmetic module, the fourth arithmetic module, and the fifth arithmetic module is: the fourth arithmetic module, the fifth arithmetic Module, partition module, second operation module and third operation module.
- the operation order of the partition module, the second calculation module, the third calculation module, the fourth calculation module, and the fifth calculation module is as follows:
- the second arithmetic module and the third arithmetic module run the partition module, the second arithmetic module and the third arithmetic module in sequence, and the fourth arithmetic module and the fifth arithmetic module are sequentially operated in the order of running the fourth arithmetic module and The fifth arithmetic module.
- An embodiment of the present application provides an electronic device, including:
- a camera the camera is fixed to the housing, and the camera is used to take input pictures;
- a display screen the display screen is fixed to the housing, and the display screen is used to display output pictures;
- a processor the processor is connected between the camera and the display screen, and the processor is used to execute:
- the input data information According to the input data information, generate first data information of N exposure pictures with different exposures corresponding to the input picture;
- N K ⁇ K sub-picture matrices Perform block division on the N base layer pictures to form N K ⁇ K sub-picture matrices.
- the N K ⁇ K sub-picture matrices include K ⁇ K sub-picture groups. In each sub-picture group In, the number of rows and columns of the sub-pictures are the same;
- each sub-picture group generate a maximum value C of the contrast of the N sub-pictures, generate a weighted sum S of the saturation of the N sub-pictures, and generate a weighted sum L of the average brightness of the N sub-pictures;
- the step of generating first data information of N exposure pictures corresponding to the input picture according to the input data information includes:
- first data information of N exposure pictures corresponding to the input picture with different exposure degrees is generated.
- the luminance of the green sub-pixel, B(i,j) is the luminance of the blue sub-pixel of the pixel unit in the i-th row and the j-th column.
- a maximum value C of contrast of the N sub-pictures is generated, and the N
- the weighted sum S of the saturation of the sub-pictures to generate the weighted sum L of the average brightness of the N sub-pictures includes:
- the image processing method, device and electronic device provided by the present application generate first data information of N exposure images corresponding to the input image with different exposure degrees by acquiring an input image; according to the N first data information , Filtering the N exposure pictures to generate second data information about the N base layer pictures; performing block division on the N base layer pictures to form a sub-picture matrix including K ⁇ K sub-picture groups; According to the second data information, obtain the contrast c, saturation s, and average brightness l of each sub-picture; in each sub-picture group, generate a maximum value C of the contrast of the N sub-pictures, and generate the N sub-pictures Weighted sum S of the saturation to generate a weighted sum L of the average brightness of the N sub-pictures; based on the first data information and the second data information, the brightness of the first data information of the N exposed pictures is used to subtract Remove the brightness in the second data information of the N base layer pictures to obtain third data information about the N detail layer pictures; according to the third data information, obtain the average brightness D of
- FIG. 1 is a schematic flowchart of a picture processing method provided by an embodiment of the present application.
- FIG. 2 is a schematic diagram of the principle of a picture processing method provided by an embodiment of the present application.
- FIG. 3 is a schematic flowchart of the step of generating the first data information of N exposure pictures corresponding to the input picture according to the input data information according to the input data information in FIG. 1.
- FIG. 4 is a first structural schematic diagram of a picture processing apparatus provided by an embodiment of the present application.
- FIG. 5 is a schematic structural diagram of an exposure processing module of the image processing device of FIG. 4.
- FIG. 6 is a second schematic structural diagram of a picture processing apparatus provided by an embodiment of the present application.
- FIG. 7 is a third structural schematic diagram of a picture processing apparatus provided by an embodiment of the present application.
- FIG. 8 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
- an embodiment of the present application provides a picture processing method.
- the picture processing method is applied to electronic equipment.
- the image processing method includes:
- a picture may be taken through the camera of the electronic device, and the picture taken through the camera of the electronic device is the input picture 200, and a processor is used to obtain input data information of the input picture 200.
- the input data information includes the brightness of the input picture 200.
- the processor processes the input picture 200 according to the input data information, thereby generating the first data information of the N exposure pictures 202 with different exposure degrees corresponding to the input picture 200.
- the step 102 may include:
- the brightness of the input picture 200 can be extracted from the input data information.
- the coefficient e ranges from 0.1 to 0.5
- the coefficient f ranges from 0.4 to 0.8
- the coefficient g ranges from 0.01 to 0.3.
- the coefficient ⁇ may be 0.5-3.
- the processor processes the input picture 200 according to the input data information, thereby generating first data information of the five exposure pictures 201 with different exposures corresponding to the input picture 200.
- the exposure EV k may be -1, -0.5, 0, 0.5, and 1.
- the second data information is data information about N base layer pictures 202 that are filtered according to the N first data information by performing filtering processing on the N exposure pictures 201.
- the N exposure pictures 201 may be filtered by using guidance, bilateral, and linear filtering methods.
- the N exposure pictures 201 may be filtered by using an S-shaped linear filtering method.
- the N K ⁇ K sub-picture matrices include K ⁇ K sub-picture groups 2031.
- the number of rows and columns of the sub-pictures 203 are the same, please refer to FIG. 2.
- the five base layer pictures 202 may be divided into blocks to form five 5 ⁇ 5 sub-picture matrices, and the five 5 ⁇ 5 sub-picture matrices include 5 ⁇ 5 sub-pictures Group 2031.
- the contrast c, saturation s and average brightness l of each sub-picture 203 are obtained.
- each sub-picture group 2031 In each sub-picture group 2031, generate a maximum value C of the contrast of the N sub-pictures 203, generate a weighted sum S of the saturation of the N sub-pictures 203, and generate a weighted sum of the average brightness of the N sub-pictures 203 L.
- step 106 may include:
- the detail layer picture is a picture generated by subtracting the brightness of the base layer picture 203 from the exposure picture 202.
- K ⁇ K sub-pictures 203 are calculated to obtain K ⁇ K fusion values Q, where A is a detail amplification factor.
- A is a detail amplification factor.
- the detail amplification factor A ranges from 1.0 to 1.8.
- the sliding step N is a natural number.
- the steps 101, 102, 103, 104, 105, 106, 107, 108, 109, and 110 can be performed according to steps 101, 102, 103, 104, 105, 106, 107, 108, 109 and The order of 110 is executed.
- the steps 101, 102, 103, 104, 105, 106, 107, 108, 109, and 110 may also be in accordance with 101, 102, 103, 107, 108, 104, 105, 106, 109, and 110 The order of execution.
- the steps 101, 102, 103, 104, 105, 106, 107, 108, 109, and 110 may also perform steps 101, 102, 103 first, and then, the process from steps 104, 105 to 106 The processes from steps 107 to 108 are executed simultaneously, and finally, steps 109 and 110 are executed.
- an embodiment of the present application further provides an image processing device 300.
- the image processing device 300 includes an acquisition module 301, an exposure processing module 302, a first arithmetic module 303, a partition module 304, a second arithmetic module 305, a third arithmetic module 306, a fourth arithmetic module 307, a fifth arithmetic module 308, Fusion module 309 and output module 310.
- the obtaining module 301 is used to obtain an input picture to obtain input data information.
- a picture may be taken through a camera of an electronic device, and the picture taken through the camera of the electronic device is the input picture, and a processor is used to obtain input data information of the input picture.
- the input data information includes the brightness of the input picture.
- the exposure processing module 302 is configured to generate first data information of N exposure pictures with different exposure degrees corresponding to the input picture according to the input data information.
- the processor processes the input picture according to the input data information, thereby generating first data information of N exposure pictures corresponding to the input picture with different exposure degrees.
- the exposure processing module 302 includes a brightness extraction module 3021 and a generation module 3022.
- the brightness extraction module 3021 is used to extract the brightness of the input picture.
- the brightness of the input picture can be extracted from the input data information.
- the coefficient e ranges from 0.1 to 0.5
- the coefficient f ranges from 0.4 to 0.8
- the coefficient g ranges from 0.01 to 0.3.
- the generating module 3022 generates first data information of N exposure pictures with different degrees of exposure corresponding to the input picture according to the brightness of the input picture.
- the average brightness information L ad of the N exposure pictures is obtained, where L ad,k is the number of the kth exposure picture Average brightness, EV k is the exposure, ⁇ is the coefficient, according to the formula Generate the first data information L wk(i,j) of the N exposure pictures with different exposures corresponding to the input picture, where P k is the scaling factor of the kth picture, and the first data information L wk(i, j) is the output brightness of the pixel unit in the i-th row and j-th column in the k- th graph.
- the coefficient ⁇ may be 0.5-3.
- the processor processes the input picture according to the input data information, thereby generating first data information of five exposure pictures with different exposures corresponding to the input picture.
- the exposure EV k may be -1, -0.5, 0, 0.5, and 1.
- the first operation module 303 is configured to perform filtering processing on the N exposure pictures according to the N first data information to generate second data information on the N base layer pictures.
- the second data information is data information about N base layer pictures that are processed by filtering the N exposure pictures according to the N first data information.
- the N exposure pictures may be filtered by using a guide, bilateral, and linear filtering method.
- an S-type linear filtering method may be used to filter the N exposure pictures.
- the partitioning module 304 is used to partition the N base layer pictures to form N K ⁇ K sub-picture matrices, and the N K ⁇ K sub-picture matrices include K ⁇ K sub-picture groups, In each sub-picture group, the sub-pictures have the same number of rows and columns.
- the 5 base layer pictures may be divided into blocks to form 5 5 ⁇ 5 sub-picture matrices, and the 5 5 ⁇ 5 sub-picture matrices include 5 ⁇ 5 sub-picture groups .
- the second operation module 305 is used to obtain the contrast c, saturation s, and average brightness l of each sub-picture according to the second data information.
- the contrast c, saturation s and average brightness l of each sub-picture are obtained.
- the third operation module 306 is used to generate a maximum value C of the contrast of the N sub-pictures in each sub-picture group, generate a weighted sum S of saturation of the N sub-pictures, and generate an average value of the N sub-pictures Brightness weighted sum L.
- the third operation module 306 is based on the contrast c, saturation s, average brightness l and formula of each sub-picture
- the fourth operation module 307 is used to subtract the brightness in the first data information of the N exposed pictures from the second data information of the N base layer pictures according to the first data information and the second data information The brightness of the obtained third data information about the N detail layer pictures.
- the detail layer picture is a picture generated by subtracting the brightness of the base layer picture from the exposure picture.
- the fifth operation module 308 is used to obtain the average brightness D of the N detail layer pictures according to the third data information.
- the fusion module 309 is used for according to the maximum value C of the contrast of the N sub-pictures, the weighted sum S of the saturation of the N sub-pictures, the weighted sum L of the average brightness of the N sub-pictures, and the N details
- the average brightness D of the layer picture is calculated on K ⁇ K sub-pictures to obtain K ⁇ K fusion values Q.
- K ⁇ K sub-pictures are calculated to obtain K ⁇ K fusion values Q, where A is a detail amplification factor.
- A is a detail amplification factor.
- the detail amplification factor A ranges from 1.0 to 1.8.
- the output module 310 is used to set a sliding step size N and generate an output picture according to the fusion value Q.
- the sliding step N is a natural number.
- the fourth arithmetic module 307, the fifth arithmetic module 308, the fusion module 309, and the output module 310 can follow the acquisition module 301, the exposure processing module 302, the first arithmetic module 303, the partition module 304, the second arithmetic module 305, the third arithmetic
- the order of the module 306, the fourth arithmetic module 307, the fifth arithmetic module 308, the fusion module 309, and the output module 310 run sequentially.
- the acquisition module 301, the exposure processing module 302, the first arithmetic module 303, the partition module 304, the second arithmetic module 305, and the third arithmetic module 306 of the image processing apparatus 300 may also follow the acquisition module 301, the exposure processing module 302, the first arithmetic module 303, the fourth arithmetic module 307, the fifth arithmetic module 308, and the partition
- the order of the module 304, the second arithmetic module 305, the third arithmetic module 306, the fusion module 309, and the output module 310 run sequentially.
- the fourth arithmetic module 307, the fifth arithmetic module 308, the fusion module 309, and the output module 310 can also first run the acquisition module 301, the exposure processing module 302, and the first arithmetic module 303, and then, in the order of the partition module 304, the second The arithmetic module 305 and the third arithmetic module 306 simultaneously run the fourth arithmetic module 307 and the fifth arithmetic module 308 in sequence, and finally the fusion module 309 and the output module 310 in sequence.
- an embodiment of the present application provides an electronic device 400.
- the electronic device 400 includes a housing 401, a camera 402, a display screen 403, and a processor 404.
- the camera 402 is fixed to the housing 401, and the camera 402 is used to capture input pictures.
- the display screen 403 is fixed to the housing 401, and the display screen 403 is used for displaying output pictures.
- the processor 404 is connected between the camera 402 and the display screen 403. The processor 404 is used to execute the image processing method described above.
- the image processing method, device and electronic device provided by the present application generate first data information of N exposure images corresponding to the input image with different exposure degrees by acquiring an input image; according to the N first data information , Filtering the N exposure pictures to generate second data information about the N base layer pictures; performing block division on the N base layer pictures to form a sub-picture matrix including K ⁇ K sub-picture groups; According to the second data information, obtain the contrast c, saturation s, and average brightness l of each sub-picture; in each sub-picture group, generate a maximum value C of the contrast of the N sub-pictures, and generate the N sub-pictures Weighted sum S of the saturation to generate a weighted sum L of the average brightness of the N sub-pictures; based on the first data information and the second data information, the brightness of the first data information of the N exposed pictures is used to subtract Remove the brightness in the second data information of the N base layer pictures to obtain third data information about the N detail layer pictures; according to the third data information, obtain the average brightness D of
- An embodiment of the present application further provides a storage medium in which a plurality of instructions are stored.
- the instructions are suitable for being loaded by a processor to execute the image processing method described in any of the above embodiments.
- the program may be stored in a computer-readable storage medium, and the storage medium may include: Read-only memory (ROK, Read Only KeKory), random access memory (RAK, RandoK Access KeKory), disk or CD-ROM, etc.
- ROK Read-only memory
- RAK Random access memory
- CD-ROM CD-ROM
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
- Studio Devices (AREA)
Abstract
本申请所提供的图片处理方法、装置及电子设备,通过对图片进行多曝光度处理以及图片分区的方法,对每一子图片分别进行运算和融合,从而使得经过本申请所提供的图片处理方法、装置及电子设备处理的图片,对比度高,色彩艳丽。
Description
本申请涉及电子设备领域,具体涉及一种图片处理方法、装置及电子设备。
在现有技术中,通常采用多曝光融合算法,构建一个合适的曝光函数来生成多张曝光图片,对每张图片的权重计算以求取所述图片的亮度均值作为中心值,导致图片对比度低,颜色发灰。
本申请实施例提供一种图片处理方法、装置及电子设备,以使得图片的对比度高和色彩艳丽。
本申请实施例提供一种图片处理方法,应用于电子设备,所述图片处理方法包括:
101、获取一输入图片,得到输入数据信息;
102、根据所述输入数据信息,生成所述输入图片对应的N个不同曝光度的曝光图片的第一数据信息;
103、根据所述N个第一数据信息,对所述N个曝光图片进行滤波处理生成关于N个基础层图片的第二数据信息;
104、对所述N个基础层图片进行区块划分,形成N个K×K的子图片矩阵,所述N个K×K的子图片矩阵包括K×K个子图片组,在每个子图片组中,所述子图片的行数相同、列数相同;
105、根据所述第二数据信息,获取每一子图片的对比度c、饱和度s和均值亮度l;
106、在每个子图片组中,生成所述N个子图片对比度的最大值C,生成所述N个子图片的饱和度的加权和S,生成所述N个子图片的均值亮度加权和L;
107、根据所述第一数据信息和所述第二数据信息,用N个曝光图片的第一数据信息中的亮度减去N个基础层图片的第二数据信息中的亮度得到关于N个细节层图片的第三数据信息;
108、根据所述第三数据信息,得到所述N个细节层图片的平均亮度D;
109、根据所述N个子图片的对比度的最大值C、所述N个子图片的饱和度的加权和S、所述N个子图片的均值亮度加权和L和所述N个细节层图片的平均亮度D,对K×K个子图片进行计算,得到K×K个融合值Q;以及
110、设置滑动步长N,根据所述融合值Q,生成输出图片。
在本申请实施例所提供的图片处理方法中,在根据所述输入数据信息,生成所述输入图片对应的N个不同曝光度的曝光图片的第一数据信息的步骤中,包括:
提取所述输入图片的亮度;以及
根据所述输入图片的亮度,生成所述输入图片对应的N个不同曝光度的曝光图片的第一数据信息。
在本申请实施例所提供的图片处理方法中,在所述提取所述输入图片的亮度中,根据公式L
d(i,j)=e×R(i,j)+f×G(i,j)+g×B(i,j),获得所述输入图片的亮度Ld,其中,e、f、g为系数,e+f+g=1,Ld(i,j)为第i行、第j列的像素单元的亮度,R(i,j)为第i行、第j列的像素单元的红色子像素的亮度,G(i,j)为第i行、第j列的像素单元的绿色子像素的亮度,B(i,j)为第i行、第j列的像素单元的蓝色子像素的亮度。
在本申请实施例所提供的图片处理方法中,在根据所述输入图片的亮度,生成所述输入图片对应的N个不同曝光度的曝光图片的第一数据信息中,根据公式L
ad,k=1+exp(μE V
k),获得所 述N个曝光图片的平均亮度信息L
ad,其中,L
ad,k为第k张曝光图片的平均亮度,EV
k为曝光度,μ为系数,根据公式
生成所述输入图片对应的N个不同曝光度的曝光图片的第一数据信息L
wk(i,j),其中,P
k为第k张图的缩放因子,第一数据信息L
wk(i,j)为第k张图中,第i行、第j列的像素单元的输出亮度。
在本申请实施例所提供的图片处理方法中,在所述N个子图片矩阵的行数相同和列数相同的N个子图片中,生成所述N个子图片的对比度的最大值C,生成所述N个子图片的饱和度的加权和S,生成所述N个子图片的均值亮度加权和L中,包括:
根据每一子图片的对比度c、饱和度s、均值亮度l和公式
在本申请实施例所提供的图片处理方法中,在根据所述N个子图片的对比度的最大值C、所述N个子图片的饱和度的加权和S、所述N个子图片的均值亮度加权和L和所述N个细节层图片的平均亮度D,对K×K个子图片进行计算,得到K×K个融合值Q中,根据公式Q=C×S+L+A×D,对K×K个子图片进行计算,得到K×K个融合值Q,其中,A为细节放大系数。
在本申请实施例所提供的图片处理方法中,所述步骤104、步骤105、步骤106、步骤107和步骤108的执行顺序为:步骤104、步骤105、步骤106、步骤107和步骤108。
在本申请实施例所提供的图片处理方法中,所述步骤104、步骤105、步骤106、步骤107和步骤108的执行顺序为:步骤107、步骤108、步骤104、步骤105和步骤106。
在本申请实施例所提供的图片处理方法中,所述步骤104、步骤105、步骤106、步骤107和步骤108的执行顺序为:在按照依次执行步骤104、步骤105和步骤106的顺序执行所述步骤104、步骤105和步骤106的同时,按照依次执行步骤107和步骤108的顺序执行所述步骤107和步骤108。
本申请实施例提供一种图片处理装置,包括:
获取模块,用于获取一输入图片,得到输入数据信息;
曝光处理模块,用于根据所述输入数据信息,生成所述输入图片对应的N个不同曝光度的曝光图片的第一数据信息;
第一运算模块,用于根据所述N个第一数据信息,对所述N个曝光图片进行滤波处理生成关于N个基础层图片的第二数据信息;
分区模块,用于对所述N个基础层图片进行区块划分,形成N个K×K的子图片矩阵,所述N个K×K的子图片矩阵包括K×K个子图片组,在每个子图片组中,所述子图片的行数相同、列数相同;
第二运算模块,用于根据所述第二数据信息,获取每一子图片的对比度c、饱和度s和均值亮度l;
第三运算模块,用于在每个子图片组中,生成所述N个子图片对比度的最大值C,生成所述N个子图片的饱和度的加权和S,生成所述N个子图片的均值亮度加权和L;
第四运算模块,用于根据所述第一数据信息和所述第二数据信息,用N个曝光图片的第一数据信息中的亮度减去N个基础层图片的第二数据信息中的亮度得到关于N个细节层图片的第三数据信息;
第五运算模块,用于根据所述第三数据信息,得到所述N个细节层图片的平均亮度D;
融合模块,用于根据所述N个子图片的对比度的最大值C、所述N个子图片的饱和度的加权和S、所述N个子图片的均值亮度加权和L和所述N个细节层图片的平均亮度D,对K×K个子图片进行计算,得到K×K个融合值Q;以及
输出模块,用于设置滑动步长N,根据所述融合值Q,生成输出图片。
在本申请实施例所提供的图片处理装置中,所述曝光处理模块包括:
亮度提取模块,用于提取所述输入图片的亮度;以及
生成模块,根据所述输入图片的亮度,生成所述输入图片对应的N个不同曝光度的曝光图片的第一数据信息。
在本申请实施例所提供的图片处理装置中,所述分区模块、第二运算模块、第三运算模块、第四运算模块和第五运算模块的运行顺序为:分区模块、第二运算模块、第三运算模块、第四运算模块和第五运算模块。
在本申请实施例所提供的图片处理装置中,所述分区模块、第二运算模块、第三运算模块、第四运算模块和第五运算模块的运行顺序为:第四运算模块、第五运算模块、分区模块、第二运算模块和第三运算模块。
在本申请实施例所提供的图片处理装置中,所述分区模块、第二运算模块、第三运算模块、第四运算模块和第五运算模块的运行顺序为:在按照依次运行分区模块、第二运算模块和第三运算模块的顺序运行所述分区模块、第二运算模块和第三运算模块的同时、按照依次运行第四运算模块和第五运算模块的顺序运行所述第四运算模块和第五运算模块。
本申请实施例提供一种电子设备,包括:
壳体;
摄像头,所述摄像头固定于所述壳体,所述摄像头用于拍摄输入图片;
显示屏,所述显示屏固定于所述壳体,所述显示屏用于显示输出图片;
处理器,所述处理器连接于所述摄像头和显示屏之间,所述处理器用于执行:
101、获取一输入图片,得到输入数据信息;
102、根据所述输入数据信息,生成所述输入图片对应的N个不同曝光度的曝光图片的第一数据信息;
103、根据所述N个第一数据信息,对所述N个曝光图片进行滤波处理生成关于N个基础层图片的第二数据信息;
104、对所述N个基础层图片进行区块划分,形成N个K×K的子图片矩阵,所述N个K×K的子图片矩阵包括K×K个子图片组,在每个子图片组中,所述子图片的行数相同、列数相同;
105、根据所述第二数据信息,获取每一子图片的对比度c、饱和度s和均值亮度l;
106、在每个子图片组中,生成所述N个子图片对比度的最大值C,生成所述N个子图片的饱和度的加权和S,生成所述N个子图片的均值亮度加权和L;
107、根据所述第一数据信息和所述第二数据信息,用N个曝光图片的第一数据信息中的亮度减去N个基础层图片的第二数据信息中的亮度得到关于N个细节层图片的第三数据信息;
108、根据所述第三数据信息,得到所述N个细节层图片的平均亮度D;
109、根据所述N个子图片的对比度的最大值C、所述N个子图片的饱和度的加权和S、所述N个子图片的均值亮度加权和L和所述N个细节层图片的平均亮度D,对K×K个子图片进行计算,得到K×K个融合值Q;以及
110、设置滑动步长N,根据所述融合值Q,生成输出图片。
在本申请实施例所提供的电子设备中,在根据所述输入数据信息,生成所述输入图片对应的N个不同曝光度的曝光图片的第一数据信息的步骤中,包括:
提取所述输入图片的亮度;以及
根据所述输入图片的亮度,生成所述输入图片对应的N个不同曝光度的曝光图片的第一数据信息。
在本申请实施例所提供的电子设备中,在所述提取所述输入图片的亮度中,根据公式L
d(i,j)=e×R(i,j)+f×G(i,j)+g×B(i,j),获得所述输入图片的亮度Ld,其中,e、f、g为系数,e+f+g=1,Ld(i,j)为第i行、第j列的像素单元的亮度,R(i,j)为第i行、第j列的 像素单元的红色子像素的亮度,G(i,j)为第i行、第j列的像素单元的绿色子像素的亮度,B(i,j)为第i行、第j列的像素单元的蓝色子像素的亮度。
在本申请实施例所提供的电子设备中,在根据所述输入图片的亮度,生成所述输入图片对应的N个不同曝光度的曝光图片的第一数据信息中,根据公式L
ad,k=1+exp(μE V
k),获得所述N个曝光图片的平均亮度信息L
ad,其中,L
ad,k为第k张曝光图片的平均亮度,EV
k为曝光度,μ为系数,根据公式
生成所述输入图片对应的N个不同曝光度的曝光图片的第一数据信息L
wk(i,j),其中,P
k为第k张图的缩放因子,第一数据信息L
wk(i,j)为第k张图中,第i行、第j列的像素单元的输出亮度。
在本申请实施例所提供的电子设备中,在所述N个子图片矩阵的行数相同和列数相同的N个子图片中,生成所述N个子图片的对比度的最大值C,生成所述N个子图片的饱和度的加权和S,生成所述N个子图片的均值亮度加权和L中,包括:
根据每一子图片的对比度c、饱和度s、均值亮度l和公式
在本申请实施例所提供的电子设备中,在根据所述N个子图片的对比度的最大值C、所述N个子图片的饱和度的加权和S、所述N个子图片的均值亮度加权和L和所述N个细节层图片的平均亮度D,对K×K个子图片进行计算,得到K×K个融合值Q中,根据公式Q=C×S+L+A×D,对K×K个子图片进行计算,得到K×K个融合值Q,其中,A为细节放大系数。
本申请所提供的图片处理方法、装置及电子设备,通过获取一输入图片,生成所述输入图片对应的N个不同曝光度的曝光图片的第一数据信息;根据所述N个第一数据信息,对所述N个曝光图片进行滤波处理生成关于N个基础层图片的第二数据信息;对所述N个基础层图片进行区块划分,形成包括K×K个子图片组的子图片矩阵;根据所述第二数据信息,获取每一子图片的对比度c、饱和度s和均值亮度l;在每个子图片组中,生成所述N个子图片对比度的最大值C,生成所述N个子图片的饱和度的加权和S,生成所述N个子图片的均值亮度加权和L;根据所述第一数据信息和所述第二数据信息,用N个曝光图片的第一数据信息中的亮度减去N个基础层图片的第二数据信息中的亮度得到关于N个细节层图片的第三数据信息;根据所述第三数据信息,得到所述N个细节层图片的平均亮度D;根据所述N个子图片的对比度的最大值C、所述N个子图片的饱和度的加权和S、所述N个子图片的均值亮度加权和L和所述N个细节层图片的平均亮度D,对K×K个子图片进行计算,得到K×K个融合值Q;以及设置滑动步长N,根据所述融合值Q,生成输出图片,从而使得在通过图片进行多曝光度处理以及图片分区的方法,对每一子图片分别进行运算和融合,从而使得经过本申请所提供的图片处理方法、装置及电子设备处理的图片,对比度高,色彩艳丽。
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的图片处理方法的流程示意图。
图2为本申请实施例提供的图片处理方法的原理示意图。
图3为图1所述的图片处理方法的步骤“根据所述输入数据信息,生成所述输入图片对应的N个不同曝光度的曝光图片的第一数据信息”的流程示意图。
图4为本申请实施例提供的图片处理装置的第一种结构示意图。
图5为图4的图片处理装置的曝光处理模块的结构示意图。
图6为本申请实施例提供的图片处理装置的第二种结构示意图。
图7为本申请实施例提供的图片处理装置的第三种结构示意图。
图8为本申请实施例提供的电子设备的结构示意图。
请参阅图1-3,本申请实施例提供一种图片处理方法。所述图片处理方法应用于电子设备。所述图片处理方法包括:
101:获取一输入图片200,得到输入数据信息。
其中,可以通过电子设备的摄像头拍摄图片,所述通过电子设备的摄像头拍摄的图片即为所述输入图片200,采用处理器获取所述输入图片200的输入数据信息。所述输入数据信息包括所述输入图片200的亮度。
102:根据所述输入数据信息,生成所述输入图片200对应的N个不同曝光度的曝光图片201的第一数据信息,如图2所示。
其中,所述处理器根据所述输入数据信息对所述输入图片200进行处理,从而生成所述输入图片200对应的N个不同曝光度的曝光图片202的第一数据信息。
请参阅图3,所述步骤102可以包括:
1021:提取所述输入图片200的亮度。
其中,可以从所述输入数据信息中提取所述输入图片200的亮度。
在一种实施例中,根据公式L
d(i,j)=e×R(i,j)+f×G(i,j)+g×B(i,j),获得所述输入图片200的亮度Ld,其中,e、f、g为系数,e+f+g=1,Ld(i,j)为第i行、第j列的像素单元的亮度,R(i,j)为第i行、第j列的像素单元的红色子像素的亮度,G(i,j)为第i行、第j列的像素单元的绿色子像素的亮度,B(i,j)为第i行、第j列的像素单元的蓝色子像素的亮度。在一种实施例中,所述系数e的范围为0.1-0.5,所述系数f的范围为0.4-0.8,所述系数g的范围为0.01-0.3。
1022:根据所述输入图片200的亮度,生成所述输入图片200对应的N个不同曝光度的曝光图片201的第一数据信息。
在一种实施例中,根据公式L
ad,k=1+exp(μE V
k),获得所述N个曝光图片201的平均亮度信息L
ad,其中,L
ad,k为第k张曝光图片201的平均亮度,EV
k为曝光度,μ为系数,根据公式
生成所述输入图片200对应的N个不同曝光度的曝光图片200的第一数据信息L
wk(i,j),其中,P
k为第k张图的缩 放因子,第一数据信息L
wk(i,j)为第k张图中,第i行、第j列的像素单元的输出亮度。所述系数μ可以为0.5-3。
在一种实施例中,所述处理器根据所述输入数据信息对所述输入图片200进行处理,从而生成所述输入图片200对应的5个不同曝光度的曝光图片201的第一数据信息。所述曝光度EV
k可以为-1,-0.5,0,0.5和1。
103:根据所述N个第一数据信息,对所述N个曝光图片201进行滤波处理生成关于N个基础层图片202的第二数据信息。
其中,所述第二数据信息为根据所述N个第一数据信息,对所述N个曝光图片201进行滤波处理生成关于N个基础层图片202的数据信息。可以采用引导、双边、线性滤波的方法对所述N个曝光图片201进行滤波处理。在一种实施例中,可以采用S型线性滤波的方法对所述N个曝光图片201进行滤波处理。
104:对所述N个基础层图片202进行区块划分,形成N个K×K的子图片矩阵,所述N个K×K的子图片矩阵包括K×K个子图片组2031,在每个子图片组2031中,所述子图片203的行数相同、列数相同,请参阅图2。
在一种实施例中,可以对所述5个基础层图片202进行区块划分,形成5个5×5的子图片矩阵,所述5个5×5的子图片矩阵包括5×5个子图片组2031。
105:根据所述第二数据信息,获取每一子图片203的对比度c、饱和度s和均值亮度l。
其中,通过对每一个子图片203进行分析,根据所述第二数据信息,获取每一子图片203的对比度c、饱和度s和均值亮度l。
106:在每个子图片组2031中,生成所述N个子图片203对比度的最大值C,生成所述N个子图片203的饱和度的加权和S,生成所述N个子图片203的均值亮度加权和L。
其中,所述步骤106可以包括:
根据每一子图片203的对比度c、饱和度s、均值亮度l和公式
107:根据所述第一数据信息和所述第二数据信息,用N个曝光图片201的第一数据信息中的亮度减去N个基础层图片203的第二数据信息中的亮度得到关于N个细节层图片的第三数据信息。
其中,所述细节层图片为在所述曝光图片202中减去所述基础层图片203的亮度所生成的图片。
108:根据所述第三数据信息,得到所述N个细节层图片的平均亮度D。
109:根据所述N个子图片203的对比度的最大值C、所述N个子图片203的饱和度的加权和S、所述N个子图片203的均值亮度加权和L和所述N个细节层图片的平均亮度D,对K×K个子图片203进行计算,得到K×K个融合值Q。
其中,根据公式Q=C×S+L+A×D,对K×K个子图片203进行计算,得到K×K个融合值Q,其中,A为细节放大系数。在一种实施例中,所述细节放大系数A的范围为1.0-1.8。
110:设置滑动步长N,根据所述融合值Q,生成输出图片。
其中,所述滑动步长N为自然数。
在一种实施方式中,所述步骤101、102、103、104、105、106、107、108、109和110可以按照步骤101、102、103、104、105、106、107、108、109和110的顺序执行。在其他实施例中,所述步骤101、102、103、104、105、106、107、108、109和110也可以按照101、102、103、107、108、104、105、106、109和110的顺序执行。在其他实施例中,所述步骤101、102、103、104、105、106、107、108、109和110还可以先执行步骤101、102、103,然后,从步骤104、105到106的过程和从步骤107到108的过程同时执行,最后,执行步骤109和110。
请参阅图4,本申请实施例还提供一种图片处理装置300。所述图片处理装置300包括获取模块301、曝光处理模块302、第一运算模块303、分区模块304、第二运算模块305、第三运算模块306、第四运算模块307、第五运算模块308、融合模块309和输出模块310。
所述获取模块301用于获取一输入图片,得到输入数据信息。
其中,可以通过电子设备的摄像头拍摄图片,所述通过电子设备的摄像头拍摄的图片即为所述输入图片,采用处理器获取所述输入图片的输入数据信息。所述输入数据信息包括所述输入图片的亮度。
所述曝光处理模块302用于根据所述输入数据信息,生成所述输入图片对应的N个不同曝光度的曝光图片的第一数据信息。
其中,所述处理器根据所述输入数据信息对所述输入图片进行处理,从而生成所述输入图片对应的N个不同曝光度的曝光图片的第一数据信息。
请参阅图5,所述曝光处理模块302包括亮度提取模块3021和生成模块3022。
所述亮度提取模块3021用于提取所述输入图片的亮度。
其中,可以从所述输入数据信息中提取所述输入图片的亮度。
在一种实施例中,根据公式L
d(i,j)=e×R(i,j)+f×G(i,j)+g×B(i,j),获得所述输入图片的亮度Ld,其中,e、f、g为系数,e+f+g=1,Ld(i,j)为第i行、第j列的像素单元的亮度,R(i,j)为第i行、第j列的像素单元的红色子像素的亮度,G(i,j)为第i行、第j列的像素单元的绿色子像素的亮度,B(i,j)为第i行、第j列的像素单元的蓝色子像素的亮度。在一种实施例中,所述系数e的范围为0.1-0.5,所述系数f的范围为0.4-0.8,所述系数g的范围为0.01-0.3。
所述生成模块3022,根据所述输入图片的亮度,生成所述输入图片对应的N个不同曝光度的曝光图片的第一数据信息。
在一种实施例中,根据公式L
ad,k=1+exp(μE V
k),获得所述N个曝光图片的平均亮度信息L
ad,其中,L
ad,k为第k张曝光图片的平均亮度,EV
k为曝光度,μ为系数,根据公式
生成所述输入图片对应的N个不同曝光度的曝光图片的第一数据信息L
wk(i,j),其中,P
k为第k张图的缩放因子,第一数据信息L
wk(i,j)为第k张图中,第i行、第j列的像素单元的输出亮度。所述系数μ可以为0.5-3。
在一种实施例中,所述处理器根据所述输入数据信息对所述输入图片进行处理,从而生成所述输入图片对应的5个不同曝光度的曝光图片的第一数据信息。所述曝光度EV
k可以为-1,-0.5,0,0.5和1。
所述第一运算模块303用于根据所述N个第一数据信息,对所述N个曝光图片进行滤波处理生成关于N个基础层图片的第二数据信息。
其中,所述第二数据信息为根据所述N个第一数据信息,对所述N个曝光图片进行滤波处理生成关于N个基础层图片的数据信息。可以采用引导、双边、线性滤波的方法对所述N个曝光图片进行滤波处理。在一种实施例中,可以采用S型线性滤波的方法对所述N个曝光图片进行滤波处理。
所述分区模块304用于对所述N个基础层图片进行区块划分,形成N个K×K的子图片矩阵,所述N个K×K的子图片矩阵包括K×K个子图片组,在每个子图片组中,所述子图片的行数相同、列数相同。
在一种实施例中,可以对所述5个基础层图片进行区块划分,形成5个5×5的子图片矩阵,所述5个5×5的子图片矩阵包括5×5个子图片组。
所述第二运算模块305用于根据所述第二数据信息,获取每一子图片的对比度c、饱和度s和均值亮度l。
其中,通过对每一个子图片进行分析,根据所述第二数据信息,获取每一子图片的对比度c、饱和度s和均值亮度l。
所述第三运算模块306用于在每个子图片组中,生成所述N个子图片对比度的最大值C,生成所述N个子图片的饱和度的加权和S,生成所述N个子图片的均值亮度加权和L。
其中,所述第三运算模块306根据每一子图片的对比度c、饱和度s、均值亮度l和公式
得到数值
其中,||x
k-μ
xk||为欧几里距离;根据数值
和公式
得到所述N个子图片的对比度的最大值C;根据数值
和公式
和
得到所述N个子图片的饱和度的加权和S;以及根据数值
和公式
和
得到所述N个子图片的均值亮度加权和L,其中,μ
k为全局均值亮度,μ
c和l
c为常数。其中,μ
c和l
c可以为0.5。
所述第四运算模块307用于根据所述第一数据信息和所述第二数据信息,用N个曝光图片的第一数据信息中的亮度减去N个基础层图片的第二数据信息中的亮度得到关于N个细节层图片的第三数据信息。
其中,所述细节层图片为在所述曝光图片中减去所述基础层图片的亮度所生成的图片。
所述第五运算模块308用于根据所述第三数据信息,得到所述N个细节层图片的平均亮度D。
所述融合模块309用于根据所述N个子图片的对比度的最大值C、所述N个子图片的饱和度的加权和S、所述N个子图片的均值亮度加权和L和所述N个细节层图片的平均亮度D,对K×K个子图片进行计算, 得到K×K个融合值Q。
其中,根据公式Q=C×S+L+A×D,对K×K个子图片进行计算,得到K×K个融合值Q,其中,A为细节放大系数。在一种实施例中,所述细节放大系数A的范围为1.0-1.8。
所述输出模块310用于设置滑动步长N,根据所述融合值Q,生成输出图片。
其中,所述滑动步长N为自然数。
在一种实施例中,如图4所示,所述图片处理装置300的获取模块301、曝光处理模块302、第一运算模块303、分区模块304、第二运算模块305、第三运算模块306、第四运算模块307、第五运算模块308、融合模块309和输出模块310可以按照获取模块301、曝光处理模块302、第一运算模块303、分区模块304、第二运算模块305、第三运算模块306、第四运算模块307、第五运算模块308、融合模块309和输出模块310的顺序依次运行。
在其他实施例中,如图6所示,所述图片处理装置300的获取模块301、曝光处理模块302、第一运算模块303、分区模块304、第二运算模块305、第三运算模块306、第四运算模块307、第五运算模块308、融合模块309和输出模块310也可以按照获取模块301、曝光处理模块302、第一运算模块303、第四运算模块307、第五运算模块308、分区模块304、第二运算模块305、第三运算模块306、融合模块309和输出模块310的顺序依次运行。
在其他实施例中,如图7所示,所述图片处理装置300的获取模块301、曝光处理模块302、第一运算模块303、分区模块304、第二运算模块305、第三运算模块306、第四运算模块307、第五运算模块308、融合模块309和输出模块310还可以先运行获取模块301、曝光处理模块302和第一运算模块303,然后,在依次所述分区模块304、第二运算模块305和第三运算模块306的同时,依次运行所述第四运算模块307和第五运算模块308,最后依次运行所述融合模块309和输出模块310。
请参阅图8,本申请实施例提供一种电子设备400。所述电子设备400包括壳体401、摄像头402、显示屏403和处理器404。所述摄像头402固定于所述壳体401,所述摄像头402用于拍摄输入图片。所述显示屏403固定于所述壳体401,所述显示屏403用于显示输出图片。所述处理器404连接于所述摄像头402和显示屏403之间。所述处理器404用于执行如前所述的图片处理方法。
本申请所提供的图片处理方法、装置及电子设备,通过获取一输入图片,生成所述输入图片对应的N个不同曝光度的曝光图片的第一数据信息;根据所述N个第一数据信息,对所述N个曝光图片进行滤波处理生成关于N个基础层图片的第二数据信息;对所述N个基础层图片进行区块划分,形成包括K×K个子图片组的子图片矩阵;根据所述第二数据信息,获取每一子图片的对比度c、饱和度s和均值亮度l;在每个子图片组中,生成所述N个子图片对比度的最大值C,生成所述N个子图片的饱和度的加权和S,生成所述N个子图片的均值亮度加权和L;根据所述第一数据信息和所述第二数据信息,用N个曝光图片的第一数据信息中的亮度减去N个基础层图片的第二数据信息中的亮度得到关于N个细节层图片的第三数据信息;根据所述第三数据信息,得到所述N个细节层图片的平均亮度D;根据所述N个子图片的对比度的最大值C、所述N个子图片的饱和度的加权和S、所述N个子图片的均值亮度加权和L和所述N个细节层图片的平均亮度D,对K×K个子图片进行计算,得到K×K个融合值Q;以及设置滑动步长N,根据所述融合值Q,生成输出图片,从而使得在通过图片进行多曝光度处理以及图片分区的方法,对每一子图片分别进行运算和融合,从而使得经过本申请所提供的图片处理方法、装置及电子设备处理的图片,对比度高,色彩艳丽。
本申请实施例还提供一种存储介质,该存储介质中存储有多条指令,该指令适于由处理器加载以执行上述任一实施例所述的图片处理方法。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:只读存储器(ROK,Read Only KeKory)、随机存取记忆体(RAK,RandoK Access KeKory)、磁盘或光盘等。
以上对本申请实施例进行了详细介绍,本文中应用了具体个例对本申请的原理及实施例进行了阐述, 以上实施例的说明只是用于帮助理解本申请。同时,对于本领域的技术人员,依据本申请的思想,在具体实施例及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。
Claims (20)
- 一种图片处理方法,应用于电子设备,其中,所述图片处理方法包括:101、获取一输入图片,得到输入数据信息;102、根据所述输入数据信息,生成所述输入图片对应的N个不同曝光度的曝光图片的第一数据信息;103、根据所述N个第一数据信息,对所述N个曝光图片进行滤波处理生成关于N个基础层图片的第二数据信息;104、对所述N个基础层图片进行区块划分,形成N个K×K的子图片矩阵,所述N个K×K的子图片矩阵包括K×K个子图片组,在每个子图片组中,所述子图片的行数相同、列数相同;105、根据所述第二数据信息,获取每一子图片的对比度c、饱和度s和均值亮度l;106、在每个子图片组中,生成所述N个子图片对比度的最大值C,生成所述N个子图片的饱和度的加权和S,生成所述N个子图片的均值亮度加权和L;107、根据所述第一数据信息和所述第二数据信息,用N个曝光图片的第一数据信息中的亮度减去N个基础层图片的第二数据信息中的亮度得到关于N个细节层图片的第三数据信息;108、根据所述第三数据信息,得到所述N个细节层图片的平均亮度D;109、根据所述N个子图片的对比度的最大值C、所述N个子图片的饱和度的加权和S、所述N个子图片的均值亮度加权和L和所述N个细节层图片的平均亮度D,对K×K个子图片进行计算,得到K×K个融合值Q;以及110、设置滑动步长N,根据所述融合值Q,生成输出图片。
- 如权利要求1所述的图片处理方法,其中,在根据所述输入数据信息,生成所述输入图片对应的N个不同曝光度的曝光图片的第一数据信息的步骤中,包括:提取所述输入图片的亮度;以及根据所述输入图片的亮度,生成所述输入图片对应的N个不同曝光度的曝光图片的第一数据信息。
- 如权利要求2所述的图片处理方法,其中,在所述提取所述输入图片的亮度中,根据公式L d(i,j)=e×R(i,j)+f×G(i,j)+g×B(i,j),获得所述输入图片的亮度Ld,其中,e、f、g为系数,e+f+g=1,Ld(i,j)为第i行、第j列的像素单元的亮度,R(i,j)为第i行、第j列的像素单元的红色子像素的亮度,G(i,j)为第i行、第j列的像素单元的绿色子像素的亮度,B(i,j)为第i行、第j列的像素单元的蓝色子像素的亮度。
- 如权利要求1所述的图片处理方法,其中,在根据所述N个子图片的对比度的最大值C、所述N个子图片的饱和度的加权和S、所述N个子图片的均值亮度加权和L和所述N个细节层图片的平均亮度D,对K×K个子图片进行计算,得到K×K个融合值Q中,根据公式Q=C×S+L+A×D,对K×K个子图片进行计算,得到K×K个融合值Q,其中,A为细节放大系数。
- 如权利要求1所述的图片处理方法,其中,所述步骤104、步骤105、步骤106、步骤107和步骤108的执行顺序为:步骤104、步骤105、步骤106、步骤107和步骤108。
- 如权利要求1所述的图片处理方法,其中,所述步骤104、步骤105、步骤106、步骤107和步骤108的执行顺序为:步骤107、步骤108、步骤104、步骤105和步骤106。
- 如权利要求1所述的图片处理方法,其中,所述步骤104、步骤105、步骤106、步骤107和步骤108的执行顺序为:在按照依次执行步骤104、步骤105和步骤106的顺序执行所述步骤104、步骤105和步骤106的同时,按照依次执行步骤107和步骤108的顺序执行所述步骤107和步骤108。
- 一种图片处理装置,其中,包括:获取模块,用于获取一输入图片,得到输入数据信息;曝光处理模块,用于根据所述输入数据信息,生成所述输入图片对应的N个不同曝光度的曝光图片的第一数据信息;第一运算模块,用于根据所述N个第一数据信息,对所述N个曝光图片进行滤波处理生成关于N个基础层图片的第二数据信息;分区模块,用于对所述N个基础层图片进行区块划分,形成N个K×K的子图片矩阵,所述N个K×K的子图片矩阵包括K×K个子图片组,在每个子图片组中,所述子图片的行数相同、列数相同;第二运算模块,用于根据所述第二数据信息,获取每一子图片的对比度c、饱和度s和均值亮度l;第三运算模块,用于在每个子图片组中,生成所述N个子图片对比度的最大值C,生成所述N个子图片的饱和度的加权和S,生成所述N个子图片的均值亮度加权和L;第四运算模块,用于根据所述第一数据信息和所述第二数据信息,用N个曝光图片的第一数据信息中的亮度减去N个基础层图片的第二数据信息中的亮度得到关于N个细节层图片的第三数据信息;第五运算模块,用于根据所述第三数据信息,得到所述N个细节层图片的平均亮度D;融合模块,用于根据所述N个子图片的对比度的最大值C、所述N个子图片的饱和度的加权和S、所述N个子图片的均值亮度加权和L和所述N个细节层图片的平均亮度D,对K×K个子图片进行计算,得到K×K个融合值Q;以及输出模块,用于设置滑动步长N,根据所述融合值Q,生成输出图片。
- 如权利要求10所述的图片处理装置,其中,所述曝光处理模块包括:亮度提取模块,用于提取所述输入图片的亮度;以及生成模块,根据所述输入图片的亮度,生成所述输入图片对应的N个不同曝光度的曝光图片的第一数据信息。
- 如权利要求10所述的图片处理装置,其中,所述分区模块、第二运算模块、第三运算模块、第四运算模块和第五运算模块的运行顺序为:分区模块、第二运算模块、第三运算模块、第四运算模块和第五运算模块。
- 如权利要求10所述的图片处理装置,其中,所述分区模块、第二运算模块、第三运算模块、第四运算模块和第五运算模块的运行顺序为:第四运算模块、第五运算模块、分区模块、第二运算模块和第三运算模块。
- 如权利要求10所述的图片处理装置,其中,所述分区模块、第二运算模块、第三运算模块、第四运算模块和第五运算模块的运行顺序为:在按照依次运行分区模块、第二运算模块和第三运算模块的顺序 运行所述分区模块、第二运算模块和第三运算模块的同时、按照依次运行第四运算模块和第五运算模块的顺序运行所述第四运算模块和第五运算模块。
- 一种电子设备,其中,包括:壳体;摄像头,所述摄像头固定于所述壳体,所述摄像头用于拍摄图片;显示屏,所述显示屏固定于所述壳体,所述显示屏用于显示图片;以及处理器,所述处理器连接于所述摄像头和显示屏之间,所述处理器用于执行:101、获取一输入图片,得到输入数据信息;102、根据所述输入数据信息,生成所述输入图片对应的N个不同曝光度的曝光图片的第一数据信息;103、根据所述N个第一数据信息,对所述N个曝光图片进行滤波处理生成关于N个基础层图片的第二数据信息;104、对所述N个基础层图片进行区块划分,形成N个K×K的子图片矩阵,所述N个K×K的子图片矩阵包括K×K个子图片组,在每个子图片组中,所述子图片的行数相同、列数相同;105、根据所述第二数据信息,获取每一子图片的对比度c、饱和度s和均值亮度l;106、在每个子图片组中,生成所述N个子图片对比度的最大值C,生成所述N个子图片的饱和度的加权和S,生成所述N个子图片的均值亮度加权和L;107、根据所述第一数据信息和所述第二数据信息,用N个曝光图片的第一数据信息中的亮度减去N个基础层图片的第二数据信息中的亮度得到关于N个细节层图片的第三数据信息;108、根据所述第三数据信息,得到所述N个细节层图片的平均亮度D;109、根据所述N个子图片的对比度的最大值C、所述N个子图片的饱和度的加权和S、所述N个子图片的均值亮度加权和L和所述N个细节层图片的平均亮度D,对K×K个子图片进行计算,得到K×K个融合值Q;以及110、设置滑动步长N,根据所述融合值Q,生成输出图片。
- 如权利要求15所述的电子设备,其中,在根据所述输入数据信息,生成所述输入图片对应的N个不同曝光度的曝光图片的第一数据信息的步骤中,包括:提取所述输入图片的亮度;以及根据所述输入图片的亮度,生成所述输入图片对应的N个不同曝光度的曝光图片的第一数据信息。
- 如权利要求16所述的电子设备,其中,在所述提取所述输入图片的亮度中,根据公式L d(i,j)=e×R(i,j)+f×G(i,j)+g×B(i,j),获得所述输入图片的亮度Ld,其中,e、f、g为系数,e+f+g=1,Ld(i,j)为第i行、第j列的像素单元的亮度,R(i,j)为第i行、第j列的像素单元的红色子像素的亮度,G(i,j)为第i行、第j列的像素单元的绿色子像素的亮度,B(i,j)为第i行、第j列的像素单元的蓝色子像素的亮度。
- 如权利要15所述图片处理方法,其中,在根据所述N个子图片的对比度的最大值C、所述N个子图片的饱和度的加权和S、所述N个子图片的均值亮度加权和L和所述N个细节层图片的平均亮度D,对K×K个子图片进行计算,得到K×K个融合值Q中,根据公式Q=C×S+L+A×D,对K×K个子图片进行计算,得到K×K个融合值Q,其中,A为细节放大系数。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811557971.0 | 2018-12-19 | ||
| CN201811557971.0A CN109712091B (zh) | 2018-12-19 | 2018-12-19 | 图片处理方法、装置及电子设备 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020124882A1 true WO2020124882A1 (zh) | 2020-06-25 |
Family
ID=66256061
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2019/082171 Ceased WO2020124882A1 (zh) | 2018-12-19 | 2019-04-11 | 图片处理方法、装置及电子设备 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN109712091B (zh) |
| WO (1) | WO2020124882A1 (zh) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116630218B (zh) * | 2023-07-02 | 2023-11-07 | 中国人民解放军战略支援部队航天工程大学 | 一种基于边缘保持平滑金字塔的多曝光图像融合方法 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102509279A (zh) * | 2011-11-02 | 2012-06-20 | 北京工业大学 | 根部欠照明舌图像的自适应暗部细节复现方法 |
| CN103413286A (zh) * | 2013-08-02 | 2013-11-27 | 北京工业大学 | 一种基于学习的高动态范围与高分辨率图像联合重建方法 |
| CN106875352A (zh) * | 2017-01-17 | 2017-06-20 | 北京大学深圳研究生院 | 一种低照度图像增强方法 |
| CN108513672A (zh) * | 2017-07-27 | 2018-09-07 | 深圳市大疆创新科技有限公司 | 增强图像对比度的方法、设备及存储介质 |
Family Cites Families (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2014078985A1 (en) * | 2012-11-20 | 2014-05-30 | Thomson Licensing | Method and apparatus for image regularization |
| CN104125408B (zh) * | 2013-04-28 | 2018-06-12 | 比亚迪股份有限公司 | 一种高动态范围图像处理方法及装置 |
| CN104881854B (zh) * | 2015-05-20 | 2017-10-31 | 天津大学 | 基于梯度和亮度信息的高动态范围图像融合方法 |
| CN106157305B (zh) * | 2016-06-30 | 2019-02-15 | 北京大学 | 基于局部特性的高动态图像快速生成方法 |
| CN106960414B (zh) * | 2016-12-12 | 2020-01-03 | 天津大学 | 一种多视角ldr图像生成高分辨率hdr图像的方法 |
| CN107220956A (zh) * | 2017-04-18 | 2017-09-29 | 天津大学 | 一种基于多幅具有不同曝光度的ldr图像的hdr图像融合方法 |
| US10036975B1 (en) * | 2017-06-28 | 2018-07-31 | Eastman Kodak Company | Determining a pulse timing function for a linear printhead |
| CN107845128B (zh) * | 2017-11-03 | 2021-09-03 | 安康学院 | 一种多尺度细节融合的多曝光高动态图像重建方法 |
-
2018
- 2018-12-19 CN CN201811557971.0A patent/CN109712091B/zh active Active
-
2019
- 2019-04-11 WO PCT/CN2019/082171 patent/WO2020124882A1/zh not_active Ceased
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102509279A (zh) * | 2011-11-02 | 2012-06-20 | 北京工业大学 | 根部欠照明舌图像的自适应暗部细节复现方法 |
| CN103413286A (zh) * | 2013-08-02 | 2013-11-27 | 北京工业大学 | 一种基于学习的高动态范围与高分辨率图像联合重建方法 |
| CN106875352A (zh) * | 2017-01-17 | 2017-06-20 | 北京大学深圳研究生院 | 一种低照度图像增强方法 |
| CN108513672A (zh) * | 2017-07-27 | 2018-09-07 | 深圳市大疆创新科技有限公司 | 增强图像对比度的方法、设备及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN109712091B (zh) | 2021-03-23 |
| CN109712091A (zh) | 2019-05-03 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN112288658B (zh) | 一种基于多残差联合学习的水下图像增强方法 | |
| Song et al. | Probabilistic exposure fusion | |
| CN107316286B (zh) | 一种图像中雨雾同步合成、去除的方法和装置 | |
| JP7512150B2 (ja) | 情報処理装置、情報処理方法およびプログラム | |
| CN110335221B (zh) | 一种基于无监督学习的多曝光图像融合方法 | |
| CN113935917B (zh) | 一种基于云图运算和多尺度生成对抗网络的光学遥感影像薄云去除方法 | |
| CN114372990A (zh) | 彻底抠除绿幕的图像合成方法、装置、设备及存储介质 | |
| WO2023005818A1 (zh) | 噪声图像生成方法、装置、电子设备及存储介质 | |
| CN108229346A (zh) | 使用有符号的前景提取与融合的视频摘要 | |
| CN113284061A (zh) | 一种基于梯度网络的水下图像增强方法 | |
| CN110489584B (zh) | 基于密集连接的MobileNets模型的图像分类方法及系统 | |
| CN118195920B (zh) | 自适应权重细节保持多曝光图像融合算法 | |
| CN113706400B (zh) | 图像矫正方法、装置、显微镜图像的矫正方法及电子设备 | |
| CN113256525B (zh) | 红外热成像图像增强方法、装置、设备及可读存储介质 | |
| CN118134789A (zh) | 一种基于盲点网络的低照度图像自监督增强方法 | |
| CN111178229B (zh) | 一种基于深度学习的静脉显像方法和装置 | |
| WO2020124882A1 (zh) | 图片处理方法、装置及电子设备 | |
| CN117408886A (zh) | 气体图像增强方法、装置、电子装置和存储介质 | |
| WO2020087434A1 (zh) | 一种人脸图像清晰度评价方法及装置 | |
| CN111242087B (zh) | 物体识别方法及装置 | |
| CN111968039A (zh) | 基于硅传感器相机的昼夜通用图像处理方法、装置及设备 | |
| CN114972100A (zh) | 噪声模型的估计方法和装置、图像处理方法和装置 | |
| CN111383299A (zh) | 图像的处理方法、装置及计算机可读存储介质 | |
| CN119520700A (zh) | 图像饱和度调节方法、装置、设备、存储介质和程序产品 | |
| CN109658358B (zh) | 一种基于多导向滤波的快速bayer彩色重建方法 |
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: 19899669 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: 19899669 Country of ref document: EP Kind code of ref document: A1 |









































