A sharpening method for enhancing image details

CN122966471APending Publication Date: 2026-10-23INGENIC SEMICON CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510481184.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-17
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

ISP降噪处理过程中,势必将在降噪的同时,把一些图像细节给消除了,导致图像不够清晰

Benefits of technology

[0068]本发明的有益效果包括:不同的高斯处理之后的图做差,该差值又根据滤波结果做调整得到最终的边缘图得到的边缘更细碎,保留更多细节,图像会更清晰。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122966471A_ABST
    Figure CN122966471A_ABST
Patent Text Reader

Abstract

The application provides a sharpening method for improving image details, comprising the following steps: S1, inputting an image; respectively performing S2 and S4; S2, applying a horizontal filter; S3, applying a vertical filter, and performing S6; S4, Gaussian blurring; S5, calculating a difference; S6, sharpening processing; S7, obtaining an edge map; merging with an original image; S8, obtaining a sharpened image; and outputting. The difference between the images after different Gaussian processing is calculated, and the difference is adjusted according to the filtering result to obtain a final edge map, so that the edge is more fragmented, more details are retained, and the image is clearer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image processing technology, and specifically relates to a sharpening method for enhancing image details. Background Technology

[0002] In existing technologies, concepts such as sharpness and acutance are frequently encountered in image processing. Sharpness is often used to describe how quickly image information transitions at boundaries. High-contrast images have very fast transition speeds, forming very sharp edges, while low-contrast images have a certain transition buffer, which manifests as blurred edges in the image. Figure 1 As shown. Due to the characteristics of human vision, which is more sensitive to high-contrast stimuli, higher sharpness makes the image appear clearer, while lower sharpness makes the image appear blurry and lacking in detail. Sharpening involves using certain algorithms to process an image to detect edges, and then applying filtering measures to edges that meet certain conditions to improve edge sharpness.

[0003] So, is higher image sharpness always better? Of course not. From an information perspective, increasing image sharpness through filtering doesn't increase the information contained in the image; it merely processes existing information to make the image more consistent with human visual response characteristics, reducing the burden on the human brain. However, if the algorithm is improperly processed, it can amplify details that are originally unimportant or even non-existent (including image noise). This, in turn, violates normal human cognition, increases the burden on the brain, and has the opposite effect. Figure 2 As shown.

[0004] Therefore, the main goal of sharpening should be to compensate for the loss of image sharpness during the imaging process, thereby restoring the natural sharpness that the scene should have, while avoiding over-sharpening. The following will discuss some of the reasons that cause image sharpness loss.

[0005] Due to the low-pass filtering effect of the lens and anti-aliasing filter in the optical system, the image texture details captured by the sensor will be lost, that is, the image appears blurry due to the decrease in contrast. Image sharpening is an image processing method that makes the texture edges in an image clearer. A common approach is to extract the high-frequency components of the image, multiply them by a certain coefficient (i.e., strength) as needed, and then superimpose them onto the original image.

[0006] A common method for extracting high-frequency components from an image is to process the original image with a low-pass filter (Unsharpen Mask, USM) to obtain the low-frequency components, and then subtract the low-frequency components from the original image to obtain the high-frequency components.

[0007] In terms of the final effect, the principle of sharpening is to enhance the contrast between light and dark pixels to achieve the goal of making it appear more "detailed," such as... Figure 3 As shown.

[0008] exist Figure 4 In the example, the RGB values ​​for the left half are (100, 100, 100), and those for the right half are (50, 50, 50). After using Unsharp Mask (USM) sharpening and zooming in to 1600%, it can be seen that the contrast at the boundary between light and dark areas is increased, making bright areas brighter and dark areas darker to achieve the purpose of sharpening.

[0009] In practice, this involves making the transition area between contrasting edges steeper and more abrupt to achieve high contrast and enhance sharpness.

[0010] The actual implementation of this method is similar to learning art. In art, there's outlining; you trace the edges with a pencil, making them clearer in the image. Sharpening works on the same idea: extracting the image edges using edge detection techniques and then "tracing" those edges onto the original image, resulting in clearer edges. Figure 5 As shown.

