CN111369448A - Method for improving image quality - Google Patents
Method for improving image quality Download PDFInfo
- Publication number
- CN111369448A CN111369448A CN201911384583.1A CN201911384583A CN111369448A CN 111369448 A CN111369448 A CN 111369448A CN 201911384583 A CN201911384583 A CN 201911384583A CN 111369448 A CN111369448 A CN 111369448A
- Authority
- CN
- China
- Prior art keywords
- image
- highlighting
- factor
- converting
- masked
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 25
- 238000001914 filtration Methods 0.000 claims abstract description 7
- 238000013507 mapping Methods 0.000 claims abstract description 7
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 6
- 230000000873 masking effect Effects 0.000 claims abstract description 5
- 238000006243 chemical reaction Methods 0.000 claims description 6
- 238000009499 grossing Methods 0.000 claims description 5
- 230000004927 fusion Effects 0.000 claims description 2
- 238000010415 tidying Methods 0.000 abstract description 3
- 230000008569 process Effects 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 3
- 230000002708 enhancing effect Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000001364 causal effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 238000004737 colorimetric analysis Methods 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 238000009795 derivation Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000003708 edge detection Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 238000000844 transformation Methods 0.000 description 1
Images
Classifications
-
- G06T5/70—
-
- G06T5/90—
Abstract
The invention discloses a method for improving image quality, which comprises the following steps: s1, carrying out non-local mean filtering on the image to be processed to obtain an image A; s2, converting the image A into an image B by a Laplacian operator; s3, highlighting the graph edge of the image A by utilizing a Sobel algorithm to obtain an image C; s4, masking the image C to the image B to form a masked image, and multiplying the masked image by an influence factor K to complete image enhancement; s5, converting the enhanced image into a pseudo color image E through a mapping function, and eliminating some bad texture burrs on the basis of good pseudo color enhancement, so that the image is smooth and tidy; the fine and narrow detailed structure of the drawing is kept while the tidying aesthetic feeling is improved.
Description
Technical Field
The present invention relates to the field of image processing. And more particularly, to a method of improving image quality.
Background
Even if the experimental environment is good, the problems of fuzziness, deformation, noise and the like are likely to occur in the data generated in the actual production life, which brings much inconvenience to the subsequent work of engineering personnel. Therefore, it is necessary to improve the image quality and convert the low-quality image into a high-quality image.
The method integrates the method of increasing the influence factors and the color matching, adopts the opencv computer vision library to improve the image quality under the MFC platform, is convenient for the human eyes of a user to distinguish the content of the detected image, improves the identification degree, and lays a foundation for subsequent work of engineering personnel such as image marking.
Disclosure of Invention
The invention aims to provide a method for improving image quality, which can effectively filter noise, retain original image details and enhance image outline so as to make an image clearer.
In order to achieve the purpose, the invention adopts the following technical scheme:
the invention provides a method for improving image quality, which is characterized by comprising the following steps:
s1, carrying out non-local mean filtering on the image to be processed to obtain an image A;
s2, converting the image A into an image B by a Laplacian operator;
s3, highlighting the graph edge of the image A by utilizing a Sobel algorithm to obtain an image C;
s4, masking the image C to the image B to form a masked image, and multiplying the masked image by an influence factor K to complete image enhancement;
and S5, converting the enhanced image into a pseudo color image E through a mapping function.
Preferably, said step S5 includes fusing reference factors in the conversion of the enhanced image into said image EFor retaining information on the grey scale map.
Preferably, the enhanced image is converted into a fusion reference factor in the pseudo-color image E through a mapping functionComprises that
Using a laplace transform, we have:
WhereinAndis the partial derivative of G in both directions α and β derived from Laplace transform, and the gradient magnitude and direction angle are as follows:
here, after passing through the filters of the invention, the original image f (x, y) can be transformed into a guide image:
wherein, R (x, y), G (x, y) and B (x, y) are input images, p and q are any pixel of the images, sigma is a space smoothing parameter,
by conversion, R (x, y), G (x, y), and B (x, y) are converted into GR (x, y), GG (x, y), and GB (x, y), and these three components are recombined to obtain a final result:
preferably, the step S1 specifically includes performing non-local mean filtering on the pixel point to be denoised of the image to be processed by using a search window, where the search window is preferably 7 × 7 or 9 × 9.
Preferably, the step S2 specifically includes calculating a laplacian parameter for highlighting image details for the image a, wherein the laplacian parameter is preferably 1.
Preferably, the step S3 specifically includes selecting a sobel operator kernel for the image a to calculate for highlighting the image edge, where the sobel operator kernel is preferably 3.
Preferably, the step S4 specifically includes selecting the influence factor k for controlling the intensity of the mask image, where the influence factor k is preferably 0.55.
The invention has the following beneficial effects:
the invention uses a plurality of complementary image enhancement technologies to process complex images, can effectively remove image noise, adjust the brightness and contrast of the images, keep the image textures, enhance the outline boundary information of the images, can remove some bad texture burrs on the basis of good pseudo-color enhancement, and has smooth and tidy images; the fine and narrow detailed structure of the drawing is kept while the tidying aesthetic feeling is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 shows a flow chart of a method for improving image quality according to the present invention.
Detailed Description
In order to make the technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
It should be noted that the term [ the embodiment of the present invention ] does not limit the execution sequence of steps a to e, and for example, step c and step a ] can be executed in sequence
All numerical designations of the invention (e.g., temperature, time, concentration, weight, and the like, including ranges for each) may generally be approximations that vary (+) or (-) in increments of 0.1 or 1.0, as appropriate. All numerical designations should be understood as preceded by the term "about". "C (B)
Examples
As shown in fig. 1, a method for improving image quality includes enhancing an edge contour of an image by using a combined action of a Sobel gradient algorithm and a Laplacian operator, and then enhancing image details by using a sliding window; converting the gray scale map to color so that some information that cannot be captured in the gray scale map can be obtained, comprising the steps of:
s1, performing non-local mean filtering on the image to be processed to obtain an image A, and performing non-local mean filtering on the pixel point to be denoised of the image to be processed by using a search window, wherein the search window is preferably 7 × 7 or 9 × 9;
s2, converting the image A into an image B by using a Laplacian operator, wherein the Laplacian operator parameter is preferably 1;
s3, highlighting the graph edge of the image A by utilizing a Sobel algorithm to obtain an image C, wherein the Sobel operator kernel is preferably 3;
s4, masking the image C to the image B to form a masked image, multiplying the masked image by an influence factor K to complete image enhancement, wherein the influence factor K is used for controlling the strength of the masked image, and the influence factor K is preferably 0.55;
and S5, converting the enhanced image into a pseudo color image E through a mapping function.
In particular, said step S5 includes fusing reference factors in the conversion of the enhanced image into said image EFor retaining information on the grey scale map.
Using a laplace transform, we have:
WhereinAndis the partial derivative of G in both directions α and β derived from Laplace transform, and the gradient magnitude and direction angle are as follows:
here, after passing through the filters of the invention, the original image f (x, y) can be transformed into a guide image:
wherein, R (x, y), G (x, y) and B (x, y) are input images, p and q are any pixel of the images, sigma is a space smoothing parameter,
by conversion, R (x, y), G (x, y), and B (x, y) are converted into GR (x, y), GG (x, y), and GB (x, y), and these three components are recombined to obtain a final result:
the Sobel operator is a discrete differential operator mainly used for edge detection, and combines gaussian smoothing and differential derivation to calculate the approximate gradient of the image gray function.
The calculation process is as follows:
assuming the affected image is I, then the following operations are performed:
1. the derivatives are derived in the x and y directions, respectively.
A. Level change: i is convolved with an odd-sized kernel. For example, when the kernel size is 3, GxThe calculation result of (a) is:
B. vertical variation: i is convolved with an odd-sized kernel. For example, when the kernel size is 3, the calculation result is:
2. at each point of the image, the approximate gradient is found by combining the two results:
in addition, sometimes the following simpler formula can be substituted:
G=|Gx|+|Gy|
the Laplacian operator is a second order differential operator in n-dimensional euclidean space, defined as the divergence div of the gradient grad.
And then the preposed network performs detail enhancement by using dynamic scanning of a sliding window, wherein the window is set to be 3 x 3 of aperture:
the Sobel gradient algorithm is then used to highlight the image edges, and its kernel size ksize takes a default value of 3, where [ xorder ═ 1, yorder ═ 0, ksize ═ 3] to calculate the derivative of the image X direction, when the corresponding kernels are:
the derivatives in the Y direction of the image are calculated [ xorder ═ 0, yorder ═ 1, ksize ═ 3], when the corresponding kernels are:
the smoothed gradient image is used for masking the Laplacian image to form a masked image mask, and k × mask is superimposed on the original image to complete image enhancement.
According to the research result in the aspect of colorimetry, the gray images are corresponding to red channels, green channels and blue channels, and finally the colors in the three channels are synthesized into RGB color values for display.
Assuming that f (x, y) is a black-and-white image, and R (x, y), G (x, y), and B (x, y) are f (x, y) mapped to three color components of the RGB space, the pseudo color process can be expressed as:
R(x,y)=fR[f(x,y)]
G(x,y)=fG[f(x,y)]
B(x,y)=fG[f(x,y)]
a grey scale image can be converted into a different pseudo color image given different mapping functions,
the invention adds a filter fused with reference factors on the basis of the traditional gray-scale image-pseudo color matching process, has the function of well retaining the information on the gray-scale image and compromises the contradiction between the detection precision and the anti-noise capability brought by the traditional method.
The method comprises the following steps:
1、(-s)-β
2、(s)α
3. using the laplace transform one can obtain:
4. let G be (-s)-βsαReference factors are incorporated hereinI.e. the vector of G at the first derivative of the novel cascade of non-causal fractional orders.
WhereinAndis the partial derivative of G in both directions α and β derived from the Laplace transform.
Here, R (x, y), G (x, y), and B (x, y) are input images, and after passing through the filters in the invention, the original image f (x, y) can be converted into a guide image:
wherein p and q are any pixel of the image, and sigma is a spatial smoothing parameter. Through this series of transformations, R (x, y), G (x, y), B (x, y) have been transformed into GR (x, y), GG (x, y), GB (x, y), and these three components are recombined to obtain the final result:
compared with other methods, the method adopted by the invention has the following advantages: on the basis of good pseudo-color enhancement, some bad texture burrs can be removed, and the picture is smooth and tidy; the fine and narrow detailed structure of the drawing is kept while the tidying aesthetic feeling is improved.
It should be understood that the above-mentioned embodiments of the present invention are only examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention, and it will be obvious to those skilled in the art that other variations or modifications may be made on the basis of the above description, and all embodiments may not be exhaustive, and all obvious variations or modifications may be included within the scope of the present invention.
Claims (7)
1. A method for improving image quality, comprising the steps of:
s1, carrying out non-local mean filtering on the image to be processed to obtain an image A;
s2, converting the image A into an image B by a Laplacian operator;
s3, highlighting the graph edge of the image A by utilizing a Sobel algorithm to obtain an image C;
s4, masking the image C to the image B to form a masked image, and multiplying the masked image by an influence factor K to complete image enhancement;
and S5, converting the enhanced image into a pseudo color image E through a mapping function.
3. The method of claim 2, wherein the enhanced image is converted to a fusion reference factor in a pseudo-color image E by a mapping functionComprises that
Using a laplace transform, we have:
WhereinAndis the partial derivative of G in both directions α and β derived from Laplace transform, and the gradient magnitude and direction angle are as follows:
here, after passing through the filters of the invention, the original image f (x, y) can be transformed into a guide image:
wherein, R (x, y), G (x, y) and B (x, y) are input images, p and q are any pixel of the images, sigma is a space smoothing parameter,
by conversion, R (x, y), G (x, y), and B (x, y) are converted into GR (x, y), GG (x, y), and GB (x, y), and these three components are recombined to obtain a final result:
4. the method according to claim 1, wherein the step S1 specifically comprises performing non-local mean filtering on the pixel points to be denoised of the image to be processed using a search window, preferably 7 × 7 or 9 × 9.
5. The method according to claim 1, characterized in that said step S2 specifically comprises computing on said image a using laplacian for highlighting image details, said laplacian parameter preferably being 1.
6. The method according to claim 1, wherein the step S3 specifically comprises selecting a sobel operator kernel for the image a to compute for highlighting the image edge, wherein the sobel operator kernel is preferably 3.
7. The method according to claim 1, wherein the step S4 specifically comprises selecting the impact factor k for controlling the intensity of the mask image, wherein the impact factor k is preferably 0.55.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911384583.1A CN111369448A (en) | 2019-12-28 | 2019-12-28 | Method for improving image quality |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911384583.1A CN111369448A (en) | 2019-12-28 | 2019-12-28 | Method for improving image quality |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111369448A true CN111369448A (en) | 2020-07-03 |
Family
ID=71209966
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911384583.1A Pending CN111369448A (en) | 2019-12-28 | 2019-12-28 | Method for improving image quality |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111369448A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040218072A1 (en) * | 2001-08-30 | 2004-11-04 | Xuemei Zhang | Method and apparatus for applying tone mapping functions to color images |
CN105976342A (en) * | 2015-09-01 | 2016-09-28 | 南京理工大学 | Adaptive gray-level image pseudo-color processing method |
CN107516302A (en) * | 2017-08-31 | 2017-12-26 | 北京无线电计量测试研究所 | A kind of method of the mixed image enhancing based on OpenCV |
WO2019119372A1 (en) * | 2017-12-21 | 2019-06-27 | 深圳前海达闼云端智能科技有限公司 | Display method and device, electronic device and computer program product |
-
2019
- 2019-12-28 CN CN201911384583.1A patent/CN111369448A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040218072A1 (en) * | 2001-08-30 | 2004-11-04 | Xuemei Zhang | Method and apparatus for applying tone mapping functions to color images |
CN105976342A (en) * | 2015-09-01 | 2016-09-28 | 南京理工大学 | Adaptive gray-level image pseudo-color processing method |
CN107516302A (en) * | 2017-08-31 | 2017-12-26 | 北京无线电计量测试研究所 | A kind of method of the mixed image enhancing based on OpenCV |
WO2019119372A1 (en) * | 2017-12-21 | 2019-06-27 | 深圳前海达闼云端智能科技有限公司 | Display method and device, electronic device and computer program product |
Non-Patent Citations (1)
Title |
---|
苏明忠: "医学图像分割算法研究" * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9495582B2 (en) | Digital makeup | |
US6807300B1 (en) | Noise reduction method utilizing color information, apparatus, and program for digital image processing | |
US9626751B2 (en) | Method and system for analog/digital image simplification and stylization | |
US20110243428A1 (en) | Bi-Affinity Filter: A Bilateral Type Filter for Color Images | |
JP4858609B2 (en) | Noise reduction device, noise reduction method, and noise reduction program | |
US20090091643A1 (en) | Image-Acquisition Apparatus | |
CN108090876B (en) | Image processing method and device | |
Deng et al. | A guided edge-aware smoothing-sharpening filter based on patch interpolation model and generalized gamma distribution | |
WO2022088976A1 (en) | Image processing method and device | |
Kano et al. | Performance improvement of face image super-resolution processing by high-precision skin color detection | |
CN105976308B (en) | A kind of real-time processing method of the high-quality U.S. face in mobile terminal based on GPU | |
CN105956993A (en) | Instant presenting method of mobile end video beauty based on GPU | |
JP5203159B2 (en) | Image processing method, image processing system, and image processing program | |
JP4742068B2 (en) | Image processing method, image processing system, and image processing program | |
CN112801879A (en) | Image super-resolution reconstruction method and device, electronic equipment and storage medium | |
CN110298812B (en) | Image fusion processing method and device | |
CN111369448A (en) | Method for improving image quality | |
JP7437921B2 (en) | Image processing device, image processing method, and program | |
CN115100226A (en) | Contour extraction method based on monocular digital image | |
JP7365206B2 (en) | Image processing device, image processing method, and program | |
CN105469367B (en) | Dynamic video image definition intensifying method and device | |
Peng et al. | Detail enhancement for infrared images based on propagated image filter | |
WO2020241337A1 (en) | Image processing device | |
Ru et al. | Proposal of multiscale retinex using illumination adjustment for digital images | |
Yun et al. | A contrast enhancement method for HDR image using a modified image formation model |
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 |