CN111127337B - Image local area highlight adjusting method, medium, equipment and device - Google Patents
Image local area highlight adjusting method, medium, equipment and device Download PDFInfo
- Publication number
- CN111127337B CN111127337B CN201911194875.9A CN201911194875A CN111127337B CN 111127337 B CN111127337 B CN 111127337B CN 201911194875 A CN201911194875 A CN 201911194875A CN 111127337 B CN111127337 B CN 111127337B
- Authority
- CN
- China
- Prior art keywords
- image
- highlight
- value
- pixel
- adjusted
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 41
- 238000004364 calculation method Methods 0.000 claims description 15
- 238000004590 computer program Methods 0.000 claims description 12
- 230000001629 suppression Effects 0.000 claims description 3
- 230000000694 effects Effects 0.000 abstract description 13
- 230000007704 transition Effects 0.000 abstract description 11
- 238000010586 diagram Methods 0.000 description 9
- 230000006870 function Effects 0.000 description 6
- 238000012986 modification Methods 0.000 description 6
- 230000004048 modification Effects 0.000 description 6
- 230000008569 process Effects 0.000 description 5
- 230000009467 reduction Effects 0.000 description 5
- 230000005764 inhibitory process Effects 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 230000004075 alteration Effects 0.000 description 2
- 230000001186 cumulative effect Effects 0.000 description 2
- 241001270131 Agaricus moelleri Species 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/90—Dynamic range modification of images or parts thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/73—Deblurring; Sharpening
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
- Facsimile Image Signal Circuits (AREA)
Abstract
The invention discloses a highlight adjusting method, medium, equipment and device for a local area of an image, wherein the method comprises the following steps: acquiring an image to be adjusted, calculating a gray scale image corresponding to the image to be adjusted, and acquiring a highlight pixel threshold of the image to be adjusted according to the gray scale image; performing Gaussian blur processing on the gray level image to obtain a blurred image corresponding to the gray level image, calculating a control coefficient of a pixel point in the image to be adjusted according to the blurred image and the highlight pixel threshold value, and calculating a brightness adjustment coefficient according to the control coefficient; calculating the brightness adjustment value of a pixel point in the image to be adjusted according to the brightness adjustment coefficient so as to adjust the brightness of the image to be adjusted according to the brightness adjustment value; the image highlight region can be locally adjusted, the transition of the adjusted image is natural, and the final display effect of the image is guaranteed.
Description
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a highlight adjusting method for a local area of an image, a computer readable storage medium, a computer device, and a highlight adjusting apparatus for a local area of an image.
Background
In the process of shooting images, problems such as overexposure and the like often occur. Therefore, in order to make the final display effect of the image better, brightness adjustment is often required to be performed on the highlight area of the image.
In the related art, when the highlight area is adjusted, the image is often damaged due to the adjustment operation, that is, in the adjustment process, the image gray scale is easily too high due to the simultaneous decrease of the brightness of the dark area, or the light and shadow are attached to and float on the surface due to the unreasonable adjustment, so that the final image display effect is unnatural.
Disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the art described above. Therefore, an object of the present invention is to provide a highlight adjusting method for a local area of an image, which can implement local adjustment on the highlight area of the image, make the transition of the adjusted image natural, and ensure the final display effect of the image.
A second object of the invention is to propose a computer-readable storage medium.
A third object of the invention is to propose a computer device.
The fourth object of the present invention is to provide a local area highlight adjusting device.
In order to achieve the above object, an embodiment of a first aspect of the present invention provides a method for adjusting local area highlight of an image, including the following steps: acquiring an image to be adjusted, calculating a gray scale image corresponding to the image to be adjusted, and acquiring a highlight pixel threshold of the image to be adjusted according to the gray scale image; performing Gaussian blur processing on the gray level image to obtain a blurred image corresponding to the gray level image, calculating a control coefficient of a pixel point in the image to be adjusted according to the blurred image and the highlight pixel threshold value, and calculating a brightness adjustment coefficient according to the control coefficient; and calculating the brightness adjustment value of the pixel point in the image to be adjusted according to the brightness adjustment coefficient so as to adjust the brightness of the image to be adjusted according to the brightness adjustment value.
According to the highlight adjusting method for the local area of the image, firstly, the image to be adjusted is obtained, a gray scale map corresponding to the image to be adjusted is calculated, and a highlight pixel threshold for judging a highlight area and a non-highlight area is obtained according to the gray scale map; secondly, performing Gaussian blur processing on the gray level image to obtain a blurred image corresponding to the gray level image, calculating a control coefficient of a pixel point in the image to be adjusted according to the blurred image and a highlight pixel threshold value, and calculating a brightness adjustment coefficient according to the control coefficient; then, calculating a brightness adjustment value of a pixel point in the image to be adjusted according to the brightness adjustment coefficient so as to adjust the brightness of the image to be adjusted according to the brightness adjustment value; therefore, local adjustment of the highlight area of the image is realized, the transition of the adjusted image is natural, and the final display effect of the image is ensured.
In addition, the highlight adjustment method for the local area of the image proposed by the above embodiment of the present invention may further have the following additional technical features:
optionally, calculating a grayscale map corresponding to the image to be adjusted includes: and acquiring RGB three-channel values of pixel points in the image to be adjusted, calculating an average value of a maximum value and a minimum value in the RGB three-channel values corresponding to the pixel points, and generating a gray-scale image corresponding to the image to be adjusted according to the average value.
Optionally, obtaining a highlight pixel threshold of the image to be adjusted according to the gray-scale map includes: and calculating a histogram corresponding to the gray-scale image, and calculating a highlight pixel threshold value according to the histogram and a preset highlight ratio value.
Optionally, the control parameter is calculated by the following formula:
wherein T represents a control parameter, T 0 And t represents the pixel value of any pixel point in the blurred image.
Optionally, the brightness adjustment coefficient is calculated by:
wherein Z represents a brightness adjustment coefficient, t 0 The method comprises the steps of representing a highlight area pixel threshold value, t representing the pixel value of any pixel point in the blurred image, hclip representing a high-value inhibition parameter, x representing a variable corresponding to the pixel value of any pixel point in the image to be adjusted, and gAdjust representing an intensity value parameter.
In order to achieve the above object, a second aspect of the present invention provides a computer-readable storage medium, on which an image local area highlight adjusting program is stored, which, when executed by a processor, implements the image local area highlight adjusting method as described above.
According to the computer-readable storage medium of the embodiment of the present invention, the highlight adjustment program of the local area of the image is stored, so that when the processor executes the highlight adjustment program of the local area of the image, the highlight adjustment method of the local area of the image is implemented, thereby implementing local adjustment of the highlight area of the image, enabling transition of the adjusted image to be natural, and ensuring a final display effect of the image.
In order to achieve the above object, a third embodiment of the present invention provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the local area highlight adjustment method as described above.
According to the computer equipment provided by the embodiment of the invention, the local image highlight adjusting program is stored through the memory, so that when the processor executes the local image highlight adjusting program stored in the memory, the local image highlight adjusting method is realized, the local image highlight adjusting is realized, the transition of the adjusted image is natural, and the final display effect of the image is ensured.
In order to achieve the above object, a fourth aspect of the present invention provides an image local area highlight adjusting apparatus, including: the device comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring an image to be adjusted; the calculation module is used for calculating a gray scale image corresponding to the image to be adjusted and acquiring a highlight pixel threshold of the image to be adjusted according to the gray scale image; the calculation module is further configured to perform gaussian blur processing on the grayscale image to obtain a blurred image corresponding to the grayscale image, calculate a control coefficient of a pixel in the image to be adjusted according to the blurred image and the highlight pixel threshold, and calculate a brightness adjustment coefficient according to the control coefficient; and the adjusting module is used for calculating the brightness adjusting value of the pixel point in the image to be adjusted according to the brightness adjusting coefficient so as to adjust the brightness of the image to be adjusted according to the brightness adjusting value.
According to the image local area highlight adjusting device provided by the embodiment of the invention, the acquisition module is arranged for acquiring an image to be adjusted, the calculation module is used for calculating a gray scale image corresponding to the image to be adjusted and acquiring a highlight pixel threshold of the image to be adjusted according to the gray scale image so as to judge a highlight area in the image to be adjusted according to the highlight pixel threshold; the calculation module is also used for carrying out Gaussian blur processing on the gray level image to obtain a blurred image corresponding to the gray level image, calculating a control coefficient of a pixel point in the image to be adjusted according to the blurred image and the highlight pixel threshold value, and calculating a brightness adjustment coefficient according to the control coefficient; the adjusting module is used for calculating the brightness adjusting value of the pixel point in the image to be adjusted according to the brightness adjusting coefficient so as to adjust the brightness of the image to be adjusted according to the brightness adjusting value; therefore, local adjustment of the highlight area of the image is realized, the transition of the adjusted image is natural, and the final display effect of the image is ensured.
In addition, the highlight adjusting device for the local area of the image proposed by the above embodiment of the present invention may further have the following additional technical features:
optionally, the control parameter is calculated by the following formula:
wherein T represents a control parameter, T 0 And t represents the pixel value of any pixel point in the blurred image.
Optionally, the brightness adjustment coefficient is calculated by:
wherein Z represents a brightness adjustment coefficient, t 0 Expressing a high-light area pixel threshold value, t expressing a pixel value of any pixel point in the blurred image, hclip expressing a high-value inhibition parameter, and x expressing a pixel value of any pixel point in the image to be adjustedThe variable corresponding to the prime value, gAdjust, represents the intensity value parameter.
Drawings
FIG. 1 is a flowchart illustrating a highlight adjusting method for a local area of an image according to an embodiment of the present invention;
FIG. 2 is a graph illustrating a control parameter calculation formula according to an embodiment of the present invention;
FIG. 3 is a graph illustrating a brightness adjustment factor calculation formula according to an embodiment of the present invention;
FIG. 4 is a graph illustrating a luminance reduction curve according to an embodiment of the present invention;
FIG. 5 is a block diagram of a local area highlight adjusting device according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
According to the highlight adjusting method for the local area of the image, firstly, the image to be adjusted is obtained, a gray scale image corresponding to the image to be adjusted is calculated, and a highlight pixel threshold value used for judging the highlight area and the non-highlight area is obtained according to the gray scale image; secondly, performing Gaussian blur processing on the gray level image to obtain a blurred image corresponding to the gray level image, calculating a control coefficient of a pixel point in the image to be adjusted according to the blurred image and a highlight pixel threshold value, and calculating a brightness adjustment coefficient according to the control coefficient; then, calculating a brightness adjustment value of a pixel point in the image to be adjusted according to the brightness adjustment coefficient so as to adjust the brightness of the image to be adjusted according to the brightness adjustment value; therefore, local adjustment of the highlight area of the image is realized, the transition of the adjusted image is natural, and the final display effect of the image is ensured.
In order to better understand the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
In order to better understand the technical scheme, the technical scheme is described in detail in the following with reference to the attached drawings of the specification and specific embodiments.
Referring to fig. 1, fig. 1 is a schematic flow chart of a highlight adjusting method for a local area of an image according to an embodiment of the present invention, as shown in fig. 1, the highlight adjusting method for the local area of the image includes the following steps:
s101, obtaining an image to be adjusted, calculating a gray scale image corresponding to the image to be adjusted, and obtaining a highlight pixel threshold of the image to be adjusted according to the gray scale image.
The method for calculating the gray scale map corresponding to the image to be adjusted may be various.
In some embodiments, calculating the gray scale map corresponding to the image to be adjusted includes: the method comprises the steps of obtaining RGB three-channel values of pixel points in an image to be adjusted, calculating the average value of the maximum value and the minimum value in the RGB three-channel values corresponding to the pixel points, and generating a gray-scale image corresponding to the image to be adjusted according to the average value.
As an example, first, values corresponding to three channels R, G, and B of each pixel are obtained, then a maximum value and a minimum value of the values corresponding to the three channels are calculated, then an average value of the maximum value and the minimum value is calculated to use the average value as a gray scale value of the pixel, and then a gray scale map corresponding to an image to be adjusted is obtained.
There are various ways to obtain the highlight pixel threshold of the image to be adjusted according to the gray-scale image.
In some embodiments, obtaining the highlight pixel threshold of the image to be adjusted from the gray scale map comprises: and calculating a histogram corresponding to the gray-scale image, and calculating a highlight pixel threshold value according to the histogram and a preset highlight ratio value.
As an example, after acquiring the gray scale map, the gray scale map is first counted to acquire a histogram corresponding to the gray scale map, and then t is set 0 A highlight pixel threshold for distinguishing highlight regions from non-highlight regions; then, a cumulative histogram corresponding to the gray scale map is calculated from 255 gray scales downward, and then, according to a preset highlight ratio (for example, 30%), a pixel value corresponding to the highlight ratio in the cumulative histogram is a highlight pixel threshold.
S102, carrying out Gaussian blur processing on the gray level image to obtain a blurred image corresponding to the gray level image, calculating a control coefficient of a pixel point in the image to be adjusted according to the blurred image and the highlight pixel threshold value, and calculating a brightness adjustment coefficient according to the control coefficient.
As an example, in the process of performing the gaussian blur processing on the grayscale map, the gaussian blur radius may be adaptively changed according to the size of the image to be adjusted; specifically, if the size of the image to be adjusted is larger than a preset threshold, the image to be adjusted is considered as a large image, and the gaussian blur radius is selected to be 100.
The control coefficient may be calculated in various manners.
In some embodiments, the control parameter is calculated by the following formula:
wherein T represents a control parameter, T 0 And t represents the pixel value of any pixel point in the blurred image.
It will be appreciated that, as shown in FIG. 2, FIG. 2 is t 0 A curve corresponding to the control coefficient calculation formula when =0.5, wherein it is understood from the above that t corresponds to different images 0 May be different. Then, the variable t is selected from any pixel point in the blurred imagePixel value, rather than pixel value of any pixel point in the gray image; therefore, the change between adjacent pixel points is close to a proportion, and the brightness change of the final image is smoother and more natural.
The brightness adjustment coefficient may be calculated in various ways.
In some embodiments, the brightness adjustment coefficient is calculated by:
wherein Z represents a brightness adjustment coefficient, t 0 The method comprises the steps of representing a high-light area pixel threshold value, representing a pixel value of any pixel point in the blurred image by t, representing a high-value inhibition parameter by hclip, representing a variable corresponding to the pixel value of any pixel point in the image to be adjusted by x, and representing an intensity value parameter by gAdjust.
It can be understood that, in the above calculation process of the brightness adjustment coefficient, a control coefficient is used; that is, if the formula is simplified, Z = T x y + x T, where y denotes a luminance reduction coefficient,part of the calculation is the calculation of the control coefficient, which is not described herein.
As an example, as shown in fig. 3, fig. 3 shows that when t = x, hclip =0.95, gadjust =3,t 0 When =0.5, the curve corresponding to the brightness adjustment coefficient calculation formula; and the dashed line is a straight line y = x, which is taken as a reference line. Fig. 3 is a mapping curve from the image to be adjusted to the final image, where the horizontal axis represents a variable corresponding to the pixel value of the pixel point on the image to be adjusted, and the vertical axis represents a variable corresponding to the pixel value of the pixel point on the final image, and specifically, it can be known from the curve that when the variable corresponding to the pixel value of one pixel point in the image to be adjusted is 0.8, the variable corresponding to the pixel value of the corresponding pixel point on the final image is 0.7865 according to the curve. When x is smaller than 0.5, the final image pixel value and the image pixel value to be adjustedThe image pixel values are consistent, namely the pixel values are unchanged; that is, for a non-highlight region in an image to be adjusted, the pixel value is unchanged or changes little, and the pixel value change of the highlight region is obvious; therefore, the aim of really reducing the high light is achieved, and the over-high gray level of the image is prevented.
The brightness reduction coefficient may be calculated in various ways.
As an example, the brightness reduction coefficient is set to be a constant, and when the RGB three-channel values corresponding to the pixel points are obtained, the value of each channel is reduced by a preset constant, so as to achieve the purpose of reducing the brightness.
As another example, y = (hclip x gdadjust) (x-1) ) Part of the curve is a brightness reduction curve, and when hclip =0.95 and gadjust =3, the curve corresponding to the function is shown in fig. 4; specifically, hclip is a high-value suppression parameter that can be set to a value range of [0.95,1.0 ]](ii) a This parameter is used to prevent the pixel value from decreasing when x =1 and y = 1; gAdjust is an intensity value parameter with a range of [1,3 ]](ii) a Therefore, when the value of gAdjust is 3 and the value of hclip is 0.95, the light is reduced to the maximum copy, and when both the values of gAdjust and hclip are 1, the brightness is not adjusted for the current original.
S103, calculating the brightness adjustment value of the pixel point in the image to be adjusted according to the brightness adjustment coefficient so as to adjust the brightness of the image to be adjusted according to the brightness adjustment value.
In summary, according to the highlight adjusting method for the local area of the image in the embodiment of the present invention, first, an image to be adjusted is obtained, a gray scale map corresponding to the image to be adjusted is calculated, and a highlight pixel threshold for determining the highlight area and the non-highlight area is obtained according to the gray scale map; then, carrying out Gaussian blur processing on the gray level image to obtain a blurred image corresponding to the gray level image, calculating a control coefficient of a pixel point in the image to be adjusted according to the blurred image and a highlight pixel threshold value, and calculating a brightness adjustment coefficient according to the control coefficient; then, calculating the brightness adjustment value of a pixel point in the image to be adjusted according to the brightness adjustment coefficient so as to adjust the brightness of the image to be adjusted according to the brightness adjustment value; therefore, local adjustment of the highlight area of the image is realized, the transition of the adjusted image is natural, and the final display effect of the image is ensured.
In order to achieve the above embodiments, an embodiment of the present invention proposes a computer-readable storage medium, on which an image local area highlight adjustment program is stored, which, when executed by a processor, implements the image local area highlight adjustment method as described above.
According to the computer-readable storage medium of the embodiment of the present invention, the highlight adjustment program of the local area of the image is stored, so that when the processor executes the highlight adjustment program of the local area of the image, the highlight adjustment method of the local area of the image is implemented, thereby implementing local adjustment of the highlight area of the image, enabling transition of the adjusted image to be natural, and ensuring a final display effect of the image.
In order to implement the foregoing embodiments, an embodiment of the present invention provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the highlight adjustment method for the local area of the image as described above.
According to the computer equipment provided by the embodiment of the invention, the local image highlight adjusting program is stored through the memory, so that when the processor executes the local image highlight adjusting program stored in the memory, the local image highlight adjusting method is realized, the local image highlight adjusting is realized, the transition of the adjusted image is natural, and the final display effect of the image is ensured.
In order to implement the foregoing embodiments, an embodiment of the present invention provides an image local area highlight adjusting apparatus, as shown in fig. 5, the image local area highlight adjusting apparatus includes: an acquisition module 10, a calculation module 20 and an adjustment module 30.
The obtaining module 10 is configured to obtain an image to be adjusted;
the calculating module 20 is configured to calculate a grayscale corresponding to the image to be adjusted, and obtain a highlight pixel threshold of the image to be adjusted according to the grayscale;
the calculating module 20 is further configured to perform gaussian blur processing on the grayscale image to obtain a blurred image corresponding to the grayscale image, calculate a control coefficient of a pixel point in the image to be adjusted according to the blurred image and the highlight pixel threshold, and calculate a brightness adjustment coefficient according to the control coefficient;
the adjusting module 30 is configured to calculate a brightness adjustment value of a pixel point in the image to be adjusted according to the brightness adjustment coefficient, so as to adjust the brightness of the image to be adjusted according to the brightness adjustment value.
In some embodiments, the control parameter is calculated by the following formula:
wherein T represents a control parameter, T 0 And t represents the pixel value of any pixel point in the blurred image.
In some embodiments, the brightness adjustment coefficient is calculated by:
wherein Z represents a brightness adjustment coefficient, t 0 The method comprises the steps of representing a high-light area pixel threshold value, representing a pixel value of any pixel point in the blurred image by t, representing a high-value inhibition parameter by hclip, representing a variable corresponding to the pixel value of any pixel point in the image to be adjusted by x, and representing an intensity value parameter by gAdjust.
It should be noted that the above description about the highlight adjustment method in the local area of the image in fig. 1 is also applicable to the highlight adjustment device in the local area of the image, and is not repeated herein.
In summary, according to the highlight adjusting device for the local area of the image in the embodiment of the present invention, the obtaining module is configured to obtain the image to be adjusted, the calculating module is configured to calculate the gray scale map corresponding to the image to be adjusted, and obtain the highlight pixel threshold of the image to be adjusted according to the gray scale map, so as to determine the highlight area in the image to be adjusted according to the highlight pixel threshold; the calculation module is also used for carrying out Gaussian blur processing on the gray level image to obtain a blurred image corresponding to the gray level image, calculating a control coefficient of a pixel point in the image to be adjusted according to the blurred image and a highlight pixel threshold value, and calculating a brightness adjustment coefficient according to the control coefficient; the adjusting module is used for calculating the brightness adjusting value of the pixel point in the image to be adjusted according to the brightness adjusting coefficient so as to adjust the brightness of the image to be adjusted according to the brightness adjusting value; therefore, local adjustment of the highlight area of the image is realized, the transition of the adjusted image is natural, and the final display effect of the image is ensured.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means can be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.
In the description of the present invention, it is to be understood that the terms "first", "second", and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or to imply that the number of technical features indicated are in fact significant. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
In the present invention, unless otherwise expressly stated or limited, the terms "mounted," "connected," "secured," and the like are to be construed broadly and can, for example, be fixedly connected, detachably connected, or integrally formed; can be mechanically or electrically connected; either directly or indirectly through intervening media, either internally or in any other relationship. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In the present invention, unless otherwise expressly stated or limited, the first feature "on" or "under" the second feature may be directly contacting the first and second features or indirectly contacting the first and second features through an intermediate. Also, a first feature "on," "above," and "over" a second feature may be directly on or obliquely above the second feature, or simply mean that the first feature is at a higher level than the second feature. A first feature being "under," "below," and "beneath" a second feature may be directly under or obliquely under the first feature, or may simply mean that the first feature is at a lesser elevation than the second feature.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the terminology used in the description presented above should not be understood as necessarily referring to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Although embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are exemplary and not to be construed as limiting the present invention, and that changes, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.
Claims (8)
1. A highlight adjusting method for local areas of an image is characterized by comprising the following steps:
acquiring an image to be adjusted, calculating a gray scale image corresponding to the image to be adjusted, and acquiring a highlight pixel threshold of the image to be adjusted according to the gray scale image;
performing Gaussian blur processing on the gray image to obtain a blurred image corresponding to the gray image, calculating a control coefficient of a pixel point in the image to be adjusted according to the blurred image and the highlight pixel threshold, and calculating a brightness adjustment coefficient according to the control coefficient;
calculating the brightness adjustment value of a pixel point in the image to be adjusted according to the brightness adjustment coefficient so as to adjust the brightness of the image to be adjusted according to the brightness adjustment value;
the control coefficient is calculated by the following formula:
2. The method for adjusting highlight in local area of image according to claim 1, wherein calculating the gray map corresponding to the image to be adjusted comprises:
and acquiring RGB three-channel values of pixel points in the image to be adjusted, calculating an average value of a maximum value and a minimum value in the RGB three-channel values corresponding to the pixel points, and generating a gray-scale image corresponding to the image to be adjusted according to the average value.
3. The method for highlight adjustment in local area of image according to claim 1, wherein obtaining highlight pixel threshold of the image to be adjusted according to the gray-scale map comprises:
and calculating a histogram corresponding to the gray-scale image, and calculating a highlight pixel threshold value according to the histogram and a preset highlight ratio value.
4. The method for adjusting local area highlight of image according to any of claims 1-3, characterized in that said brightness adjustment coefficient is calculated by:
wherein,which represents the brightness adjustment coefficient, is,representing high light pixel thresholdValue of,a pixel value representing any one pixel point in the blurred image,a high value of the suppression parameter is indicated,representing the variable corresponding to the pixel value of any pixel point in the image to be adjusted,representing an intensity value parameter.
5. A computer-readable storage medium, on which an image local area highlight adjustment program is stored, which when executed by a processor implements the image local area highlight adjustment method according to any one of claims 1 to 4.
6. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the program to implement the local area highlight adjustment method according to any one of claims 1 to 4.
7. An image local area highlight adjusting device is characterized by comprising:
the acquisition module is used for acquiring an image to be adjusted;
the calculation module is used for calculating a gray scale image corresponding to the image to be adjusted and acquiring a highlight pixel threshold of the image to be adjusted according to the gray scale image;
the calculation module is further configured to perform gaussian blur processing on the grayscale image to obtain a blurred image corresponding to the grayscale image, calculate a control coefficient of a pixel in the image to be adjusted according to the blurred image and the highlight pixel threshold, and calculate a brightness adjustment coefficient according to the control coefficient;
the adjusting module is used for calculating the brightness adjusting value of a pixel point in the image to be adjusted according to the brightness adjusting coefficient so as to adjust the brightness of the image to be adjusted according to the brightness adjusting value;
the control coefficient is calculated by the following formula:
8. The highlight adjusting device for local area of image according to claim 7, wherein said brightness adjusting factor is calculated by:
wherein,which represents the brightness adjustment coefficient, is,indicating a high light pixel threshold value that is,a pixel value representing any one pixel point in the blurred image,a high value of the suppression parameter is indicated,representing the variable corresponding to the pixel value of any pixel point in the image to be adjusted,representing an intensity value parameter.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911194875.9A CN111127337B (en) | 2019-11-28 | 2019-11-28 | Image local area highlight adjusting method, medium, equipment and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911194875.9A CN111127337B (en) | 2019-11-28 | 2019-11-28 | Image local area highlight adjusting method, medium, equipment and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111127337A CN111127337A (en) | 2020-05-08 |
CN111127337B true CN111127337B (en) | 2023-02-10 |
Family
ID=70496998
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911194875.9A Active CN111127337B (en) | 2019-11-28 | 2019-11-28 | Image local area highlight adjusting method, medium, equipment and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111127337B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112261306B (en) * | 2020-09-27 | 2021-10-08 | 厦门亿联网络技术股份有限公司 | Backlight judgment method, device, equipment and storage medium |
CN113361548B (en) * | 2021-07-05 | 2023-11-14 | 北京理工导航控制科技股份有限公司 | Local feature description and matching method for highlight image |
CN117495722B (en) * | 2023-12-25 | 2024-03-29 | 青岛天仁微纳科技有限责任公司 | Image processing method for nanoimprint lithography |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104715445A (en) * | 2013-12-13 | 2015-06-17 | 腾讯科技(深圳)有限公司 | Image processing method and system |
CN105809128A (en) * | 2016-03-08 | 2016-07-27 | 厦门美图之家科技有限公司 | Eye pupil positioning method and system for eye part image and shooting terminal |
CN107895352A (en) * | 2017-10-30 | 2018-04-10 | 维沃移动通信有限公司 | A kind of image processing method and mobile terminal |
CN108230256A (en) * | 2017-11-09 | 2018-06-29 | 珠海市魅族科技有限公司 | Image processing method, device, computer installation and computer readable storage medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090251400A1 (en) * | 2008-04-02 | 2009-10-08 | Hisense Beiging Electric Co., Ltd. | Lcd display method |
-
2019
- 2019-11-28 CN CN201911194875.9A patent/CN111127337B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104715445A (en) * | 2013-12-13 | 2015-06-17 | 腾讯科技(深圳)有限公司 | Image processing method and system |
CN105809128A (en) * | 2016-03-08 | 2016-07-27 | 厦门美图之家科技有限公司 | Eye pupil positioning method and system for eye part image and shooting terminal |
CN107895352A (en) * | 2017-10-30 | 2018-04-10 | 维沃移动通信有限公司 | A kind of image processing method and mobile terminal |
CN108230256A (en) * | 2017-11-09 | 2018-06-29 | 珠海市魅族科技有限公司 | Image processing method, device, computer installation and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111127337A (en) | 2020-05-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111127337B (en) | Image local area highlight adjusting method, medium, equipment and device | |
CN109191395B (en) | Image contrast enhancement method, device, equipment and storage medium | |
KR101742120B1 (en) | Apparatus and method for image processing | |
CN109801240B (en) | Image enhancement method and image enhancement device | |
CN110766639B (en) | Image enhancement method and device, mobile equipment and computer readable storage medium | |
KR102145201B1 (en) | Method and apparatus for dynamic range enhancement of an image | |
JP5726914B2 (en) | Parameter interpolation for high dynamic range video tone mapping | |
CN103778599B (en) | A kind of image processing method and system | |
CN108665428B (en) | Image enhancement method, device, equipment and storage medium | |
JP6097588B2 (en) | Image processing apparatus and image processing method | |
RU2009123903A (en) | DEVICE AND METHODS FOR INCREASING DYNAMIC RANGE IN DIGITAL IMAGES | |
WO2014168587A1 (en) | Method and system for processing an input image | |
JP2008086015A (en) | Apparatus and method for compensating brightness of image | |
CN112967273B (en) | Image processing method, electronic device, and storage medium | |
CN112640413B (en) | Method for displaying a model of the surroundings, control device and vehicle | |
JP2012175310A (en) | Image processing apparatus and image processing method | |
CN105139345B (en) | A kind of automatic search method of high-quality non-standard gamma curve | |
CN108475418B (en) | Image processing apparatus and recording medium | |
US20150154468A1 (en) | Method and device for image processing | |
CN111784598A (en) | Method for training tone mapping model, tone mapping method and electronic equipment | |
US9210335B2 (en) | Method for generating HDR images using modified weight | |
US20220237755A1 (en) | Image enhancement method and image processing device | |
CN106780400B (en) | Image processing method and device | |
CN115423723A (en) | Self-adaptive railway wagon anomaly detection training set image enhancement method | |
CN112132742A (en) | Particle-based adaptive halo image generation method and device |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |