CN108230256A - Image processing method, device, computer installation and computer readable storage medium - Google Patents
Image processing method, device, computer installation and computer readable storage medium Download PDFInfo
- Publication number
- CN108230256A CN108230256A CN201711098388.3A CN201711098388A CN108230256A CN 108230256 A CN108230256 A CN 108230256A CN 201711098388 A CN201711098388 A CN 201711098388A CN 108230256 A CN108230256 A CN 108230256A
- Authority
- CN
- China
- Prior art keywords
- image
- gray level
- histogram
- region
- level image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 24
- 238000009434 installation Methods 0.000 title claims abstract description 10
- 238000006243 chemical reaction Methods 0.000 claims abstract description 14
- 238000000034 method Methods 0.000 claims abstract description 11
- 239000003550 marker Substances 0.000 claims description 28
- 238000004590 computer program Methods 0.000 claims description 18
- 230000007935 neutral effect Effects 0.000 claims description 14
- 238000004422 calculation algorithm Methods 0.000 claims description 13
- 238000011084 recovery Methods 0.000 claims description 11
- 230000006870 function Effects 0.000 description 10
- 238000005516 engineering process Methods 0.000 description 4
- 230000007704 transition Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 239000003086 colorant Substances 0.000 description 2
- 241001085205 Prenanthella exigua Species 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Classifications
-
- G06T5/94—
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/40—Image enhancement or restoration by the use of histogram techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
Abstract
The present invention provides a kind of image processing method, the method includes:Obtain the histogram of the first gray level image that conversion input picture obtains, the type of the histogram is determined according to the pixel accounting in region each in the multiple regions of the histogram, corresponding tint ramp adjustment is carried out according to the type of the histogram to first gray level image to handle, obtain the second gray level image, local dynamic range extension is carried out to second gray level image, third gray level image is obtained, image to be output is obtained according to the third gray level image.The present invention also provides a kind of image processing apparatus, computer installation and computer readable storage mediums.The present invention can improve image overall contrast.
Description
Technical field
The present invention relates to electronic technology fields, and in particular to a kind of image processing method, device, computer installation and calculating
Machine readable storage medium storing program for executing.
Background technology
This part intends to provides the back of the body for the embodiments of the present invention stated in claims and in specific embodiment
Scape or context.Description herein recognizes it is the prior art not because not being included in this part.
With the development of science and technology, more and more people are taken pictures or photographed using electronic equipment, set by electronics
The photo or image that standby shooting obtains are handled, when handling image so that image overall contrast is not
It is enough.
Invention content
In consideration of it, it is necessary to provide a kind of image processing method, device, computer installation and computer-readable storage mediums
Matter can improve image overall contrast.
A kind of image processing method of offer of the present invention, the method includes:
Obtain the histogram of the first gray level image that conversion input picture obtains;
The type of the histogram is determined according to the pixel accounting in region each in the multiple regions of the histogram;
Corresponding tint ramp adjustment is carried out to first gray level image to handle, obtain according to the type of the histogram
Second gray level image;
Local dynamic range extension is carried out to second gray level image, obtains third gray level image;
Image to be output is obtained according to the third gray level image.
Further, the pixel accounting in each region determines the histogram in the multiple regions according to the histogram
Type before, the method further includes:The histogram is evenly dividing into the continuous multiple regions of preset quantity.
Further, it is described image to be output is obtained according to third gray level image to include:
Color recovery is carried out to the input picture according to first gray level image and the third gray level image, is obtained
The image to be output.
Further, the pixel accounting in each region is the pixel quantity that each region includes and the histogram
The ratio between total pixel number amount, the pixel accounting in each region determines the histogram in the multiple regions according to the histogram
Type include:
Calculate the pixel accounting in each region in the multiple regions of the histogram;
It is more than region of the zone marker for the first kind of threshold value by pixel accounting, and by pixel accounting less than or equal to described
The zone marker of threshold value is the region of Second Type;
The type of the histogram is determined according to the zone marker result in the multiple region.
Further, the multiple region includes half-light region, neutral gray area and highlight area;
The zone marker result according to the multiple region determines that the type of the histogram includes:
When being only more than the threshold value there are one the pixel accounting in region in the multiple region, the histogram is determined
Type is need not handle image;When the half-light region in the multiple region and the pixel accounting of highlight area are more than the threshold
Value, and when the pixel accounting of neutral gray area is less than or equal to the threshold value, the type for determining the histogram is high contrast image;
When the pixel accounting of the neutral gray area in the multiple region is more than the threshold value, the type for determining the histogram is general
Logical scene image;
The type according to the histogram carries out corresponding tint ramp adjustment to first gray level image and handles
Including:High contrast image in first gray level image and common scenarios image are carried out at corresponding tint ramp adjustment
Reason.
Further, the progress local dynamic range extension includes multi-Scale Retinex Algorithm carry out office is used in combination
Portion's dynamic range expansion.
Further, color is carried out to the input picture according to first gray level image and the third gray level image
Restore, obtain the image to be output and include:
Brightness value/first gray scale of the R value * third gray level images of the R values of image to be output=input picture
The brightness value of image;
Brightness value/first gray scale of the G value * third gray level images of the G values of image to be output=input picture
The brightness value of image;
Brightness value/first gray scale of the B value * third gray level images of the B values of image to be output=input picture
The brightness value of image;
The brightness value of wherein described first gray level image=(G values+institute of the R values of the input picture+input picture
State the B values of input picture)/3.
Second aspect of the present invention provides a kind of image processing apparatus, and described device includes:
Acquisition module, for obtaining the histogram of the first gray level image that conversion input picture obtains;
Determining module, the pixel accounting for region each in the multiple regions according to the histogram determine the Nogata
The type of figure;
Image processing module is used for:
Corresponding tint ramp adjustment is carried out to first gray level image to handle, obtain according to the type of the histogram
Second gray level image;
Local dynamic range extension is carried out to second gray level image, obtains third gray level image;And
Image to be output is obtained according to the third gray level image.
The present invention also provides a kind of computer installation, the computer installation includes processor, and the processor is used to hold
The step of image processing method is realized during the computer program stored in row storage device.
The present invention also provides a kind of computer readable storage mediums, are stored thereon with computer program, the computer journey
The step of image processing method is realized when sequence is executed by processor.
Image processing method provided by the invention, device, computer installation and computer readable storage medium obtain conversion
The histogram of the first gray level image that input picture obtains is accounted for according to the pixel in region each in the multiple regions of the histogram
Than the type for determining the histogram, it is bent that corresponding tone is carried out to first gray level image according to the type of the histogram
Line adjustment is handled, and obtains the second gray level image, and local dynamic range extension is carried out to second gray level image, obtains third ash
Image is spent, image to be output is obtained according to the third gray level image, so as to improve the contrast of image entirety.
Description of the drawings
Technical solution in order to illustrate the embodiments of the present invention more clearly, below will be to needed in embodiment description
Attached drawing is briefly described, it should be apparent that, the accompanying drawings in the following description is some embodiments of the present invention, general for this field
For logical technical staff, without creative efforts, other attached drawings are can also be obtained according to these attached drawings.
Fig. 1 is the flow chart for the image processing method that an embodiment of the present invention provides;
Fig. 2 is the statistic histogram of the gray level image of the present invention;
Fig. 3 is the illustrative structure chart of the terminal of the present invention;
Fig. 4 is the illustrative functional block diagram of the image processing apparatus of the present invention.
Main element symbol description
Following specific embodiment will be further illustrated the present invention with reference to above-mentioned attached drawing.
Specific embodiment
It is to better understand the objects, features and advantages of the present invention, below in conjunction with the accompanying drawings and specific real
Applying example, the present invention will be described in detail.It should be noted that in the absence of conflict, embodiments herein and embodiment
In feature can be combined with each other.
Elaborate many details in the following description to facilitate a thorough understanding of the present invention, described embodiment only
It is part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people
Member's all other embodiments obtained without making creative work, shall fall within the protection scope of the present invention.
Unless otherwise defined, all of technologies and scientific terms used here by the article is with belonging to technical field of the invention
The normally understood meaning of technical staff is identical.Term used in the description of the invention herein is intended merely to description tool
The purpose of the embodiment of body, it is not intended that in the limitation present invention.
Fig. 1 is the schematic flow diagram of image processing method that an embodiment of the present invention provides, wherein, described image processing
Method can be used for terminal, it should be appreciated that the signified terminal of the present invention can be with or without shooting function
Terminal, such as mobile phone, camera, video camera, tablet computer, palm PC, laptop, desktop computer, mobile unit etc. are eventually
End, this is not restricted.As shown in Figure 1, image processing method may comprise steps of:
101:Obtain the histogram of the first gray level image that conversion input picture obtains.
Input picture can be coloured image, and coloured image refers to that each pixel is divided by R (red), G (green), B (blue)
The image formed is measured, wherein R, G, B is described by different gray levels, and R, G, B respectively have 256 grades of brightness under normal conditions,
It is until 255,256 grades of rgb color can be combined into 256 × 256 × 256=in total from 0,1,2... with digital representation
16777216 kinds of colors.
The first gray level image is obtained by carrying out gray scale conversion to input picture, gray level image is there are one each pixels
The image of sample color is typically shown as the gray scale from furvous to most bright white, YUV colors is carried out in RGB color
It is brightness that either the Y value after YIQ color space conversions in YUV or YIQ, which represents, in space, and gray level image is equivalent to Y points
Amount, gray level image is substantially extraction Y-component.Input picture can be converted by different algorithms in present embodiment
For gray level image, such as floating-point arithmetic, mean value method etc..
Grey level histogram is the function about grey level distribution, is the statistics to grey level distribution in image, describes
The number of pixel with the gray level in image, grey level histogram is by all pixels in digital picture, according to gray value
Size, counts the frequency of its appearance, and the form of expression of grey level histogram can be referring to shown in Fig. 2, and abscissa is gray level, value
Ranging from [0,255], wherein black are 0, and white is 255, and ordinate is the frequency that the gray scale occurs, and in digital picture, are indulged
Coordinate refers to the number of pixel, the intensity profile situation for the image that can visually see from grey level histogram.
In one embodiment, can also before this step 101, by the gray-scale statistical histogram of the first gray-scale map according to
Preset rules are divided, and are divided into multiple continuous segments, that is, the histogram is evenly dividing into the company of preset quantity
Continuous multiple regions.Specifically, [0,255] can be evenly dividing as three continuous segments, three segments be respectively [0,
85], [86,170], [171,255], and the region between [0,85] is defined as half-light region, by the area between [86,170]
Domain is defined as neutral gray area, and the region between [171,255] is defined as highlight area.
It is understood that the step of the above-mentioned continuous multiple regions that the histogram is evenly dividing into preset quantity
Suddenly, it can also be and performed after this step 101.
102:The type of the histogram is determined according to the pixel accounting in region each in the multiple regions of the histogram.
Can by calculate the ratio between pixel quantity that each region includes and the total pixel number amount of the histogram obtain it is each
The pixel accounting in region, that is, the pixel accounting in each region is the pixel quantity that each region includes and the histogram
The ratio between total pixel number amount.By taking the picture size of image is 100 × 100 as an example, the pixel of the image amounts to 10000, into
The division of the continuous isometric segment of row three, by counting the pixel for obtaining [0,85] region (half-light region) and being possessed
Number is A, and the number of pixels that [86,170] region (neutral gray area) is possessed is B, [171,255] region (highlight area) institute
The number of pixels possessed is C, and the pixel accounting that can obtain each region is respectively A/10000, B/10000, C/10000.
According to the pixel accounting situation in each region, the type of histogram is determined.It specifically, first, can be according to above-mentioned side
Method calculates the pixel accounting in each region in multiple regions, and secondly, pixel accounting and the predetermined threshold value in each region are compared
Compared with judging whether to be more than predetermined threshold value, whole judging result obtained according to the comparable situation in each region, sentenced according to whole
Disconnected result determines the type of histogram.
Wherein, the pixel accounting in each region determines the histogram in the multiple regions according to the histogram
Type can specifically comprise the following steps:
Calculate the pixel accounting in each region in the multiple region;
It is more than region of the zone marker for the first kind of threshold value by pixel accounting, and by pixel accounting less than or equal to described
The zone marker of threshold value is the region of Second Type;
The type of the histogram is determined according to the zone marker result in the multiple region.
The zone marker result according to the multiple region determines that the type of the histogram can specifically include:
When being only more than the threshold value there are one the pixel accounting in region in the multiple region, that is, the multiple region
In included 3 regions (half-light region, neutral gray area and highlight area) only the first kind is marked as there are one region
Region, that is, when pixel accounting is more than the threshold value, determine the type of the histogram for image need not be handled;When described
The pixel accounting in half-light region and highlight area in multiple regions is more than the threshold value, and the pixel accounting of neutral gray area
During less than or equal to the threshold value, the type for determining the histogram is high contrast image;When the neutrality ash in the multiple region
When the pixel accounting in region is more than the threshold value, the type for determining the histogram is common scenarios image.
It is understood that it in the present embodiment, is compared by the pixel accounting in each region with predetermined threshold value
When, it can be marked according to judging result to the region, for example, the zone marker that pixel accounting is more than predetermined threshold value is 1, and picture
The zone marker that plain accounting was less than and (was less than or equal to) predetermined threshold value is 0, as a result, in multiple regions, by each region
Label is arranged, and obtains the zone marker of multiple regions.
For example, the value that the value that the value of A is 4000, B is 1500, C is 4500, and the predetermined threshold value set is 20%, then secretly
The pixel accounting in light region is 40%, and the pixel accounting of neutral gray area is 15%, and the pixel accounting of highlight area is 45%, then
The pixel accounting in half-light region and the pixel accounting of highlight area are more than predetermined threshold value, and the pixel accounting of neutral gray area is less than
Predetermined threshold value, the zone marker for obtaining multiple regions are 101, other situations and so on, in third subregion, it can wrap
It has included:001st, 010,100,101,110,011 and 111 7 kind of situation.
According to the zone marker of multiple regions, the type of the histogram can be determined according to certain rule, type includes
There are common scenarios image, high contrast image and image need not be handled, for example, when the pixel accounting for there was only a region in three regions
During more than predetermined threshold value, can be classified as that image need not be handled, as multiple regions zone marker include 001 and/or 010 and/
Or 100 image;And when the pixel accounting for having connected two regions in three regions is more than predetermined threshold value, it is classified as common
Scene image, as the zone marker of multiple regions includes 110 and/or 011 and/or 111;And when half-light region and highlight area
Pixel accounting when being more than that the pixel accounting of predetermined threshold value and neutral gray area is less than predetermined threshold value, be classified as high variogram
Picture, such as 101, high contrast picture represents the smaller pixel of those gray values in image and the larger pixel of gray value accounts for always
The value of pixel is big for the value that the moderate pixel of gray value accounts for total pixel, and therefore, the luminance contrast of image is larger,
Bright place is too bright for being intuitively presented as in image, and dark place is too dark, and whole contrast is inadequate.
103:Corresponding tint ramp adjustment is carried out according to the type of the histogram to first gray level image to handle,
Obtain the second gray level image.
The type of histogram is obtained in a step 102, includes common scenarios image, high contrast image and without processing figure
Picture, wherein common scenarios image and high contrast image are the image that tint ramp is needed to adjust, and the first gray level image is through overtone
The second gray level image is obtained after curve adjustment processing, does not need to then carry out tint ramp adjustment without handling image.
When carrying out tint ramp adjustment, it is adjusted correspondingly according to obtained type, it illustratively, can be to high contrast
Image, which is adjusted to obtain, need not handle image, be more than the gray value height-regulating in the half-light region of predetermined threshold value by pixel accounting e.g.,
So that the number of pixels that [0,85] region (half-light region) is possessed is reduced to 1800 from quantity 4000, alternatively, by pixel accounting
Gray value more than the highlight area of predetermined threshold value is turned down so that the pixel that [171,255] region (highlight area) is possessed
Number is reduced to 3000 from quantity 4500, and final high contrast image obtains that image need not be handled after tint ramp adjusts.
104:Local dynamic range extension is carried out to second gray level image, obtains third gray level image.
In present embodiment, this step can specifically include:To second greyscale image transitions to be carried out after log-domain
Local dynamic range extends, and obtains third gray level image.It can be according to logarithmic transformed formula s=c × log (1+r) to the second gray scale
Image carries out logarithmic transformed, and wherein c be dimension scale constant (such as can value be 1), and r is artwork gray value, after s is converts
Target gray value.After second gray level image is logarithmic transformed, the details of the dark portion in image can be enhanced, pressed so as to extend
Compared with dark pixel in the image of contracting, the dynamic range of image can be preferably compressed.
When carrying out local dynamic range extension, it is sharp can each pixel of image first to be calculated its using N × N as neighborhood
Degree, present embodiment can be used multi-Scale Retinex Algorithm and carry out local dynamic range extension, and multi-Scale Retinex Algorithm is
It is developed from single scale Retinex algorithm, advantage is can to keep the high fidelity of image simultaneously and image is moved
State Ratage Coutpressioit, in certain circumstances, multi-Scale Retinex Algorithm can realize that color enhancement, color constancy, part are dynamic
State Ratage Coutpressioit, global dynamic range compression etc..
According to Retinex theories, a secondary given original image S (x, y) can be analyzed to reflected image R (x, y) and incidence
Image (being luminance picture) L (x, y), basic thought is exactly in original image, is eliminated or reduced by some way
The influence of incident image, retains the reflecting attribute image of object essence as possible, and expression formula is:
S (x, y)=L (x, y) * R (x, y)
Wherein, L (x, y) determines that the attainable luminance dynamic range of pixel institute, R (x, y) illustrate that object is anti-in image
The inherent attribute of the image of property, as image is penetrated, S (x, y) represents the reflected light image that human eye can receive.
In multi-Scale Retinex Algorithm, calculation formula is:
Wherein, it is around function, expression formula centered on F (x, y):C is Gauss around scale, λ tables
Show normalization factor, F (x, y) value should meet condition:∫∫Fk(x, y) dxdy=1, K represent Gauss center ring around function
Number, * are convolution algorithm.
In the present embodiment, with reference to multi-Scale Retinex Algorithm, multiple differences can be created for the second gray level image
The image of multiple different blur radius is merged, finally obtains third gray level image by the image of blur radius, final to synthesize
Image can enhance local various details while will not increase noise.
105:Image to be output is obtained according to the third gray level image.
In present embodiment, this step can specifically include:According to first gray level image and the third gray-scale map
As carrying out color recovery to the input picture, the image to be output is obtained.The rgb value of one pixel of the image to be output
For (R2,G2,B2), the rgb value of the corresponding pixel of input picture is (R1,G1,B1), the obtained corresponding pixel of the first gray level image
Brightness value be Y1, the obtained brightness value of third gray-scale map is Y3, in step 101, input picture is obtained by conversion the
One gray-scale map, the brightness value of the first gray-scale map can be used average algorithm and obtain, i.e. Y1=(R1+G1+B1)/3, then can pass through
(R is calculated in the following formula2,G2,B2):
R2=R1*Y3/Y1
G2=G1*Y3/Y1
B2=B1*Y3/Y1
According to obtained (R2,G2,B2) carry out color recovery obtain output image.
To color recovery be carried out according to the first gray level image and third gray level image, exported between image and input picture
Misalignment it is small, output image substantially with the solid colour of input picture.
The image processing method that present embodiment is provided, the first gray level image obtained by acquisition conversion input picture
Histogram, the type of the histogram, root are determined according to the pixel accounting in region each in the multiple regions of the histogram
Corresponding tint ramp adjustment is carried out to first gray level image to handle, obtain the second gray-scale map according to the type of the histogram
Picture carries out local dynamic range extension to second gray level image, obtains third gray level image and according to the third gray scale
Image obtains image to be output.Input picture is carried out gray scale conversion by the present invention, then carries out subsequent adjustment and processing, so as to carry
The high overall contrast and clarity of image.Local dynamic range expansion is carried out using multi-Scale Retinex Algorithm moreover, combining
Exhibition can preferably reduce the halation of image.
Fig. 3 is a kind of structure chart of embodiment of terminal 1 provided by the invention, the signified terminal of the present invention can be mobile phone or
Person's computer herein without limiting, as shown in figure 3, the terminal can be applied in the above embodiment, below puies forward the present invention
The terminal 1 of confession is described, and the terminal 1 can include image processing apparatus 100, and terminal 1 may also include processor 10, storage
Device 20 and the computer program (instruction) that can be run in the storage device 20 and on the processor 10 is stored in,
Such as image processing program etc..
Described image processing unit 100, available for by the Nogata of the first gray level image obtained by converting input picture
Figure is divided into multiple regions according to preset rules, and the Nogata is determined according to the pixel accounting in region each in the multiple region
The type of figure carries out corresponding tint ramp adjustment to first gray level image according to the type of the histogram and handles, obtains
To the second gray level image, to second greyscale image transitions to carry out local dynamic range extension after log-domain, third is obtained
Gray level image and color recovery is carried out to the input picture according to first gray level image and third gray level image, obtained
Image to be output.Therefore, input picture is carried out by gray scale conversion by image processing apparatus 100, then carry out it is subsequent adjustment and
, there is halation after can preferably overcoming the problems, such as image procossing and overall contrast is inadequate, it is whole can to improve image in processing
Body contrast reduces halation.
The processor 10 is realized in above-mentioned each embodiment when performing the computer program in image processing method
Step, such as step 101-105 shown in FIG. 1.Alternatively, the processor 10 realizes each mould when performing the computer program
The function of block/unit.
Illustratively, the computer program can be divided into one or more module/units, one or more
A module/unit is stored in the storage device 20, and is performed by the processor, to complete the present invention.It is one
Or multiple module/units can be the series of computation machine program instruction section that can complete specific function, which is used to retouch
State implementation procedure of the computer program in the terminal 1.For example, described image processing unit 100 can include region
Division module 111, acquisition module 11, determining module 12, image processing module 13, as shown in figure 4, each module concrete function is such as
Under:
The acquisition module 11, the histogram of the first gray level image obtained available for obtaining conversion input picture.
The region division module 111, it is equal available for the histogram of the first gray level image that input picture obtains will be converted
The even continuous multiple regions for being divided into preset quantity.
When dividing histogram, histogram can be evenly dividing into the continuous region of preset quantity, that is, the default rule
It can be then the continuous region for being evenly dividing into preset quantity.It such as can trisection obtains on gray value direction by histogram
Three segments [0,85], [86,170], [171,255], respectively half-light region, neutral gray area and highlight area.
The determining module 12, the pixel accounting available for region each in the multiple regions according to the histogram determine
The type of the histogram.In present embodiment, the determining module 12 is particularly used in:
Calculate the pixel accounting in each region in the multiple region;
It is more than region of the zone marker for the first kind of threshold value by pixel accounting, and by pixel accounting less than or equal to described
The zone marker of threshold value is the region of Second Type;And
The type of the histogram is determined according to the zone marker result in the multiple region.
It is understood that in the pixel accounting for calculating each region, the pixel that can be included by calculating each region
The ratio between quantity and the total pixel number amount of the histogram obtain the pixel accounting in each region, that is, the pixel in each region
Accounting is the ratio between the pixel quantity that each region includes and the total pixel number amount of the histogram.
The determining module 12 is particularly used in the pixel accounting for calculating each region in the multiple region;
It is 1 by the zone marker that pixel accounting is more than threshold value, and pixel accounting is less than or equal to the region mark of the threshold value
It is denoted as 0;The type of the histogram is determined according to the zone marker in the multiple region.
Accounting for determining Nogata graph type according to pixel may include thering is common scenarios image, high contrast image and without processing figure
Picture.
In one embodiment, by three isometric segments [0,85], [86,170], [171,255] respectively into rower
Note, obtains the zone marker of multiple regions, it may include at least one of following:001st, 010,100,101,110,011 and
111.When the zone marker of multiple regions is 001,010,100, determine the type of histogram for image need not be handled;When multiple
When the zone marker in region includes 101, the type for determining histogram is high contrast image;When the zone marker of multiple regions includes
When 110 and/or 011 and/or 111, the type for determining histogram is common scenarios image.
Described image processing module 13 carries out phase available for the type according to the histogram to first gray level image
The tint ramp adjustment processing answered, obtains the second gray level image;Local dynamic range extension is carried out to second gray level image,
Obtain third gray level image;To second greyscale image transitions to carry out local dynamic range extension after log-domain, the is obtained
Three gray level images;Image to be output is obtained according to the third gray level image;And according to first gray level image and described
Third gray level image carries out color recovery to the input picture, obtains the image to be output.
Further, described image processing module 13 may particularly include tint ramp adjustment unit 131, local dynamic station model
Enclose expanding element 132 and color recovery unit 133.
Wherein, the tint ramp adjustment unit 131, available for the type according to the histogram to first gray scale
Image carries out corresponding tint ramp adjustment processing, obtains the second gray level image.It, can be to first when carrying out tint ramp adjustment
High contrast image and common scenarios image in gray level image carry out corresponding tint ramp adjustment processing.
The local dynamic range expanding element 132, available for carrying out local dynamic range to second gray level image
Extension, obtain third gray level image and available for second greyscale image transitions to carry out local dynamic station after log-domain
Range extends, and obtains third gray level image.When carrying out local dynamic range extension, it may include be used in combination multiple dimensioned
Retinex algorithm carries out local dynamic range extension.
The color recovery unit 133, available for obtaining image to be output according to the third gray level image and can be used
In carrying out color recovery to the input picture according to first gray level image and the third gray level image, described treat is obtained
Export image.
The rgb value of output image is calculated, in the following manner can be used:
Brightness value/first gray scale of the R value * third gray level images of the R values of image to be output=input picture
The brightness value of image;
Brightness value/first gray scale of the G value * third gray level images of the G values of image to be output=input picture
The brightness value of image;
Brightness value/first gray scale of the B value * third gray level images of the B values of image to be output=input picture
The brightness value of image;
The brightness value of wherein described first gray level image=(G values+institute of the R values of the input picture+input picture
State the B values of input picture)/3.
The terminal 1 can also be the computing devices such as PC server and cloud server.Those skilled in the art can manage
Solution, the schematic diagram is only the restriction of the example of terminal 1, not structure paired terminal 1, can be included more more or less than illustrating
Component either combine certain components or different components, such as the terminal 1 can also include input-output equipment, net
Network access device, bus etc..
The processor 10 can be central processing unit (Central Processing Unit, CPU), can also be
Other general processors, digital signal processor (Digital Signal Processor, DSP), application-specific integrated circuit
(Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components etc..General processor can be microprocessor or the processor can also be any conventional processor
Deng the processor is the control centre of the terminal 1, utilizes various interfaces and the various pieces of the entire terminal 1 of connection.
The storage device 20 can be used for storing the computer program and/or module, and the processor 10 passes through operation
Or it performs the computer program being stored in the storage device 20 and/or module and calls and be stored in storage device 20
Data, realize the various functions of the server.The storage device 20 can mainly include storing program area and storage data
Area, wherein, storing program area can storage program area, application program needed at least one function etc.;Storage data field can deposit
Storage uses created data etc. according to mobile phone.In addition, storage device 20 can include high random access storage device, also
It can include non-volatile memory device, such as hard disk, memory, plug-in type hard disk, intelligent memory card (Smart Media
Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card), at least one disk storage dress
Put part, flush memory device or other volatile solid-state storage device parts.
If the integrated module/unit of the terminal 1 is realized in the form of SFU software functional unit and is independent product
Sale in use, can be stored in a computer read/write memory medium.It is of the invention to realize based on such understanding
All or part of flow in embodiment method is stated, relevant hardware can also be instructed to complete by computer program, institute
The computer program stated can be stored in a computer readable storage medium, which, can when being executed by processor
The step of realizing above-mentioned each embodiment of the method.Wherein, the computer program includes computer program code, the computer
Program code can be source code form, object identification code form, executable file or certain intermediate forms etc..The computer can
Reading medium can include:Any entity or device, recording medium, USB flash disk, mobile hard of the computer program code can be carried
Disk, magnetic disc, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory
(RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..Need what is illustrated
It is that the content that the computer-readable medium includes can be fitted according to legislation in jurisdiction and the requirement of patent practice
When increase and decrease, such as in certain jurisdictions, according to legislation and patent practice, computer-readable medium, which does not include electric carrier wave, to be believed
Number and telecommunication signal.
In several embodiments provided by the present invention, it should be appreciated that the method and apparatus can also pass through
Other modes realize that device embodiment described above is only illustrative, the division of the module, only a kind of
Division of logic function, when realization, can there is other dividing mode.
It is obvious to a person skilled in the art that the present invention is not limited to the details of above-mentioned exemplary embodiment, Er Qie
In the case of without departing substantially from spirit or essential attributes of the invention, the present invention can be realized in other specific forms.Therefore, no matter
From the point of view of which point, the present embodiments are to be considered as illustrative and not restrictive, and the scope of the present invention is by appended power
Profit requirement rather than above description limit, it is intended that all by what is fallen within the meaning and scope of the equivalent requirements of the claims
Variation includes within the present invention.Any reference numeral in claim should not be considered as to the involved claim of limitation.This
Outside, it is clear that one word of " comprising " is not excluded for other units or step, and odd number is not excluded for plural number.That is stated in device claim is multiple
Device can also be realized by same device or system by software or hardware.The first, the second grade words are used for representing name
Claim, and do not represent any particular order.
Finally it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention and it is unrestricted, although reference
The present invention is described in detail in preferred embodiment, it will be understood by those of ordinary skill in the art that, it can be to the present invention's
Technical solution is modified or equivalent replacement, without departing from the spirit and scope of technical solution of the present invention.
Claims (10)
1. a kind of image processing method, which is characterized in that the method includes:
Obtain the histogram of the first gray level image that conversion input picture obtains;
The type of the histogram is determined according to the pixel accounting in region each in the multiple regions of the histogram;
Corresponding tint ramp adjustment is carried out to first gray level image to handle, obtain second according to the type of the histogram
Gray level image;
Local dynamic range extension is carried out to second gray level image, obtains third gray level image;
Image to be output is obtained according to the third gray level image.
2. image processing method as described in claim 1, which is characterized in that every in the multiple regions according to the histogram
Before the pixel accounting in a region determines the type of the histogram, the method further includes:The histogram is evenly dividing
Into the continuous multiple regions of preset quantity.
3. image processing method as described in claim 1, which is characterized in that it is described obtained according to third gray level image it is to be output
Image includes:
Color recovery is carried out to the input picture according to first gray level image and the third gray level image, is obtained described
Image to be output.
4. such as claim 1-3 any one of them image processing methods, which is characterized in that the pixel accounting in each region
It is described according to the multiple of the histogram for the ratio between the pixel quantity that each region includes and the total pixel number amount of the histogram
The pixel accounting in each region determines that the type of the histogram includes in region:
Calculate the pixel accounting in each region in the multiple regions of the histogram;
It is more than region of the zone marker for the first kind of threshold value by pixel accounting, and pixel accounting is less than or equal to the threshold value
Zone marker be Second Type region;
The type of the histogram is determined according to the zone marker result in the multiple region.
5. image processing method as claimed in claim 4, it is characterised in that:
The multiple region includes half-light region, neutral gray area and highlight area;
The zone marker result according to the multiple region determines that the type of the histogram includes:
When being only more than the threshold value there are one the pixel accounting in region in the multiple region, the type of the histogram is determined
For image need not be handled;When the half-light region in the multiple region and the pixel accounting of highlight area are more than the threshold value,
And the pixel accounting of neutral gray area, when being less than or equal to the threshold value, the type for determining the histogram is high contrast image;When
When the pixel accounting of neutral gray area in the multiple region is more than the threshold value, the type for determining the histogram is common
Scene image;
The type according to the histogram carries out first gray level image corresponding tint ramp adjustment processing and includes:
Corresponding tint ramp adjustment processing is carried out to the high contrast image in first gray level image and common scenarios image.
6. such as claim 1-3 any one of them image processing methods, which is characterized in that the progress local dynamic range expansion
Exhibition includes multi-Scale Retinex Algorithm progress local dynamic range extension is used in combination.
7. image processing method as claimed in claim 3, which is characterized in that according to first gray level image and the third
Gray level image carries out color recovery to the input picture, obtains the image to be output and includes:
Brightness value/first gray level image of the R value * third gray level images of the R values of image to be output=input picture
Brightness value;
Brightness value/first gray level image of the G value * third gray level images of the G values of image to be output=input picture
Brightness value;
Brightness value/first gray level image of the B value * third gray level images of the B values of image to be output=input picture
Brightness value;
The brightness value of wherein described first gray level image=(the G values of the R values of the input picture+input picture+described defeated
Enter the B values of image)/3.
8. a kind of image processing apparatus, which is characterized in that described device includes:
Acquisition module, for obtaining the histogram of the first gray level image that conversion input picture obtains;
Determining module, the pixel accounting for region each in the multiple regions according to the histogram determine the histogram
Type;
Image processing module is used for:
Corresponding tint ramp adjustment is carried out to first gray level image to handle, obtain second according to the type of the histogram
Gray level image;
Local dynamic range extension is carried out to second gray level image, obtains third gray level image;And
Image to be output is obtained according to third gray level image.
9. a kind of computer installation, which is characterized in that the computer installation includes processor, and the processor is deposited for performing
The step of the image processing method as described in any one in claim 1-7 is realized during the computer program stored in storage device
Suddenly.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program
The step of image processing method as described in any one in claim 1-7 is realized when being executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711098388.3A CN108230256A (en) | 2017-11-09 | 2017-11-09 | Image processing method, device, computer installation and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711098388.3A CN108230256A (en) | 2017-11-09 | 2017-11-09 | Image processing method, device, computer installation and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108230256A true CN108230256A (en) | 2018-06-29 |
Family
ID=62654990
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711098388.3A Withdrawn CN108230256A (en) | 2017-11-09 | 2017-11-09 | Image processing method, device, computer installation and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108230256A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109544486A (en) * | 2018-10-18 | 2019-03-29 | 维沃移动通信(杭州)有限公司 | A kind of image processing method and terminal device |
CN110516761A (en) * | 2019-09-03 | 2019-11-29 | 成都容豪电子信息科技有限公司 | Object detection system, method, storage medium and terminal based on deep learning |
CN110809146A (en) * | 2019-11-01 | 2020-02-18 | 厦门美图之家科技有限公司 | Image contrast adjusting method and device, terminal equipment and storage medium |
CN111127337A (en) * | 2019-11-28 | 2020-05-08 | 稿定(厦门)科技有限公司 | Image local area highlight adjusting method, medium, equipment and device |
CN111784590A (en) * | 2019-04-29 | 2020-10-16 | 北京京东尚科信息技术有限公司 | Image processing method, device and system and computer storage medium |
CN113015006A (en) * | 2020-06-04 | 2021-06-22 | 海信视像科技股份有限公司 | Display apparatus and display method |
CN113766130A (en) * | 2021-09-13 | 2021-12-07 | 维沃移动通信有限公司 | Video shooting method, electronic equipment and device |
CN114968952A (en) * | 2022-05-11 | 2022-08-30 | 沈阳东软智能医疗科技研究院有限公司 | Medical image data compression method, rendering method, device and medium |
WO2023082859A1 (en) * | 2021-11-09 | 2023-05-19 | 深圳Tcl新技术有限公司 | Image processing method, image processor, electronic device, and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6018590A (en) * | 1997-10-07 | 2000-01-25 | Eastman Kodak Company | Technique for finding the histogram region of interest based on landmark detection for improved tonescale reproduction of digital radiographic images |
CN104063848A (en) * | 2014-06-19 | 2014-09-24 | 中安消技术有限公司 | Enhancement method and device for low-illumination image |
CN104517272A (en) * | 2014-12-31 | 2015-04-15 | 深圳市天视通电子科技有限公司 | Image enhancing method and device |
-
2017
- 2017-11-09 CN CN201711098388.3A patent/CN108230256A/en not_active Withdrawn
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6018590A (en) * | 1997-10-07 | 2000-01-25 | Eastman Kodak Company | Technique for finding the histogram region of interest based on landmark detection for improved tonescale reproduction of digital radiographic images |
CN104063848A (en) * | 2014-06-19 | 2014-09-24 | 中安消技术有限公司 | Enhancement method and device for low-illumination image |
CN104517272A (en) * | 2014-12-31 | 2015-04-15 | 深圳市天视通电子科技有限公司 | Image enhancing method and device |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109544486A (en) * | 2018-10-18 | 2019-03-29 | 维沃移动通信(杭州)有限公司 | A kind of image processing method and terminal device |
CN111784590A (en) * | 2019-04-29 | 2020-10-16 | 北京京东尚科信息技术有限公司 | Image processing method, device and system and computer storage medium |
CN110516761A (en) * | 2019-09-03 | 2019-11-29 | 成都容豪电子信息科技有限公司 | Object detection system, method, storage medium and terminal based on deep learning |
CN110809146A (en) * | 2019-11-01 | 2020-02-18 | 厦门美图之家科技有限公司 | Image contrast adjusting method and device, terminal equipment and storage medium |
CN111127337A (en) * | 2019-11-28 | 2020-05-08 | 稿定(厦门)科技有限公司 | Image local area highlight adjusting method, medium, equipment and device |
CN111127337B (en) * | 2019-11-28 | 2023-02-10 | 稿定(厦门)科技有限公司 | Image local area highlight adjusting method, medium, equipment and device |
CN113015006A (en) * | 2020-06-04 | 2021-06-22 | 海信视像科技股份有限公司 | Display apparatus and display method |
CN113766130A (en) * | 2021-09-13 | 2021-12-07 | 维沃移动通信有限公司 | Video shooting method, electronic equipment and device |
CN113766130B (en) * | 2021-09-13 | 2023-07-28 | 维沃移动通信有限公司 | Video shooting method, electronic equipment and device |
WO2023082859A1 (en) * | 2021-11-09 | 2023-05-19 | 深圳Tcl新技术有限公司 | Image processing method, image processor, electronic device, and storage medium |
CN114968952A (en) * | 2022-05-11 | 2022-08-30 | 沈阳东软智能医疗科技研究院有限公司 | Medical image data compression method, rendering method, device and medium |
CN114968952B (en) * | 2022-05-11 | 2023-06-16 | 沈阳东软智能医疗科技研究院有限公司 | Medical image data compression method, rendering method, device and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108230256A (en) | Image processing method, device, computer installation and computer readable storage medium | |
Jiang et al. | Image dehazing using adaptive bi-channel priors on superpixels | |
US20120219218A1 (en) | Automatic localized adjustment of image shadows and highlights | |
Li et al. | A multi-scale fusion scheme based on haze-relevant features for single image dehazing | |
US20140079319A1 (en) | Methods for enhancing images and apparatuses using the same | |
US20200126193A1 (en) | Method and device for video processing, electronic device, and storage medium | |
Gupta et al. | New contrast enhancement approach for dark images with non-uniform illumination | |
CN115115554B (en) | Image processing method and device based on enhanced image and computer equipment | |
CN108428215A (en) | A kind of image processing method, device and equipment | |
CN111626967A (en) | Image enhancement method, image enhancement device, computer device and readable storage medium | |
Parihar et al. | A comprehensive analysis of fusion-based image enhancement techniques | |
Abebe et al. | Towards an automatic correction of over-exposure in photographs: Application to tone-mapping | |
CN113052923B (en) | Tone mapping method, tone mapping apparatus, electronic device, and storage medium | |
CN111311500A (en) | Method and device for carrying out color restoration on image | |
CN114581318A (en) | Low-illumination image enhancement method and system | |
CN116681636B (en) | Light infrared and visible light image fusion method based on convolutional neural network | |
Lee et al. | Ramp distribution-based contrast enhancement techniques and over-contrast measure | |
CN112215237B (en) | Image processing method and device, electronic equipment and computer readable storage medium | |
Toh et al. | Implementation of high dynamic range rendering on acute leukemia slide images using contrast stretching | |
CN114648467A (en) | Image defogging method and device, terminal equipment and computer readable storage medium | |
CN114266803A (en) | Image processing method, image processing device, electronic equipment and storage medium | |
Choudhury et al. | Perceptually motivated automatic color contrast enhancement based on color constancy estimation | |
Zhou et al. | Saliency preserving decolorization | |
CN110351542A (en) | A kind of color correcting method and device for video frame | |
CN111833256A (en) | Image enhancement method, image enhancement device, computer device and readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20180629 |