CN105957037A - Image enhancing method and image enhancing device - Google Patents

Image enhancing method and image enhancing device Download PDF

Info

Publication number
CN105957037A
CN105957037A CN201610302827.7A CN201610302827A CN105957037A CN 105957037 A CN105957037 A CN 105957037A CN 201610302827 A CN201610302827 A CN 201610302827A CN 105957037 A CN105957037 A CN 105957037A
Authority
CN
China
Prior art keywords
gray value
color channel
target image
value
pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610302827.7A
Other languages
Chinese (zh)
Other versions
CN105957037B (en
Inventor
杨松
李明浩
陈志军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201610302827.7A priority Critical patent/CN105957037B/en
Publication of CN105957037A publication Critical patent/CN105957037A/en
Application granted granted Critical
Publication of CN105957037B publication Critical patent/CN105957037B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • G06T5/92Dynamic range modification of images or parts thereof based on global image properties
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20172Image enhancement details
    • G06T2207/20208High dynamic range [HDR] image processing

Landscapes

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

Abstract

The invention discloses an image enhancing method and an image enhancing device, and belongs to the technical field of image processing. The image enhancing method comprises the following steps: for each color channel, determining a first gray value and a second gray value which are different according to the gray value of the color channel of each pixel in a target image; setting a mapping function corresponding to the color channel using the first gray value and the second gray value; and using the mapping function to adjust the gray value of the color channel of each pixel in the target image, wherein the variance of the gray value of the color channel of the target image after adjustment is greater than the variance of the gray value of the color channel of the target image before adjustment. The technical problem in the related technologies that the image enhancement effect is poor is solved, and the effect of image enhancement is improved.

Description

Image enchancing method and device
Technical field
It relates to technical field of image processing, particularly to a kind of image enchancing method and device.
Background technology
Image enhaucament is the basic mode of the visual effect improving image, generally by strengthening the contrast of image Can enable a user to access more preferable visual effect.
General strengthen picture contrast is to utilize fixing mapping function to reflect the view data of image Penetrate so that in image, the brightness in the region that brightness is relatively low is brought to lower, and the region that in image, brightness is higher is bright Degree is brought to higher.
But the relatively low image overall brightness after treatment of overall brightness is lower, the image that overall brightness is higher Overall brightness is higher after treatment, and the visuality of image reduces on the contrary, and image enhancement effects is poor.
Summary of the invention
The disclosure provides a kind of image enchancing method and device.Described technical scheme is as follows:
First aspect according to disclosure embodiment, it is provided that a kind of image enchancing method, described method includes: For each Color Channel, determine according to the gray value of the described Color Channel of each pixel in target image The first gray value that value is different and the second gray value;Utilize described first gray value and described second gray value The mapping function corresponding with described Color Channel is set;Utilize described mapping function to each in described target image The gray value of the described Color Channel of individual pixel is adjusted, the described color of the described target image after adjustment The variance of the gray value of passage is more than the side of the gray value of the described Color Channel of the described target image before adjusting Difference;By each Color Channel being carried out individual processing, generate and the mapping letter corresponding to each Color Channel Number, utilizes this mapping function to be adjusted the gray value of this Color Channel of each pixel in target image, The variance making the gray value of this Color Channel after adjusting is more than the gray value of this Color Channel before adjusting Variance, enhances the contrast of target image, and the technology of image enhancement effects difference in correlation technique that solves is asked Topic, improves image enhancement effects.
Optionally, described determining according to the gray value of the described Color Channel of each pixel in target image takes It is worth the first different gray values and the second gray value, including: described in each pixel in described target image The gray value of Color Channel is ranked up from high to low;The gray value of the first predetermined ratio before after sorting Average is as described first gray value;Using the average of the gray value of rear second predetermined ratio after sequence as institute State the second gray value;By the gray value of each Color Channel of each pixel is ranked up from high to low, Before after sorting, the average of the gray value of the first predetermined ratio is as the first gray value so that the first gray value The pixel that in this Color Channel, gray value is higher can be represented;Gray scale by rear second predetermined ratio after sequence The average of value is as the second gray value so that it is relatively low that the second gray value can represent gray value in this Color Channel Pixel.
Optionally, described determining according to the gray value of the described Color Channel of each pixel in target image takes It is worth the first different gray values and the second gray value, including: described in each pixel in described target image The gray value of Color Channel is ranked up from high to low;Using the n-th gray value as described first gray value, Using m-th gray value as described second gray value, wherein, n < m;By by each picture in target image The gray value of each Color Channel of element is ranked up, from high to low using the n-th gray value as the first gray scale Value, using m-th gray value as the second gray value so that the first gray value can represent in this Color Channel The pixel that gray value is higher, the second gray value can represent the pixel that in this Color Channel, gray value is relatively low.
Optionally, described mapping function P (x) is:
Wherein, x is the gray value of the described Color Channel of pixel in described target image, and N is described second ash Angle value, M is described first gray value,A is less than described second gray value, and b is more than described the One gray value;By utilizing mapping function to the gray value of the corresponding color passage of each pixel in target image It is adjusted, strengthens the difference between different gray values in each Color Channel, to realize target image pair Enhancing than degree.
Optionally, described a is 0, and described b is 255.
Optionally, described determining according to the gray value of the described Color Channel of each pixel in target image takes It is worth the first different gray values and the second gray value, including: described target image is carried out down-sampled, according to In described target image after down-sampled, the gray value of the described Color Channel of each pixel determines that value is different The first gray value and the second gray value;Owing to the gray value of each Color Channel of the image after down-sampled is equal Represent the average gray value of this Color Channel of down-sampled front corresponding region, therefore can be according to after down-sampled In the target image of image, the gray value of the described Color Channel of each pixel determines the first ash that value is different Angle value and the second gray value, and decrease the workload that the gray value to each Color Channel is ranked up.
Optionally, described method also includes: when described target image is not carried out the image of gray proces Time, described Color Channel includes red channel, green channel and blue channel;When described target image is quilt When carrying out the image of gray proces, described Color Channel only comprises a kind of Color Channel.
Second aspect according to disclosure embodiment, it is provided that a kind of image intensifier device, described device includes: Determine module, be configured to for each Color Channel, according to the described color of each pixel in target image The gray value of passage determines the first gray value and the second gray value that value is different;Module is set, is configured For utilizing described first gray value to arrange the mapping letter corresponding with described Color Channel with described second gray value Number;Adjusting module, is configured to, with described mapping function to described in each pixel in described target image The gray value of Color Channel is adjusted, the gray value of the described Color Channel of the described target image after adjustment Variance more than the variance of gray value of the described Color Channel of the described target image before adjusting.
Alternatively, described determine module, including: the first sorting sub-module, it is configured to described target figure In Xiang, the gray value of the described Color Channel of each pixel is ranked up from high to low;First arranges submodule, Before after being configured to sort, the average of the gray value of the first predetermined ratio is as described first gray value;The Two arrange submodule, and the average of the gray value of rear second predetermined ratio after being configured to sequence is as described Second gray value.
Alternatively, described determine module, also include: the 3rd arranges submodule, be configured to the n-th ash Angle value is as described first gray value, using m-th gray value as described second gray value, wherein, n < m.
Alternatively, described mapping function P (x) is:
Wherein, x is the gray value of the described Color Channel of pixel in described target image, and N is described second ash Angle value, M is described first gray value,A is less than described second gray value, and b is more than described the One gray value.
Alternatively, described a is 0, and described b is 255.
Alternatively, described determine module, be additionally configured to carry out down-sampled to described target image, according to fall In described target image after sampling, the gray value of the described Color Channel of each pixel determines that value is different First gray value and the second gray value.
Alternatively, when described target image is not carried out the image of gray proces, described Color Channel Including red channel, green channel and blue channel;When described target image is to be carried out gray proces During image, described Color Channel only comprises a kind of Color Channel.
The third aspect according to disclosure embodiment, it is provided that a kind of image intensifier device, described device includes: Processor;For storing the memorizer of described processor executable;Wherein, described processor is configured For: for each Color Channel, true according to the gray value of the described Color Channel of each pixel in target image Make the first different gray value of value and the second gray value;Utilize described first gray value and described second ash Angle value arranges the mapping function corresponding with described Color Channel;Utilize described mapping function to described target image In the gray value of described Color Channel of each pixel be adjusted, the described target image after adjustment described The variance of the gray value of Color Channel is more than the gray value of the described Color Channel of the described target image before adjusting Variance.
It should be appreciated that it is only exemplary that above general description and details hereinafter describe, can not Limit the disclosure.
Accompanying drawing explanation
Accompanying drawing herein is merged in description and constitutes the part of this specification, it is shown that meet the disclosure Embodiment, and in description together for explaining the principle of the disclosure.
Fig. 1 is the flow chart according to a kind of image enchancing method shown in an exemplary embodiment;
Fig. 2 A is the flow chart according to a kind of image enchancing method shown in another exemplary embodiment;
Fig. 2 B be according to the one shown in an exemplary embodiment, target image is carried out image enhaucament before and strengthen After effect contrast figure;
Fig. 3 is the block diagram according to a kind of image intensifier device shown in an exemplary embodiment;
Fig. 4 is the block diagram according to a kind of image intensifier device shown in another exemplary embodiment;
Fig. 5 is the block diagram according to a kind of device for image enhaucament shown in an exemplary embodiment.
Detailed description of the invention
Here will illustrate exemplary embodiment in detail, its example represents in the accompanying drawings.Following retouches Stating when relating to accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represents same or analogous key element. Embodiment described in following exemplary embodiment does not represent all embodiment party consistent with the disclosure Formula.On the contrary, they only with describe in detail in appended claims, the disclosure some in terms of mutually one The example of the apparatus and method caused.
Fig. 1 is the flow chart according to a kind of image enchancing method shown in an exemplary embodiment, and this image increases Strong method can include following several step.
In step 101, for each Color Channel, according to this Color Channel of each pixel in target image Gray value determine the first gray value and the second gray value that value is different.
In step 102, utilize the first gray value and the second gray value that the mapping corresponding with this Color Channel is set Function.
In step 103, utilize mapping function to the gray value of this Color Channel of each pixel in target image Being adjusted, the variance of the gray value of this Color Channel of the target image after adjustment is more than the target before adjusting The variance of the gray value of this Color Channel of image.
In sum, the image enchancing method provided in disclosure embodiment, by entering each Color Channel Row individual processing, generates and the mapping function corresponding to each Color Channel, utilizes this mapping function to target In image, the gray value of this Color Channel of each pixel is adjusted so that this Color Channel after adjustment The variance of gray value, more than the variance of the gray value of this Color Channel before adjusting, enhances the right of target image Ratio degree, solves the technical problem of image enhancement effects difference in correlation technique, improves image enhancement effects.
Each image has one or more Color Channel.When this target image was not for be carried out gray proces Image time, the Color Channel of this target image includes red channel, green channel and blue channel.When this When target image is to be carried out the image of gray proces, the Color Channel of this target image only comprises a kind of face Chrominance channel, and this Color Channel is white channel.The disclosure when target image is carried out image enhancement processing, Each Color Channel for this image individually processes.
Fig. 2 A is the flow chart according to a kind of image enchancing method shown in another exemplary embodiment, this image Enhancement Method can include following several step.
In step 201, for each Color Channel, by this Color Channel of each pixel in target image Gray value is ranked up from high to low.
Generally, the color gone out shown by each pixel in image is the color in all passages of this pixel Superposition generates, and can generate various colors by changing the gray value of each Color Channel.Here institute The gray value said is used to indicate that the brightness of this color, namely this gradation of color.
In general, gray value is quantified as 256 gray levels, and the span of gray value is 0~255, Representing the brightness of this color from low to high, color is from shallow to deep.Such as, the redness of white pixel is shown The gray value of passage is 255, and the gray value of green channel is 255, and the gray value of blue channel is 255.Again Such as, the gray value of the red channel of the display pixel in black is 0, and the gray value of green channel is 0, blue The gray value of chrominance channel is 0;For another example, the gray value of the red channel of the pixel that display takes on a red color is 255, The gray value of green channel is 0, and the gray value of blue channel is 0.
In this step, the gray value of each Color Channel of each pixel in target image is carried out from high to low Sequence, in order to subsequent process therefrom determines the first gray value and the second gray value according to clooating sequence.
In step 202, will after sequence before the average of gray value of the first predetermined ratio as the first gray value, Using the average of the gray value of rear second predetermined ratio after sequence as the second gray value.
The concrete numerical value of the first predetermined ratio and the second predetermined ratio is not especially limited by the present embodiment, can root Determine according to practical situation.It should be noted is that, the first predetermined ratio and the second predetermined ratio can be phase Same numerical value, it is possible to for the numerical value differed.Additionally, the first gray value is typically larger than the second gray value.
For example, the first predetermined ratio and the second predetermined ratio are 10, then calculate sequence front The average of the gray value in 10 is 230, then the first gray value is set to 230, calculates sequence in position, end The average of the gray value in 10 is 15, then the second gray value is for being set to 15.
In step 203, using the n-th gray value as the first gray value, using m-th gray value as Two gray values, wherein, n < m.
The concrete numerical value of m and n is not construed as limiting by the present embodiment, can determine according to practical situation.Such as, when When having 400 pixels in this image, n can be set to 5, m is set to 395;For another example, when this picture When having 800 pixels in element, n is set to 20, m is set to 780.
It should be noted is that, varied to the value mode of the first gray value and the second gray value, but Follow the first gray value can to represent in target image gray value in this Color Channel higher when carrying out value Pixel, the second gray value can represent the principle of the pixel that gray value is relatively low in target image this Color Channel interior.
In step 204, utilize the first gray value and the second gray value that the mapping corresponding with this Color Channel is set Function, utilizes mapping function to be adjusted the gray value of this Color Channel of each pixel in target image.
Wherein, mapping function P (x) is:
p ( x ) = a 0 &le; x < N ( - 2 t 3 + 3 t 2 ) * b N &le; x &le; M b M < x &le; 255
Wherein, x is the gray value of the described Color Channel of pixel in target image, and N is the second gray value, M It is the first gray value,A is less than the second gray value, and b is more than the first gray value.
In general, the picture that in the second gray value can represent target image, in this Color Channel, gray value is relatively low Element.In order to increase the contrast of this Color Channel of image, the gray value of this Color Channel is less than the second gray scale When the gray value of the pixel of value is adjusted, adjust unified for the gray value of these pixels to a, a less than second Gray value.Preferably, a is 0, also the gray value of these pixels will directly be adjusted to minimum 0.
Equally, the pixel that in the first gray value can represent target image, in this Color Channel, gray value is higher. In order to increase the contrast of this Color Channel of image, the gray value of this Color Channel is higher than the first gray value When the gray value of pixel is adjusted, adjust unified for the gray value of these pixels to b, b more than the first gray scale Value.Preferably, b is 255, also will the gray value of these pixels directly be adjusted to the highest by 255.
For gray value pixel between the first gray value and the second gray value, its gray value is being adjusted The difference between different gray value is strengthened time whole.For example, a is 0, and b is 255, the first gray value N Being 25, the second gray value is 15.The gray value of pixel A is 16, and the gray value of pixel B is 18, then adjust The gray value of the pixel A after whole is 51, and the gray value of the pixel B after adjustment is 153.Adjust preceding pixel A With adjust preceding pixel B difference be 1, after adjustment pixel A with adjust after pixel B difference be 102.
The most for example, a is 0, and b is 255, and the first gray value N is 240, and the second gray value is 235. The gray value of pixel A is 236, and the gray value of pixel B is 238, then the gray value of the pixel A after adjusting Being 51, the gray value of the pixel B after adjustment is 153.Adjust preceding pixel A and the difference adjusting preceding pixel B Be 1, after adjustment pixel A with adjust after pixel B difference be 102.
As can be seen here, before the variance of the gray value of this Color Channel of the target image after adjustment is more than adjusting The variance of the gray value of this Color Channel of target image.
It should be noted is that, after each Color Channel of target image is respectively processed, image Contrast strengthen, enhance visuality.Fig. 2 B is to target according to the one shown in an exemplary embodiment Image carries out before image enhaucament and enhanced effect contrast figure, if Fig. 2 B (1) is not carry out image enhaucament One target image, is carried out this target image shown in the design sketch such as Fig. 2 B (2) after image enhaucament.
In sum, the image enchancing method provided in disclosure embodiment, by entering each Color Channel Row individual processing, generates and the mapping function corresponding to each Color Channel, utilizes this mapping function to target In image, the gray value of this Color Channel of each pixel is adjusted so that this Color Channel after adjustment The variance of gray value, more than the variance of the gray value of this Color Channel before adjusting, enhances the right of target image Ratio degree, solves the technical problem of image enhancement effects difference in correlation technique, improves image enhancement effects.
It addition, by the gray value of each Color Channel of each pixel is ranked up from high to low, will row The average of the gray value of front first predetermined ratio after sequence is as the first gray value so that the first gray value can Represent the pixel that in this Color Channel, gray value is higher;By the gray value of rear second predetermined ratio after sequence Average is as the second gray value so that the second gray value can represent the picture that in this Color Channel, gray value is relatively low Element.
It addition, by the gray value of each Color Channel of each pixel in target image is carried out from high to low Sequence, using the n-th gray value as the first gray value, using m-th gray value as the second gray value, makes Obtaining the first gray value and can represent the pixel that in this Color Channel, gray value is higher, the second gray value can represent The pixel that in this Color Channel, gray value is relatively low.
It addition, by utilizing mapping function to the gray value of the corresponding color passage of each pixel in target image It is adjusted, strengthens the difference between different gray values in each Color Channel, to realize target image pair Enhancing than degree.
It addition, down-sampled obtain reference picture, to each pixel in reference picture by target image is carried out The gray value of each Color Channel be ranked up from high to low, the less gray value to Color Channel is carried out The workload of sequence.
It addition, the image enchancing method that the present embodiment provides is applied widely, improve image enchancing method Versatility.
Alternatively, in order to improve the efficiency of image enhaucament, determining that the first gray value and the second gray value also may be used To obtain in the following manner: target image is carried out down-sampled, according to each in the target image after down-sampled The gray value of this Color Channel of individual pixel determines the first gray value and the second gray value that value is different.
Owing to the gray value of each Color Channel of the image after down-sampled all represents down-sampled front corresponding region The average gray value of this Color Channel, the most down-sampled after the feature of this Color Channel still can represent The feature of this Color Channel before down-sampled.
Concrete, refer to when determining the first gray value and the second gray value that value is different step 201 to Step 203, this repeats no more.
Following for disclosure device embodiment, may be used for performing method of disclosure embodiment.For the disclosure The details not disclosed in device embodiment, refer to method of disclosure embodiment.
Fig. 3 is the block diagram according to a kind of image intensifier device shown in an exemplary embodiment, this image enhaucament Device may include that and determines module 310, arranges module 320 and adjusting module 330.
Determine module 310, be configured to for each Color Channel, according in target image each pixel should The gray value of Color Channel determines the first gray value and the second gray value that value is different.
Module 320 is set, is configured to, with determining the first gray value that module 310 determines and determines mould The second gray value that block 310 is determined arranges the mapping function corresponding with this Color Channel;
Adjusting module 330, is configured to, with the mapping function arranging module 320 setting to each in target image The gray value of this Color Channel of individual pixel is adjusted, the ash of this Color Channel of the target image after adjustment The variance of angle value is more than the variance of the gray value of this Color Channel of the target image before adjusting.
In sum, the image intensifier device provided in disclosure embodiment, by entering each Color Channel Row individual processing, generates and the mapping function corresponding to each Color Channel, utilizes this mapping function to target In image, the gray value of this Color Channel of each pixel is adjusted so that this Color Channel after adjustment The variance of gray value, more than the variance of the gray value of this Color Channel before adjusting, enhances the right of target image Ratio degree, solves the technical problem of image enhancement effects difference in correlation technique, improves image enhancement effects.
Fig. 4 is the block diagram according to a kind of image intensifier device shown in another exemplary embodiment, and this image increases Intensity device may include that and determines module 410, arranges module 420 and adjusting module 430.
Determine module 410, be configured to for each Color Channel, according in target image each pixel should The gray value of Color Channel determines the first gray value and the second gray value that value is different.
Generally, the color gone out shown by each pixel in image is the color in all passages of this pixel Superposition generates, and can generate various colors by changing the gray value of each Color Channel.Here institute The gray value said is used to indicate that the brightness of this color, namely this gradation of color.In general, will Gray value is quantified as 256 gray levels, and the span of gray value is 0~255, represents the brightness of this color From low to high, color is from shallow to deep.
Module 420 is set, is configured to, with determining the first gray value that module 410 determines and determines mould The second gray value that block 410 is determined arranges the mapping function corresponding with this Color Channel;
Adjusting module 430, is configured to, with the mapping function arranging module 420 setting to each in target image The gray value of this Color Channel of individual pixel is adjusted, the ash of this Color Channel of the target image after adjustment The variance of angle value is more than the variance of the gray value of this Color Channel of the target image before adjusting.
In general, the picture that in the second gray value can represent target image, in this Color Channel, gray value is relatively low Element.In order to increase the contrast of this Color Channel of image, the gray value of this Color Channel is less than the second gray scale When the gray value of the pixel of value is adjusted, adjust unified for the gray value of these pixels to a, a less than second Gray value.Preferably, a is 0, also the gray value of these pixels will directly be adjusted to minimum 0.
Equally, the pixel that in the first gray value can represent target image, in this Color Channel, gray value is higher. In order to increase the contrast of this Color Channel of image, the gray value of this Color Channel is higher than the first gray value When the gray value of pixel is adjusted, adjust unified for the gray value of these pixels to b, b more than the first gray scale Value.Preferably, b is 255, also will the gray value of these pixels directly be adjusted to the highest by 255.
For gray value pixel between the first gray value and the second gray value, its gray value is being adjusted The difference between different gray value is strengthened time whole.
Optionally it is determined that module 410, including: the first sorting sub-module 410a, first submodule 410b is set Submodule 410c is set with second.
First sorting sub-module 410a, is configured to the ash of this Color Channel of each pixel in target image Angle value is ranked up from high to low.
First arranges submodule 410b, is configured to before after the first sorting sub-module 410a sequence the The average of the gray value of one predetermined ratio is as the first gray value.
Second arranges submodule 410c, is configured to after after the first sorting sub-module 410a sequence the The average of the gray value of two predetermined ratios is as the second gray value.
The concrete numerical value of the first predetermined ratio and the second predetermined ratio is not especially limited by the present embodiment, can root Determine according to practical situation.It should be noted is that, the first predetermined ratio and the second predetermined ratio can be phase Same numerical value, it is possible to for the numerical value differed.Additionally, the first gray value is typically larger than the second gray value.
Optionally it is determined that module 410, also include: the 3rd arranges submodule 410d.
Alternatively, the 3rd arranges submodule 410d, is configured to the n-th gray value as the first gray value, Using m-th gray value as the second gray value, wherein, n < m.
The concrete numerical value of m and n is not construed as limiting by the present embodiment, can determine according to practical situation.
Optionally, mapping function P (x) is:
p ( x ) = a 0 &le; x < N ( - 2 t 3 + 3 t 2 ) * b N &le; x &le; M b M < x &le; 255
Wherein, x is the gray value of the Color Channel of pixel in target image, and N is the second gray value, and M is One gray value,A is less than the second gray value, and b is more than the first gray value.
Optionally, a is 0, and b is 255.
Optionally, determine module 410, be additionally configured to carry out down-sampled to target image, after down-sampled Target image in the gray value of this Color Channel of each pixel determine the first gray value that value is different and Second gray value.
Owing to the gray value of each Color Channel of the image after down-sampled all represents down-sampled front corresponding region The average gray value of this Color Channel, the most down-sampled after the feature of this Color Channel still can represent The feature of this Color Channel before down-sampled.
Optionally, when target image is not carried out the image of gray proces, above-mentioned Color Channel includes Red channel, green channel and blue channel;When target image is to be carried out the image of gray proces, Above-mentioned Color Channel only comprises a kind of Color Channel.
It should be noted is that, varied to the value mode of the first gray value and the second gray value, but Follow the first gray value can to represent in target image gray value in this Color Channel higher when carrying out value Pixel, the second gray value can represent the principle of the pixel that gray value is relatively low in target image this Color Channel interior.
In sum, the image intensifier device provided in disclosure embodiment, by entering each Color Channel Row individual processing, generates and the mapping function corresponding to each Color Channel, utilizes this mapping function to target In image, the gray value of this Color Channel of each pixel is adjusted so that this Color Channel after adjustment The variance of gray value, more than the variance of the gray value of this Color Channel before adjusting, enhances the right of target image Ratio degree, solves the technical problem of image enhancement effects difference in correlation technique, improves image enhancement effects.
It addition, by the gray value of each Color Channel of each pixel is ranked up from high to low, will row The average of the gray value of front first predetermined ratio after sequence is as the first gray value so that the first gray value can Represent the pixel that in this Color Channel, gray value is higher;By the gray value of rear second predetermined ratio after sequence Average is as the second gray value so that the second gray value can represent the picture that in this Color Channel, gray value is relatively low Element.
It addition, by the gray value of each Color Channel of each pixel in target image is carried out from high to low Sequence, using the n-th gray value as the first gray value, using m-th gray value as the second gray value, makes Obtaining the first gray value and can represent the pixel that in this Color Channel, gray value is higher, the second gray value can represent The pixel that in this Color Channel, gray value is relatively low.
It addition, by utilizing mapping function to the gray value of the corresponding color passage of each pixel in target image It is adjusted, strengthens the difference between different gray values in each Color Channel, to realize target image pair Enhancing than degree.
It addition, down-sampled obtain reference picture, to each pixel in reference picture by target image is carried out The gray value of each Color Channel be ranked up from high to low, the less gray value to Color Channel is carried out The workload of sequence.
It addition, the image enchancing method that the present embodiment provides is applied widely, improve image enchancing method Versatility.
The disclosure one exemplary embodiment provides a kind of image intensifier device, it is possible to realize what the disclosure provided Image enchancing method, this image intensifier device includes: processor, for storing processor executable Memorizer;
Wherein, processor is configured to:
For each Color Channel, determine according to the gray value of this Color Channel of each pixel in target image Go out the first different gray value of value and the second gray value;
Utilize the first gray value and the second gray value that the mapping function corresponding with this Color Channel is set.
Utilize this mapping function that the gray value of this Color Channel of each pixel in target image is adjusted, The variance of the gray value of this Color Channel of the target image after adjustment is more than this face of the target image before adjusting The variance of the gray value of chrominance channel.
Fig. 5 is the block diagram according to a kind of device for image enhaucament shown in an exemplary embodiment.Such as, Device 500 can be mobile phone, computer, digital broadcast terminal, messaging devices, and game controls Platform, tablet device, armarium, body-building equipment, personal digital assistant etc..
With reference to Fig. 5, device 500 can include following one or more assembly: processes assembly 502, memorizer 504, power supply module 506, multimedia groupware 508, audio-frequency assembly 510, the interface of input/output (I/O) 512, sensor cluster 514, and communications component 516.
Process assembly 502 and generally control the integrated operation of device 500, such as with display, call, number The operation being associated according to communication, camera operation and record operation.Process assembly 502 and can include one or many Individual processor 520 performs instruction, to complete all or part of step of above-mentioned method.Additionally, process Assembly 502 can include one or more module, it is simple to process between assembly 502 and other assemblies is mutual. Such as, process assembly 502 and can include multi-media module, to facilitate multimedia groupware 508 and to process assembly Mutual between 502.
Memorizer 504 is configured to store various types of data to support the operation at device 500.These The example of data includes any application program for operating on device 500 or the instruction of method, contact person Data, telephone book data, message, picture, video etc..Memorizer 504 can be by any kind of volatile Property or non-volatile memory device or combinations thereof realize, such as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory EPROM (EPROM), Programmable read only memory (PROM), read only memory (ROM), magnetic memory, flash memory, Disk or CD.
The various assemblies that power supply module 506 is device 500 provide electric power.Power supply module 506 can include electricity Management system, one or more power supplys, and other generate, manage and distribute electric power phase with for device 500 The assembly of association.
The screen of one output interface of offer that multimedia groupware 508 is included between described device 500 and user Curtain.In certain embodiments, screen can include liquid crystal display (LCD) and touch panel (TP).As Really screen includes that touch panel, screen may be implemented as touch screen, to receive the input signal from user. Touch panel includes that one or more touch sensor is with the gesture on sensing touch, slip and touch panel. Described touch sensor can not only sense touch or the border of sliding action, but also detects and described touch Or slide relevant persistent period and pressure.In certain embodiments, multimedia groupware 508 includes one Individual front-facing camera and/or post-positioned pick-up head.When device 500 is in operator scheme, such as screening-mode or video During pattern, front-facing camera and/or post-positioned pick-up head can receive the multi-medium data of outside.Each preposition take the photograph As head and post-positioned pick-up head can be fixing optical lens systems or have focal length and optical zoom energy Power.
Audio-frequency assembly 510 is configured to output and/or input audio signal.Such as, audio-frequency assembly 510 includes One mike (MIC), when device 500 is in operator scheme, such as call model, logging mode and voice During recognition mode, mike is configured to receive external audio signal.The audio signal received can be entered One step is stored in memorizer 504 or sends via communications component 516.In certain embodiments, audio-frequency assembly 510 also include a speaker, are used for exporting audio signal.
I/O interface 512 provides interface, above-mentioned peripheral interface for processing between assembly 502 and peripheral interface module Module can be keyboard, puts striking wheel, button etc..These buttons may include but be not limited to: home button, sound Amount button, start button and locking press button.
Sensor cluster 514 includes one or more sensor, for providing various aspects for device 500 State estimation.Such as, what sensor cluster 514 can detect device 500 opens/closed mode, assembly Relative localization, the most described assembly is display and the keypad of device 500, and sensor cluster 514 is also Device 500 or the position change of 500 1 assemblies of device, user and depositing that device 500 contacts can be detected Or do not exist, device 500 orientation or acceleration/deceleration and the variations in temperature of device 500.Sensor cluster 514 Proximity transducer can be included, be configured to when there is no any physical contact depositing of object near detection ?.Sensor cluster 514 can also include optical sensor, such as CMOS or ccd image sensor, is used for Imaging applications uses.In certain embodiments, this sensor cluster 514 can also include that acceleration passes Sensor, gyro sensor, Magnetic Sensor, pressure transducer or temperature sensor.
Communications component 516 is configured to facilitate the logical of wired or wireless mode between device 500 and other equipment Letter.Device 500 can access wireless network based on communication standard, such as WiFi, 2G or 3G, or they Combination.In one exemplary embodiment, communications component 516 receives wide from outside via broadcast channel The broadcast singal of broadcast management system or broadcast related information.In one exemplary embodiment, described communication set Part 516 also includes near-field communication (NFC) module, to promote junction service.Such as, can in NFC module Based on RF identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra broadband (UWB) skill Art, bluetooth (BT) technology and other technologies realize.
In the exemplary embodiment, device 500 can by one or more application specific integrated circuits (ASIC), Digital signal processor (DSP), digital signal processing appts (DSPD), PLD (PLD), Field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are real Existing, it is used for performing image enhaucament said method.
In the exemplary embodiment, a kind of non-transitory computer-readable storage medium including instruction is additionally provided Matter, such as, include the memorizer 504 of instruction, and above-mentioned instruction can be performed by the processor 520 of device 500 with complete Become above-mentioned image enchancing method.Such as, described non-transitory computer-readable recording medium can be ROM, Random access memory (RAM), CD-ROM, tape, floppy disk and optical data storage devices etc..
A kind of non-transitory computer-readable recording medium, when the instruction in described storage medium is by device 500 Processor perform time so that device 500 is able to carry out the step shown in Fig. 1, Fig. 2 A.
Those skilled in the art, after considering description and putting into practice invention disclosed herein, will readily occur to these public affairs Other embodiment opened.The application is intended to any modification, purposes or the adaptations of the disclosure, These modification, purposes or adaptations are followed the general principle of the disclosure and include that the disclosure is not disclosed Common knowledge in the art or conventional techniques means.Description and embodiments is considered only as exemplary , the true scope of the disclosure and spirit are pointed out by claim below.
It should be appreciated that the disclosure is not limited to accurate knot described above and illustrated in the accompanying drawings Structure, and various modifications and changes can carried out without departing from the scope.The scope of the present disclosure is only by appended Claim limits.

Claims (15)

1. an image enchancing method, it is characterised in that described method includes:
For each Color Channel, true according to the gray value of the described Color Channel of each pixel in target image Make the first different gray value of value and the second gray value;
Utilize described first gray value that the mapping letter corresponding with described Color Channel is set with described second gray value Number;
Utilize described mapping function that the gray value of the described Color Channel of each pixel in described target image is entered Row sum-equal matrix, before the variance of the gray value of the described Color Channel of the described target image after adjustment is more than adjusting The variance of the gray value of the described Color Channel of described target image.
Method the most according to claim 1, it is characterised in that described according to each picture in target image The gray value of the described Color Channel of element determines the first gray value and the second gray value that value is different, including:
The gray value of the described Color Channel of each pixel in described target image is ranked up from high to low;
Before after sorting, the average of the gray value of the first predetermined ratio is as described first gray value;
Using the average of the gray value of rear second predetermined ratio after sequence as described second gray value.
Method the most according to claim 1, it is characterised in that described according to each picture in target image The gray value of the described Color Channel of element determines the first gray value and the second gray value that value is different, including:
The gray value of the described Color Channel of each pixel in described target image is ranked up from high to low;
Using the n-th gray value as described first gray value, using m-th gray value as described second gray scale Value, wherein, n < m.
Method the most according to claim 1, it is characterised in that
Described mapping function P (x) is:
p ( x ) = a 0 &le; x < N ( - 2 t 3 + 3 t 2 ) * b N &le; x &le; M b M < x &le; 255
Wherein, x is the gray value of the described Color Channel of pixel in described target image, and N is described second ash Angle value, M is described first gray value,A is less than described second gray value, and b is more than described the One gray value.
Method the most according to claim 4, it is characterised in that described a is 0, described b is 255.
Method the most according to claim 1, it is characterised in that described according to each picture in target image The gray value of the described Color Channel of element determines the first gray value and the second gray value that value is different, including:
Described target image is carried out down-sampled, according to each pixel in the described target image after down-sampled The gray value of described Color Channel determines the first gray value and the second gray value that value is different.
7. according to described method arbitrary in claim 1 to 6, it is characterised in that described method also includes:
When described target image is not carried out the image of gray proces, described Color Channel includes redness Passage, green channel and blue channel;
When described target image is to be carried out the image of gray proces, described Color Channel only comprises one Color Channel.
8. an image intensifier device, it is characterised in that described device includes:
Determine module, be configured to for each Color Channel, according to each pixel in target image The gray value of Color Channel determines the first gray value and the second gray value that value is different;
Module is set, is configured to, with described determining the first gray value that module determines and described determining mould The second gray value that block is determined arranges the mapping function corresponding with described Color Channel;
Adjusting module, is configured to, with the described mapping function of module setting that arranges in described target image The gray value of the described Color Channel of each pixel is adjusted, the described face of the described target image after adjustment The variance of the gray value of chrominance channel is more than the gray value of the described Color Channel of the described target image before adjusting Variance.
Device the most according to claim 8, it is characterised in that described determine module, including:
First sorting sub-module, is configured to the described Color Channel of each pixel in described target image Gray value is ranked up from high to low;
First arranges submodule, is configured to first pre-before after described first sorting sub-module sequence The average of the gray value of certainty ratio is as described first gray value;
Second arranges submodule, is configured to second pre-after after described first sorting sub-module sequence The average of the gray value of certainty ratio is as described second gray value.
Device the most according to claim 8, it is characterised in that described determine module, also includes:
3rd arranges submodule, is configured to the n-th gray value as described first gray value, by m Individual gray value is as described second gray value, wherein, n < m.
11. devices according to claim 8, it is characterised in that
Described mapping function P (x) is:
p ( x ) = a 0 &le; x < N ( - 2 t 3 + 3 t 2 ) * b N &le; x &le; M b M < x &le; 255
Wherein, x is the gray value of the described Color Channel of pixel in described target image, and N is described second ash Angle value, M is described first gray value,A is less than described second gray value, and b is more than described the One gray value.
12. devices according to claim 11, it is characterised in that described a is 0, described b is 255.
13. devices according to claim 8, it is characterised in that described determine module, are also configured For described target image is carried out down-sampled, according to the institute of each pixel in the described target image after down-sampled The gray value stating Color Channel determines the first gray value and the second gray value that value is different.
14. according to Claim 8 to described device arbitrary in 13, it is characterised in that when described target figure As for do not carried out the image of gray proces time, described Color Channel include red channel, green channel and Blue channel;When described target image is to be carried out the image of gray proces, described Color Channel only wraps Containing a kind of Color Channel.
15. 1 kinds of image intensifier devices, it is characterised in that described device includes:
Processor;
For storing the memorizer of described processor executable;
Wherein, described processor is configured to:
For each Color Channel, true according to the gray value of the described Color Channel of each pixel in target image Make the first different gray value of value and the second gray value;
Utilize described first gray value that the mapping letter corresponding with described Color Channel is set with described second gray value Number;
Utilize described mapping function that the gray value of the described Color Channel of each pixel in described target image is entered Row sum-equal matrix, before the variance of the gray value of the described Color Channel of the described target image after adjustment is more than adjusting The variance of the gray value of the described Color Channel of described target image.
CN201610302827.7A 2016-05-09 2016-05-09 Image enchancing method and device Active CN105957037B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610302827.7A CN105957037B (en) 2016-05-09 2016-05-09 Image enchancing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610302827.7A CN105957037B (en) 2016-05-09 2016-05-09 Image enchancing method and device

Publications (2)

Publication Number Publication Date
CN105957037A true CN105957037A (en) 2016-09-21
CN105957037B CN105957037B (en) 2018-11-06

Family

ID=56913910

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610302827.7A Active CN105957037B (en) 2016-05-09 2016-05-09 Image enchancing method and device

Country Status (1)

Country Link
CN (1) CN105957037B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107451972A (en) * 2017-07-31 2017-12-08 北京小米移动软件有限公司 Image enchancing method, device and computer-readable recording medium
CN107945163A (en) * 2017-11-23 2018-04-20 广州酷狗计算机科技有限公司 Image enchancing method and device
CN109309826A (en) * 2017-07-27 2019-02-05 Tcl集团股份有限公司 A kind of image color equalization methods and terminal
CN109557109A (en) * 2018-12-29 2019-04-02 中国肉类食品综合研究中心 Freeze the detection method and device of meat packed state
CN110580693A (en) * 2018-06-07 2019-12-17 湖南爱威医疗科技有限公司 Image processing method, image processing device, computer equipment and storage medium
CN116703741A (en) * 2022-09-27 2023-09-05 荣耀终端有限公司 Image contrast generation method and device and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101154270A (en) * 2006-09-30 2008-04-02 电子科技大学中山学院 License plate binaryzation method based on compensation principle and center section scanning
CN101877123A (en) * 2009-12-03 2010-11-03 北京中星微电子有限公司 Image enhancement method and device
US20100321520A1 (en) * 2006-05-11 2010-12-23 Texas Instruments Incorporated Digital camera and method
CN102307274A (en) * 2011-08-31 2012-01-04 南京南自信息技术有限公司 Motion detection method based on edge detection and frame difference
CN104574404A (en) * 2015-01-14 2015-04-29 宁波大学 Three-dimensional image relocation method
CN104992416A (en) * 2015-06-30 2015-10-21 小米科技有限责任公司 Image enhancement method and device, and intelligent equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100321520A1 (en) * 2006-05-11 2010-12-23 Texas Instruments Incorporated Digital camera and method
CN101154270A (en) * 2006-09-30 2008-04-02 电子科技大学中山学院 License plate binaryzation method based on compensation principle and center section scanning
CN101877123A (en) * 2009-12-03 2010-11-03 北京中星微电子有限公司 Image enhancement method and device
CN102307274A (en) * 2011-08-31 2012-01-04 南京南自信息技术有限公司 Motion detection method based on edge detection and frame difference
CN104574404A (en) * 2015-01-14 2015-04-29 宁波大学 Three-dimensional image relocation method
CN104992416A (en) * 2015-06-30 2015-10-21 小米科技有限责任公司 Image enhancement method and device, and intelligent equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
高彦平, 郑永果: "基于区域分割的分段线性变换", 《信息技术与信息化》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109309826A (en) * 2017-07-27 2019-02-05 Tcl集团股份有限公司 A kind of image color equalization methods and terminal
CN107451972A (en) * 2017-07-31 2017-12-08 北京小米移动软件有限公司 Image enchancing method, device and computer-readable recording medium
CN107451972B (en) * 2017-07-31 2020-03-17 北京小米移动软件有限公司 Image enhancement method, device and computer readable storage medium
CN107945163A (en) * 2017-11-23 2018-04-20 广州酷狗计算机科技有限公司 Image enchancing method and device
CN110580693A (en) * 2018-06-07 2019-12-17 湖南爱威医疗科技有限公司 Image processing method, image processing device, computer equipment and storage medium
CN110580693B (en) * 2018-06-07 2022-03-25 湖南爱威医疗科技有限公司 Image processing method, image processing device, computer equipment and storage medium
CN109557109A (en) * 2018-12-29 2019-04-02 中国肉类食品综合研究中心 Freeze the detection method and device of meat packed state
CN116703741A (en) * 2022-09-27 2023-09-05 荣耀终端有限公司 Image contrast generation method and device and electronic equipment
CN116703741B (en) * 2022-09-27 2024-03-15 荣耀终端有限公司 Image contrast generation method and device and electronic equipment

Also Published As

Publication number Publication date
CN105957037B (en) 2018-11-06

Similar Documents

Publication Publication Date Title
CN105957037A (en) Image enhancing method and image enhancing device
CN104517268B (en) Adjust the method and device of brightness of image
CN105070252B (en) Reduce the method and device of display brightness
US20170032725A1 (en) Method, device, and computer-readable medium for setting color gamut mode
CN105760884B (en) The recognition methods of picture type and device
CN106713696B (en) Image processing method and device
CN107038428B (en) Living body identification method and apparatus
CN109345485A (en) A kind of image enchancing method, device, electronic equipment and storage medium
CN106710540A (en) Liquid crystal display method and device
CN106454336A (en) Method and device for detecting whether camera of terminal is covered or not, and terminal
CN105225647A (en) Luminance regulating method and device
CN111984347B (en) Interactive processing method, device, equipment and storage medium
CN107341777A (en) image processing method and device
CN104934016A (en) Screen display method and device
CN104464674B (en) Liquid crystal display method of adjustment and device
CN105825490A (en) Gaussian blur method and device of image
CN105635574B (en) The treating method and apparatus of image
CN105787322A (en) Fingerprint identification method and apparatus as well as mobile terminal
CN104484867A (en) Picture processing method and device
CN109086752A (en) Face identification method, device, electronic equipment and storage medium
CN106557294A (en) Color adjustment method and device
CN106210446A (en) saturation enhancement method and device
CN104536713B (en) Method and device for displaying characters in image
CN106372663A (en) Method and device for constructing classification model
CN106295579B (en) Face alignment method and device

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