CN104954767B - A kind of information processing method and electronic equipment - Google Patents
A kind of information processing method and electronic equipment Download PDFInfo
- Publication number
- CN104954767B CN104954767B CN201410117484.8A CN201410117484A CN104954767B CN 104954767 B CN104954767 B CN 104954767B CN 201410117484 A CN201410117484 A CN 201410117484A CN 104954767 B CN104954767 B CN 104954767B
- Authority
- CN
- China
- Prior art keywords
- image
- color
- pixel
- value
- color 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
Landscapes
- Image Processing (AREA)
Abstract
This application provides a kind of information processing method and electronic equipment, how to improve the technical problem of the too low image of contrast for solve prior art presence, realize and picture contrast is effectively provided, so as to improve the technique effect of picture quality.Methods described includes:The first image is obtained, the first contrast of described first image is less than a threshold value;The first color value of at least one pixel of described first image is obtained, first color value is made up of the value of each Color Channel of the first color space;Calculate the enhancing coefficient for obtaining the misalignment of described first image and needing to handle described first image;The first color value, the misalignment and the enhancing coefficient based at least one pixel, obtain new first color value of at least one pixel;New first color value based at least one pixel, obtains the first optimization image corresponding with described first image.
Description
Technical field
The present invention relates to electronic technology field, more particularly to a kind of information processing method and electronic equipment.
Background technology
Nineteen thirty-nine, French Daguerre has invented First camera in the world, from this, and people just change people's record life
Mode living.With the development of electro-optical technology, landscape, personage and the photographic quality of animal that people shoot also are drilled from black and white
Changed to colour, and photo become apparent from it is true to nature.
Present user likes shooting personage, landscape, animal and night scene etc. with camera, mobile phone and tablet personal computer etc..But,
User obtain photographic quality it is usually relevant with the condition of shooting, for example when user sandstorm weather shoot, underwater photograph technical or
When object or landscape are shot across coloured glass, often contrast is very low for taken photo, and whole photo takes a fancy to dedusting
Drizzly, the object of distant place is also unintelligible.
In the prior art, it is often to improve image with the image editing software of specialty for the not high photo of contrast
Overall contrast, but such processing is very limited for the raising of contrast, and is likely to result in part loss in detail.
So, have how to improve the technical problem of the too low image of contrast in the prior art.
The content of the invention
This application provides a kind of information processing method and electronic equipment, for how improving for prior art presence to be solved
The technical problem of the too low image of contrast, realizes and effectively improves picture contrast, so as to improve the technology effect of picture quality
Really.
On the one hand, this application provides a kind of information processing method, applied to an electronic equipment, methods described includes:
The first image is obtained, the first contrast of described first image is less than a threshold value;
Obtain the global color B of described first image;
The first color value of at least one pixel of described first image is obtained, first color value is by the first color
The value composition of each Color Channel in space;
First color of at least one pixel of global color B and described first image based on described first image
Value, calculates the enhancing coefficient for obtaining the misalignment of described first image and needing to handle described first image;
The first color value, the misalignment and the enhancing coefficient based at least one pixel, are obtained extremely
New first color value of a few pixel;
New first color value based at least one pixel, obtains the first optimization corresponding with described first image
Image, wherein, the second contrast of the first optimization image is more than the first contrast of described first image.
Optionally, the global color B for obtaining described first image, be specially:
Obtain by described first image the second color space different from first color space the second color value;
First is carried out for second color value to convert, and obtains second color value in first color space pair
The global color B answered.
Optionally, when at least one described pixel is specially N number of pixel, N is positive integer, the acquisition needs pair
The enhancing coefficient that described first image is handled, be specially:
1 to N is taken to perform following steps to i successively:
The first color value for obtaining ith pixel point is combined with the i-th ratio of the global color B;
It is the described i-th enhancing coefficient c to determine the minimum value in the i-th ratio combination;
When the i is the N, the enhancing coefficient of described first image is obtained.
Optionally, it is described to calculate the misalignment for obtaining described first image, be specially:
1 to N is taken to perform following steps to i successively:
Based on the global color B and the i-th enhancing coefficient c, the i-th misalignment H is obtained;
When the i is the N, the misalignment of described first image is obtained.
Optionally, it is described to be based on the global color B and the i-th enhancing coefficient c, the i-th misalignment H is obtained,
Specially:
By the global color B and the i-th enhancing coefficient c, formula is substituted into:H=B (1-1/c), is calculated, is entered
And obtain the i-th misalignment H.
Optionally, first color value based at least one pixel, the misalignment and the enhancing
Coefficient, obtains new first color value of at least one pixel, is specially:
1 to N is taken to perform following steps to i successively:
First color value I of the ith pixel point, the i-th enhancing coefficient c and the i-th misalignment H are substituted into public
Formula:
L=c (I-H), is calculated, and then obtains the new first color value L of the ith pixel point;
When i is N, new first color value of at least one pixel is obtained.
On the other hand, this application provides a kind of electronic equipment, including:
Image acquiring unit, for obtaining the first image, the first contrast of described first image is less than a threshold value;
First obtains unit, the first color value for obtaining described first image, first color value is by the first face
The value composition of each Color Channel of the colour space;
5th obtaining unit, for after the first image of the acquisition, obtaining the global color B of described first image;
Second obtaining unit, at least one of the global color B based on described first image and described first image
First color value of pixel, calculates the misalignment for obtaining described first image and needs to handle described first image
Enhancing coefficient;
3rd obtaining unit, for the first color value based at least one pixel, the misalignment and institute
Enhancing coefficient is stated, the rgb value of at least one pixel is obtained;
4th obtaining unit, for new first color value based at least one pixel, is obtained and described first
The corresponding first optimization image of image, wherein, the second contrast of the first optimization image is more than the of described first image
One contrast.
Optionally, the electronic equipment also includes:
5th obtaining unit, for after the first image of the acquisition, obtaining the global color B of described first image.
Optionally, the 5th obtaining unit, specifically for:
Obtain by described first image the second color space different from the first color space the second color value;
First is carried out for second color value to convert, and obtains second color value in first color space pair
The global color B answered.
Optionally, when at least one described pixel is specially N number of pixel, N is positive integer, and described second obtains single
Member specifically for:
1 to N is taken to perform following steps to i successively:
The first color value for obtaining ith pixel point is combined with the i-th ratio of the global color B;
It is the described i-th enhancing coefficient c to determine the minimum value in the i-th ratio combination;
When the i is the N, the enhancing coefficient of described first image is obtained.
Optionally, second obtaining unit is specifically additionally operable to:
1 to N is taken to perform following steps to i successively:
Based on the global color B and the i-th enhancing coefficient c, the i-th misalignment H is obtained;
When the i is the N, the misalignment of described first image is obtained.
Optionally, second obtaining unit, specifically for:
By the global color B and the i-th enhancing coefficient c, formula is substituted into:H=B (1-1/c), is calculated, is entered
And obtain the i-th misalignment H.
Optionally, the 3rd obtaining unit, specifically for:
1 to N is taken to perform following steps to i successively:
First color value I of the ith pixel point, the i-th enhancing coefficient c and the i-th misalignment H are substituted into public
Formula:
L=c (I-H), is calculated, and then obtains the new first color value L of the ith pixel point;
When i is N, new first color value of at least one pixel is obtained.
Said one or multiple technical schemes in the embodiment of the present application, are at least imitated with following one or more technologies
Really:
1st, in the technical scheme of the application, after the first image is obtained, at least the one of described first image is obtained first
First color value of individual pixel, then calculates and obtains the misalignment of described first image and need to enter described first image
The enhancing coefficient of row processing, is next based on the first color value, the misalignment and the increasing of at least one pixel
Strong coefficient, obtains new first color value of at least one pixel, is finally based on new first face of at least one pixel
Colour, obtains the first optimization image corresponding with described first image, wherein, the second contrast of the first optimization image is big
In the first contrast of described first image, so that how solve prior art presence improves contrast too low image
Technical problem, realizes and at least one pixel in the first image is handled by above-mentioned algorithm, so as to obtain more
First optimization image of high-contrast, improves the technique effect of picture quality.
Brief description of the drawings
Fig. 1 is the information processing method flow chart in the embodiment of the present application one;
Fig. 2 is the electronic devices structure schematic diagram in the embodiment of the present application two.
Embodiment
This application provides a kind of information processing method and electronic equipment, for how improving for prior art presence to be solved
The technical problem of the too low image of contrast, realizes and effectively improves picture contrast, so as to improve the technology effect of picture quality
Really.
In order to solve the above-mentioned technical problem, the technical scheme general thought that the application is provided is as follows:
The first image is obtained, the first contrast of described first image is less than a threshold value;
The first color value of at least one pixel of described first image is obtained, first color value is by the first color
The value composition of each Color Channel in space;
Calculate the enhancing coefficient for obtaining the misalignment of described first image and needing to handle described first image;
The first color value, the misalignment and the enhancing coefficient based at least one pixel, are obtained extremely
New first color value of a few pixel;
New first color value based at least one pixel, obtains the first optimization corresponding with described first image
Image, wherein, the second contrast of the first optimization image is more than the first contrast of described first image.
In the technical scheme of the application, after the first image is obtained, at least one of described first image is obtained first
First color value of pixel, then calculates and obtains the misalignment of described first image and need to carry out described first image
The enhancing coefficient of processing, is next based on the first color value, the misalignment and the enhancing of at least one pixel
Coefficient, obtains new first color value of at least one pixel, is finally based on new first color of at least one pixel
Value, obtains the first optimization image corresponding with described first image, wherein, the second contrast of the first optimization image is more than
First contrast of described first image, thus solve prior art presence how to improve the skill of the too low image of contrast
Art problem, realizes and at least one pixel in the first image is handled by above-mentioned algorithm, so as to obtain higher
First optimization image of contrast, improves the technique effect of picture quality.
Technical solution of the present invention is described in detail below by accompanying drawing and specific embodiment, it should be understood that the application
Specific features in embodiment and embodiment are the detailed description to technical scheme, rather than to present techniques
The restriction of scheme, in the case where not conflicting, the technical characteristic in the embodiment of the present application and embodiment can be mutually combined.
In the embodiment of the present application there is provided a kind of information processing method and electronic equipment, in specific implementation, electronics is set
Standby can be smart mobile phone or tablet personal computer either intelligent watch, as long as having image acquiring unit, specifically
, in the embodiment of the present application, it will not be restricted.
Embodiment one:
Before the information processing method of the embodiment of the present application is introduced, the electronics for first applying the method for the embodiment of the present application
The basic structure of equipment makes a presentation, as shown in Fig. 2 the electronic equipment in the embodiment of the present application includes:
Image acquiring unit 1, for obtaining the first image, the first contrast of described first image is less than a threshold value;
First obtains unit 2, the first color value of at least one pixel for obtaining described first image, described
One color value is made up of the value of each Color Channel of the first color space;
Second obtaining unit 3, the misalignment of described first image is obtained for calculating and is needed to described first image
The enhancing coefficient handled;
3rd obtaining unit 4, for the first color value based at least one pixel, the misalignment and institute
Enhancing coefficient is stated, the new first color value value of at least one pixel is obtained;
4th obtaining unit 5, for the new first color value value based at least one pixel, is obtained and described the
The corresponding first optimization image of one image, wherein, the second contrast of the first optimization image is more than described first image
First contrast.
Below, the information processing method that refer in Fig. 1, the embodiment of the present application includes:
S1:The first image is obtained, the first contrast of described first image is less than a threshold value.
Specifically, in the embodiment of the present application, the first image can be to be obtained by the image acquiring unit of mobile phone,
The preview image that user's observation mobile phone is shown, after preview image meets the demand of user, triggering image capture button or virtual
Image capture button come make electronic equipment obtain the first image;The preview for observing display can also be shot by camera for user
Image, after preview image meets the demand of user, triggering image capture button or virtual image obtain button to make camera
Obtain the first image.As long as possessing the electronic equipment of image acquiring unit to obtain the first image, the affiliated technology of the application
Personnel can be selected according to actual needs, and the application does not make specific limitation.
When user obtains the first image in adverse conditions, such as user shoots landscape in sandstorm weather and shone, or
Plant or animal in underwater photograph technical water, or show piece etc. is shot across coloured glass, due to such shooting condition
It is not good, so as to cause the first picture contrast of acquisition can be than relatively low.Specifically, the first contrast is less than a threshold value, such as 30:1,
Or 100:1 etc..
After the first image is obtained, because the contrast of the first image is relatively low, quality is not good, so needs should the application
Information processing method in embodiment is handled the first image.In the embodiment of the present application, obtain after the first image, walk
Before rapid S2, in addition to:
Obtain the global color B of described first image.
Specifically, in the embodiment of the present application, obtaining the global color B of the first image detailed process can be:
(1) obtain by described first image the second color space different from first color space the second color
Value.
Specifically, the first color space and the second color space are different, and such as the first color space is that RGB is (red
It is turquoise, Red Green Blue) color space, the second color space is Lab, or the first color space is RGB color,
Second color space is CMY color spaces, or hsv color space during the first color space, the second color space is RGB color
Space etc., during implementing, the application those of skill in the art can be selected according to actual needs, and the application does not make
Specific limitation.
In order to illustrate how the global color B for obtaining the first image, below using the first color space as RGB color,
Second color space be Lab color spaces exemplified by illustrate.
First, obtain the first image Lab color spaces value, for example obtain the 1st pixel Lab color values for (12,
59,120), the Lab color values of the 2nd pixel are (78, -26,19), and the Lab color values of the 3rd pixel are (66,27,36) etc.,
The Lab color values of more pixels will not enumerate here.
Next, in the embodiment of the present application, because color value of first image in Lab color spaces has a lot, institute
In the embodiment of the present application, to determine maximum brightness value L of first image in Lab color spacesmax, the first Color Channel put down
Average aeven, and the second Color Channel average value bevenTo constitute the second color value, naturally it is also possible to using average brightness or
Maximum of weighted average, the maximum of the first Color Channel and the second Color Channel etc. constitutes second color value etc., this
Application is not particularly limited.Assuming that the Lab color values of the 1st pixel are (12,59,120), the Lab color values of the 2nd pixel are
(78, -26,19), the Lab color values of the 3rd pixel are (66,27,36) ..., because the first image is in Lab color spaces
Value has more, does not just list one by one herein, it is assumed that the L of acquisitionmax=78, aeven=20, beven=42, then obtain second
Color value (78,20,42).Or Lmax=65, aeven=34, beven=95, then obtain the second color value (65,34,95).
(2) carry out first for second color value to convert, obtain second color value empty in first color
Between the corresponding global color B.
Continue using the first color space as RGB color, the second color space be Lab color spaces exemplified by said
Bright, the second color value obtained in step (1) is the value in Lab color spaces, in order to being obtained in step (1)
The second color value handled, it is necessary to by global color from the second color space, i.e. Lab color space conversions to the first color
In space, i.e. RGB color.In the embodiment of the present application, by the global face of Lab color space conversions to RGB color
Color B is, it is necessary to by the first conversion.During implementing, the first conversion can be CIE canonical transformations or Abode
Conversion etc., is transformed in RGB color by the first the first color value become in Lab color spaces of changing commanders.Due to from Lab face
The detailed process to RGB color of color space transformation has obtained a range of application, therefore this Shen in the prior art
Please embodiment with regard to not repeated one by one.
By taking two the first color values above as an example, the first color value is (78,20,42), by the first conversion, is obtained
Global color B in corresponding RGB color is just (245,178,115), and the first color value is (65,34,95), by the
One conversion, it is just (0,195,214) to obtain the global color B in corresponding RGB color.Certainly, process is being implemented
In, the value including but not limited in above-mentioned two example.
Certainly, during implementing, when the first color space and the second color space are different from above-mentioned example
When RGB color and Lab color spaces, those skilled in the art can be according to the specific side for actually selecting the first conversion
Method, the application is not particularly limited.
Next, performing step S2.
S2:Obtain the first color value of at least one pixel of described first image.
Specifically, obtain in step sl after global color B, in order to each pixel in the first image
Handled, so that the contrast of the first image is improved, so in the embodiment of the present application, it is necessary to obtain at least one pixel
The first color value.Wherein, at least one pixel can be pixel, 10,000 pixels or 90,000 pixels,
Particular number the application is not particularly limited.If necessary to handle each pixel in the first image, then
The first color value of all pixels point in the first image is just obtained, if only needing to handle local in the first image,
So with regard to the first color value for obtaining each pixel for needing process part, the application those of skill in the art can be according to reality
Border needs pixel to be processed to be selected, and the application does not make specific limitation.
The first color value of at least one pixel is obtained, electronic equipment can be arranged by inquiring about the information of the first image
Table, when no information list, or information list can not be accessed, electronic equipment can also obtain at least one pixel by analyzing
The pixel value of point, during implementing, the mode the application for obtaining the first color value of at least one pixel does not do and had
Body is limited.
Further, the first color value is made up of the value of each Color Channel of the first color space, and the first color space has
It is a variety of, such as RGB color, then the first color value is just made up of the value of R passages, G passages and channel B, or as Lab colors are empty
Between, then the first color value is just made up of the value of brightness L * channel, a Color Channels and b Color Channels, and the first color space may be used also
To be CMY color spaces etc., just do not repeat one by one here.It is detailed in order to be carried out to the technical scheme of the embodiment of the present application
Introduce, in following introduction, it is assumed that the first color space is RGB color, the first color value is RGB color value, but
During implementing, including but not limited to rgb value is a kind of.
Next, after obtaining the first color value and global image B of at least one pixel, it is possible to be based on
The two values are subsequently calculated the first image, so as to improve the contrast of the first image.Therefore, next, performing step
S3。
S3:Calculate the enhancing system for obtaining the misalignment of described first image and needing to handle described first image
Number.
In step s3, it is necessary to the misalignment for obtaining the first image and enhancing coefficient be calculated, in order to clearly say
Bright step S3 implementation process, first introduces how to calculate acquisition enhancing coefficient below, the face for the first image is then introduced again
The calculating of colo(u)r bias.
(1) calculate and obtain enhancing coefficient c.
In the embodiment of the present application, enhancing coefficient refers to each pixel by unfavorable factor, such as sandstorm, seawater or
The influence degree of coloured glass.Pixel strengthens the degree of closeness of coefficient the first color value of c inverse ratios pixel and global color B,
I.e. the color value of pixel first is with close to global color B, strengthening coefficient bigger.Further, in the embodiment of the present application, c >=1,
When pixel is not influenceed by unfavorable factor completely, c=1.
In the embodiment of the present application, it is assumed that at least one pixel is specially N number of pixel, N is positive integer, such as 1,2,
10000 etc., value the application for N is not particularly limited.Specifically, it is to the process for obtaining enhancing coefficient c:
1) the first color value for obtaining the ith pixel point is combined with the i-th ratio of the global color B.
Specifically, in the embodiment of the present application, the combination of the i-th ratio is obtained, it is necessary to by two steps.
The first step:The first color of ith pixel point is obtained to the B distances of global color, so that N number of pixel and global face
Color B distance value constitutes the second image;
Second step:Bilateral filtering is carried out to the second image of acquisition, the 3rd image is obtained, and in the 3rd image i-th
Pixel is inverted, obtains the i-th ratio combination of ith pixel point in the first image of correspondence.
During implementing, the above-mentioned first step and second step can compile program, plug-in unit or software, therefore,
In the embodiment of the present application, it is assumed that the first color space where the first color value and global color of ith pixel point is RGB color
Space, the i-th ratio of acquisition is combined as (1.3581,10.0000,1.1862) or (10.0000,10.0000,1.0921).
2) it is the described i-th enhancing coefficient c to determine the minimum value in the i-th ratio combination.
In the embodiment of the present application, i-th enhancing coefficient c of the minimum value in the combination of the i-th ratio for ith pixel point is determined,
For example hereinbefore, the i-th ratio is combined as (1.3581,10.0000,1.1862), then the enhancing coefficient of ith pixel point is just
C=1.1862, the i-th ratio is combined as (10.0000,10.0000,1.0921), then the enhancing coefficient of ith pixel point is just c
=1.0921.
(2) misalignment of the first image is calculated.
Specifically, because the processing for N number of pixel in the first image is identical, in the embodiment of the present application
In, it is introduced by taking ith pixel point as an example.Obtain ith pixel point the i-th misalignment be specially:
Based on the global color B and the i-th enhancing coefficient c, the i-th misalignment H is obtained.
Global color B is obtained calculating, and after the i-th enhancing coefficient c of ith pixel point, it becomes possible to further obtain i-th
Misalignment H.In the embodiment of the present application, it is by the way that global color B and i-th is strengthened into coefficient c, generation to obtain the i-th misalignment H
Enter formula:H=B (1-1/c), is calculated, and then obtains the i-th misalignment H.
In order to illustrate the detailed process for obtaining the i-th misalignment H, continue to continue to use first above where global color B
Color space is RGB color, and B is (245,178,115) or (0,195,214), and c is 1.1862 or c=1.0921 is
Example is illustrated, in the example included but is not limited to during implementing in the embodiment of the present application.
(1) by B (245,178,115), and c=1.1862 substitutes into H=B (1-1/c), then 245 (1-1/1.1862)
=38.46,178 (1-1/1.1862)=27.94,115 (1-1/1.1862)=18.05, it is determined that the i-th misalignment H is
(38,28,18).
(2) by B (245,178,115), and c=1.0921 substitutes into H=B (1-1/c), then 245 (1-1/1.0921)
=20.66,178 (1-1/1.0921)=15.01,115 (1-1/1.0921)=13.07, it is determined that the i-th misalignment H is
(21,15,13).
(3) by B (0,195,214), and c=1.1862 substitutes into H=B (1-1/c), then 0 (1-1/1.1862)=0,
195 (1-1/1.1862)=30.61,214 (1-1/1.1862)=33.59, it is determined that the i-th misalignment H is (0,30,34).
(4) by B (0,195,214), and c=1.0921 substitutes into H=B (1-1/c), then 0 (1-1/1.0921)=0,
195 (1-1/1.0921)=16.44,214 (1-1/1.0921)=18.05, it is determined that the i-th misalignment H is (0,16,18).
More examples are just no longer repeated one by one here.
Below, step S4 is performed.
S4:The first color value, the misalignment and the enhancing coefficient based at least one pixel, are obtained
New first color value of at least one pixel.
It is real in the application after misalignment and enhancing coefficient when the first color value for obtaining at least one pixel
Apply in example, new first color value of at least one pixel in the first image is just resulted in by calculating.Implement in the application
In example, it is introduced by taking ith pixel point as an example.Obtain ith pixel point new first color value L be specially:
First color value I of the ith pixel point, the i-th enhancing coefficient c and the i-th misalignment H are substituted into public
Formula:
L=c (I-H), is calculated, and then obtains the new first color value L of the ith pixel point.
In order to illustrate obtain ith pixel point new first color value L detailed process, continue to continue to use above the first color
Space is RGB color, and H is (38,28,18) or (0,16,18), and c is to be illustrated exemplified by 1.1862 or c=1.0921,
In the example included but is not limited to during implementing in the embodiment of the present application.
(1) rgb value for assuming ith pixel point is (210,180,140), and H is (38,28,18), and c=1.1862 is substituted into public
Formula L=c (I-H), then 1.1862 (210-38)=204.03,1.1862 (180-28)=180.30,1.1862 (140-
18)=144.72, then the new rgb value L of ith pixel point is (204,180,145).
(2) rgb value for assuming ith pixel point is (139,69,19), and H is (0,16,18), and c=1.0921 substitutes into formula L
=c (I-H), then 1.0921 (139-0)=151.80,1.0921 (69-16)=57.88,1.0921 (19-18)=
1.0921, then the new rgb value L of ith pixel point is (152,58,1).
(3) rgb value for assuming ith pixel point is (95,68,64), and H is (38,28,18), and c=1.0921 substitutes into formula L
=c (I-H), then 1.0921 (95-38)=62.25,1.0921 (68-28)=43.68,1.0921 (64-18)=
50.24, then the new rgb value L of ith pixel point is (62,44,50).
More examples are just no longer repeated one by one.
Finally, step S5 is performed.
S5:New first color value based at least one pixel, obtains corresponding with described first image first
Optimize image.
New first color value of at least one pixel is being obtained, after such as new rgb value, with regard to the first optimization figure can be obtained
Picture.For example, N is 100000, after 100000 pixels have been done with above-mentioned identical processing, 100000 pictures are rearranged
Vegetarian refreshments, it is final to obtain the first optimization image.
Due to during to the first image procossing, eliminating the interference of the first color of image deviation first, and multiply
With the corresponding enhancing coefficient of each pixel of the first image, and strengthen coefficient and characterize the influence that pixel receives unfavorable factor
Degree, therefore, the second contrast of the first optimization image are improved compared with the first contrast of the first image.
Embodiment two:
The electronic equipment that refer in Fig. 2, the embodiment of the present application includes:
Image acquiring unit 1, for obtaining the first image, the first contrast of described first image is less than a threshold value;
First obtains unit 2, the first color value of at least one pixel for obtaining described first image, described
One color value is made up of the value of each Color Channel of the first color space;
5th obtaining unit, for after the first image of the acquisition, obtaining the global color B of described first image;
Second obtaining unit 3, at least one of the global color B based on described first image and described first image
First color value of pixel, calculates the misalignment for obtaining described first image and needs to handle described first image
Enhancing coefficient;
3rd obtaining unit 4, for the first color value based at least one pixel, the misalignment and institute
Enhancing coefficient is stated, the first color value of at least one pixel is obtained;
4th obtaining unit 5, for new first color value based at least one pixel, is obtained and described first
The corresponding first optimization image of image, wherein, the second contrast of the first optimization image is more than the of described first image
One contrast.
Specifically, in the embodiment of the present application, the 5th obtaining unit, specifically for:
Obtain by described first image the second color space different from the first color space the second color value;
First is carried out for second color value to convert, and obtains second color value in first color space pair
The global color B answered.
Further, when at least one described pixel is specially N number of pixel, N is positive integer, the second obtaining unit 3
Specifically for:
1 to N is taken to perform following steps to i successively:
The first color value for obtaining ith pixel point is combined with the i-th ratio of the global color B;
It is the described i-th enhancing coefficient c to determine the minimum value in the i-th ratio combination;
When the i is the N, the enhancing coefficient of described first image is obtained.
In addition, the second obtaining unit 3 is specifically additionally operable to:
1 to N is taken to perform following steps to i successively:
Based on the global color B and the i-th enhancing coefficient c, the i-th misalignment H is obtained;
When the i is the N, the misalignment of described first image is obtained.
Further, the second obtaining unit 3, is specifically additionally operable to:
By the global color B and the i-th enhancing coefficient c, formula is substituted into:H=B (1-1/c), is calculated, is entered
And obtain the i-th misalignment H.
Finally, the 3rd obtaining unit 4, specifically for:
1 to N is taken to perform following steps to i successively:
First color value I of the ith pixel point, the i-th enhancing coefficient c and the i-th misalignment H are substituted into public
Formula:
L=c (I-H), is calculated, and then obtains the new first color value L of the ith pixel point;
When i is N, new first color value of at least one pixel is obtained.
Because the embodiment of the present application one and embodiment two belong to a total inventive concept, therefore part is not repeated here just not
Repeat one by one again.
In the technical scheme of the application, after the first image is obtained, at least one of described first image is obtained first
First color value of pixel, then calculates and obtains the misalignment of described first image and need to carry out described first image
The enhancing coefficient of processing, is next based on the first color value, the misalignment and the enhancing of at least one pixel
Coefficient, obtains new first color value of at least one pixel, is finally based on new first color of at least one pixel
Value, obtains the first optimization image corresponding with described first image, wherein, the second contrast of the first optimization image is more than
First contrast of described first image, thus solve prior art presence how to improve the skill of the too low image of contrast
Art problem, realizes and at least one pixel in the first image is handled by above-mentioned algorithm, so as to obtain higher
First optimization image of contrast, improves the technique effect of picture quality.
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method, system or computer program
Product.Therefore, the present invention can be using the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware
Apply the form of example.Moreover, the present invention can be used in one or more computers for wherein including computer usable program code
The computer program production that usable storage medium is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.)
The form of product.
The present invention is the flow with reference to method according to embodiments of the present invention, equipment (system) and computer program product
Figure and/or block diagram are described.It should be understood that can be by every first-class in computer program instructions implementation process figure and/or block diagram
Journey and/or the flow in square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided
The processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce
A raw machine so that produced by the instruction of computer or the computing device of other programmable data processing devices for real
The device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which is produced, to be included referring to
Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or
The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that in meter
Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, thus in computer or
The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one
The step of function of being specified in individual square frame or multiple square frames.
Specifically, the corresponding computer program instructions of information processing method in the embodiment of the present application can be stored in
On CD, hard disk, the storage medium such as USB flash disk, when computer program instructions quilt corresponding with information processing method in storage medium
When one electronic equipment reads or is performed, comprise the following steps:
The first image is obtained, the first contrast of described first image is less than a threshold value;
Obtain the global color B of described first image;
The first color value of at least one pixel of described first image is obtained, first color value is by the first color
The value composition of each Color Channel in space;
First color of at least one pixel of global color B and described first image based on described first image
Value, calculates the enhancing coefficient for obtaining the misalignment of described first image and needing to handle described first image;
The first color value, the misalignment and the enhancing coefficient based at least one pixel, are obtained extremely
New first color value of a few pixel;
New first color value based at least one pixel, obtains the first optimization corresponding with described first image
Image, wherein, the second contrast of the first optimization image is more than the first contrast of described first image.
Optionally, what is stored in the storage medium obtains the global color B of described first image, corresponding meter with step
The instruction of calculation machine specifically includes following steps during specific be performed:
Obtain by described first image the second color space different from first color space the second color value;
First is carried out for second color value to convert, and obtains second color value in first color space pair
The global color B answered.
Optionally, when at least one described pixel is specially N number of pixel, N is positive integer, in the storage medium
What is stored obtains the enhancing coefficient for needing to handle described first image with step, and corresponding computer instruction is in specifically quilt
In implementation procedure, following steps are specifically included:
1 to N is taken to perform following steps to i successively:
The first color value for obtaining ith pixel point is combined with the i-th ratio of the global color B;
It is the described i-th enhancing coefficient c to determine the minimum value in the i-th ratio combination;
When the i is the N, the enhancing coefficient of described first image is obtained.
Optionally, what is stored in the storage medium calculates the misalignment for obtaining described first image, correspondence with step
Computer instruction during specific be performed, specifically include following steps:
1 to N is taken to perform following steps to i successively:
Based on the global color B and the i-th enhancing coefficient c, the i-th misalignment H is obtained;
When the i is the N, the misalignment of described first image is obtained.
Optionally, what is stored in the storage medium is based on the global color B and the i-th enhancing coefficient c with step,
The i-th misalignment H is obtained, corresponding computer instruction specifically includes following steps during specific be performed:
By the global color B and the i-th enhancing coefficient c, formula is substituted into:H=B (1-1/c), is calculated, is entered
And obtain the i-th misalignment H.
Optionally, stored in the storage medium with first color value of the step based at least one pixel,
The misalignment and the enhancing coefficient, obtain new first color value of at least one pixel, corresponding computer instruction
During specific be performed, following steps are specifically included:
1 to N is taken to perform following steps to i successively:
First color value I of the ith pixel point, the i-th enhancing coefficient c and the i-th misalignment H are substituted into public
Formula:
L=c (I-H), is calculated, and then obtains the new rgb value L of the ith pixel point;
When i is N, new first color value of at least one pixel is obtained.
Obviously, those skilled in the art can carry out the essence of various changes and modification without departing from the present invention to the present invention
God and scope.So, if these modifications and variations of the present invention belong to the scope of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to comprising including these changes and modification.
Claims (12)
1. a kind of information processing method, applied to an electronic equipment, methods described includes:
The first image is obtained, the first contrast of described first image is less than a threshold value;
Obtain the global color B of described first image;
The first color value of at least one pixel of described first image is obtained, first color value is by the first color space
Each Color Channel value composition;
First color value of at least one pixel of global color B and described first image based on described first image, meter
Calculate the enhancing coefficient for obtaining the misalignment of described first image and needing to handle described first image;
The first color value, the misalignment and the enhancing coefficient based at least one pixel, obtain at least one
New first color value of individual pixel;
New first color value based at least one pixel, obtains the first optimization figure corresponding with described first image
Picture, wherein, the second contrast of the first optimization image is more than the first contrast of described first image.
2. the method as described in claim 1, it is characterised in that the global color B of the acquisition described first image, specifically
For:
Obtain by described first image the second color space different from first color space the second color value;
First is carried out for second color value to convert, and obtains second color value corresponding in first color space
The global color B.
3. method as claimed in claim 2, it is characterised in that when at least one described pixel is specially N number of pixel,
N is positive integer, and the acquisition needs the enhancing coefficient handled described first image, is specially:
1 to N is taken to perform following steps to i successively:
The first color value for obtaining ith pixel point is combined with the i-th ratio of the global color B;
It is the described i-th enhancing coefficient c to determine the minimum value in the i-th ratio combination;
When the i is the N, the enhancing coefficient of described first image is obtained.
4. method as claimed in claim 3, it is characterised in that the calculating obtains the misalignment of described first image, tool
Body is:
1 to N is taken to perform following steps to i successively:
Based on the global color B and the i-th enhancing coefficient c, the i-th misalignment H is obtained;
When the i is the N, the misalignment of described first image is obtained.
5. method as claimed in claim 4, it is characterised in that described to be based on the global color B and the i-th enhancing coefficient
C, obtains the i-th misalignment H, is specially:
By the global color B and the i-th enhancing coefficient c, formula is substituted into:H=B (1-1/c), is calculated, and then obtain
Obtain the i-th misalignment H.
6. method as claimed in claim 5, it is characterised in that first color based at least one pixel
Value, the misalignment and the enhancing coefficient, obtain new first color value of at least one pixel, are specially:
1 to N is taken to perform following steps to i successively:
First color value I of the ith pixel point, the i-th enhancing coefficient c and the i-th misalignment H are substituted into formula:
L=c (I-H), is calculated, and then obtains the new first color value L of the ith pixel point;
When i is N, new first color value of at least one pixel is obtained.
7. a kind of electronic equipment, including:
Image acquiring unit, for obtaining the first image, the first contrast of described first image is less than a threshold value;
First obtains unit, the first color value of at least one pixel for obtaining described first image, first face
Colour is made up of the value of each Color Channel of the first color space;
5th obtaining unit, for after the first image of the acquisition, obtaining the global color B of described first image;
Second obtaining unit, for global color B and at least one pixel of described first image based on described first image
First color value of point, calculates the increasing for obtaining the misalignment of described first image and needing to handle described first image
Strong coefficient;
3rd obtaining unit, for the first color value based at least one pixel, the misalignment and the increasing
Strong coefficient, obtains new first color value of at least one pixel;
4th obtaining unit, for new first color value based at least one pixel, is obtained and described first image
Corresponding first optimization image, wherein, the second contrast of the first optimization image is more than the first couple of described first image
Degree of ratio.
8. electronic equipment as claimed in claim 7, it is characterised in that the 5th obtaining unit, specifically for:
Obtain by described first image the second color space different from the first color space the second color value;
First is carried out for second color value to convert, and obtains second color value corresponding in first color space
The global color B.
9. electronic equipment as claimed in claim 8, it is characterised in that when at least one described pixel is specially N number of pixel
Point when, N is positive integer, second obtaining unit specifically for:
1 to N is taken to perform following steps to i successively:
The first color value for obtaining ith pixel point is combined with the i-th ratio of the global color B;
It is the described i-th enhancing coefficient c to determine the minimum value in the i-th ratio combination;
When the i is the N, the enhancing coefficient of described first image is obtained.
10. electronic equipment as claimed in claim 9, it is characterised in that second obtaining unit is specifically additionally operable to:
1 to N is taken to perform following steps to i successively:
Based on the global color B and the i-th enhancing coefficient c, the i-th misalignment H is obtained;
When the i is the N, the misalignment of described first image is obtained.
11. electronic equipment as claimed in claim 10, it is characterised in that second obtaining unit, specifically for:
By the global color B and the i-th enhancing coefficient c, formula is substituted into:H=B (1-1/c), is calculated, and then obtain
Obtain the i-th misalignment H.
12. electronic equipment as claimed in claim 11, it is characterised in that the 3rd obtaining unit, specifically for:
1 to N is taken to perform following steps to i successively:
First color value I of the ith pixel point, the i-th enhancing coefficient c and the i-th misalignment H are substituted into formula:
L=c (I-H), is calculated, and then obtains the new first color value L of the ith pixel point;
When i is N, new first color value of at least one pixel is obtained.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410117484.8A CN104954767B (en) | 2014-03-26 | 2014-03-26 | A kind of information processing method and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410117484.8A CN104954767B (en) | 2014-03-26 | 2014-03-26 | A kind of information processing method and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104954767A CN104954767A (en) | 2015-09-30 |
CN104954767B true CN104954767B (en) | 2017-08-29 |
Family
ID=54169066
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410117484.8A Active CN104954767B (en) | 2014-03-26 | 2014-03-26 | A kind of information processing method and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104954767B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105791783B (en) * | 2016-03-10 | 2018-11-02 | 广州视睿电子科技有限公司 | Camera imaging color adjustment method and system |
CN111080535A (en) * | 2019-11-05 | 2020-04-28 | 浙江大华技术股份有限公司 | Image enhancement method and computer storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2003101119A1 (en) * | 2002-05-24 | 2003-12-04 | Nikon Corporation | Image processing method, image processing program, image processor |
CN102568383A (en) * | 2012-02-14 | 2012-07-11 | 天津七一二通信广播有限公司 | Method for improving nonuniformity of brightness of OLED (organic light-emitting diode) display panel |
CN102982514A (en) * | 2012-12-10 | 2013-03-20 | 河海大学常州校区 | Underwater color image enhancement method integrating dark primary and white balance |
CN103281544A (en) * | 2008-09-30 | 2013-09-04 | 英特尔公司 | Joint enhancement of lightness, color and contrast of images and video |
CN103440623A (en) * | 2013-08-02 | 2013-12-11 | 中北大学 | Method for improving image definition in foggy days based on imaging model |
US9232203B2 (en) * | 2007-07-13 | 2016-01-05 | Intel Corporation | Image processing device, imaging device, image processing method, imaging method, and image processing program for pseudo-color supression in an image |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101742340B (en) * | 2010-02-08 | 2012-05-30 | 腾讯科技(深圳)有限公司 | Method and device for optimizing and editing image |
-
2014
- 2014-03-26 CN CN201410117484.8A patent/CN104954767B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2003101119A1 (en) * | 2002-05-24 | 2003-12-04 | Nikon Corporation | Image processing method, image processing program, image processor |
US9232203B2 (en) * | 2007-07-13 | 2016-01-05 | Intel Corporation | Image processing device, imaging device, image processing method, imaging method, and image processing program for pseudo-color supression in an image |
CN103281544A (en) * | 2008-09-30 | 2013-09-04 | 英特尔公司 | Joint enhancement of lightness, color and contrast of images and video |
CN102568383A (en) * | 2012-02-14 | 2012-07-11 | 天津七一二通信广播有限公司 | Method for improving nonuniformity of brightness of OLED (organic light-emitting diode) display panel |
CN102982514A (en) * | 2012-12-10 | 2013-03-20 | 河海大学常州校区 | Underwater color image enhancement method integrating dark primary and white balance |
CN103440623A (en) * | 2013-08-02 | 2013-12-11 | 中北大学 | Method for improving image definition in foggy days based on imaging model |
Also Published As
Publication number | Publication date |
---|---|
CN104954767A (en) | 2015-09-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11455516B2 (en) | Image lighting methods and apparatuses, electronic devices, and storage media | |
CN105432069B (en) | Image processing apparatus, photographic device, image processing method and program | |
US11082677B2 (en) | White balance processing method and apparatus | |
CN103440674B (en) | A kind of rapid generation of digital picture wax crayon specially good effect | |
CN105430376B (en) | A kind of detection method and device of panorama camera uniformity | |
CN105122793B (en) | Image processing device, image capture device, and image processing program | |
CN107509031A (en) | Image processing method, device, mobile terminal and computer-readable recording medium | |
CN109191403A (en) | Image processing method and device, electronic equipment, computer readable storage medium | |
CN104853172B (en) | A kind of information processing method and a kind of electronic equipment | |
CN109686342B (en) | Image processing method and device | |
CN105681775A (en) | White balance method and device | |
CN111292246A (en) | Image color correction method, storage medium, and endoscope | |
CN108024105A (en) | Image color adjusting method, device, electronic equipment and storage medium | |
CN109003231A (en) | A kind of image enchancing method, device and display equipment | |
CN103745430A (en) | Rapid beautifying method of digital image | |
US20230074060A1 (en) | Artificial-intelligence-based image processing method and apparatus, electronic device, computer-readable storage medium, and computer program product | |
CN109242794A (en) | Image processing method, device, electronic equipment and computer readable storage medium | |
CN104954767B (en) | A kind of information processing method and electronic equipment | |
CN104811622B (en) | Image color implantation method and device | |
CN106454109A (en) | Photo forming method based on single-camera module, and single-camera module | |
CN105893578A (en) | Method and device for selecting photos | |
Buzzelli et al. | Consensus-driven illuminant estimation with GANs | |
CN108132935B (en) | Image classification method and image display method | |
CN105991937A (en) | Virtual exposure method and device based on Bayer format image | |
CN111435986B (en) | Method for acquiring source image database, training device and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |