CN111127337A - Image local area highlight adjusting method, medium, equipment and device - Google Patents

Image local area highlight adjusting method, medium, equipment and device Download PDF

Info

Publication number
CN111127337A
CN111127337A CN201911194875.9A CN201911194875A CN111127337A CN 111127337 A CN111127337 A CN 111127337A CN 201911194875 A CN201911194875 A CN 201911194875A CN 111127337 A CN111127337 A CN 111127337A
Authority
CN
China
Prior art keywords
image
highlight
value
adjusted
pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911194875.9A
Other languages
Chinese (zh)
Other versions
CN111127337B (en
Inventor
赖大虎
李文镇
林杰兴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gaoding Xiamen Technology Co Ltd
Original Assignee
Gaoding Xiamen Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Gaoding Xiamen Technology Co Ltd filed Critical Gaoding Xiamen Technology Co Ltd
Priority to CN201911194875.9A priority Critical patent/CN111127337B/en
Publication of CN111127337A publication Critical patent/CN111127337A/en
Application granted granted Critical
Publication of CN111127337B publication Critical patent/CN111127337B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/73Deblurring; 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

Image local area highlight adjusting method, medium, equipment and device
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a highlight adjustment method for a local area of an image, a computer-readable storage medium, a computer device, and a highlight adjustment apparatus for a local area of an image.
Background
In the process of shooting images, problems such as transition exposure 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.
A fourth object of the present invention is to provide an image 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:
Figure BDA0002294445620000021
wherein T represents a control parameter, T0And t represents the pixel value of any pixel point in the blurred image.
Optionally, the brightness adjustment coefficient is calculated by:
Figure BDA0002294445620000022
wherein Z represents a brightness adjustment coefficient, t0The 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.
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 invention, the local region highlight adjusting program of the image is stored, so that when the processor executes the local region highlight adjusting program of the image, the local region highlight adjusting method of the image is realized, thereby realizing local adjustment of the local region of the image, enabling the transition of the adjusted image to be natural, and ensuring the 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 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 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; 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 highlight adjusting device for the local area of the image, provided by the embodiment of the invention, the acquisition module is arranged for acquiring the image to be adjusted, the calculation module is used for calculating the gray scale image corresponding to the image to be adjusted and acquiring the highlight pixel threshold of the image to be adjusted according to the gray scale image so as to judge 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 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:
Figure BDA0002294445620000031
wherein T represents a control parameter, T0And t represents the pixel value of any pixel point in the blurred image.
Optionally, the brightness adjustment coefficient is calculated by:
Figure BDA0002294445620000032
wherein Z represents a brightness adjustment coefficient, t0The 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.
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 formula for calculating a brightness adjustment factor 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 can 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 solution, the technical solution will be described in detail with reference to the drawings and the 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 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.
As an example, first, values corresponding to three channels of each pixel R, G, B 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 set0A 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:
Figure BDA0002294445620000051
wherein T represents a control parameter, T0And t represents the pixel value of any pixel point in the blurred image.
It will be appreciated that, as shown in FIG. 2, t is shown in FIG. 20When t is 0.5, the control coefficient calculation formula corresponds to a curve, wherein t is a function of the image0May be different. Then, the variable t is the pixel value of any pixel point in the blurred image instead of the 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:
Figure BDA0002294445620000052
wherein Z represents a brightness adjustment coefficient, t0The 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, when the formula is simplified, Z ═ T × y + x × T is obtained, where y denotes a luminance reduction coefficient,
Figure BDA0002294445620000061
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 the case when t ═ x, hclip ═ 0.95, gAdjust ═ 3, and t ═ x, and gad ═ 0.950When the brightness is equal to 0.5, the curve corresponding to the brightness adjustment coefficient calculation formula; the broken line is a straight line y ═ x, and the broken line is taken as a reference line. Fig. 3 is a mapping curve from the image to be adjusted to the final image, where a horizontal axis represents a variable corresponding to a pixel value of a pixel point on the image to be adjusted, and a vertical axis represents a variable corresponding to a pixel value of a pixel point on the final image, and specifically, it can be known from the curve that when the variable corresponding to a pixel value of a pixel point in the image to be adjusted is 0.8, the variable corresponding to a pixel value of a 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 is consistent with the image pixel value to be adjusted, namely the pixel value is unchanged; that is, for the non-highlight region in the image to be adjusted, the pixel value is unchanged or slightly changed, 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 ═ gclujust (hclip x ═ gad)(x-1)) The part is a brightness reduction curve, when hclip is 0.95 and gAdjust is 3, the curve corresponding to the function is shown in fig. 4; specifically, hclip is a high-value suppression parameter, and the value range of the parameter can be set to [0.95,1.0 ]](ii) a This parameter is used to prevent the pixel value from decreasing when x is 1 and y is 1; gAdjust is the 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; 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 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 invention, the local region highlight adjusting program of the image is stored, so that when the processor executes the local region highlight adjusting program of the image, the local region highlight adjusting method of the image is realized, thereby realizing local adjustment of the local region of the image, enabling the transition of the adjusted image to be natural, and ensuring the 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 achieve the above 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:
Figure BDA0002294445620000071
wherein T represents a control parameter, T0And t represents the pixel value of any pixel point in the blurred image.
In some embodiments, the brightness adjustment coefficient is calculated by:
Figure BDA0002294445620000081
wherein Z represents a brightness adjustment coefficient, t0The 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 adjusting method in the local area of the image in fig. 1 is also applicable to the highlight adjusting 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 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.
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 may 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 may 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 implying any number of technical features indicated. 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," "over," and "above" a second feature may be directly or diagonally above the second feature, or may simply indicate 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 schematic representations of the terms used above should not be understood to necessarily refer 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 is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, 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 (10)

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 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.
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 highlight in image according to any one of claims 1-3, wherein said control parameter is calculated by the following formula:
Figure FDA0002294445610000011
wherein T represents a control parameter, T0And t represents the pixel value of any pixel point in the blurred image.
5. 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:
Figure FDA0002294445610000012
wherein Z represents a brightness adjustment coefficient, t0The 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.
6. 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 5.
7. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method for highlight adjustment of local area of an image according to any of claims 1-5 when executing the program.
8. 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 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;
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.
9. The apparatus according to claim 8, wherein the control parameter is calculated by the following formula:
Figure FDA0002294445610000021
wherein T represents a control parameter, T0And t represents the pixel value of any pixel point in the blurred image.
10. The image local area highlight adjusting device according to claim 8, wherein said brightness adjusting coefficient is calculated by:
Figure FDA0002294445610000022
wherein Z represents a brightness adjustment coefficient, t0The 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.
CN201911194875.9A 2019-11-28 2019-11-28 Image local area highlight adjusting method, medium, equipment and device Active CN111127337B (en)

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 true CN111127337A (en) 2020-05-08
CN111127337B 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)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112261306A (en) * 2020-09-27 2021-01-22 厦门亿联网络技术股份有限公司 Backlight judgment method, device, equipment and storage medium
CN113361548A (en) * 2021-07-05 2021-09-07 北京理工导航控制科技股份有限公司 Local feature description and matching method for highlight image
CN117495722A (en) * 2023-12-25 2024-02-02 青岛天仁微纳科技有限责任公司 Image processing method for nanoimprint lithography

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090251400A1 (en) * 2008-04-02 2009-10-08 Hisense Beiging Electric Co., Ltd. Lcd display method
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

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090251400A1 (en) * 2008-04-02 2009-10-08 Hisense Beiging Electric Co., Ltd. Lcd display method
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

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112261306A (en) * 2020-09-27 2021-01-22 厦门亿联网络技术股份有限公司 Backlight judgment method, device, equipment and storage medium
CN112261306B (en) * 2020-09-27 2021-10-08 厦门亿联网络技术股份有限公司 Backlight judgment method, device, equipment and storage medium
CN113361548A (en) * 2021-07-05 2021-09-07 北京理工导航控制科技股份有限公司 Local feature description and matching method for highlight image
CN113361548B (en) * 2021-07-05 2023-11-14 北京理工导航控制科技股份有限公司 Local feature description and matching method for highlight image
CN117495722A (en) * 2023-12-25 2024-02-02 青岛天仁微纳科技有限责任公司 Image processing method for nanoimprint lithography
CN117495722B (en) * 2023-12-25 2024-03-29 青岛天仁微纳科技有限责任公司 Image processing method for nanoimprint lithography

Also Published As

Publication number Publication date
CN111127337B (en) 2023-02-10

Similar Documents

Publication Publication Date Title
CN109191395B (en) Image contrast enhancement method, device, equipment and storage medium
CN108174118B (en) Image processing method and device and electronic equipment
CN111127337B (en) Image local area highlight adjusting method, medium, equipment and device
KR101742120B1 (en) Apparatus and method for image processing
US9218653B2 (en) Method and apparatus for dynamic range enhancement of an image
JP5726914B2 (en) Parameter interpolation for high dynamic range video tone mapping
CN110766639B (en) Image enhancement method and device, mobile equipment and computer readable storage medium
CN108665428B (en) Image enhancement method, device, equipment and storage medium
JP5356666B2 (en) Apparatus and method for image brightness correction
JP2011041276A (en) Blur correction method, blur correcting device and computer readable medium
KR101207084B1 (en) Method of processing image and apparatus for the same
CN113989127A (en) Image contrast adjusting method, system, equipment and computer storage medium
US9258490B2 (en) Smoothing of ghost maps in a ghost artifact detection method for HDR image creation
RU2679542C1 (en) Device and program for image processing
CN110706161B (en) Image brightness adjusting method, medium, device and apparatus
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
CN110009082B (en) Three-dimensional code optimization method, medium, computer device and apparatus
CN105635596B (en) System for controlling exposure of camera and method thereof
CN114723632A (en) Part abnormal exposure image correction method and device based on texture information
CN111681189B (en) Method, device, equipment and storage medium for improving image brightness uniformity

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