A method, apparatus and device for real-time adjustment of image sharpness

By constructing a sharpness adjustment model based on a DRConv regional convolutional neural network, the problem that existing technologies cannot simultaneously handle details in both highlights and shadows is solved, achieving fine-grained adjustment of image sharpness and user-controllable real-time processing effects.

CN116205816BActive Publication Date: 2026-06-23XIAMEN MEITUZHIJIA TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XIAMEN MEITUZHIJIA TECH
Filing Date
2023-02-27
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing image sharpness adjustment methods cannot simultaneously handle the details of highlights and shadows, nor can they achieve the desired adjustment effect according to user preferences.

Method used

A sharpness adjustment model is constructed using a DRConv-based regional convolutional neural network, which includes a feature extraction module, a level modulation module, and a matrix mapping module. Real-time adjustment of image sharpness is achieved through feature extraction, level modulation, and matrix mapping.

Benefits of technology

It enables fine-tuning of image sharpness, allowing for real-time adjustment of image sharpness according to user needs, reducing the number of network parameters, and making it suitable for real-time processing on terminal devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116205816B_ABST
    Figure CN116205816B_ABST
Patent Text Reader

Abstract

The application discloses a kind of real-time adjustment method, device and equipment of image sharpness, it includes: receiving image to be handled, according to the sharpness adjustment model of pre-training completion to the image to be handled sharpness parameter adjustment;The image to be handled is preprocessed, and corresponding highlight image and shadow image are obtained;According to the feature extraction module, the highlight image and the shadow image are extracted, and highlight feature and shadow feature are obtained;By the degree modulation module, the preset adjustment parameter is modulated, and a plurality of sharpness modulation parameters are obtained;The highlight feature, the shadow feature and the sharpness modulation parameter are fused and processed, to obtain affine grid, and the affine matrix is obtained by upsampling operation to the affine grid;By the matrix mapping module, the image to be handled and the affine matrix are mapped, to obtain the generated image after sharpness adjustment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method, apparatus, and device for real-time adjustment of image sharpness. Background Technology

[0002] Sharpness is an important parameter reflecting the brightness of highlight and shadow areas in an image. In real-world applications, due to the limited hardware of mobile devices, it is difficult for users to capture images that combine highlight and shadow details. As a result, many color correction software programs have emerged, which improve the "sophistication" of images by adjusting the brightness of highlight and shadow areas separately, but cannot simultaneously address both aspects. Existing sharpness adjustment methods mainly include (1) methods based on traditional image processing. Although these methods can achieve sharpness, they are prone to producing discontinuities in the processing of highlight and shadow boundaries; (2) deep learning methods based on CNNs, which usually perform uniform processing on either highlight or shadow areas and cannot perform local sharpness processing on the image. In addition, these methods are fixed-degree adjustments and cannot achieve the desired adjustment effect according to user preferences. Summary of the Invention

[0003] In view of this, the purpose of this invention is to provide a method, apparatus, and device for real-time adjustment of image sharpness, which aims to solve the problem that existing sharpness adjustment methods cannot meet the actual needs of users.

[0004] To achieve the above objectives, the present invention provides a method for real-time adjustment of image sharpness, the method comprising:

[0005] The system receives an image to be processed and adjusts the sharpness parameters of the image according to a pre-trained sharpness adjustment model. The network structure of the sharpness adjustment model includes a feature extraction module, a level modulation module, and a matrix mapping module. The feature extraction module is constructed based on a DRConv regional convolutional neural network.

[0006] The image to be processed is preprocessed to obtain the corresponding highlight image and shadow image;

[0007] The feature extraction module performs feature extraction on the highlight image and the shadow image to obtain highlight features and shadow features.

[0008] The preset adjustment parameters are modulated by the degree modulation module to obtain multiple sharpness modulation parameters;

[0009] The highlight features, the shadow features, and the sharpness modulation parameters are fused to obtain an affine mesh, and the affine mesh is then upsampled to obtain an affine matrix.

[0010] The matrix mapping module performs a mapping operation on the image to be processed and the affine matrix to obtain a generated image with sharpness adjustment.

[0011] Preferably, the feature extraction module includes a first feature extraction module and a second feature extraction module; the step of extracting features from the highlight image and the shadow image using the feature extraction module to obtain highlight features and shadow features includes:

[0012] The highlight image and the shadow image are respectively extracted by the first feature extraction module and the second feature extraction module to obtain the highlight features of the highlight area and the shadow features of the shadow area.

[0013] Preferably, the first feature extraction module and the second feature extraction module share network weight parameters.

[0014] Preferably, the intensity modulation module is constructed based on a multilayer perceptron; the intensity modulation module modulates preset adjustment parameters to obtain multiple sharpness modulation parameters, including:

[0015] The preset adjustment parameters are input into the multilayer sensor, which outputs multiple scaling parameters and shift parameters. The sharpness is modulated by the multiple scaling parameters and shift parameters to obtain multiple sharpness modulation parameters.

[0016] Preferably, the sharpness modulation is performed using multiple scaling parameters and shift parameters to obtain multiple sharpness modulation parameters, including:

[0017] The sharpness is modulated according to the formula p′=β*p+γ, where β represents the scaling parameter, γ represents the shift parameter, p represents the preset sharpness adjustment parameter, and p′ represents the sharpness modulation parameter after modulation by the multilayer sensor.

[0018] Preferably, the training process of the sharpness adjustment model includes:

[0019] Using the preset loss function Loss = L1 + θ1*L 对比 +θ2*L SSIM The sharpness adjustment model is optimized, wherein,

[0020]

[0021]

[0022] In the formula, x represents the original image. Indicates the generation of an image. Let L represent the target image, ∈ be a constant 10e-7, VGG represent the feature extraction operation performed on the image through the VGG network, L represent the conversion of the image from RGB space to LAB space to obtain the corresponding L luminance component, SSIM represent the structural similarity calculation between the original image and the generated image, and θ1 and θ2 are L1 and L2 respectively. 对比 L SSIM The weighting coefficients.

[0023] To achieve the above objectives, the present invention also provides a real-time image sharpness adjustment device, the device comprising:

[0024] A receiving unit is used to receive an image to be processed and adjust the sharpness parameters of the image to be processed according to a pre-trained sharpness adjustment model. The network structure of the sharpness adjustment model includes a feature extraction module, a level modulation module, and a matrix mapping module. The feature extraction module is constructed based on a DRConv regional convolutional neural network.

[0025] An image processing unit is used to preprocess the image to be processed to obtain corresponding highlight and shadow images;

[0026] The feature extraction unit is used to extract features from the highlight image and the shadow image according to the feature extraction module to obtain highlight features and shadow features;

[0027] The parameter modulation unit is used to modulate the preset adjustment parameters through the degree modulation module to obtain multiple sharpness modulation parameters;

[0028] The fusion processing unit is used to fuse the highlight features, the shadow features, and the sharpness modulation parameters to obtain an affine mesh, and to obtain an affine matrix by upsampling the affine mesh.

[0029] The mapping operation unit is used to perform a mapping operation on the image to be processed and the affine matrix through the matrix mapping module to obtain a generated image with sharpness adjustment.

[0030] To achieve the above objectives, the present invention also proposes a real-time image sharpness adjustment device, including a processor, a memory, and a computer program stored in the memory, wherein the computer program is executed by the processor to implement the steps of a real-time image sharpness adjustment method as described in the above embodiments.

[0031] To achieve the above objectives, the present invention also proposes a computer-readable storage medium storing a computer program that is executed by a processor to implement the steps of a real-time image sharpness adjustment method as described in the above embodiments.

[0032] Beneficial effects:

[0033] The above solution, through a sharpness adjustment processing method based on regional convolutional neural networks, can achieve more detailed image effects, enabling the controllable generation of images with different levels of sharpness and real-time processing suitable for terminal devices.

[0034] The above scheme, through the constructed sharpness adjustment model, mainly comprises three parts: feature extraction, sharpness modulation, and matrix mapping. By designing a neural network using region convolution and modulating it with sharpness coefficients, affine meshes of different sharpness levels are obtained. The affine mesh is then upsampled to obtain an affine matrix, which serves as the mapping matrix between the input and generated images. This method of obtaining the affine matrix effectively reduces the network size, constructs a lightweight network structure, significantly reduces the number of parameters, and enables real-time sharpness processing on mobile devices such as smartphones.

[0035] The above approach, by incorporating L1 loss, contrast loss, and SSIM loss during model training, can improve the texture structure and details of the generated images, achieving natural and beautifying effects in image sharpness adjustment. Attached Figure Description

[0036] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0037] Figure 1 This is a flowchart illustrating a real-time image sharpness adjustment method according to an embodiment of the present invention.

[0038] Figure 2 This is a schematic diagram of the structure of a sharpness adjustment model provided in an embodiment of the present invention.

[0039] Figure 3 This is a schematic diagram of the structure of a real-time image sharpness adjustment device provided in an embodiment of the present invention.

[0040] The realization of the invention's objective, its functional characteristics, and advantages will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0041] 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 a part of the embodiments of the present invention, not all of them. 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. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to represent selected embodiments of the invention. 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.

[0042] The present invention will be described in detail below with reference to the embodiments.

[0043] Reference Figure 1 The diagram shown is a flowchart illustrating a real-time image sharpness adjustment method according to another embodiment of the present invention.

[0044] In this embodiment, the method includes:

[0045] S11, Receive the image to be processed, and adjust the sharpness parameters of the image to be processed according to the pre-trained sharpness adjustment model. The network structure of the sharpness adjustment model includes a feature extraction module, a level modulation module, and a matrix mapping module. The feature extraction module is constructed based on the DRConv regional convolutional neural network.

[0046] S32, preprocess the image to be processed to obtain the corresponding highlight image and shadow image;

[0047] S33, Perform feature extraction on the highlight image and the shadow image according to the feature extraction module to obtain highlight features and shadow features;

[0048] S34, the preset adjustment parameters are modulated by the degree modulation module to obtain multiple sharpness modulation parameters;

[0049] S35, the highlight features, the shadow features and the sharpness modulation parameters are fused to obtain an affine mesh, and the affine mesh is upsampled to obtain an affine matrix;

[0050] S36, The matrix mapping module performs a mapping operation on the image to be processed and the affine matrix to obtain a generated image with sharpness adjustment.

[0051] In this embodiment, the user's desired effect for sharpness adjustment is that the sharpness effect should change accordingly with the degree of adjustment. A greater degree of positive adjustment darkens the highlights and brightens the shadows. Conversely, a greater degree of negative adjustment brightens the highlights and darkens the shadows. Furthermore, the user wants the image to retain as much of its original detail as possible after sharpness adjustment, allowing for real-time image processing. Therefore, the sharpness adjustment model constructed in this embodiment aims to achieve the above, comprising three modules: feature extraction, degree modulation, and matrix mapping. (Refer to...) Figure 2 As shown. First, the image to be processed is processed to obtain the corresponding highlight and shadow images. (The processing of the image to be processed includes: converting the image to grayscale, calculating the average brightness value of the entire grayscale image, using pixel areas with a brightness value higher than the average value as highlight masks, and pixel areas with a brightness value lower than the average value as shadow masks; then performing a bitwise AND operation between the obtained highlight and shadow masks and the image to be processed to obtain the highlight and shadow images of the image to be processed, respectively.) These are then input into the feature extraction module to obtain the highlight and shadow features of the image. At this time, the network weights of the feature extraction module are shared. Simultaneously, the preset sharpness adjustment parameters are input into the sharpness modulation module to obtain a series of sharpness modulation parameters. Then, the highlight features, shadow features, and sharpness modulation parameters are fused (this fusion process mainly involves fusing the highlight features, shadow features, and sharpness modulation parameters through channel stacking operations) to obtain an affine mesh. The affine mesh is then upsampled to obtain an affine matrix. Finally, the image to be processed is mapped to the affine matrix to obtain the final generated image. The preset sharpness adjustment parameter p ranges from -100 to 100, consisting of 20 parameter values ​​(including 20 parameter values ​​from -100, -90, ..., -10, 10, ..., 90 to 100, representing sharpness of -100, -90, ..., 90, and 100 respectively).

[0052] Furthermore, the feature extraction module includes a first feature extraction module and a second feature extraction module; the step of extracting features from the highlight image and the shadow image using the feature extraction module to obtain highlight features and shadow features includes:

[0053] The highlight image and the shadow image are respectively extracted by the first feature extraction module and the second feature extraction module to obtain the highlight features of the highlight area and the shadow features of the shadow area.

[0054] In this embodiment, the feature extraction module is constructed using a region-based convolutional neural network (DRConv). DRConv is a convolutional neural network focused on region features. It uses a learnable guided mask to assign semantically similar features to the same region, resulting in a region-level convolutional kernel. By utilizing this region-level convolutional kernel for convolution operations, this embodiment can obtain more detailed regional feature information of the image. The feature extraction module based on the region-based convolutional neural network extracts feature information from two different regions: highlights and shadows, respectively. Simultaneously, the network weights between the two feature extraction modules used to extract highlight and shadow features are shared; that is, the two modules share only one set of weight parameters, significantly reducing the network model size and improving the network's lightweight nature.

