[go: nahoru, domu]

CN107203982A - A kind of image processing method and device - Google Patents

A kind of image processing method and device Download PDF

Info

Publication number
CN107203982A
CN107203982A CN201710493809.6A CN201710493809A CN107203982A CN 107203982 A CN107203982 A CN 107203982A CN 201710493809 A CN201710493809 A CN 201710493809A CN 107203982 A CN107203982 A CN 107203982A
Authority
CN
China
Prior art keywords
gray
image
value
standard deviation
pixel point
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.)
Pending
Application number
CN201710493809.6A
Other languages
Chinese (zh)
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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201710493809.6A priority Critical patent/CN107203982A/en
Publication of CN107203982A publication Critical patent/CN107203982A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • G06T5/94Dynamic range modification of images or parts thereof based on local image properties, e.g. for local contrast enhancement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20004Adaptive image processing
    • G06T2207/20012Locally adaptive
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20172Image enhancement details

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 present invention proposes a kind of image processing method, and this method performs following operate to the pixel in pending image:Calculating is obtained in described image, centered on the pixel, the gray average and gray standard deviation of the image-region being sized;The gray average is judged whether in the range of the first threshold of setting, and judges the gray standard deviation whether in the range of the Second Threshold of setting;If the gray average is in the range of the first threshold of setting, and the gray standard deviation is in the range of the Second Threshold of setting, then according to the gray average and gray standard deviation, and enhancing processing is carried out to the gray value of the pixel.Using technical solution of the present invention, the gray average and gray standard deviation of image-region realize the enhancing processing that differentiation is carried out to different pixels point as the foundation that grey level enhancement is carried out to pixel using around pixel.

Description

Image processing method and device
Technical Field
The present invention relates to the field of digital image processing technologies, and in particular, to an image processing method and apparatus.
Background
The image enhancement is to purposefully emphasize the overall or local characteristics of an image, so that an original unclear image is made clear or some interesting features are emphasized, thereby improving the image quality, enriching the image information quantity and enhancing the image interpretation and recognition effects.
Histogram equalization is a commonly used image enhancement algorithm. Histogram equalization is to transform an image with known gray scale probability distribution into an image with uniform gray scale probability distribution. The histogram equalization realizes the integral gray level equalization of the image and the integral enhancement processing of the image. In fact, the gray scale characteristics of different parts of the image are different, and the enhancement processing required should be different. Therefore, the overall image enhancement processing of one image is obviously not in accordance with the gray characteristic difference of each part of the image.
The traditional image enhancement algorithm based on the local mean and the standard deviation can make up the defects of the image enhancement algorithm to a certain extent. The traditional image enhancement algorithm based on the local mean and the standard deviation can automatically identify pixel points needing enhancement according to the gray mean and the gray standard deviation of the image, and carry out gray enhancement processing on the identified pixel points. The gray level enhancement processing of the identified pixel points needing to be enhanced is performed by the same multiple of the gray level enhancement of the pixel points needing to be enhanced, the gray level enhancement processing is performed on the pixel points needing to be enhanced substantially in a unified manner, and differential enhancement processing of different pixel points is not achieved.
Disclosure of Invention
Based on the defects and shortcomings of the prior art, the invention provides an image processing method and device, which can realize the enhancement processing of differentiation on different pixel points in one image.
An image processing method comprising:
acquiring an image to be processed;
and respectively executing the following operations on each pixel point in the image:
calculating to obtain the gray level mean value and the gray level standard deviation of the image area with the set size in the image by taking the pixel point as the center;
judging whether the gray level mean value is within a set first threshold range or not, and judging whether the gray level standard deviation is within a set second threshold range or not;
and if the gray average value is within a set first threshold range and the gray standard deviation is within a set second threshold range, performing enhancement processing on the gray value of the pixel point according to the gray average value and the gray standard deviation.
Preferably, the enhancing the gray value of the pixel point according to the gray average value and the gray standard deviation includes:
calculating to obtain a self-adaptive enhancement coefficient according to the gray mean value and the gray standard deviation;
and according to the self-adaptive enhancement coefficient, carrying out enhancement processing on the gray value of the pixel point.
Preferably, the determining whether the mean grayscale value is within a set first threshold range and the standard grayscale difference is within a set second threshold range includes:
respectively calculating to obtain a global gray level mean value and a global gray level standard deviation of the image;
if the value of the gray level mean value is not larger than the value of the set first multiple of the global gray level mean value, judging that the gray level mean value is in the set first threshold range;
if the value of the gray standard deviation is not less than the value of the set second multiple of the global gray standard deviation and not more than the value of the set third multiple of the global gray standard deviation, judging that the gray standard deviation is within a set second threshold value range; wherein the second multiple is not greater than the third multiple.
Preferably, the calculating to obtain the gray level mean and the gray level standard deviation of the image area with the set size by taking the pixel point as the center in the image includes:
calculating to obtain a normalized gray level histogram of an image area with a set size in the image by taking the pixel point as a center;
calculating to obtain a gray average value of the image area according to the normalized gray histogram;
and calculating to obtain the gray standard deviation of the image area according to the gray mean value and the normalized gray histogram.
An image processing apparatus comprising:
the image acquisition unit is used for acquiring an image to be processed;
the calculation unit is used for calculating and obtaining the gray level mean value and the gray level standard deviation of an image area with a set size by taking a pixel point as the center in the image;
the judging unit is used for judging whether the gray mean value is within a set first threshold range or not and judging whether the gray standard deviation is within a set second threshold range or not;
and the processing unit is used for performing enhancement processing on the gray value of the pixel point according to the gray average value and the gray standard deviation when the gray average value is within a set first threshold range and the gray standard deviation is within a set second threshold range.
Preferably, the processing unit includes:
the enhancement coefficient calculating unit is used for calculating to obtain a self-adaptive enhancement coefficient according to the gray mean value and the gray standard deviation;
and the enhancement processing unit is used for enhancing the gray value of the pixel point according to the self-adaptive enhancement coefficient.
Preferably, the determining unit is configured to, when determining whether the mean grayscale value is within a set first threshold range and determining whether the standard grayscale difference is within a set second threshold range:
respectively calculating to obtain a global gray level mean value and a global gray level standard deviation of the image; if the value of the gray level mean value is not larger than the value of the set first multiple of the global gray level mean value, judging that the gray level mean value is in the set first threshold range; if the value of the gray standard deviation is not less than the value of the set second multiple of the global gray standard deviation and not more than the value of the set third multiple of the global gray standard deviation, judging that the gray standard deviation is within a set second threshold value range; wherein the second multiple is not greater than the third multiple.
Preferably, when the calculation unit calculates and obtains the average gray level and the standard gray level difference of the image area with the set size in the image, with the pixel point as the center, the calculation unit is specifically configured to:
calculating to obtain a normalized gray level histogram of an image area with a set size in the image by taking the pixel point as a center; calculating to obtain a gray average value of the image area according to the normalized gray histogram; and calculating to obtain the gray standard deviation of the image area according to the gray mean value and the normalized gray histogram.
An image processing apparatus comprising:
a memory and a processor;
the memory is connected with the processor and used for storing programs and data generated in the program running process;
the processor is used for realizing the following functions by running the program stored in the memory:
acquiring an image to be processed; and respectively executing the following operations on each pixel point in the image: calculating to obtain the gray level mean value and the gray level standard deviation of the image area with the set size in the image by taking the pixel point as the center; judging whether the gray level mean value is within a set first threshold range or not, and judging whether the gray level standard deviation is within a set second threshold range or not; and if the gray average value is within a set first threshold range and the gray standard deviation is within a set second threshold range, performing enhancement processing on the gray value of the pixel point according to the gray average value and the gray standard deviation.
Preferably, when the processor performs enhancement processing on the gray value of the pixel point according to the gray mean value and the gray standard deviation, the processor is specifically configured to:
calculating to obtain a self-adaptive enhancement coefficient according to the gray mean value and the gray standard deviation; and according to the self-adaptive enhancement coefficient, carrying out enhancement processing on the gray value of the pixel point.
The image processing method provided by the invention executes the following operations on pixel points in an image to be processed: calculating to obtain the gray level mean value and the gray level standard deviation of the image area with the set size in the image by taking the pixel point as the center; judging whether the gray level mean value is within a set first threshold range or not, and judging whether the gray level standard deviation is within a set second threshold range or not; and if the gray average value is within a set first threshold range and the gray standard deviation is within a set second threshold range, performing enhancement processing on the gray value of the pixel point according to the gray average value and the gray standard deviation. By adopting the technical scheme of the invention, the gray average value and the gray standard deviation of the image area around the pixel point are used as the basis for carrying out gray enhancement on the pixel point, so that the enhancement processing of differentiation on different pixel points is realized.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic flowchart of an image processing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of another image processing method according to an embodiment of the present invention;
FIG. 3 is a flow chart of another image processing method according to an embodiment of the present invention;
FIG. 4(a) is an original image of an enlarged tungsten filament image provided by an embodiment of the present invention;
fig. 4(b) is an image after histogram equalization processing is performed on fig. 4(a) according to an embodiment of the present invention;
FIG. 4(c) is an image of FIG. 4(a) after being processed by a conventional local enhancement algorithm according to an embodiment of the present invention;
FIG. 4(d) is an image of FIG. 4(a) after being processed by an adaptive local contrast enhancement algorithm according to an embodiment of the present invention;
FIG. 4(e) is an image of the image of FIG. 4(a) after being processed by a conventional local mean and standard deviation-based enhancement algorithm provided by an embodiment of the present invention;
fig. 4(f) is an image after enhancement processing is performed on fig. 4(a) by using the image processing method proposed by the embodiment of the invention;
FIG. 5 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of another image processing apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of another image processing apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention discloses an image processing method, which is shown in figure 1 and comprises the following steps:
s101, acquiring an image to be processed;
specifically, the technical solution of the embodiment of the present invention is used for performing image enhancement processing on a grayscale image, and therefore, the acquired to-be-processed image is generally a grayscale image. The gray image which is acquired by any way and needs to be subjected to image enhancement processing can be taken as the image to be processed. Obviously, a color image may also be acquired, and then the color image is converted into a grayscale image, and the grayscale image is used as the image to be processed.
And respectively executing the following operations on each pixel point in the image:
s102, calculating to obtain a gray level mean value and a gray level standard deviation of an image area with a set size in the image by taking the pixel point as a center;
specifically, let S assume (x, y) to be the coordinate of a certain pixel point in the image to be processedxyAn image region composed of adjacent pixels in a set size range centered on (x, y) is represented.
Then SxyMean value of gray scale ofComprises the following steps:
wherein r iss,tIs at SxyGray scale of pixel point at middle coordinate (s, t), and p (r)s,t) Is andthe normalized histogram component corresponding to the pixel point at coordinate (s, t).
Accordingly, the image area SxyThe gray scale standard deviation of (a) is:
wherein r iss,tIs at SxyGray scale of pixel point at middle coordinate (s, t), and p (r)s,t) Is the normalized histogram component corresponding to the pixel point at coordinate (s, t),as an image area SxyThe gray level average of (1).
The size of the image area having the set size is set according to the actual scene.
S103, judging whether the gray average value is within a set first threshold range or not, and judging whether the gray standard deviation is within a set second threshold range or not;
specifically, the average value of the gray scales of the image area represents the brightness of the image area, and the standard deviation of the gray scales of the image area represents the contrast of the image area. According to the embodiment of the invention, whether gray level enhancement processing is carried out on the pixel points in the image area is determined according to the brightness and the contrast of the image area.
And if the image area is darker, namely the gray average value is smaller than the set first threshold value, and the contrast of the image area is within the set contrast range, performing gray enhancement processing on the central pixel point of the image area.
By adopting the scheme, different treatment on different pixel points in the image is realized, so that differential treatment on different pixel points is realized.
It should be noted that the first threshold range and the second threshold range can be flexibly set according to actual use requirements, and the gray enhancement processing of the central pixel point of the image area with any brightness and any contrast range is realized.
And if the mean value of the gray scale is within a set first threshold range and the standard deviation of the gray scale is within a set second threshold range, executing step S104, and performing enhancement processing on the gray scale value of the pixel point according to the mean value of the gray scale and the standard deviation of the gray scale.
Specifically, if the brightness of the image region is within a set first threshold range and the contrast thereof is within a set second threshold range, it indicates that the image enhancement processing should be performed on the central pixel point of the image region, and the enhancement value is determined by the mean grayscale value and the standard grayscale difference of the image region. That is, if the average gray level and the standard gray level difference of different image regions are different, the degrees of enhancement processing on the gray level of the central pixel of the image region are different, thereby realizing the enhancement processing of differentiation on different pixels.
The image processing method provided by the embodiment of the invention executes the following operations on pixel points in an image to be processed: calculating to obtain the gray level mean value and the gray level standard deviation of the image area with the set size in the image by taking the pixel point as the center; judging whether the gray level mean value is within a set first threshold range or not, and judging whether the gray level standard deviation is within a set second threshold range or not; and if the gray average value is within a set first threshold range and the gray standard deviation is within a set second threshold range, performing enhancement processing on the gray value of the pixel point according to the gray average value and the gray standard deviation. By adopting the technical scheme of the invention, the gray average value and the gray standard deviation of the image area around the pixel point are used as the basis for carrying out gray enhancement on the pixel point, so that the enhancement processing of differentiation on different pixel points is realized.
Optionally, in another embodiment of the present invention, referring to fig. 2, the enhancing the gray value of the pixel point according to the gray mean and the gray standard deviation includes:
s204, calculating to obtain a self-adaptive enhancement coefficient according to the gray mean value and the gray standard deviation;
specifically, the calculation formula of the adaptive enhancement coefficient η is as follows:
wherein k is a constant, and k is a constant,representing an image area SxyThe standard deviation of the gray scale of (a),representing an image area SxyThe gray level average of (1).
And S205, enhancing the gray value of the pixel point according to the self-adaptive enhancement coefficient.
Specifically, assume that the image region SxyThe gray value of the central pixel point is f (x, y), and the gray value after the enhancement processing is g (xy), the enhancement processing for the pixel point can be expressed by a formula as follows:
wherein,representing an image area SxyThe gray level average of (1).
If the image areaIs not within a set first threshold range, or an image areaIf the gray scale standard deviation is not within the set second threshold range, the image area is not determinedThe above center pixel point is subjected to enhancement processing, and in this case, g (x, y) is f (x, y).
It can be understood that, in the technical scheme of the embodiment of the invention, the self-adaptive enhancement coefficients corresponding to the image pixels are utilized to perform gray level enhancement processing on the pixels of the image. The size of the adaptive enhancement coefficient is determined by the gray level mean value and the gray level standard deviation of the image area containing the image pixel points, that is, for different image pixel points, the adaptive enhancement coefficients for enhancing the different image pixel points are different due to the fact that the gray level mean value and the gray level standard deviation of adjacent areas are different, and therefore differentiated gray level enhancement processing of the different image pixel points is achieved.
In addition, the gray level enhancement processing is carried out by combining the gray level mean value and the gray level standard deviation of the image area where the image pixel points are located, namely, the image is sharpened and smoothed, and the enhancement effect is better.
Steps S201 to S203 in this embodiment correspond to steps S101 to S103 in the method embodiment shown in fig. 1, respectively, for which specific contents refer to those in the method embodiment shown in fig. 1, and are not described herein again.
Optionally, in another embodiment of the present invention, referring to fig. 3, the determining whether the mean grayscale value is within a set first threshold range and the determining whether the standard grayscale deviation is within a set second threshold range includes:
s303, respectively calculating to obtain a global gray level mean value and a global gray level standard deviation of the image;
specifically, let r represent the gray-scale value structure of the pixel points in the imageIn the interval [0, L-1 ]]Above, a discrete random variable representing discrete gray values, p (r)i) Representing the normalized histogram component corresponding to the ith value of r.
The global gray level mean M of the imageGComprises the following steps:
global gray scale standard deviation (variance) of the above-mentioned imageComprises the following steps:
s304, if the value of the gray level mean value is not larger than the value of the set first multiple of the global gray level mean value, judging that the gray level mean value is in the set first threshold range;
specifically, the average value of the gray scale of the image represents the brightness of the image. In the embodiment of the invention, the image area with the gray average value not larger than the first multiple set by the global gray average value in the image to be processed is selected for enhancement, namely, the darker image area in the image to be processed is selected for image enhancement.
If it is notThen the region is indicated as a darker region, which is a candidate region requiring enhancement processing, where k0Is a normal number less than 1.0.
S305, if the value of the gray standard deviation is not less than the value of the set second multiple of the global gray standard deviation and not more than the value of the set third multiple of the global gray standard deviation, judging that the gray standard deviation is within the set second threshold range; wherein the second multiple is not greater than the third multiple.
Specifically, the gray scale difference of the image represents the contrast of the image. According to the embodiment of the invention, the image area with the contrast ratio within the set range in the image to be processed is selected for enhancement processing, so that the purposes of enhancing the contrast ratio and making the image clearer are achieved.
If it is notThe pixel at the pixel point (x, y) is considered as an enhancement candidate point, and since the image enhancement process may enhance the constant region with the standard deviation of 0, it is necessary to pass throughk1<k2A lower limit is set for the local standard deviation.
By combining the introduction of the judgment of the image enhancement processing condition, the image enhancement processing method can be summarized, and the algorithm formula for performing the image enhancement processing on the image by adopting the technical scheme of the embodiment of the invention is as follows:
wherein η is the adaptive enhancement coefficient,k is a normal number, MGIs the global gray level mean of the input image; dGIs the global gray scale standard deviation. f (x, y), g (x, y) are the gray values of the input image and the output image at the point (x, y), respectively;is the mean value of the gray levels in the neighborhood centered on (x, y);is the gray scale standard deviation; k is a radical of0,k1,k2Is a setting parameter.
Steps S301, S302, and S306 in this embodiment respectively correspond to steps S101, S102, and S104 in the method embodiment shown in fig. 1, and for specific content, please refer to the content corresponding to the method embodiment shown in fig. 1, which is not described herein again.
Optionally, in another embodiment of the present invention, the calculating to obtain the gray level mean and the gray level standard deviation of the image area with the set size, which are centered on the pixel point, in the image includes:
calculating to obtain a normalized gray level histogram of an image area with a set size in the image by taking the pixel point as a center;
specifically, let r denote the gray value of the pixel point in the image area with a set size, centered on the pixel point, in the interval [0, L-1]Above, a discrete random variable representing discrete gray values, p (r)i) Representing the normalized histogram component corresponding to the ith value of r.
Calculating to obtain a gray average value of the image area according to the normalized gray histogram;
specifically, let S assume (x, y) to be the coordinates of the pixel pointsxyAn image region composed of adjacent pixels in a set size range centered on (x, y) is represented.
Then SxyMean value of gray scale ofComprises the following steps:
wherein r iss,tIs at SxyGray scale of pixel point at middle coordinate (s, t), and p (r)s,t) Is a coordinate withAnd (s, t) the normalized histogram component corresponding to the pixel point.
And calculating to obtain the gray standard deviation of the image area according to the gray mean value and the normalized gray histogram.
Accordingly, the image area SxyThe gray scale standard deviation of (a) is:
wherein r iss,tIs at SxyGray scale of pixel point at middle coordinate (s, t), and p (r)st) Is the normalized histogram component corresponding to the pixel point at coordinate (s, t),as an image area SxyThe gray level average of (1).
In order to highlight the processing effect advantage of the technical solution of the embodiment of the present invention, the following will describe the processing effect advantage of the technical solution of the embodiment of the present invention in comparison with the conventional image enhancement algorithm by taking the image enhancement processing on the image in fig. 4(a) as an example.
Fig. 4(a) shows an enlarged original image of the tungsten filament image, wherein the darker area on the right side of the image has a portion of the detail that needs to be enhanced. In the specific implementation of the technical scheme of the embodiment of the invention, a 3 × 3 area is taken as an image area with a set size where the pixel point to be processed is located.
Fig. 4(b) is an effect diagram after histogram equalization processing, and it can be seen from the diagram that the detail part needing enhancement is indeed enhanced, but because it is the processing of the whole image, the gray levels of the image are excessively combined, and the image appears to be brighter as a whole.
Fig. 4(c) is an effect diagram obtained after processing by a conventional local enhancement algorithm, and compared with an image processed by histogram equalization, the processing effect of the image is better, but the enhancement coefficient k is constant and is not adjustable, so that other areas are also enhanced when a specified area is enhanced, and the localized processing cannot be performed.
Fig. 4(d) is an effect diagram obtained after processing by using the adaptive local contrast enhancement algorithm. The algorithm solves the problem that the amplification factor k is not adjustable, the value of the enhancement factor can be dynamically adjusted according to the change of the local contrast, but the algorithm still processes the whole image, only the change of the local contrast is considered, the influence of the change of the local average value on the image is not considered, and other areas of the image are enhanced and the effect is not ideal.
Fig. 4(e) is an effect diagram obtained by using a conventional local mean and standard deviation-based enhancement algorithm, and as can be seen from the diagram, the algorithm only enhances the regions satisfying the condition, while the other regions do not change, effectively enhancing the image of the specified region, but the enhanced regions also only perform simple operation on the gray values, do not perform operation on the contrast, and have no adaptivity.
Fig. 4(f) is an effect diagram obtained after the algorithm processing according to the embodiment of the present invention is adopted, and for the coefficient selection of the algorithm formula for performing the image enhancement processing on the image in the technical solution according to the embodiment of the present invention, the coefficient selection is as follows: k is 2.5, k0=0.42,k1=0.01,k20.40. Compared with the other algorithms, the algorithm considers the influence of the change of the local gray level mean value (brightness) on the image and the influence of the change of the local gray level standard deviation (contrast) in the area meeting the conditions, and the two algorithms are simultaneously considered, so that the display effect of the area with dark image and low contrast is effectively improved, and the other areas meeting the conditions are still kept unchanged.
Compared with the image subjected to image enhancement processing by the traditional method, the image subjected to image enhancement processing by the embodiment of the invention is clearer and has better visual effect.
The embodiment of the present invention also discloses an image processing apparatus, as shown in fig. 5, the apparatus includes:
an image acquisition unit 501, configured to acquire an image to be processed;
the calculating unit 502 is configured to calculate a mean grayscale value and a standard grayscale difference of an image region with a set size, which are centered on a pixel point in the image;
a determining unit 503, configured to determine whether the mean grayscale value is within a set first threshold range, and determine whether the standard grayscale difference is within a set second threshold range;
the processing unit 504 is configured to perform enhancement processing on the gray scale value of the pixel point according to the gray scale mean value and the gray scale standard deviation when the gray scale mean value is within a set first threshold range and the gray scale standard deviation is within a set second threshold range.
Specifically, please refer to the content of the corresponding method embodiment for the specific working content of each unit in this embodiment, which is not described herein again.
Optionally, in another embodiment of the present invention, referring to fig. 6, the processing unit 504 includes:
an enhancement coefficient calculation unit 5041, configured to calculate a self-adaptive enhancement coefficient according to the gray average value and the gray standard deviation;
and the enhancement processing unit 5042 is configured to perform enhancement processing on the gray value of the pixel point according to the adaptive enhancement coefficient.
Specifically, please refer to the content of the corresponding method embodiment for the specific working content of each unit in this embodiment, which is not described herein again.
Optionally, in another embodiment of the present invention, when the determining unit 503 determines whether the average value of the grayscales is within a set first threshold range, and determines whether the standard deviation of the grayscales is within a set second threshold range, it is specifically configured to:
respectively calculating to obtain a global gray level mean value and a global gray level standard deviation of the image; if the value of the gray level mean value is not larger than the value of the set first multiple of the global gray level mean value, judging that the gray level mean value is in the set first threshold range; if the value of the gray standard deviation is not less than the value of the set second multiple of the global gray standard deviation and not more than the value of the set third multiple of the global gray standard deviation, judging that the gray standard deviation is within a set second threshold value range; wherein the second multiple is not greater than the third multiple.
Specifically, please refer to the content of the corresponding method embodiment for the specific working content of the determining unit 503 in this embodiment, which is not described herein again.
Optionally, in another embodiment of the present invention, when the calculating unit 502 calculates the average gray level and the standard gray level difference of the image area with the set size in the image, taking the pixel point as the center, it is specifically configured to:
calculating to obtain a normalized gray level histogram of an image area with a set size in the image by taking the pixel point as a center; calculating to obtain a gray average value of the image area according to the normalized gray histogram; and calculating to obtain the gray standard deviation of the image area according to the gray mean value and the normalized gray histogram.
Specifically, please refer to the content of the corresponding method embodiment for the specific working content of the calculating unit 502 in this embodiment, which is not described herein again.
The embodiment of the present invention also discloses another image processing apparatus, as shown in fig. 7, the apparatus includes:
a memory 701 and a processor 702;
the memory 701 is connected with the processor 702 and is used for storing programs and data generated in the program running process;
a processor 702 for implementing the following functions by executing the program stored in the memory 701:
acquiring an image to be processed; and respectively executing the following operations on each pixel point in the image: calculating to obtain the gray level mean value and the gray level standard deviation of the image area with the set size in the image by taking the pixel point as the center; judging whether the gray level mean value is within a set first threshold range or not, and judging whether the gray level standard deviation is within a set second threshold range or not; and if the gray average value is within a set first threshold range and the gray standard deviation is within a set second threshold range, performing enhancement processing on the gray value of the pixel point according to the gray average value and the gray standard deviation.
Specifically, please refer to the content of the corresponding method embodiment for the specific working content of each part in this embodiment, which is not described herein again.
Optionally, in another embodiment of the present invention, when the processor 702 performs enhancement processing on the gray value of the pixel point according to the gray mean and the gray standard deviation, the method is specifically configured to:
calculating to obtain a self-adaptive enhancement coefficient according to the gray mean value and the gray standard deviation; and according to the self-adaptive enhancement coefficient, carrying out enhancement processing on the gray value of the pixel point.
Specifically, please refer to the contents of the corresponding method embodiment for the specific working contents of the processor 702 in this embodiment, which are not described herein again.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. An image processing method, comprising:
acquiring an image to be processed;
and respectively executing the following operations on each pixel point in the image:
calculating to obtain the gray level mean value and the gray level standard deviation of the image area with the set size in the image by taking the pixel point as the center;
judging whether the gray level mean value is within a set first threshold range or not, and judging whether the gray level standard deviation is within a set second threshold range or not;
and if the gray average value is within a set first threshold range and the gray standard deviation is within a set second threshold range, performing enhancement processing on the gray value of the pixel point according to the gray average value and the gray standard deviation.
2. The method according to claim 1, wherein the enhancing the gray level of the pixel point according to the gray level mean and the gray level standard deviation comprises:
calculating to obtain a self-adaptive enhancement coefficient according to the gray mean value and the gray standard deviation;
and according to the self-adaptive enhancement coefficient, carrying out enhancement processing on the gray value of the pixel point.
3. The method of claim 1, wherein the determining whether the mean grayscale value is within a set first threshold range and the standard grayscale difference is within a set second threshold range comprises:
respectively calculating to obtain a global gray level mean value and a global gray level standard deviation of the image;
if the value of the gray level mean value is not larger than the value of the set first multiple of the global gray level mean value, judging that the gray level mean value is in the set first threshold range;
if the value of the gray standard deviation is not less than the value of the set second multiple of the global gray standard deviation and not more than the value of the set third multiple of the global gray standard deviation, judging that the gray standard deviation is within a set second threshold value range; wherein the second multiple is not greater than the third multiple.
4. The method of claim 1, wherein the calculating a mean grayscale value and a standard grayscale value of the image area with a set size centered on the pixel point in the image comprises:
calculating to obtain a normalized gray level histogram of an image area with a set size in the image by taking the pixel point as a center;
calculating to obtain a gray average value of the image area according to the normalized gray histogram;
and calculating to obtain the gray standard deviation of the image area according to the gray mean value and the normalized gray histogram.
5. An image processing apparatus characterized by comprising:
the image acquisition unit is used for acquiring an image to be processed;
the calculation unit is used for calculating and obtaining the gray level mean value and the gray level standard deviation of an image area with a set size by taking a pixel point as the center in the image;
the judging unit is used for judging whether the gray mean value is within a set first threshold range or not and judging whether the gray standard deviation is within a set second threshold range or not;
and the processing unit is used for performing enhancement processing on the gray value of the pixel point according to the gray average value and the gray standard deviation when the gray average value is within a set first threshold range and the gray standard deviation is within a set second threshold range.
6. The apparatus of claim 5, wherein the processing unit comprises:
the enhancement coefficient calculating unit is used for calculating to obtain a self-adaptive enhancement coefficient according to the gray mean value and the gray standard deviation;
and the enhancement processing unit is used for enhancing the gray value of the pixel point according to the self-adaptive enhancement coefficient.
7. The apparatus according to claim 5, wherein the determining unit is configured to determine whether the mean grayscale value is within a set first threshold range, and determine whether the standard grayscale difference is within a set second threshold range, and is specifically configured to:
respectively calculating to obtain a global gray level mean value and a global gray level standard deviation of the image; if the value of the gray level mean value is not larger than the value of the set first multiple of the global gray level mean value, judging that the gray level mean value is in the set first threshold range; if the value of the gray standard deviation is not less than the value of the set second multiple of the global gray standard deviation and not more than the value of the set third multiple of the global gray standard deviation, judging that the gray standard deviation is within a set second threshold value range; wherein the second multiple is not greater than the third multiple.
8. The apparatus according to claim 5, wherein the calculating unit is specifically configured to, when calculating the average grayscale value and the standard grayscale value of the image area with the pixel point as the center and the set size in the image:
calculating to obtain a normalized gray level histogram of an image area with a set size in the image by taking the pixel point as a center; calculating to obtain a gray average value of the image area according to the normalized gray histogram; and calculating to obtain the gray standard deviation of the image area according to the gray mean value and the normalized gray histogram.
9. An image processing apparatus characterized by comprising:
a memory and a processor;
the memory is connected with the processor and used for storing programs and data generated in the program running process;
the processor is used for realizing the following functions by running the program stored in the memory:
acquiring an image to be processed; and respectively executing the following operations on each pixel point in the image: calculating to obtain the gray level mean value and the gray level standard deviation of the image area with the set size in the image by taking the pixel point as the center; judging whether the gray level mean value is within a set first threshold range or not, and judging whether the gray level standard deviation is within a set second threshold range or not; and if the gray average value is within a set first threshold range and the gray standard deviation is within a set second threshold range, performing enhancement processing on the gray value of the pixel point according to the gray average value and the gray standard deviation.
10. The apparatus according to claim 9, wherein the processor is configured to, when performing enhancement processing on the gray scale value of the pixel point according to the gray scale mean and the gray scale standard deviation, specifically:
calculating to obtain a self-adaptive enhancement coefficient according to the gray mean value and the gray standard deviation; and according to the self-adaptive enhancement coefficient, carrying out enhancement processing on the gray value of the pixel point.
CN201710493809.6A 2017-06-26 2017-06-26 A kind of image processing method and device Pending CN107203982A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710493809.6A CN107203982A (en) 2017-06-26 2017-06-26 A kind of image processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710493809.6A CN107203982A (en) 2017-06-26 2017-06-26 A kind of image processing method and device

Publications (1)

Publication Number Publication Date
CN107203982A true CN107203982A (en) 2017-09-26

Family

ID=59907728

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710493809.6A Pending CN107203982A (en) 2017-06-26 2017-06-26 A kind of image processing method and device

Country Status (1)

Country Link
CN (1) CN107203982A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108230258A (en) * 2017-11-15 2018-06-29 浙江工业大学 License plate region enhancement method based on horizontal neighborhood standard deviation calculation
CN108665428A (en) * 2018-04-26 2018-10-16 青岛海信移动通信技术股份有限公司 Image enchancing method, device, equipment and storage medium
CN109525776A (en) * 2018-11-01 2019-03-26 浙江大华技术股份有限公司 A kind of image-pickup method and device
WO2019085969A1 (en) * 2017-11-02 2019-05-09 Zhejiang Dahua Technology Co., Ltd. Systems and methods for image processing
CN109949246A (en) * 2019-03-26 2019-06-28 河南理工大学 A method of processing image
CN110580693A (en) * 2018-06-07 2019-12-17 湖南爱威医疗科技有限公司 Image processing method, image processing device, computer equipment and storage medium
CN110772788A (en) * 2019-10-24 2020-02-11 苏州佳世达光电有限公司 Method for correcting aiming star of shooting game by display equipment
CN111444486A (en) * 2019-12-31 2020-07-24 深圳贝特莱电子科技股份有限公司 Startup self-adaptive fingerprint parameter initialization method based on android system
CN111451623A (en) * 2020-05-26 2020-07-28 上海法信机电设备制造有限公司 Plasma welding seam tracking device
CN111915497A (en) * 2019-05-09 2020-11-10 杭州睿琪软件有限公司 Image black and white enhancement method and device, electronic equipment and readable storage medium
CN113052176A (en) * 2021-04-09 2021-06-29 平安国际智慧城市科技股份有限公司 Character recognition model training method, device and system
CN114998159A (en) * 2022-08-04 2022-09-02 邹城市天晖软件科技有限公司 Design image self-adaptive enhancement method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101303765A (en) * 2008-06-23 2008-11-12 四川虹微技术有限公司 Method for reinforcing image contrast based on image mean-squared deviation
US8744208B2 (en) * 2009-12-02 2014-06-03 Jadavpur University Image binarization based on grey membership parameter of pixels
CN104182967A (en) * 2014-07-29 2014-12-03 小米科技有限责任公司 Image processing method, device and terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101303765A (en) * 2008-06-23 2008-11-12 四川虹微技术有限公司 Method for reinforcing image contrast based on image mean-squared deviation
US8744208B2 (en) * 2009-12-02 2014-06-03 Jadavpur University Image binarization based on grey membership parameter of pixels
CN104182967A (en) * 2014-07-29 2014-12-03 小米科技有限责任公司 Image processing method, device and terminal

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
DAH-CHUNG CHANG等: "Image Contrast Enhancement Based on a Histogram Transformation of Local Standard Deviation", 《IEEE TRANSACTIONS ON MEDICAL IMAGING》 *
M. A. YOUSUF等: "An Effective Image Contrast Enhancement Method Using Global Histogram Equalization", 《JOURNAL OF SCIENTIFIC RESEARCH》 *
M. SUNDARAM等: "Histogram Modified Local Contrast Enhancement for mammogram images", 《APPLIED SOFT COMPUTING》 *
YUNQI HU等: "Contrast Enhancement Based on Fuzzy Clustering", 《2014 4TH IEEE INTERNATIONAL CONFERENCE ON INFORMATION SCIENCE AND TECHNOLOGY》 *
李锦等: "一种结合直方图均衡化和MSRCR的图像增强新算法", 《西安电子科技大学学报(自然科学版)》 *

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019085969A1 (en) * 2017-11-02 2019-05-09 Zhejiang Dahua Technology Co., Ltd. Systems and methods for image processing
US11232545B2 (en) 2017-11-02 2022-01-25 Zhejiang Dahlia Technology Co., Ltd. Systems and methods for image processing
CN108230258B (en) * 2017-11-15 2021-06-04 浙江工业大学 License plate region enhancement method based on horizontal neighborhood standard deviation calculation
CN108230258A (en) * 2017-11-15 2018-06-29 浙江工业大学 License plate region enhancement method based on horizontal neighborhood standard deviation calculation
CN108665428A (en) * 2018-04-26 2018-10-16 青岛海信移动通信技术股份有限公司 Image enchancing method, device, equipment and storage medium
CN108665428B (en) * 2018-04-26 2022-11-11 青岛海信移动通信技术股份有限公司 Image enhancement method, device, equipment and storage medium
CN110580693B (en) * 2018-06-07 2022-03-25 湖南爱威医疗科技有限公司 Image processing method, image processing device, computer equipment and storage medium
CN110580693A (en) * 2018-06-07 2019-12-17 湖南爱威医疗科技有限公司 Image processing method, image processing device, computer equipment and storage medium
CN109525776B (en) * 2018-11-01 2020-12-08 浙江大华技术股份有限公司 Image acquisition method and device
CN109525776A (en) * 2018-11-01 2019-03-26 浙江大华技术股份有限公司 A kind of image-pickup method and device
CN109949246A (en) * 2019-03-26 2019-06-28 河南理工大学 A method of processing image
CN109949246B (en) * 2019-03-26 2023-03-31 河南理工大学 Method for processing image
CN111915497A (en) * 2019-05-09 2020-11-10 杭州睿琪软件有限公司 Image black and white enhancement method and device, electronic equipment and readable storage medium
CN111915497B (en) * 2019-05-09 2023-11-03 杭州睿琪软件有限公司 Image black-and-white enhancement method and device, electronic equipment and readable storage medium
CN110772788A (en) * 2019-10-24 2020-02-11 苏州佳世达光电有限公司 Method for correcting aiming star of shooting game by display equipment
CN110772788B (en) * 2019-10-24 2023-08-18 苏州佳世达光电有限公司 Method for correcting sight of shooting game by display equipment
CN111444486A (en) * 2019-12-31 2020-07-24 深圳贝特莱电子科技股份有限公司 Startup self-adaptive fingerprint parameter initialization method based on android system
CN111444486B (en) * 2019-12-31 2022-03-22 深圳贝特莱电子科技股份有限公司 Startup self-adaptive fingerprint parameter initialization method based on android system
CN111451623A (en) * 2020-05-26 2020-07-28 上海法信机电设备制造有限公司 Plasma welding seam tracking device
CN113052176A (en) * 2021-04-09 2021-06-29 平安国际智慧城市科技股份有限公司 Character recognition model training method, device and system
CN114998159A (en) * 2022-08-04 2022-09-02 邹城市天晖软件科技有限公司 Design image self-adaptive enhancement method

