Data processing method and apparatus, and device and readable storage medium

By acquiring filtered images of different filter sizes, extracting and merging high-frequency information, the problem of low image sharpening quality in the existing technology is solved, and the sharpening effect and clarity of the image are improved from different scales.

WO2023207408A9PCT designated stage expired Publication Date: 2024-09-12TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/082111
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2022-04-24
Filing Date
2023-03-17
Publication Date
2024-09-12

AI Technical Summary

Technical Problem

Existing image sharpening methods will result in low quality of sharpened images, unreasonable representation of detail information, and large distortion.

Method used

By obtaining filtered images with different filter sizes, perform image conversion to extract high-frequency images, and fuse them with the original images to enhance the high-frequency information of the image and improve the sharpening quality of the image from different scales.

Benefits of technology

It improves the quality of the image after sharpening, enhances the clarity and sharpness of the image, adapts to different types of image details, and improves the sharpening effect of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023082111_12092024_PF_FP_ABST
    Figure CN2023082111_12092024_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present application are a data processing method and apparatus, and a device and a readable storage medium. The method comprises: acquiring a filter size set for filtering processing, wherein the filter size set comprises N filter sizes, N being a positive integer greater than 1, and any two of the N filter sizes being different; respectively performing low-pass filtering processing on an original image on the basis of the filter sizes, so as to obtain N filtered images; respectively performing image conversion on the N filtered images according to the original image, so as to obtain N high-frequency images; and performing image fusion on the N high-frequency images, so as to obtain a fused image, and fusing the fused image and the original image, so as to obtain a sharpening enhanced image corresponding to the original image. By means of the present application, the quality of a sharpened image in image sharpening services can be improved. The present application can be applied to various scenarios such as cloud technology, artificial intelligence, intelligent transportation and assisted driving.
Need to check novelty before this filing date? Find Prior Art

Description

Data processing method, device, equipment and readable storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on April 24, 2022, application number 202210432913.5, and application name “A data processing method, device, equipment and readable storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of computer technology, and in particular to data processing technology. Background Art

[0003] With the advent of the digital age, images can now be processed by computers, leading to higher demands for image clarity. The process of sharpening a blurry image is known as image sharpening. There are many reasons for image blur, such as camera jitter during image acquisition, poorly designed optical components in scanning equipment, or noise interference during image signal transmission. From the perspective of image spectrum analysis, image blur is caused by insufficient high-frequency components in the image, resulting in a lack of sharpness. Therefore, image sharpening of a blurry image essentially aims to increase the high-frequency components.

[0004] Currently, the image sharpening method is to simply enhance the high-frequency components in the image, so that the brightness difference at the edge of the image is increased, thereby achieving a sharpening effect.

[0005] However, this method will make the image information expressed by each detail in the image unreasonable, resulting in greater distortion of the sharpened image and low quality of the sharpened image.

[0006] Summary of the Invention

[0007] The embodiments of the present application provide a data processing method, apparatus, device, and readable storage medium, which can improve the quality of sharpened images in image sharpening services.

[0008] An embodiment of the present application provides a data processing method, which is executed by a computer device and includes:

[0009] Obtaining a filter size set for performing filtering processing; the filter size set includes N filter sizes, where N is a positive integer greater than 1; and any two filter sizes among the N filter sizes are different;

[0010] Perform low-pass filtering on the original image based on each filter size to obtain N filtered images;

[0011] Perform image conversion on the N filtered images according to the original image to obtain N high-frequency images;

[0012] The N high-frequency images are fused to obtain a fused image, and the fused image is fused with the original image to obtain a sharpened and enhanced image corresponding to the original image.

[0013] In one aspect, an embodiment of the present application provides a data processing apparatus, which is deployed on a computer device and includes:

[0014] A size acquisition module is used to acquire a filter size set for performing filtering processing; the filter size set includes N filter sizes, where N is a positive integer greater than 1; and any two filter sizes among the N filter sizes are different;

[0015] A filtering module is used to perform low-pass filtering on the original image based on each filter size to obtain N filtered images;

[0016] An image conversion module is used to perform image conversion on the N filtered images according to the original image to obtain N high-frequency images;

[0017] An image fusion module is used to fuse N high-frequency images to obtain a fused image;

[0018] The image sharpening module is used to fuse the fused image with the original image to obtain a sharpened and enhanced image corresponding to the original image.

[0019] In one aspect, an embodiment of the present application provides a computer device, including: a processor and a memory;

[0020] The memory stores a computer program, and when the computer program is executed by the processor, the processor executes the method in the embodiment of the present application.

[0021] On one hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. The computer program includes program instructions. When the program instructions are executed by a processor, the method in the embodiment of the present application is executed.

[0022] In one aspect of the present application, a computer program product is provided, comprising a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform a method provided in one aspect of an embodiment of the present application.

[0023] In an embodiment of the present application, for a certain image (such as an original image), N different filter sizes can be used to perform low-pass filtering on the original image, thereby obtaining N different filtered images; then, the N different filtered images can be converted according to the original image to obtain N different high-frequency images; these N different high-frequency images can be used for sharpening enhancement. For example, the N high-frequency images can be fused to obtain a fused image, which is then fused with the original image. That is, the fused image containing high-frequency information at multiple sizes is added to the original image, that is, the high-frequency information at each size in the original image is enhanced, and thus a sharpened and enhanced image corresponding to the original image can be obtained. It should be understood that after the present application performs low-pass filtering on the original image through different filter sizes, low-frequency images at different filter sizes (i.e., N filtered images) can be obtained. Then, the high-frequency information corresponding to each filtered image can be extracted through the original image itself and each filtered image (i.e., N high-frequency images are obtained). For multi-scale high-frequency images, the present application can fuse them to obtain a fused image, and the processed fused image can be fused again with the original image, so that the high-frequency intensity of the original image can be enhanced from different scales (filter sizes) to obtain a sharpened and enhanced image. In addition, since the present application uses different filter sizes to perform low-pass filtering on the original image at the same time, the high-frequency information obtained is also high-frequency information under different filter sizes, and it can have strong adaptability to different types of image details (such as smooth textures and complex sharp textures) (for example, for complex sharp textures, low-pass filtering based on low filter size can extract the corresponding high-frequency information and achieve corresponding enhancement; for smooth textures, low-pass filtering based on high filter size can extract the corresponding high-frequency information and achieve corresponding enhancement), that is, it can achieve the enhancement of the detail information of the original image from different scales, thereby improving the sharpening quality of the image and improving the clarity of the image. In summary, the present application can improve the quality of the sharpened image in the image sharpening business. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0025] FIG1 is a diagram of a network architecture provided by an embodiment of the present application;

[0026] FIG2 is a schematic diagram of a scenario for performing image sharpening processing according to an embodiment of the present application;

[0027] FIG3 is a schematic diagram of an image processing scenario provided by an embodiment of the present application;

[0028] FIG4 is a flow chart of a data processing method provided in an embodiment of the present application;

[0029] FIG5 is a schematic diagram of pixel processing based on mean filtering provided by an embodiment of the present application;

[0030] FIG6 is a schematic diagram of a process for fusing an original image and a fused image to obtain a sharpened and enhanced image, provided by an embodiment of the present application;

[0031] FIG7 is a schematic structural diagram of a data processing device provided in an embodiment of the present application;

[0032] FIG8 is a schematic structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0033] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0034] This application relates to artificial intelligence and other related technologies, such as computer vision technology within artificial intelligence. Specifically, the solution of this application relates to image processing technology within computer vision technology, which can sharpen and enhance images to obtain sharpened and enhanced images with higher image quality. Another example involves machine learning within artificial intelligence, which can be used to train a target image model so that the target image model can be used to identify the area to which the object to be identified belongs.

[0035] Please refer to Figure 1, which is a structural diagram of a network architecture provided by an embodiment of the present application. As shown in Figure 1, the network architecture may include a business server 1000 and a terminal device cluster (i.e., a terminal device cluster). The terminal device cluster may include one or more terminal devices, and the number of terminal devices will not be restricted here. As shown in Figure 1, multiple terminal devices may specifically include terminal device 100a, terminal device 100b, terminal device 100c, ..., terminal device 100n. As shown in Figure 1, terminal device 100a, terminal device 100b, terminal device 100c, ..., terminal device 100n can be respectively connected to the above-mentioned business server 1000 through a network, so that each terminal device can exchange data with the business server 1000 through the network connection. Among them, the network connection here does not limit the connection method, and can be directly or indirectly connected through a wired communication method, or directly or indirectly connected through a wireless communication method, or through other methods, and this application does not make any restrictions here.

[0036] Each terminal device shown in FIG1 can have an application integrated and installed. When the application is running on each terminal device, the backend server corresponding to each terminal device can store the business data in the application and exchange data with the business server 1000 shown in FIG1 . The application can include an application with data information functions such as displaying text, images, audio, and video. For example, the application can be a multimedia application (such as a video application) that can be used by users to upload pictures or videos, or for users to play and view pictures or videos uploaded by others; the application can also be an entertainment application (such as a game application) that can be used by users to play games. The application can also be other applications with data information processing functions, such as browser applications, social applications, image beautification applications, etc., and examples of applications will not be given here. The application integrated and installed on the terminal device can also be a mini-program, that is, an independent program that can be run by simply downloading it into a browser environment. Of course, the application integrated and installed on the terminal device can be a standalone application or a sub-application embedded in an application (such as a mini-program), which can be controlled to run or closed by the user. In short, the application integrated and installed on the terminal device can be any form of application, module, or plug-in, and there is no limitation on this.

[0037] In the embodiment of the present application, a terminal device can be selected from multiple terminal devices as a target terminal device. The terminal device may include: a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart TV, a smart speaker, a desktop computer, a smart watch, a smart car terminal, a smart voice interaction device, a smart home appliance, an aircraft, and the like, which are smart terminals with data processing functions (such as image data processing functions), but are not limited thereto. For example, in the embodiment of the present application, the terminal device 100a shown in Figure 1 can be used as the target terminal device. The target terminal device can be integrated with the above-mentioned target application. In this case, the target terminal device can exchange data with the business server 1000.

[0038] For example, when a user is using an application (such as an image beautification application) in a terminal device, the business server 1000 can detect and collect through the terminal device that the user has uploaded an image containing an object to be identified (such as a user or other object such as an animal) (the image can be used as an unprocessed original image). The business server 1000 can perform image sharpening processing on the original image to enhance the image quality of the original image (such as enhancing the clarity of the original image). After performing image sharpening processing on the original image to obtain a sharpened and enhanced image, the business server 1000 can also identify the area to which the object to be identified belongs in the sharpened and enhanced image, and extract the area from the original image to obtain an image that only contains the object to be identified and does not contain the background (which can be called a target area image). Subsequently, the business server 1000 can perform subsequent processing on the target area image that only contains the object to be identified (such as adding special effects processing or beautification processing, etc.) to obtain a target area image with special effects or beautification effects (such as makeup effects, etc.); subsequently, the business server 1000 can put the target area image with special effects or beautification effects back into the area to which the object to be identified belongs in the original image, thereby obtaining a processed image with higher image quality and special effects or beautification effects. Subsequently, the business server 1000 can return the processed image to the terminal device, and the user can view the processed image (view the object to be identified with higher image quality and special effects or beautification effects) on the display page of the terminal device.

[0039] Of course, after the business server 1000 performs sharpening and enhancement processing on the original image to obtain a sharpened and enhanced image, the business server 1000 may also not perform special effects processing or beautification processing, but return the sharpened and enhanced image to the terminal device, and the user can then view the sharpened and enhanced image (view an image with higher image quality) on the display page of the terminal device.

[0040] Among them, the specific process of the business server 1000 sharpening and enhancing the original image to obtain a sharpened and enhanced image may include: the business server 1000 may obtain a filter size set for filtering processing (the filter size set may include different filter sizes, such as N filter sizes, where N is a positive integer greater than 1); based on each filter size, the business server 1000 may perform low-pass filtering on the original image respectively, thereby obtaining different filtered images; then, the business server 1000 may perform image conversion on N filtered images according to the original image respectively, thereby obtaining N high-frequency images; then, the business server 1000 may fuse the N high-frequency images to obtain a fused image, and then fuse the fused image with the original image to obtain a sharpened and enhanced image corresponding to the original image. Among them, for the specific implementation method of the business server 1000 sharpening and enhancing the original image to obtain a sharpened and enhanced image (such as it may include performing low-pass filtering on the original image based on the filter size to obtain different filtered images; performing image conversion on a certain filtered image to obtain a high-frequency image; performing image fusion on the high-frequency image to obtain a fused image; and obtaining a sharpened and enhanced image based on the fused image and the original image), please refer to the description in the embodiment corresponding to the subsequent Figure 3.

[0041] It should be understood that in image processing, sharpening is very important. Sharpening can improve the clarity of an image, and in sharpening, filtering is also critical. In order to further improve the image quality (such as clarity) after sharpening, the present application can configure different filter sizes for the filtering of the image. These different filter sizes can form a filter size set. When filtering an original image, the filter size set can be obtained, and then filtered using the filter size set. The sharpened and enhanced image obtained after filtering with different filter sizes can process the details in the image at different scales, which can greatly improve the image quality of the sharpened and enhanced image.

[0042] In the above process, the specific method for the service server 1000 to identify the region of an image (e.g., a sharpened and enhanced image) to which the object to be identified belongs can be processed using an image model (e.g., an image recognition model). To improve the accuracy of image recognition, the image model can be trained to optimize the trained and adjusted image model. Based on the trained image model, image recognition processing can be performed on the image (e.g., identifying the region of the image to which the object to be identified belongs).

[0043] It is understood that the methods provided in the embodiments of the present application can be executed by computer devices, including but not limited to terminal devices or business servers. The business server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.

[0044] The terminal device and the service server may be connected directly or indirectly via wired or wireless communication, which is not limited in this application.

[0045] It is understood that the aforementioned computer device (such as the aforementioned service server 1000, terminal device 100a, terminal device 100b, etc.) can be a node in a distributed system, wherein the distributed system can be a blockchain system, and the blockchain system can be a distributed system formed by connecting multiple nodes through network communication. The nodes can form a peer-to-peer (P2P) network, and the P2P protocol is an application layer protocol that runs on top of the Transmission Control Protocol (TCP). In a distributed system, any form of computer device, such as a service server, terminal device, or other electronic device, can become a node in the blockchain system by joining the peer-to-peer network. To facilitate understanding, the concept of blockchain will be explained below: Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm. It is mainly used to organize data in chronological order and encrypt it into a ledger to make it tamper-proof and forgery-proof. It can also verify, store, and update data. When the computer device is a blockchain node, due to the tamper-proof and anti-counterfeiting characteristics of the blockchain, the data in this application (such as uploaded image data such as the target image, sharpened images, etc.) can be authentic and secure, so that the results obtained after relevant data processing based on these data can be more reliable.

[0046] It should be noted that in the specific implementation of this application, user information, user data (such as uploaded images, videos, etc.) and other related data must be obtained with the user's authorization. In other words, when the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0047] The embodiments of the present application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, assisted driving, etc. For ease of understanding, please refer to Figure 2, which is a schematic diagram of a scenario for sharpening an image provided by an embodiment of the present application. Among them, the business server 200 shown in Figure 2 can be the business server 1000 shown in Figure 1 above, and the terminal device 100a shown in Figure 2 can be any terminal device selected from the terminal device cluster of the embodiment corresponding to Figure 1 above, for example, the terminal device can be the above-mentioned terminal device 100b; the terminal device 100b shown in Figure 2 can be any terminal device selected from the terminal device cluster of the embodiment corresponding to Figure 1 above, for example, the terminal device can be the above-mentioned terminal device 100a.

[0048] As shown in Figure 2, user A can run an application (such as a short video application) on terminal device 100a. User A uploads an image 20a to the short video application. Image 20a includes an object to be identified (e.g., object B). Image 20a can serve as the original image. Service server 200 can receive original image 20a via the backend server of terminal device 100a. Service server 200 can then perform low-pass filtering on original image 20a based on different filter sizes (e.g., filter size 1, filter size 2, ..., filter size n, where n can be a positive integer greater than 1). This can produce filtered image 1 corresponding to filter size 1, filtered image 2 corresponding to filter size 2, ..., and filtered image n corresponding to filter size n. The filter size here can be a size used for low-pass filtering. The filter size can be a pre-set size and can include various sizes, such as 5×5, 9×9, 17×17, and so on. Examples will not be given here. It should be understood that low-pass filtering is to suppress high-frequency information in a video or image through means such as mean filtering, making the video or image appear more blurred. In fact, the image obtained after low-pass filtering is a blurred image (i.e., a low-frequency image), and each filtered image (including filtered image, filtered image 2, ..., filtered image n) can also be called a low-frequency image.

[0049] Afterwards, the service server 200 can determine the high-frequency information (also referred to as high-frequency images) at different filter sizes based on the original image and each filtered image. As shown in FIG2 , high-frequency image 1 corresponding to filtered image 1 can be determined based on original image 20a and filtered image 1; high-frequency image 2 corresponding to filtered image 2 can be determined based on original image 20a and filtered image 2; and high-frequency image n corresponding to filtered image n can be determined based on original image 20a and filtered image n. Subsequently, by fusing the high-frequency images at different filter sizes, a fused image containing the high-frequency information at each filter size can be obtained. Fusing this fused image with the original image 20a, i.e., adding the high-frequency information at each filter size to the original image 20a, yields a sharpened image 20b corresponding to the original image 20a. It should be understood that, after the aforementioned sharpening and enhancement process, the sharpened image 20b can exhibit higher clarity (e.g., clearer lines and more distinct boundaries).

[0050] The service server 200 can send the sharpened image 20b with a higher definition to the terminal device 100b. Then, when user C uses the application on the terminal device 100b and browses the image uploaded by user A, he or she will see the sharpened image 20b with a higher definition instead of the distorted image. Similarly, the service server 200 can also return the sharpened image 20b with a higher definition to the terminal device 100a, and user A can view the sharpened image 20b with a higher definition on the display interface of the terminal device 100a.

[0051] It is understandable that after the original image 20a is sharpened and enhanced to obtain the sharpened and enhanced image 20b, the sharpened and enhanced image 20b can also be subjected to subsequent image processing (such as adding special effects processing), thereby making the image finally presented to the display interface of the terminal device (such as the display interface of the above-mentioned terminal device 100a or the display interface of the terminal device 100b) more interesting. For ease of understanding, please refer to Figure 3, which is a schematic diagram of an image processing scenario provided by an embodiment of the present application. As shown in Figure 3, the business server 200 can input the sharpened and enhanced image 20b into an image model (such as an image recognition model), and the image recognition model can identify the area where the object B is located in the sharpened and enhanced image 20b. As shown in Figure 3, the image recognition model recognizes that the area where object B is located in the sharpened and enhanced image 20b is area P (that is, the area contained by the boundary of object B). The image recognition model can extract the area P containing object B. Subsequently, the business server 200 can no longer consider other areas in the image 20a except area P, and only perform special effects processing on object B in area P.

[0052] As shown in FIG3 , the business server 200 adds a “cat effect” to the object B in the area P. Further, the business server 200 can put the object B with the “cat effect” back into the area P in the sharpened and enhanced image 20b, thereby obtaining a sharpened and enhanced image 20c with the “cat effect”. The sharpened and enhanced image 20c with the “cat effect” is shown in FIG3 . Subsequently, the business server 200 can return the sharpened and enhanced image 20c with the “cat effect” to the terminal device 100a, and the user A can view the sharpened and enhanced image 20c with the “cat effect” on the display interface of the terminal device 100a.

[0053] It should be noted that any object in an image in this application can be used as an object to be recognized. For example, if the above image 20a also contains other objects besides object B (such as a store, an escalator, a basketball, etc.), these objects can also be used as objects to be recognized, and the image recognition model can also perform image recognition processing on other objects besides object B. The image recognition model in this application can be any model with image recognition capabilities, and this application does not limit it.

[0054] For ease of understanding, please refer to Figure 4, which is a flow chart of a data processing method provided in an embodiment of the present application. The method can be executed by a terminal device (for example, any terminal device in the terminal device cluster shown in Figure 1 above, such as terminal device 100a), or it can be jointly executed by a terminal device and a business server (such as the business server 1000 in the embodiment corresponding to Figure 1 above). For ease of understanding, this embodiment is described by taking the execution of the method by the above-mentioned terminal device as an example. As shown in Figure 4, the image processing method may at least include the following S101-S104:

[0055] S101 , obtaining a filter size set for performing filtering processing; the filter size set includes N filter sizes, where N is a positive integer greater than 1; and any two of the N filter sizes are different.

[0056] In the present application, the filter size may refer to the template size for performing pixel calculation processing on a certain pixel point on an image. It is understandable that an image may contain one or more pixels. In the filtering process, a template may be given for a certain pixel point (i.e., the template size may be artificially specified). The template includes adjacent pixels around it and its own pixel point, wherein the own pixel point is the center, and the adjacent pixels around it are one or more neighborhood pixels with the pixel point as the center. The pixel value of the pixel point itself can be determined based on the pixel values ​​of all the pixels in the template (i.e., a final pixel value determined based on the pixel values ​​of all the pixels in the template can be used to replace the original pixel value of the pixel point itself). For example, given a template size of 5×5, the template contains a total of 25 pixels. For a certain pixel point, it is necessary to select 24 adjacent pixels around it as its neighborhood pixels. The final pixel value of the pixel point can be jointly determined by the pixel values ​​of the 25 pixels in the template. For example, when the filtering process is a mean filtering process, the final pixel value of the pixel point can be the average of the pixel values ​​of the 25 pixels in the template; when the filtering process is a median filtering process, the pixel values ​​of the 25 pixels can be sorted in order of size (such as from large to small), and then the median value is obtained from the sorted pixel value sequence, and the median value can be used as the final pixel value of the pixel point. Of course, different types of filtering processes have different template applications. Here, only mean filtering and median filtering are used as examples for illustrative purposes.

[0057] For ease of understanding, please refer to Figure 5, which is a schematic diagram of pixel processing based on mean filtering provided by an embodiment of the present application. As shown in Figure 5, image 50a may be an original image. For the original image 50a, the original image contains 49 pixels (including pixel a1, pixel a2, pixel a3, ..., pixel g7). It is assumed here that the original image 50a will be subjected to mean filtering, and it is assumed that the given template size (i.e., filter size) is 3×3. As shown in Figure 5, taking pixel b2 as an example, based on the template size of 3×3 and with pixel b2 as the center, the neighboring pixel points around it can be determined as pixel a1, pixel a2, pixel a3, pixel b1, pixel b3, pixel c1, pixel c2, and pixel c3. Among them, when determining the neighboring pixel points of pixel point b2, a vertex of the original image 50a can be used as the coordinate origin, and the two image edges with the coordinate origin as the intersection can be used as a coordinate axis (which can be called the x-axis and the y-axis). In this way, a coordinate system with the vertex as the coordinate origin can be constructed. Then each pixel point on the original image 50a can correspond to a coordinate. Then, the neighboring pixel points of pixel point b2 can be determined based on the coordinates of pixel point b2. For example, taking the coordinates of pixel b2 as (2, 6) as an example, [-1, 1] can be added on the x-axis (that is, -1, 0, 1) and [-1, 1] can be added on the y-axis (that is, -1, 0, 1). That is, (-1, -1), (-1, 0), (-1, 1), (0, -1), (0, 1), (1, -1), (1, 0) and (1, 1) can be added to the coordinates (2, 6). The coordinates of the neighboring pixel points are (1, 5), (1, 6), (1, 7), (2, 5), (2, 7), (3, 5), (3, 6) and (3, 7). The neighboring pixel points including the pixel point a1 and other pixel points mentioned above can be obtained through coordinate correspondence.

[0058] Then, the pixel values ​​of all the pixels contained in the template can be obtained, that is, the pixel values ​​corresponding to pixel a1, pixel a2, pixel a3, pixel b1, pixel b2, pixel b3, pixel c1, pixel c2 and pixel c3 respectively. Taking the pixel values ​​corresponding to pixel a1, pixel a2, pixel a3, pixel b1, pixel b2, pixel b3, pixel c1, pixel c2 and pixel c3 as 11, 8, 11, 10, 9, 12, 10, 10, 9 respectively, it can be determined that the average value corresponding to these pixel values ​​is 10 (that is, after adding 11, 8, 11, 10, 9, 12, 10, 10, 9, the sum obtained is 90, and the number of all pixels contained in the template is 9, then the average value is 10), then the average value 10 can be used as the final pixel value of pixel b2. That is, through the mean filtering process, the final pixel value corresponding to each pixel point in the original image 50a can be obtained.

[0059] It should be understood that sharpening is very important in image processing. Sharpening can improve the clarity of an image, and filtering is also crucial in sharpening. In order to improve the quality (e.g., clarity) of the image after sharpening, the present application can configure different filter sizes for the filtering of the image. These different filter sizes can form a filter size set. When filtering an original image, the filter size set can be obtained and then filtered using the filter size set.

[0060] S102 , performing low-pass filtering on the original image based on each filter size to obtain N filtered images.

[0061] In this application, it can be seen from the above that each filter size can be used to filter the original image. The filtering process in this application can refer to low-pass filtering (such as mean filtering, median filtering, etc.). The low-pass filtering process of the original image based on each filter size is similar. For the sake of convenience, each filter size in the N filter sizes can be used as the filter size S. i , filter size S in N filter images i The corresponding filtered image is used as the filtered image T i (i is a positive integer), the original image is subjected to low-pass filtering based on a certain filter size, and a specific implementation method for obtaining a filtered image corresponding to the filter size can be as follows: an image pixel set corresponding to the original image is obtained, and a pixel coordinate set corresponding to the image pixel set is obtained; then, the image pixel to be processed can be obtained from the image pixel set, and the pixel coordinates to be processed corresponding to the image pixel to be processed can be obtained from the pixel coordinate set; the filter size S is obtained. iThe indicated coordinate change is obtained, and according to the coordinates of the pixel to be processed and the coordinate change, the neighboring pixel coordinates of the pixel to be processed are determined in the pixel coordinate set; according to the coordinates of the pixel to be processed and the neighboring pixel coordinates, the filter size S can be determined. i The corresponding filtered image Ti.

[0062] It can be understood that the original image may contain one or more pixels (also called image pixels), and each pixel (each image pixel) may correspond to a coordinate, wherein the coordinate here may refer to the coordinate in the coordinate system established based on the original image. For example, a certain image vertex of the original image may be used as the coordinate origin, and the two image edges with the coordinate origin as the intersection may be used as a coordinate axis (which may be called the x-axis and the y-axis). In this way, a coordinate system with the image vertex as the coordinate origin can be constructed, and then each pixel may correspond to a coordinate in the coordinate system. The coordinates corresponding to each pixel may be called pixel coordinates, and then each image pixel (pixel point) may form an image pixel set (pixel point set), and the pixel coordinates corresponding to each image pixel may form a pixel coordinate set. When filtering the original image, the image pixel set of the original image and the pixel coordinate set corresponding to the image pixel set may be obtained.

[0063] As can be seen from the embodiment corresponding to FIG. 5 , in a low-pass filtering process (such as a mean filtering process), the neighboring image pixels of a certain image pixel (such as a pixel to be processed) can be determined based on a filter size (such as a 3×3 size). The specific method of determining the neighboring image pixels based on the filter size can be determined by pixel coordinates. A filter size can correspond to a coordinate change. For example, a 3×3 size can correspond to a coordinate change of [-1, 1] (i.e., an increase of -1, 0, or 1 on both the x-axis and the y-axis); or a 3×3 size can correspond to a coordinate change of [-2, 2] (i.e., an increase of -2, -1, 0, 1, or 2 on both the x-axis and the y-axis). After obtaining the coordinates of the pixel to be processed corresponding to the pixel to be processed, the coordinates of the neighboring pixels can be calculated based on the coordinate change, and the neighboring image pixels of the pixel to be processed can be determined based on the neighboring pixel coordinates. The area formed by the neighborhood image pixels and the image pixels to be processed is the area covered by the filter size, and the area takes the image pixels to be processed as the center position.

[0064] Then, based on the pixel coordinates to be processed and the pixel coordinates of the neighborhood, the filter image corresponding to the filter size can be determined. Here, the low-pass filtering process is taken as an example of mean filtering process, and the filter size S is determined according to the pixel coordinates to be processed and the pixel coordinates of the neighborhood. i The corresponding filtered image T iThe specific implementation method of can be as follows: obtaining the neighborhood image pixels corresponding to the neighborhood pixel coordinates in the image pixel set; obtaining the neighborhood pixel values ​​of the neighborhood image pixels and obtaining the pixel values ​​of the image pixels to be processed; then, adding the neighborhood pixel values ​​to the pixel values ​​of the image pixels to be processed to obtain pixel operation values; determining the ratio between the pixel operation value and the total number of pixels as the update pixel value corresponding to the image pixel to be processed; wherein the total number of pixels is the sum of the number of neighborhood image pixels and the number of image pixels to be processed; when the update pixel value corresponding to each image pixel in the image pixel set is determined, the image containing the update pixel value corresponding to each image pixel can be determined as the filter size S i The corresponding filtered image T i .

[0065] That is to say, the embodiment of the present application can add the pixel values ​​(including the pixel values ​​of the image pixels to be processed and the neighboring pixel values) of each pixel (including the image pixels to be processed and the neighboring pixel values) covered by the filter size, and then calculate the average of the obtained pixel operation values ​​(that is, determine the ratio between the pixel operation value and the total number of pixels), and the average value can be used as the updated pixel value of the image pixel to be processed (that is, replace the original pixel value of the image pixel to be processed with the average value, that is, replace the pixel value of the image pixel to be processed). For a specific exemplary scenario description, please refer to the scenario example description in the embodiment corresponding to Figure 5 above. It should be understood that for each image pixel in the original image, the updated pixel value of each image pixel can be determined in the same way as determining the updated pixel value of the image pixel to be processed. Then, when the updated pixel value of each image pixel is determined, it can be considered that the process of low-pass filtering of the original image based on the filter size is completed. At this time, the image containing each updated pixel value can be determined as the filter size (such as the filter size S i ) corresponds to the filtered image (filtered image T i ).

[0066] The above is based on the filter size S only. i For example, it is described that low-pass filtering of the original image is performed based on a certain filter size. For each of the N filter sizes, the same processing method can be used to perform low-pass filtering (such as mean filtering) on ​​the original image, thereby obtaining filtered images corresponding to different filter sizes, that is, obtaining N filtered images.

[0067] For ease of understanding, please refer to formula (1), formula (2) and formula (3). Formula (1), formula (2) and formula (3) are specific implementation methods of performing mean filtering on the original image using N filter sizes including filter sizes of 5×5, 9×9 and 17×17 as examples.

[0068] Among them, in formula (1) It can represent the low-frequency pixel value of a certain pixel in the original image obtained after the original image is processed by the mean filter based on the filter size 5×5 (it can also be understood as the updated pixel value after the filtering process); Δx and Δy can be used to represent the coordinate change on the x-axis and the coordinate change on the y-axis respectively; x and y can be used to represent the pixel coordinates (such as the pixel to be processed) corresponding to a certain pixel point on the original image (such as the pixel of the image to be processed), that is, the pixel coordinates to be processed are (I x,y Specifically, for each pixel point (image pixel) with coordinate position (x, y) in the original image, when performing mean filtering on it, the neighboring image pixels around it can be determined based on the filter size (template size 5×5), and then the average value of the pixel value itself and the pixel values ​​of the neighboring image pixels can be calculated. This average value can be used as the pixel value of the image pixel in the filtered image corresponding to the filter size 5×5.

[0069] Among them, in formula (2) It can represent the low-frequency pixel value of a certain pixel in the original image obtained after the original image is processed by the mean filter based on the filter size 9×9 (it can also be understood as the updated pixel value after the filtering process); Δx and Δy can be used to represent the coordinate change on the x-axis and the coordinate change on the y-axis respectively; x and y can be used to represent the pixel coordinates (such as the pixel to be processed) corresponding to a certain pixel point on the original image (such as the pixel of the image to be processed), that is, the pixel coordinates to be processed are (I x,y Specifically, for each pixel point (image pixel) with coordinate position (x, y) in the original image, when performing mean filtering on it, the neighboring image pixels around it can be determined based on the filter size (template size 9×9), and then the average value of the pixel value itself and the pixel values ​​of the neighboring image pixels can be calculated. This average value can be used as the pixel value of the image pixel in the filtered image corresponding to the filter size 9×9.

[0070] Among them, in formula (3) It can represent the low-frequency pixel value of a certain pixel in the original image after the original image is processed by the mean filter based on the filter size of 17×17 (it can also be understood as the updated pixel value after the filtering process); Δx and Δy can be used to represent the coordinate change on the x-axis and the coordinate change on the y-axis respectively; x and y can be used to represent the pixel coordinates (such as the pixel to be processed) corresponding to a certain pixel point on the original image (such as the pixel of the image to be processed), that is, the pixel coordinates to be processed are (I x,ySpecifically, for each pixel point (image pixel) with coordinate position (x, y) in the original image, when performing mean filtering on it, the neighboring image pixels around it can be determined based on the filter size (template size 17×17), and then the average value of the pixel value itself and the pixel values ​​of the neighboring image pixels can be calculated. This average value can be used as the pixel value of the image pixel in the filtered image corresponding to the filter size 17×17.

[0071] It should be understood that, through the above formula (1), a filtered image corresponding to the original image at a low filter size can be obtained; through the above formula (2), a filtered image corresponding to the original image at a medium filter size can be obtained; and through the above formula (3), a filtered image corresponding to the original image at a high filter size can be obtained.

[0072] S103 , performing image conversion on the N filtered images according to the original image to obtain N high-frequency images.

[0073] In the present application, it can be known from the above that the original image can be low-pass filtered based on each filter size. Specifically, what is obtained after the low-pass filtering is low-frequency information (that is, each filtered image can be understood as a low-frequency image). After obtaining the low-frequency information, high-frequency information can be extracted based on the original image and the low-frequency information (the high-frequency information can be understood as a high-frequency image). In one possible implementation method, the high-frequency information can be extracted by subtracting the original image from the low-frequency information and using the result as the high-frequency information. Each of the N filter sizes is used as the filter size S. i , set the filter size S i The corresponding filtered image is used as the filtered image T i , the filtered image T i The corresponding high-frequency image is used as the high-frequency image Z i (i is a positive integer), for the filtered image T according to the original image i Perform image conversion to obtain high-frequency image Z i The specific implementation method of can be: obtain the image pixel set corresponding to the original image, and obtain the pixel coordinate set corresponding to the image pixel set; then, obtain the filtered image T i The corresponding filtered image pixel set and the filtered pixel coordinate set corresponding to the filtered image pixel set are obtained; next, the filtered image T can be determined according to the pixel coordinate set and the filtered pixel coordinate set. i The corresponding high-frequency image Z i .

[0074] It can be understood that, from the above, the filtered image can be obtained by updating the pixel value of each pixel point of the original image. In fact, the coordinates of the pixel points of the filtered image have not changed compared with the original image, but the pixel value of each pixel point may change. Then the filtered image pixel set of the filtered image here can be the same pixel set as the image pixel set of the original image, and the filtered pixel coordinate set corresponding to the filtered image pixel set can also be the same pixel set as the pixel coordinate set corresponding to the image pixel set. In other words, each filtered pixel coordinate in the filtered pixel coordinate set will correspond to a pixel coordinate in a pixel coordinate set (the two are the same coordinates). Based on the pixel coordinate set and the filtered pixel coordinate set, the high-frequency image corresponding to a certain filtered image can be determined.

[0075] Take the filtered image T i For example, according to the pixel coordinate set and the filtered pixel coordinate set, the filtered image T is determined. i The corresponding high-frequency image Z i The specific implementation method can be as follows: obtaining the coordinates of the to-be-processed filtered pixel in the filtered pixel coordinate set, and determining the pixel coordinates in the pixel coordinate set that have a mapping relationship with the to-be-processed filtered pixel coordinates as the mapped pixel coordinates; then, obtaining the mapped image pixel corresponding to the mapped pixel coordinates in the image pixel set, and obtaining the to-be-processed filtered pixel corresponding to the to-be-processed filtered pixel coordinates in the filtered image pixel set; obtaining the mapped pixel value corresponding to the mapped image pixel, and obtaining the filtered pixel value corresponding to the to-be-processed filtered pixel; determining the difference pixel value between the mapped pixel value and the filtered pixel value as the high-frequency pixel value corresponding to the to-be-processed filtered pixel; when the high-frequency pixel value corresponding to each filtered image pixel in the filtered image pixel set is determined, the image containing the high-frequency pixel value corresponding to each filtered image pixel can be determined as the filtered image T. i The corresponding high-frequency image Z i .

[0076] It can be understood that the pixel coordinates that have a mapping relationship with the coordinates of the filtered pixel to be processed can actually be understood as the pixel coordinates in the pixel coordinate set that have the same coordinates as the coordinates of the filtered pixel to be processed. From the above, it can be seen that the pixel coordinate set and the filtered pixel coordinate set are actually the same coordinate set. Each pixel coordinate in the pixel coordinate set has the same coordinates in the filtered pixel coordinate set. These two identical coordinates can be considered to have a mapping relationship, which are actually the coordinates of the same pixel point. The mapped pixel value corresponding to the mapped image pixel can be understood as the original pixel value in the original image that has not been filtered (such as the target pixel value corresponding to the above-mentioned image pixel to be processed), and the filtered pixel value corresponding to the filtered image pixel can be understood as the pixel value after filtering the original image (such as when the filtered image pixel is the above-mentioned image pixel to be processed, the filtered pixel value can refer to the updated pixel value corresponding to the image pixel to be processed).

[0077] It should be understood that for each pixel (e.g., a filtered pixel to be processed or a mapped image pixel), the updated pixel value (i.e., the filtered pixel value) can be subtracted from the original pixel value (e.g., the mapped pixel value). The resulting difference can be used as the high-frequency information corresponding to the pixel (i.e., the high-frequency pixel value). Once the high-frequency pixel value corresponding to each pixel is determined, a high-frequency image containing each high-frequency pixel value can be obtained.

[0078] For ease of understanding, please refer to formula (4), formula (5) and formula (6). Formula (4), formula (5) and formula (6) are specific implementation methods for extracting high-frequency information using N filter sizes including filter sizes of 5×5, 9×9 and 17×17 as examples.

[0079] Where, as shown in formula (4), I x,y It can be used to represent the pixel I at position (x, y) in the original image. x,y The corresponding original pixel value; It can be used to characterize the pixel I determined based on the above formula (1) x,y The corresponding filtered pixel value; This can represent the pixel I x,y The corresponding high-frequency pixel value. Specifically, for each pixel point (image pixel) with a coordinate position of (x, y) in the original image, or for each pixel point (filtered image pixel) with a coordinate position of (x, y) in the filtered image, when extracting high-frequency information, the original pixel value and its filtered pixel value can be subtracted to obtain the high-frequency pixel value of the pixel point. When the high-frequency pixel value corresponding to each pixel point is obtained, a high-frequency image containing each high-frequency pixel value can be obtained. The high-frequency image shown in formula (4) can correspond to a filter size of 5×5.

[0080] Where, as shown in formula (5), I x,y It can be used to represent the pixel I at position (x, y) in the original image. x,y The corresponding original pixel value; It can be used to characterize the pixel I determined based on the above formula (2) x,y The corresponding filtered pixel value; This can represent the pixel I x,y The corresponding high-frequency pixel value. Specifically, for each pixel point (image pixel) with a coordinate position of (x, y) in the original image, or for each pixel point (filtered image pixel) with a coordinate position of (x, y) in the filtered image, when extracting high-frequency information, the original pixel value and its filtered pixel value can be subtracted to obtain the high-frequency pixel value of the pixel point. When the high-frequency pixel value corresponding to each pixel point is obtained, a high-frequency image containing each high-frequency pixel value can be obtained. The high-frequency image shown in formula (5) can correspond to a filter size of 9×9.

[0081] Where, as shown in formula (6), I x,y It can be used to represent the pixel I at position (x, y) in the original image. x,y The corresponding original pixel value; It can be used to characterize the pixel I determined based on the above formula (3) x,y The corresponding filtered pixel value; This can represent the pixel I x,y The corresponding high-frequency pixel value. Specifically, for each pixel point (image pixel) with a coordinate position of (x, y) in the original image, or for each pixel point (filtered image pixel) with a coordinate position of (x, y) in the filtered image, when extracting high-frequency information, the original pixel value and its filtered pixel value can be subtracted to obtain the high-frequency pixel value of the pixel point. When the high-frequency pixel value corresponding to each pixel point is obtained, a high-frequency image containing each high-frequency pixel value can be obtained. The high-frequency image shown in formula (6) can correspond to a filter size of 17×17.

[0082] It should be understood that the high-frequency information obtained through small-scale low-pass filtering (such as mean filtering with a small filter size) is relatively weak, while the high-frequency information obtained through large-scale low-pass filtering (such as mean filtering with a large filter size) is relatively strong. For sharp textures in the original image (image information with complex content, dramatic changes, and complex textures, such as the textures of grass and trees), small-scale low-pass filtering can extract the corresponding high-frequency information, while using large-scale low-pass filtering is likely to lead to over-enhancement of sharp textures. For smooth textures in the original image (image information with simple content and gentle changes, such as the texture of the sky), large-scale low-pass filtering is required to extract the corresponding high-frequency information. Therefore, by low-pass filtering the original image with different filter sizes from small to large, different types of high-frequency information in the original image can be accurately and specifically obtained through low-pass filtering at different scales. This can greatly improve the accuracy and comprehensiveness of the extracted high-frequency information, and further improve the targeted sharpening when performing image sharpening and enhancement based on this high-frequency information, thereby improving the quality of the image after sharpening and enhancement.

[0083] S104 , fusing the N high-frequency images to obtain a fused image, and fusing the fused image with the original image to obtain a sharpened and enhanced image corresponding to the original image.

[0084] In the present application, the N high-frequency images extracted under different filter sizes can be fused. There are many ways to fuse images. In one possible implementation, the present application mainly adopts geometric mean image fusion. Taking the N filter sizes including the first filter size and the second filter size, the N filter images including the first filter image corresponding to the first filter size and the second filter image corresponding to the second filter size, and the N high-frequency images including the first high-frequency image corresponding to the first filter image and the second high-frequency image corresponding to the second filter image as an example, the specific implementation method for fusing the first high-frequency image with the second high-frequency image to obtain a fused image can be as follows: a first fusion weight corresponding to the first filter size and a second fusion weight corresponding to the second filter size can be obtained; then, a high-frequency image fusion function can be obtained, and according to the first fusion weight, the second fusion weight and the high-frequency image fusion function, the first high-frequency image and the second high-frequency image can be fused to obtain a fused image.

[0085] Among them, for performing image fusion of the first high-frequency image and the second high-frequency image according to the first fusion weight, the second fusion weight and the high-frequency image fusion function to obtain a fused image, a specific implementation method can be as follows: the first fusion weight and the second fusion weight can be added according to the high-frequency image fusion function to obtain an operation weight; a first ratio between the first fusion weight and the operation weight can be determined, and an exponential power operation can be performed on the first high-frequency image based on the first ratio to obtain a first operation feature; a second ratio between the second fusion weight and the operation weight can be determined, and an exponential power operation can be performed on the second high-frequency image based on the second ratio to obtain a second operation feature; according to the high-frequency image fusion function, the first operation feature and the second operation feature can be geometrically fused to obtain a fused image.

[0086] For ease of understanding, taking filter sizes of 5×5, 9×9, and 17×17 as examples, the high-frequency image may include the high-frequency images corresponding to the filter sizes of 5×5, 9×9, and 17×17, respectively. Please also refer to formula (7), which is a specific implementation method for fusing N high-frequency images based on the geometric mean fusion method to obtain a fused image:

[0087] Among them, formula (7) can be used to characterize the high-frequency image fusion function; α can be used to characterize the weight parameter corresponding to the filter size of 5×5 (when the filter size is the first filter size, the weight parameter can be called the first fusion weight); β can be used to characterize the weight parameter corresponding to the filter size of 9×9 (when it is the second filter size, the weight parameter can be called the second fusion weight); γ can be used to characterize the weight parameter corresponding to the filter size of 17×17 (when it is the second filter size, the weight parameter can be called the second fusion weight). In this application, α, β, and γ can be taken as 0.3, 0.4, and 0.3, respectively. Of course, the values ​​of the parameters are not limited to this. This is just an example to illustrate a set of reasonable parameter values, and this application does not limit them. It can be used to represent the high-frequency pixel value of a pixel at a certain position (x, y) in the high-frequency image corresponding to the filter size 5×5. When the corresponding high-frequency image is the first high-frequency image, and α is used to represent the first fusion weight, That is, it can be used to characterize the first ratio; It can be used to represent the high-frequency pixel value of a pixel at a certain position (x, y) in the high-frequency image corresponding to the filter size 9×9. When the corresponding high-frequency image is the second high-frequency image, and β is used to represent the second fusion weight, That is, it can be used to characterize the second ratio; It can be used to represent the high-frequency pixel value of a pixel at a certain position (x, y) in the high-frequency image corresponding to the filter size 17×17. When the corresponding high-frequency image is the second high-frequency image, and γ is used to represent the second fusion weight, That is, it can be used to characterize the second ratio. It can be used to represent the fused pixel value of the pixel at position (x, y) obtained after fusing the high-frequency pixel values ​​in each high-frequency image. When the fused pixel value of the pixel at each position is determined, a fused image containing each fused pixel value (that is, the fused high-frequency information) can be obtained. In other words, the geometric fusion in this application can refer to performing an operation (such as a multiplication operation) on the first operation feature and the first operation feature as shown in formula (7), and the result obtained after the operation is the fusion result obtained after geometric fusion.

[0088] After obtaining the fused image, the fused high-frequency information can be added to the original image, that is, the fused image and the original image are fused, thereby enhancing the high-frequency information in the original image and obtaining a sharpened and enhanced image corresponding to the original image. The specific implementation method of fusing the fused image with the original image can be shown as formula (8):

[0089] Among them, I x,y It can be used to represent the original pixel value of the pixel point with the position coordinate (x, y) in the original image; It can be used to represent the fused pixel value of the pixel point with the position coordinate (x, y); I′ x,y It can be used to characterize the sharpened enhanced pixel value (also referred to as the sharpened pixel value) that is integrated with the high-frequency pixel value. When the sharpened pixel value of the pixel point at each position is determined, a sharpened image containing each sharpened pixel value can be obtained. That is to say, when a remapped pixel is obtained, the original image pixel (or image pixel) having a mapping relationship with the remapped pixel can be obtained in the original image, wherein having a mapping relationship can refer to a relationship with the same pixel coordinates, and then the pixel values ​​of the two pixels are added together to obtain the sharpened pixel value of the pixel at the coordinate. That is: the remapped pixel value at the same position coordinate is added to the original image pixel value (or image pixel value) to obtain the sharpened pixel value of the pixel at the position coordinate. When the sharpened pixel value at each position coordinate is obtained, a sharpened enhanced image containing each sharpened pixel value can be obtained.

[0090] In an embodiment of the present application, for a certain original image, low-pass filtering of different scales can be used to extract high-frequency information of different types of textures (that is, the original image is low-pass filtered based on different filter sizes to obtain different filtered images, and then high-frequency images corresponding to the different filtered images are obtained based on the original image and each filtered image), and after fusing the high-frequency information, the fused high-frequency information (that is, the fused image) can be obtained, and after fusing the fused image with the original image, a sharpened and enhanced image can be obtained. The sharpened and enhanced image is obtained by reasonably enhancing both the smooth texture and the sharp texture in the original image at different scales, so the sharpened and enhanced image has a higher image quality. In summary, the present application can improve the quality of the sharpened image in the image sharpening business.

[0091] From the above, it can be seen that after the N high-frequency images are fused, a fused image can be obtained (the fused pixel value corresponding to each pixel point is obtained), and then the fused image can be fused with the original image (that is, for each pixel point, the fused pixel value is added to the original pixel value) to obtain a sharpened and enhanced image. In a feasible embodiment, in order to further improve the accuracy and rationality of the fused high-frequency information (that is, the fused pixel value), it can be linearly remapped and truncated to obtain the processed fused pixel value, and then the remaining original pixel values ​​are fused. For ease of understanding, please refer to Figure 6, which is a flow chart of a method for fusing an original image and a fused image to obtain a sharpened and enhanced image provided in an embodiment of the present application. This process may also correspond to the process of fusing the fused image with the original image to obtain a sharpened and enhanced image corresponding to the original image in the embodiment corresponding to Figure 4 above. As shown in Figure 6, the process may at least include the following S201-S202:

[0092] S201 , performing remapping processing on the fused image to obtain a remapped fused image.

[0093] The remapped fused image may refer to an image containing remapped pixel values, and the remapped pixel values ​​may be determined by comparing the fused pixel values ​​corresponding to the fused image with a pixel value threshold according to a remapping function.

[0094] In reality, each pixel in the fused image is identical to each pixel in the original image, but the pixel value of each pixel may be different. For a pixel in the original image, its unprocessed pixel value can be referred to as the original pixel value, its pixel value in a filtered image can be referred to as the filtered pixel value, its pixel value in a high-frequency image can be referred to as the high-frequency pixel value, and its pixel value in the fused image can be referred to as the fused pixel value. Based on this, a possible implementation method for remapping the fused image to obtain a remapped fused image is as follows: obtaining the fused image pixels corresponding to the fused image, and obtaining the fused pixel values ​​corresponding to the fused image pixels; then, obtaining a remapping function, and determining the remapped pixel values ​​corresponding to the fused image pixels based on the remapping function and the fused pixel values; then, determining the image containing the remapped pixel values ​​as the remapped fused image.

[0095] Among them, a possible implementation method for determining the remapped pixel value corresponding to the fused image pixel based on the remapping function and the fused pixel value may be: according to the remapping function, the fused pixel value is compared with the pixel value threshold; if the fused pixel value is greater than or equal to the pixel value threshold, the preset pixel parameter can be determined as the remapped pixel value corresponding to the fused image pixel; if the fused pixel value is less than the pixel value threshold, the fused pixel value can be multiplied by the preset fusion coefficient to obtain the remapped pixel value corresponding to the fused image pixel.

[0096] From the above, it can be seen that the filtered pixel value corresponding to each pixel point is determined based on the original pixel value, the high-frequency pixel value is determined based on the filtered pixel value, and the fused pixel value is determined based on the high-frequency pixel value. Then the fused image pixel of the fused image here can be the same pixel as a certain image pixel in the image pixel set of the original image. After remapping and truncating the fused pixel value corresponding to each pixel point (which can be simply referred to as remapping processing), the remapped pixel value corresponding to each pixel point can be obtained. According to the remapped pixel value and the original pixel value of the pixel, the sharpened pixel value corresponding to the pixel can be determined. When the sharpened pixel value of each pixel point is determined, a sharpened enhanced image containing each sharpened pixel value can be obtained.

[0097] For ease of understanding, please refer to formula (9) as well. Formula (9) is a specific implementation method for performing remapping processing on the fused image to obtain the remapped fused image.

[0098] Among them, the function shown in formula (9) can be used to characterize the remapping function; It can be used to represent the fused pixel value of the pixel point with the position coordinate (x, y); It can be used to represent the remapped pixel value of the pixel point with the position coordinate (x, y); 0.25 can be used to represent the pixel value threshold, which can be an artificially specified value (here only 0.25 is used as an example. In fact, the pixel value threshold can be any other reasonable value, and this application does not limit it). 0.8 can be a preset fusion coefficient, which can be an artificially specified value (here only 0.8 is used as an example. In fact, the preset fusion coefficient can be any other reasonable value, and this application does not limit it). When the fused pixel value is lower than the pixel value threshold, the preset fusion coefficient can be multiplied by the fused pixel value, and the result can be used as the sharpened pixel value; when the fused pixel value is greater than or equal to the pixel value threshold, the preset pixel parameter 0.2 can be used as the sharpened pixel value. Among them, the preset pixel parameter can also be other reasonable values. 0.2 is only one of the reasonable values ​​and is described as an example. Through the above formula (9), the remapped pixel value corresponding to each pixel point can be obtained.

[0099] S202: Fusing the remapped fused image with the original image to obtain a sharpened and enhanced image.

[0100] A possible implementation method of fusing the remapped fused image with the original image to obtain a sharpened enhanced image may be: obtaining remapped pixels corresponding to the remapped fused image, and obtaining remapped pixel values ​​corresponding to the remapped pixels; then, obtaining image pixels corresponding to the original image, and obtaining image pixel values ​​corresponding to the image pixels; adding the remapped pixel values ​​to the image pixel values ​​to obtain sharpened pixel values; and determining the image containing the sharpened pixel values ​​as a sharpened enhanced image.

[0101] It is understood that after obtaining the remapped pixel values ​​corresponding to each pixel point, the remapped high-frequency information (i.e., the remapped pixel values) can be added to the original image, that is, the remapped fused image can be fused with the original image, thereby enhancing the high-frequency information in the original image and obtaining a sharpened and enhanced image corresponding to the original image. In other words, the remapped pixel value corresponding to each pixel point (i.e., image pixel) can be added to the original pixel value to obtain the sharpened pixel value corresponding to each image pixel, and thus a sharpened and enhanced image containing each sharpened pixel value can be obtained.

[0102] The specific implementation method for determining the sharpening enhanced image based on the remapped pixel value and the original pixel value can be shown as formula (10):

[0103] Among them, I x,y It can be used to represent the original pixel value of the pixel point with the position coordinate (x, y) in the original image; It can be used to represent the remapped pixel value of the pixel point with the position coordinate (x, y); I′ x,y It can be used to represent the sharpened enhanced pixel value (also called the sharpened pixel value) fused with the remapped pixel value. When the sharpened pixel value of each pixel point at each position is determined, a sharpened image containing each sharpened pixel value can be obtained.

[0104] In an embodiment of the present application, after the original image is low-pass filtered with different filter sizes, low-frequency images at different filter sizes (i.e., N filtered images) can be obtained. Then, the high-frequency information corresponding to each filtered image can be extracted by combining the original image itself with each filtered image (i.e., N high-frequency images are obtained). For multi-scale high-frequency images, the present application can perform fusion processing on them to obtain a fused image, and the processed fused image can be fused again with the original image, so that the high-frequency intensity of the original image can be enhanced from different scales (filter sizes) to obtain a sharpened and enhanced image. In addition, since the present application uses different filter sizes to perform low-pass filtering on the original image at the same time, the high-frequency information obtained is also high-frequency information under different filter sizes, and it can have strong adaptability to different types of image details (such as smooth textures and complex sharp textures) (for example, for complex sharp textures, low-pass filtering based on low filter size can extract the corresponding high-frequency information and achieve corresponding enhancement; for smooth textures, low-pass filtering based on high filter size can extract the corresponding high-frequency information and achieve corresponding enhancement), that is, it can achieve the enhancement of the detail information of the original image from different scales, thereby improving the sharpening quality of the image and improving the clarity of the image. In summary, the present application can improve the quality of the sharpened image in the image sharpening business.

[0105] Please refer to Figure 7, which is a schematic diagram of the structure of a data processing device provided in an embodiment of the present application. The data processing device can be a computer program (including program instructions) running on a computer device, for example, the data processing device is an application software; the data processing device can be used to execute the method shown in Figure 4. As shown in Figure 7, the data processing device 1 may include: a size acquisition module 11, a filtering module 12, an image conversion module 13, an image fusion module 14, and an image sharpening module 15.

[0106] The size acquisition module 11 is used to acquire a filter size set for performing filtering processing; the filter size set includes N filter sizes, where N is a positive integer greater than 1; any two filter sizes among the N filter sizes are different;

[0107] A filtering module 12 is configured to perform low-pass filtering on the original image based on each filter size to obtain N filtered images;

[0108] An image conversion module 13 is configured to perform image conversion on the N filtered images according to the original image to obtain N high-frequency images;

[0109] An image fusion module 14 is configured to fuse N high-frequency images to obtain a fused image;

[0110] The image sharpening module 15 is used to fuse the fused image with the original image to obtain a sharpened and enhanced image corresponding to the original image.

[0111] Among them, the specific implementation methods of the size acquisition module 11, the filtering module 12, the image conversion module 13, the image fusion module 14 and the image sharpening module 15 can be found in the description of S101-S104 in the embodiment corresponding to Figure 4 above, and will not be repeated here.

[0112] In one embodiment, each of the N filter sizes is used as the filter size S i , set the filter size S i The corresponding filtered image is used as the filtered image T i , i is a positive integer;

[0113] The filtering module 12 may include: a set acquiring unit 121 , a coordinate acquiring unit 122 , a neighborhood coordinate determining unit 123 , and a filtered image determining unit 124 .

[0114] A set acquisition unit 121 is used to acquire an image pixel set corresponding to the original image, and acquire a pixel coordinate set corresponding to the image pixel set;

[0115] A coordinate acquisition unit 122 is configured to acquire a to-be-processed image pixel from the image pixel set, and acquire a to-be-processed pixel coordinate corresponding to the to-be-processed image pixel from the pixel coordinate set;

[0116] Neighborhood coordinate determination unit 123, used to obtain filter size S i The indicated coordinate change amount, and according to the coordinates of the pixel to be processed and the coordinate change amount, determine the neighboring pixel coordinates for the pixel coordinate to be processed in the pixel coordinate set;

[0117] The filter image determination unit 124 is used to determine the filter size S according to the coordinates of the pixel to be processed and the coordinates of the neighboring pixels. i The corresponding filtered image T i .

[0118] Among them, the specific implementation methods of the set acquisition unit 121, the coordinate acquisition unit 122, the neighborhood coordinate determination unit 123 and the filtered image determination unit 124 can be found in the description of S102 in the embodiment corresponding to Figure 4 above, and will not be repeated here.

[0119] In one embodiment, the filtered image determination unit 124 may include: a pixel operation subunit 1241 and a pixel update subunit 1242 .

[0120] The pixel operation subunit 1241 is used to obtain the neighborhood image pixels corresponding to the neighborhood pixel coordinates in the image pixel set;

[0121] The pixel operation subunit 1241 is further configured to obtain the neighborhood pixel values ​​of the neighborhood image pixels and obtain the pixel values ​​of the pixels of the image to be processed;

[0122] The pixel operation subunit 1241 is further configured to add the neighborhood pixel value to the pixel value of the pixel in the image to be processed to obtain a pixel operation value;

[0123] The pixel updating subunit 1242 is configured to determine the updated pixel value corresponding to the pixel of the image to be processed by taking the ratio between the pixel operation value and the total number of pixels; the total number of pixels being the sum of the number of pixels in the neighborhood image and the number of pixels in the image to be processed;

[0124] The pixel updating subunit 1242 is further configured to determine the image including the updated pixel value corresponding to each image pixel in the image pixel set as the filter size S when determining the updated pixel value corresponding to each image pixel in the image pixel set. i The corresponding filtered image T i .

[0125] The specific implementation of the pixel operation subunit 1241 and the pixel update subunit 1242 can be found in the description of S102 in the embodiment corresponding to FIG4 , and will not be repeated here.

[0126] In one embodiment, each of the N filter sizes is used as the filter size S i , set the filter size S i The corresponding filtered image is used as the filtered image T i , filter the image T i The corresponding high-frequency image is taken as the high-frequency image Z, where i is a positive integer;

[0127] The image conversion module 13 may include a pixel coordinate acquiring unit 131 and a high-frequency image determining unit 132 .

[0128] The pixel coordinate acquisition unit 131 is used to acquire an image pixel set corresponding to the original image, and acquire a pixel coordinate set corresponding to the image pixel set;

[0129] The pixel coordinate acquisition unit 131 is also used to obtain the filtered image T iA corresponding filtered image pixel set, and obtaining a filtered pixel coordinate set corresponding to the filtered image pixel set;

[0130] The high frequency image determination unit 132 is configured to determine the filtered image T according to the pixel coordinate set and the filtered pixel coordinate set. i The corresponding high-frequency image Z i .

[0131] The specific implementation of the pixel coordinate acquisition unit 131 and the high-frequency image determination unit 132 can refer to the description of determining the high-frequency image in S103 in the embodiment corresponding to FIG. 4 , and will not be repeated here.

[0132] In one embodiment, the high-frequency image determining unit 132 may include a high-frequency pixel value determining subunit 1321 and a high-frequency image determining subunit 1322 .

[0133] The high-frequency pixel value determination subunit 1321 is configured to obtain the coordinates of the to-be-processed filtered pixel in the filtered pixel coordinate set, and determine the pixel coordinates in the pixel coordinate set that have a mapping relationship with the coordinates of the to-be-processed filtered pixel as the mapped pixel coordinates.

[0134] The high-frequency pixel value determination subunit 1321 is further configured to obtain a mapped image pixel corresponding to a mapped pixel coordinate in the image pixel set, and obtain a to-be-processed filtered pixel corresponding to a to-be-processed filtered pixel coordinate in the filtered image pixel set;

[0135] The high-frequency pixel value determination subunit 1321 is further configured to obtain a mapped pixel value corresponding to a mapped image pixel, and obtain a filtered pixel value corresponding to a to-be-processed filtered pixel;

[0136] The high-frequency pixel value determining subunit 1321 is further configured to determine the difference pixel value between the mapped pixel value and the filtered pixel value as the high-frequency pixel value corresponding to the filtered pixel to be processed;

[0137] The high-frequency image determination subunit 1322 is configured to, when determining the high-frequency pixel value corresponding to each filtered image pixel in the filtered image pixel set, determine the image including the high-frequency pixel value corresponding to each filtered image pixel as the filtered image T i The corresponding high-frequency image Z i .

[0138] The specific implementation of the high-frequency pixel value determination subunit 1321 and the high-frequency image determination subunit 1322 can be found in the description of S103 in the embodiment corresponding to FIG. 4 , and will not be repeated here.

[0139] In one embodiment, the N filter sizes include a first filter size and a second filter size, the N filter images include a first filter image corresponding to the first filter size and a second filter image corresponding to the second filter size, and the N high-frequency images include a first high-frequency image corresponding to the first filter image and a second high-frequency image corresponding to the second filter image;

[0140] The image fusion module 14 may include: a weight fusion unit 141 and a high-frequency image fusion unit 142 .

[0141] The weight fusion unit 141 is configured to obtain a first fusion weight corresponding to a first filter size and a second fusion weight corresponding to a second filter size;

[0142] A high-frequency image fusion unit 142 is used to obtain a high-frequency image fusion function;

[0143] The high-frequency image fusion unit 142 is further configured to fuse the first high-frequency image with the second high-frequency image according to the first fusion weight, the second fusion weight, and the high-frequency image fusion function to obtain a fused image.

[0144] The specific implementation of the weight fusion unit 141 and the high-frequency image fusion unit 142 can refer to the relevant description of image fusion in S104 in the embodiment corresponding to FIG4 , and will not be repeated here.

[0145] In one embodiment, the high-frequency image fusion unit 142 may include: a weight operation subunit 1421 , an image operation subunit 1422 , and a feature fusion subunit 1423 .

[0146] The weight operation subunit 1421 is used to add the first image fusion weight and the second image fusion weight according to the high-frequency image fusion function to obtain an operation weight;

[0147] an image operation subunit 1422, configured to determine a first ratio between the first fusion weight and the operation weight, and perform an exponential power operation on the first high-frequency image based on the first ratio to obtain a first operation feature;

[0148] The image operation subunit 1422 is further configured to determine a second ratio between the second fusion weight and the operation weight, and perform an exponential power operation on the second high-frequency image based on the second ratio to obtain a second operation feature;

[0149] The feature fusion subunit 1423 is configured to geometrically fuse the first operation feature and the second operation feature according to the high-frequency image fusion function to obtain a fused image.

[0150] Among them, the specific implementation methods of the weight operation subunit 1421, the image operation subunit 1422 and the feature fusion subunit 1423 can be found in the description of S104 in the embodiment corresponding to Figure 4 above, and will not be repeated here.

[0151] In one embodiment, the image sharpening module 15 may include: a remapping unit 151 and an image sharpening unit 152 .

[0152] The remapping unit 151 is configured to perform remapping processing on the fused image to obtain a remapped fused image;

[0153] The image sharpening unit 152 is configured to fuse the remapped fused image with the original image to obtain a sharpened and enhanced image.

[0154] The specific implementation of the remapping unit 151 and the image sharpening unit 152 can refer to the relevant description of S201-S202 in the embodiment corresponding to FIG7 above, and will not be repeated here.

[0155] In one embodiment, the remapped fused image refers to an image containing remapped pixel values, and the remapped pixel values ​​are determined by comparing the fused pixel values ​​corresponding to the fused image with a pixel value threshold according to a remapping function.

[0156] In one embodiment, the remapping unit 151 may include: a remapping value determining subunit 1511 and a remapping image determining subunit 1512 .

[0157] The remapping value determination subunit 1511 is configured to obtain fused image pixels corresponding to the fused image, and obtain fused pixel values ​​corresponding to the fused image pixels;

[0158] The remapping value determination subunit 1511 is further configured to obtain a remapping function;

[0159] The remapping value determining subunit 1511 is further configured to determine a remapping pixel value corresponding to a pixel of the fused image according to the remapping function and the fused pixel value;

[0160] The remapped image determining subunit 1512 is configured to determine the image containing the remapped pixel values ​​as the remapped fused image.

[0161] The specific implementation of the remapping value determination subunit 1511 and the remapping image determination subunit 1512 can be found in the description of S201 in the embodiment corresponding to FIG. 7 , and will not be repeated here.

[0162] In one embodiment, the remapping value determining subunit 1511 is further configured to compare the fused pixel value with a pixel value threshold according to the remapping function;

[0163] The remapping value determining subunit 1511 is further specifically configured to determine the preset pixel parameter as the remapping pixel value corresponding to the fused image pixel if the fused pixel value is greater than or equal to the pixel value threshold;

[0164] The remapping value determining subunit 1511 is further specifically configured to multiply the fused pixel value by a preset fusion coefficient to obtain a remapping pixel value corresponding to the fused image pixel if the fused pixel value is less than the pixel value threshold.

[0165] In one embodiment, the image sharpening unit 152 may include: a sharpening value determining subunit 1521 and a sharpened image determining subunit 1522 .

[0166] The sharpening value determining subunit 1521 is configured to obtain a remapped pixel corresponding to the remapped fused image, and obtain a remapped pixel value corresponding to the remapped pixel;

[0167] The sharpening value determination subunit 1521 is further configured to obtain image pixels corresponding to the original image and obtain image pixel values ​​corresponding to the image pixels;

[0168] The sharpening value determining subunit 1521 is further configured to add the remapped pixel value to the image pixel value to obtain a sharpened pixel value;

[0169] The sharpened image determining subunit 1522 is configured to determine an image containing sharpened pixel values ​​as a sharpened enhanced image.

[0170] The specific implementation of the sharpening value determination subunit 1521 and the sharpening image determination subunit 1522 can be found in the description of S202 in the embodiment corresponding to FIG7 , and will not be repeated here.

[0171] In an embodiment of the present application, after the original image is low-pass filtered with different filter sizes, low-frequency images at different filter sizes (i.e., N filtered images) can be obtained. Then, the high-frequency information corresponding to each filtered image can be extracted by combining the original image itself with each filtered image (i.e., N high-frequency images are obtained). For multi-scale high-frequency images, the present application can perform fusion processing on them to obtain a fused image, and the processed fused image can be fused again with the original image, so that the high-frequency intensity of the original image can be enhanced from different scales (filter sizes) to obtain a sharpened and enhanced image. In addition, since the present application uses different filter sizes to perform low-pass filtering on the original image at the same time, the high-frequency information obtained is also high-frequency information under different filter sizes, and it can have strong adaptability to different types of image details (such as smooth textures and complex sharp textures) (for example, for complex sharp textures, low-pass filtering based on low filter size can extract the corresponding high-frequency information and achieve corresponding enhancement; for smooth textures, low-pass filtering based on high filter size can extract the corresponding high-frequency information and achieve corresponding enhancement), that is, it can achieve the enhancement of the detail information of the original image from different scales, thereby improving the sharpening quality of the image and improving the clarity of the image. In summary, the present application can improve the quality of the sharpened image in the image sharpening business.

[0172] Please refer to Figure 8, which is a structural diagram of a computer device provided in an embodiment of the present application. As shown in Figure 8, the device 1 in the embodiment corresponding to Figure 7 can be applied to the above-mentioned computer device 8000, and the above-mentioned computer device 8000 may include: a processor 8001, a network interface 8004 and a memory 8005. In addition, the above-mentioned computer device 8000 also includes: a user interface 8003, and at least one communication bus 8002. Among them, the communication bus 8002 is used to realize the connection and communication between these components. Among them, the user interface 8003 may include a display screen (Display), a keyboard (Keyboard), and the optional user interface 8003 may also include a standard wired interface and a wireless interface. The network interface 8004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 8005 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 8005 may also be at least one storage device located away from the aforementioned processor 8001. As shown in FIG8 , the memory 8005 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a device control application program.

[0173] In the computer device 8000 shown in FIG8 , the network interface 8004 can provide network communication functions; the user interface 8003 is mainly used to provide an interface for user input; and the processor 8001 can be used to call the device control application stored in the memory 8005 to achieve:

[0174] Obtaining a filter size set for performing filtering processing; the filter size set includes N filter sizes, where N is a positive integer greater than 1; and any two filter sizes among the N filter sizes are different;

[0175] Perform low-pass filtering on the original image based on each filter size to obtain N filtered images;

[0176] Perform image conversion on the N filtered images according to the original image to obtain N high-frequency images;

[0177] The N high-frequency images are fused to obtain a fused image, and the fused image is fused with the original image to obtain a sharpened and enhanced image corresponding to the original image.

[0178] It should be understood that the computer device 8000 described in the embodiments of the present application can execute the data processing method described in the embodiments corresponding to Figures 4 to 7 above, and can also execute the data processing device 1 described in the embodiment corresponding to Figure 7 above, and the description thereof will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated here.

[0179] In addition, it should be pointed out here that: the embodiment of the present application also provides a computer-readable storage medium, and the above-mentioned computer-readable storage medium stores a computer program executed by the computer device 8000 for data processing mentioned above, and the above-mentioned computer program includes program instructions. When the above-mentioned processor executes the above-mentioned program instructions, it can execute the description of the above-mentioned data processing method in the embodiments corresponding to Figures 4 to 7 above. Therefore, it will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application.

[0180] The computer-readable storage medium may be the data processing device provided in any of the aforementioned embodiments or the internal storage unit of the computer device, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device. Furthermore, the computer-readable storage medium may also include both the internal storage unit of the computer device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.

[0181] In one aspect of the present application, a computer program product is provided, comprising a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform a method provided in one aspect of an embodiment of the present application.

[0182] The terms "first", "second", etc. in the description, claims, and drawings of the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "comprising" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product, or device comprising a series of steps or units is not limited to the listed steps or modules, but may optionally include steps or modules not listed, or may optionally include other step units inherent to these processes, methods, apparatuses, products, or devices.

[0183] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0184] The method and related apparatus provided in the embodiment of the present application are described with reference to the method flow chart and / or structural diagram provided in the embodiment of the present application, and specifically can be implemented by computer program instructions for each process and / or box of the method flow chart and / or structural diagram, and the combination of the process and / or box in the flow chart and / or block diagram. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the function specified in one process or multiple processes of the flow chart and / or one box or multiple boxes of the structural diagram. These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device, and the instruction device implements the function specified in one process or multiple processes of the flow chart and / or one box or multiple boxes of the structural diagram. These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the structural diagram.

[0185] The above disclosure is only a preferred embodiment of the present application, and certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A data processing method, the method being executed by a computer device, comprising: Obtain a filter size set for performing filtering processing; The filter size set includes N filter sizes, where N is a positive integer greater than 1; Any two filter sizes among the N filter sizes are different; Based on each filter size, the original image is subjected to low-pass filtering to obtain N filtered images; Performing image conversion on the N filtered images respectively according to the original image to obtain N high-frequency images; The N high-frequency images are fused to obtain a fused image, and the fused image is fused with the original image to obtain a sharpened and enhanced image corresponding to the original image.

2. The method according to claim 1, wherein each of the N filter sizes is used as a filter size S i , the filter size S i The corresponding filtered image is taken as the filtered image T i , i is a positive integer; The low-pass filtering is performed on the original image based on each filter size to obtain N filtered images, including: Acquire an image pixel set corresponding to the original image, and acquire a pixel coordinate set corresponding to the image pixel set; Acquire a to-be-processed image pixel from the image pixel set, and acquire a to-be-processed pixel coordinate corresponding to the to-be-processed image pixel from the pixel coordinate set; Acquire the coordinate change amount indicated by the filter size Si, and determine the neighboring pixel coordinates of the pixel coordinates to be processed in the pixel coordinate set according to the pixel coordinates to be processed and the coordinate change amount; Determine the filtered image T corresponding to the filter size Si according to the pixel coordinates to be processed and the neighborhood pixel coordinates i .

3. The method according to claim 2, wherein determining the filtered image Ti corresponding to the filter size Si according to the pixel coordinates to be processed and the neighborhood pixel coordinates comprises: Acquire the neighborhood image pixels corresponding to the neighborhood pixel coordinates in the image pixel set; Obtaining neighborhood pixel values ​​of the neighborhood image pixels, and obtaining pixel values ​​of the pixels of the image to be processed; Adding the neighborhood pixel value to the pixel value of the image pixel to be processed to obtain a pixel operation value; Determine the ratio between the pixel operation value and the total number of pixels as the updated pixel value corresponding to the pixel of the image to be processed; The total number of pixels is the sum of the number of pixels in the neighborhood image and the number of pixels in the image to be processed; When the updated pixel value corresponding to each image pixel in the image pixel set is determined, the image including the updated pixel value corresponding to each image pixel is determined as the filter size S i The corresponding filtered image T i .

4. The method according to claim 1, wherein each of the N filter sizes is used as a filter size S i , the filter size S i The corresponding filtered image is taken as the filtered image T i , the filtered image T i The corresponding high-frequency image is taken as the high-frequency image Z i , i is a positive integer; The step of performing image conversion on the N filtered images respectively according to the original image to obtain N high-frequency images includes: Acquire an image pixel set corresponding to the original image, and acquire a pixel coordinate set corresponding to the image pixel set; Obtain a filtered image pixel set corresponding to the filtered image Ti, and obtain a filtered pixel coordinate set corresponding to the filtered image pixel set; Determine the high-frequency image Z corresponding to the filtered image Ti according to the pixel coordinate set and the filtered pixel coordinate set i .

5. The method according to claim 4, wherein determining the high-frequency image Zi corresponding to the filtered image Ti according to the pixel coordinate set and the filtered pixel coordinate set comprises: Acquire the to-be-processed filtering pixel coordinates in the filtering pixel coordinate set, and determine the pixel coordinates in the pixel coordinate set that have a mapping relationship with the to-be-processed filtering pixel coordinates as the mapping pixel coordinates; Acquire the mapped image pixel corresponding to the mapped pixel coordinate in the image pixel set, and acquire the to-be-processed filtered pixel corresponding to the to-be-processed filtered pixel coordinate in the filtered image pixel set; Obtaining a mapped pixel value corresponding to the mapped image pixel, and obtaining a filtered pixel value corresponding to the to-be-processed filtered pixel; Determine the difference pixel value between the mapped pixel value and the filtered pixel value as the high-frequency pixel value corresponding to the filtered pixel to be processed; When the high-frequency pixel value corresponding to each of the filtered image pixels in the filtered image pixel set is determined, an image including the high-frequency pixel value corresponding to each of the filtered image pixels is determined as the high-frequency image Z corresponding to the filtered image Ti. i .

6. The method according to claim 1, wherein the N filter sizes include a first filter size and a second filter size, the N filter images include a first filter image corresponding to the first filter size and a second filter image corresponding to the second filter size, and the N high-frequency images include a first high-frequency image corresponding to the first filter image and a second high-frequency image corresponding to the second filter image; The step of fusing the N high-frequency images to obtain a fused image includes: Obtaining a first fusion weight corresponding to the first filter size, and obtaining a second fusion weight corresponding to the second filter size; A high-frequency image fusion function is obtained, and the first high-frequency image and the second high-frequency image are fused according to the first fusion weight, the second fusion weight, and the high-frequency image fusion function to obtain the fused image.

7. The method according to claim 6, wherein the step of fusing the first high-frequency image with the second high-frequency image according to the first fusion weight, the second fusion weight, and the high-frequency image fusion function to obtain the fused image comprises: According to the high-frequency image fusion function, the first fusion weight and the second fusion weight are added together to obtain an operation weight; determining a first ratio between the first fusion weight and the operation weight, and performing an exponential power operation on the first high-frequency image based on the first ratio to obtain a first operation feature; determining a second ratio between the second fusion weight and the operation weight, and performing an exponential power operation on the second high-frequency image based on the second ratio to obtain a second operation feature; According to the high-frequency image fusion function, the first operation feature and the second operation feature are geometrically fused to obtain the fused image.

8. The method according to any one of claims 1 to 7, wherein fusing the fused image with the original image to obtain a sharpened and enhanced image corresponding to the original image comprises: Performing remapping processing on the fused image to obtain a remapped fused image; The remapped fused image is fused with the original image to obtain the sharpened enhanced image.

9. According to the method of claim 8, the remapped fused image refers to an image containing remapped pixel values, and the remapped pixel values ​​are determined after comparing the fused pixel values ​​corresponding to the fused image with a pixel value threshold according to a remapping function.

10. The method according to claim 9, wherein the remapping process is performed on the fused image to obtain the remapped fused image, comprising: Acquire a fused image pixel corresponding to the fused image, and acquire a fused pixel value corresponding to the fused image pixel; Obtaining a remapping function, and determining a remapped pixel value corresponding to a pixel of the fused image according to the remapping function and the fused pixel value; An image including the remapped pixel values ​​is determined as the remapped fused image.

11. The method according to claim 10, wherein determining the remapped pixel value corresponding to the fused image pixel according to the remap function and the fused pixel value comprises: According to the remapping function, comparing the fused pixel value with a pixel value threshold; If the fused pixel value is greater than or equal to the pixel value threshold, determining the preset pixel parameter as the remapped pixel value corresponding to the fused image pixel; If the fused pixel value is less than the pixel value threshold, the fused pixel value is multiplied by a preset fusion coefficient to obtain a remapped pixel value corresponding to the fused image pixel.

12. The method according to claim 8, wherein fusing the remapped fused image with the original image to obtain the sharpened enhanced image comprises: Obtaining a remapped pixel corresponding to the remapped fused image, and obtaining a remapped pixel value corresponding to the remapped pixel; Obtaining image pixels corresponding to the original image, and obtaining image pixel values ​​corresponding to the image pixels; Adding the remapped pixel value to the image pixel value to obtain a sharpened pixel value; The image containing the sharpened pixel values ​​is determined as the sharpened enhanced image.

13. A data processing device, the device being deployed on a computer device, comprising: A size acquisition module, used to acquire a filter size set for performing filtering processing; The filter size set includes N filter sizes, where N is a positive integer greater than 1; any two filter sizes among the N filter sizes are different; A filtering module, used for performing low-pass filtering on the original image based on each filter size to obtain N filtered images; An image conversion module, used for performing image conversion on the N filtered images respectively according to the original image to obtain N high-frequency images; An image fusion module, used for fusing the N high-frequency images to obtain a fused image; The image sharpening module is used to fuse the fused image with the original image to obtain a sharpened and enhanced image corresponding to the original image.

14. A computer device comprising: Processor, memory, and network interface; The processor is connected to the memory and the network interface, wherein the network interface is used to provide a network communication function, the memory is used to store a computer program, and the processor is used to call the computer program so that the computer device executes the method described in any one of claims 1-12.

15. A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, wherein the computer program is suitable for being loaded by a processor and executing the method according to any one of claims 1 to 12.

16. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 12 is implemented.