[0055] Furthermore, the intensity modulation module is constructed based on a multilayer perceptron; the intensity modulation module modulates preset adjustment parameters to obtain multiple sharpness modulation parameters, including:

[0056] The preset adjustment parameters are input into the multilayer sensor, which outputs multiple scaling parameters and shift parameters. The sharpness is modulated by the multiple scaling parameters and shift parameters to obtain multiple sharpness modulation parameters.

[0057] The process of modulating the sharpness using multiple scaling parameters and shift parameters to obtain multiple sharpness modulation parameters includes:

[0058] The sharpness is modulated according to the formula p′=β*p+γ, where β represents the scaling parameter, γ represents the shift parameter, p represents the preset sharpness adjustment parameter, and p′ represents the sharpness modulation parameter after modulation by the multilayer sensor.

[0059] In this embodiment, the intensity modulation module is constructed using a multilayer perceptron (MLP). The MLP processes each pixel of the image individually, without affecting the values ​​of adjacent pixels. The intensity adjustment parameters are input into the MLP, and the output is a series of scaling parameters β and shift parameters γ used for modulation, which can be expressed by the following formula:

[0060] p′=β*p+γ

[0061] Where p represents the pre-set sharpness adjustment parameter, and p′ represents the sharpness modulation parameter after modulation.

[0062] Furthermore, the matrix mapping module uses a simple upsampling operation to upsample the affine mesh into an affine matrix of the same size as the input original image, and then maps the input original image into the final generated image through a series of multiply-accumulate operations.

[0063] Existing CNN-based image adjustment methods are mostly pixel-to-pixel approaches. These methods require building networks with a large number of parameters to achieve the desired effect, and inference consumes significant computational resources and time. The method proposed in this embodiment, however, primarily constructs an affine matrix through training. The network used to obtain this affine matrix is ​​built using weight sharing, greatly reducing the number of network model parameters. The inference time per iteration is in the millisecond range, enabling real-time sharpness adjustment of images.

[0064] Furthermore, the training process for the sharpness adjustment model includes:

[0065] The target image is obtained by selecting images containing landscapes and portraits as the original images and adjusting the sharpness of the original images using a preset algorithm.

[0066] The sharpness adjustment model is obtained by training based on the original image, the target image, and a preset loss function.

[0067] In this embodiment, image data containing landscape and portrait scenes are selected as the original images. The original images and images adjusted for sharpness using traditional algorithms are used as image pairing data between the original and target images. Geometric transformations, including random flipping, translation, rotation, and scaling, are performed on the original and target images to enrich image features and improve network training efficiency. A loss function for the sharpness adjustment model is then constructed, including L1 loss, contrast loss, and SSIM loss.

[0068] The comparative loss is:

[0069] In the formula, x represents the original image. Indicates the generation of an image. Let VGG represent the target image, where ∈ is a constant 10e-7, and VGG represents the feature extraction operation performed on the image through the VGG network.

[0070] The SSIM loss is:

[0071] In the formula, L represents converting the image from RGB space to LAB space to obtain the corresponding L luminance component; SSIM represents calculating the structural similarity between the original image and the generated image. Therefore, the overall loss function of the network can be expressed by the formula:

[0072] Loss = L1 + θ1 * L 对比 +θ2*L SSIM

[0073] Where θ1 and θ2 are respectively L 对比 and LSSIM The weighting coefficients are set to 1.5 and 1.2 in this embodiment based on experience.

[0074] In this embodiment, the overall network structure of the real-time sharpness adjustment model is jointly trained. The generated image and the target image output by the network are input into the network's loss function to calculate the loss, and the network parameters are iteratively updated. This method allows for better training of the network model's generation capabilities; that is, by using this sharpness adjustment model to adjust image sharpness, images with better sharpness adjustment effects can be obtained.

[0075] Existing CNN-based deep learning methods achieve more detailed image effects compared to traditional image processing methods; however, these methods can only obtain images with a fixed level of sharpness, failing to controllably generate images with varying degrees of sharpness. To address these shortcomings, this embodiment constructs a real-time sharpness adjustment method based on a region convolutional neural network (MLP). The network structure comprises three parts: feature extraction, sharpness modulation, and matrix mapping. Feature extraction of highlights and shadows is performed through region convolution, and sharpness modulation is achieved using an MLP to obtain the corresponding sharpness effect. Furthermore, in addition to L1 loss, contrast loss and SSIM loss are incorporated to enhance the texture structure and details of the generated image. The lightweight network structure built based on affine matrices significantly reduces the number of parameters, enabling real-time sharpness processing on mobile devices such as smartphones.

[0076] Reference Figure 3 The diagram shown is a structural schematic of a real-time image sharpness adjustment device provided in another embodiment of the present invention.

[0077] In this embodiment, the device 30 includes:

[0078] The receiving unit 31 is used to receive the image to be processed and adjust the sharpness parameters of the image to be processed according to the pre-trained sharpness adjustment model. The network structure of the sharpness adjustment model includes a feature extraction module, a level modulation module, and a matrix mapping module. The feature extraction module is constructed based on the DRConv regional convolutional neural network.

[0079] Image processing unit 32 is used to preprocess the image to be processed to obtain the corresponding highlight image and shadow image;

[0080] Feature extraction unit 33 is used to extract features from the highlight image and the shadow image according to the feature extraction module to obtain highlight features and shadow features;

[0081] The parameter modulation unit 34 is used to modulate the preset adjustment parameters through the degree modulation module to obtain multiple sharpness modulation parameters;

[0082] The fusion processing unit 35 is used to fuse the highlight features, the shadow features and the sharpness modulation parameters to obtain an affine mesh, and to obtain an affine matrix by upsampling the affine mesh.

[0083] The mapping operation unit 36 ​​is used to perform a mapping operation on the image to be processed and the affine matrix through the matrix mapping module to obtain a generated image with sharpness adjustment.

[0084] Each unit module of the device 30 can execute the corresponding steps in the above-described image sharpness parameter adjustment method embodiment. Therefore, each unit module will not be described in detail here. Please refer to the description of the corresponding steps above for details.

[0085] This invention also provides a real-time image sharpness adjustment device, which includes the real-time image sharpness adjustment apparatus described above, wherein the real-time image sharpness adjustment apparatus can employ... Figure 3 The structure of the embodiment, correspondingly, can be executed Figure 1 The technical solutions of the method embodiments shown are similar in implementation principle and technical effect. For details, please refer to the relevant records in the above embodiments, which will not be repeated here.

[0086] The device includes: a mobile phone, digital camera, or tablet computer with a camera function; a device with an image processing function; or a device with an image display function. The device may include components such as a memory, processor, input unit, display unit, and power supply.

[0087] The memory can be used to store software programs and modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area. The program storage area can store the operating system, application programs required for at least one function (such as image playback function), etc.; the data storage area can store data created according to the use of the device. In addition, the memory can include high-speed random access memory, and can also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory can also include a memory controller to provide access to the memory for the processor and input units.

[0088] The input unit can be used to receive input numerical, character, or image information, and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control. Specifically, in addition to a camera, the input unit of this embodiment may also include a touch-sensitive surface (e.g., a touch screen) and other input devices.

[0089] The display unit can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. The display unit may include a display panel, optionally configured as an LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), or other similar display panel. Furthermore, a touch-sensitive surface may cover the display panel. When the touch-sensitive surface detects a touch operation on or near it, it transmits the information to the processor to determine the type of touch event. Subsequently, the processor provides corresponding visual output on the display panel based on the type of touch event.

[0090] This invention also provides a computer-readable storage medium, which may be a computer-readable storage medium included in the memory described in the above embodiments; or it may be a standalone computer-readable storage medium not assembled into a device. The computer-readable storage medium stores at least one instruction, which is loaded and executed by a processor to implement... Figure 1 The method for real-time adjustment of image sharpness is shown. The computer-readable storage medium may be a read-only memory, a disk, or an optical disk, etc.

[0091] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the device embodiments, equipment embodiments, and storage medium embodiments, since they are basically similar to the method embodiments, the descriptions are relatively simple, and relevant parts can be referred to the descriptions in the method embodiments.

[0092] Furthermore, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0093] The foregoing description illustrates and describes preferred embodiments of the present invention. It should be understood that the present invention is not limited to the forms disclosed herein and should not be construed as excluding other embodiments. It can be used in various other combinations, modifications, and environments, and can be altered within the scope of the inventive concept by means of the foregoing teachings or techniques or knowledge in related fields. Any modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention should be within the protection scope of the appended claims.

