CN106157252B - A kind of image processing method and image processing apparatus - Google Patents
A kind of image processing method and image processing apparatus Download PDFInfo
- Publication number
- CN106157252B CN106157252B CN201510180940.8A CN201510180940A CN106157252B CN 106157252 B CN106157252 B CN 106157252B CN 201510180940 A CN201510180940 A CN 201510180940A CN 106157252 B CN106157252 B CN 106157252B
- Authority
- CN
- China
- Prior art keywords
- pixel
- base
- value
- detail view
- pixel value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Abstract
The embodiment of the invention discloses a kind of image processing method and image processing apparatus to greatly enhance image detail, improve image detail reinforcing effect for expanding details enhancing space.The method comprise the steps that original image is first decomposed into base's figure and detail view, determine that the details for carrying out enhancing processing to the pixel value of pixel in detail view greater than 1 enhances coefficient, the base layer offset value that compression processing is carried out for the pixel value to pixel in base's figure is determined again, finally by base's figure synthesis output after enhancing treated detail view and compression processing.
Description
Technical field
The present invention relates to field of image processing more particularly to a kind of image processing methods and image processing apparatus.
Background technique
Image enhancement is the important and basic content in Digital Image Processing.The primary goal of enhancing is processing image,
It is allowed to be more suitable for specific application or user demand than original image.And to the enhancing of image detail be in image enhancement it is extremely important
A part.
Currently, the image detail enhancing general way of algorithm is: picture breakdown is schemed B and levels of detail D (base's figure at base
It is made of the primary structure information (such as edge) of original image, and the oscillator signal portion that levels of detail is then made of texture and noise
Point), enhance levels of detail, then combine them again, calculation formula are as follows: I=B+s*D, wherein s is that details enhances coefficient.
However in practical applications, each pixel value range of digital picture is limited (0 to 255), so that details enhancing is empty
Between it is very limited, the value of s is difficult to surmount 1.And since details enhancing space is limited, leading to image, effect is still after treatment
It is common photo, only clarity makes moderate progress compared to original image, and user is not achieved to the need of image detail reinforcing effect
It asks.
Summary of the invention
The embodiment of the invention provides a kind of image processing method and image processing apparatus, empty for expanding details enhancing
Between, image detail is greatly enhanced, image detail reinforcing effect is improved.
A kind of image processing method, comprising:
Original image is decomposed into base's figure and detail view;
Determine that details enhances coefficient, the details enhancing coefficient is used to carry out the pixel value of pixel in the detail view
Enhancing processing, and details enhancing coefficient is greater than 1;
Determine that the base layer offset value of pixel in base's figure, the base layer offset value are used for pixel in base's figure
Pixel value carry out compression processing so that after compression processing base figure retain original image base's figure change of gradient knot
Structure, and in base's figure after compression processing in the pixel value of pixel and enhancing treated detail view respective pixel point pixel
The sum of value is between 0 to 255;
By base's figure synthesis output after enhancing treated the detail view and the compression processing.
A kind of image processing apparatus, comprising:
Decomposing module, for original image to be decomposed into base's figure and detail view;
First determining module, for determining that details enhances coefficient, the details enhancing coefficient is used for in the detail view
The pixel value of pixel carries out enhancing processing, and details enhancing coefficient is greater than 1;
Second determining module, for determining that the base layer offset value of pixel in base's figure, the base layer offset value are used
The pixel value of pixel carries out compression processing in base's figure, so that base's figure after compression processing retains the base of original image
The change of gradient structure of layer figure, and in base's figure after compression processing in the pixel value of pixel and enhancing treated detail view
The sum of pixel value of respective pixel point is between 0 to 255;
Synthesis module, details enhancing coefficient enhancing for first determining module will to be used to determine treated details
Figure and base's figure synthesis output after the base layer offset value compression processing determined using second determining module.
As can be seen from the above technical solutions, the embodiment of the present invention has the advantage that in the embodiment of the present invention, first determines
Satisfactory base layer offset value, then base's figure that original image decomposites is compressed using the base layer offset value.Guaranteeing
In the case that the pixel value value range of pixel is still located between 0 to 255, to the pressure of the pixel value of pixel in base's figure
Contracting improves the valued space of the details enhancing coefficient s enhanced the pixel value of pixel in detail view, so that details increases
The value of strong coefficient s can be greater than 1, to greatly enhance image detail, improve the reinforcing effect of image detail.
Detailed description of the invention
Fig. 1 is one flow diagram of image processing method in the embodiment of the present invention;
Fig. 2 is another flow diagram of image processing method in the embodiment of the present invention;
Fig. 3 is one algorithm frame schematic diagram of image processing method in the embodiment of the present invention;
Fig. 4 is one structural schematic diagram of image processing apparatus in the embodiment of the present invention;
Fig. 5 is another structural schematic diagram of image processing apparatus in the embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, those skilled in the art's every other implementation obtained without making creative work
Example, shall fall within the protection scope of the present invention.
Referring to Fig. 1, image processing method one embodiment includes: in the embodiment of the present invention
101, original image is decomposed into base's figure and detail view;
In image processing method, original image can be all decomposed into base's figure and detail view by image processing apparatus, be recycled
Details enhancing coefficient enhances detail view.
It is understood that the image processing apparatus can be terminal, or server can also be other packets
The other equipment of function containing the image processing apparatus, are not construed as limiting herein.
102, determine that details enhances coefficient, the details enhancing coefficient is used for the pixel value to pixel in the detail view
Enhancing processing is carried out, and details enhancing coefficient is greater than 1;
In this step, after original image is decomposed into base's figure and detail view by image processing apparatus, details enhancing system is first determined
Number, the details enhance coefficient and are greater than 1.
It is understood that details enhancing coefficient can be specified by user according to the demand of user;It can also be by image
Processing unit determines the details enhancing coefficient of a recommendation according to the compressed degree of pixel value energy for decompositing base's figure, this
Place is not construed as limiting.
For example, the details enhancing coefficient that image processing apparatus determines is s if the base's figure decomposited is B, detail view D,
Then enhancing treated detail view is s*D, and is different from the prior art, and the value of the s is greater than 1.
103, determine that the base layer offset value of pixel in base's figure, the base layer offset value are used for pixel in base's figure
Pixel value carry out compression processing;
After image processing apparatus determines details enhancing coefficient, the base layer offset value of pixel in base's figure, the base are determined
Deviant is used to carry out compression processing to the pixel value of pixel in base's figure, so that base's figure after compression processing retains original
The change of gradient structure of base's figure of image, and treated for the pixel value of pixel and enhancing in base's figure after compression processing
The sum of pixel value of respective pixel point is between 0 to 255 in detail view;
It is understood that because the details enhancing coefficient s used greater than 1 carries out enhancing processing to detail view,
Detail view is synthesized with base figure if directlying adopt the mode of B+s*D in the prior art, will lead to the image that synthesis obtains
In, the pixel value for having pixel is more than maximum pixel value 255, to cause image detail enhancing failure.In this step, base is determined
Layer deviant schemes the base to carry out compression processing, pressure under the premise of retaining the change of gradient structure of base's figure of original image
Contracting, which is handled, substantially reduces the pixel value of pixel in base's figure, thus when avoiding synthesis pixel pixel value beyond highest
Pixel value 255.
104, by base's figure synthesis output after enhancing treated detail view and compression processing.
Image processing apparatus carries out enhancing processing to detail view using determining details enhancing coefficient, and using determining base
Layer deviant schemes after carrying out compression processing base, will enhancing treated detail view synthesized with base's figure after compression processing it is defeated
Out, it can obtain having carried out original image the enhanced new images of image detail.
In the embodiment of the present invention, image processing apparatus can determine that satisfactory base layer offset value, using the base layer offset
Value compresses base's figure that original image decomposites.Guarantee pixel pixel value value range be still located at 0 to 255 it
Between in the case where, the compression to the pixel value of pixel in base's figure, improve in detail view pixel pixel value carry out
The valued space of the details enhancing coefficient s of enhancing, allows the value of details enhancing coefficient s to be greater than 1, solves the prior art
Middle s value is difficult to the problem of surmounting 1, to greatly enhance image detail, improves the reinforcing effect of image detail.And
And if the value range of details enhancing coefficient determines between 5 to 10, while guaranteeing enhances image detail, moreover it is possible to protect
The tone of card image unifies degree, and the aesthetic of image is greatly improved.
In above example, original image, which is decomposed into base's figure and detail view, can use gradient width in practical applications
The picture breakdown algorithm that value retains decomposes original image, in addition, determining the base of pixel in base's figure in above example
Base's figure first can also be divided into multiple sub-blocks in practical applications by layer deviant, then be determined in base's figure of each sub-block
The base layer offset value of pixel, is below specifically described the image processing method in the embodiment of the present invention, referring to Fig. 2,
Another embodiment of image processing method includes: in the embodiment of the present invention
201, the original image is decomposed into base's figure and detail view by the picture breakdown algorithm retained using gradient magnitude;
Image processing apparatus using gradient magnitude retain picture breakdown algorithm by the original image be decomposed into base figure and
Detail view, wherein the picture breakdown algorithm that gradient magnitude retains, which is used to retain in base's figure, is greater than predetermined gradient in original image
The gradient magnitude of amplitude, gradient magnitude indicate the difference of pixel value between neighbor pixel.
The base's figure and detail view decomposited using the picture breakdown algorithm that gradient magnitude retains is had the following characteristics that
(1), the gradient magnitude change profile of detail view is uniform, retains the change of gradient of regional area;
(2), base's figure retains change of gradient structure big in original image, polishes the small gradient of regional area.
For example, pixel is the original image of 6*6, the pixel value of the pixel of the first row and the second row is 30 or so, the
The pixel value of three rows and the pixel of fourth line is 100 or so, and the pixel value of the pixel of fifth line and the 6th row is on 200 left sides
The right side, then the picture breakdown algorithm retained according to gradient magnitude, in the base's figure decomposited, can retain the second row and the third line it
Between 70 gradient magnitude, and retain between fourth line and fifth line 100 gradient magnitude, and according to other in the prior art
Picture breakdown algorithm may be averaged to gradient magnitude in the base's figure decomposited, such as may can determine whether the second row
It is 50 with the gradient magnitude before the third line, the gradient magnitude between fourth line and fifth line is 80.As it can be seen that using gradient magnitude
The compressed space of base's figure energy can be improved, correspondingly, can improve levels of detail can be increased in the picture breakdown algorithm of reservation
Strong space.
Further, in the picture breakdown algorithm that gradient magnitude retains, image processing apparatus can be using based on L0 ladder
The optimization algorithm for spending functional solves base's figure, and the objective function of the algorithm isWherein
The latter half C (S) of the objective function indicates the number of gradient non-zero in original image, and λ controls the gradient of detail view
Amplitude of variation.In practical applications, the details that if desired enhancing human eye can be seen, the details that reduction human eye can't see, the value of λ
It can be 0.01.And the first half of algorithm ensure that the big place of gradient magnitude all retains, and amplitude is basically unchanged.Using this
After algorithm solves base's figure, the base's figure solved may have the level of multiple pixel values, and multiple levels, then identical if it exists
The pixel of the pixel of level pixel value having the same, different levels has different pixel values.Image processing apparatus is again
The pixel value that the pixel value of pixel in original image is subtracted to respective pixel point in the base's figure solved, can be obtained and decomposite
Detail view in pixel pixel value.
202, determine that details enhances coefficient, the details enhancing coefficient is used for the pixel value to pixel in the detail view
Enhancing processing is carried out, and details enhancing coefficient is greater than 1;
In this step, after original image is decomposed into base's figure and detail view by image processing apparatus, details enhancing system is first determined
Number, the details enhance coefficient and are greater than 1.
It is understood that details enhancing coefficient can be specified by user according to the demand of user;It can also be by image
Processing unit determines the details enhancing coefficient of a recommendation according to the compressed degree of pixel value energy for decompositing base's figure, this
Place is not construed as limiting.
For example, the details enhancing coefficient that image processing apparatus determines is s if the base's figure decomposited is B, detail view D,
Then enhancing treated detail view is s*D, and is different from the prior art, and the value of the s is greater than 1.
203, base's figure is divided into N number of sub-block, the pixel value of the pixel of base's figure is identical in each sub-block;
Image processing apparatus decomposes after obtaining base's figure, and by the base, figure is divided into N number of sub-block, each sub-block marked off
The pixel value of the pixel of interior base's figure is identical.
It is understood that the division of the sub-block of base's figure can be carried out according to the level of pixel value in base's figure, this
When, the number N for dividing sub-block is related to the number of pixel value level in base's figure, can specifically use soft segment algorithm
Image is divided.
It should be noted that being divided in advance to image, primarily to the base of pixel in image in step 204
The calculating of layer deviant, the base layer offset value of pixel is solved in the present embodiment, it is assumed for example that one using quadratic programming problem
Total pixel of image is L=512*512, then the Quadratic Programming Solution of this order of magnitude is consumed on normal domestic processor
When more (be up to a few minutes), and in base's figure due to being decomposited in this programme the pixel of same level pixel value phase
Together, then its corresponding base layer offset value is also identical, therefore can reduce the quadratic programming problem by the way of dividing sub-block
Scale, after base's figure is divided into N block, the scale of the quadratic programming problem is then reduced to N, and in general pattern, the value of N is about
Log (L), greatly reduces computational complexity, improves arithmetic speed.
204, the base layer offset value of pixel in base's figure of each sub-block is determined respectively;
Specifically, in this step, image processing apparatus is by the base layer offset value T of pixel in base's figureiAs unknown quantity,
Solve quadratic programming problem, constraint condition are as follows:
0≤Ii=(Bi+Ti)+s*D≤255 and make objective function | | ▽ Ti||2Solution it is minimum;
Wherein BiFor the pixel value of the pixel of base's figure of original image, Bi+TiFor pixel in base's figure after compression processing
The pixel value of point, s are that the details enhances coefficient, and D is the pixel value of the pixel of the levels of detail of original image, and s*D is at enhancing
The pixel value of pixel in detail view after reason.
In the quadratic programming problem, 0≤I of constraint conditioni=(Bi+Ti)+s*D≤255 be in order to enable introduce base it is inclined
Shifting value TiIt can guarantee: to the pixel value B after pixel value (pixel value of each level) compression processing of the pixel of base's figurei+Ti
With the sum of pixel value s*D of respective pixel point I in enhancing treated detail viewiBetween 0 to 255;And make objective function |
|▽Ti||2Solution minimum be to guarantee: TiBe it is piecewise smooth so that TiValue retains the original change of gradient of image
Structure compresses big change of gradient, retains small change of gradient.
205, by base's figure synthesis output after enhancing treated detail view and compression processing.
Image processing apparatus carries out enhancing processing to detail view using determining details enhancing coefficient, and using determining base
Layer deviant schemes after carrying out compression processing base, will enhancing treated detail view synthesized with base's figure after compression processing it is defeated
I outi=(Bi+Ti)+s*D, it can obtain having carried out original image the enhanced new images of image detail.
In the embodiment of the present invention, the picture breakdown algorithm retained using gradient magnitude, so that the ladder of the detail view decomposited
Degree amplitude change profile is uniform, further increases the space of details enhancing;Base's figure is being solved using quadratic programming problem
Before base layer offset value, base's figure is first divided by N block according to the level of the pixel value of base's figure, greatly reduces solution
The scale of quadratic programming problem improves the rate that image processing apparatus carries out details enhancing to image;It is asked using quadratic programming
Topic solves base layer offset value and schemes to carry out compression processing to base, while carrying out details enhancing to image, remains original image
The change of gradient structure of picture, while while ensure that progress high-intensitive details enhancing at enhancing treated detail view and compression
Base's figure after reason can successfully synthesize in 1 to 255 pixel value range.
Below with reference to algorithm frame figure as shown in Figure 3, with image data flow direction to detail enhancing method of the invention into
Row explanation:
1, original image I is decomposed into base figure B and detail view D using the optimization algorithm of L0 gradient functional;
2, enhancing processing is carried out to detail view D using determining details enhancing coefficient s, obtains enhancing treated detail view
D*=s*D;
3, in conjunction with enhancing treated detail view D*B is schemed with base, using quadratic programming problem, solves base layer offset value,
And the base is schemed using obtained base layer offset value to carry out compression processing, the base after obtaining compression processing schemes B*;
It 4, will enhancing treated detail view D*B is schemed with the base after compression processing*Synthesize new images I*。
For ease of understanding, detail enhancing method in the embodiment of the present invention is specifically retouched with a concrete application scene below
It states:
If the pixel of original image is 4*2, the pixel value of pixel is as shown in table 1 below:
Table 1
52 | 42 | 103 | 210 |
49 | 55 | 106 | 197 |
Original image is decomposed into base figure B and details by the picture breakdown algorithm that image processing apparatus is retained using gradient magnitude
Scheme D, the pixel value B of the base's figure decomposediIt is as shown in table 2 below:
Table 2
50 | 50 | 100 | 200 |
50 | 50 | 100 | 200 |
The pixel value D for decomposing obtained detail view is as shown in table 3 below:
Table 3
2 | -8 | 3 | 10 |
-1 | 5 | 6 | -3 |
The details enhancing coefficient s that image processing apparatus determines that user selects is 6, then carries out the enhanced detail view of details
Pixel value s*D is as shown in table 4 below:
Table 4
12 | -48 | 18 | 60 |
-6 | 30 | 36 | -18 |
As it can be seen that according to prior art Bi+ s*D synthesizes enhancing treated detail view with base figure, the first row
The pixel value of the 4th pixel will be more than 255, lead to details enhancing failure.
In the present solution, image processing apparatus schemes the base according to the level (50,100,200) of the pixel value of base's figure
It is divided into three sub-blocks, using quadratic programming problem, solves the base layer offset value T of the pixel of each sub-blocki, finally obtain three
The base layer offset value of the sub-block of level is respectively 0,10 and -10.
Then utilize the base layer offset value T of the determinationiBase is schemed to carry out compression processing Bi+TiThe base's figure obtained afterwards
Pixel value is as shown in table 5:
Table 5
50 | 50 | 110 | 190 |
50 | 50 | 110 | 190 |
By the base figure synthesis I after enhancing treated detail view and compression processingi=(Bi+Ti)+s*D obtains new images
Pixel value it is as shown in table 6 below:
Table 6
72 | 2 | 128 | 250 |
44 | 80 | 146 | 172 |
As it can be seen that the pixel value of new images shown in table 6 is respectively positioned between 1 to 255, and the new images relative to original image into
Details of having gone enhances the details that coefficient is 6 and enhances.
The image processing apparatus in the embodiment of the present invention is described below:
Referring to Fig. 4, image processing apparatus one embodiment includes: in the embodiment of the present invention
Decomposing module 401, for original image to be decomposed into base's figure and detail view;
First determining module 402, for determining that details enhances coefficient, the details enhancing coefficient is used for the detail view
The pixel value of middle pixel carries out enhancing processing, and details enhancing coefficient is greater than 1;
Second determining module 403, for determining the base layer offset value of pixel in base's figure, the base layer offset value
Compression processing is carried out for the pixel value to pixel in base's figure, so that base's figure after compression processing retains original image
The change of gradient structure of base's figure, and the pixel value of pixel and enhancing treated detail view in base's figure after compression processing
The sum of pixel value of middle respective pixel point is between 0 to 255;
Synthesis module 404, after the details enhancing coefficient enhancing processing for first determining module 402 will to be used to determine
Detail view and using second determining module 403 determine base layer offset value compression processing after base figure synthesis output.
In the embodiment of the present invention, the second determining module 403 can determine that satisfactory base layer offset value, inclined using the base
Shifting value compresses base's figure that original image decomposites.Still it is located at 0 to 255 in the pixel value value range for guaranteeing pixel
Between in the case where, the compression to the pixel value of pixel in base's figure, improve to the pixel value of pixel in detail view into
The valued space of the details enhancing coefficient s of row enhancing, allows the value of details enhancing coefficient s to be greater than 1, solves existing skill
S value is difficult to the problem of surmounting 1 in art, to greatly enhance image detail, improves the reinforcing effect of image detail.And
And if the value range of details enhancing coefficient determines between 5 to 10, while guaranteeing enhances image detail, moreover it is possible to protect
The tone of card image unifies degree, and the aesthetic of image is greatly improved.
In above example, original image is decomposed into base's figure and detail view by decomposing module 401, in practical applications, point
Solution module 401 can decompose original image using the picture breakdown algorithm that gradient magnitude retains, in addition, in above example
Second determining module 403 determines the base layer offset value of pixel in base's figure, and in practical applications, image processing apparatus can also be with
Base's figure is first divided into multiple sub-blocks, then determines the base of pixel in base's figure of each sub-block by the second determining module 403
Layer deviant, is below specifically described the image processing method in the embodiment of the present invention, referring to Fig. 5, the present invention is implemented
Another embodiment of image processing apparatus includes: in example
Decomposing module 501, for original image to be decomposed into base's figure and detail view;
First determining module 502, for determining that details enhances coefficient, the details enhancing coefficient is used for the detail view
The pixel value of middle pixel carries out enhancing processing, and details enhancing coefficient is greater than 1;
Second determining module 503, for determining the base layer offset value of pixel in base's figure, the base layer offset value
Compression processing is carried out for the pixel value to pixel in base's figure, so that base's figure after compression processing retains original image
The change of gradient structure of base's figure, and the pixel value of pixel and enhancing treated detail view in base's figure after compression processing
The sum of pixel value of middle respective pixel point is between 0 to 255;
Synthesis module 504, after the details enhancing coefficient enhancing processing for first determining module 502 will to be used to determine
Detail view and using second determining module 503 determine base layer offset value compression processing after base figure synthesis output;
In the present embodiment, which specifically can be used for, will using the picture breakdown algorithm that gradient magnitude retains
The original image is decomposed into base's figure and detail view, and the picture breakdown algorithm that the gradient magnitude retains in base's figure for protecting
The gradient magnitude for being greater than default value in original image is stayed, the gradient magnitude indicates the difference of pixel value between neighbor pixel;
Optionally, which may include:
Base's figure solves unit 5011, for solving base's figure using the optimization algorithm based on L0 gradient functional, if asking
The base's figure solved has multiple levels, then in base's figure same level pixel pixel value having the same, different levels
Pixel has different pixel values;
Detail view solves unit 5012, solves unit for the pixel value of pixel in original image to be subtracted base's figure
The pixel value of respective pixel point, obtains the pixel value of pixel in detail view in the 5011 base's figures solved;
The image processing apparatus can also include:
Division module 505, for second determining module 503 determine base's figure in pixel base layer offset value it
Before, base's figure is divided into N number of sub-block, the pixel value of the pixel of base's figure is identical in each sub-block, the N be greater than
2 positive integer;
Second determining module 503 is specifically used for, and determines that the base of pixel in base's figure of each sub-block is inclined respectively
Shifting value;
Specifically, second determining module 503 can be used for, by the base layer offset value T of pixel in base's figureiAs not
The amount of knowing solves quadratic programming problem, constraint condition are as follows:
0≤Ii=(Bi+Ti)+s*D≤255 and make objective function | | ▽ Ti||2Solution it is minimum;
Wherein BiFor the pixel value of the pixel of base's figure of original image, Bi+TiFor pixel in base's figure after compression processing
The pixel value of point, s are that the details enhances coefficient, and D is the pixel value of the pixel of the levels of detail of original image, and s*D is at enhancing
The pixel value of pixel, I in detail view after reasoniThe pixel value of the pixel of new images after indicating synthesis.
In the embodiment of the present invention, the picture breakdown algorithm that decomposing module 501 is retained using gradient magnitude, so that decomposite
The gradient magnitude change profile of detail view is uniform, further increases the space of details enhancing;It is asked using quadratic programming problem
Before the base layer offset value for solving base's figure, which first is schemed to divide by division module 505 according to the level of the pixel value of base's figure
For N block, the scale of the quadratic programming problem of solution is greatly reduced, image processing apparatus is improved and details enhancing is carried out to image
Rate;Second determining module 503 solves base layer offset value using quadratic programming problem and schemes to carry out compression processing, In to base
While carrying out details enhancing to image, the change of gradient structure of original image is remained, while ensure that the high-intensitive details of progress
Base's figure while enhancing after enhancing treated detail view and compression processing can succeed in 1 to 255 pixel value range
Synthesis.
Above-described embodiment in order to facilitate understanding, below with above-mentioned image processing apparatus modules a concrete application field
Interactive process in scape is illustrated:
If the pixel of original image is 4*2, the pixel value of pixel is as shown in table 1 below:
Table 1
52 | 42 | 103 | 210 |
49 | 55 | 106 | 197 |
Original image is decomposed into base figure B and details by the picture breakdown algorithm that decomposing module 501 is retained using gradient magnitude
Scheme D, base's figure solves the pixel value B that unit 5011 decomposes obtained base's figureiIt is as shown in table 2 below:
Table 2
50 | 50 | 100 | 200 |
50 | 50 | 100 | 200 |
The pixel value D that detail view solves the detail view that the decomposition of unit 5012 obtains is as shown in table 3 below:
Table 3
2 | -8 | 3 | 10 |
-1 | 5 | 6 | -3 |
The details enhancing coefficient s that first determining module 502 determines that user selects is 6, then carries out the enhanced details of details
The pixel value s*D of figure is as shown in table 4 below:
Table 4
12 | -48 | 18 | 60 |
-6 | 30 | 36 | -18 |
As it can be seen that according to prior art Bi+ s*D synthesizes enhancing treated detail view with base figure, the first row
The pixel value of the 4th pixel will be more than 255, lead to details enhancing failure.
In the present solution, division module 505 schemes the base according to the level (50,100,200) of the pixel value of base's figure
It is divided into three sub-blocks, the second determining module 503 utilizes quadratic programming problem, solves the base layer offset value of the pixel of each sub-block
Ti, the base layer offset value for finally obtaining the sub-block of three levels is respectively 0,10 and -10.
Then utilize the base layer offset value T of the determinationiBase is schemed to carry out compression processing Bi+TiThe base's figure obtained afterwards
Pixel value is as shown in table 5:
Table 5
50 | 50 | 110 | 190 |
50 | 50 | 110 | 190 |
Base's figure synthesis after synthesis module 504 will enhance treated detail view and compression processing obtains the picture of new images
Plain value Ii=(Bi+Ti)+s*D is as shown in table 6 below:
Table 6
72 | 2 | 128 | 250 |
44 | 80 | 146 | 172 |
As it can be seen that the pixel value of new images shown in table 6 is respectively positioned between 1 to 255, and the new images relative to original image into
Details of having gone enhances the details that coefficient is 6 and enhances.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with
It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit
It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components
It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or
The mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of device or unit
It closes or communicates to connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product
When, it can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially
The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words
It embodies, which is stored in a storage medium, including some instructions are used so that a computer
Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the present invention
Portion or part steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only
Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey
The medium of sequence code.
The above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although referring to before
Stating embodiment, invention is explained in detail, those skilled in the art should understand that: it still can be to preceding
Technical solution documented by each embodiment is stated to modify or equivalent replacement of some of the technical features;And these
It modifies or replaces, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution.
Claims (9)
1. a kind of image processing method characterized by comprising
Original image is decomposed into base's figure and detail view;
It determines that details enhances coefficient, the pixel value of pixel in the detail view is enhanced using details enhancing coefficient
Processing, obtains enhancing treated detail view, and the details enhancing coefficient is greater than 1;
In conjunction with enhancing treated the detail view and base figure, the base layer offset of pixel in base's figure is determined
Value, the base layer offset value is used to carry out compression processing to the pixel value of pixel in base's figure, so that after compression processing
Base figure retain original image base's figure change of gradient structure, and in base's figure after compression processing the pixel value of pixel with
The sum of pixel value of respective pixel point is between 0 to 255 in enhancing treated detail view;
By base's figure synthesis output after enhancing treated the detail view and the compression processing;
The base layer offset value of pixel specifically includes in determining base's figure:
By the base layer offset value T of pixel in base's figureiAs unknown quantity, quadratic programming problem, constraint condition are solved are as follows:
0≤Ii=(Bi+Ti)+s*D≤255 and make objective function | | ▽ Ti||2Solution it is minimum;
Wherein BiFor the pixel value of the pixel of base's figure of original image, Bi+TiFor pixel in base's figure after compression processing
Pixel value, s are that the details enhances coefficient, and D is the pixel value of the pixel of the levels of detail of original image, and s*D is after enhancing is handled
Detail view in pixel pixel value, IiThe pixel value of the pixel of new images after indicating synthesis.
2. the method according to claim 1, wherein it is described by original image be decomposed into base figure and detail view it is specific
Include:
The original image is decomposed into base's figure and detail view, the gradient width by the picture breakdown algorithm retained using gradient magnitude
The picture breakdown algorithm that value retains is greater than the gradient magnitude of default value, the gradient for retaining in base's figure in original image
Amplitude indicates the difference of pixel value between neighbor pixel.
3. according to the method described in claim 2, it is characterized in that, the picture breakdown algorithm retained using gradient magnitude will
The original image is decomposed into base's figure and detail view specifically includes:
Base's figure is solved using the optimization algorithm based on L0 gradient functional, if the base's figure solved has multiple levels, base
The pixel pixel value having the same of same level in layer figure, the pixel of different levels have different pixel values;
The pixel value that the pixel value of pixel in original image is subtracted to respective pixel point in the base's figure solved, obtains detail view
The pixel value of middle pixel.
4. the method according to claim 1, wherein the value range of details enhancing coefficient is 5 to 10.
5. method according to claim 1 to 4, which is characterized in that pixel in determining base's figure
Before the step of base layer offset value further include:
Base's figure is divided into N number of sub-block, the pixel value of the pixel of base's figure is identical in each sub-block, and the N is big
In 2 positive integer;
Determine that the base layer offset value of pixel in base's figure specifically includes:
The base layer offset value of pixel in base's figure of each sub-block is determined respectively.
6. a kind of image processing apparatus characterized by comprising
Decomposing module, for original image to be decomposed into base's figure and detail view;
First determining module, for determining that details enhances coefficient, using details enhancing coefficient to pixel in the detail view
The pixel value of point carries out enhancing processing, obtains enhancing treated detail view, and the details enhancing coefficient is greater than 1;
Second determining module, for determining in base's figure in conjunction with enhancing treated the detail view and base figure
The base layer offset value of pixel, the base layer offset value are used to carry out compression processing to the pixel value of pixel in base's figure, with
So that base's figure after compression processing retains the change of gradient structure of base's figure of original image, and in base's figure after compression processing
The sum of pixel value of respective pixel point is between 0 to 255 in the pixel value of pixel and enhancing treated detail view;
Synthesis module, details enhancing coefficient enhancing for first determining module will to be used to determine treated detail view with
Base's figure synthesis output after the base layer offset value compression processing determined using second determining module;
The base layer offset value of pixel specifically includes in determining base's figure:
By the base layer offset value T of pixel in base's figureiAs unknown quantity, quadratic programming problem, constraint condition are solved are as follows:
0≤Ii=(Bi+Ti)+s*D≤255 and make objective function | | ▽ Ti||2Solution it is minimum;
Wherein BiFor the pixel value of the pixel of base's figure of original image, Bi+TiFor pixel in base's figure after compression processing
Pixel value, s are that the details enhances coefficient, and D is the pixel value of the pixel of the levels of detail of original image, and s*D is after enhancing is handled
Detail view in pixel pixel value, IiThe pixel value of the pixel of new images after indicating synthesis.
7. image processing apparatus according to claim 6, which is characterized in that the decomposing module is specifically used for, using ladder
The original image is decomposed into base's figure and detail view, the figure that the gradient magnitude retains by the picture breakdown algorithm that degree amplitude retains
As decomposition algorithm indicates phase for retaining the gradient magnitude for being greater than default value in original image, the gradient magnitude in base's figure
The difference of pixel value between adjacent pixel.
8. image processing apparatus according to claim 7, which is characterized in that the decomposing module specifically includes:
Base's figure solves unit, for solving base's figure using the optimization algorithm based on L0 gradient functional, if the base solved
Layer figure have multiple levels, then in base's figure same level pixel pixel value having the same, different levels pixel tool
There is different pixel values;
Detail view solves unit, solves what unit solved for the pixel value of pixel in original image to be subtracted base's figure
The pixel value of respective pixel point, obtains the pixel value of pixel in detail view in base's figure.
9. image processing apparatus according to claim 6, which is characterized in that the value range of details enhancing coefficient is
5 to 10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510180940.8A CN106157252B (en) | 2015-04-16 | 2015-04-16 | A kind of image processing method and image processing apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510180940.8A CN106157252B (en) | 2015-04-16 | 2015-04-16 | A kind of image processing method and image processing apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106157252A CN106157252A (en) | 2016-11-23 |
CN106157252B true CN106157252B (en) | 2019-11-19 |
Family
ID=58057958
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510180940.8A Active CN106157252B (en) | 2015-04-16 | 2015-04-16 | A kind of image processing method and image processing apparatus |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106157252B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110460854B (en) * | 2019-07-15 | 2021-09-03 | 珠海市杰理科技股份有限公司 | Image compression method |
CN112906721B (en) * | 2021-05-07 | 2021-07-23 | 腾讯科技(深圳)有限公司 | Image processing method, device, equipment and computer readable storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO1993014600A1 (en) * | 1992-01-21 | 1993-07-22 | Supermac Technology | Method and apparatus for compression and decompression of color image data |
CN101727658A (en) * | 2008-10-14 | 2010-06-09 | 深圳迈瑞生物医疗电子股份有限公司 | Image processing method and device |
CN103440630A (en) * | 2013-09-02 | 2013-12-11 | 南京理工大学 | Large-dynamic-range infrared image display and detail enhancement method based on guiding filter |
CN103971340A (en) * | 2014-05-15 | 2014-08-06 | 中国科学院光电技术研究所 | High bit-wide digital image dynamic range compression and detail enhancement method |
CN104157003A (en) * | 2014-07-18 | 2014-11-19 | 北京理工大学 | Heat image detail enhancement method based on normal distribution adjustment |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050025381A1 (en) * | 2003-08-01 | 2005-02-03 | Munenori Oizumi | Image filter method |
-
2015
- 2015-04-16 CN CN201510180940.8A patent/CN106157252B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO1993014600A1 (en) * | 1992-01-21 | 1993-07-22 | Supermac Technology | Method and apparatus for compression and decompression of color image data |
CN101727658A (en) * | 2008-10-14 | 2010-06-09 | 深圳迈瑞生物医疗电子股份有限公司 | Image processing method and device |
CN103440630A (en) * | 2013-09-02 | 2013-12-11 | 南京理工大学 | Large-dynamic-range infrared image display and detail enhancement method based on guiding filter |
CN103971340A (en) * | 2014-05-15 | 2014-08-06 | 中国科学院光电技术研究所 | High bit-wide digital image dynamic range compression and detail enhancement method |
CN104157003A (en) * | 2014-07-18 | 2014-11-19 | 北京理工大学 | Heat image detail enhancement method based on normal distribution adjustment |
Also Published As
Publication number | Publication date |
---|---|
CN106157252A (en) | 2016-11-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102438097B (en) | Visual processing device, visual processing method | |
Rane et al. | Structure and texture filling-in of missing image blocks in wireless transmission and compression applications | |
US20200389658A1 (en) | Method for encoding/decoding image and device therefor | |
US7657114B2 (en) | Data processing apparatus, data processing method, and program | |
CN104683801B (en) | Method for compressing image and device | |
KR20120039546A (en) | Contrast enhancement | |
US10863206B2 (en) | Content-weighted deep residual learning for video in-loop filtering | |
CN106060564B (en) | Inter-frame predicated reference pixel point filtering control method, device and encoder | |
CN107392975B (en) | Image self-adaptive multi-scale block compression sensing method and electronic equipment | |
ZA200602350B (en) | Method for simulating film grain by mosaicing pre-computed samples | |
CN109767408B (en) | Image processing method, image processing device, storage medium and computer equipment | |
WO2008018331A1 (en) | Method, apparatus and integrated circuit capable of reducing image ringing noise | |
CN111738952B (en) | Image restoration method and device and electronic equipment | |
Akbari et al. | Sparse recovery-based error concealment | |
CN110569961A (en) | neural network training method and device and terminal equipment | |
CN109886891A (en) | A kind of image recovery method and device, electronic equipment, storage medium | |
CN107563974A (en) | Image de-noising method, device, electronic equipment and storage medium | |
CN106157252B (en) | A kind of image processing method and image processing apparatus | |
CN106303550B (en) | Block-eliminating effect filtering method and block elimination effect filter | |
CN107748913A (en) | A kind of general miniaturization method of deep neural network | |
Jeong et al. | A practical projection-based postprocessing of block-coded images with fast convergence rate | |
US20150098656A1 (en) | Image processing method and image processing device | |
CN112435182A (en) | Image noise reduction method and device | |
CN104506867B (en) | Sample point self-adapted offset parameter method of estimation and device | |
CN108717687B (en) | Image enhancement method based on conversion compression and terminal equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |