Adaptive video sharpening method and device based on table lookup method, equipment and storage medium
By adopting an adaptive video sharpening method based on lookup table, and utilizing gradient calculation and lookup table initialization, the problem of high computational cost of adaptive sharpening algorithms is solved, enabling real-time video processing and transcoding, improving image clarity and reducing noise.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI WONDERTEK SOFTWARE CORP LTD
- Filing Date
- 2022-06-22
- Publication Date
- 2026-06-05
Smart Images

Figure CN115063314B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to an adaptive video sharpening method, apparatus, device, and storage medium based on a lookup table method. Background Technology
[0002] Image sharpening compensates for the contours of an image, enhancing its edges and areas of abrupt grayscale changes to make the image clearer. It is divided into two categories: spatial domain processing and frequency domain processing. Image sharpening aims to highlight the edges and contours of ground features in an image, or the characteristics of certain linear target elements. This filtering method increases the contrast between the edges of ground features and surrounding pixels, hence it is also known as edge enhancement.
[0003] In computer algorithm processing, image sharpening is an image processing method that makes image edges clearer. Detail enhancement includes image sharpening, and a common approach is to extract the high-frequency components of the image and superimpose them onto the original image. There are two methods for extracting high-frequency components from an image: one is to use a high-pass filter to obtain the high-frequency components, and the other is to use a low-pass filter to subtract the low frequencies from the original image to obtain the high frequencies.
[0004] Currently, adaptive sharpening algorithms primarily target image processing. However, due to their high computational complexity, they are slow and cannot achieve real-time transcoding in video processing. Gradient-based adaptive sharpening algorithms require constructing a core function to calculate the sharpening weights for each pixel, resulting in significant computational overhead. Furthermore, these algorithms mainly focus on image processing and lack research and implementation for real-time video transcoding.
[0005] Therefore, it is necessary to propose an adaptive video sharpening method that can significantly improve image clarity while suppressing noise generation, thus achieving better results in video quality enhancement. Summary of the Invention
[0006] The purpose of this invention is to provide an adaptive video sharpening method, apparatus, device, and storage medium based on a lookup table method.
[0007] This invention provides an adaptive video sharpening method based on a lookup table, comprising:
[0008] Input the video and decode it to output the video frame image to be sharpened;
[0009] Extract the Y component from the video frame image to be sharpened and output the Y component image;
[0010] Calculate the gradient of the Y component image, output the gradient image, and calculate the intermediate gradient value;
[0011] Initialization is based on a lookup table method. The first sharpening weight is obtained by searching the lookup table according to the pixel value of the gradient image and the intermediate value of the gradient. The first sharpening weight is then stored in the corresponding pixel to obtain the second sharpening weight.
[0012] Gaussian blur is applied to the Y component image to obtain a smoothed image;
[0013] A high-frequency information image is calculated based on the Y component image and the smoothed image;
[0014] The sharpening mask is calculated based on the high-frequency information image and the second sharpening weight, and the image after sharpening the mask is output.
[0015] The image after sharpening the mask and the smoothed image are merged to output the sharpened Y component image. The sharpened Y component image is then merged with the UV components to obtain the final sharpened image. The final sharpened image is then encoded to obtain the sharpened video.
[0016] Preferably, the initialization based on a lookup table method, which involves retrieving the corresponding first sharpening weight from the pixel values of the gradient image and the intermediate gradient value using a lookup table method, and storing the first sharpening weight at the corresponding pixel points to obtain the second sharpening weight, includes:
[0017] The formula for calculating the sharpening weight is as follows:
[0018]
[0019] The input value is the gradient image pixel value v. i and gradient image median v d Output value w i To sharpen the weights,
[0020] The formula for calculating the intermediate value of the gradient is as follows:
[0021]
[0022] Among them, v min v is the minimum value of the gradient. max This is the maximum value of the gradient.
[0023] Preferably, adaptive image / video sharpening is achieved by calculating the sharpening weights of different video frames to be sharpened under different gradients.
[0024] Preferably, the initialization based on a lookup table method, which involves retrieving the corresponding first sharpening weight from the pixel values of the gradient image and the intermediate gradient value using a lookup table method, and storing the first sharpening weight at the corresponding pixel points to obtain the second sharpening weight, includes:
[0025] The construction of the lookup table method includes: taking the pixel values of the gradient image and the intermediate gradient value as input values, calculating them through the sharpening weight formula, and outputting the corresponding calculated value, i.e., the intermediate gradient value, and storing the output value.
[0026] Preferably, calculating the gradient of the Y component image, outputting the gradient image, and calculating intermediate gradient values includes:
[0027] The gradient of the Y component image is calculated using the Sobel operator to obtain the gradient image;
[0028] The gradient image is smoothed to remove strong noise points.
[0029] The gradient median value is obtained by averaging the minimum and maximum values of the gradient image.
[0030] Preferably, the step of calculating the high-frequency information image based on the Y component image and the smoothed image includes the following calculation formula: High-frequency information image = Y component image - smoothed image.
[0031] Preferably, the step of calculating the sharpening mask based on the image after sharpening and the second sharpening weight, and then outputting the image after sharpening includes:
[0032] The calculation formula is: Image after sharpening mask = Image after sharpening mask * Second sharpening weight.
[0033] This invention also provides an adaptive video sharpening system based on a lookup table method, comprising:
[0034] The video input module is used to input video and decode and output the video frame image to be sharpened;
[0035] The component image acquisition module is used to extract the Y component from the video frame image to be sharpened and output the Y component image;
[0036] The image gradient calculation module is used to calculate the gradient of the Y component image, output the gradient image, and calculate the intermediate gradient value.
[0037] The lookup table initialization module is used to initialize based on the lookup table method. It retrieves the corresponding first sharpening weight by looking up the pixel value of the gradient image and the intermediate value of the gradient, and stores the first sharpening weight in the corresponding pixel to obtain the second sharpening weight.
[0038] A smoothed image generation module is used to apply Gaussian blur to the Y component image to obtain a smoothed image;
[0039] A high-frequency information image acquisition module is used to calculate a high-frequency information image based on the Y component image and the smoothed image;
[0040] The sharpening mask generation module is used to calculate a sharpening mask based on the high-frequency information image and the second sharpening weight, and output the image after sharpening the mask.
[0041] The sharpening result output module is used to merge the image after sharpening the mask and the smoothed image to output the sharpened Y component image, merge the sharpened Y component image with the UV component to obtain the final sharpened result image, and encode the final sharpened result image to obtain the sharpened video.
[0042] The present invention also provides an adaptive video sharpening device based on a lookup table method, including a memory and a processor. The memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, it implements the adaptive video sharpening method based on a lookup table method as described in one embodiment of the present invention.
[0043] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by one or more processors, implements the adaptive video sharpening method based on a lookup table as described in one embodiment of the present invention.
[0044] Compared with the prior art, the present invention has the following beneficial effects:
[0045] The adaptive sharpening method based on the lookup table method realizes adaptive sharpening adjustment of high-frequency information of the image, which reduces noise generation while making the image clear, and has the advantages of fast processing speed and can be applied to real-time video processing.
[0046] The problem of high computational cost in adaptive sharpening is solved by using a lookup table method, which can be used for real-time video transcoding. Attached Figure Description
[0047] Figure 1 This is a schematic diagram illustrating the steps of the adaptive video sharpening method based on lookup table method described in this embodiment of the invention;
[0048] Figure 2 This is a schematic diagram illustrating the specific steps of step S3 in this embodiment of the invention;
[0049] Figure 3 This is a flowchart illustrating the overall process of the adaptive video sharpening method based on lookup table as described in this embodiment of the invention.
[0050] Figure 4 This is a flowchart illustrating the sharpening weight calculation in an embodiment of the present invention;
[0051] Figure 5 This is a flowchart illustrating the calculation of high-frequency information in an image according to an embodiment of the present invention. Detailed Implementation
[0052] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0053] Example 1
[0054] like Figure 1 As shown, this invention provides an adaptive video sharpening method based on a lookup table, comprising:
[0055] S1: Input the video and decode it to output the video frame image to be sharpened;
[0056] S2: Extract the Y component from the video frame image to be sharpened and output the Y component image, i.e., a grayscale image; YUV separates luminance and chrominance, using three components, Y (luminance), U, and V (chrominance, density), to represent a color. Among the three components, the UV components only contain color information; if the image only has the Y component, it is a black and white image.
[0057] S3: Calculate the gradient of the Y component image, output the gradient image and calculate the intermediate gradient value; the gradient image, i.e. the image edge, horizontal, vertical, the rate of change of a certain pixel in the image in the x and y directions (compared with neighboring pixels), is a two-dimensional vector composed of two components, the change of the X-axis and the change of the Y-axis.
[0058] The change on the X-axis refers to the pixel value to the right of the current pixel (X+1) minus the pixel value to the left of the current pixel (X-1).
[0059] Similarly, the change on the Y-axis is the pixel value below the current pixel (Y + 1) minus the pixel value above the current pixel (Y - 1).
[0060] Calculate these two components and form a two-dimensional vector to obtain the image gradient of that pixel.
[0061] S4: Initialization based on a lookup table method. The first sharpening weight is obtained by searching a table based on the pixel values of the gradient image and the median gradient value. The first sharpening weight is then stored in corresponding pixel locations to obtain the second sharpening weight. The first sharpening weight is a coefficient value, and the second sharpening weight is a two-dimensional array. For the edge parts of the image, the grayscale value changes significantly, and the gradient value is also large. Conversely, for smoother parts of the image, the grayscale value changes less significantly, and the corresponding gradient value is also smaller. Generally, image gradient calculations represent the edge information of the image.
[0062] S5: Apply Gaussian blur to the Y component image to obtain a smoothed image;
[0063] S6: Calculate the high-frequency information image based on the Y component image and the smoothed image;
[0064] S7: Calculate the sharpening mask based on the high-frequency information image and the second sharpening weight, and output the image after sharpening the mask;
[0065] S8: Merge the image after sharpening the mask and the smoothed image to output the sharpened Y component image. Merge the sharpened Y component image with the UV component to obtain the final sharpened result image. Encode the final sharpened result image to obtain the sharpened video.
[0066] like Figure 2 As shown, step S3, which calculates the gradient of the Y component image, outputs the gradient image, and calculates intermediate gradient values, includes:
[0067] S31: The gradient of the Y component image is calculated using the Sobel operator to obtain a gradient image. The Sobel operator is a discrete differential operator that combines Gaussian smoothing and differential operations. This operator uses local differences to find edges and calculates an approximate gradient value.
[0068] S32: Smooth the gradient image to remove strong noise points. Image smoothing can be denoising or image patch stylization. Common smoothing methods use smoothing convolution kernels (such as Gaussian blur kernels, uniform filtering, etc.), which blur and sacrifice image edges. Gradient-based smoothing methods retain larger gradients (image edges) while removing smaller gradients (denoising and smoothing).
[0069] S33: The gradient median value is obtained by averaging the maximum and minimum values of the gradient image.
[0070] Those skilled in the art will understand that the present invention first obtains each frame of image through video (YUV, 8bit) decoding, and performs real-time adaptive sharpening processing on the image. The overall processing can be divided into two parts: the first part is the calculation of the sharpening weight of the image pixels, and the second part is the acquisition of high-frequency information of the image.
[0071] like Figure 3 As shown, for a YUV, 8-bit video file, it is first decoded into individual frames using ffmpeg. Each frame is then fed into an adaptive sharpening algorithm based on a lookup table, performing the following steps: extracting the Y component image; calculating the gradient and obtaining intermediate gradient values; initializing the lookup table by retrieving weight values using the gradient values and intermediate gradient values; calculating and saving high-frequency information images from the Y component image; multiplying the weight values by the calculated high-frequency information images to obtain a sharpening mask; adding the sharpening mask to the smoothed image, merging the YUV components, and obtaining the final sharpened image. The processed image is then encoded again using ffmpeg, finally yielding the sharpened YUV, 8-bit video file.
[0072] like Figure 4 As shown, the steps for processing the image pixel sharpening weights in the first part are as follows:
[0073] Step 1: Extract the Y component from the 8-bit deep video frame to obtain the Y component image I.
[0074] Step 2: Use the Sobel operator to calculate the gradient of the Y component image I to obtain the gradient image.
[0075] Step 3: Smooth the gradient image to remove strong noise points.
[0076] Step 4: Calculate the median gradient value of the gradient image. Obtain the median gradient value v of the image using the minimum-maximum averaging method. d (rounding).
[0077] Step 5: Initialization using table lookup method. This involves using a table lookup method to find and output the output values, obtaining the value for each pixel in the image. i and gradient intermediate value v d The corresponding sharpening weight w i The sharpening weights are stored at the corresponding pixel points to obtain mask1.
[0078] The core formula of the table lookup method in this invention is: The input value is the gradient image pixel value v i and gradient image median v d Output value w i This is for sharpening weights.
[0079] The lookup table method is constructed as follows: all possible input values are calculated using the core formula, and the gradient image pixel value v... i and gradient image median v d The input range is [0, 255], the output value is the corresponding value calculated by the core formula, and all data is stored.
[0080] Table 1 is a 3D table containing all possible data. The data in this invention is only a part of it, and the limitations are as follows: Among them, v min v is the minimum value of the gradient. max This is the maximum value of the gradient. i and v d The value range of w is [0, 255]. Under the constraints of this invention, the output value w is obtained by using the lookup table method. i The input values are [0.5, 1]. The lookup table method has a total of 2 input values. 16 Each combination, based on the output value calculated from each input value using the core formula, is stored as a 3D table. After table initialization, it can be used to calculate the output value based on v. i and v d The corresponding output value w can be directly found from two values. i In the algorithm of this invention, the core function fixes the sharpening weight range between [0.5, 1]. For pixels near the intermediate value range that need major enhancement, the sharpening weight will approach 1. For pixels in smooth and high-frequency regions that do not require strong enhancement, the sharpening weight will approach 0.5, and a lower degree of enhancement will be performed.
[0081] The lookup table method uses the input value: gradient image pixel value v i and gradient intermediate value v d For the weight value w i A search was performed to quickly obtain the sharpening weight, and some of the data is shown in Table 1:
[0082] Input value: v d ]] Input value: v i ]] Output value: w i ]] 124 0 0.50 124 110 0.83 124 124 1.00 124 240 0.51 128 0 0.50 128 90 0.72 128 120 0.88 128 200 0.61 128 255 0.50
[0083] Table 1 shows some data from the table lookup method.
[0084] In the table, pixels closer to the median value have larger output values, while pixels with larger differences from the median value have smaller output values.
[0085] like Figure 5 As shown, the calculation of high-frequency information in the second part mainly consists of the following steps:
[0086] Step 1: Apply Gaussian blur to the Y component image I to obtain the smoothed image blur_img.
[0087] Step 2: Calculate the high-frequency information image, the formula is G_img=I-blur_img.
[0088] Step 3: Merge the high-frequency information image G_img with the second sharpening weight mask1 to obtain the final sharpening mask mask2, mask2 = G_img * mask1.
[0089] Step 4: Merge the mask image mask2 and blur_img, merging the YUV components to obtain the final sharpened image.
[0090] The processed image is then encoded using ffmpeg to obtain a sharpened YUV 8-bit video file.
[0091] Furthermore, the sharpening weights of different video frames to be sharpened under different gradients are calculated to achieve adaptive sharpening of images / videos.
[0092] Furthermore, the initialization based on the lookup table method, which involves retrieving the corresponding first sharpening weight from the pixel values of the gradient image and the intermediate gradient value using a lookup table, and storing the first sharpening weight at the corresponding pixel points to obtain the second sharpening weight, includes:
[0093] The construction of the lookup table method includes: taking the pixel values of the gradient image and the intermediate gradient value as input values, calculating them through the sharpening weight formula, and outputting the corresponding calculated value, i.e., the intermediate gradient value, and storing the output value.
[0094] Furthermore, the calculation of the high-frequency information image based on the Y component image and the smoothed image includes the following formula: High-frequency information image = Y component image - Smoothed image. High frequency means rapid frequency change, i.e., a large difference in grayscale between adjacent regions. The edge of an image relative to the background usually shows a significant difference; that is, the grayscale changes rapidly along that edge, which is a high-frequency area. Therefore, rapid changes in grayscale values at image edges correspond to high frequency, i.e., high-frequency display of image edges.
[0095] Furthermore, the step of calculating the sharpening mask based on the image after sharpening and the second sharpening weights, and then outputting the image after sharpening includes:
[0096] The calculation formula is: Image after sharpening mask = Image after sharpening mask * Second sharpening weight.
[0097] Example 2
[0098] The present invention also provides an adaptive video sharpening device based on a lookup table method, comprising:
[0099] The video input module is used to input video and decode and output the video frame image to be sharpened;
[0100] The component image acquisition module is used to extract the Y component from the video frame image to be sharpened and output the Y component image;
[0101] The image gradient calculation module is used to calculate the gradient of the Y component image, output the gradient image, and calculate the intermediate gradient value.
[0102] The lookup table initialization module is used to initialize based on the lookup table method. It retrieves the corresponding first sharpening weight by looking up the pixel value of the gradient image and the intermediate value of the gradient, and stores the first sharpening weight in the corresponding pixel to obtain the second sharpening weight.
[0103] A smoothed image generation module is used to apply Gaussian blur to the Y component image to obtain a smoothed image;
[0104] A high-frequency information image acquisition module is used to calculate a high-frequency information image based on the Y component image and the smoothed image;
[0105] The sharpening mask generation module is used to calculate a sharpening mask based on the high-frequency information image and the second sharpening weight, and output the image after sharpening the mask.
[0106] The sharpening result output module is used to merge the image after sharpening the mask and the smoothed image to output the sharpened Y component image, merge the sharpened Y component image with the UV component to obtain the final sharpened result image, and encode the final sharpened result image to obtain the sharpened video.
[0107] The specific contents and implementation methods of the above-mentioned video input module, component image acquisition module, image gradient calculation module, lookup table initialization module, smooth image generation module, high-frequency information image acquisition module, sharpening mask generation module, and sharpening result output module are all as described in Embodiment 1, and will not be repeated here.
[0108] Example 3
[0109] The present invention also provides an adaptive video sharpening device based on a lookup table method, including a memory and a processor. The memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, it implements the adaptive video sharpening method based on a lookup table method as described in one embodiment of the present invention.
[0110] This lookup-based adaptive video sharpening device can vary considerably depending on its configuration and performance. It may include one or more central processing units (CPUs) and memory, and one or more storage media (e.g., one or more mass storage devices) for storing applications or data. The memory and storage media can be temporary or persistent storage. The program stored on the storage media may include one or more modules, each of which may include a series of instruction operations on the lookup-based adaptive video sharpening device.
[0111] Furthermore, the processor can be configured to communicate with the storage medium and execute a series of instruction operations from the storage medium on the video image color enhancement device.
[0112] Adaptive video sharpening devices based on lookup table methods may also include one or more power supplies, one or more wired or wireless network interfaces, one or more input / output interfaces, and / or one or more operating systems, such as Windows Server, Vista, etc.
[0113] This invention also provides a computer-readable storage medium storing a computer program that, when executed by one or more processors, implements the adaptive video sharpening method based on a lookup table as described in one embodiment of this invention. If the modules in Embodiment 2 are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in software form. The computer-readable storage medium can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the adaptive video sharpening steps based on a lookup table as described in Embodiment 1.
[0114] Those skilled in the art will understand that the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in software. This computer software is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0115] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An adaptive video sharpening method based on a lookup table, characterized in that, include: Input the video and decode it to output the video frame image to be sharpened; Extract the Y component from the video frame image to be sharpened and output the Y component image; Calculate the gradient of the Y component image, output the gradient image, and calculate the intermediate gradient value; Initialization is based on a lookup table method. The first sharpening weight is obtained by searching the table based on the pixel values of the gradient image and the median gradient value. The first sharpening weight is then stored for corresponding pixel points to obtain the second sharpening weight. When constructing the table... The formula for calculating the sharpening weight is as follows: , The input value is the pixel value of the gradient image. v i and gradient image median v d Output value w i To sharpen the weights, The formula for calculating the intermediate value of the gradient is as follows: , in, v min This is the minimum value of the gradient. v max It is the maximum value of the gradient; Gaussian blur is applied to the Y component image to obtain a smoothed image; A high-frequency information image is calculated based on the Y component image and the smoothed image; The sharpening mask is calculated based on the high-frequency information image and the second sharpening weight, and used as the image after sharpening masking; The image after sharpening the mask and the smoothed image are merged to output the sharpened Y component image. The sharpened Y component image is then merged with the UV components to obtain the final sharpened image. The final sharpened image is then encoded to obtain the sharpened video.
2. The adaptive video sharpening method based on lookup table as described in claim 1, characterized in that, Adaptive image / video sharpening is achieved by calculating the sharpening weights of different video frames under different gradients.
3. The adaptive video sharpening method based on lookup table as described in claim 1, characterized in that, The initialization based on the lookup table method, which involves retrieving the corresponding first sharpening weight from the pixel values of the gradient image and the intermediate gradient value using the lookup table method, and storing the first sharpening weight in corresponding pixels to obtain the second sharpening weight, includes: The construction of the lookup table method includes: taking the pixel values of the gradient image and the intermediate gradient values as input values, calculating them using the sharpening weight formula, outputting the corresponding calculated values, and storing all the data.
4. The adaptive video sharpening method based on lookup table as described in claim 1, characterized in that, The process of calculating the gradient of the Y component image, outputting the gradient image, and calculating intermediate gradient values includes: The gradient of the Y component image is calculated using the Sobel operator to obtain the gradient image; The gradient image is smoothed to remove strong noise points. The gradient median value is obtained by averaging the minimum and maximum values of the gradient image.
5. The adaptive video sharpening method based on lookup table as described in claim 1, characterized in that, The calculation of the high-frequency information image based on the Y component image and the smoothed image includes the following formula: High-frequency information image = Y component image - smoothed image.
6. The adaptive video sharpening method based on lookup table as described in claim 1, characterized in that, The step of calculating the sharpening mask based on the high-frequency information image and the second sharpening weight, and using it as the image after sharpening, includes: The calculation formula is: Image after sharpening mask = High-frequency information image * Second sharpening weight.
7. An adaptive video sharpening device based on a lookup table method, characterized in that, include: The video input module is used to input video and decode and output the video frame image to be sharpened; The component image extraction module is used to extract the Y component from the video frame image to be sharpened and output the Y component image; The image gradient calculation module is used to calculate the gradient of the Y component image, output the gradient image, and calculate the intermediate gradient value. The lookup table initialization module is used for initialization based on a lookup table method. It retrieves the corresponding first sharpening weight by searching the lookup table based on the pixel values of the gradient image and the intermediate gradient value. Then, it stores the first sharpening weights at corresponding pixels to obtain the second sharpening weights. When constructing the table... The formula for calculating the sharpening weight is as follows: , The input value is the pixel value of the gradient image. v i and gradient image median v d Output value w i To sharpen the weights, The formula for calculating the intermediate value of the gradient is as follows: , in, v min This is the minimum value of the gradient. v max It is the maximum value of the gradient; A smoothed image generation module is used to apply Gaussian blur to the Y component image to obtain a smoothed image; A high-frequency information image acquisition module is used to calculate a high-frequency information image based on the Y component image and the smoothed image; A sharpening mask generation module is used to calculate a sharpening mask based on the high-frequency information image and the second sharpening weight, and use it as the image after sharpening masking. The sharpening result output module is used to merge the image after sharpening the mask and the smoothed image to output the sharpened Y component image, merge the sharpened Y component image with the UV component to obtain the final sharpened result image, and encode the final sharpened result image to obtain the sharpened video.
8. An adaptive video sharpening device based on a lookup table method, characterized in that, The device includes a memory and a processor, wherein the memory stores computer-readable instructions, and the processor, when executing the computer-readable instructions, implements the adaptive video sharpening method based on the lookup table method as described in any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is executed by one or more processors, it implements the adaptive video sharpening method based on the lookup table method as described in any one of claims 1 to 6.