Claims

1. A method for real-time adjustment of image sharpness, characterized in that, The method includes: The system receives an image to be processed and adjusts the sharpness parameters of the image according to a pre-trained sharpness adjustment model. The network structure of the sharpness adjustment model includes a feature extraction module, a level modulation module, and a matrix mapping module. The feature extraction module is constructed based on a DRConv regional convolutional neural network. The image to be processed is preprocessed to obtain the corresponding highlight image and shadow image; The feature extraction module performs feature extraction on the highlight image and the shadow image to obtain highlight features and shadow features. The intensity modulation module modulates preset adjustment parameters to obtain multiple sharpness modulation parameters; the intensity modulation module is constructed based on a multilayer perceptron; the multiple sharpness modulation parameters obtained by modulating preset adjustment parameters through the intensity modulation module include: Preset adjustment parameters are input into the multilayer sensor, which outputs multiple scaling parameters and shift parameters. Sharpness modulation is achieved using these multiple scaling parameters and shift parameters to obtain multiple sharpness modulation parameters; wherein, The sharpness modulation is performed using multiple scaling parameters and shift parameters to obtain multiple sharpness modulation parameters, including: According to the formula Modulate the intensity of brightness, among which, This represents the scaling parameter. Indicates shift parameter This indicates the preset sharpness adjustment parameter. This represents the sharpness modulation parameters after modulation through the multilayer sensor; The training process of the sharpness adjustment model includes: Using a pre-defined loss function The sharpness adjustment model is optimized, wherein, , , In the formula, Represents the original image. Indicates the generation of an image. Represents the target image. Given a constant of 10e-7, VGG represents the feature extraction operation performed on the image using the VGG network. This indicates that the image is converted from RGB space to LAB space to obtain the corresponding L luminance component. SSIM indicates that structural similarity is calculated between the original image and the generated image. , They are respectively , Weighting coefficients; The highlight features, the shadow features, and the sharpness modulation parameters are fused to obtain an affine mesh, and the affine mesh is then upsampled to obtain an affine matrix. The matrix mapping module performs a mapping operation on the image to be processed and the affine matrix to obtain a generated image with sharpness adjustment.

2. The method for real-time adjustment of image sharpness according to claim 1, characterized in that, The feature extraction module includes a first feature extraction module and a second feature extraction module; the step of extracting features from the highlight image and the shadow image using the feature extraction module to obtain highlight features and shadow features includes: The highlight image and the shadow image are respectively extracted by the first feature extraction module and the second feature extraction module to obtain the highlight features of the highlight area and the shadow features of the shadow area.

3. The real-time image sharpness adjustment method according to claim 2, characterized in that, The first feature extraction module and the second feature extraction module share network weight parameters.

4. A real-time image sharpness adjustment device, characterized in that, The apparatus for using the real-time image sharpness adjustment method according to any one of claims 1-3 includes: A receiving unit is used to receive an image to be processed and adjust the sharpness parameters of the image to be processed according to a pre-trained sharpness adjustment model. The network structure of the sharpness adjustment model includes a feature extraction module, a level modulation module, and a matrix mapping module. The feature extraction module is constructed based on a DRConv regional convolutional neural network. An image processing unit is used to preprocess the image to be processed to obtain corresponding highlight and shadow images; The feature extraction unit is used to extract features from the highlight image and the shadow image according to the feature extraction module to obtain highlight features and shadow features; The parameter modulation unit is used to modulate the preset adjustment parameters through the degree modulation module to obtain multiple sharpness modulation parameters; The fusion processing unit is used to fuse the highlight features, the shadow features, and the sharpness modulation parameters to obtain an affine mesh, and to obtain an affine matrix by upsampling the affine mesh. The mapping operation unit is used to perform a mapping operation on the image to be processed and the affine matrix through the matrix mapping module to obtain a generated image with sharpness adjustment.

5. A real-time image sharpness adjustment device, characterized in that, The system includes a processor, a memory, and a computer program stored in the memory, the computer program being executed by the processor to implement the steps of a real-time image sharpness adjustment method as described in any one of claims 1 to 3.

6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that is executed by a processor to implement the steps of a real-time image sharpness adjustment method as described in any one of claims 1 to 3.