CN114511471A - Image optimization method and system based on gray level co-occurrence matrix - Google Patents
Image optimization method and system based on gray level co-occurrence matrix Download PDFInfo
- Publication number
- CN114511471A CN114511471A CN202210401113.7A CN202210401113A CN114511471A CN 114511471 A CN114511471 A CN 114511471A CN 202210401113 A CN202210401113 A CN 202210401113A CN 114511471 A CN114511471 A CN 114511471A
- Authority
- CN
- China
- Prior art keywords
- image
- gray
- gray level
- value
- initial
- 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
Links
- 239000011159 matrix material Substances 0.000 title claims abstract description 46
- 238000000034 method Methods 0.000 title claims abstract description 42
- 238000005457 optimization Methods 0.000 title claims abstract description 27
- 230000006870 function Effects 0.000 claims abstract description 48
- 230000008859 change Effects 0.000 claims abstract description 33
- 238000004590 computer program Methods 0.000 claims description 6
- 238000012886 linear function Methods 0.000 claims description 5
- 230000008569 process Effects 0.000 abstract description 6
- 238000012545 processing Methods 0.000 abstract description 6
- 230000000694 effects Effects 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 3
- 241001270131 Agaricus moelleri Species 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 238000010191 image analysis Methods 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/90—Dynamic range modification of images or parts thereof
- G06T5/92—Dynamic range modification of images or parts thereof based on global image properties
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/40—Analysis of texture
- G06T7/41—Analysis of texture based on statistical description of texture
- G06T7/45—Analysis of texture based on statistical description of texture using co-occurrence matrix computation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10024—Color image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20076—Probabilistic image processing
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Probability & Statistics with Applications (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Processing (AREA)
Abstract
The invention relates to the technical field of image processing, in particular to an image optimization method and system based on a gray level co-occurrence matrix. Acquiring a gray image of any initial image to be optimized; calculating the gray average value of the gray image to obtain a parameter initial value of a gray linear variation function; constructing a gray level co-occurrence matrix of the gray level image to obtain the contrast of the gray level image; acquiring the brightness-to-darkness ratio of the gray level image; adjusting the initial value of the parameter according to the contrast and the brightness-to-darkness ratio to obtain a plurality of gray scale linear change functions with different parameters, and further obtain a plurality of optimized images; and when the information entropy of the optimized image is maximum, the corresponding parameter is the optimal parameter, and the optimized image corresponding to the optimal parameter is the optimal image. The method for determining the optimal parameters can effectively reduce the calculated amount in the image optimization process, avoid the blind traversal of the parameters in the gray level linear variation function, and improve the optimization efficiency while accurately determining the optimal image corresponding to each gray level image.
Description
Technical Field
The invention relates to the technical field of image processing, in particular to an image optimization method and system based on a gray level co-occurrence matrix.
Background
With the continuous rise of artificial intelligence, the development of image processing technology reaches the climax, but when some specific scenes utilize image analysis, the acquired images often have the problems of low contrast or fuzzy texture details, and larger influences and errors can be generated during subsequent image-based processing.
The existing image optimization methods are also diversified, wherein the gray scale linear change is a relatively common image optimization algorithm, when the linear parameter in the gray scale linear change method is the most appropriate, the image optimization effect is the best, but the existing linear parameter confirmation method is usually random traversal value, but the random traversal value calculation method is large in calculation amount, so that the image optimization efficiency is low.
Disclosure of Invention
In order to solve the above technical problems, an object of the present invention is to provide an image optimization method and system based on a gray level co-occurrence matrix, wherein the adopted technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides an image optimization method based on a gray level co-occurrence matrix, where the method includes the following steps:
acquiring any initial image to be optimized; acquiring a gray level image of the initial image;
calculating the gray average value of the gray value of the pixel point in the gray image, and acquiring the parameter initial value of a gray linear change function according to the gray average value;
constructing a gray level co-occurrence matrix of the gray level image, and acquiring the contrast of the gray level image according to the gray level co-occurrence matrix; acquiring the brightness-dark ratio of the gray image according to the gray values of all pixel points in the gray image; adjusting the initial parameter value according to the contrast and the brightness ratio to obtain a plurality of gray scale linear change functions of different parameters; the gray level image is subjected to a plurality of gray level linear change functions to obtain a plurality of optimized images;
and acquiring the information entropy of all the optimized images, wherein the parameters of the gray linear variation function corresponding to the maximum information entropy are the optimal parameters, and the optimized images corresponding to the optimal parameters are the optimal images.
Preferably, the step of obtaining the initial value of the parameter of the linear gray scale variation function according to the average gray scale value includes:
the parameters of the gray scale linear variation function comprise a slope and an intercept; the initial values of the parameters comprise initial values of slope and initial values of intercept;
the slope initial value and the gray average value are in a negative correlation relationship; the initial intercept value is in a negative correlation with the initial slope value.
Preferably, the step of obtaining the contrast of the gray-scale image according to the gray-scale co-occurrence matrix includes:
obtaining gray level difference values between adjacent pixel points in the gray level image, obtaining the probability of each gray level difference value in the gray level image according to the gray level co-occurrence matrix, and performing weighted summation with the probability of each gray level difference value as a weight value and the square of the corresponding gray level difference value to obtain the contrast of the gray level image.
Preferably, the step of obtaining the light-dark ratio of the gray image according to the gray values of all the pixel points in the gray image includes:
and acquiring the number of pixel points with pixel values in a darker range and the number of pixel points with pixel values in a brighter range in the gray image, wherein the ratio of the number of the pixel points in the brighter range to the number of the pixel points in the darker range is the brightness-to-darkness ratio.
Preferably, the step of adjusting the initial parameter value according to the contrast and the brightness ratio includes:
the initial slope value and the contrast are in positive correlation;
when the brightness-to-dark ratio is larger than 1, the initial value of the intercept is gradually reduced; and when the brightness-to-dark ratio is less than 1, the initial value of the intercept is gradually increased.
Preferably, the step of obtaining the information entropies of all the optimized images includes:
acquiring a gray level co-occurrence matrix of the optimized image; and constructing a binary group according to the pixel values of any two pixel points in the optimized image, acquiring the probability of the binary group appearing in the optimized image according to the gray level co-occurrence matrix, and acquiring the information entropy of the optimized image according to the probability.
In a second aspect, another embodiment of the present invention provides an image optimization system based on a gray level co-occurrence matrix, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
The invention has the following beneficial effects: according to the embodiment of the invention, the gray average value of the gray image corresponding to any initial image is calculated, the parameter initial value of the gray linear change function is obtained according to the gray average value, the contrast and the brightness-to-darkness ratio of the gray image are further calculated, the parameter initial value is continuously adjusted according to the contrast and the brightness-to-darkness ratio to obtain a plurality of gray linear change functions, blind traversal of parameters in the gray linear change functions is avoided, and the calculation amount in the parameter selection process is effectively reduced; each gray scale linear change function can change the quality of the gray scale image to obtain an optimized image, so that different optimized images are obtained according to different gray scale linear change functions, a gray scale co-occurrence matrix of the optimized image is further constructed, and the information entropy corresponding to the optimized image is obtained according to the gray scale co-occurrence matrix, wherein the corresponding optimized image is the optimal image when the information entropy is maximum. The image optimization is carried out according to the actual brightness and darkness degree of the image and the contrast of the image, the optimized optimal image is determined by combining the information entropy of the optimized image, the quality of the optimized image is guaranteed, and the optimization efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of 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 some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a method for optimizing an image based on a gray level co-occurrence matrix according to an embodiment of the present invention.
Detailed Description
To further illustrate the technical means and effects of the present invention adopted to achieve the predetermined objects, the following detailed description, structures, features and effects of an image optimization method and system based on gray level co-occurrence matrix according to the present invention will be provided with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" refers to not necessarily the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The embodiment of the invention is suitable for a scene in which an image with poor quality is optimized by utilizing a gray linear change function, and aims to solve the problem of image enhancement for parameter determination in the gray linear change function. The method can effectively reduce the calculated amount in the image optimization process, avoid the blind traversal of parameters in the gray scale linear variation function, and improve the optimization efficiency while accurately determining the optimal image corresponding to each gray scale image.
The following describes a specific scheme of an image optimization method and system based on a gray level co-occurrence matrix in detail with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of a method for optimizing an image based on a gray level co-occurrence matrix according to an embodiment of the present invention is shown, where the method includes the following steps:
step S100, acquiring any initial image to be optimized; and acquiring a gray scale image of the initial image.
When an image is acquired in real life, the acquired image usually has a problem of too high or too low exposure due to the influence of camera parameters or illumination, and therefore, the quality of the acquired image needs to be enhanced.
In the embodiment of the invention, any image with poor quality is taken as an initial image to be optimized, and the initial image with poor quality is optimized. Firstly, acquiring pixel values of an initial image in RGB three color components, and carrying out graying processing on the initial image to obtain a grayscale image corresponding to the initial image; the distribution of pixel values in a grayscale image represents the aggregated information of the grayscales in the image. The graying processing method comprises the following steps:
wherein,representing a grayscale image;represents a red channel value;represents a green channel value;represents a blue channel value;representing the weight of the red channel value;representing a weight of the green channel value;representing the weight of the blue channel value.
Step S200, calculating the gray average value of the gray value of the pixel point in the gray image, and acquiring the parameter initial value of the gray linear change function according to the gray average value.
The method comprises the following steps that the existing method for enhancing the image quality is various, such as Gaussian filtering, histogram equalization and the like, in the embodiment of the invention, the gray linear change function is used for optimizing the image, the quality of the optimization effect is that the parameters in the gray linear change function play a decisive role, and the parameters of the gray linear change function comprise the slope and the intercept; the initial values of the parameters comprise initial values of slope and initial values of intercept; the expression of the linear function of the gray scale is:
wherein,expressing the pixel values of pixel points in the optimized image;expressing the slope of the gray scale linear variation function;representing the intercept of a linear function of the gray scale;and expressing the pixel value of a pixel point in the gray level image to be optimized.
Slope in practical applications for optimizing image quality using a linear function of gray scale variationAnd interceptUsually variable, requiring constant skewAnd adjusting the values of the rate and the intercept so as to improve the quality of the optimized image. In order to avoid blind values of different slopes and intercepts, parameter initial values are set in the embodiment of the invention, and adjustment is carried out on the basis of the parameter initial values.
Specifically, the method for acquiring the initial value of the parameter comprises the following steps: firstly, obtaining the gray average value of all pixel points in a gray image to be processed as follows:
wherein,expressing the gray average value of all pixel points in the gray image;representing different gray values in the gray scale image;express the second in the gray scale imageThe number of times the individual gray values appear;and expressing the quantity of all pixel points in the gray image.
The slope initial value and the gray average value form a negative correlation relationship, and then the slope initial value is:
wherein,expressing the initial value of the slope of the gray scale linear change function;and expressing the gray average value of all pixel points in the gray image.
Further, the obtained initial value of the slope is substituted into the linear change function of the gray scale, and the initial value of the intercept and the initial value of the slope are in a negative correlation relationship, so that the initial value of the intercept is:
wherein,representing the initial intercept value of the gray scale linear variation function;expressing the pixel values of pixel points in the optimized image;expressing the initial value of the slope of the gray scale linear change function;and expressing the pixel value of a pixel point in the gray level image to be optimized.
It should be noted that, the range of the gray values of all the pixels in the gray image is equal to the range of the gray values of all the pixels in the gray imageTherefore, if the maximum value of the gray value of the pixel point in the optimized image is 255, the maximum value of the gray value is 255 as the optimized pixel value in the embodiment of the invention; acquiring a gray value with the maximum occurrence probability in the gray image, taking the gray value as a value to be optimized in the gray image to be optimized, wherein an initial intercept value is as follows:
wherein,representing the initial intercept value of the gray scale linear variation function;expressing the gray average value of all pixel points in the gray image;indicating the gray scale value with the highest probability of occurrence in the gray scale image.
Step S300, constructing a gray level co-occurrence matrix of the gray level image, and acquiring the contrast of the gray level image according to the gray level co-occurrence matrix; acquiring the brightness-dark ratio of the gray image according to the gray values of all pixel points in the gray image; adjusting the initial value of the parameter according to the contrast and the brightness ratio to obtain a plurality of gray scale linear variation functions of different parameters; the gray level image is subjected to a plurality of gray level linear change functions to obtain a plurality of optimized images.
In the linear function of gray scale, the slope affects the contrast of the image and the intercept affects the brightness of the image. At the slopeThen, the contrast of the optimized image is increased; when slope of the lineThe contrast of the optimized image is reduced. At interceptWhen the brightness of the optimized image is increased; at interceptThe brightness of the optimized image is reduced.
Contrast represents a measure of the different brightness levels between the brightest white and darkest black of the light and dark regions in an image, with a greater range of differences indicating greater contrast and a smaller range of differences indicating less contrast. The larger the slope value is, the larger the contrast is, the deeper the image texture groove is, and the clearer the image is; conversely, the smaller the slope value is, the smaller the contrast is, the shallower the texture grooves of the image are, and the more blurred the image is.
The method for obtaining the image contrast in the embodiment of the invention comprises the following steps: obtaining gray level difference values between adjacent pixel points in the gray level image, obtaining the probability of each gray level difference value in the gray level image according to the gray level co-occurrence matrix, and performing weighted summation by taking the probability of each gray level difference value as a weight and the square of the corresponding gray level difference value to obtain the contrast of the gray level image.
Specifically, a gray level co-occurrence matrix corresponding to the gray level image to be processed is constructed, the number of times that the point pair appears in the gray level image is counted by taking the coordinate of any point in the gray level image and the gray level value corresponding to the coordinate of another point deviating from the point as a point pair, and by analogy, the number of times that all the point pairs appear in the gray level image is obtained to form the gray level co-occurrence matrix corresponding to the gray level image. The size of the gray level co-occurrence matrix is determined by the maximum gray level value appearing in the gray level image, and if the maximum gray level value in the gray level image is 255, the size of the gray level co-occurrence matrix corresponding to the gray level image is 255。
In the embodiment of the present invention, a point pair is formed by gray values of two adjacent pixel points, and then the probability of occurrence of gray differences between all adjacent pixel points is obtained according to a gray co-occurrence matrix, and the contrast is obtained by performing weighted summation on the square of the gray differences by using the probability as a weight:
wherein,representing contrast;is shown asThe gray value of each pixel point and the adjacent secondThe gray difference between the gray values of the pixel points;is shown asThe gray value of each pixel point and the adjacent secondThe probability that the gray difference between the gray values of the pixel points appears in the gray image.
Further, the brightness ratio of the gray scale image is obtained. And acquiring the number of pixel points in a darker range and the number of pixel points in a brighter range in the gray level image. In the embodiment of the inventionThe gray values in the range belong to the darker range,the gray value in the range belongs to a brighter range, and the brightness ratio of the gray image is as follows:
wherein,expressing the brightness and the darkness of the gray scale image;expressing the number of pixel points belonging to a brighter range in the gray level image;the number of pixel points belonging to a darker range in the gray image is represented.
When in useAnd then, the number of the pixel points belonging to a brighter range in the gray image is larger than that of the pixel points belonging to a darker range, and the gray image is brighter as a whole.
Therefore, when the quality of the gray-scale image is optimized, the contrast of the image is increased so as to make the image clearer; when the contrast is increased, the adjustment is carried out by combining the brightness condition of the image, namely the slope closely related to the contrast is gradually increased, the intercept is adjusted according to the actual brightness ratio of the image, and when the image is bright overall, the intercept is gradually reduced; when the image is dark as a whole, the intercept is gradually increased.
Obtaining the relation between the parameters of the gray linear change function and the image quality in the process; and determining the adjustment trend of parameters in the image gray scale linear variation function when the image gray scale linear variation function is optimized for different images. The initial value of the slope and the contrast are in positive correlation; when the brightness-to-dark ratio is larger than 1, the initial value of the intercept is gradually reduced; when the light-dark ratio is less than 1, the initial value of the intercept is gradually increased.
Setting the slope in the embodiment of the inventionAt the initial value of the parameterFloating and adjusting in a range of 0.1 on the basis of the initial value; intercept of a beamAt the initial value of the parameterAnd then adjusted up and down in the range of 1. ThroughAnd (4) traversing the adjustment of the break to obtain a plurality of groups of parameter values of different gray scale linear change functions, wherein each group of parameter values corresponds to one gray scale linear change function. The gray image is processed by each gray linear change function to obtain an optimized image, namely the gray image corresponds to a plurality of optimized images.
And S400, acquiring information entropies of all the optimized images, wherein the parameters of the corresponding gray level linear variation function when the information entropies are maximum are the optimal parameters, and the optimized images corresponding to the optimal parameters are the optimal images.
In step S300, a plurality of optimized images corresponding to the grayscale image are obtained, and an image with the best quality is selected from the plurality of optimized images as an optimized optimal image corresponding to the grayscale image. In the embodiment of the invention, the information entropy of each optimized image is used as the measurement index of the quality of the optimized image.
Acquiring a gray level co-occurrence matrix of an optimized image; and constructing a binary group according to pixel values of any two pixel points in the optimized image, acquiring the probability of the binary group appearing in the optimized image according to the gray level co-occurrence matrix, and acquiring the information entropy of the optimized image according to the probability. The specific method for acquiring the information entropy of each optimized image comprises the following steps:
based on the same principle as the method for acquiring the gray level co-occurrence matrix of the gray level image in step S300, acquiring the gray level co-occurrence matrix corresponding to each optimized image, in the embodiment of the present invention, the gray level values of two adjacent elements form a binary group, the probability of the binary group occurring is obtained according to the gray level co-occurrence matrix, and further the information entropy obtained according to the probability is:
wherein,is shown asOptimizing information entropy corresponding to the image;represent the second in the optimized imageThe first pixel point is adjacent to the first pixel pointProbability of a doublet corresponding to a pixel point.
By analogy, the information entropies corresponding to all the optimized images are obtained, the larger the information entropy of the image is, the larger the information content contained in the image is, and the better the quality effect of the image is, so that the parameter value of the corresponding gray scale linear change function is the optimal parameter when the information entropy is the maximum, and the optimized image corresponding to the optimal parameter is the optimal image corresponding to the gray scale image.
In summary, in the embodiment of the present invention, a gray level average value of a gray level image corresponding to any initial image is calculated, a parameter initial value of a gray level linear variation function is obtained according to the gray level average value, the contrast and the light-dark ratio of the gray level image are further calculated, a plurality of gray level linear variation functions are obtained by continuously adjusting the parameter initial value according to the contrast and the light-dark ratio, and each gray level linear variation function can change the quality of the gray level image to obtain an optimized image, so that different optimized images are obtained according to different gray level linear variation functions, a gray level co-occurrence matrix of the optimized image is further constructed, and an information entropy corresponding to the optimized image is obtained according to the gray level co-occurrence matrix, where the corresponding optimized image is an optimal image when the information entropy is maximum. The method for adjusting the parameters of the gray scale linear change function by setting the parameter initial values can effectively reduce the calculated amount in the image optimization process, avoid the blind traversal of the parameters in the gray scale linear change function, and improve the optimization efficiency while accurately determining the optimal image corresponding to each gray scale image.
Based on the same inventive concept as the method embodiment, the embodiment of the present invention further provides an image optimization system based on a gray level co-occurrence matrix, which includes: a processor, a memory, and a computer program stored in the memory and executable on the processor. The processor, when executing the computer program, implements the steps in an embodiment of the image optimization method based on gray level co-occurrence matrix, such as the steps shown in fig. 1. The image optimization method based on the gray level co-occurrence matrix is described in detail in the above embodiments, and is not described again.
It should be noted that: the precedence order of the above embodiments of the present invention is only for description, and does not represent the merits of the embodiments. And specific embodiments thereof have been described above. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Claims (7)
1. An image optimization method based on a gray level co-occurrence matrix is characterized by comprising the following steps:
acquiring any initial image to be optimized; acquiring a gray level image of the initial image;
calculating the gray average value of the gray value of the pixel point in the gray image, and acquiring the parameter initial value of a gray linear change function according to the gray average value;
constructing a gray level co-occurrence matrix of the gray level image, and acquiring the contrast of the gray level image according to the gray level co-occurrence matrix; acquiring the brightness-dark ratio of the gray image according to the gray values of all pixel points in the gray image; adjusting the initial parameter value according to the contrast and the brightness ratio to obtain a plurality of gray scale linear change functions of different parameters; the gray level image is subjected to a plurality of gray level linear change functions to obtain a plurality of optimized images;
and acquiring the information entropy of all the optimized images, wherein the parameters of the gray linear variation function corresponding to the maximum information entropy are the optimal parameters, and the optimized images corresponding to the optimal parameters are the optimal images.
2. The method according to claim 1, wherein the step of obtaining the initial value of the parameter of the linear function of gray scale according to the mean value of gray scale comprises:
the parameters of the gray scale linear variation function comprise a slope and an intercept; the initial values of the parameters comprise initial values of slope and initial values of intercept;
the slope initial value and the gray average value are in a negative correlation relationship; the initial intercept value is in a negative correlation with the initial slope value.
3. The method according to claim 1, wherein the step of obtaining the contrast of the gray-scale image according to the gray-scale co-occurrence matrix comprises:
obtaining gray level difference values between adjacent pixel points in the gray level image, obtaining the probability of each gray level difference value in the gray level image according to the gray level co-occurrence matrix, and performing weighted summation with the probability of each gray level difference value as a weight value and the square of the corresponding gray level difference value to obtain the contrast of the gray level image.
4. The method according to claim 1, wherein the step of obtaining the light-to-dark ratio of the gray image according to the gray values of all the pixel points in the gray image comprises:
and acquiring the number of pixel points with pixel values in a darker range and the number of pixel points with pixel values in a brighter range in the gray image, wherein the ratio of the number of the pixel points in the brighter range to the number of the pixel points in the darker range is the brightness-to-darkness ratio.
5. The method of claim 2, wherein the step of adjusting the initial parameter value according to the contrast and the light-dark ratio comprises:
the initial slope value and the contrast are in positive correlation;
when the brightness-to-dark ratio is larger than 1, the initial value of the intercept is gradually reduced; and when the brightness-to-dark ratio is less than 1, the initial value of the intercept is gradually increased.
6. The method according to claim 1, wherein the step of obtaining information entropy of all the optimized images comprises:
acquiring a gray level co-occurrence matrix of the optimized image; and constructing a binary group according to the pixel values of any two pixel points in the optimized image, acquiring the probability of the binary group appearing in the optimized image according to the gray level co-occurrence matrix, and acquiring the information entropy of the optimized image according to the probability.
7. An image optimization system based on a gray level co-occurrence matrix, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor when executing the computer program implements the method of claim 16 the steps of any one of the methods.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210401113.7A CN114511471B (en) | 2022-04-18 | 2022-04-18 | Image optimization method and system based on gray level co-occurrence matrix |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210401113.7A CN114511471B (en) | 2022-04-18 | 2022-04-18 | Image optimization method and system based on gray level co-occurrence matrix |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114511471A true CN114511471A (en) | 2022-05-17 |
CN114511471B CN114511471B (en) | 2022-07-01 |
Family
ID=81555096
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210401113.7A Active CN114511471B (en) | 2022-04-18 | 2022-04-18 | Image optimization method and system based on gray level co-occurrence matrix |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114511471B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114693676A (en) * | 2022-05-31 | 2022-07-01 | 南通市通州翔鹏纺织品有限公司 | Optical detection method and device for bleaching defects of new material textiles |
CN114998313A (en) * | 2022-07-18 | 2022-09-02 | 山东海鑫达石油机械有限公司 | Fluid conveying pipe orifice burr identification and positioning method based on visual positioning |
CN115035113A (en) * | 2022-08-11 | 2022-09-09 | 深圳市通泰详特种电线电缆有限公司 | Nondestructive testing method for production defects of mobile phone data line based on X-ray |
CN115082443A (en) * | 2022-07-25 | 2022-09-20 | 山东天意机械股份有限公司 | Concrete product quality detection method based on intelligent monitoring platform |
CN115511735A (en) * | 2022-09-20 | 2022-12-23 | 北京拙河科技有限公司 | Snow field gray level picture optimization method and device |
Citations (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5339368A (en) * | 1991-11-21 | 1994-08-16 | Unisys Corporation | Document image compression system and method |
JPH06337932A (en) * | 1993-05-31 | 1994-12-06 | Nec Corp | Method for emphasizing contrast of picture and device therefor |
US20020168109A1 (en) * | 2001-04-03 | 2002-11-14 | Canon Kabushiki Kaisha | Image processing apparatus, image processing method, storage medium, and program |
US20080285853A1 (en) * | 2007-05-15 | 2008-11-20 | Xerox Corporation | Contrast enhancement methods and apparatuses |
US20090002285A1 (en) * | 2007-06-28 | 2009-01-01 | Kabushiki Kaisha Toshiba | Image display apparatus |
US20110150356A1 (en) * | 2009-12-22 | 2011-06-23 | Jo Kensei | Image processing apparatus, image processing method, and program |
CN103942803A (en) * | 2014-05-05 | 2014-07-23 | 北京理工大学 | SAR (Synthetic Aperture Radar) image based automatic water area detection method |
CN104715445A (en) * | 2013-12-13 | 2015-06-17 | 腾讯科技(深圳)有限公司 | Image processing method and system |
US20160189379A1 (en) * | 2014-12-25 | 2016-06-30 | Vivotek Inc. | Image calibrating method for stitching images and related camera and image processing system with image calibrating function |
CN105869171A (en) * | 2016-04-18 | 2016-08-17 | 重庆大学 | Method for quantitatively analyzing human skin line aging |
CN105931255A (en) * | 2016-05-18 | 2016-09-07 | 天津工业大学 | Method for locating target in image based on obviousness and deep convolutional neural network |
CN106454350A (en) * | 2016-06-28 | 2017-02-22 | 中国人民解放军陆军军官学院 | Non-reference evaluation method for infrared image |
CN107392967A (en) * | 2017-07-05 | 2017-11-24 | 温州大学 | A kind of coloured image gray processing method based on multimodal gauss of distribution function |
CN108171742A (en) * | 2017-12-26 | 2018-06-15 | 太原理工大学 | A kind of method that the evaluation of carbon fibre composite surface topography three-dimensional is realized based on shade of gray feature |
CN109961409A (en) * | 2019-02-26 | 2019-07-02 | 平安科技(深圳)有限公司 | A kind of method and device of linear enhancing picture contrast |
CN114216485A (en) * | 2022-02-23 | 2022-03-22 | 广州骏天科技有限公司 | Image calibration method for aerial surveying and mapping of unmanned aerial vehicle |
-
2022
- 2022-04-18 CN CN202210401113.7A patent/CN114511471B/en active Active
Patent Citations (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5339368A (en) * | 1991-11-21 | 1994-08-16 | Unisys Corporation | Document image compression system and method |
JPH06337932A (en) * | 1993-05-31 | 1994-12-06 | Nec Corp | Method for emphasizing contrast of picture and device therefor |
US20020168109A1 (en) * | 2001-04-03 | 2002-11-14 | Canon Kabushiki Kaisha | Image processing apparatus, image processing method, storage medium, and program |
US20080285853A1 (en) * | 2007-05-15 | 2008-11-20 | Xerox Corporation | Contrast enhancement methods and apparatuses |
US20090002285A1 (en) * | 2007-06-28 | 2009-01-01 | Kabushiki Kaisha Toshiba | Image display apparatus |
US20110150356A1 (en) * | 2009-12-22 | 2011-06-23 | Jo Kensei | Image processing apparatus, image processing method, and program |
US20160314566A1 (en) * | 2013-12-13 | 2016-10-27 | Tencent Technology (Shenzhen) Company Limited | Image processing method and apparatus |
CN104715445A (en) * | 2013-12-13 | 2015-06-17 | 腾讯科技(深圳)有限公司 | Image processing method and system |
CN103942803A (en) * | 2014-05-05 | 2014-07-23 | 北京理工大学 | SAR (Synthetic Aperture Radar) image based automatic water area detection method |
US20160189379A1 (en) * | 2014-12-25 | 2016-06-30 | Vivotek Inc. | Image calibrating method for stitching images and related camera and image processing system with image calibrating function |
CN105869171A (en) * | 2016-04-18 | 2016-08-17 | 重庆大学 | Method for quantitatively analyzing human skin line aging |
CN105931255A (en) * | 2016-05-18 | 2016-09-07 | 天津工业大学 | Method for locating target in image based on obviousness and deep convolutional neural network |
CN106454350A (en) * | 2016-06-28 | 2017-02-22 | 中国人民解放军陆军军官学院 | Non-reference evaluation method for infrared image |
CN107392967A (en) * | 2017-07-05 | 2017-11-24 | 温州大学 | A kind of coloured image gray processing method based on multimodal gauss of distribution function |
CN108171742A (en) * | 2017-12-26 | 2018-06-15 | 太原理工大学 | A kind of method that the evaluation of carbon fibre composite surface topography three-dimensional is realized based on shade of gray feature |
CN109961409A (en) * | 2019-02-26 | 2019-07-02 | 平安科技(深圳)有限公司 | A kind of method and device of linear enhancing picture contrast |
CN114216485A (en) * | 2022-02-23 | 2022-03-22 | 广州骏天科技有限公司 | Image calibration method for aerial surveying and mapping of unmanned aerial vehicle |
Non-Patent Citations (2)
Title |
---|
李冲冲: "基于机器视觉的水果分类方法研究", 《中国优秀博硕士学位论文全文数据库(硕士) 工程科技I辑》 * |
梁璠等: "自适应灰度多段线性变换的FPGA实现", 《电子设计工程》 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114693676A (en) * | 2022-05-31 | 2022-07-01 | 南通市通州翔鹏纺织品有限公司 | Optical detection method and device for bleaching defects of new material textiles |
CN114998313A (en) * | 2022-07-18 | 2022-09-02 | 山东海鑫达石油机械有限公司 | Fluid conveying pipe orifice burr identification and positioning method based on visual positioning |
CN114998313B (en) * | 2022-07-18 | 2022-10-21 | 山东海鑫达石油机械有限公司 | Fluid conveying pipe orifice burr identification and positioning method based on visual positioning |
CN115082443A (en) * | 2022-07-25 | 2022-09-20 | 山东天意机械股份有限公司 | Concrete product quality detection method based on intelligent monitoring platform |
CN115035113A (en) * | 2022-08-11 | 2022-09-09 | 深圳市通泰详特种电线电缆有限公司 | Nondestructive testing method for production defects of mobile phone data line based on X-ray |
CN115511735A (en) * | 2022-09-20 | 2022-12-23 | 北京拙河科技有限公司 | Snow field gray level picture optimization method and device |
Also Published As
Publication number | Publication date |
---|---|
CN114511471B (en) | 2022-07-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114511471B (en) | Image optimization method and system based on gray level co-occurrence matrix | |
CN115311176B (en) | Night image enhancement method based on histogram equalization | |
WO2017121018A1 (en) | Method and apparatus for processing two-dimensional code image, and terminal and storage medium | |
US20210319537A1 (en) | Image processing method, image processing apparatus, image processing system, and memory medium | |
CN110706172A (en) | Low-illumination color image enhancement method based on adaptive chaotic particle swarm optimization | |
CN104021531A (en) | Improved method for enhancing dark environment images on basis of single-scale Retinex | |
CN114581345B (en) | Image enhancement method and system based on self-adaptive linear graying | |
CN114862698B (en) | Channel-guided real overexposure image correction method and device | |
CN113191956B (en) | Backlight image enhancement method based on depth matting | |
CN114972102B (en) | Underwater image enhancement method based on global variable contrast enhancement and local correction | |
CN117974459A (en) | Low-illumination image enhancement method integrating physical model and priori | |
CN113947553A (en) | Image brightness enhancement method and device | |
Lee et al. | Ramp distribution-based contrast enhancement techniques and over-contrast measure | |
CN110136085B (en) | Image noise reduction method and device | |
CN114339064B (en) | Bayesian optimized exposure control method based on entropy weight image gradient | |
CN111028200B (en) | Image optimization method based on non-reference image quality evaluation and MSR | |
CN117939307B (en) | Self-adaptive brightness adjusting method suitable for fusion camera | |
CN112819838A (en) | Image enhancement method, electronic device, and storage medium | |
CN112862709B (en) | Image feature enhancement method, device and readable storage medium | |
Bataineh | Brightness and Contrast Enhancement Method for Color Images via Pairing Adaptive Gamma Correction and Histogram Equalization | |
CN112258434A (en) | Detail-preserving multi-exposure image fusion algorithm in static scene | |
CN113487520B (en) | High dynamic range image generation method and system based on converter temperature measurement | |
CN111199525A (en) | Image histogram equalization enhancement method and system | |
KR20020080574A (en) | method of enhancing a digital color image by an automatic image classification | |
Rowghanian | Underwater Image Restoration with a Complementary Haar Wavelet Transform Restoration and an Ensemble of Triple Elite Correction Algorithms using Bootstrap Aggregation and Random Forests |
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 | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20230717 Address after: Rooms 501 and 502, Floor 5, Building 2, Yard 52, Jiuxianqiao Road, Chaoyang District, Beijing, 100020 Patentee after: Beijing Yuntu Digital Marketing Consulting Co.,Ltd. Address before: 510000 2, Pazhou East Road, Haizhuqu District, Guangzhou, Guangdong, 2 905, 2 Patentee before: GUANGZHOU JUNTIAN TECHNOLOGY Co.,Ltd. |