[0011] The above outlining process can actually be simplified as follows: Figure 6 The process shown is as follows: Input obtains the edge through filter, and then superimposes it back onto the original image to output output. The formula is: Output(x,y)=Input(x,y)+λ*edge.

[0012] from Figure 5 As can be seen, the superimposed image does have improved clarity, but the effect is not very good. This is mainly because the main part of the bird is enhanced, but the originally flat area of ​​the background also has a lot of graininess after enhancement, which looks unpleasant.

[0013] In existing technologies, images input from CMOS sensors introduce various types of noise, including random noise, quantization noise, and fixed-pattern noise. During ISP noise reduction, some image details are inevitably eliminated, resulting in a less clear image.

[0014] In addition, the technical terms in this field include:

[0015] 1. ISP: The Image Signal Processor is a key component of a camera system. It is responsible for processing the raw image data captured by the image sensor (such as CMOS) and converting it into a high-quality image. The image processing steps performed by the ISP include, but are not limited to, black level correction, bad pixel correction, lens shading correction, noise reduction, color interpolation, white balance, color correction, gamma correction, color space conversion, wide dynamic range adjustment, sharpening, automatic exposure control, and autofocus.

[0016] 2. YUV: luma(Y)+chroma(UV) format. Generally, the sensor supports YUV422 format, which means that the data format is output in YUYV order.

[0017] 3. RGB: The traditional red, green, and blue format, such as RGB565, has a 16-bit data format of 5-bit R + 6-bit G + 5-bit B. The extra bit for G is because the human eye is more sensitive to green.

[0018] 4. RAW RGB: Each pixel of the sensor corresponds to a color filter, and the filters are distributed according to the Bayer pattern. The data of each pixel is directly output, i.e., RAW RGB data.

[0019] 5. Edge detection: Edges are where brightness changes are most significant in an image. By comparing the original image and the blurred image, these changes can be detected, thus identifying edges.

[0020] 6. Horizontal Filter: First, apply a horizontal filter to each row of the image. This is typically done to capture the horizontal edge information of the image.

[0021] 7. Vertical Filter: Then apply a vertical filter to the filtered result. This helps capture the vertical edge information of the image.

[0022] 8. Gaussian Blur: An image processing technique that softens and blurs the details of an image. Its principle is based on the Gaussian function, which uses a weighted average of image pixels to ensure that each pixel's value is influenced by its surrounding pixels. The weights of the Gaussian function are determined by the standard deviation; the larger the standard deviation, the more pronounced the blurring effect.

[0023] 9. Sharpen: CMOS input images introduce various types of noise, including random noise, quantization noise, and fixed-pattern noise. During ISP noise reduction, some image details are inevitably eliminated, resulting in a less clear image. To eliminate the loss of image details during noise reduction, image sharpening is necessary to restore relevant details. Summary of the Invention

[0024] To address the aforementioned problems, the objective of this invention is to optimize the existing technology. In fact, from this framework, the only possible optimizations are one to the edge extraction filter and another to the optimization of λ. Therefore, in practical applications, the following methods are often adopted... Figure 7 The block diagram shown illustrates that the edges extracted by the filter pass through an edge decision maker, and then λ dynamically adjusts the enhancement intensity according to the decision of this decision maker. This application is an optimization and improvement of the existing technology, further enhancing the sharpening effect at the edges.

[0025] To eliminate the loss of image details during noise reduction, image sharpening is performed to restore relevant details. The sharpening method is optimized to enhance image details without significantly increasing complexity.

[0026] Specifically, this method is a sharpening method to enhance image details, the method comprising the following steps:

[0027] S1, the input image after processing by the preceding modules of the ISP;

[0028] Initialize the filter and prepare for memory allocation; then proceed to steps S2 and S4 respectively.

[0029] S2, Apply a horizontal filter to the image. The horizontal filtering refers to the filtering operation performed on each row of the image during image processing. The calculation method varies depending on the type of horizontal filter.

[0030] S3, apply a vertical filter to the filtered result. The vertical filter performs a filtering operation on each column of the image, similar to the horizontal filter, but in a different direction; then proceed to step S6.

[0031] S4 applies Gaussian blurring to the image with different sigma values. In image processing, Gaussian filtering is a commonly used smoothing technique to reduce image noise and detail. The effect of Gaussian filtering depends on the variance sigma value of the Gaussian kernel; different sigma values ​​will result in different degrees of blurring effect.

[0032] S5, calculate the difference, that is, the difference between the images after two Gaussian blurring processes;

[0033] S6. Based on the filter results obtained in step S3, further sharpen the difference in step S5.

[0034] S7, the edge image is merged with the original image, that is, the sharpened edge is superimposed on the original image;

[0035] S8 is used to obtain the sharpened image and output it.

[0036] In step S1, the module preceding the YUV sharpening module in the image signal processor (ISP) includes the following modules:

[0037] Black level correction (BLC), lens shading correction (LSC), dead pixel correction (DPC), de-mosaic (Dmsc), temporal / spatial domain denoising, white balance (AWB), color matrix correction (CCM), gamma correction, and color space conversion (CSC) process the image in a specific order to ensure that the image has undergone the necessary preprocessing before entering the YUV sharpening module, thereby improving the sharpening effect and image quality.

[0038] In step S4, different sigma values ​​will result in different degrees of blurring effect. The process of performing Gaussian blur processing on an input image is as follows:

[0039] First, a two-dimensional Gaussian convolution kernel is generated, which is usually an odd number in size, and the standard deviation controls the degree of blur.

[0040] Then, use an image processing library to read the input image;

[0041] Next, the generated Gaussian convolution kernel is convolved with the input image window by window to achieve a smoothing effect;

[0042] Finally, save or display the processed image.

[0043] The image processing library includes OpenCV; the two-dimensional Gaussian kernel function is:

[0044]

[0045] It is a distance-related function. Assuming a 7×7 window size is used, with the center point as the origin of the coordinate system, x and y represent the horizontal and vertical coordinates respectively, and σ represents the variance. Its physical meaning is to describe the degree of dispersion of a set of data. The smaller the variance, the more clustered the data; the larger the variance, the more dispersed the data.

[0046] The two Gaussian blurring processes in step S5 are optional, including sigma=4 and sigma=2 or sigma=2 and sigma=1;

[0047] Assuming sigma = 4 and sigma = 2, then

[0048] gauss1=GaussianBlur5x5Imagesigma(imageY,2.0)

[0049] gauss2=GaussianBlur5x5Imagesigma(imageY,4.0)

[0050] edge = gauss1 - gauss2

[0051] Where imageY is the input grayscale image.

[0052] The sharpening process in step S6 further includes:

[0053] (a) If E is greater than the positive threshold mnDetail[0], perform positive sharpening; where E is the edge pixel value and mnDetail[0] is the bright edge enhancement threshold, which is given in advance and can be adjusted based on experience;

[0054] Based on the results of step S3 above, the sharpening intensity table mnSharpPYCurve for the positive edge is given as parameters. This table is also preset and consists of 64 segments with a total of 64 values. Linear interpolation is used to obtain more accurate sharpening values. The values ​​are adjusted according to the preset global intensity sharpening coefficient mnSharpen[0] for bright edges. The final sharpening value s is then calculated.

[0055] nSharpen=mnSharpPYCurve[j];

[0056] nSharpen+=((mnSharpPYCurve[j+1]-m_nSharpPYCurve[j])*V)>>6;

[0057] nSharpen=nSharpen*mnSharpen[0];

[0058] s=((E-mnDetail[0])*nSharpen);

[0059] Where j is the position of the current brightness within the 64 segments;

[0060] (b) If E is less than the negative threshold -mnDetail[1], negative sharpening is performed, where -mnDetail[1] is the dark edge enhancement threshold, which is given in advance and can be adjusted based on experience;

