CN104935902B - Image color Enhancement Method, device and electronic equipment - Google Patents
Image color Enhancement Method, device and electronic equipment Download PDFInfo
- Publication number
- CN104935902B CN104935902B CN201510295700.2A CN201510295700A CN104935902B CN 104935902 B CN104935902 B CN 104935902B CN 201510295700 A CN201510295700 A CN 201510295700A CN 104935902 B CN104935902 B CN 104935902B
- Authority
- CN
- China
- Prior art keywords
- image
- color
- color space
- saturation
- brightness
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Abstract
This application discloses a kind of image color Enhancement Method, device and electronic equipment.Image color Enhancement Method includes:Pending image is changed to the first color space by rgb color space;Enhancement process is carried out to the color attribute of image in the first color space;Image after by process is changed to the second color space;Enhancement process is carried out to the color attribute of image in the second color space;And by process after image convert back rgb color space.The image color Enhancement Method of the application embodiment can improve the contrast of image, make image more beautiful, closer to realistic colour.
Description
Technical field
The application is related to field of computer technology, and in particular to technical field of image processing, more particularly to a kind of pattern colour
Color Enhancement Method, device and electronic equipment.
Background technology
Under normal circumstances, the image that camera is photographed can lose the realistic colour of original scene.In order that image color is seen
Get up truer, closer real scene, image can be processed by image color Enhancement Method.
Existing image color Enhancement Method is less.A kind of known image color Enhancement Method HSV (Hue tones,
Saturation saturations, Value brightness) processed in color space.The method is by R (red), the G of pending image
(green), B (indigo plant) component are converted into tone, saturation and the brightness of HSV color spaces, in HSV color spaces to saturation component
Stretched, or the luminance component of image is processed in HSV color spaces.
The defect of above-mentioned existing image color Enhancement Method is:First, only in single color space (e.g., HSV colors
Color space) image is processed so that shoot the photo for obtaining not gorgeous enough;Second, image is carried out for certain component
Process when image is not made a distinction, unification strengthened, the integral color of the image after process substantially there occurs change,
And it is easily untrue;3rd, only one of component of image is processed.
Content of the invention
In view of drawbacks described above of the prior art or deficiency, it is desired to be able to which providing one kind can carry out color enhancement to image
The scheme of process so that the color of the scene in image after process is more bright-coloured true.In order to realize said one or multiple
Purpose, this application provides image color Enhancement Method and device.
On the one hand, this application provides a kind of image color Enhancement Method, the method includes:By pending image by RGB
Color space is changed to the first color space;Enhancement process is carried out to the color attribute of image in the first color space;To process
Image afterwards is changed to the second color space;Enhancement process is carried out to the color attribute of image in the second color space;And will
Image after process converts back rgb color space;Wherein, the first color space is one of HSI and HSV color spaces, the
Two color spaces are another in HSI and HSV color spaces;Color attribute includes at least one in tone, saturation and brightness.
In some embodiments, the method also includes:Determine the scene type of pending image;And in the first color
Space and enhancement process is carried out to the color attribute of image in the second color space include:Scene class based on pending image
Type, is adjusted to the color attribute of image respectively according to corresponding Attribute tuning function.
In some embodiments, the scene type based on pending image, distinguishes according to corresponding Attribute tuning function
Enhancement process is carried out to the color attribute of image includes:In HSI color spaces, according to the first hue adjustment function, the first saturation
Degree Tuning function is adjusted to the tone H components and saturation S component of image respectively;In HSI color spaces, to the bright of image
Degree I component is adjusted;In HSV color spaces, right respectively according to the second hue adjustment function and the second saturation Tuning function
The tone H components and saturation S component of image is adjusted.
In some embodiments, the color of the first saturation Tuning function and the second saturation Tuning function also based on image
Adjust.
In some embodiments, carrying out process to the brightness I component of image includes:For excessively dark image and non-excessively dark figure
As carrying out brightness adjustment respectively.
In some embodiments, carry out brightness adjustment respectively and include for excessively dark image and non-excessively dark image:Determine figure
The mean flow rate of picture and high brightness ratio;If the mean flow rate of image is less than luminance threshold and high brightness ratio is less than ratio
Threshold value, it is determined that image was dark image, otherwise determines that image is non-excessively dark image;And dark image was directed to, carry out first
Brightness adjustment;For non-excessively dark image, the second brightness adjustment is carried out.
In some embodiments, the first brightness adjustment is carried out to excessively dark image according to following formula:If I≤A, I=I*
B/A;Otherwise, I=(I-A) * (255-B)/(255-A)+B;Wherein, I is the luminance component before adjustment, and I is bright after adjusting
Degree component, A is the decline cut-off point in Luminance Distribution rectangular histogram, and B=(int) is (0.3*A+180).
In some embodiments, the second brightness adjustment includes:Carried out according to the non-excessively dark image of brightness adjustment function pair bright
Degree adjustment.
In some embodiments, scene type include following at least one:Food, personage and landscape.
Second aspect, this application provides a kind of image color enhancement device, the device includes:First modular converter, uses
In pending image is changed to the first color space by rgb color space;First processing module, in the first color space
Enhancement process is carried out to the color attribute of image;Second modular converter, changes to the second color sky for the image after by process
Between;Second processing module, for carrying out enhancement process in the second color space to the color attribute of image;And the 3rd modulus of conversion
Block, converts back rgb color space for the image after by process;Wherein, the first color space be HSI and HSV color spaces its
One of, the second color space is another in HSI and HSV color spaces;Color attribute is included in tone, saturation and brightness
At least one.
In some embodiments, the device also includes:Scene determining module, for determining the scene class of pending image
Type;And first processing module and Second processing module are additionally operable to:Based on the scene type of pending image, according to corresponding category
Property Tuning function is adjusted to the color attribute of image respectively.
In some embodiments, first processing module or Second processing module are additionally operable to:In HSI color spaces, according to
First hue adjustment function, the first saturation Tuning function are adjusted to the tone H components and saturation S component of image respectively
Whole;In HSI color spaces, the brightness I component of image is adjusted;In HSV color spaces, according to the second hue adjustment function
Respectively the tone H components and saturation S component of image are adjusted with the second saturation Tuning function.
In some embodiments, the color of the first saturation Tuning function and the second saturation Tuning function also based on image
Adjust.
In some embodiments, first processing module or Second processing module are additionally operable to according to the following brightness to image
I component is processed:Brightness adjustment is carried out respectively for excessively dark image and non-excessively dark image.
In some embodiments, first processing module or Second processing module are further used for:Determine the average of image
Brightness and high brightness ratio;If the mean flow rate of image is less than luminance threshold and high brightness ratio is less than proportion threshold value,
Determine that image was dark image, otherwise determine that image is non-excessively dark image;And dark image was directed to, carry out the first brightness tune
Whole;For non-excessively dark image, the second brightness adjustment is carried out.
In some embodiments, first processing module or Second processing module are carried out to excessively dark image according to following formula
First brightness adjustment:If I≤A, I=I*B/A;Otherwise, I=(I-A) * (255-B)/(255-A)+B;Wherein, before I is for adjustment
Luminance component, I be adjustment after luminance component, A be Luminance Distribution rectangular histogram in decline cut-off point, B=(int) (0.3*
A+180).
In some embodiments, first processing module or Second processing module are performed as follows the second brightness adjustment:Root
Brightness adjustment is carried out according to the non-excessively dark image of brightness adjustment function pair.
In some embodiments, scene type include following at least one:Food, personage and landscape.
The third aspect, this application provides a kind of electronic equipment, including display and processor, processor is configured to:
Pending image is changed to the first color space by rgb color space;The color attribute of image is entered in the first color space
Row enhancement process;Image after by process is changed to the second color space;The color attribute of image is entered in the second color space
Row enhancement process;And by process after image convert back rgb color space;Display is configured to the figure after presentation is processed
Picture;Wherein, the first color space is one of HSI and HSV color spaces, and the second color space is HSI and HSV color spaces
In another;Color attribute includes at least one in tone, saturation and brightness.
In some embodiments, processor is further configured to carry out according to each embodiment institute of the application first aspect
The method that states.
Image color Enhancement Method that the application is provided, device and electronic equipment, by by pending image by rgb color
Space is changed to the first color space, carries out enhancement process in the first color space to the color attribute of image, then will process
Image afterwards is changed to the second color space, carries out enhancement process in the second color space to the color attribute of image, finally will
Image after process converts back rgb color space, can improve the contrast of image, makes image more beautiful, closer true
Color.
Description of the drawings
By reading the detailed description made by non-limiting example made with reference to the following drawings, the application other
Feature, objects and advantages will become more apparent upon:
The flow chart that Fig. 1 shows the one embodiment for the image color Enhancement Method provided according to the application;
Fig. 2 shows the illustrative diagram of tone coefficient curve in HSI color spaces;
Fig. 3 shows the illustrative diagram of saturation correction curve in HSI color spaces;
Fig. 4 shows the illustrative diagram of brightness adjustment curve in HSI color spaces;
Fig. 5 shows the illustrative diagram of tone coefficient curve in HSV color spaces;
Fig. 6 shows the illustrative diagram of saturation correction curve in HSV color spaces;
Fig. 7 shows the structural representation of the one embodiment for the image color enhancement device provided according to the application;
Fig. 8 shows the structural representation of the one embodiment for the electronic equipment provided according to the application;And
Fig. 9 shows the structural representation of the computer system for being suitable to the electronic equipment for realizing the embodiment of the present application.
Specific embodiment
With reference to the accompanying drawings and examples the application is described in further detail.It is understood that this place is retouched
The specific embodiment that states is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that, in order to
Be easy to describe, illustrate only in accompanying drawing to about the related part of invention.
It should be noted that in the case where not conflicting, the feature in embodiment and embodiment in the application can phase
Mutually combine.Below with reference to the accompanying drawings and in conjunction with the embodiments describing the application in detail.
The image color Enhancement Method that the present embodiment is provided for example is can apply in the electronic equipment with camera function,
Mobile phone, digital camera etc..New exposal model can be increased in camera function, the figure of this exposal model application the application
As color enhancement is processed, the photo that is taken using the pattern is has carried out the photo after color enhancement, and the photo that takes can be with
Color is more gorgeous, truer.The method that the present embodiment is provided can also be applied to image procossing application APP, at image
Reason APP is processed to the photo shot under normal mode, makes picture more gorgeous than former picture color, truer.In order to describe
Color of image, establishes multicolour model in chromatology, is represented with one-dimensional, two-dimentional, three-dimensional or even space-time coordinate
A certain color, the Color Range that this coordinate system can be defined is color space.Mainly have three through commonly used color space
Primary colors optical mode RGB, four color separation patterns CMYK, HSV of printing (Hue tones, Saturation saturations, Value brightness), HSI
(Hue tones, Saturation saturations, Intensity intensity) etc..
Same image can be described in different color space.It is typically different color space to go from different angles
Weigh same object.For example, HSV color spaces be according to the intuitive nature of color create a kind of color space, HSI colors
Space be from the visual system rgb color space of people generally on the computer monitor Show Color when use.
The embodiment of the present application provides a kind of image color enhancement process scheme, and especially photo is carried out at color enhancement
Reason.The program takes into account the characteristic of color itself and human vision property.In other words, in the HSV colors for embodying color self character
The HSI color spaces of space and consideration human vision property carry out color enhancement process, namely in two color spaces to figure
As carrying out Duplex treatment.Picture quality after Duplex treatment is improved, and color is more gorgeous, true.
Fig. 1 is refer to, the flow process of the one embodiment for the image color Enhancement Method provided according to the application is provided
100.The present embodiment is mainly applied in the terminal unit for can carry out image procossing illustrate in this way, and the terminal sets
Standby can include but is not limited to smart mobile phone, panel computer, interactive desktop, smart camera etc..
As shown in figure 1, in a step 101, pending image is changed to the first color space by rgb color space.
The image (for example, by camera, the intelligent terminal with photographic head etc.) that user shoots, its color would generally be with former field
Some differences of scape.Accordingly, it would be desirable to color enhancement process be carried out to image, make image closer to realistic colour.Place to image
Reason process can be carried out after the completion of image taking, it is also possible to carried out in image shoot process.User can be clapped by modification
According to setting, image processing time is selected.For example, user carries out image procossing after the completion of being arranged on image taking, then user
Raw video picture can first be seen, then again image is processed, the image after being processed.Or, user also may be used
To select in image shoot process to process image, in this case, the image that user will be immediately seen after processing.
Generally, image is described in rgb color space.When color enhancement process is carried out to image, eventually
Pending image can be changed to the first color space by end equipment first by rgb color space.First color space is for example
HSI color spaces or HSV color spaces can be included.HSV color spaces are a kind of face created according to the intuitive nature of color
The colour space.HSI color spaces are a kind of color spaces of the visual system establishment from people.
In the present embodiment, first pending image is changed to HSI color spaces or HSV color spaces, in order to
Color enhancement process is carried out to image in HSI color spaces or HSV color spaces.For example, will can treat first in the present embodiment
Process image to change to HSI color spaces.
Then, in a step 102, enhancement process is carried out to the color attribute of image in the first color space.
In the present embodiment, after in a step 101 change pending image to the first color space, for example, change
To HSI color spaces, terminal unit can carry out enhancement process in HSI color spaces to the color attribute of image.Above-mentioned color
Attribute can include at least one in tone, saturation and brightness.For example, in HSI color spaces, can be to the color of image
Adjust, saturation and luminance component are adjusted;Or, it is also possible to only the tone and saturation component of image are adjusted,
Luminance component can be adjusted in other color spaces.
In one implementation, the scene type of pending image can be determined first, be then based on determined by scene class
Type, is adjusted to the color attribute of image respectively according to corresponding Attribute tuning function.For example, the scene type of image can be with
Including but not limited to following at least one:Food, personage and landscape.The scene type of image can be by user according to specific figure
As content determines, or picture material can be analyzed by terminal unit and obtained.The scene type of image can be single
Scene type, it is also possible to comprising multiple scene types.For example, if picture material is to placed one glass of beverage on a desk,
Then the scene type of the image can be defined as food;If the content of image is classmate's party photo, include in image
Food on many personal and tables, then can be defined as food and personage by the scene type of image.
The image of different scenes type, might have different color characteristics.Therefore, for the figure of different scenes type
Picture, can be adjusted using the color attribute of different Attribute tuning function pair images, make image closer to realistic colour.Example
Such as, can be in HSI color spaces, according to the first hue adjustment function, the first saturation Tuning function tone H respectively to image
Component and saturation S component are adjusted, and the brightness I component of image can also be adjusted.The present embodiment is with food scene
Illustrate as a example by type.
It is possible, firstly, in HSI color spaces, the tone H components according to the first hue adjustment function pair image are adjusted.
Above-mentioned first hue adjustment function can pinpoint difference by preset HSI tones coefficient curve and obtain.Above-mentioned fixed point can be
Empirical value.The tone H components of pending image are input into the first hue adjustment function, you can the chrominance component after being adjusted.
Fig. 2 is refer to, the illustrative diagram of tone coefficient curve in HSI color spaces is it illustrates.As shown in Fig. 2
In figure, horizontal, vertical coordinate represents the tone H component respective value of image before and after adjustment respectively.After in figure, horizontal, ordinate value is normalization
Value.As shown in Figure 2, a Nonlinear Processing has been made to the tone H components of whole image, for the tone before different adjustment
H components, adjustment amplitude have larger gap.Improve can its contrast by making hue adjustment to image, more beautiful.Example
Such as, when the H components before adjustment are 0.1-0.2, after adjustment for 0.3;When the H components before adjustment are 0.3-0.4 or are more than
When 0.85, the H components after adjustment have a distinct increment, and are greater than 1, and when the H components before adjustment are 0.35 or are more than 0.9
When, the H components after adjustment reach maximum 1.5.
Alternatively or additionally, can be in HSI color spaces, according to saturation of the first saturation Tuning function to image
S components are adjusted.Above-mentioned first saturation Tuning function can pinpoint difference by preset HSI saturations correction curve and obtain
Arrive.Above-mentioned fixed point can be empirical value.In some implementations, tone H component of the first saturation Tuning function also based on image.
The saturation S component of pending image is input into the first saturation Tuning function, you can the saturation component after being adjusted.
Fig. 3 is refer to, the illustrative diagram of saturation correction curve in HSI color spaces is it illustrates.Such as Fig. 3 institutes
Show, for the ease of be clearly viewed adjustment before and after image saturation S component change, made a diagonal 310 in figure, this
Point transverse and longitudinal coordinate on bar line is identical, and the saturation that can be used to image before and after expression is adjusted does not change.Another song
Line 320 is saturation correction curve in HSI color spaces.For saturation correction curve, in figure, horizontal, vertical coordinate represents tune respectively
The saturation S component respective value of image before and after whole.In figure, horizontal, ordinate value is the value after normalization.From figure 3, it can be seen that full
Correction curve part is approximate with diagonal to be overlapped with spending, and is partially in cornerwise top, i.e., when abscissa is identical, curve
Vertical coordinate is equal to or more than cornerwise vertical coordinate.That is, before the saturation S component after adjustment is equal to or more than adjustment
Saturation S component, and S components (e.g., 0.3-0.8) the adjustment amplitude in intermediate value is larger.
Alternatively or additionally, the brightness I component of image can be adjusted in HSI color spaces.In this realization
In, can be directed to dark image and non-excessively dark image carries out brightness adjustment respectively.Can determine first the mean flow rate of image with
And high brightness ratio, if the mean flow rate of image is less than luminance threshold and high brightness ratio is less than proportion threshold value, it is determined that figure
As being dark image, otherwise determine that image is non-excessively dark image.The mean flow rate of image is the flat of all brightness I components in image
Average, luminance threshold can be the optimums obtained by the analysis of great amount of images.High brightness ratio can for example pass through to calculate
The distribution of brightness is determining.For example brightness section [192,255] can be defined as between high luminance area, the interval rectangular histogram point
Cloth ratio is used as high brightness ratio.Likewise, proportion threshold value can be determined by the analysis of great amount of images.
For excessively dark image, brightness adjustment can be carried out to image according to following formula:
If I≤A, I=I*B/A;
Otherwise, I=(I-A) * (255-B)/(255-A)+B;
Wherein, I be adjustment before luminance component, I be adjustment after luminance component, A be Luminance Distribution rectangular histogram under
Drop cut-off point, B=(int) is (0.3*A+180).
For non-excessively dark image, can which carries out brightness adjustment according to brightness adjustment function pair.Above-mentioned brightness adjustment function
Difference can be pinpointed by preset HSI brightness corrections curve to obtain.Above-mentioned fixed point can be empirical value.By pending image
Brightness I component is input into brightness adjustment function, you can the luminance component after being adjusted.
Fig. 4 is refer to, the illustrative diagram of brightness adjustment curve in HSI color spaces is it illustrates.As shown in figure 4,
For the ease of be clearly viewed adjustment before and after image brightness I component change, made a diagonal 410, this line in figure
On point transverse and longitudinal coordinate identical, the brightness of image before and after can be used to represent adjustment does not change.Another curve 420 is
Brightness correction curve in HSI color spaces.For brightness correction curve, in figure, horizontal, vertical coordinate represents image before and after adjustment respectively
Brightness I component respective value.In figure, horizontal, ordinate value is the value after normalization.From fig. 4, it can be seen that brightness correction curve part
Office is partially in cornerwise top in cornerwise lower section, partly approximate with diagonal overlaps, you can to represent when horizontal seat
When marking identical, the vertical coordinate of curve is respectively smaller than, is more than or equal to cornerwise vertical coordinate.That is, the brightness I after adjustment
The luminance component that component can be less than, be more than or equal to before adjustment.Specifically, for example when the I component before adjustment is 0-0.2,
I component after adjustment reduces;I component increase when the I component before adjustment is 0.2-0.7, after adjustment;When the I before adjustment point
When amount is more than 0.7, the brightness of this parts of images hardly adjusts.
Return Fig. 1, then, in step 103, by process after image change to the second color space.
In a step 101, image is changed to the first color space, first color space is HSI and HSV color spaces
One of them, in this step, the image after the process of the first color space is changed to the second color space, will image turn
Shift in HSI and HSV color spaces another.HSV color spaces are a kind of colors created according to the intuitive nature of color
Space.HSI color spaces are the visual systemes from people, a kind of color space of establishment.If only in HSI color spaces pair
Image is processed, and can ignore the characteristic of color itself.If only processed to image in HSV color spaces, can not meet
The visual effect of people.Therefore, when processing image, need to take into account the characteristic of color itself and the visual signature of people simultaneously,
Image can be processed in two color spaces of HSI and HSV, the combination in the two spaces can carry out General Office to image
Reason, makes the image after process both objective, meets the visual effect of people again.
In the present embodiment, so that the first color space in step 101 is HSI color spaces as an example, then in this step,
Image after the process of HSI color spaces is changed to HSV color spaces.Image can be directly changed by HSI color spaces
To HSV color spaces, it is also possible to changed to rgb color space image by HSI color spaces, then changed by rgb color space
To HSV color spaces.
Then, at step 104, enhancement process is carried out to the color attribute of image in the second color space.
In the present embodiment, after in step 103 change pending image to the second color space, for example, change
To HSV color spaces, terminal unit can carry out enhancement process in HSV color spaces to the color attribute of image.Above-mentioned color
Attribute can include at least one in tone, saturation and brightness.For example, when in HSI color spaces to the tone of image, full
When having carried out adjustment with degree and luminance component, only the tone and saturation component of image can be carried out in HSV color spaces
Adjustment.In HSI and HSV color spaces, the luminance component of image is identical, therefore, to image in HSI or HSV color spaces
Luminance component be adjusted.
In one implementation, can be based on the scene type of the pending image for determining in a step 102, according to HSV colors
In color space, corresponding Attribute tuning function is adjusted to the color attribute of image respectively.For example, in HSV color spaces, can
With tone H components and saturation S component according to the second hue adjustment function and the second saturation Tuning function respectively to image
It is adjusted.
It is possible, firstly, in HSV color spaces, the tone H components according to the second hue adjustment function pair image are adjusted.
Above-mentioned second hue adjustment function can pinpoint difference by preset HSV tones coefficient curve and obtain.Above-mentioned fixed point can be
Empirical value.The tone H components of pending image are input into the second hue adjustment function, you can the chrominance component after being adjusted.
Fig. 5 is refer to, the illustrative diagram of tone coefficient curve in HSV color spaces is it illustrates.As shown in figure 5,
In figure, horizontal, vertical coordinate represents the tone H component respective value of image before and after adjustment respectively.After in figure, horizontal, ordinate value is normalization
Value.As shown in Figure 5, a Nonlinear Processing has been made to the tone H components of whole image, for the tone before different adjustment
H components, adjustment amplitude have larger gap.Improve can its contrast by making hue adjustment to image, more beautiful.
Alternatively or additionally, can be in HSV color spaces, according to saturation of the second saturation Tuning function to image
S components are adjusted.Above-mentioned second saturation Tuning function can pinpoint difference by preset HSV saturations correction curve and obtain
Arrive.Above-mentioned fixed point can be empirical value.Tone H component of the second saturation Tuning function also based on image.By pending image
Saturation S component be input into the second saturation Tuning function, you can the saturation component after being adjusted.
Fig. 6 is refer to, the illustrative diagram of saturation correction curve in HSV color spaces is it illustrates.Such as Fig. 6 institutes
Show, for the ease of be clearly viewed adjustment before and after image saturation S component change, made a diagonal 610 in figure, this
Point transverse and longitudinal coordinate on bar line is identical, and the saturation that can be used to image before and after expression is adjusted does not change.Another song
Line 620 is saturation correction curve in HSV color spaces.For saturation correction curve, in figure, horizontal, vertical coordinate represents tune respectively
The saturation S component respective value of image before and after whole.In figure, horizontal, ordinate value is the value after normalization.From fig. 6, it can be seen that full
Cornerwise top is in degree correction curve, i.e., when abscissa is identical, the vertical coordinate of curve is more than cornerwise vertical seat
Mark.That is, the saturation S component after adjustment is equal to the saturation S component before adjustment, and the S components in intermediate value
(e.g., 0.3-0.7) adjustment amplitude is larger.
Continue Fig. 1, then, in step 105, by process after image convert back rgb color space.
In the present embodiment, by process after image convert back rgb color space, obtain the image after color enhancement, with
Electronic device output is presented.
The image color Enhancement Method that above-described embodiment of the application is provided, by empty in HSI color spaces and HSV colors
Between the tone of image, saturation and/or brightness are adjusted, from two angles of characteristic and human vision property of color itself
Image is processed, it is possible to increase the contrast of image, make image more objective, closer to realistic colour, meet people's again
Visual effect.
Although it should be noted that describe the operation of the inventive method in the accompanying drawings with particular order, this does not require that
Or hint must execute these operations according to the particular order, or having to carry out all shown operation could realize the phase
The result of prestige.Conversely, the step of describing in flow chart can change execution sequence.In certain embodiments, the step in Fig. 1
103rd, 104 can carry out before step 101,102, namely the process in two color spaces can be with reversed order.Additionally
Or it is alternatively possible to omit some steps, multiple steps are merged into a step and is executed, and/or a step is decomposed into
Execution of multiple steps.
With further reference to Fig. 7, the one embodiment for the image color enhancement device 700 provided according to the application is it illustrates
Structural representation.
As shown in fig. 7, the image color enhancement device 700 that the present embodiment is provided can include:First modular converter 710,
First processing module 720, the second modular converter 730, Second processing module 740 and the 3rd modular converter 750.Wherein, first
Modular converter 710 is used for being changed to the first color space pending image by rgb color space;First processing module 720 is used
In carrying out enhancement process in the first color space to the color attribute of image;Second modular converter 730 be used for process after figure
As changing to the second color space;Second processing module 740 is used for increasing the color attribute of image in the second color space
Manage strength;And the 3rd modular converter 750 be used for process after image convert back rgb color space;Wherein, the first color is empty
Between for HSI and HSV color spaces one of them, the second color space be HSI and HSV color spaces in another;Color attribute bag
Include at least one in tone, saturation and brightness.
In some optional implementations, image color enhancement device 700 can also include:Scene determining module is (not
Illustrate), for determining the scene type of pending image;And first processing module 720 and Second processing module 740 are also used
In:Based on the scene type of pending image, respectively the color attribute of image is adjusted according to corresponding Attribute tuning function
Whole.
In some optional implementations, first processing module 720 or Second processing module 740 are additionally operable to:In HSI colors
Color space, according to the first hue adjustment function, the first saturation Tuning function tone H components and saturation S respectively to image
Component is adjusted;In HSI color spaces, the brightness I component of image is adjusted;In HSV color spaces, according to the second color
Key integral function and the second saturation Tuning function are adjusted to the tone H components and saturation S component of image respectively.
In some optional implementations, the first saturation Tuning function and the second saturation Tuning function are also based on figure
The tone of picture.
In some optional implementations, first processing module 720 or Second processing module 740 are additionally operable to according to as follows
The brightness I component of image is processed:Brightness adjustment is carried out respectively for excessively dark image and non-excessively dark image.
In some optional implementations, first processing module 720 or Second processing module 740 are further used for:Really
Determine the mean flow rate and high brightness ratio of image;If the mean flow rate of image is less than luminance threshold and high brightness ratio is less than
Proportion threshold value, it is determined that image was dark image, otherwise determines that image is non-excessively dark image;And dark image was directed to, carry out
First brightness adjustment;For non-excessively dark image, the second brightness adjustment is carried out.
In some optional implementations, first processing module 720 or Second processing module 740 can be according to following public affairs
Formula carries out the first brightness adjustment to excessively dark image:If I≤A, I=I*B/A;Otherwise, I=(I-A) * (255-B)/(255-A)+
B;Wherein, I is the luminance component before adjustment, and I is the luminance component after adjustment, and A is the decline cut-off in Luminance Distribution rectangular histogram
Point, B=(int) is (0.3*A+180).
In some optional implementations, first processing module 720 or Second processing module 740 can be performed as follows
Second brightness adjustment:Brightness adjustment is carried out according to the non-excessively dark image of brightness adjustment function pair.
In some optional implementations, scene type include following at least one:Food, personage and landscape.
The image color enhancement device that the present embodiment is provided, by the first modular converter by pending image by rgb color
Space is changed to the first color space, and first processing module is carried out at enhancing to the color attribute of image in the first color space
Reason, the image after then the second modular converter is by process are changed to the second color space, and Second processing module is empty in the second color
Between carry out enhancement process to the color attribute of image, last 3rd modular converter by process after image to convert back rgb color empty
Between, the contrast of image can be improved, make image more beautiful, closer to realistic colour.
With further reference to Fig. 8, the structure that it illustrates the one embodiment for the electronic equipment 800 provided according to the application is shown
It is intended to.
As shown in figure 8, the electronic equipment 800 that the present embodiment is provided can include processor 810 and display 820.Wherein,
Processor 810 is configured to:Pending image is changed to the first color space by rgb color space;In the first color space
Enhancement process is carried out to the color attribute of image;Image after by process is changed to the second color space;In the second color space
Enhancement process is carried out to the color attribute of image;And by process after image convert back rgb color space;Display 820 is matched somebody with somebody
The image after processing is put for presentation;Wherein, the first color space is one of HSI and HSV color spaces, and the second color is empty
Between for another in HSI and HSV color spaces;Color attribute includes at least one in tone, saturation and brightness.
Below with reference to Fig. 9, the computer system 900 for being suitable to the electronic equipment for realizing the embodiment of the present application is it illustrates
Structural representation.
As shown in figure 9, computer system 900 includes CPU (CPU) 901, which can be read-only according to being stored in
Program in memorizer (ROM) 902 or be loaded into the program in random access storage device (RAM) 903 from storage part 908 and
Execute various appropriate actions and process.In RAM 903, the system that is also stored with 900 operates required various programs and data.
CPU 901, ROM 902 and RAM 903 are connected with each other by bus 904.Input/output (I/O) interface 905 is also connected to always
Line 904.
I/O interfaces 905 are connected to lower component:Importation 906 including keyboard, mouse etc.;Penetrate including such as negative electrode
Spool (CRT), liquid crystal display (LCD) etc. and the output par, c 907 of speaker etc.;Storage part 908 including hard disk etc.;
And the communications portion 909 of the NIC including LAN card, modem etc..Communications portion 909 via such as because
The network of special net executes communication process.Driver 910 is also according to needing to be connected to I/O interfaces 905.Detachable media 911, such as
Disk, CD, magneto-optic disk, semiconductor memory etc., as needed in driver 910, in order to read from it
Computer program be mounted into as needed storage part 908.
Especially, in accordance with an embodiment of the present disclosure, the process above with reference to flow chart description may be implemented as computer
Software program.For example, embodiment of the disclosure includes a kind of computer program, and which includes being tangibly embodied in machine readable
Computer program on medium, the computer program include the program code for the method shown in execution flow chart.At this
In the embodiment of sample, the computer program can be downloaded and installed from network by communications portion 909, and/or from removable
Unload medium 911 to be mounted.
Flow chart and block diagram in accompanying drawing, it is illustrated that according to the system of various embodiments of the invention, method and computer journey
The architectural framework in the cards of sequence product, function and operation.At this point, each square frame in flow chart or block diagram can generation
A part for table one module, program segment or code, a part for the module, program segment or code is comprising one or more
For realizing the executable instruction of the logic function of regulation.It should also be noted that in some are as the realization that replaces, institute in square frame
The function of mark can also occur with the order for being different from marked in accompanying drawing.For example, the two square frame reality for succeedingly representing
On can execute substantially in parallel, they can also be executed sometimes in the opposite order, and this is depending on involved function.Also to
It is noted that the combination of block diagram and/or each square frame and block diagram and/or the square frame in flow chart in flow chart, Ke Yiyong
Execute the function of regulation or the special hardware based system of operation to realize, or can be referred to computer with specialized hardware
The combination of order is realizing.
It is described in involved unit module in the embodiment of the present application to realize by way of software, it is also possible to logical
Cross the mode of hardware to realize.Described unit module can also be arranged within a processor, for example, it is possible to be described as:A kind of
Processor includes the first modular converter, first processing module, the second modular converter, Second processing module and the 3rd modulus of conversion
Block.Wherein, the title of these unit modules is not constituted under certain conditions to the unit module restriction of itself, for example,
One modular converter, is also described as " for being changed to the first color space pending image by rgb color space ".
As on the other hand, present invention also provides a kind of computer-readable recording medium, the computer-readable storage medium
Matter can be the computer-readable recording medium described in above-described embodiment included in device;Can also be individualism, not
The computer-readable recording medium being fitted in terminal.The computer-readable recording medium storage have one or more than one
Program, described program are used for executing the image color enhancing side for being described in the application by one or more than one processor
Method.
Above description is only the preferred embodiment and the explanation to institute's application technology principle of the application.People in the art
Member should be appreciated that involved invention scope in the application, however it is not limited to the technology of the particular combination of above-mentioned technical characteristic
Scheme, while should also cover in the case of without departing from the inventive concept, is carried out by above-mentioned technical characteristic or its equivalent feature
Combination in any and other technical schemes for being formed.Such as features described above has similar work(with (but not limited to) disclosed herein
The technical scheme that the technical characteristic of energy is replaced mutually and formed.
Claims (10)
1. a kind of image color Enhancement Method, it is characterised in that methods described includes:
Pending image is changed to the first color space by rgb color space;
Enhancement process is carried out to the color attribute of described image in the first color space;
Image after by process is changed to the second color space;
Enhancement process is carried out to the color attribute of described image in the second color space;And
Image after by process converts back rgb color space;
Wherein, first color space be HSI and HSV color spaces one of them, second color space be HSI and
Another in HSV color spaces;
The color attribute includes at least one in tone, saturation and brightness.
2. method according to claim 1, it is characterised in that also include:
Determine the scene type of the pending image;And
Described in the first color space and enhancement process is carried out to the color attribute of described image in the second color space include:
Based on the scene type of the pending image, respectively the color of described image is belonged to according to corresponding Attribute tuning function
Property is adjusted.
3. method according to claim 2, it is characterised in that the scene type based on the pending image, root
Enhancement process is carried out to the color attribute of described image respectively according to corresponding Attribute tuning function includes:
In HSI color spaces, according to the first hue adjustment function, the first saturation Tuning function tone respectively to described image
H components and saturation S component are adjusted;
In HSI color spaces, the brightness I component of described image is adjusted;
In HSV color spaces, according to the second hue adjustment function and the second saturation Tuning function color respectively to described image
H components and saturation S component is adjusted to be adjusted.
4. method according to claim 3, it is characterised in that the first saturation Tuning function and the second saturation are adjusted
Tone of the integral function also based on described image.
5. method according to claim 3, it is characterised in that the brightness I component to described image carries out process bag
Including carries out brightness adjustment respectively by the following dark image and non-excessively dark image of being directed to:
Determine the mean flow rate and high brightness ratio of image;
If the mean flow rate of described image is less than luminance threshold and high brightness ratio is less than proportion threshold value, it is determined that described image
For excessively dark image, otherwise determine that described image is non-excessively dark image;And
For excessively dark image, the first brightness adjustment is carried out;
For non-excessively dark image, the second brightness adjustment is carried out.
6. method according to claim 5, it is characterised in that include:First is carried out to excessively dark image according to following formula
Brightness adjustment:
If I≤A, I=I*B/A;
Otherwise, I=(I-A) * (255-B)/(255-A)+B;
Wherein, I is the luminance component before adjustment, and I is the luminance component after adjustment, and A is that the decline in Luminance Distribution rectangular histogram cuts
Stop, B=(int) is (0.3*A+180).
7. according to the arbitrary described method of claim 2-6, it is characterised in that the scene type include following at least one:
Food, personage and landscape.
8. a kind of image color enhancement device, it is characterised in that described device includes:
First modular converter, for being changed to the first color space pending image by rgb color space;
First processing module, for carrying out enhancement process in the first color space to the color attribute of described image;
Second modular converter, changes to the second color space for the image after by process;
Second processing module, for carrying out enhancement process in the second color space to the color attribute of described image;And
3rd modular converter, converts back rgb color space for the image after by process;
Wherein, first color space be HSI and HSV color spaces one of them, second color space be HSI and
Another in HSV color spaces;
The color attribute includes at least one in tone, saturation and brightness.
9. device according to claim 8, it is characterised in that also include:
Scene determining module, for determining the scene type of the pending image;And
The first processing module and Second processing module are additionally operable to:
Based on the scene type of the pending image, respectively the color of described image is belonged to according to corresponding Attribute tuning function
Property is adjusted.
10. a kind of electronic equipment, including display and processor, it is characterised in that
The processor is configured to:
Pending image is changed to the first color space by rgb color space;
Enhancement process is carried out to the color attribute of described image in the first color space;
Image after by process is changed to the second color space;
Enhancement process is carried out to the color attribute of described image in the second color space;And
Image after by process converts back rgb color space;
The display is configured to the image after assuming the process;
Wherein, first color space be HSI and HSV color spaces one of them, second color space be HSI and
Another in HSV color spaces;
The color attribute includes at least one in tone, saturation and brightness.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510295700.2A CN104935902B (en) | 2015-06-02 | 2015-06-02 | Image color Enhancement Method, device and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510295700.2A CN104935902B (en) | 2015-06-02 | 2015-06-02 | Image color Enhancement Method, device and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104935902A CN104935902A (en) | 2015-09-23 |
CN104935902B true CN104935902B (en) | 2017-03-15 |
Family
ID=54122836
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510295700.2A Active CN104935902B (en) | 2015-06-02 | 2015-06-02 | Image color Enhancement Method, device and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104935902B (en) |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105185351B (en) * | 2015-10-13 | 2017-07-28 | 深圳市华星光电技术有限公司 | Lift the method and system of OLED display panel contrast |
CN105405130B (en) * | 2015-11-02 | 2019-03-01 | 北京旷视科技有限公司 | License image highlight detection method and device based on cluster |
CN107317967B (en) * | 2017-07-27 | 2020-03-27 | Oppo广东移动通信有限公司 | Image processing method, image processing device, mobile terminal and computer readable storage medium |
CN108280813A (en) * | 2018-01-30 | 2018-07-13 | 努比亚技术有限公司 | A kind of image processing method, terminal and computer readable storage medium |
CN108257221B (en) * | 2018-02-24 | 2022-02-01 | 网易(杭州)网络有限公司 | Tone adjusting method, tone adjusting apparatus, storage medium, and electronic apparatus |
CN109671399B (en) * | 2018-12-11 | 2020-08-18 | 惠科股份有限公司 | Driving method and driving system of display module and display device |
CN110648373B (en) * | 2019-09-16 | 2022-04-15 | 紫光展讯通信(惠州)有限公司 | Image processing method and device |
CN111145128B (en) * | 2020-03-02 | 2023-05-26 | Oppo广东移动通信有限公司 | Color enhancement method and related device |
CN113658280B (en) * | 2021-08-20 | 2023-07-04 | 平安科技(深圳)有限公司 | Data augmentation method, device, equipment and storage medium based on artificial intelligence |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI334310B (en) * | 2006-03-08 | 2010-12-01 | Marketech Int Corp | Apparatus and method for adjusting saturation of image |
CN104299196A (en) * | 2014-10-11 | 2015-01-21 | 京东方科技集团股份有限公司 | Image processing device and method and display device |
CN104284168B (en) * | 2014-10-17 | 2017-07-21 | 深圳市华星光电技术有限公司 | image color enhancement method and system |
-
2015
- 2015-06-02 CN CN201510295700.2A patent/CN104935902B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN104935902A (en) | 2015-09-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104935902B (en) | Image color Enhancement Method, device and electronic equipment | |
US9639965B2 (en) | Adjusting color attribute of an image in a non-uniform way | |
Ancuti et al. | Enhancing by saliency-guided decolorization | |
US8290252B2 (en) | Image-based backgrounds for images | |
CN108230331A (en) | Image processing method and device, electronic equipment, computer storage media | |
US20130057566A1 (en) | User interface with color themes based on input image data | |
CN103248793B (en) | The colour of skin optimization method of gamut conversion system and device | |
CN101512597B (en) | Method and apparatus for image enhancement | |
CA2576066A1 (en) | Methods and apparatuses for aesthetically enhanced image conversion | |
CN102792670A (en) | Image quality control apparatus, image quality control method, and image quality control program | |
CN107909553A (en) | A kind of image processing method and equipment | |
CN107871303A (en) | A kind of image processing method and device | |
JP2014146300A (en) | Image processing device and image processing program | |
CN103685850A (en) | Image processing method and image processing apparatus | |
CN104978198A (en) | Method and apparatus for configuring keyboard skin | |
JP4758999B2 (en) | Image processing program, image processing method, and image processing apparatus | |
CN109636739B (en) | Detail processing method and device for enhancing image saturation | |
US20170213328A1 (en) | Method and system for processing image content for enabling high dynamic range (uhd) output thereof and computer-readable medium comprising uhd content created using same | |
CN104978945A (en) | Image saturation enhancement method and apparatus | |
US8351724B2 (en) | Blue sky color detection technique | |
JPH11146219A (en) | Image processing device and method and medium recording image processing program | |
CN111028181B (en) | Image enhancement processing method, device, equipment and storage medium | |
JP2011061860A (en) | Image-data processor, medium with image-data set recorded, medium with image-data processing program recorded and method for processing image data | |
CN110298812A (en) | A kind of method and device of image co-registration processing | |
CN114266803A (en) | Image processing method, image processing device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |