CN114627030B - Self-adaptive image sharpening method and system - Google Patents
Self-adaptive image sharpening method and system Download PDFInfo
- Publication number
- CN114627030B CN114627030B CN202210519867.2A CN202210519867A CN114627030B CN 114627030 B CN114627030 B CN 114627030B CN 202210519867 A CN202210519867 A CN 202210519867A CN 114627030 B CN114627030 B CN 114627030B
- Authority
- CN
- China
- Prior art keywords
- sharpening
- image
- channel
- edge
- calculating
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 45
- 238000003707 image sharpening Methods 0.000 title claims abstract description 19
- 238000012545 processing Methods 0.000 claims abstract description 13
- 238000004364 calculation method Methods 0.000 claims description 13
- 230000003044 adaptive effect Effects 0.000 claims description 11
- 238000000605 extraction Methods 0.000 claims description 6
- 230000000694 effects Effects 0.000 abstract description 7
- 230000006870 function Effects 0.000 description 5
- 238000001914 filtration Methods 0.000 description 4
- 239000000126 substance Substances 0.000 description 4
- 238000013528 artificial neural network Methods 0.000 description 2
- 238000013135 deep learning Methods 0.000 description 2
- 238000002474 experimental method Methods 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 238000013527 convolutional neural network Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000000630 rising effect Effects 0.000 description 1
Images
Classifications
-
- G06T5/73—
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- 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/20004—Adaptive image processing
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
Abstract
The invention discloses a self-adaptive image sharpening method and a self-adaptive image sharpening system, and relates to the field of image processing. The invention comprises the following steps: extracting the image edge by using a sobel operator; calculating the information content of the processing results of different sharpening coefficients of the image edge, and selecting the sharpening coefficient corresponding to the maximum information content; and calculating a sharpening intensity map by using the color channels according to the sharpening coefficient. The invention can achieve the best sharpening effect in real time by adaptively adjusting the sharpening level.
Description
Technical Field
The invention relates to the field of image processing, in particular to a self-adaptive image sharpening method and a self-adaptive image sharpening system.
Background
Sharpening algorithms are commonly used image enhancement algorithms in an image processing process, and the main common algorithms are divided into two types:
1. the detail enhancement algorithm based on simple filtering, such as an optimized version of USM, first performs one or more kinds of filtering on an input image I to obtain a blurred image G, then subtracts the blurred image G from the input image I to obtain a detail image D = I-G, and adds the input image I and the detail image D according to a preset parameter w to obtain an output image O = I + wD. This method is commonly used in real-time image processing functions such as ISP.
2. The method based on the deep learning neural network is characterized in that an input image I is processed through one or more CNN networks to obtain an output image O. The method is generally used for non-real-time image processing functions such as post-aesthetic pictures.
The existing detail enhancement algorithm based on simple filtering usually needs to preset a parameter w according to the environment, and cannot adapt to a special environment in real time; the input of the existing detail enhancement algorithm based on simple filtering is generally an image with good quality and small noise, and the processing such as noise reduction needs to be carried out before and after sharpening, when the quality of the input image is poor, the image quality is worse, and the dependence on pre-processing is strong; the method based on the deep learning neural network has high calculation force requirement and is difficult to realize real-time operation.
Therefore, how to solve the above problems needs to be solved by those skilled in the art.
Disclosure of Invention
In view of the above, the present invention provides a method and a system for adaptive image sharpening.
In order to achieve the purpose, the invention adopts the following technical scheme:
an adaptive image sharpening method, comprising the steps of:
extracting an image Edge by using a sobel operator;
calculating the information content of the processing results of different sharpening coefficients of the image edge, and selecting a sharpening coefficient w corresponding to the maximum information content;
and calculating a sharpening intensity image E according to the sharpening coefficient.
Optionally, further sharpening is performed in the V channel, and the calculation method is as follows:
wherein, V is the intensity channel formed by taking the maximum value of R, G, B channels on each pixel, and + and/are the addition, multiplication and division operations carried out according to the pixels respectively.
Optionally, the specific steps of extracting the image edge by using the sobel operator are as follows:
and respectively extracting gradients of the three channels of RGB by using a sobel operator, and taking the maximum gradient as a final gradient to obtain an image edge extraction result.
Optionally, the specific algorithm for extracting the image edge by using the sobel operator is as follows:
wherein the content of the first and second substances,、、to use sobel operatorThe edge images of the channels are calculated R, G, B respectively.
Optionally, the information amount calculation method is as follows: the information entropy size is taken as the information intensity wanted in the sharpened picture, the ratio of pixels exceeding the range of [0,255] is taken as the intensity of the information unwanted in the sharpened picture, and the two are integrated to obtain the information content of the current image.
Alternatively, the calculation formula of the information amount Info defining the image img is as follows:
the mathematical relationship between info (O) and the sharpening coefficient w is obtained by modeling the information content of the output graph O with different sharpening coefficients w, so that the sharpening coefficient w capable of maximizing the information content of the output graph O is selected.
Optionally, the specific formula for calculating the sharpening intensity map by color channels is as follows:
wherein the content of the first and second substances,for the R-channel map of the input image,for the G-channel map of the input image,as a B-channel map of the input image,the image edges calculated for the R channel,the image edges calculated for the G channel are,the image edges calculated for the B channel,for the sharpening coefficient of the R channel calculated according to the above method,for the sharpening coefficient of the B channel calculated according to the above method,the sharpening coefficients of the G channels calculated according to the method are respectively the addition, multiplication and division operations carried out on a pixel basis, and the formula is applied to carry out judgment and selection on a point-by-point basis instead of the judgment and selection of the whole graph.
An adaptive image sharpening system, comprising:
the image is convenient for extracting the module: the method comprises the steps of extracting image edges by using a sobel operator;
a sharpening coefficient calculation module: the method comprises the steps of calculating the information content of processing results of different sharpening coefficients of an image edge, and selecting a sharpening coefficient corresponding to the maximum information content;
an image enhancement module: and the method is used for calculating a sharpening intensity map by using the color channels according to the sharpening coefficient.
Optionally, the sharpening coefficient calculating module is further configured to perform further sharpening on the V channel.
According to the technical scheme, compared with the prior art, the invention discloses the self-adaptive image sharpening method and the self-adaptive image sharpening system, and the optimal sharpening effect can be achieved in real time by self-adaptively adjusting the sharpening level; and calculating sharpening levels by channels by using multi-channel (RGB) combined edge information so as to adaptively sharpen different pixels on the same image.
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 flow chart 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 a self-adaptive image sharpening method, which comprises the following steps as shown in figure 1:
image edge extraction: in a conventional sharpening algorithm, it is generally selected to extract a gradient on a V-gray map of an original image. However, the image gradient is not only in the V domain, but also in the chrominance domain, and the selection of a single V may result in the sharpness of the gradient in some original images. The most complete gradient is extracted for the comprehensive gradient characteristics of each channel. The present invention extracts edges using the following means: extracting gradients of three channels of RGB respectively by using sobel operator, and taking the maximum gradient as a final gradient
Wherein the content of the first and second substances,、、the edge images of the R, G, B channels are respectively calculated by using a sobel operator.
Through a comparison experiment, RGB three edges are combined, and the extraction of edge information is more complete.
Calculating a sharpening coefficient: in order to adaptively determine the sharpening strength, the method estimates the information quantity of the processing results of different sharpening coefficients of the current input image, and selects the sharpening coefficient corresponding to the maximum information quantity. The information amount calculation method comprises the following steps: the information entropy size is used as the desired information intensity in the sharpened picture, the ratio (over range) of pixels exceeding the range of [0,255] is used as the intensity of the unnecessary information in the sharpened picture, and the two are combined to obtain the current image information amount.
Through experimental tests, when the sharpening strength is enhanced,is a slowly growing logarithmic function.All required values can be obtained by one traversal through histogram calculation.
According to the method, the information entropy function is calculated and estimated through the information entropy of three times, the over range is calculated through the histogram of one time, and the information quantity of all sharpening value images can be accurately estimated.
Wherein, a, b and c are fixed parameters obtained by experiments, hist (img) is a statistical histogram of the image img, and hist (img) m and n are the number of pixel points of the image img with the value between m and n
Detail enhancement: general experience shows that sharpening by color channels has a more obvious effect than V-channel sharpening, but a color edge phenomenon occurs at the sharpened edge. According to the method, the sharpening intensity image is calculated by using the color-divided channels, and then sharpening is performed on the V channel, so that a better sharpening effect can be obtained, and meanwhile, the color edge phenomenon is avoided.
Where V is an intensity channel formed by taking the maximum value of R, G, B channels for each pixel, and + is the addition, multiplication, and division operations performed on a pixel-by-pixel basis.
The specific formula for calculating the sharpening intensity map by color channels is as follows:
wherein the content of the first and second substances,for the R-channel map of the input image,for the G-channel map of the input image,as a B-channel map of the input image,the image edges calculated for the R channel,the image edges calculated for the G channel,the image edges calculated for the B channel,for the sharpening coefficient of the R channel calculated according to the above method,for the sharpening coefficient of the B channel calculated according to the above method,the sharpening coefficients of the G channels calculated by the method are + and x, respectively, addition, multiplication and division operations carried out according to pixels, and the formula is applied to carry out judgment and selection point by point instead of judgment and selection of the whole graph.
The embodiment also discloses an adaptive image sharpening system, which includes:
the image is convenient for extracting the module: the method comprises the steps of extracting image edges by using a sobel operator;
a sharpening coefficient calculation module: the method comprises the steps of calculating the information content of processing results of different sharpening coefficients of an image edge, and selecting a sharpening coefficient corresponding to the maximum information content;
an image enhancement module: and the method is used for calculating a sharpening intensity map by using the color channels according to the sharpening coefficient.
And the sharpening coefficient calculation module is also used for further sharpening in the V channel.
In another embodiment, the gradient extraction can also use canny, etc., which can bring about the improvement of the effect but also increase the computational complexity; instead of using the three channels of RGB, a single channel gradient such as Y, L, V can be calculated and used, but the enhancement effect is slightly weaker;
because the rising trend of the information entropy value of the image in the actual test is very gentle, the influence on the information quantity function is far less than that of an over range, and the calculation force requirement of the information entropy is higher, the following optimization can be considered: taking over range as a unique reference variable of the adaptive algorithm;
other sharpening methods such as USM can also be adopted for sharpening enhancement, and the self-adaptive effect can also be achieved.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
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 (6)
1. An adaptive image sharpening method is characterized by comprising the following steps:
extracting an Edge of the image by using a sobel operator;
calculating the information content of the processing results of different sharpening coefficients of the image edge, and selecting a sharpening coefficient w corresponding to the maximum information content;
calculating a sharpening intensity graph E according to the sharpening coefficient; the specific steps of extracting the image edge by using the sobel operator are as follows:
the method comprises the following steps of respectively extracting gradients of three channels of RGB by using a sobel operator, taking the maximum gradient as a final gradient to obtain an image edge extraction result, wherein the specific algorithm for extracting the image edge by using the sobel operator is as follows:
wherein, Edge R 、Edge G 、Edge B Respectively calculating R, G, B channel edge images by using a sobel operator;
the specific formula for calculating the sharpening intensity map by color channels is as follows:
wherein, I R R-channel map, I, for the input image G For a G-channel map of the input image, I B For B-channel maps of the input image, Edge R Edge of image calculated for R channel G Edge, computed for G channel B Image edge, w, calculated for B channel R Sharpening factor, w, for the R channel calculated according to the method described above B Sharpening factor, w, for the B channel calculated according to the method described above G The sharpening coefficients of the G channel calculated according to the above method are + and/are addition, multiplication, and division operations performed on a pixel-by-pixel basis, respectively.
2. The adaptive image sharpening method according to claim 1, wherein the input image I is sharpened by using a split-channel sharpening intensity map, and further comprises sharpening by using a V-channel, and the calculation method is as follows:
O=I*(V+E)/V;
wherein, V is the intensity channel formed by taking the maximum value of R, G, B channels on each pixel, and + and/are the addition, multiplication and division operations carried out according to the pixels respectively.
3. The adaptive image sharpening method according to claim 1, wherein the amount of information is calculated as follows: the information entropy size is used as the desired information intensity in the sharpened picture, the ratio of pixels exceeding the range of [0,255] is used as the intensity of the unnecessary information in the sharpened picture, and the information entropy size and the ratio are integrated to obtain the information amount of the current image.
4. The adaptive image sharpening method according to claim 3, wherein the amount of information is calculated as follows:
Info(img)=entropy(img)+rate(0<img<255);
the mathematical relationship between info (O) and the sharpening coefficient w is obtained by modeling the information content of the output graph O with different sharpening coefficients w, so that the sharpening coefficient w capable of maximizing the information content of the output graph O is selected.
5. An adaptive image sharpening system, comprising:
the image is convenient for extracting the module: the method comprises the steps of extracting image edges by using a sobel operator;
the method comprises the following steps of respectively extracting gradients of three channels of RGB by using a sobel operator, taking the maximum gradient as a final gradient to obtain an image edge extraction result, wherein the specific algorithm for extracting the image edge by using the sobel operator is as follows:
wherein, Edge R 、Edge G 、Edge B Respectively calculating R, G, B channel edge images by using a sobel operator; a sharpening coefficient calculation module: the method comprises the steps of calculating the information content of processing results of different sharpening coefficients of an image edge, and selecting a sharpening coefficient corresponding to the maximum information content; an image enhancement module: the system is used for calculating a sharpening intensity map by using the color channels according to the sharpening coefficient;
the specific formula for calculating the sharpening intensity map by color channels is as follows:
wherein, I R For an R-channel map of the input image, I G For a G-channel map of the input image, I B For B-channel maps of the input image, Edge R Edge, computed for R channel G Edge, computed for G channel B Image edge, w, calculated for B channel R Sharpening factor, w, for the R channel calculated according to the method described above B Sharpening factor, w, for the B channel calculated according to the method described above G The sharpening coefficients of the G channel calculated according to the above method are + and/are addition, multiplication, and division operations performed on a pixel-by-pixel basis, respectively.
6. The adaptive image sharpening system of claim 5, wherein the sharpening factor calculation module is further configured to perform further sharpening in the V channel.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210519867.2A CN114627030B (en) | 2022-05-13 | 2022-05-13 | Self-adaptive image sharpening method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210519867.2A CN114627030B (en) | 2022-05-13 | 2022-05-13 | Self-adaptive image sharpening method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114627030A CN114627030A (en) | 2022-06-14 |
CN114627030B true CN114627030B (en) | 2022-09-20 |
Family
ID=81906914
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210519867.2A Active CN114627030B (en) | 2022-05-13 | 2022-05-13 | Self-adaptive image sharpening method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114627030B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116228586B (en) * | 2023-03-14 | 2023-09-08 | 深圳市合西科技有限公司 | Sharpening algorithm selection system based on traversal processing |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6097847A (en) * | 1993-05-31 | 2000-08-01 | Nec Corporation | Method of and apparatus for calculating sharpness of image and apparatus for sharpening image |
CN105763768A (en) * | 2014-12-15 | 2016-07-13 | 深圳市中兴微电子技术有限公司 | Image processing method, device and system |
Family Cites Families (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7430330B2 (en) * | 2001-01-16 | 2008-09-30 | Hamilton Chris H | Method and apparatus for optimizing a JPEG image using regionally variable compression levels |
JP2003317095A (en) * | 2002-02-25 | 2003-11-07 | Noritsu Koki Co Ltd | Method and program for image sharpening processing, recording medium where the image sharpening processing program is recorded, and image output device |
EP2124190B1 (en) * | 2008-05-19 | 2011-08-31 | Mitsubishi Electric Information Technology Centre Europe B.V. | Image processing to enhance image sharpness |
US8687912B2 (en) * | 2009-03-16 | 2014-04-01 | Nikon Corporation | Adaptive overshoot control for image sharpening |
US8655096B2 (en) * | 2011-09-30 | 2014-02-18 | Apple Inc. | Automatic image sharpening using entropy-based blur radius |
AU2012201684A1 (en) * | 2012-03-21 | 2013-10-10 | Canon Kabushiki Kaisha | Image compression |
CN102768758B (en) * | 2012-07-04 | 2014-10-29 | 南京工业职业技术学院 | Improved color image unsharp masking (USM) method |
US9978121B2 (en) * | 2013-12-04 | 2018-05-22 | Razzor Technologies | Adaptive sharpening in image processing and display |
AU2015201623A1 (en) * | 2015-03-30 | 2016-10-20 | Canon Kabushiki Kaisha | Choosing optimal images with preference distributions |
WO2016206087A1 (en) * | 2015-06-26 | 2016-12-29 | 北京大学深圳研究生院 | Low-illumination image processing method and device |
CN105894459A (en) * | 2015-12-10 | 2016-08-24 | 乐视云计算有限公司 | Gradient value and direction based image sharpening method and device |
CN108470343A (en) * | 2017-02-23 | 2018-08-31 | 南宁市富久信息技术有限公司 | A kind of improved method for detecting image edge |
JP6440766B2 (en) * | 2017-04-06 | 2018-12-19 | キヤノン株式会社 | Image processing method, image processing apparatus, imaging apparatus, program, and storage medium |
CN108932700A (en) * | 2018-05-17 | 2018-12-04 | 常州工学院 | Self-adaption gradient gain underwater picture Enhancement Method based on target imaging model |
CN110889806A (en) * | 2019-11-19 | 2020-03-17 | 常州工学院 | Adaptive gain image enhancement method based on fractional order multi-scale entropy fusion |
CN110992264B (en) * | 2019-11-28 | 2023-09-01 | 北京金山云网络技术有限公司 | Image processing method, processing device, electronic equipment and storage medium |
CN114372934A (en) * | 2022-01-07 | 2022-04-19 | 重庆邮电大学 | Quantum color image sharpening filtering method and system |
-
2022
- 2022-05-13 CN CN202210519867.2A patent/CN114627030B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6097847A (en) * | 1993-05-31 | 2000-08-01 | Nec Corporation | Method of and apparatus for calculating sharpness of image and apparatus for sharpening image |
CN105763768A (en) * | 2014-12-15 | 2016-07-13 | 深圳市中兴微电子技术有限公司 | Image processing method, device and system |
Also Published As
Publication number | Publication date |
---|---|
CN114627030A (en) | 2022-06-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107527333B (en) | Quick image enhancement method based on gamma transformation | |
US7995855B2 (en) | Image processing method and apparatus | |
US7020332B2 (en) | Method and apparatus for enhancing a digital image by applying an inverse histogram-based pixel mapping function to pixels of the digital image | |
WO2016206087A1 (en) | Low-illumination image processing method and device | |
EP1412920B1 (en) | A general purpose image enhancement algorithm which augments the visual perception of detail in digital images | |
EP1209621A2 (en) | A method for enhancing a digital image based upon pixel color | |
US6614944B1 (en) | Image enhancement filter with adaptive threshold | |
CN106780417A (en) | A kind of Enhancement Method and system of uneven illumination image | |
KR100532121B1 (en) | Method and apparatus for image detail enhancement | |
Iwanami et al. | An adaptive contrast enhancement using regional dynamic histogram equalization | |
WO2006011129A2 (en) | Adaptive image improvement | |
JPH10243240A (en) | Image-processing unit | |
CN107895350B (en) | HDR image generation method based on self-adaptive double gamma transformation | |
CN114627030B (en) | Self-adaptive image sharpening method and system | |
CN105335933A (en) | Image contrast enhancement method and apparatus | |
CN111476744B (en) | Underwater image enhancement method based on classification and atmospheric imaging model | |
CN201726464U (en) | Novel video image sharpening processing device | |
CN114187222A (en) | Low-illumination image enhancement method and system and storage medium | |
WO2020107308A1 (en) | Low-light-level image rapid enhancement method and apparatus based on retinex | |
CN111429381B (en) | Image edge enhancement method and device, storage medium and computer equipment | |
CN111028181B (en) | Image enhancement processing method, device, equipment and storage medium | |
CN110545414B (en) | Image sharpening method | |
CN117274085A (en) | Low-illumination image enhancement method and device | |
CN111080563A (en) | Histogram equalization method based on traversal optimization | |
RU2383924C2 (en) | Method for adaptive increase of sharpness of digital photographs during printing |
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 |