[0061] According to the result of the previous step S3, a given parameter, that is, the positive edge base sharpening strength table mnSharpNYCurve, which is also preset and given, is divided into 64 segments with a total of 64 values, linear interpolation is used to obtain a more accurate sharpening value, and adjustment is performed according to the preset dark edge global strength sharpening coefficient mnSharpen[1]; the final sharpening value s is calculated, where nSharpen=mnSharpNYCurve[j];

[0062] nSharpen+=((mnSharpNYCurve[j+1]-mnSharpNYCurve[j])*V)>>6;

[0063] nSharpen=(nSharpen*mnSharpen[1]);

[0064] E1=((E+mnDetail[1])*nSharpen);

[0065] (c) If E is within a threshold range, where the threshold range is -nDetail[1]<E<mnDetail[0], that is, between the aforementioned -nDetail[1] and mnDetail[0], then s=0.

[0066] In the step S7, the final edge map is the result processed in the previous step, the merging is direct addition, and the sharpened edge is superimposed on the original image to enhance the details of the image: Out=clip(imgY+s,0,255)

[0067] Wherein imageY is the y-map of the original input, s is the edge map after the previous processing, and the clip operation is truncation to prevent the pixel value from crossing the boundary.

[0068] The beneficial effects of the present invention include: performing difference on images processed by different Gaussian processes, and adjusting the difference according to the filtering result to obtain the final edge map, the obtained edges are finer, more details are retained, and the image is clearer. Brief Description of the Drawings

[0069] The drawings described herein are used to provide a further understanding of the present invention, and constitute a part of the present application, and do not constitute a limitation to the present invention.

[0070] Figure 1 This is a schematic diagram of the transition buffer between the high-contrast image and the low-contrast image.

[0071] Figure 2 This is a schematic diagram of different processing situations by the filtering algorithm.

[0072] Figure 3This is a sharpening diagram that enhances the contrast between pixels to make them appear more "detailed".

[0073] Figure 4 This is a diagram showing the image after being sharpened using Unsharp Mask and magnified to 1600%.

[0074] Figure 5 This is an image illustration that uses outlines.

[0075] Figure 6 It is a flowchart that theoretically uses the outlining process.

[0076] Figure 7 This is a flowchart illustrating the actual method used for outlining.

[0077] Figure 8 This is a flowchart illustrating the method.

[0078] Figures 9(1), 9(2), and 9(3) are two images after filtering, and a detailed image obtained after subtracting the two and further processing.

[0079] Figures 10(1) and 10(2) are schematic diagrams comparing the grayscale images before (unsharpened) and after (sharpened) processing.

[0080] Figures 11(1) and 11(2) are schematic diagrams comparing the effects of the ordinary sharpening method and the method of this application.

[0081] Figures 12(1), 12(2), and 12(3) are schematic diagrams comparing the processing effects of the present method with those of the other methods used by the comparison machine 1 and comparison machine 2, respectively. Detailed Implementation

[0082] To better understand the technical content and advantages of the present invention, the present invention will now be described in further detail with reference to the accompanying drawings.

[0083] This invention provides a sharpening method to enhance image details, such as... Figure 8 As shown, the basic steps of image sharpening used in this article are outlined below:

[0084] S1, the input image after processing by the preceding modules of the ISP;

[0085] The modules preceding the YUV sharpening module in the Image Signal Processor (ISP) include the following:

[0086] Black level correction (BLC), lens shading correction (LSC), dead pixel correction (DPC), de-mosaic (Dmsc), temporal / spatial domain denoising, white balance (AWB), color matrix correction (CCM), gamma correction, and color space conversion (CSC) process the image in a specific order to ensure that the image has undergone the necessary preprocessing before entering the YUV sharpening module, thereby improving the sharpening effect and image quality.

[0087] Initialize the filter and prepare for memory allocation; then proceed to steps S2 and S4 respectively.

[0088] S2, Apply a horizontal filter to the image. The horizontal filtering refers to the filtering operation performed on each row of the image during image processing. The calculation method varies depending on the type of horizontal filter.

[0089] S3, apply a vertical filter to the filtered result. The vertical filter performs a filtering operation on each column of the image, similar to the horizontal filter, but in a different direction; then proceed to step S6.

[0090] S4. Apply Gaussian blurring to the image with different sigma values. In image processing, Gaussian filtering is a commonly used smoothing technique to reduce image noise and details. The effect of Gaussian filtering depends on the variance sigma value of the Gaussian kernel; different sigma values ​​will result in different degrees of blurring effect. Further steps include: The process steps for Gaussian blurring of an input image are as follows: First, generate a two-dimensional Gaussian convolution kernel, the size of which is usually an odd number, and the standard deviation controls the degree of blurring.

[0091] Then, use an image processing library (such as OpenCV) to read the input image;

[0092] Next, the generated Gaussian convolution kernel is convolved with the input image window by window to achieve a smoothing effect;

[0093] Finally, save or display the processed image;

[0094] The two-dimensional Gaussian kernel function is:

[0095]

[0096] It is a distance-related function. Assuming a 7×7 window size, with the center point as the origin, x and y represent the horizontal and vertical coordinates respectively, and σ represents the variance. Its physical meaning is to describe the dispersion of a set of data. The smaller the variance, the more clustered the data; the larger the variance, the more dispersed the data. S5, calculate the difference, that is, subtract the images after two Gaussian blur processing. Two Gaussian blur processing is optional, including sigma=4 and sigma=2 or sigma=2 and sigma=1.

[0097] Assuming sigma = 4 and sigma = 2, then

[0098] gauss1=GaussianBlur5x5Imagesigma(imageY,2.0)

[0099] gauss2=GaussianBlur5x5Imagesigma(imageY,4.0)

[0100] edge = gauss1 - gauss2

[0101] Where imageY is the input grayscale image;

[0102] S6. Based on the filter results obtained in step S3, further sharpen the difference in step S5.

[0103] The sharpening process in step S6 further includes:

[0104] (a) If E is greater than the positive threshold mnDetail[0], perform positive sharpening; where E is the edge pixel value and mnDetail[0] is the bright edge enhancement threshold, which is given in advance and can be adjusted based on experience;

[0105] Based on the results of step S3 above, the sharpening intensity table mnSharpPYCurve for the positive edge is given as parameters. This table is also preset and consists of 64 segments with a total of 64 values. Linear interpolation is used to obtain more accurate sharpening values. The values ​​are adjusted according to the preset global intensity sharpening coefficient mnSharpen[0] for bright edges. The final sharpening value s is then calculated.

[0106] nSharpen=mnSharpPYCurve[j];

[0107] nSharpen+=((mnSharpPYCurve[j+1]-m_nSharpPYCurve[j])*V)>>6;

[0108] nSharpen=nSharpen*mnSharpen[0];

[0109] s=((E-mnDetail[0])*nSharpen);

[0110] where j is the number of the segment among the 64 segments that the current luminance falls into;

[0111] (b) If E is less than the negative threshold -mnDetail[1], negative sharpening processing is performed, where -mnDetail[1] is the dark edge enhancement threshold, this value is also given in advance and can be adjusted according to experience;

[0112] According to the result of the previous step S3, using the given parameter, that is, the preset positive edge basic sharpening intensity table mnSharpNYCurve which is divided into 64 segments with a total of 64 values, linear interpolation is used to obtain a more accurate sharpening value, and adjustment is performed according to the preset dark edge global intensity sharpening coefficient mnSharpen[1]; the final sharpening value s is calculated, where nSharpen=mnSharpNYCurve[j];

[0113] nSharpen+=((mnSharpNYCurve[j+1]-mnSharpNYCurve[j])*V)>>6;

[0114] nSharpen=(nSharpen*mnSharpen[1]);

[0115] E1=((E+mnDetail[1])*nSharpen);

[0116] (c) If E is within the threshold range, where the threshold range is -mnDetail[1]<E<mnDetail[0], that is, between the aforementioned -mnDetail[1] and mnDetail[0], then s=0;

[0117] In S7, the obtained edge map is merged with the original map, that is, the sharpened edge is superimposed on the original map; the final edge map is the result after the processing of the previous step, the merging refers to direct addition, and the sharpened edge is superimposed on the original map to enhance the details of the image:

[0118] Out=clip(imgY+s,0,255)

[0119] where imgY is the original input y map, s is the edge map after the previous processing, and the clip operation is truncation to prevent the pixel value from out of bounds;

[0120] In S8, the sharpened image is obtained and output.

[0121] The specific embodiments are as follows:

[0122] As shown in Figures 9(1), 9(2), and 9(3), these are two images after filtering, and a detailed image obtained after subtracting the two images and further processing.

[0123] Figure 10(1) shows a comparison of the grayscale image before processing (unsharpened) and Figure 10(2) shows a comparison of the image after processing (sharpened);

[0124] The effect of mapping the above method back to the color image is compared in Figure 11(1) and Figure 11(2).

[0125] Figure 11(1) shows the effect of the ordinary sharpening method, and Figure 11(2) shows the effect of the method in this paper. The details of hair, green plants, curtains, clothes and other parts can be seen to be significantly improved.

[0126] Furthermore, the comparison results with those of commercially available comparison devices are shown in Figures 12(1)-(3). The comparison results using this method are as follows:

[0127] Figures 12(1)-(3) show the effects of processing with the method of this application and two other comparison machines. In terms of details, the details of each object, especially the fine texture of the green plants, are quite similar to those of the comparison machine. The dark areas in the middle are highlighted too much, resulting in noise in the grid. The comparison machine 2 is too dark, resulting in no contrast. On the contrary, our brightness and darkness processing is more moderate. In addition, the overall transparency is slightly better due to the processing of details.

[0128] In summary, the technical solution of this application is as follows:

[0129] The images after different Gaussian processing are subtracted, and the difference is adjusted according to the filtering result to obtain the final edge map; the resulting edges are finer, retain more details, and the image is clearer.

[0130] The MCU chip involved in this technical solution can be applied to Ingenic's T41 series chips and similar chips.

[0131] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, various modifications and variations can be made to the embodiments of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for sharpening image details, characterized in that, The method includes the following steps: S1, the input image after processing by the preceding modules of the ISP; Initialize the filter and prepare for memory allocation; then proceed to steps S2 and S4 respectively. S2, Apply a horizontal filter to the image. The horizontal filtering refers to the filtering operation performed on each row of the image during image processing. The calculation method varies depending on the type of horizontal filter. S3, apply a vertical filter to the filtered result. The vertical filter performs a filtering operation on each column of the image, similar to the horizontal filter, but in a different direction; then proceed to step S6. S4 applies Gaussian blurring to the image with different sigma values. In image processing, Gaussian filtering is a commonly used smoothing technique to reduce image noise and detail. The effect of Gaussian filtering depends on the variance sigma value of the Gaussian kernel; different sigma values ​​will result in different degrees of blurring effect. S5, calculate the difference, that is, the difference between the images after two Gaussian blurring processes; S6. Based on the filter results obtained in step S3, further sharpen the difference in step S5. S7, the edge image is merged with the original image, that is, the sharpened edge is superimposed on the original image; S8 is used to obtain the sharpened image and output it.

2. The image sharpening method for enhancing image details according to claim 1, characterized in that, In step S1, the module preceding the YUV sharpening module in the image signal processor (ISP) includes the following modules: Black level correction (BLC), lens shading correction (LSC), dead pixel correction (DPC), de-mosaic (Dmsc), temporal / spatial domain denoising, white balance (AWB), color matrix correction (CCM), gamma correction, and color space conversion (CSC) process the image in a specific order to ensure that the image has undergone the necessary preprocessing before entering the YUV sharpening module, thereby improving the sharpening effect and image quality.

3. The image sharpening method for enhancing image details according to claim 1, characterized in that, In step S4, different sigma values ​​will result in different degrees of blurring effect. The process of performing Gaussian blur processing on an input image is as follows: First, a two-dimensional Gaussian convolution kernel is generated, which is usually an odd number in size, and the standard deviation controls the degree of blur. Then, use an image processing library to read the input image; Next, the generated Gaussian convolution kernel is convolved with the input image window by window to achieve a smoothing effect; Finally, save or display the processed image.

4. The image sharpening method for enhancing image details according to claim 3, characterized in that, The image processing library includes OpenCV; the two-dimensional Gaussian kernel function is: It is a distance-related function. Assuming a 7×7 window size is used, with the center point as the origin of the coordinate system, x and y represent the horizontal and vertical coordinates respectively, and σ represents the variance. Its physical meaning is to describe the degree of dispersion of a set of data. The smaller the variance, the more clustered the data; the larger the variance, the more dispersed the data.

5. The image sharpening method for enhancing image details according to claim 1, characterized in that, The two Gaussian blurring processes in step S5 are optional, including sigma=4 and sigma=2 or sigma=2 and sigma=1; Assuming sigma = 4 and sigma = 2, then gauss1 = GaussianBlur5x5Imagesigma(imageY,2.0) gauss2 = GaussianBlur5x5Imagesigma(imageY,4.0) edge = gauss1-gauss2 where imageY is the input grayscale image.

6. The image sharpening method for enhancing image details according to claim 1, characterized in that, The sharpening process in step S6 specifically comprises: (a) If E is greater than the positive threshold mnDetail[0], perform positive sharpening; wherein E is the edge pixel value, mnDetail[0] is the bright edge enhancement threshold, which is a preset value that can be adjusted based on experience; According to the result of the previous step S3, using the given parameter, namely the positive edge base sharpening strength table mnSharpPYCurve which is also preset and has 64 segments with 64 values in total, linear interpolation is used to obtain a more accurate sharpening value, and adjustment is performed according to the preset bright edge global strength sharpening coefficient mnSharpen[0]; the final sharpening value s is calculated as: nSharpen = mnSharpPYCurve[j]; nSharpen += ((mnSharpPYCurve[j+1]-mnSharpPYCurve[j])*V)>>6; nSharpen = nSharpen*mnSharpen[0]; s = ((E-mnDetail[0])*nSharpen); where j is the index of the segment among the 64 segments corresponding to the current luminance; (b) If E is less than the negative threshold -mnDetail[1], perform negative sharpening, wherein -mnDetail[1] is the dark edge enhancement threshold, which is also a preset value that can be adjusted based on experience; According to the result of the previous step S3, using the given parameter, namely the negative edge base sharpening strength table mnSharpNYCurve which is also preset and has 64 segments with 64 values in total, linear interpolation is used to obtain a more accurate sharpening value, and adjustment is performed according to the preset dark edge global strength sharpening coefficient mnSharpen[1]; the final sharpening value s is calculated, nSharpen = mnSharpNYCurve[j]; nSharpen += ((mnSharpNYCurve[j+1]-mnSharpNYCurve[j])*V)>>6; nSharpen = (nSharpen*mnSharpen[1]); E1 = ((E+mnDetail[1])*nSharpen); (c) If E is within the threshold range, where the threshold range is -nDetail[1]<E<mnDetail[0], that is, between the aforementioned -nDetail[1] and mnDetail[0], then s=0.

7. The image sharpening method for enhancing image details according to claim 1, characterized in that, In step S7, the final edge map is the result after the previous step of processing, the merging is performed by direct addition, and the sharpened edge is superimposed on the original image to enhance the details of the image: Out = clip(imgY+s,0,255) Where imageY is the original input y-image, s is the edge image after previous processing, and the clip operation is to truncate to prevent pixel values ​​from going out of bounds.