Image sharpening method, device, equipment, medium and product

By dynamically adjusting the sharpening factor according to the type of the current image in the video, the problem of poor video image quality caused by fixed sharpening factors in the prior art is solved, and a higher quality image sharpening effect is achieved.

CN119784635APending Publication Date: 2025-04-08BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411595694.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

In the prior art, fixed sharpening factors are used when sharpening images, resulting in poor video quality in videos containing film particles.

Method used

By determining the current type of the current image in the video and setting the corresponding sharpening factor according to the different types, the image sharpening factor is used to sharpen the current image.

Benefits of technology

The video quality after image sharpening is improved, and the image quality degradation caused by sharpening film particles is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119784635A_ABST
    Figure CN119784635A_ABST
Patent Text Reader

Abstract

The invention provides an image sharpening method, device and equipment, a medium and a product, and relates to the technical field of artificial intelligence, in particular to the technical fields of cloud storage, cloud computing, image enhancement, video transcoding and the like. The image sharpening method comprises the steps of determining a current type of a current image in a video; a current sharpening factor corresponding to the current type is determined, and different types correspond to different sharpening factors; and carrying out image sharpening on the current image by adopting the current sharpening factor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, specifically to technical fields such as cloud storage, cloud computing, and video coding, and in particular to an image sharpening method, device, equipment, medium, and product. Background Art

[0002] Video enhancement is an important means to improve video quality, including denoising, sharpening, contrast enhancement, etc. Among them, image sharpening technology refers to enhancing the high-frequency components in the image to make the edges and details clearer.

[0003] In the related art, a fixed sharpening factor is usually used to sharpen images in a video, which may result in poor video quality in some cases. Summary of the invention

[0004] The present disclosure provides an image sharpening method, apparatus, device, medium and product.

[0005] According to one aspect of the present disclosure, there is provided an image sharpening method, comprising: determining a current type of a current image in a video; determining a current sharpening factor corresponding to the current type, wherein different types correspond to different sharpening factors; and using the current sharpening factor to sharpen the current image.

[0006] According to another aspect of the present disclosure, an image sharpening device is provided, including: a first determination module for determining a current type of a current image in a video; a second determination module for determining a current sharpening factor corresponding to the current type, wherein different types correspond to different sharpening factors; and a sharpening module for sharpening the current image using the current sharpening factor.

[0007] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any method as described in any of the above aspects.

[0008] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute any one of the methods according to any one of the above aspects.

[0009] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the computer program implements any one of the methods described in any one of the above aspects.

[0010] According to the embodiments of the present disclosure, the quality of a video after image sharpening can be improved.

[0011] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0013] Figure 1 is a schematic diagram according to a first embodiment of the present disclosure;

[0014] Figure 2 is a schematic diagram of an application scenario for implementing an embodiment of the present disclosure;

[0015] Figure 3 is a schematic diagram of an image sharpening process provided according to an embodiment of the present disclosure;

[0016] Figure 4 is a schematic diagram according to a second embodiment of the present disclosure;

[0017] Figure 5 is a schematic diagram according to a third embodiment of the present disclosure;

[0018] Figure 6 is a schematic diagram according to a fourth embodiment of the present disclosure;

[0019] Figure 7 It is a schematic diagram of an electronic device used to implement the image sharpening method of an embodiment of the present disclosure. DETAILED DESCRIPTION

[0020] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0021] In order to better understand the embodiments of the present disclosure, the relevant terms are explained as follows:

[0022] Video enhancement: A means of improving video quality.

[0023] Image sharpening: a method of video enhancement.

[0024] Image sharpening is usually implemented based on a sharpening factor.

[0025] The sharpening factor (Amount) is used to control the intensity of the sharpening effect, also known as the enhancement intensity. The larger the value, the more obvious the sharpening effect.

[0026] Film grain: A high-frequency random noise. It is caused by tiny particles formed during the chemical development process of traditional film materials. The distribution of these particles is random, so they appear in the image as a granular texture during digitization or video recording. Under normal circumstances, this kind of grain gives the audience a more three-dimensional, uniform texture and sense of space. However, if it is enhanced, it is easy to produce flickering, fine mosaics, etc., which greatly affects the image quality.

[0027] In the related art, a fixed sharpening factor is usually used to sharpen images in a video, but for videos containing film grains, the video quality will be affected.

[0028] In order to improve video quality, the present disclosure provides the following embodiments.

[0029] Figure 1 is a schematic diagram according to the first embodiment of the present disclosure. This embodiment provides an image sharpening method, such as Figure 1 As shown, the method includes:

[0030] 101. Determine the current type of the current image in the video.

[0031] 102. Determine a current sharpening factor corresponding to the current type, wherein different types correspond to different sharpening factors.

[0032] 103. Use the current sharpening factor to sharpen the current image.

[0033] The current image refers to the image currently being processed in the video.

[0034] Current type refers to the type of the current image.

[0035] The current sharpening factor refers to the sharpening factor corresponding to the current type.

[0036] The sharpening factor (Amount) is used to control the intensity of the sharpening effect, also known as the enhancement intensity. The larger the value, the more obvious the sharpening effect.

[0037] Among them, multiple candidate types can be preset, and the current image is processed to determine one of the multiple candidate types as the current type.

[0038] Specifically, a classifier can be pre-trained. A classifier is a deep neural network model that can identify one category from multiple categories. Assuming that the number of candidate categories is N, the classifier is an N-classifier, that is, it can identify one category from N categories. In this case, the current image can be input into the classifier, and the output is the current category. Or,

[0039] The attribute information of the current image may be obtained, and the current type may be determined based on the attribute information. The attribute information may be, for example, the target variance. In this case, the current type may be determined based on the target variance of the current image. The specific target variance calculation process may refer to the subsequent related description.

[0040] After determining the current type, the current sharpening factor corresponding to the current type may be obtained. For example, the correspondence between the type and the sharpening factor may be pre-configured, and based on the correspondence, the current sharpening factor corresponding to the current type may be obtained.

[0041] After obtaining the current sharpening factor, the current image is sharpened using the current sharpening factor.

[0042] In this embodiment, the current sharpening factor is determined based on the current type of the current image, and the current image is sharpened using the current sharpening factor. Since different types correspond to different sharpening factors, the current sharpening factor can be flexibly determined according to the current type, thereby realizing adaptive adjustment of the sharpening factor. Compared with a fixed sharpening factor, the video quality can be improved.

[0043] In order to better understand the present disclosure, the application scenarios involved in the present disclosure are described as follows:

[0044] Figure 2 It is a schematic diagram of an application scenario for implementing the embodiment of the present disclosure.

[0045] In a video encoder, an original image may be obtained first. The original image is an unencoded image, and specifically may be an image in a YUV format. YUV is a video data format, where Y refers to luminance (Luminance or Luma), and U and V refer to chrominance (Chrominance or Chroma).

[0046] In the video encoding scenario, the original image in the YUV format can be directly obtained; in the video transcoding scenario, the video before transcoding (such as MP4 format) can be decapsulated and decoded to obtain the image in the YUV format.

[0047] After obtaining the original image, the original image is preprocessed to obtain a preprocessed image.

[0048] The preprocessed image is then encoded to obtain an encoded image.

[0049] In the video encoding scenario, the required encoded image can be obtained at this time; in the video transcoding scenario, the encoded image can also be packaged to obtain a video in a target format (such as WMV format), thereby realizing conversion from one video format to another.

[0050] The MP4 format and WMV format mentioned above are respectively a type of video format.

[0051] One of the above-mentioned preprocessing is image sharpening. In the image sharpening process, the original image is sharpened to obtain a target image.

[0052] Figure 3 It is a schematic diagram of an image sharpening process provided according to an embodiment of the present disclosure.

[0053] like Figure 3 As shown in the figure, the image sharpening process mainly includes: first blurring the original image to obtain a blurred image. Blurring can include Gaussian blurring or mean blurring. Gaussian blurring achieves blurring effect by weighted averaging each pixel in the image with its surrounding pixels. Mean blurring takes the average value of each pixel in the image and its surrounding pixels as the new value of the pixel. Then calculate the difference between the original image and the blurred image to obtain a residual image. Then multiply the residual image by the sharpening factor to obtain an enhanced residual image. Then add the enhanced residual image to the original image to obtain the target image.

[0054] In the related art, the above-mentioned sharpening factor is a fixed value, but in the embodiment of the present disclosure, the current sharpening factor can be determined according to the current type of the current image, so that different current sharpening factors can be obtained based on the current type, and adaptive adjustment of the sharpening factor can be achieved, thereby improving the image sharpening effect and improving the image quality.

[0055] In some embodiments, the current type is one of a plurality of preset candidate types, and is used to characterize the presence of film grains in the current image.

[0056] For example, the plurality of candidate types may be two types, namely, the presence of film grains, and the absence of film grains.

[0057] At this time, if the current type is that film grains exist, the current sharpening factor is represented by the first sharpening factor, and if the current type is that film grains do not exist, the current sharpening factor is represented by the second sharpening factor, and the first sharpening factor and the second sharpening factor are different. Further, in order to avoid the problem of image quality degradation caused by sharpening film grains, the first sharpening factor can be smaller than the second sharpening factor.

[0058] For another example, the plurality of candidate types may be at least three. Taking three as an example, they may be named the first type, the second type, and the third type in descending order according to the number of film grains.

[0059] At this time, the current sharpening factors corresponding to the above three types can be respectively represented by the first sharpening factor, the second sharpening factor and the third sharpening factor, then the first sharpening factor < the second sharpening factor < the third sharpening factor.

[0060] The current type may be determined based on a pre-trained classifier, and the classifier structure may adopt a classifier in the related art. At this time, the current image may be input into the classifier, and the output is the current type.

[0061] In the embodiment of the present disclosure, determining the current type based on the target variance of the current image is taken as an example.

[0062] The target variance can be determined as follows:

[0063] Based on the current image and the denoised image, obtaining a difference image;

[0064] The pixel value variance of the difference image is determined as the target variance.

[0065] Furthermore, the difference image can be obtained in the following way:

[0066] Denoising the current image to obtain the denoised image; performing a subtraction operation on the current image and the denoised image to obtain the difference image; or,

[0067] Downsampling the current image to obtain a downsampled image; denoising the downsampled image to obtain the denoised image; and subtracting the downsampled image from the denoised image to obtain the difference image.

[0068] Among them, assuming that the current image is represented by image A, image A can be denoised, such as by using mean filtering, Gaussian filtering, or deep neural network to obtain a denoised image, represented by image B; then, image A and image B are subtracted to obtain a difference image, represented by image C, and the pixel value difference of image C is used as the target variance.

[0069] or,

[0070] Image A can be downsampled to obtain a downsampled image, which is represented by image D; image D can be denoised to obtain a denoised image, which is represented by image E; the difference between image D and image E is then calculated to obtain image F; the pixel value difference of image F is used as the target variance.

[0071] When calculating the pixel value difference of the difference image (image C or image F), the difference image can be divided into multiple image blocks, the pixel value variance of each image block is calculated, and then the pixel value variances of all image blocks are added together to obtain the target variance.

[0072] The variance of the pixel values ​​of each image block is expressed as:

[0073]

[0074] Among them, var j represents the pixel value variance of the jth image block;

[0075] m is the number of pixels in the image block;

[0076] d i is the pixel value of the i-th pixel in the image block;

[0077] d avg is the mean value of the pixels in the image block.

[0078] The target variance is expressed as:

[0079]

[0080] Among them, Sum_var represents the target variance;

[0081] n is the number of image blocks;

[0082] var j is the pixel value variance of the jth image block.

[0083] In this embodiment, the target variance is determined based on the difference image between the current image and the denoised image. The target variance can better reflect the high-frequency information of the current image and improve the processing accuracy.

[0084] Furthermore, based on the downsampled image and its corresponding denoised image, the target variance is obtained, which can reduce the amount of calculation and improve the processing efficiency.

[0085] After determining the current type of the current image based on the target variance of the current image, the current sharpening factor corresponding to the current type can be obtained, and the current image can be sharpened using the current sharpening factor to obtain the target image. In this way, different sharpening factors can be used to sharpen different images, thereby improving the image sharpening effect and the quality of the processed image.

[0086] In combination with the above application scenarios, the present disclosure also provides the following embodiments.

[0087] Figure 4is a schematic diagram according to a second embodiment of the present disclosure. This embodiment provides an image sharpening method, the method comprising:

[0088] 401. For a current image in a video, determine a target variance of the current image.

[0089] The current image is an image currently being processed in the video. Specifically, each image in the video may be processed as the current image.

[0090] The target variance may be obtained by using the relevant description of the above embodiment.

[0091] 402. Determine a current type of the current image based on the target variance; the current type is used to characterize the presence of film grains in the current image.

[0092] Wherein, based on at least one preset threshold value, the current threshold range to which the target variance belongs can be determined; based on the correspondence between the preset threshold range and the type, the current type corresponding to the current threshold range is obtained.

[0093] For example, if the threshold is one, represented by a first threshold, it can be divided into two threshold ranges based on the first threshold. The first threshold range is a range greater than or equal to the first threshold, and the second threshold range is a range less than the first threshold. Assuming that the first threshold range is pre-configured to correspond to the first type (film grains exist), and the second threshold range is pre-configured to correspond to the second type (film grains do not exist), then if the target variance belongs to the first threshold range, the current type is that film grains exist, and if the target variance belongs to the second threshold range, the current type is that film grains do not exist.

[0094] The above takes one threshold as an example, and the threshold can also be at least two. In this case, it can be divided into at least three threshold ranges. Accordingly, the current types are at least three, respectively representing different existence situations of film grains. For example, there are two thresholds, which are represented by the first threshold and the second threshold respectively. Assuming that the first threshold is less than the second threshold, the range greater than or equal to the second threshold can be used as the first threshold range, the range greater than or equal to the first threshold and less than the second threshold can be used as the second threshold range, and the range less than the first threshold can be used as the third threshold range. Assuming that the first threshold range is pre-configured to correspond to the first type, the second threshold range corresponds to the second type, and the third threshold range corresponds to the third type, in this case, the above three types respectively represent different existence situations of film grains, such as the first type indicates that there are more film grains, the second type indicates that there are fewer film grains, and the third type indicates that there are no film grains.

[0095] Based on this, if the target variance belongs to the first threshold range, the current type is the first type; if the target variance belongs to the second threshold range, the current type is the second type; if the target variance belongs to the third threshold range, the current type is the third type.

[0096] 403. Determine a current sharpening factor corresponding to the current type based on a preset correspondence between the type and the sharpening factor.

[0097] Taking two types as an example, assuming that the first type is pre-configured to correspond to the first sharpening factor and the second type is pre-configured to correspond to the second sharpening factor, then if the current type is the first type, the current sharpening factor is the first sharpening factor.

[0098] 404. Use the current sharpening factor to sharpen the current image.

[0099] For example, the first sharpening factor is used to sharpen the current image to obtain a target image.

[0100] For the current image, the specific image sharpening process can be found in Figure 3 As shown, Figure 3 As shown, the current image can be used as the original image, using Figure 3 The processing flow shown completes the specific image sharpening process.

[0101] Afterwards, step 401 and subsequent steps may be repeatedly performed until all images in the video have completed the image sharpening process.

[0102] In this embodiment, the current type is determined based on the target variance, so that the current type can be obtained simply and efficiently.

[0103] Furthermore, by obtaining the current type based on the current threshold range to which the target variance belongs, more fine-grained type classification can be achieved, which is applicable to different scenarios and improves flexibility.

[0104] Figure 5 3 is a schematic diagram according to the third embodiment of the present disclosure, and this embodiment provides an image sharpening method. This embodiment takes the current type including: there are film grains, or there are no film grains as an example.

[0105] like Figure 5 As shown, the method includes:

[0106] 501. Obtain a statistical threshold.

[0107] Among them, the existing video samples can be counted to obtain a statistical threshold, which is represented by TH.

[0108] Specifically, the same number of videos containing film grains (represented by first videos) and videos not containing film grains (represented by second videos) may be collected, and the sizes of images in the first videos and the second videos are the same as the size of the current image.

[0109] Taking the first video as an example, for each image in the first video, the image is denoised to obtain a denoised image, and then a difference image between the image and the denoised image is calculated, and then the pixel value variance of the difference image is calculated as the target variance of the image.

[0110] Similarly, the target variance of each image in the second video can also be obtained.

[0111] Since the first video contains film grains and the second video does not contain film grains, the target variance corresponding to the first video is greater than the target variance corresponding to the second video. Therefore, a value that can distinguish the target variances corresponding to the two videos can be used as a statistical threshold.

[0112] For example, the minimum value of the target variance corresponding to the first video is var1, the maximum value of the target variance corresponding to the second video is var2, var1>var2, and any value between var2 and var1 can be used as the statistical threshold.

[0113] 502. Downsample the current image in the video to obtain a downsampled image.

[0114] For example, a downsampling operator with a scaling factor (r) = 1 / 2 may be used for downsampling. In this case, the size of the downsampled image becomes 1 / 2 of the current image.

[0115] 503. Perform denoising processing on the downsampled image to obtain a denoised image.

[0116] 504. Calculate a difference image between the downsampled image and the denoised image.

[0117] 505. Calculate the pixel value variance of the difference image and denote it by T.

[0118] For the calculation process of the pixel value variance, reference may be made to the relevant description of the above embodiment.

[0119] 506. Determine whether T is greater than or equal to k*TH. If so, execute 507; otherwise, execute 508.

[0120] Where k = r 2 , r is the scaling factor, such as r=1 / 2 as mentioned above, then k=1 / 4.

[0121] Since T is calculated based on the downsampled image, the corresponding comparison threshold also needs to be scaled. For example, based on the above-mentioned 1 / 2 scaling factor, it needs to be compared with 1 / 4*TH.

[0122] 507. Use the first sharpening factor to sharpen the current image.

[0123] 508. Use a second sharpening factor to sharpen the current image.

[0124] The first sharpening factor is smaller than the second sharpening factor.

[0125] Specifically, it can be expressed as: first sharpening factor = 0.5*H, second sharpening factor = H, where H is a preset value.

[0126] In this way, when there are no film grains in the current image, a normal sharpening factor (H) is used to sharpen the image. When there are film grains in the current image, a smaller sharpening factor (0.5*H) is used to sharpen the image. This can solve the problem of image quality deterioration caused by sharpening film grains, thereby improving the quality of the processed video.

[0127] Figure 6 It is a schematic diagram according to the fourth embodiment of the present disclosure. This embodiment provides an image sharpening device, and the device 600 includes: a first determination module 601, a second determination module 602 and a sharpening module 603.

[0128] The first determination module 601 is used to determine the current type of the current image in the video; the second determination module 602 is used to determine the current sharpening factor corresponding to the current type, where different types correspond to different sharpening factors; the sharpening module 603 is used to use the current sharpening factor to sharpen the current image.

[0129] In this embodiment, the current sharpening factor is determined based on the current type of the current image, and the current image is sharpened using the current sharpening factor. Since different types correspond to different sharpening factors, the current sharpening factor can be flexibly determined according to the current type, thereby realizing adaptive adjustment of the sharpening factor. Compared with a fixed sharpening factor, the video quality can be improved.

[0130] In some embodiments, the first determining module 601 is further configured to:

[0131] Obtaining a target variance of the current image;

[0132] The current type is determined based on the target variance; the current type is used to characterize the presence of film grains in the current image.

[0133] In this embodiment, the current type is determined based on the target variance, so that the current type can be obtained simply and efficiently.

[0134] In some embodiments, the first determining module 601 is further configured to:

[0135] Based on the current image and the denoised image, obtaining a difference image;

[0136] The pixel value variance of the difference image is determined as the target variance.

[0137] In this embodiment, the target variance is determined based on the difference image between the current image and the denoised image. The target variance can better reflect the high-frequency information of the current image and improve the processing accuracy.

[0138] In some embodiments, the first determining module 601 is further configured to:

[0139] Denoising the current image to obtain the denoised image; performing a subtraction operation on the current image and the denoised image to obtain the difference image; or,

[0140] Downsampling the current image to obtain a downsampled image; denoising the downsampled image to obtain the denoised image; and subtracting the downsampled image from the denoised image to obtain the difference image.

[0141] In this embodiment, the target variance is obtained based on the downsampled image and its corresponding denoised image, which can reduce the amount of calculation and improve processing efficiency.

[0142] In some embodiments, the first determining module 601 is further configured to:

[0143] Based on at least one preset threshold, determining a current threshold range to which the target variance belongs;

[0144] Based on the correspondence between the preset threshold range and the type, the current type corresponding to the current threshold range is obtained.

[0145] In this embodiment, the current type is determined based on the current threshold range to which the target variance belongs, which can achieve more fine-grained type classification, be applicable to different scenarios, and improve flexibility.

[0146] In some embodiments, the current type includes: the presence of film grains, or the absence of film grains; the second determination module 602 is further configured to:

[0147] If the current type is that film grain exists, determining that the current sharpening factor is a first sharpening factor;

[0148] If the current type is that film grain does not exist, determining that the current sharpening factor is a second sharpening factor;

[0149] The first sharpening factor is smaller than the second sharpening factor.

[0150] In this embodiment, when there are no film grains in the current image, a normal sharpening factor (H) is used to sharpen the image. When there are film grains in the current image, a smaller sharpening factor (0.5*H) is used to sharpen the image. This can solve the problem of image quality deterioration caused by sharpening film grains, thereby improving the quality of the processed video.

[0151] It can be understood that in the embodiments of the present disclosure, the same or similar contents in different embodiments can be referenced to each other.

[0152] It can be understood that the “first”, “second”, etc. in the embodiments of the present disclosure are only used for distinction and do not indicate the degree of importance, time sequence, etc.

[0153] It is understandable that unless there is any special limitation on the sequence of steps in the process, it means that the timing relationship between these steps is not limited.

[0154] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0155] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0156] Figure 7 A schematic block diagram of an example electronic device 700 that can be used to implement an embodiment of the present disclosure is shown. The electronic device 700 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0157] like Figure 7As shown, the electronic device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0158] Multiple components in the electronic device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the electronic device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0159] The computing unit 701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above, such as image sharpening methods. For example, in some embodiments, the image sharpening method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the image sharpening method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the image sharpening method in any other appropriate manner (e.g., by means of firmware).

[0160] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0161] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable task processing device, so that the program code, when executed by the processor or controller, implements the functions / operations specified in the flow chart and / or block diagram. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0162] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0163] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0164] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0165] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.

[0166] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0167] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. An image sharpening method, comprising: Determine the current type of the current image in the video; Determine a current sharpening factor corresponding to the current type, wherein different types correspond to different sharpening factors; The current image is sharpened using the current sharpening factor.

2. The method according to claim 1, wherein: Determining the current type of the current image in the video includes: Obtaining a target variance of the current image; The current type is determined based on the target variance; the current type is used to characterize the presence of film grains in the current image.

3. The method according to claim 2, wherein: The obtaining the target variance of the current image includes: Based on the current image and the denoised image, obtaining a difference image; The pixel value variance of the difference image is determined as the target variance.

4. The method according to claim 3, wherein: The step of obtaining a difference image based on the current image and the denoised image includes: Denoising the current image to obtain the denoised image; performing a subtraction operation on the current image and the denoised image to obtain the difference image; or, Downsampling the current image to obtain a downsampled image; denoising the downsampled image to obtain the denoised image; and subtracting the downsampled image from the denoised image to obtain the difference image.

5. The method according to claim 2, wherein: The determining the current type based on the target variance includes: Based on at least one preset threshold, determining a current threshold range to which the target variance belongs; Based on the correspondence between the preset threshold range and the type, the current type corresponding to the current threshold range is obtained.

6. The method according to claim 1, wherein: The current type includes: the presence of film grains, or the absence of film grains; The determining a current sharpening factor corresponding to the current type includes: If the current type is that film grain exists, determining that the current sharpening factor is a first sharpening factor; If the current type is that film grain does not exist, determining that the current sharpening factor is a second sharpening factor; The first sharpening factor is smaller than the second sharpening factor.

7. An image sharpening device, comprising: A first determination module, used to determine the current type of the current image in the video; A second determination module is used to determine a current sharpening factor corresponding to the current type, wherein different types correspond to different sharpening factors; The sharpening module is used to sharpen the current image using the current sharpening factor.

8. The device according to claim 7, wherein: The first determining module is further configured to: Obtaining a target variance of the current image; The current type is determined based on the target variance; the current type is used to characterize the presence of film grains in the current image.

9. The device according to claim 8, wherein: The first determining module is further configured to: Based on the current image and the denoised image, obtaining a difference image; The pixel value variance of the difference image is determined as the target variance.

10. The device according to claim 9, wherein: The first determining module is further configured to: Denoising the current image to obtain the denoised image; performing a subtraction operation on the current image and the denoised image to obtain the difference image; or, Downsampling the current image to obtain a downsampled image; Denoising the downsampled image to obtain the denoised image; A subtraction operation is performed on the down-sampled image and the denoised image to obtain the difference image.

11. The device according to claim 8, wherein: The first determining module is further configured to: Based on at least one preset threshold, determining a current threshold range to which the target variance belongs; Based on the correspondence between the preset threshold range and the type, the current type corresponding to the current threshold range is obtained.

12. The device according to claim 7, wherein: The current type includes: the presence of film grains, or the absence of film grains; The second determining module is further used for: If the current type is that film grain exists, determining that the current sharpening factor is a first sharpening factor; If the current type is that film grain does not exist, determining that the current sharpening factor is a second sharpening factor; The first sharpening factor is smaller than the second sharpening factor.

13. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.

14. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-6.

15. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and device for automatically sharpening video image

    CN105046655A

  • Image processing method and device, electronic equipment and storage medium

    CN113592776A

  • Image processing method and device, readable medium and mobile terminal

    CN114119413A

  • Camera lens dirt detection method and system

    CN117576084A

  • Image processing method and device, electronic equipment and storage medium

    CN118195952A