Similar Documents

Publication Publication Date Title
CN107203982A (en) A kind of image processing method and device
CN109064426B (en) Method and device for suppressing glare in low-illumination image and enhancing image
CN110827229B (en) Infrared image enhancement method based on texture weighted histogram equalization
CN108805829B (en) Image data processing method, device, equipment and computer readable storage medium
CN108665428B (en) Image enhancement method, device, equipment and storage medium
US9779321B2 (en) Image processing device and method thereof
CN113596573B (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN114581345B (en) Image enhancement method and system based on self-adaptive linear graying
CN112348763A (en) Image enhancement method, device, electronic equipment and medium
CN108280836A (en) A kind of image processing method and device
CN113379649A (en) Image enhancement method, device, equipment and storage medium
CN115909353A (en) Image binarization processing method and device
CN115760826A (en) Bearing wear condition diagnosis method based on image processing
CN113450272B (en) Image enhancement method based on sinusoidal variation and application thereof
CN114998186A (en) Image processing-based method and system for detecting surface scab defect of copper starting sheet
US20220237755A1 (en) Image enhancement method and image processing device
KR101516632B1 (en) Bipartite histogram equalization apparatus maintain the rate of mean brightness of video using visual threshold
CN110930358B (en) Solar panel image processing method based on self-adaptive algorithm
CN110136085B (en) Image noise reduction method and device
KR101089902B1 (en) Apparatus and method for estimating edge of digital image
CN116228574A (en) Gray image processing method and device
CN114418848B (en) Video processing method and device, storage medium and electronic equipment
CN113393394B (en) Low-illumination gray level image enhancement method and device based on gamma conversion and storage medium
WO2022174428A1 (en) Image brightness adjustment method, image brightness adjustment apparatus, and electronic device
CN111652816B (en) Image processing method and related equipment

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170926