CN107993189A - A kind of picture tone dynamic regulating method and device based on local block - Google Patents

A kind of picture tone dynamic regulating method and device based on local block Download PDF

Info

Publication number
CN107993189A
CN107993189A CN201610950433.2A CN201610950433A CN107993189A CN 107993189 A CN107993189 A CN 107993189A CN 201610950433 A CN201610950433 A CN 201610950433A CN 107993189 A CN107993189 A CN 107993189A
Authority
CN
China
Prior art keywords
pixel point
current pixel
value
block
image
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.)
Granted
Application number
CN201610950433.2A
Other languages
Chinese (zh)
Other versions
CN107993189B (en
Inventor
何平征
戴正展
林奇奇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fuzhou Rockchip Electronics Co Ltd
Original Assignee
Fuzhou Rockchip Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuzhou Rockchip Electronics Co Ltd filed Critical Fuzhou Rockchip Electronics Co Ltd
Priority to CN201610950433.2A priority Critical patent/CN107993189B/en
Publication of CN107993189A publication Critical patent/CN107993189A/en
Application granted granted Critical
Publication of CN107993189B publication Critical patent/CN107993189B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map
    • G06T3/053Detail-in-context presentations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • G06T5/94Dynamic range modification of images or parts thereof based on local image properties, e.g. for local contrast enhancement

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a kind of picture tone dynamic regulating method and device based on local block, the described method comprises the following steps:First according to the pixel value of a current pixel point on an image, the corresponding luma component values of current pixel point are obtained;The then background area according to current pixel point on the image, obtains the corresponding background value of current pixel point;The then close region according to current pixel point on the image, obtains an average brightness value corresponding with current pixel point;Then according to the corresponding background value of current pixel point and corresponding average brightness value, the corresponding pixel gain coefficients of current pixel point are obtained;Gain process then is carried out to the pixel value of current pixel point using current pixel point corresponding pixel gain coefficients.Image Warping can be effectively improved by the above method, retain image detail well, at the same it is relatively easy compared to algorithm complex for existing algorithm, be conducive to improve image processing efficiency.

Description

A kind of picture tone dynamic regulating method and device based on local block
Technical field
The present invention relates to image processing field, more particularly to a kind of picture tone dynamic regulating method based on local block And device.
Background technology
Brightness (Luminance) is human eye to illuminance(photometric quantity)Sensing results, generally with Cd/m2 is unit.Dynamic range (dynamic range) is the ratio of maximum brightness and minimum brightness, and human eye is in observation object When can adaptively adjust region very bright or very dark in scene, but camera is since luminance dynamic range is limited, often without Method shows that partial distortion phenomenon occurs in the image for causing to capture at the same time to highlighted or excessively dark region in scene.
At present, by using wide dynamic range(Wide dynamic range, abbreviation WDR) technology solves above-mentioned ask Topic.Specific algorithm includes global map algorithm, local histogram's algorithm, Retinex theories etc., these algorithms are computationally intensive, multiple Miscellaneous degree is high, is unfavorable for hardware realization, while can not also retain image detail well, and the image after processing still remains largely Noise.
The content of the invention
For this reason, it may be necessary to a kind of technical solution of the picture tone dynamic regulation based on local block is provided, it is existing to solve Some wide dynamic range technologies when handling image, algorithm complex is high, computationally intensive, hardware cost is high, image detail can not The problems such as preserving very well.
A kind of picture tone dynamic regulating method based on local block is inventor provided, the described method includes following step Suddenly:
According to the pixel value of a current pixel point on an image, the corresponding luma component values of current pixel point are obtained;
According to the background area of current pixel point on the image, the corresponding background value of current pixel point is obtained;
According to the close region of current pixel point on the image, an average brightness corresponding with current pixel point is obtained Value;
According to the corresponding background value of current pixel point and corresponding average brightness value, obtain current pixel point and correspond to Pixel gain coefficients;
Gain process is carried out to the pixel value of current pixel point using current pixel point corresponding pixel gain coefficients.
Further, the pixel value includes R component value, G component values and B component value, described " to obtain current pixel point Corresponding luma component values " include:
According to the component value of numerical value maximum in current pixel point R component value, G component values, B component value three, calculate current The luma component values of pixel.
Further, the pixel value includes R component value, G component values and B component value, described " to obtain current pixel point Corresponding luma component values " include:
First ranking operation is carried out to the R component value of current pixel point, G component values and B component value, obtains current pixel The luma component values of point.
Further, described " obtaining the corresponding background value of current pixel point " includes step:
Set a background area of the Gaussian Blur core as current pixel point on the image using centered on current pixel point Domain;
The Gauss weighted average of the pixel in the Gaussian Blur core of setting is calculated, as the corresponding back of the body of current pixel point Scape brightness value.
Further, described " the one Gaussian Blur core centered on current pixel point of setting " includes step:
Gaussian Blur nuclear radius is sequentially increased by gradient, and calculates all pixels in the range of the Gaussian Blur core of increase successively The difference ratio of the Gauss weighted average of point;
If difference ratio is more than predetermined threshold value, Gaussian Blur core of the Gaussian Blur core before increase for setting is selected.
Further, the step includes step " according to the close region of current pixel point on the image ":
Several NxN sub-blocks are divided an image into,
Position according to where current pixel point, determines that the sub-block adjacent with current pixel point is close region.
Further, the step " obtaining an average brightness value corresponding with current pixel point " includes step:
Obtain the corresponding pixel average of adjacent with current pixel point sub-block;
According to current pixel point and the coordinate position relation of the central pixel point of adjacent sub-block, acquired pixel is put down Average carries out the second ranking operation, obtains average brightness value corresponding with current pixel point.
Inventor additionally provides a kind of picture tone dynamic regulation device based on local block, and described device includes brightness Acquisition module, local background's brightness module, block average brightness module, local tone mapping block and gain process module;
The luminance acquisition module is used for the pixel value according to a current pixel point on an image, obtains current pixel The corresponding luma component values of point;
Local background's brightness module is used for the background area according to current pixel point on the image, obtains current pixel The corresponding background value of point;
Described piece of average brightness module is used for the close region according to current pixel point on the image, obtain one with it is current The corresponding average brightness value of pixel;
The part tone mapping block is used for according to the corresponding background value of current pixel point and corresponding average Brightness value, obtains the corresponding pixel gain coefficients of current pixel point;
The gain process module is used for the picture to current pixel point using the corresponding pixel gain coefficients of current pixel point Element value carries out gain process.
Further, the pixel value includes R component value, G component values and B component value, and the luminance acquisition module is used Include in " obtaining the corresponding luma component values of current pixel point ":
The luminance acquisition module is used for according to numerical value in current pixel point R component value, G component values, B component value three most Big component value, calculates the luma component values of current pixel point.
Further, the pixel value includes R component value, G component values and B component value, and the luminance acquisition module is used Include in " obtaining the corresponding luma component values of current pixel point ":
The luminance acquisition module is used to carry out first to the R component value of current pixel point, G component values and B component value Ranking operation, obtains the luma component values of current pixel point.
Further, local background's brightness module is used for " obtaining the corresponding background value of current pixel point " bag Include:
Local background's brightness module is used for the one Gaussian Blur core using centered on current pixel point of setting and is used as current picture The background area of vegetarian refreshments on the image, and the Gauss weighted average of the pixel in the Gaussian Blur core of setting is calculated, as The corresponding background value of current pixel point.
It is further, described that " local background's brightness module is used to set a Gaussian mode centered on current pixel point Paste core " includes:
Local background's brightness module is used to be sequentially increased Gaussian Blur nuclear radius by gradient, and calculates the Gauss of increase successively The difference ratio of the Gauss weighted average of all pixels point in the range of fuzzy core, and when difference ratio is more than predetermined threshold value, selection Gaussian Blur core before increase is the Gaussian Blur core of setting.
Further, described " block average brightness module is used for the close region according to current pixel point on the image " bag Include:
Block average brightness module is used to divide an image into several NxN sub-blocks, and the position according to where current pixel point Put, determine that the sub-block adjacent with current pixel point is close region.
Further, described piece of average brightness module is used for " obtaining an average brightness value corresponding with current pixel point " Including step:
Block average brightness module is used to obtaining the corresponding pixel average of adjacent with current pixel point sub-block, and according to ought Preceding pixel point and the coordinate position relation of the central pixel point of adjacent sub-block, carry out second to acquired pixel average and add Computing is weighed, obtains average brightness value corresponding with current pixel point.
The picture tone dynamic regulating method and device based on local block described in above-mentioned technical proposal, the method bag Include following steps:First according to the pixel value of a current pixel point on an image, the corresponding brightness of current pixel point is obtained Component value;The then background area according to current pixel point on the image, obtains the corresponding background value of current pixel point;And Close region according to current pixel point on the image afterwards, obtains an average brightness value corresponding with current pixel point;Then According to the corresponding background value of current pixel point and corresponding average brightness value, obtain the corresponding pixel of current pixel point and increase Beneficial coefficient;Gain process then is carried out to the pixel value of current pixel point using current pixel point corresponding pixel gain coefficients. Image Warping can be effectively improved by the above method, retain image detail well, while compared to existing algorithm For algorithm complex it is relatively easy, be conducive to improve image processing efficiency.
Brief description of the drawings
Fig. 1 is the signal for the picture tone dynamic regulation device based on local block that an embodiment of the present invention is related to Figure;
Fig. 2 is the picture tone dynamic regulation device processing figure based on local block that another embodiment of the present invention is related to As flow diagram;
Fig. 3 is the flow for the picture tone dynamic regulating method based on local block that an embodiment of the present invention is related to Figure;
Description of reference numerals:
110th, camera;
120th, image;
130th, picture processing chip;131、CPU;133、DSP;135th, memory;
140th, image optimization module;141st, luminance acquisition module;143rd, local background's brightness module;145th, block average brightness Module;147th, local tone mapping block;
150th, image is optimized;
210th, current pixel point;
220th, image block is closed on;225th, background image block;
230th, current pixel brightness;
240th, block average brightness;
250th, local background's brightness;
260th, gain coefficient;
270th, union operation.
Embodiment
To describe the technology contents of technical solution, construction feature, the objects and the effects in detail, below in conjunction with specific reality Apply example and coordinate attached drawing to be explained in detail.
Fig. 1 describes what an embodiment of the present invention was related to, the picture tone dynamic regulation device based on local block Schematic diagram.In Fig. 1, camera 110 has collection figure to be mountable on the electronic equipments such as video camera, mobile phone, tablet As the electronic component of data function.Image 120 is 110 acquired image data of camera, including a frame or multiple image Or video.Picture processing chip 130(The picture tone dynamic regulation device based on local block that i.e. present invention mentions)Can To receive 110 acquired image 120 of camera, after carrying out correspondingly optimization processing, output optimization image 150.
Picture processing chip 130 can be designed as an independent chip, or be incorporated into other chips.Image procossing core Piece 130 includes the various hardware modules such as CPU131, DSP133, memory 135 and image optimization module 140.CPU131 is center Processor(Central Processing Unit, abbreviation CPU), for carrying out overall control to image processing process;DSP133 For digital signal processor(Digital Signal Processor, abbreviation DSP), exist for providing image optimization module 140 The corresponding function needed in optimization process;Memory 135 is cache module, for cache image optimization module 140 in image procossing During some data.
Image optimization module 140 is a hardware module optimized to image, including at least luminance acquisition module 141st, local background's brightness module 143, block average brightness module 145 and local tone mapping block 147.The luminance acquisition mould Block 141 is used for the pixel value according to a current pixel point on an image 120, obtains the corresponding " brightness point of current pixel point Value ";Local background's brightness module 143 is used for the background area according to current pixel point on the image, obtains current picture Vegetarian refreshments is corresponding " background value ";Described piece of average brightness module 145 is used for according to current pixel point closing on the image Region unit, obtains one " average brightness value " corresponding with current pixel point;The part tone mapping block 147 is used for basis The corresponding background value of current pixel point and corresponding average brightness value, obtain the corresponding " pixel of current pixel point Gain coefficient ".Picture processing chip 130 utilizes the pixel gain coefficients, and optimization processing is carried out to the current pixel point, to improve The local contrast of image 120, and become apparent from the details on image 120.Picture processing chip 130 is by the pixel after optimization After point is stored in optimization image 150, then next pixel on image 120 is chosen, repeat above-mentioned optimization processing.At image After reason chip 130 has optimized pixel all on image 120, generate and export optimization image 150.
Fig. 2 describes a process flow embodiment of picture processing chip optimization image.The picture processing chip pair The picture processing chip 130 of Fig. 1 is answered, and includes the image optimization module of a corresponding diagram 1.The brightness of the image optimization module obtains Modulus block 141, local background's brightness module 143, block average brightness module 145 and local tone mapping block 147 correspond Corresponding module in Fig. 1.
In one embodiment, the image optimization module of picture processing chip selected first from image 120 one is worked as Preceding pixel point 210, and the current pixel 120 is inputed into luminance acquisition module 141.Luminance acquisition module 141 is according to current picture The pixel value of vegetarian refreshments 210, to obtain a corresponding luma component values as current pixel brightness 230.Current pixel point 210 Pixel value can be rgb value, including represent the B component value of the R component value of red, the G component values of green and blueness.Brightness Acquisition module 141 can be made according to the component value of numerical value maximum in current pixel point R component value, G component values, B component value three For current pixel brightness 230.This process can be represented with the following formula:
L=max (R, G, B);
Wherein, L represents current pixel brightness 230, and R, G, B represent the R component value of current pixel point 210, G component values respectively And B component value.
In another embodiment, luminance acquisition module 141 can to the R component value of current pixel point 210, G component values with And B component value carries out the first ranking operation, current pixel brightness 230 is obtained.First ranking operation can use the following formula(1)Table Show:
L=a*R+b*G+c*B;The formula of a+b+c=1(1)
Wherein, L represents current pixel brightness 230, and R, G, B represent the R component value of current pixel point 210, G component values respectively And B component value.Described a, b, c represent R component value, G component values, the corresponding weighted value of B component value respectively, and a, b, c can roots Meet formula according to selection is actually needed(1)The numerical value of condition.
After luminance acquisition module 141 obtains current pixel brightness 230, local background's brightness module 143 can be from image 120 In, interception one and the relevant background image block 225 of current pixel point 210, then by the background image block 225 and current picture The processing of plain brightness 230, obtains local background's brightness 250.It is bright in order to calculate the local background of some pixel as precisely as possible Degree 250, local background's brightness module 143 need to choose background area progress smothing filtering as big as possible in image 120, again The border for the background area for ensureing to choose is not across into high-contrast area.In other words, local background's brightness module 143 On the one hand the pixel value of each pixel in selected background image block 225 is required as close possible on the other hand requirement Selected background image block 225 includes more pixels as much as possible.
In one embodiment, it is suitable to obtain one using gaussian pyramid algorithm for local background's brightness module 143 Background image block 225 is used to calculate local background's brightness 250.Specifically, local background's brightness module 143 first set one with Background image block 225 of the Gaussian Blur core as current pixel point on image 120 centered on current pixel point 210;Then The Gauss weighted average of the pixel in the Gaussian Blur core is calculated, is used as and 210 corresponding part of current pixel point Background luminance 250.Above-mentioned " the one Gaussian Blur core centered on current pixel point 210 of setting " further includes:By gradient progressively Increase Gaussian Blur nuclear radius, and calculate the Gauss weighted average of the Gaussian Blur core after increase, with the Gaussian mode before increase Paste the difference of the Gauss weighted average of core;If difference is more than preset threshold condition, the Gaussian Blur core before selection increase For the Gaussian Blur core of setting, and local background's brightness 250 is calculated with the Gaussian Blur core of the setting.Local background's brightness mould Local background's brightness 250 that block 143 exports can be set to LBackground(x,y)。
In certain embodiments, above-mentioned steps can be represented with following formula.Formula(2)For Gauss weighted average It is worth the calculation formula of (Weighted Average):
Wherein,(x,y)Refer to coordinate of the current pixel point 210 in image 120;L (x, y) corresponds to for current pixel point 210 Current pixel brightness 230;Gauss (x, y, r) refers to (x, y)Centered on, the calculating knot using r as the Gaussian Blur core of radius Fruit;For convolution algorithm.Therefore, WA (x, y, r) represents one with (x, y)Centered on, the model using r as the Gaussian Blur core of radius Enclose the Gauss weighted average of interior all pixels point.
Formula(3)To measure the calculation formula of Gauss weighted average difference:
In formula(3)In, WA (x, y, rIncreased) refer to and use formula(2)Calculate, with the r after increaseIncreasedFor half The Gauss weighted average of all pixels point in the Gaussian Blur core in footpath;WA(x,y,rOriginal) refer to the r before increaseOriginal For the Gauss weighted average of all pixels point in the Gaussian Blur core of radius;rIncreased>rOriginal.In addition, formula(3)In DiffRatio be above-mentioned two Gauss weighted average difference ratio;C is constant;ε is predetermined threshold value, value range 0~ Between 1.
Formula can be given(3)In one default initial value of Gaussian Blur nuclear radius, then with one setting be incremented by Speed is sequentially increased the radius of Gaussian Blur core, also can evenly or unevenly be incremented by by the other modes of user setting.Such as The radius initial value of Gaussian Blur core can be preset as k0, and increasing velocity can be set to m times.In this way, Gaussian Blur nuclear radius Can be successively with geometric sequence(Such as k0, k0*m, k0*m2、k0*m3Deng)Gradually increase uses the Gaussian Blur of this Series Sequences Nuclear radius, passes through above-mentioned formula(3)Formula is disclosure satisfy that to find one(3)And the Gaussian Blur core of radius maximum is as the back of the body Scape image block 225, and for calculating local background's brightness 250.Can be according to the Pixel Dimensions or details of image 120 in practical application Clarity, takes into account illumination while the appropriate radius initial value for adjusting Gaussian Blur core or increasing velocity are to ensure local detail and estimates The accuracy of meter, optimizes overall contrast.
In certain embodiments, block average brightness module 145 from image 120 by finding and 210 phase of current pixel point Adjacent closes on image block 220, then by closing on the processing of image block 220 to this, to obtain and 210 corresponding block of current pixel point Average brightness 240.Close on image block 220 and refer to what one or more was closed on current pixel point 210, the institute from image 120 The image block of the default size acquired.Default big I is NxN or MxN;M, N be it is any be more than 1 integer.Than Such as, four default sized images blocks of the upper and lower, left and right in current pixel point 210, can be closing on for current pixel point 210 Image block 220.Alternatively, using on image 120 pass through current pixel point 210 abscissa line and vertical coordinate line as line of demarcation, place In the upper left of current pixel point 210, lower-left, upper right, four default sizes of bottom right image block, or current pixel point 210 close on image block 220.Current pixel point 210 for being in 120 edge of image, adjacent thereto closes on image block 220 It is possibly less than four(Such as 1 or 2).In addition, the image block adjacent with current pixel point 210 can include(Or not Comprising)The current pixel point 210.
In certain embodiments, determine current pixel point 210 close on image block 220 after, block average brightness module 145 Calculate each corresponding average brightness value for closing on image block 220.Specifically, image block 220 is closed on for each, block is average After this is closed on the corresponding luma component values addition of all pixels point in image block 220 by brightness module 145, divided by this closes on image The number of pixel in block 220, the value obtained are the average brightness value that this closes on image block 220.One pixel is corresponding Luma component values can be calculated by its R, G, B component value.In addition, block average brightness module 145 can be to pixel Corresponding luma component values make further adjustment by a Gamma conversion.
In certain embodiments, block average brightness module 145 each closes on the corresponding average of image block 220 obtaining After brightness value, can according to current pixel point 210 with these close on image block 220 central pixel point coordinate position relation, Second ranking operation is carried out to these average brightness values, and obtains one " average brightness value " corresponding with current pixel point 210. Such as block average brightness module 145 according to current pixel point 210 and the central pixel point for each closing on image block 220 away from From giving these coordinate position relations different weights(For example the nearlyer weight of distance is bigger).Then, block average brightness module 145 close on 220 corresponding average brightness value of image block with these weights to these carries out the second ranking operation(Such as following formula (7)As computing), obtain closing on the block average brightness 240 of image block 220 near current pixel point 210, and be recorded as LAverage(x,y)。
Preferably, image 120 first can be divided into several NxN sub-blocks by block average brightness module 145, and the N can be with Be 2 it is any be more than 1 power side.Then, CPU131 can be corresponding flat with each NxN sub-blocks on precalculated image 120 Equal brightness value, and result of calculation is stored in memory 135.For example, block average brightness module 145 divides an image into 50 8x8 sub-blocks, respectively after the corresponding average brightness value of 50 sub-blocks of calculating, 50 result of calculations are stored in memory 135.
Afterwards, when to calculate the block average brightness 240 for closing on image block 220 near a current pixel point 210, block Average brightness module 145 can determine adjacent with current pixel point 210 according to the coordinate position where current pixel point 210 One or more NxN sub-block closes on image block 220 for current pixel point 210.For example block average brightness module 145 can be with First the central pixel point of definite sub-block is adjacent image block 220 apart from 4 minimum NxN sub-blocks with current pixel point 210, and from 4 average brightness values corresponding with this 4 NxN sub-blocks are read in memory 135.Afterwards, block average brightness module 145 is according to current The coordinate position relation of the central pixel point of pixel 210 and 4 adjacent NxN sub-blocks, to 4 acquired average brightness values into The second ranking operation of row, the block average brightness 240 for closing on image block 220 near current pixel point 210 is obtained with regard to this.
In certain embodiments, corresponding piece of current pixel point 210 is being received at block average brightness module 145 averagely Brightness 240, and after receiving the corresponding local background's brightness 250 of current pixel point 210 at local background's brightness module 143, Local tone mapping block 147 can calculate current pixel point according to the block average brightness 240 and local background's brightness 250 A 210 corresponding gain coefficients 260.The calculating of gain coefficient 260 such as formula(6)It is shown:
Wherein, Gain (x, y) is gain coefficient 260;LAverage(x, y) is flat for corresponding piece of current pixel point 210 Equal brightness 240;LBackground(x, y) is and the corresponding local background's brightness 250 of current pixel point 210;Func is represented to letter Two values after number carry out linearly or nonlinearly computing and obtain another numerical value, and the algorithm of calculating can be carried out according to being actually needed Adjustment.A is coefficient, and C is constant, its size can adjust, for avoiding excessive tensile dark picture areas and causing noise penalty.
In certain embodiments, the block that block averaging module 145 and local tone mapping block 147 are stored in memory 135 is put down Equal brightness 240 and various look-up tables, can be used in the processing to next two field picture of image 120.Specifically, if image Optimization module judges that next two field picture is mapped with this two field picture 120 without big difference, that block averaging module 145 and local tone Module 147 can be using being stored in the various data of memory 135 come gain coefficient 260, and without according to next frame Image divides NxN sub-blocks again, calculates the block average brightness 240 of each sub-block, or establishes new look-up table.
After gain coefficient 260 confirms, current pixel point 210 and gain coefficient 260 are passed through a conjunction by image optimization module Into operation 270, an optimization pixel in image 150 is optimized is obtained, synthetic operation is as shown in following formula:
Rout(x,y)=Gain(x,y)*L(x,y)1-γ*Rγ(x,y);
Gout(x,y)=Gain(x,y)*L(x,y)1-γ*Gγ(x,y);
Bout(x,y)=Gain(x,y)*L(x,y)1-γ*Bγ(x,y);
Here γ can be used for adjustment result saturation degree, make γ=1 to be reduced in certain embodiments
Pass through formula(8)As can be seen that in synthetic operation 270, image optimization module is corresponding by current pixel point 210 R component value R (x, y), G component value G (x, y) and B component value B (x, y) are multiplied with gain coefficient 260 successively, obtain R The component value of component value Rout (x, y), G component value Gout (x, y) and B component value Bout (x, y), as an optimization pixel. So far, which is stored in optimization image 150 with current pixel point 210 in image 120 by image optimization module Position corresponding, this is completed to the optimization to a pixel on image 120.Then picture processing chip 130 obtain next pixel being not optimised from image 120 successively, and the optimization of next round is carried out as current pixel point 210 Processing(The 210 corresponding gain coefficient of current pixel point is calculated using the above method, and using gain coefficient to the current pixel Point 210 carries out gain), so as to generate final optimization image 150.Image Warping after the above method optimizes is bright It is aobvious, image detail can be retained well.
What Fig. 3 was related to for an embodiment of the present invention, the flow of the picture tone dynamic regulating method based on local block Figure.The picture tone dynamic regulating method can pass through the picture processing chip of Fig. 1, image optimization module, luminance acquisition module, office Portion's background luminance module, block average brightness module and local tone mapping block are realized.Referring to Fig. 3, the described method includes Following steps:
Initially enter step S301:The luminance acquisition module of picture processing chip, can work as according to one on an image The pixel value of preceding pixel point, obtains the corresponding luma component values of current pixel point.
In certain embodiments, the pixel value of current pixel point 210 includes R component value, G component values and B component value, institute Stating " obtaining the corresponding luma component values of current pixel point " includes:According to current pixel point R component value, G component values, B component value The component value of numerical value maximum in three, calculates the luma component values of current pixel point.In further embodiments, it is described " to obtain The corresponding luma component values of current pixel point " include:The R component value of current pixel point, G component values and B component value are carried out First ranking operation, obtains the luma component values of current pixel point.
Then enter step S302:Local background's brightness module of picture processing chip, can exist according to current pixel point Background area on image, obtains the corresponding background value of current pixel point.
In one embodiment, local background's brightness module can determine local background using gaussian pyramid algorithm Brightness 2, gaussian pyramid algorithm specifically include step:Local background's brightness module sets one using current pixel point as in first Background area of the Gaussian Blur core of the heart as current pixel point on the image;Then calculate the picture in the Gaussian Blur core of setting The Gauss weighted average of vegetarian refreshments, as the corresponding background value of current pixel point(I.e. above-mentioned local background's brightness 250).
In the present embodiment, described " the one Gaussian Blur core centered on current pixel point of setting " includes step: Local background's brightness module is sequentially increased Gaussian Blur nuclear radius by gradient, and calculates successively in the range of the Gaussian Blur core of increase The difference ratio of the Gauss weighted average of all pixels point;If difference ratio is more than predetermined threshold value, the Gauss before selection increase Fuzzy core is the Gaussian Blur core of setting.
In certain embodiments, in order to further simplify computing, the calculatings structure of Gaussian Blur core can approximation with 2 integer Power is approached.Further, for the ease of hardware realization, the half of Gaussian Blur core can be sequentially increased according to a Series Sequences Footpath, is less than predetermined threshold value until finding a difference ratio, and the Gaussian Blur core of radius maximum as background image block based on Calculate background value.
Then enter step S303:The block average brightness module of picture processing chip, can scheme according to current pixel point As upper close region, an average brightness value corresponding with current pixel point is obtained." acquisition one is corresponding with current pixel point Average brightness value " can be accomplished by the following way:Block average brightness module obtains the son adjacent with current pixel point first The corresponding pixel average of block, then according to the coordinate position relation of current pixel point and the central pixel point of adjacent sub-block, Second ranking operation is carried out to acquired pixel average, obtains average brightness value corresponding with current pixel point, it is described to work as The corresponding average brightness value of preceding pixel point is required piece of average brightness 240.
In certain embodiments, block average brightness module can be corresponding average bright with each sub-block on precalculated image Angle value, and be stored in structure is calculated in memory.Afterwards, block average brightness module can be determined first adjacent with current pixel point Sub-block, and obtain the corresponding average brightness value of these adjacent sub-blocks;Then according to the middle imago of current pixel point and adjacent sub-blocks The coordinate position relation of vegetarian refreshments, carries out the second ranking operation to the acquired corresponding average brightness value of adjacent sub-blocks, is worked as The block average brightness for closing on image block where preceding pixel point.
Then enter step S304:The local tone mapping block of picture processing chip, can be according to current pixel point pair The background value and corresponding average brightness value answered, obtain the corresponding pixel gain coefficients of current pixel point.
In order to reduce the calculation amount of gain coefficient, in one embodiment, local tone mapping block can be by image Several sub-blocks are divided into, and the corresponding gain coefficient of the central pixel point for calculating each sub-block.Afterwards, local tone mapping mould Block stores the correspondence of the coordinate position of the central pixel point of each sub-block gain coefficient corresponding with the central pixel point For Gain look-up tables, and the Gain look-up tables are stored in memory 135.Then according to the coordinate bit of current pixel point 210 Put, determine to close on 4 NxN sub-blocks (upper left UL, upper right UR, the left side closest with current pixel 120 that image block 220 is included Lower DL, bottom right DR), corresponding 4 gain coefficients of central pixel point of this 4 NxN sub-blocks are obtained by Gain look-up tables.Then Local tone mapping block 147 passes through formula(7)Calculated, obtain the corresponding gain coefficient of current pixel point.
In another embodiment, local tone mapping block divides an image into several sub-blocks, and calculates each sub-block Corresponding piece of average brightness.Afterwards, local tone mapping block obtains Gain curves corresponding with sub-block according to block average brightness Formula, look-up table is stored as by the correspondence of the Gain curve equations and sub-block, and the look-up table is stored in memory 135 In.Then according to the coordinate position of current pixel point, determine to close on image block 220 included it is closest with current pixel 120 4 NxN sub-blocks (upper left UL, upper right UR, lower-left DL, bottom right DR), the Gain that this 4 NxN sub-blocks are obtained by searching for table is bent Line formula, substitutes into the corresponding local background's brightness of current pixel point 210 and obtains 4 gain coefficients.Then local tone mapping Module 147 passes through formula(7)Calculated, obtain the corresponding gain coefficient 260 of current pixel 120.
After gain coefficient 260 confirms, S305 can be entered step:The image optimization module of picture processing chip, using work as The corresponding pixel gain coefficients of preceding pixel point carry out gain process to the pixel value of current pixel point.I.e. by current pixel point with increasing Beneficial coefficient obtains an optimization pixel in image is optimized by a synthetic operation.So far, picture processing chip Complete the optimization to a pixel on image.Then picture processing chip is additionally operable to successively to each pixel on image Point optimizes(The above method is respectively adopted and calculates the corresponding gain coefficient of each pixel, and using gain coefficient to the picture Vegetarian refreshments carries out gain), so as to generate final optimization image.
It should be noted that herein, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any this actual relation or order.Moreover, term " comprising ", "comprising" or its any other variant are intended to Non-exclusive inclusion, so that process, method, article or terminal device including a series of elements not only include those Key element, but also including other elements that are not explicitly listed, or further include as this process, method, article or end The intrinsic key element of end equipment.In the absence of more restrictions, limited by sentence " including ... " or " including ... " Key element, it is not excluded that also there are other key element in the process including the key element, method, article or terminal device.This Outside, herein, " being more than ", " being less than ", " exceeding " etc. are interpreted as not including this number;" more than ", " following ", " within " etc. understand It is to include this number.
It should be understood by those skilled in the art that, the various embodiments described above can be provided as method, apparatus or computer program production Product.These embodiments can use the embodiment in terms of complete hardware embodiment, complete software embodiment or combination software and hardware Form.All or part of step in the method that the various embodiments described above are related to can be instructed by program relevant hardware come Complete, the program can be stored in the storage medium that computer equipment can be read, for performing the various embodiments described above side All or part of step described in method.The computer equipment, includes but not limited to:Personal computer, server, general-purpose computations It is machine, special purpose computer, the network equipment, embedded device, programmable device, intelligent mobile terminal, smart home device, wearable Smart machine, vehicle intelligent equipment etc.;The storage medium, includes but not limited to:RAM, ROM, magnetic disc, tape, CD, sudden strain of a muscle Deposit, USB flash disk, mobile hard disk, storage card, memory stick, webserver storage, network cloud storage etc..
The various embodiments described above are with reference to method, equipment (system) and the computer program product according to embodiment Flowchart and/or the block diagram describes.It should be understood that it can be realized by computer program instructions every in flowchart and/or the block diagram The combination of flow and/or square frame in one flow and/or square frame and flowchart and/or the block diagram.These computers can be provided Programmed instruction is to the processor of computer equipment to produce a machine so that passes through the finger that the processor of computer equipment performs Order produces and is used for realization what is specified in one flow of flow chart or multiple flows and/or one square frame of block diagram or multiple square frames The device of function.
These computer program instructions may also be stored in the computer that computer equipment can be guided to work in a specific way and set In standby readable memory so that the instruction being stored in the computer equipment readable memory produces the manufacture for including command device Product, which realizes refers in one flow of flow chart or multiple flows and/or one square frame of block diagram or multiple square frames Fixed function.
These computer program instructions can be also loaded into computer equipment so that performed on a computing device a series of Operating procedure is used for realization in flow with producing computer implemented processing so that the instruction performed on a computing device provides The step of function of being specified in one flow of figure or multiple flows and/or one square frame of block diagram or multiple square frames.
Although the various embodiments described above are described, those skilled in the art once know basic wound The property made concept, then can make these embodiments other change and modification, so the foregoing is merely the embodiment of the present invention, Not thereby the scope of patent protection of the present invention, every equivalent structure made using description of the invention and accompanying drawing content are limited Or equivalent process transformation, other related technical areas are directly or indirectly used in, are similarly included in the patent of the present invention Within protection domain.

Claims (14)

1. a kind of picture tone dynamic regulating method based on local block, it is characterised in that the described method comprises the following steps:
According to the pixel value of a current pixel point on an image, the corresponding luma component values of current pixel point are obtained;
According to the background area of current pixel point on the image, the corresponding background value of current pixel point is obtained;
According to the close region of current pixel point on the image, an average brightness value corresponding with current pixel point is obtained;
According to the corresponding background value of current pixel point and corresponding average brightness value, the corresponding picture of current pixel point is obtained Plain gain coefficient;
Gain process is carried out to the pixel value of current pixel point using current pixel point corresponding pixel gain coefficients.
2. the picture tone dynamic regulating method based on local block as claimed in claim 1, it is characterised in that the pixel Value includes R component value, G component values and B component value, and " the obtaining the corresponding luma component values of current pixel point " includes:
According to the component value of numerical value maximum in current pixel point R component value, G component values, B component value three, current pixel is calculated The luma component values of point.
3. the picture tone dynamic regulating method based on local block as claimed in claim 1, it is characterised in that the pixel Value includes R component value, G component values and B component value, and " the obtaining the corresponding luma component values of current pixel point " includes:
First ranking operation is carried out to the R component value of current pixel point, G component values and B component value, obtains current pixel point Luma component values.
4. the picture tone dynamic regulating method based on local block as claimed in claim 1, it is characterised in that described " to obtain Take the corresponding background value of current pixel point " include step:
Set a background area of the Gaussian Blur core as current pixel point on the image using centered on current pixel point;
The Gauss weighted average of the pixel in the Gaussian Blur core of setting is calculated, it is bright as the corresponding background of current pixel point Angle value.
5. the picture tone dynamic regulating method based on local block as claimed in claim 4, it is characterised in that described " to set A fixed Gaussian Blur core centered on current pixel point " includes step:
Gaussian Blur nuclear radius is sequentially increased by gradient, and calculates all pixels point in the range of the Gaussian Blur core of increase successively The difference ratio of Gauss weighted average;
If difference ratio is more than predetermined threshold value, Gaussian Blur core of the Gaussian Blur core before increase for setting is selected.
6. the picture tone dynamic regulating method based on local block as claimed in claim 1, it is characterised in that the step " according to the close region of current pixel point on the image " includes step:
Several NxN sub-blocks are divided an image into,
Position according to where current pixel point, determines that the sub-block adjacent with current pixel point is close region.
7. the picture tone dynamic regulating method based on local block as claimed in claim 6, it is characterised in that the step " obtaining an average brightness value corresponding with current pixel point " includes step:
Obtain the corresponding pixel average of adjacent with current pixel point sub-block;
According to current pixel point and the coordinate position relation of the central pixel point of adjacent sub-block, to acquired pixel average The second ranking operation is carried out, obtains average brightness value corresponding with current pixel point.
8. a kind of picture tone dynamic regulation device based on local block, it is characterised in that described device includes luminance acquisition Module, local background's brightness module, block average brightness module, local tone mapping block and gain process module;
The luminance acquisition module is used for the pixel value according to a current pixel point on an image, obtains current pixel point pair The luma component values answered;
Local background's brightness module is used for the background area according to current pixel point on the image, obtains current pixel point pair The background value answered;
Described piece of average brightness module is used for the close region according to current pixel point on the image, obtains one and current pixel The corresponding average brightness value of point;
The part tone mapping block is used for according to the corresponding background value of current pixel point and corresponding average brightness Value, obtains the corresponding pixel gain coefficients of current pixel point;
The gain process module is used for the pixel value to current pixel point using the corresponding pixel gain coefficients of current pixel point Carry out gain process.
9. the picture tone dynamic regulation device based on local block as claimed in claim 8, it is characterised in that the pixel Value includes R component value, G component values and B component value, and the luminance acquisition module is used to " it is corresponding bright to obtain current pixel point Degree component value " includes:
The luminance acquisition module is used for maximum according to numerical value in current pixel point R component value, G component values, B component value three Component value, calculates the luma component values of current pixel point.
10. the picture tone dynamic regulation device based on local block as claimed in claim 8, it is characterised in that the picture Element value includes R component value, G component values and B component value, and the luminance acquisition module is used to " it is corresponding to obtain current pixel point Luma component values " include:
The luminance acquisition module is used to carry out the R component value of current pixel point, G component values and B component value the first weighting Computing, obtains the luma component values of current pixel point.
11. the picture tone dynamic regulation device based on local block as claimed in claim 8, it is characterised in that the office Portion's background luminance module, which is used for " obtaining the corresponding background value of current pixel point ", to be included:
Local background's brightness module is used for the one Gaussian Blur core using centered on current pixel point of setting and is used as current pixel point Background area on the image, and the Gauss weighted average of the pixel in the Gaussian Blur core of setting is calculated, as current The corresponding background value of pixel.
12. the picture tone dynamic regulation device based on local block as claimed in claim 11, it is characterised in that described " local background's brightness module is used to set the Gaussian Blur core centered on current pixel point " includes:
Local background's brightness module is used to be sequentially increased Gaussian Blur nuclear radius by gradient, and calculates the Gaussian Blur of increase successively The difference ratio of the Gauss weighted average of all pixels point in the range of core, and when difference ratio is more than predetermined threshold value, selection increase Preceding Gaussian Blur core is the Gaussian Blur core of setting.
13. the picture tone dynamic regulation device based on the local block as claimed in claim 8, it is characterised in that " block Average brightness module is used for the close region according to current pixel point on the image " include:
Block average brightness module is used to divide an image into several NxN sub-blocks, and the position according to where current pixel point, really The fixed sub-block adjacent with current pixel point is close region.
14. the picture tone dynamic regulation device based on local block as claimed in claim 13, it is characterised in that described piece Average brightness module, which is used for " obtaining an average brightness value corresponding with current pixel point ", includes step:
Block average brightness module is used to obtaining the corresponding pixel average of adjacent with current pixel point sub-block, and according to current picture Vegetarian refreshments and the coordinate position relation of the central pixel point of adjacent sub-block, carry out acquired pixel average the second weighting and transport Calculate, obtain average brightness value corresponding with current pixel point.
CN201610950433.2A 2016-10-27 2016-10-27 Image tone dynamic adjustment method and device based on local blocking Active CN107993189B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610950433.2A CN107993189B (en) 2016-10-27 2016-10-27 Image tone dynamic adjustment method and device based on local blocking

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610950433.2A CN107993189B (en) 2016-10-27 2016-10-27 Image tone dynamic adjustment method and device based on local blocking

Publications (2)

Publication Number Publication Date
CN107993189A true CN107993189A (en) 2018-05-04
CN107993189B CN107993189B (en) 2021-06-18

Family

ID=62029441

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610950433.2A Active CN107993189B (en) 2016-10-27 2016-10-27 Image tone dynamic adjustment method and device based on local blocking

Country Status (1)

Country Link
CN (1) CN107993189B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109003582A (en) * 2018-08-15 2018-12-14 四川长虹电器股份有限公司 A method of improving super more backlight zoning control system image display effects
CN110445986A (en) * 2019-07-30 2019-11-12 Oppo广东移动通信有限公司 Image processing method, device, storage medium and electronic equipment
CN113365000A (en) * 2020-03-04 2021-09-07 爱思开海力士有限公司 Image sensing apparatus and method of operating the same
CN114820377A (en) * 2022-05-10 2022-07-29 平安科技(深圳)有限公司 Text image processing method and device, computer equipment and readable storage medium
WO2022241676A1 (en) * 2021-05-19 2022-11-24 深圳市大疆创新科技有限公司 Tone mapping method, image processing device, and imaging device
CN115809960A (en) * 2022-06-08 2023-03-17 北京爱芯科技有限公司 Image splicing device, chip and image splicing method
WO2023040431A1 (en) * 2021-09-15 2023-03-23 华为技术有限公司 Tone mapping method, device and system

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050117799A1 (en) * 2003-12-01 2005-06-02 Chiou-Shann Fuh Method and apparatus for transforming a high dynamic range image into a low dynamic range image
CN101901475A (en) * 2010-06-12 2010-12-01 北京理工大学 High dynamic range image tone mapping method based on retina adaptive model
CN102339461A (en) * 2010-07-27 2012-02-01 夏普株式会社 Method and equipment for enhancing image
CN102722868A (en) * 2012-05-23 2012-10-10 西安理工大学 Tone mapping method for high dynamic range image
CN102779330A (en) * 2012-06-13 2012-11-14 京东方科技集团股份有限公司 Image reinforcement method, image reinforcement device and display device
CN104618700A (en) * 2015-01-29 2015-05-13 电子科技大学 Enhanced display method for color high dynamic range image
CN104881854A (en) * 2015-05-20 2015-09-02 天津大学 High-dynamic-range image fusion method based on gradient and brightness information
CN105139343A (en) * 2014-05-30 2015-12-09 上海贝卓智能科技有限公司 Image processing method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050117799A1 (en) * 2003-12-01 2005-06-02 Chiou-Shann Fuh Method and apparatus for transforming a high dynamic range image into a low dynamic range image
CN101901475A (en) * 2010-06-12 2010-12-01 北京理工大学 High dynamic range image tone mapping method based on retina adaptive model
CN102339461A (en) * 2010-07-27 2012-02-01 夏普株式会社 Method and equipment for enhancing image
CN102722868A (en) * 2012-05-23 2012-10-10 西安理工大学 Tone mapping method for high dynamic range image
CN102779330A (en) * 2012-06-13 2012-11-14 京东方科技集团股份有限公司 Image reinforcement method, image reinforcement device and display device
CN105139343A (en) * 2014-05-30 2015-12-09 上海贝卓智能科技有限公司 Image processing method and device
CN104618700A (en) * 2015-01-29 2015-05-13 电子科技大学 Enhanced display method for color high dynamic range image
CN104881854A (en) * 2015-05-20 2015-09-02 天津大学 High-dynamic-range image fusion method based on gradient and brightness information

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109003582A (en) * 2018-08-15 2018-12-14 四川长虹电器股份有限公司 A method of improving super more backlight zoning control system image display effects
CN110445986A (en) * 2019-07-30 2019-11-12 Oppo广东移动通信有限公司 Image processing method, device, storage medium and electronic equipment
CN113365000A (en) * 2020-03-04 2021-09-07 爱思开海力士有限公司 Image sensing apparatus and method of operating the same
CN113365000B (en) * 2020-03-04 2024-06-04 爱思开海力士有限公司 Image sensing apparatus and method of operating the same
WO2022241676A1 (en) * 2021-05-19 2022-11-24 深圳市大疆创新科技有限公司 Tone mapping method, image processing device, and imaging device
WO2023040431A1 (en) * 2021-09-15 2023-03-23 华为技术有限公司 Tone mapping method, device and system
TWI835280B (en) * 2021-09-15 2024-03-11 大陸商華為技術有限公司 A tone mapping method, device and system
CN114820377A (en) * 2022-05-10 2022-07-29 平安科技(深圳)有限公司 Text image processing method and device, computer equipment and readable storage medium
CN115809960A (en) * 2022-06-08 2023-03-17 北京爱芯科技有限公司 Image splicing device, chip and image splicing method

Also Published As

Publication number Publication date
CN107993189B (en) 2021-06-18

Similar Documents

Publication Publication Date Title
CN107993189A (en) A kind of picture tone dynamic regulating method and device based on local block
CN109191395B (en) Image contrast enhancement method, device, equipment and storage medium
CN103942755B (en) Brightness of image adjusting method and device
US9633422B2 (en) Method for image processing using local statistics convolution
CN104517265B (en) Intelligent grinding skin method and apparatus
CN102438097B (en) Visual processing device, visual processing method
CN104376542B (en) A kind of image enchancing method
CN104995908B (en) Image processing apparatus and image processing method
CN102968814B (en) A kind of method and apparatus of image rendering
CN110428389B (en) Low-light-level image enhancement method based on MSR theory and exposure fusion
CN108924427A (en) A kind of video camera focus method, device and video camera
CN109413335A (en) A kind of method and apparatus of double exposure synthesis HDR image
CN107360369A (en) The photographic method of camera device and camera device, storage device
CN110445986A (en) Image processing method, device, storage medium and electronic equipment
Qiu et al. An optimal tone reproduction curve operator for the display of high dynamic range images
CN108024105A (en) Image color adjusting method, device, electronic equipment and storage medium
CN110009587A (en) Image processing method, device, storage medium and electronic equipment
CN110298792A (en) Low light image enhancing and denoising method, system and computer equipment
CN110049332A (en) A kind of method for compressing image, image compressing device and electronic equipment
CN107295324A (en) White balancing treatment method, device and terminal device
CN109886892A (en) Image processing method, image processing apparatus and storage medium
CN114240767A (en) Image wide dynamic range processing method and device based on exposure fusion
CN109992742A (en) A kind of signal processing method and device
CN106454140B (en) A kind of information processing method and electronic equipment
CN108513068A (en) Choosing method, device, storage medium and the electronic equipment of image

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 350003 building, No. 89, software Avenue, Gulou District, Fujian, Fuzhou 18, China

Applicant after: Ruixin Microelectronics Co., Ltd

Address before: 350003 building, No. 89, software Avenue, Gulou District, Fujian, Fuzhou 18, China

Applicant before: Fuzhou Rockchips Electronics Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant