WO2023207408A1 - Data processing method and apparatus, and device and readable storage medium - Google Patents

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

Info

Publication number
WO2023207408A1
WO2023207408A1 PCT/CN2023/082111 CN2023082111W WO2023207408A1 WO 2023207408 A1 WO2023207408 A1 WO 2023207408A1 CN 2023082111 W CN2023082111 W CN 2023082111W WO 2023207408 A1 WO2023207408 A1 WO 2023207408A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
pixel
filtered
pixel value
frequency
Prior art date
Application number
PCT/CN2023/082111
Other languages
French (fr)
Chinese (zh)
Other versions
WO2023207408A9 (en
Inventor
夏思烽
高欣玮
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2023207408A1 publication Critical patent/WO2023207408A1/en
Publication of WO2023207408A9 publication Critical patent/WO2023207408A9/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/73Deblurring; Sharpening
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging

Definitions

  • This application relates to the field of computer technology, and in particular to data processing technology.
  • image sharpening The image processing process of making blurry images clear is called image sharpening.
  • image sharpening There are many reasons for blurred images, such as camera shake when acquiring images, poor design of optical components of 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 insufficient sharpness of the image. Therefore, when we perform image sharpening on blurred images, the essence is to reasonably increase the high-frequency components in the image.
  • the image sharpening method simply enhances the high-frequency components in the image, which increases the brightness difference at the edge of the image, thereby achieving the sharpening effect.
  • Embodiments of the present application provide a data processing method, device, equipment and readable storage medium, which can improve the quality of sharpened images in the image sharpening business.
  • embodiments of the present application provide a data processing method, which is executed by a computer device and includes:
  • the filter size set used for filtering processing; the filter size set includes N filter sizes, N is a positive integer greater than 1; any two filter sizes among the N filter sizes are different;
  • embodiments of the present application provide a data processing device, which is deployed on a computer device and includes:
  • the size acquisition module is used to obtain a filter size set used for filtering;
  • the filter size set includes N filter sizes, and N is a positive integer greater than 1; any two filter sizes among the N filter sizes are different;
  • the filter module is used to perform low-pass filtering on the original image based on each filter size to obtain N filtered images;
  • the image conversion module is used to perform image conversion on N filtered images respectively based on the original image to obtain N high-frequency images;
  • the image fusion module is used to image fuse 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 enhanced image corresponding to the original image.
  • embodiments of the present application provide a computer device, including: a processor and a memory;
  • the memory stores a computer program.
  • the computer program When the computer program is executed by the processor, it causes the processor to execute the method in the embodiment of the present application.
  • inventions of the present application provide a computer-readable storage medium.
  • the computer-readable storage medium stores a computer program.
  • the computer program includes program instructions. When executed by a processor, the program instructions execute the methods in the embodiments of the present application.
  • a computer program product includes a computer program, and the computer program is stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the method provided in one aspect of the embodiment of the present application.
  • N different filter sizes can be used to perform low-pass filtering on the original image respectively, thereby obtaining N different filtered images; subsequently, Image conversion is performed on N different filtered images based on the original image to obtain N different high-frequency images; the N different high-frequency images can be used for sharpening enhancement.
  • N high-frequency images can be image fused. After obtaining the fused image, the fused image can be fused with the original image. That is, the fused high-frequency information containing multiple sizes can be added to the original image, that is, The high-frequency information at each size in the original image is enhanced, so the sharpened image corresponding to the original image can be obtained.
  • low-frequency images ie, N filtered images
  • the low-frequency images can be extracted
  • the corresponding high-frequency information of each filtered image is obtained (that is, N high-frequency images are obtained).
  • this application can fuse them to obtain a fused image.
  • the processed fused image can be compared with the original image. Fusion is performed again, so that the high-frequency intensity of the original image can be enhanced from different scales (filter sizes) to obtain a sharpened enhanced image.
  • the high-frequency information obtained is also high-frequency information under different filter sizes, which can be used to filter different types of image details (such as smooth textures and complex sharp ones).
  • Texture has strong adaptive ability (for example, for complex and 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 The corresponding high-frequency information can be extracted through filtering and the corresponding enhancement can be achieved), that is, the detailed information of the original image can be enhanced from different scales, thereby improving the sharpening quality of the image and improving the clarity of the image.
  • this application can improve the quality of sharpened images in the image sharpening business.
  • Figure 1 is a network architecture diagram provided by an embodiment of the present application.
  • Figure 2 is a schematic diagram of a scene for sharpening an image provided by an embodiment of the present application
  • Figure 3 is a schematic diagram of an image processing scenario provided by an embodiment of the present application.
  • Figure 4 is a schematic flowchart of a data processing method provided by an embodiment of the present application.
  • Figure 5 is a schematic diagram of pixel processing based on mean filtering provided by an embodiment of the present application.
  • Figure 6 is a schematic flowchart of fusing the original image and the fused image to obtain a sharpened and enhanced image provided by an embodiment of the present application;
  • Figure 7 is a schematic structural diagram of a data processing device provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a computer device provided by an embodiment of the present application.
  • This application relates to artificial intelligence and other related technologies, such as computer vision technology in artificial intelligence.
  • the solution of this application specifically relates to image processing technology in computer vision technology, which can achieve sharpening and enhancement processing of images to obtain higher image quality. Sharpen the image.
  • Another example can also involve machine learning in artificial intelligence. Through machine learning, a target image model can be trained, so that the target image model can be used to identify the area to which the object to be identified belongs.
  • Figure 1 is a schematic structural diagram of a network architecture provided by an embodiment of the present application.
  • the network architecture may include a service server 1000 and a terminal device cluster (ie, terminal device cluster).
  • the terminal device cluster may include one or more terminal devices, and there will be no limit on the number of terminal devices here.
  • multiple terminal devices may specifically include terminal devices 100a, terminal devices 100b, terminal devices 100c,..., terminal devices 100n.
  • the terminal device 100a, the terminal device 100b, the terminal device 100c,..., the terminal device 100n can each have a network connection with the above-mentioned service server 1000, so that each terminal device can communicate with the service server 1000 through the network connection. Data interaction.
  • the network connection here is not limited to a connection method. It can be connected directly or indirectly through wired communication, or directly or indirectly through wireless communication. It can also be connected through other methods. This application does not limit it here.
  • each terminal device can be integrated and installed with an application.
  • the background server corresponding to each terminal device can store the business data in the application and coordinate it with the above Data exchange is performed between the business servers 1000 shown in Figure 1 .
  • the application may include an application with the function of displaying data information such as text, images, audio, and video.
  • the application can be a multimedia application (such as a video application), which can be used by users to upload pictures or videos, or can be used by users to play and watch images or videos uploaded by others; the application can also be an entertainment application (such as a game application), which can be Used for users to play games.
  • the application can also be other applications with data information processing functions, such as browser applications, social networking applications, image beautification applications, etc.
  • the applications integrated and installed on the terminal device can also be small programs, that is, independent programs that only need to be downloaded to the browser environment to run.
  • the applications integrated and installed on the terminal device can be independent applications or embedded in the browser environment.
  • a sub-application such as an applet in an application, which can be run or closed under user control. All in all, the applications integrated and installed on the terminal device can be any form of application, module or plug-in, and there is no limit to this.
  • one terminal device can be selected as the target terminal device from multiple terminal devices.
  • the terminal device may include: a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart TV, a smart speaker, a desktop computer, a smart phone Smart terminals carrying data processing functions (such as image data processing functions), such as watches, smart vehicle terminals, smart voice interaction devices, smart home appliances, aircraft, etc., but are not limited to these.
  • the terminal device 100a shown in FIG. 1 can be used as the target terminal device, and the target terminal device can be integrated with the above-mentioned target application. At this time, the target terminal device can perform data exchange with the business server 1000. Interaction.
  • 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 someone else). animal object) (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) ).
  • an application in a terminal device such as an image beautification application
  • 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 someone else). animal object) (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) ).
  • the business server 1000 can also identify the area in the sharpened enhanced image to which the object to be identified belongs, and extract the area from the original image to obtain An image that only contains the object to be recognized but not the background (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 recognized (such as adding special effects processing or beautification processing, etc.
  • the business server 1000 can put the target area image with special effects or beautification effects back into the original image for the object to be identified In the corresponding area, a processed image with higher image quality and special effects or beautification effects can be obtained. Subsequently, the business server 1000 can return the processed image to the terminal device, and the user can view the processed image on the display page of the terminal device (viewing the image with higher image quality and special effects or with beautify the object to be identified).
  • the business server 1000 may not perform special effects processing or beautification processing, but return the sharpened and enhanced image to the terminal device, then the user can The sharpened enhanced image is viewed on the display page of the terminal device (an image with higher image quality is viewed).
  • the specific process for the business server 1000 to sharpen and enhance the original image to obtain the sharpened and enhanced image may include: the business server 1000 may obtain a filter size set for filtering (the filter size set may include Different filter sizes, for example, may include N filter sizes, N is a positive integer greater than 1); based on each filter size, the business server 1000 can perform low-pass filtering processing on the original image respectively, so that different filters can be obtained image; then, the business server 100 can perform image conversion by reducing the N filtered images from the original image, thereby obtaining N high-frequency images; then, the business server 1000 can perform image fusion on the N high-frequency images, and obtain After the images are fused, the fused image is fused with the original image to obtain a sharpened enhanced image corresponding to the original image.
  • the filter size set may include Different filter sizes, for example, may include N filter sizes, N is a positive integer greater than 1
  • the business server 1000 can perform low-pass filtering processing on the original image respectively, so that different filters can be obtained image
  • the specific implementation method for the business server 1000 to sharpen and enhance the original image to obtain the sharpened enhanced image may include a specific implementation method to perform low-pass filtering on the original image based on the filter size to obtain different filtered images; Perform image conversion on a certain filtered image to obtain a specific implementation method of a high-frequency image; perform image fusion on a high-frequency image to obtain a specific implementation method of a fused image; based on the fused image and the original image, obtain a specific implementation method of sharpening an enhanced image
  • a specific implementation method for the business server 1000 to sharpen and enhance the original image to obtain the sharpened enhanced image for example, it may include a specific implementation method to perform low-pass filtering on the original image based on the filter size to obtain different filtered images; Perform image conversion on a certain filtered image to obtain a specific implementation method of a high-frequency image; perform image fusion on a high-frequency image to obtain a specific implementation method of a fused image; based on the fused image and the original image,
  • sharpening processing is very important. Sharpening processing can improve the clarity of the image, and in sharpening processing, filtering processing is also very critical.
  • this application can configure different filter sizes for the image filtering process. These different filter sizes can form a filter size set, which will be processed for a certain original image. During filtering processing, the filter size set can be obtained, and then filtered through the filter size set.
  • the sharpened enhanced image obtained after filtering with different filter sizes can process details in the image from different scales, which can greatly improve the image quality of the sharpened enhanced image.
  • the specific method for the business server 1000 to identify the area to which the object to be recognized in an image (such as a sharpened enhanced image) belongs can be processed through an image model (such as an image recognition model).
  • an image model such as an image recognition model
  • the image model can be trained so that the image model adjusted after training is optimal.
  • image recognition processing can be performed on the image (such as identifying the objects to be recognized in the image). identify the area to which the object belongs).
  • the methods provided by the embodiments of the present application can be executed by computer equipment, including but not limited to terminal equipment or business servers.
  • the business server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, and cloud services. Cloud servers for basic cloud computing services such as communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
  • the terminal equipment and the service server can be connected directly or indirectly through wired or wireless communication methods, which is not limited in this application.
  • the above-mentioned computer device can be a node in a distributed system, wherein the distributed system can be a blockchain system, and the The blockchain system can be a distributed system formed by connecting multiple nodes through network communication.
  • nodes can form a point-to-point (P2P, Peer To Peer) network.
  • P2P protocol is an application layer protocol running on the Transmission Control Protocol (TCP, Transmission Control Protocol) protocol.
  • TCP Transmission Control Protocol
  • any form of computer equipment such as business servers, terminal equipment and other electronic equipment, can become a node in the blockchain system by joining the peer-to-peer network.
  • Blockchain is a new application model of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. It is mainly used to process data in chronological order. Organize it and encrypt it into a ledger so that it cannot be tampered with or forged, and data can be verified, stored and updated at the same time.
  • the computer device is a blockchain node, due to the non-tampering and anti-counterfeiting properties of the blockchain, the data in this application (such as uploaded image data such as target images, sharpened images, etc.) It has authenticity and security, which can make the results obtained after relevant data processing based on these data more reliable.
  • the service server 200 shown in Figure 2 can be the service server 1000 shown in Figure 1
  • the terminal device 100a shown in Figure 2 can be selected from the terminal device cluster in the embodiment corresponding to Figure 1.
  • Any terminal device 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 in the embodiment corresponding to Figure 1,
  • the terminal device may be the above-mentioned terminal device 100a.
  • user A can run an application (such as a short video application) through the terminal device 100a.
  • User A uploads an image 20a in the short video application, where the image 20a includes an object to be recognized (such as an object B), this image 20a can be used as the original image.
  • the service server 200 may receive the original image 20a through the backend server of the terminal device 100a.
  • the service server 200 can perform low-pass filtering processing on the original image 20a based on different filter sizes (for example, it can include filter size 1, filter size 2, ..., filter size n, n can be a positive integer greater than 1), Thus, 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 can be obtained.
  • the filter size here may be a size used for low-pass filtering.
  • the filter size may be a preset size.
  • the filter size may include different sizes, including high and low. For example, the filter size may include 5 ⁇ The size of 5, the size of 9 ⁇ 9, the size of 17 ⁇ 17, etc. will not be explained one by one here.
  • low-pass filtering uses means such as mean filtering to suppress high-frequency information in videos or images, making the video or image look blurry.
  • the image obtained after low-pass filtering is a blurred image ( Right now low-frequency image)
  • each filtered image (including filtered image, filtered image 2, ..., filtered image n) can also be called a low-frequency image.
  • the business server 200 can determine the high-frequency information (also called high-frequency images) under different filter sizes based on the original image 20a and each filtered image. As shown in Figure 2, the business server 200 can determine the high-frequency information (also called high-frequency images) under different filter sizes based on the original image 20a and the filtered image. 1. Determine the high-frequency image 1 corresponding to the filtered image 1; determine the high-frequency image 2 corresponding to the filtered image 2 based on the original image 20a and the filtered image 2; ...; determine the high-frequency image 2 corresponding to the filtered image 2 based on the original image 20a and the filtered image n. The high-frequency image n corresponding to the filtered image n.
  • a fused image containing high-frequency information under each filter size can be obtained.
  • the fused image is fused with the original image 20a, that is, the fused image under each filter size is fused.
  • the high-frequency information is added to the original image 20a, and then after fusion, the sharpened enhanced image 20b corresponding to the original image 20a can be obtained.
  • the sharpening-enhanced image 20b can have higher definition (for example, the lines are clearer and the boundaries are more obvious).
  • the business server 200 can send the sharpened enhanced image 20b with higher definition to the terminal device 100b. Then when user C uses the application through the terminal device 100b and browses to the image uploaded by user A, the viewed image What is obtained is a sharpened enhanced image 20b with higher definition, rather than a distorted image. In the same way, the business server 200 can also return the sharpened image 20b with higher definition to the terminal device 100a, and user A can view the sharpened image 20b with higher definition on the display interface of the terminal device 100a. Image 20b.
  • FIG. 3 is a schematic diagram of an image processing scenario provided by an embodiment of the present application. As shown in FIG.
  • the business server 200 can input the sharpened 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 enhanced image 20b.
  • an image model such as an image recognition model
  • the image recognition model recognizes that the area where object B is located in the sharpened enhanced image 20b is area P (that is, the area included in the boundary of object B).
  • the image recognition model can extract the area P including object B. , then, the business server 200 may no longer consider other areas in the image 20a except the area P, and only perform special effects processing on the object B in the area P.
  • the business server 200 adds a "cat special effect" to the object B in the area P. Further, the business server 200 can put the object B with the "cat special effect” back into the sharpened enhanced image 20b. area P, from which a sharpened enhanced image 20c with "cat special effect” can be obtained. The sharpened and enhanced image 20c with "cat special effects” is shown in Figure 3. Subsequently, the service server 200 can return the sharpened and enhanced image 20c with "cat special effects" to the terminal device 100a. User A can log in to the terminal device 100a. The sharpened and enhanced image 20c with "cat special effect” is viewed on the display interface of the device 100a.
  • any object in an image in this application can be used as an object to be recognized.
  • object B such as a concession stand, an escalator, a basketball, etc.
  • the image recognition model can also perform image recognition processing on other objects except object B at the same time.
  • the image recognition model in this application can be any model with image recognition function, and this application does not limit it.
  • Figure 4 is a schematic flow chart of a data processing method provided by an embodiment of the present application.
  • This 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 the terminal device 100a), or can be executed by the terminal device and the service server (such as in the embodiment corresponding to Figure 1 above)
  • the business server 1000 is jointly executed.
  • this embodiment takes the method being executed by the above-mentioned terminal device as an example for description.
  • the image processing method may at least include the following S101-S104:
  • the filter size set includes N filter sizes, N is a positive integer greater than 1; any two filter sizes among the N filter sizes are different.
  • the filter size may refer to the template size for performing pixel calculation processing on a certain pixel point on the image.
  • an image can contain one or more pixels.
  • a template can be given for a certain pixel (that is, the size of the template can be artificially specified), and the template includes the surrounding pixels.
  • neighboring pixels and its own pixel, where the own pixel is used as the center, and the neighboring pixels around it are one or more neighborhood pixels with the pixel as the center.
  • the pixel value of the own pixel can be determined based on the pixel values of all pixels in the template (that is, a final pixel value determined based on the pixel values of all pixels in the template can be used to replace the own pixel.
  • the template contains a total of 25 pixels. For a certain pixel, it is necessary to select 24 adjacent pixels as its neighborhood pixels.
  • the final pixel value can be determined jointly by the pixel values of 25 pixels within the template.
  • the filtering process is mean filtering
  • the final pixel value of the pixel can be the average of the pixel values of 25 pixels in the template;
  • the filtering is median filtering
  • 25 pixels can be The pixel values of the points are 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.
  • different types of filtering processing methods have different template applications. Here, we only take the mean filtering processing and the median filtering processing as examples as an illustrative explanation.
  • Figure 5 is a schematic diagram of pixel processing based on mean filtering provided by an embodiment of the present application.
  • the image 50a may be an original image.
  • the original image 50a contains 49 pixels (including pixels a1, pixels a2, pixels a3, ..., pixels 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 (ie, filtering size) is 3 ⁇ 3.
  • the neighborhood pixels around it can be determined as pixel a1, pixel a2, pixel a3, Pixel point b1, pixel point b3, pixel point c1, pixel point c2 and pixel point c3.
  • a certain 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 point can each be used as a coordinate axis (which can be called x axis and y-axis), a coordinate system with the vertex as the coordinate origin can be constructed.
  • each pixel point on the original image 50a can correspond to a coordinate.
  • it can be It is determined based on the coordinates of pixel point b2. For example, taking the coordinates of pixel b2 as (2, 6), you can add [-1,1] to the x-axis (that is, add -1, 0, 1), and add [-1, 1] to the y-axis ] (that is, increase -1, 0, 1), that is, increase (-1, -1), (-1, 0), (-1, 1), (0, -1) on coordinate (2, 6) , (0,1), (1,-1), (1,0) and (1,1), from which the coordinates of the neighborhood pixels can be obtained as (1,5), (1,6), (1,7), (2,5), (2,7), (3,5), (3,6) and (3,7), from which the above-mentioned pixel points a1, etc. can be obtained through coordinate correspondence.
  • Each neighborhood pixel of the pixel is obtained as (2, 6).
  • the pixel values of all pixels included in the template can be obtained, namely pixel a1, pixel a2, pixel a3, pixel b1, pixel b2, pixel b3, pixel c1, pixel c2 and
  • the pixel values corresponding to pixel point c3 are the pixel values corresponding to pixel point a1, pixel point a2, pixel point a3, pixel point b1, pixel point b2, pixel point b3, pixel point c1, pixel point c2 and pixel point c3 respectively.
  • the average value corresponding to these pixel values is 10 (that is, 11, 8, 11, 10, 9, 12, 10, 10 , 9 are added, the resulting sum is 90, the number of all pixels contained in the template is 9, then the average value is 10), then the average value of 10 can be used as the pixel point b2 the final pixel value. That is to say, through this mean filtering process, the final pixel value corresponding to each pixel point in the original image 50a can be obtained.
  • sharpening processing is very important. Sharpening processing can improve the clarity of the image, and in sharpening processing, filtering processing is also very critical.
  • this application can configure different filter sizes for the image filtering process. These different filter sizes can form a filter. Wave size set, when filtering a certain original image, the filter size set can be obtained, and then filtered through the filter size set.
  • S102 Perform low-pass filtering on the original image based on each filter size to obtain N filtered images.
  • each filter size can be used to filter the original image.
  • the filtering process in this application may refer to low-pass filtering processing (such as mean filtering processing, median filtering processing, etc.).
  • the method of performing low-pass filtering processing on the original image based on each filter size is similar.
  • Each of the N filter sizes is taken as a filter size Si
  • the filtered image corresponding to the filter size Si among the N filtered images is taken as a filtered image Ti (i is a positive integer).
  • the original The image is subjected to low-pass filtering processing
  • the specific implementation method of obtaining the filtered image corresponding to the filter size can be: obtaining the image pixel set corresponding to the original image, and obtaining the pixel coordinate set corresponding to the image pixel set; then, in the image pixel set, Obtain the pixels of the image to be processed, and obtain the pixel coordinates of the pixels to be processed corresponding to the pixels of the image to be processed in the pixel coordinate set; obtain the coordinate change amount indicated by the filter size Si , and based on the pixel coordinates to be processed and the coordinate change amount, at the pixel coordinates
  • the neighborhood pixel coordinates for the pixel coordinates to be processed are determined in the set; based on the pixel coordinates to be processed and the neighborhood pixel coordinates, the filtered image Ti corresponding to the filter size Si can be determined.
  • the original image may contain one or more pixels (also called image pixels), and each pixel (each image pixel) may correspond to a coordinate, where the coordinates here may refer to
  • the coordinates in the coordinate system established based on the original image can use an image vertex of the original image as the origin of the coordinates, and each of the two image edges with the origin of the coordinates as the intersection as a coordinate axis (which can be called (x-axis and y-axis), from which a coordinate system with the image vertex as the coordinate origin can be constructed, then each pixel point can correspond to a coordinate in the coordinate system.
  • the coordinates corresponding to each pixel point can be called pixel coordinates.
  • each image pixel (pixel point) can form an image pixel set (pixel point set), and the pixel coordinates corresponding to each image pixel can form a pixel coordinate set.
  • the image pixel set of the original image and the pixel coordinate set corresponding to the image pixel set can be obtained.
  • a filter size such as the size of 3 ⁇ 3
  • a certain image pixel such as the pixel of the image to be processed
  • the specific way to determine the pixels of the neighborhood image based on the filter size can be determined by the pixel coordinates.
  • One filter size can correspond to a coordinate change amount.
  • the size of 3 ⁇ 3 can correspond to the coordinate change amount [-1, 1] ( That is, increase -1, 0 or 1 on the x-axis and y-axis at the same time); for example, the size of 3 ⁇ 3 can correspond to the coordinate change amount [-2, 2] (that is, increase -2 on the x-axis and y-axis at the same time, -1, 0, 1 or 2).
  • the neighborhood pixel coordinates can be calculated based on the pixel coordinates to be processed and the coordinate change, and the neighborhood pixel coordinates can be determined based on the coordinates of the pixels to be processed.
  • the area composed of the neighborhood image pixels and the to-be-processed image pixels is the area covered by the filter size, and the area has the to-be-processed image pixel as the center position.
  • the filtered image corresponding to the filter size can be determined.
  • the low-pass filtering process is taken as the mean filtering process as an example.
  • the specific implementation method of determining the filtered image Ti corresponding to the filter size Si can be: obtaining the neighborhood in the image pixel set The neighborhood image pixel corresponding to the pixel coordinate; the neighborhood pixel value of the neighborhood image pixel can be obtained, and the pixel value of the image pixel to be processed can be obtained; subsequently, the neighborhood pixel value can be compared with the pixel value of the image pixel to be processed Add processing to obtain the 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 image pixel to be processed; where the total number of pixels is the number of neighborhood image pixels and the number of image pixels to be processed The sum of the numbers; when the updated pixel
  • the embodiment of the present application can perform the pixel value (including the pixel value of the image pixel to be processed and the neighbor pixel value) of each pixel (including the pixel value of the image pixel to be processed and the neighbor image pixel) covered by the filter size.
  • the obtained pixel operation value is then averaged (that is, the ratio between the pixel operation value and the total number of pixels is determined), and the average value can be used as the updated pixel value of the pixel of the image to be processed (that is, the average value replaces the pixel to be processed).
  • the original pixel value of the processed image pixel that is, the pixel value that replaces the pixel of the image to be processed).
  • the updated pixel value of each image pixel can be determined by determining the updated pixel value of the image pixel to be processed. Then, after determining the updated pixel value of each image pixel, pixel value, 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 filtered image corresponding to the filter size (such as filter size Si ) . (Filtered image Ti ).
  • the above only takes the filter size S i as an example to describe the low-pass filtering process on the original image based on a certain filter size.
  • the same processing method can be used to perform the original image.
  • low-pass filtering such as mean filtering
  • filtered images corresponding to different filter sizes can be obtained, that is, N filtered images can be obtained.
  • Formula (1), formula (2) and formula (3) are based on N filter sizes including filter sizes 5 ⁇ 5, Taking 9 ⁇ 9 and 17 ⁇ 17 as examples, the specific implementation method of performing mean filtering on the original image.
  • formula (1) It can represent the low-frequency pixel value of a certain pixel in the original image after performing mean filtering on the original image based on the filter size 5 ⁇ 5 (it can also be understood as the updated pixel value after filtering); ⁇ x and ⁇ y can be respectively Used to characterize the coordinate changes on the x-axis and the coordinate changes on the y-axis; Processing pixel coordinates), that is, the pixel coordinates to be processed are (I x, y ).
  • formula (2) It can represent the low-frequency pixel value of a certain pixel in the original image after performing mean filtering on the original image based on the filter size 9 ⁇ 9 (it can also be understood as the updated pixel value after filtering); ⁇ x and ⁇ y can be respectively Used to characterize the coordinate changes on the x-axis and the coordinate changes on the y-axis; Processing pixel coordinates), that is, the pixel coordinates to be processed are (I x, y ).
  • formula (3) It can represent the low-frequency pixel value of a certain pixel in the original image after performing mean filtering on the original image based on the filter size 17 ⁇ 17 (it can also be understood as the updated pixel value after filtering); ⁇ x and ⁇ y can be respectively Used to characterize the coordinate changes on the x-axis and the coordinate changes on the y-axis; Processing pixel coordinates), that is, the pixel coordinates to be processed are (I x, y ).
  • S103 Perform image conversion on N filtered images respectively according to the original image to obtain N high-frequency images.
  • low-pass filtering can be performed on the original image based on each filter size.
  • the information obtained after low-pass filtering is low-frequency information (that is, each filtered image can be understood as a low-frequency image)
  • the high-frequency information can be extracted based on the original image and low-frequency information (the high-frequency information can be understood as a high-frequency image).
  • the method of extracting high-frequency information may be to perform a difference between the original image and the low-frequency information, and use the obtained result as high-frequency information.
  • each of the N filter sizes be a filter size Si
  • the specific implementation method of obtaining the high-frequency image Z i can be: obtaining the image pixel set corresponding to the original image, and obtaining the pixel coordinates corresponding to the image pixel set.
  • the corresponding filtered image T i can be determined The high-frequency image Z i .
  • the filtered image can be obtained by updating the pixel value of each pixel of the original image.
  • the coordinates of the pixels in the filtered image have not changed.
  • the pixel value of each pixel may change, so 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 set of pixel coordinates corresponding to the set of image pixels can be the same set of pixels. That is to say, 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). According to the pixel coordinate set and the filtered pixel coordinate set, the high-frequency image corresponding to a certain filtered image can be determined.
  • the specific implementation method for determining the high-frequency image Z i corresponding to the filtered image Ti according to the pixel coordinate set and the filtered pixel coordinate set can be: obtaining the filtered pixel coordinates to be processed in the filtered pixel coordinate set , and determine the pixel coordinates in the pixel coordinate set that have a mapping relationship with the filtered pixel coordinates to be processed as the mapped pixel coordinates; then, the mapped image pixels corresponding to the mapped pixel coordinates can be obtained in the image pixel set, and in the filtered image pixel set You can obtain the filtered pixel to be processed corresponding to the coordinates of the filtered pixel to be processed; obtain the mapped pixel value corresponding to the mapped image pixel, and obtain the filtered pixel value corresponding to the filtered pixel to be processed; obtain the difference pixel between the mapped pixel value and the filtered pixel value value, determined as the high-frequency pixel value corresponding to the filtered pixel to be processed;
  • the pixel coordinates that have a mapping relationship with the filtered pixel coordinates to be processed can actually be understood as the pixel coordinates in the pixel coordinate set that are the same coordinates as the filtered pixel coordinates to be processed. From the above, it can be seen that the pixel coordinate set and the filtered pixel The coordinate set is actually the same coordinate set. Each pixel coordinate in the pixel coordinate set has the same coordinate in the filtered pixel coordinate set. These two same coordinates can be considered to have a mapping relationship and are actually the same pixel point. coordinate of.
  • the mapped pixel value corresponding to the pixel of the mapped image can be understood as the original pixel value without filtering in the original image (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 original pixel value.
  • the pixel value of the image after filtering (for example, when the filtered image pixel is the above-mentioned image pixel to be processed, the filtered pixel value may refer to the updated pixel value corresponding to the image pixel to be processed).
  • the updated pixel value ie, the filtered pixel value
  • the original pixel value such as the mapped pixel value
  • the value result can be used as the high-frequency information corresponding to the pixel (i.e., the high-frequency pixel value).
  • the high-frequency pixel value corresponding to each pixel is determined, a high-frequency image containing each high-frequency pixel value can be obtained.
  • Formula (4), formula (5) and formula (6) are based on N filter sizes, including filter sizes 5 ⁇ 5, Taking 9 ⁇ 9 and 17 ⁇ 17 as examples, the specific implementation method of extracting high-frequency information.
  • I x, y as shown in formula (4) can be used to characterize the original pixel value corresponding to the pixel point I x, y at the position (x, y) in the original image; It can be used to characterize the filtered pixel value corresponding to the pixel point I x, y determined based on the above formula (1); It can represent the high-frequency pixel value corresponding to the pixel point I x, y .
  • the original pixel value and its filtered pixel value can be difference processed to obtain the high-frequency pixel value of the pixel.
  • a high-frequency image containing each high-frequency pixel value can be obtained.
  • the high-frequency image as shown in equation (4) can correspond to the filter size 5 ⁇ 5.
  • I x, y as shown in formula (5) can be used to characterize the original pixel value corresponding to the pixel point I x, y at the position (x, y) in the original image; It can be used to characterize the filtered pixel value corresponding to the pixel point I x, y determined based on the above formula (2); It can represent the high-frequency pixel value corresponding to the pixel point I x, y .
  • the original pixel value and its filtered pixel value can be difference processed to obtain the high-frequency pixel value of the pixel.
  • a high-frequency image containing each high-frequency pixel value can be obtained.
  • the high-frequency image as shown in equation (5) may correspond to the filter size 9 ⁇ 9.
  • I x, y as shown in formula (6) can be used to characterize the original pixel value corresponding to the pixel point I x, y at the position (x, y) in the original image; It can be used to characterize the filtered pixel value corresponding to the pixel point I x, y determined based on the above formula (3); It can represent the high-frequency pixel value corresponding to the pixel point I x, y .
  • the original pixel value and its filtered pixel value can be difference processed to obtain the high-frequency pixel value of the pixel.
  • a high-frequency image containing each high-frequency pixel value can be obtained.
  • the high-frequency image as shown in equation (6) can correspond to the filter size 17 ⁇ 17.
  • the high-frequency information obtained through small-scale low-pass filtering is relatively weak, while through large-scale low-pass filtering (such as mean filtering with a larger filter size)
  • the high-frequency information obtained by processing is relatively strong.
  • small-scale low-pass filtering can extract the corresponding high-frequency information, while using large-scale low-pass filtering Filtering is likely to result in excessive enhancement of sharp textures.
  • large-scale low-pass filtering is required to extract the corresponding high-frequency information.
  • S104 perform image fusion on N high-frequency images to obtain a fused image, and fuse the fused image with the original image to obtain a sharpened enhanced image corresponding to the original image.
  • the extracted N high-frequency images under different filter sizes can be image fused.
  • image fusion There are many ways of image fusion.
  • this application mainly uses geometric mean image fusion.
  • 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
  • the N high-frequency images include a Taking the first high-frequency image corresponding to a filtered image and the second high-frequency image corresponding to the second filtered image as an example, a specific implementation method for image fusion of the first high-frequency image and the second high-frequency image to obtain the fused image can be is: the first fusion weight corresponding to the first filter size can be obtained, and the second fusion weight corresponding to the second filter size can be obtained; then, the high-frequency image fusion function can be obtained, according to the first fusion weight, the second fusion weight and the high-frequency
  • the image fusion function can fuse the first high-frequency image with
  • the specific implementation method for 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 the fused image can be: according to the high-frequency
  • the image fusion function adds the first fusion weight and the second fusion weight to obtain the operation weight; the first ratio between the first fusion weight and the operation weight can be determined, and the first high-frequency image is processed based on the first ratio.
  • Exponential power operation can be used to obtain the first operation feature; the second ratio between the second fusion weight and the operation weight can be determined, and the second high-frequency image can be subjected to exponential power operation based on the second ratio to obtain the second operation feature; according to The high-frequency image fusion function can geometrically fuse the first operation feature and the second operation feature to obtain a fused image.
  • the high-frequency images may include high-frequency images corresponding to the filter sizes of 5 ⁇ 5, 9 ⁇ 9, and 17 ⁇ 17 respectively.
  • Formula (7) is a method based on geometric mean fusion, which fuses N high-frequency images to obtain the specific implementation method of the fused image:
  • the 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 5 ⁇ 5 (when the filter size is the first filter size, the weight parameter can be called is the first fusion weight); ⁇ can be used to characterize the weight parameter corresponding to the filter size 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 filter size The weight parameter corresponding to 17 ⁇ 17 (when it is the second filter size, the weight parameter can be called the second fusion weight).
  • the values of ⁇ , ⁇ and ⁇ in this application can be 0.3, 0.4 and 0.3 respectively. Of course, the value of this parameter is not limited to this.
  • This application has It is not limiting. It can be used to characterize 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.
  • is used When characterizing the first fusion weight, It can be used to characterize the first ratio; It can be used to characterize 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.
  • the corresponding high-frequency image is the second high-frequency image
  • is used When characterizing the second fusion weight, It can be used to characterize the second ratio; It can be used to characterize 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.
  • is used When characterizing the second fusion weight, It can be used to characterize the second ratio. It can be used to characterize the fused pixel value of the pixel at position (x, y) obtained after fusing the high-frequency pixel values in each high-frequency image.
  • the geometric fusion in this application may refer to performing the operation processing (such as multiplication operation processing) on the first operation feature and the first operation feature as shown in formula (7), and the result obtained after the operation processing is is the fusion result obtained after geometric fusion.
  • the fused high-frequency information can be added to the original image, that is, the fused image and the original image can be fused.
  • the high-frequency information in the original image can be enhanced to obtain the corresponding original image. Sharpen the image.
  • the specific implementation method of fusing the fused image with the original image can be shown in formula (8):
  • I x, y can be used to characterize the original pixel value of the pixel point with position coordinates (x, y) in the original image; It can be used to represent the fused pixel value of the pixel whose position coordinates are (x, y); I′ x, y can be used to represent the fused high-frequency pixel value.
  • the sharpening enhancement pixel value also called sharpening pixel value.
  • the original image pixel (or image pixel) that has a mapping relationship with the remapped pixel can be obtained in the original image, where having a mapping relationship can mean With the relationship of the same pixel coordinates, and then adding the pixel values of the two pixels, the sharpened pixel value of the pixel at the coordinates can be obtained. That is: add the remapped pixel value at the same position coordinate to the original image pixel value (or image pixel value) to obtain the sharpened pixel value of the pixel at the position coordinate, and then obtain the sharpened pixel value at each position coordinate.
  • you sharpen pixel values you get a sharpened image that contains each sharpened pixel value.
  • low-pass filtering of different scales can be used to extract high-frequency information of different types of textures (that is, low-pass filtering is performed on the original image based on different filter sizes to obtain different After filtering the images, high-frequency images corresponding to 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 (i.e., the fused image) can be obtained, After fusing the fused image with the original image, a sharpened enhanced image can be obtained.
  • the sharpened enhanced image is obtained by reasonably enhancing both the gentle texture and the sharp texture in the original image based on different scales, so the sharpened enhanced image has high image quality.
  • this application can improve the quality of sharpened images in the image sharpening business.
  • the 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 , add the fused pixel value to the original pixel value) to obtain a sharpened enhanced image.
  • the fused high-frequency information ie, fused pixel values
  • it can be linearly remapped and truncated to obtain the processed fused pixel values.
  • the remaining original pixel values are fused.
  • Figure 6 please refer to Figure 6 as well.
  • Figure 6 is a schematic flowchart of fusing the original image and the fused image to obtain a sharpened enhanced image provided by 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 enhanced image corresponding to the original image in the embodiment corresponding to FIG. 4 . As shown in Figure 6, the process may include at least the following S201-S202:
  • S201 Perform remapping processing on the fused image to obtain a remapped fused image.
  • the remapping fusion image may refer to an image containing a remapping pixel value, and the remapping pixel value may be determined by comparing the fusion pixel value corresponding to the fusion image with a pixel value threshold according to the remapping function.
  • every pixel in the fused image is the same as every pixel in the original image, but the pixel value of each pixel may be different.
  • its unprocessed pixel value can be called the original pixel value
  • the pixel value in a certain filtered image can be called the filtered pixel value
  • the pixel value in a certain high-frequency image can be called the filtered pixel value.
  • the pixel values can be called high-frequency pixel values
  • the pixel values in the fused image can be called fused pixel values.
  • a possible implementation method of performing remapping processing on the fused image to obtain the remapped fused image can be: obtaining the fused image pixels corresponding to the fused image, and obtaining the fused pixel values corresponding to the fused image pixels; then, you can obtain The remapping function is used to determine the remapping pixel value corresponding to the fusion image pixel based on the remapping function and the fusion pixel value; then, the image containing the remapping pixel value can be determined as the remapping fusion image.
  • a possible implementation method for determining the remapped pixel value corresponding to the fused image pixel according to the remapping function and the fused pixel value can be: according to the remapping function, compare the fused pixel value with the pixel value threshold; if the fusion If the 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 fusion image pixel; if the fusion pixel value is less than the pixel value threshold, the fusion pixel value can be compared with the preset fusion coefficient. Multiplication processing is performed to obtain the remapped pixel values corresponding to the pixels of the fused image.
  • the filtered pixel value corresponding to each pixel is determined based on the original pixel value
  • the high-frequency pixel value is determined based on the filtered pixel value
  • the fused pixel value is determined based on the high-frequency pixel value.
  • 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. Pair each pixel After remapping and truncation of the corresponding fused pixel values (which can be referred to as remapping processing), the remapped pixel value corresponding to each pixel can be obtained.
  • Formula (9) is a specific implementation method for remapping the fused image to obtain the remapping fused image.
  • the function shown in formula (9) can be used to characterize the remapping function; It can be used to characterize the fused pixel value of a pixel whose position coordinates are (x, y); It can be used to characterize the remapped pixel value of the pixel whose position coordinates are (x, y); 0.25 can be used to characterize the pixel value threshold, which can be an artificially specified value (0.25 is only used as an example here. In fact, The pixel value threshold can be any other reasonable value, which is not limited in this application).
  • 0.8 can be a preset fusion coefficient, and the preset fusion coefficient can be an artificially prescribed value (0.8 is only used as an example here.
  • the preset fusion coefficient can be any other reasonable value, which is not limited in this application) .
  • the preset fusion coefficient can be multiplied by the fusion pixel value, and the result can be used as the sharpened pixel value; when the fusion pixel value is greater than or equal to the pixel value threshold, that is The default pixel parameter 0.2 can be used as the sharpening pixel value.
  • the preset pixel parameters can also be other reasonable values, and 0.2 is only one of the reasonable values and is described as an example.
  • One possible implementation method of fusing the remapping fusion image with the original image to obtain a sharpened enhanced image may be: obtaining the remapping pixels corresponding to the remapping fusion image, and obtaining the remapping pixel values corresponding to the remapping pixels; and then , you can obtain the image pixels corresponding to the original image, and obtain the image pixel values corresponding to the image pixels; add the remapped pixel values to the image pixel values to obtain the sharpened pixel values; you can convert the image containing the sharpened pixel values, Confirm to sharpen the image.
  • the remapped high-frequency information (ie, the remapped pixel value) can be added to the original image, that is, the remapped fusion image and The original images are fused, whereby the high-frequency information in the original images can be enhanced to obtain a sharpened enhanced image corresponding to the original image. That is: the remapped pixel value corresponding to each pixel point (i.e., image pixel) can be added to the original pixel value, so that the sharpened pixel value corresponding to each image pixel can be obtained, and then the sharpened pixel value corresponding to each image pixel can be obtained. Sharpen the image by sharpening the pixel values.
  • the specific implementation method of determining the sharpening enhanced image based on the remapped pixel value and the original pixel value can be as shown in formula (10):
  • I x, y can be used to characterize the original pixel value of the pixel point with position coordinates (x, y) in the original image; It can be used to represent the remapped pixel value of the pixel whose position coordinates are (x, y ); I′ ).
  • a sharpened image containing each sharpened pixel value can be obtained.
  • low-frequency images ie, N filtered images
  • the original image itself is combined with each filtered image, that is, The corresponding high-frequency information of each filtered image can be extracted (that is, N high-frequency images are obtained).
  • this application can fuse them to obtain a fused image.
  • the processed fused image can be combined with The original images are fused again, so that the high-frequency intensity of the original images can be enhanced from different scales (filter sizes) to obtain a sharpened enhanced image.
  • the high-frequency information obtained is also high-frequency information under different filter sizes, which can be used to filter different types of image details (such as smooth textures and complex sharp ones).
  • Texture has strong adaptive ability (for example, for complex and 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 The corresponding high-frequency information can be extracted through filtering and the corresponding enhancement can be achieved), that is, the detailed information of the original image can be enhanced from different scales, thereby improving the sharpening quality of the image and improving the clarity of the image.
  • this application can improve the quality of sharpened images in the image sharpening business.
  • FIG. 7 is a schematic structural diagram of a data processing device provided by an embodiment of the present application.
  • the data processing device may be a computer program (including program instructions) running in a computer device, for example, the data processing device may be an application software; the data processing device may be used to execute the method shown in FIG. 4 .
  • 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 .
  • the size acquisition module 11 is used to obtain a filter size set for filtering processing; the filter size set includes N filter sizes, and N is a positive integer greater than 1; any two filter sizes among the N filter sizes are different;
  • the filter module 12 is used to perform low-pass filtering on the original image based on each filter size to obtain N filtered images;
  • the image conversion module 13 is used to perform image conversion on N filtered images respectively according to the original image to obtain N high-frequency images;
  • the image fusion module 14 is used to image fuse N high-frequency images to obtain a fused image
  • the image sharpening module 15 is used to fuse the fused image with the original image to obtain a sharpened enhanced image corresponding to the original image.
  • the filtering module 12 for the specific implementation 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, please refer to the description of S101-S104 in the embodiment corresponding to the above-mentioned Figure 4, which will not be mentioned here. Let’s go into details.
  • each of the N filter sizes is taken as a filter size Si
  • the filtered image corresponding to the filter size Si is taken as a filtered image Ti , i is a positive integer
  • the filtering module 12 may include: a set acquisition unit 121, a coordinate acquisition unit 122, a neighborhood coordinate determination unit 123, and a filtered image determination unit 124.
  • the set acquisition unit 121 is used to acquire the image pixel set corresponding to the original image, and to acquire the pixel coordinate set corresponding to the image pixel set;
  • the coordinate acquisition unit 122 is used to acquire the image pixels to be processed in the image pixel set, and acquire the pixel coordinates to be processed corresponding to the image pixels to be processed in the pixel coordinate set;
  • the neighborhood coordinate determination unit 123 is used to obtain the coordinate change amount indicated by the filter size Si , and determine the neighborhood pixel coordinates for the pixel coordinates to be processed in the pixel coordinate set according to the pixel coordinates to be processed and the coordinate change amount;
  • the filtered image determination unit 124 is used to determine the filtered image Ti corresponding to the filter size Si according to the pixel coordinates to be processed and the neighbor pixel coordinates.
  • the set acquisition unit 121 For the specific implementation of the set acquisition unit 121, the coordinate acquisition unit 122, the neighborhood coordinate determination unit 123, and the filtered image determination unit 124, please refer to the description of S102 in the embodiment corresponding to Figure 4 above, and will not be described again here.
  • the filtered image determination unit 124 may include: a pixel operation sub-unit 1241 and a pixel update sub-unit 1242.
  • the pixel operation subunit 1241 is used to obtain the neighborhood image pixels corresponding to the neighborhood pixel coordinates in the image pixel set;
  • the pixel operation subunit 1241 is also used to obtain the neighborhood pixel value of the neighborhood image pixel, and obtain the pixel value of the image pixel to be processed;
  • the pixel operation subunit 1241 is also used to add the neighborhood pixel value and the pixel value of the image pixel to be processed to obtain a pixel operation value;
  • Pixel update subunit 1242 is used to determine the ratio between the pixel operation value and the total number of pixels as the updated pixel value corresponding to the image pixel to be processed; the total number of pixels is the number of neighborhood image pixels and the number of image pixels to be processed. Sum;
  • the pixel update subunit 1242 is also used to determine the updated pixel value corresponding to each image pixel in the image pixel set, and determine the image containing the updated pixel value corresponding to each image pixel to be corresponding to the filter size Si filtered image Ti .
  • each of the N filter sizes is taken as a filter size Si
  • the filtered image corresponding to the filter size Si is taken as the filtered image Ti
  • the high-frequency image corresponding to the filtered image Ti is taken as As the high-frequency image Z, i is a positive integer
  • the image conversion module 13 may include: a pixel coordinate acquisition unit 131 and a high-frequency image determination unit 132.
  • the pixel coordinate acquisition unit 131 is used to acquire the image pixel set corresponding to the original image, and acquire the pixel coordinate set corresponding to the image pixel set;
  • the pixel coordinate acquisition unit 131 is also used to acquire the filtered image pixel set corresponding to the filtered image Ti , and to acquire the filtered pixel coordinate set corresponding to the filtered image pixel set;
  • the high-frequency image determination unit 132 is used to determine the high-frequency image Zi corresponding to the filtered image Ti according to the pixel coordinate set and the filtered pixel coordinate set.
  • the pixel coordinate acquisition unit 131 and the high-frequency image determination unit 132 please refer to the relevant description of determining the high-frequency image in S103 in the embodiment corresponding to FIG. 4, and will not be described again here.
  • the high-frequency image determination unit 132 may include: a high-frequency pixel value determination sub-unit 1321 and a high-frequency image determination sub-unit 1322.
  • the high-frequency pixel value determination subunit 1321 is used to obtain the filtered pixel coordinates to be processed in the filtered pixel coordinate set, and determine the pixel coordinates in the pixel coordinate set that have a mapping relationship with the filtered pixel coordinates to be processed as mapped pixel coordinates;
  • the high-frequency pixel value determination subunit 1321 is also used to obtain the mapped image pixels corresponding to the mapped pixel coordinates in the image pixel set, and to obtain the to-be-processed filtered pixels corresponding to the filtered pixel coordinates to be processed in the filtered image pixel set;
  • the high-frequency pixel value determination subunit 1321 is also used to obtain the mapped pixel value corresponding to the mapped image pixel, and to obtain the filtered pixel value corresponding to the filtered pixel to be processed;
  • the high-frequency pixel value determination subunit 1321 is also used 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;
  • the high-frequency image determination subunit 1322 is used to determine the image containing the high-frequency pixel value corresponding to each filtered image pixel in the filtered image pixel set when the high-frequency pixel value corresponding to each filtered image pixel in the filtered image pixel set is determined. is the high-frequency image Zi corresponding to the filtered image Ti .
  • 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.
  • the high-frequency image includes a first high-frequency image corresponding to the first filtered image and a second high-frequency image corresponding to the second filtered image;
  • the image fusion module 14 may include: a weight fusion unit 141 and a high-frequency image fusion unit 142.
  • the weight fusion unit 141 is used to obtain the first fusion weight corresponding to the first filter size, and obtain the second fusion weight corresponding to the second filter size;
  • High-frequency image fusion unit 142 used to obtain a high-frequency image fusion function
  • the high-frequency image fusion unit 142 is also configured to image-fuse 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.
  • weight fusion unit 141 and the high-frequency image fusion unit 142 please refer to the relevant description of image fusion in S104 in the embodiment corresponding to Figure 4, and will not be described again here.
  • the high-frequency image fusion unit 142 may include: a weight operation sub-unit 1421, an image operation sub-unit 1422, and a feature fusion sub-unit 1423.
  • 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 the operation weight;
  • the image operation subunit 1422 is used to determine the 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 the first operation feature;
  • the image operation subunit 1422 is also used to determine the second ratio between the second fusion weight and the operation weight, and perform exponential power operation on the second high-frequency image based on the second ratio to obtain the second operation feature;
  • the feature fusion subunit 1423 is used 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.
  • weight operation sub-unit 1421 For the specific implementation of the weight operation sub-unit 1421, the image operation sub-unit 1422 and the feature fusion sub-unit 1423, please refer to the description of S104 in the embodiment corresponding to Figure 4 above, and will not be described again here.
  • the image sharpening module 15 may include: a remapping unit 151 and an image sharpening unit 152.
  • the remapping unit 151 is used to perform remapping processing on the fused image to obtain a remapped fused image
  • the image sharpening unit 152 is used to fuse the remapped fusion image with the original image to obtain a sharpened enhanced image.
  • a remapped fusion image refers to an image containing remapped pixel values.
  • the remapped pixel values are determined by comparing the fused pixel values corresponding to the fused image with a pixel value threshold according to the remapping function.
  • the remapping unit 151 may include: a remapping value determination subunit 1511 and a remapping image determination subunit 1512.
  • the remapping value determination subunit 1511 is used to obtain the fused image pixels corresponding to the fused image, and to obtain the fused pixel values corresponding to the fused image pixels;
  • the remapping value determination subunit 1511 is also used to obtain the remapping function
  • the remapping value determination subunit 1511 is also used to determine the remapping pixel value corresponding to the fused image pixel according to the remapping function and the fused pixel value;
  • the remapped image determination subunit 1512 is used to determine an image containing remapped pixel values as a remapped fusion image.
  • the remapping value determination subunit 1511 is also specifically used to compare the fused pixel value with the pixel value threshold according to the remapping function;
  • the remapping value determination subunit 1511 is also specifically configured to determine the preset pixel parameter as the remapping pixel value corresponding to the fusion image pixel if the fusion pixel value is greater than or equal to the pixel value threshold;
  • the remapping value determination subunit 1511 is also specifically configured to multiply the fused pixel value and the preset fusion coefficient to obtain the remapped pixel value corresponding to the fused image pixel if the fused pixel value is less than the pixel value threshold.
  • the image sharpening unit 152 may include: a sharpening value determination subunit 1521 and a sharpened image determination subunit 1522.
  • the sharpening value determination subunit 1521 is used to obtain the remapped pixels corresponding to the remapped fusion image, and to obtain the remapped pixel values corresponding to the remapped pixels;
  • the sharpening value determination subunit 1521 is also used to obtain the image pixels corresponding to the original image, and to obtain the image pixel values corresponding to the image pixels;
  • the sharpening value determination subunit 1521 is also used to add the remapped pixel value and the image pixel value to obtain the sharpened pixel value;
  • the sharpened image determination subunit 1522 is used to determine an image containing sharpened pixel values as a sharpened enhanced image.
  • sharpening value determination sub-unit 1521 and the sharpened image determination sub-unit 1522 please refer to the description in S202 in the embodiment corresponding to Figure 7 above, and will not be described again here.
  • low-frequency images ie, N filtered images
  • the original image itself is combined with each filtered image, that is, The corresponding high-frequency information of each filtered image can be extracted (that is, N high-frequency images are obtained).
  • this application can fuse them to obtain a fused image.
  • the processed fused image can be fused with the original image again, so that the high-frequency intensity of the original image can be enhanced from different scales (filter size) to obtain sharpening enhancement. image.
  • the high-frequency information obtained is also high-frequency information under different filter sizes, which can be used to filter different types of image details (such as smooth textures and complex sharp ones).
  • Texture has strong adaptive ability (for example, for complex and 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 The corresponding high-frequency information can be extracted through filtering and the corresponding enhancement can be achieved), that is, the detailed information of the original image can be enhanced from different scales, thereby improving the sharpening quality of the image and improving the clarity of the image.
  • this application can improve the quality of sharpened images in the image sharpening business.
  • FIG. 8 is a schematic structural diagram of a computer device provided by an embodiment of the present application.
  • the device 1 in the embodiment corresponding to Figure 7 can be applied to the above computer device 8000.
  • the above computer device 8000 can include: a processor 8001, a network interface 8004 and a memory 8005.
  • the above computer device 8000 also Including: user interface 8003, and at least one communication bus 8002.
  • the communication bus 8002 is used to realize connection communication between these components.
  • the user interface 8003 may include a display screen (Display) and 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 or a wireless interface (such as a WI-FI interface).
  • the memory 8005 may be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory.
  • the memory 8005 may optionally be at least one storage device located remotely from the aforementioned processor 8001. As shown in Figure 8, memory 8005, which is a computer-readable storage medium, may include an operating system, a network communication module, a user interface module, and a device control application program.
  • the network interface 8004 can provide network communication functions;
  • the user interface 8003 is mainly used to provide an input interface for the user; and
  • the processor 8001 can be used to call the device control application stored in the memory 8005 program to achieve:
  • the filter size set used for filtering processing; the filter size set includes N filter sizes, N is a positive integer greater than 1; any two filter sizes among the N filter sizes are different;
  • the computer device 8000 described in the embodiment of the present application can perform the data processing method described in the embodiment corresponding to FIG. 4 to FIG. 7, and can also perform the data processing method in the embodiment corresponding to FIG. 7.
  • the description of device 1 will not be repeated here.
  • the description of the beneficial effects of using the same method will not be described again.
  • the embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores the computer program executed by the aforementioned data processing computer device 8000, and
  • the above-mentioned computer program includes program instructions.
  • the above-mentioned processor executes the above-mentioned program instructions, the above-mentioned data processing method described in the embodiment corresponding to FIG. 4 to FIG. 7 can be executed. Therefore, the details will not be described here.
  • the description of the beneficial effects of using the same method will not be described again.
  • technical details not disclosed in the computer-readable storage medium embodiments involved in this application please refer to the description of the method embodiments in this application.
  • the above-mentioned computer-readable storage medium may be the data processing apparatus provided in any of the foregoing embodiments or the internal storage unit of the above-mentioned computer equipment, such as the hard disk or memory of the computer equipment.
  • the computer-readable storage medium can 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 equipped on the computer device, Flash card, etc.
  • the computer-readable storage medium may also include both an 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 can also be used to temporarily store data that has been output or is to be output.
  • a computer program product includes a computer program, and the computer program is stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the method provided in one aspect of the embodiment of the present application.
  • each process and/or the method flowcharts and/or structural schematic diagrams can be implemented by computer program instructions. or blocks, and combinations of processes and/or blocks in flowcharts and/or block diagrams.
  • These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions executed by the processor of the computer or other programmable data processing device produce a use A device for realizing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the structural diagram.
  • These computer program instructions may also be stored in a computer-readable memory that causes a computer or other programmable data processing apparatus to operate in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction means, the instructions
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or in one block or multiple blocks in the structural diagram.
  • These computer program instructions may also be loaded onto a computer or other programmable data processing device, causing a series of operating steps to be performed on the computer or other programmable device to produce computer-implemented processing, thereby executing on the computer or other programmable device. Instructions provide steps for implementing the functions specified in a process or processes of a flowchart and/or a block or blocks of a structural representation.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

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.

Description

一种数据处理方法、装置、设备以及可读存储介质A data processing method, device, equipment and readable storage medium
本申请要求于2022年4月24日提交中国专利局、申请号202210432913.5、申请名称为“一种数据处理方法、装置、设备以及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application submitted to the China Patent Office on April 24, 2022, with application number 202210432913.5 and the application title "A data processing method, device, equipment and readable storage medium", and its entire content is approved by This reference is incorporated into this application.
技术领域Technical field
本申请涉及计算机技术领域,尤其涉及数据处理技术。This application relates to the field of computer technology, and in particular to data processing technology.
背景技术Background technique
随着数字化时代的到来,图像可以交由计算机进行处理,人们便对图像的清晰度有了更高的要求,而将模糊的图像变得清晰的图像处理过程,称之为图像锐化。图像模糊的原因有很多,比如摄像仪器在获取图像时发生抖动,扫描设备的光学元件设计不良,或图像信号传输的过程中受到噪声的干扰等。从图像频谱分析的角度来说,图像模糊是因为图像中的高频分量不足,导致图像的锐利度不够。所以我们对模糊图像进行图像锐化,实质就是合理的提高图像中的高频分量。With the advent of the digital age, images can be processed by computers, and people have higher requirements for image clarity. The image processing process of making blurry images clear is called image sharpening. There are many reasons for blurred images, such as camera shake when acquiring images, poor design of optical components of 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 insufficient sharpness of the image. Therefore, when we perform image sharpening on blurred images, the essence is to reasonably increase the high-frequency components in the image.
目前,图像锐化方法是单纯的增强图像中的高频分量,使得图像边缘部分的亮度差异提高,从而达到锐化的效果。At present, the image sharpening method simply enhances the high-frequency components in the image, which increases the brightness difference at the edge of the image, thereby achieving the sharpening effect.
然而,这种方法会使得图像中的各个细节所表现出来的图像信息变得不合理,使锐化后图像失真比较大,锐化后的图像质量并不高。However, this method will make the image information expressed by each detail in the image unreasonable, causing the image distortion after sharpening to be relatively large, and the image quality after sharpening is not high.
发明内容Contents of the invention
本申请实施例提供一种数据处理方法、装置、设备以及可读存储介质,可以提高在图像锐化业务中,提高锐化后的图像质量。Embodiments of the present application provide a data processing method, device, equipment and readable storage medium, which can improve the quality of sharpened images in the image sharpening business.
本申请实施例一方面提供了一种数据处理方法,该方法由计算机设备执行,包括:On the one hand, embodiments of the present application provide a data processing method, which is executed by a computer device and includes:
获取用于进行滤波处理的滤波尺寸集合;滤波尺寸集合中包括N个滤波尺寸,N为大于1的正整数;N个滤波尺寸中的任意两个滤波尺寸不同;Obtain the filter size set used for filtering processing; the filter size set includes N filter sizes, N is a positive integer greater than 1; any two filter sizes among the N filter sizes are different;
基于每个滤波尺寸分别对原始图像进行低通滤波处理,得到N个滤波图像;Perform low-pass filtering on the original image based on each filter size to obtain N filtered images;
根据原始图像将N个滤波图像分别进行图像转换,得到N个高频图像;Perform image conversion on N filtered images respectively based on the original image to obtain N high-frequency images;
将N个高频图像进行图像融合,得到融合图像,并将融合图像与原始图像进行融合,得到原始图像对应的锐化增强图像。Perform image fusion on N high-frequency images to obtain a fused image, and fuse the fused image with the original image to obtain a sharpened enhanced image corresponding to the original image.
本申请实施例一方面提供了一种数据处理装置,该装置部署在计算机设备上,包括:On the one hand, embodiments of the present application provide a data processing device, which is deployed on a computer device and includes:
尺寸获取模块,用于获取用于进行滤波处理的滤波尺寸集合;滤波尺寸集合中包括N个滤波尺寸,N为大于1的正整数;N个滤波尺寸中的任意两个滤波尺寸不同;The size acquisition module is used to obtain a filter size set used for filtering; the filter size set includes N filter sizes, and N is a positive integer greater than 1; any two filter sizes among the N filter sizes are different;
滤波模块,用于基于每个滤波尺寸分别对原始图像进行低通滤波处理,得到N个滤波图像;The filter module is used to perform low-pass filtering on the original image based on each filter size to obtain N filtered images;
图像转换模块,用于根据原始图像将N个滤波图像分别进行图像转换,得到N个高频图像;The image conversion module is used to perform image conversion on N filtered images respectively based on the original image to obtain N high-frequency images;
图像融合模块,用于将N个高频图像进行图像融合,得到融合图像; The image fusion module is used to image fuse 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 enhanced image corresponding to the original image.
本申请实施例一方面提供了一种计算机设备,包括:处理器和存储器;On the one hand, embodiments of the present application provide a computer device, including: a processor and a memory;
存储器存储有计算机程序,计算机程序被处理器执行时,使得处理器执行本申请实施例中的方法。The memory stores a computer program. When the computer program is executed by the processor, it causes the processor to execute the method in the embodiment of the present application.
本申请实施例一方面提供了一种计算机可读存储介质,计算机可读存储介质存储有计算机程序,计算机程序包括程序指令,程序指令当被处理器执行时,执行本申请实施例中的方法。On the one hand, embodiments of the present application provide a computer-readable storage medium. The computer-readable storage medium stores a computer program. The computer program includes program instructions. When executed by a processor, the program instructions execute the methods in the embodiments of the present application.
本申请的一个方面,提供了一种计算机程序产品,该计算机程序产品包括计算机程序,该计算机程序存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机程序,处理器执行该计算机程序,使得该计算机设备执行本申请实施例中一方面提供的方法。In one aspect of the present application, a computer program product is provided. The computer program product includes a computer program, and the computer program is stored in a computer-readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the method provided in one aspect of the embodiment of the present application.
在本申请实施例中,对于某个图像(如原始图像),可采用不同的N个滤波尺寸,分别对原始图像进行低通滤波处理,由此可得到N个不同的滤波图像;随后,可以根据原始图像将N个不同的滤波图像进行图像转换,得到N个不同的高频图像;该N个不同的高频图像即可用于锐化增强。例如,可以将N个高频图像进行图像融合,得到融合图像后,再将融合图像与原始图像进行融合,也就是将融合后的包含多尺寸下的高频信息,添加到原始图像中,即将原始图像中各个尺寸下的高频信息进行了增强,那么由此即可得到原始图像对应的锐化增强图像。应当理解,本申请通过不同的滤波尺寸对原始图像进行低通滤波处理后,可以得到不同滤波尺寸下的低频图像(即N个滤波图像),然后通过原始图像本身与各个滤波图像,即可提取得到每个滤波图像各自对应的高频信息(即得到N个高频图像),对于多尺度的高频图像,本申请可以对其进行融合处理得到融合图像,处理后的融合图像可以与原始图像进行再次融合,从而可以从不同尺度(滤波尺寸)增强原始图像的高频强度,得到锐化增强图像。此外,由于本申请是采用不同滤波尺寸对原始图像同时进行低通滤波处理,所得到的高频信息也是不同滤波尺寸下的高频信息,可以对不同类型的图像细节(如平缓纹理与复杂锐利纹理)具有强自适应能力(如,对于复杂锐利纹理,基于低滤波尺寸的低通滤波处理便可以提取到对应的高频信息,并实现对应的增强;对于平缓纹理,基于高滤波尺寸的低通滤波处理可以提取到对应的高频信息,并实现对应的增强),即可以达到从不同尺度增强原始图像的细节信息,进而可以提升图像的锐化质量,提升图像的清晰度。综上,本申请可以在图像锐化业务中,提高锐化后的图像质量。In this 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 respectively, thereby obtaining N different filtered images; subsequently, Image conversion is performed on N different filtered images based on the original image to obtain N different high-frequency images; the N different high-frequency images can be used for sharpening enhancement. For example, N high-frequency images can be image fused. After obtaining the fused image, the fused image can be fused with the original image. That is, the fused high-frequency information containing multiple sizes can be added to the original image, that is, The high-frequency information at each size in the original image is enhanced, so the sharpened image corresponding to the original image can be obtained. It should be understood that after this application performs low-pass filtering on the original image through different filter sizes, low-frequency images (ie, N filtered images) under different filter sizes can be obtained, and then through the original image itself and each filtered image, the low-frequency images can be extracted The corresponding high-frequency information of each filtered image is obtained (that is, N high-frequency images are obtained). For multi-scale high-frequency images, this application can fuse them to obtain a fused image. The processed fused image can be compared with the original image. Fusion is performed again, so that the high-frequency intensity of the original image can be enhanced from different scales (filter sizes) to obtain a sharpened enhanced image. In addition, since this 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, which can be used to filter different types of image details (such as smooth textures and complex sharp ones). Texture) has strong adaptive ability (for example, for complex and 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 The corresponding high-frequency information can be extracted through filtering and the corresponding enhancement can be achieved), that is, the detailed information of the original image can be enhanced from different scales, thereby improving the sharpening quality of the image and improving the clarity of the image. In summary, this application can improve the quality of sharpened images in the image sharpening business.
附图说明Description of the drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without exerting creative efforts.
图1是本申请实施例提供的一种网络架构图;Figure 1 is a network architecture diagram provided by an embodiment of the present application;
图2是本申请实施例提供的一种对图像进行锐化处理的场景示意图;Figure 2 is a schematic diagram of a scene for sharpening an image provided by an embodiment of the present application;
图3是本申请实施例提供的一种图像处理场景示意图; Figure 3 is a schematic diagram of an image processing scenario provided by an embodiment of the present application;
图4是本申请实施例提供的一种数据处理方法的流程示意图;Figure 4 is a schematic flowchart of a data processing method provided by an embodiment of the present application;
图5是本申请实施例提供的一种基于均值滤波进行像素处理的示意图;Figure 5 is a schematic diagram of pixel processing based on mean filtering provided by an embodiment of the present application;
图6是本申请实施例提供的一种融合原始图像与融合图像,得到锐化增强图像的流程示意图;Figure 6 is a schematic flowchart of fusing the original image and the fused image to obtain a sharpened and enhanced image provided by an embodiment of the present application;
图7是本申请实施例提供的一种数据处理装置的结构示意图;Figure 7 is a schematic structural diagram of a data processing device provided by an embodiment of the present application;
图8是本申请实施例提供的一种计算机设备的结构示意图。FIG. 8 is a schematic structural diagram of a computer device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of this application.
本申请涉及人工智能等相关技术,例如涉及人工智能中的计算机视觉技术,本申请的方案具体涉及计算机视觉技术中的图像处理技术,可以实现对图像进行锐化增强处理,以得到图像质量更高的锐化增强图像。又如还可以涉及人工智能中的机器学习,通过机器学习可以训练得到目标图像模型,以便利用目标图像模型对待识别对象所属的区域进行识别。This application relates to artificial intelligence and other related technologies, such as computer vision technology in artificial intelligence. The solution of this application specifically relates to image processing technology in computer vision technology, which can achieve sharpening and enhancement processing of images to obtain higher image quality. Sharpen the image. Another example can also involve machine learning in artificial intelligence. Through machine learning, a target image model can be trained, so that the target image model can be used to identify the area to which the object to be identified belongs.
请参见图1,图1是本申请实施例提供的一种网络架构的结构示意图。如图1所示,该网络架构可以包括业务服务器1000和终端设备集群(即终端设备集群)。该终端设备集群可以包括一个或者多个终端设备,这里将不对终端设备的数量进行限制。如图1所示,多个终端设备具体可以包括终端设备100a、终端设备100b、终端设备100c、…、终端设备100n。如图1所示,终端设备100a、终端设备100b、终端设备100c、…、终端设备100n可以分别与上述业务服务器1000进行网络连接,以便于每个终端设备可以通过该网络连接与业务服务器1000进行数据交互。其中,这里的网络连接不限定连接方式,可以通过有线通信方式进行直接或间接地连接,也可以通过无线通信方式进行直接或间接地连接,还可以通过其他方式,本申请在此不做限制。Please refer to Figure 1. Figure 1 is a schematic 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 service server 1000 and a terminal device cluster (ie, terminal device cluster). The terminal device cluster may include one or more terminal devices, and there will be no limit on the number of terminal devices here. As shown in Figure 1, multiple terminal devices may specifically include terminal devices 100a, terminal devices 100b, terminal devices 100c,..., terminal devices 100n. As shown in Figure 1, the terminal device 100a, the terminal device 100b, the terminal device 100c,..., the terminal device 100n can each have a network connection with the above-mentioned service server 1000, so that each terminal device can communicate with the service server 1000 through the network connection. Data interaction. The network connection here is not limited to a connection method. It can be connected directly or indirectly through wired communication, or directly or indirectly through wireless communication. It can also be connected through other methods. This application does not limit it here.
如图1所示的每个终端设备均可以集成安装有应用,当该应用运行于各终端设备中时,则每个终端设备对应的后台服务器可以对应用中的业务数据进行存储,并与上述图1所示的业务服务器1000之间进行数据交互。其中,该应用可以包括具有显示文字、图像、音频以及视频等数据信息功能的应用。如,应用可以为多媒体应用(如视频应用),可以用于用户上传图片或视频,也可以用于用户播放观看他人上传的图像或视频;应用也可以为娱乐类应用(如游戏应用),可以用于用户进行游戏。应用也可以为其他具备数据信息处理功能的应用,如浏览器应用、社交应用、图像美化应用等等,这里将不对应用进行一一举例说明。终端设备上集成安装的应用也可以为小程序,即只需要下载到浏览器环境中就可以运行的程序独立的程序,当然,终端设备上集成安装的应用可以为独立应用,也可以为嵌入在某一应用中的子应用(如小程序),该子应用可以由用户控制运行或关闭。总而言之,终端设备上集成安装的应用可以为任意形式的应用、模块或插件,对此不进行限定。As shown in Figure 1, each terminal device can be integrated and installed with an application. When the application is run in each terminal device, the background server corresponding to each terminal device can store the business data in the application and coordinate it with the above Data exchange is performed between the business servers 1000 shown in Figure 1 . Among them, the application may include an application with the function of displaying data information such as text, images, audio, and video. For example, the application can be a multimedia application (such as a video application), which can be used by users to upload pictures or videos, or can be used by users to play and watch images or videos uploaded by others; the application can also be an entertainment application (such as a game application), which can be Used for users to play games. The application can also be other applications with data information processing functions, such as browser applications, social networking applications, image beautification applications, etc. Here we will not give examples of applications one by one. The applications integrated and installed on the terminal device can also be small programs, that is, independent programs that only need to be downloaded to the browser environment to run. Of course, the applications integrated and installed on the terminal device can be independent applications or embedded in the browser environment. A sub-application (such as an applet) in an application, which can be run or closed under user control. All in all, the applications integrated and installed on the terminal device can be any form of application, module or plug-in, and there is no limit to this.
本申请实施例可以在多个终端设备中选择一个终端设备作为目标终端设备,该终端设备可以包括:智能手机、平板电脑、笔记本电脑、桌上型电脑、智能电视、智能音箱、台式计算机、智能手表、智能车载终端、智能语音交互设备、智能家电、飞行器等等携带数据处理功能(如图像数据处理功能)的智能终端,但并不局限于此。例如,本申请实施例可以将图1所示的终端设备100a作为该目标终端设备,该目标终端设备中可以集成有上述目标应用,此时,该目标终端设备可以与业务服务器1000之间进行数据交互。 In this embodiment of the present application, one terminal device can be selected as the target terminal device from multiple terminal devices. The terminal device may include: a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart TV, a smart speaker, a desktop computer, a smart phone Smart terminals carrying data processing functions (such as image data processing functions), such as watches, smart vehicle terminals, smart voice interaction devices, smart home appliances, aircraft, etc., but are not limited to these. For example, in this embodiment of the present application, the terminal device 100a shown in FIG. 1 can be used as the target terminal device, and the target terminal device can be integrated with the above-mentioned target application. At this time, the target terminal device can perform data exchange with the business server 1000. Interaction.
例如,用户在使用终端设备中的某个应用(如图像美化应用)时,业务服务器1000通过该终端设备,可以检测并收集到该用户上传了一张包含待识别对象(如用户或其他如某个动物的对象)的图像(该图像可作为未经过处理的原始图像),业务服务器1000可以对该原始图像进行图像锐化处理,以增强该原始图像的图像质量(如增强原始图像的清晰度)。在对该原始图像进行图像锐化处理得到锐化增强图像后,业务服务器1000还可以识别出该锐化增强图像中待识别对象所属的区域,并将该区域从该原始图像中提取出来,得到只包含待识别对象而未包含背景的图像(可称之为目标区域图像),随后,业务服务器1000可以将该只包含待识别对象的目标区域图像进行后续处理(如添加特效处理或美化处理等等),得到具有特殊效果或具有美化效果(如美妆效果等)的目标区域图像;随后,业务服务器1000可以将该具有特殊效果或具有美化效果的目标区域图像放回原始图像中待识别对象所属的区域中,由此可以得到具有较高图像质量且具有特殊效果或具有美化效果的处理后的图像。随后,业务服务器1000可以将该处理后的图像返回至终端设备,则用户可以在该终端设备的显示页面上查看到该处理后的图像(查看到该具有较高图像质量且具有特殊效果或具有美化效果的待识别对象)。For example, when a user is using an application in a terminal device (such as an image beautification application), 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 someone else). animal object) (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 enhanced image, the business server 1000 can also identify the area in the sharpened enhanced image to which the object to be identified belongs, and extract the area from the original image to obtain An image that only contains the object to be recognized but not the background (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 recognized (such as adding special effects processing or beautification processing, etc. etc.), obtain a target area image with special effects or beautification effects (such as makeup effects, etc.); then, the business server 1000 can put the target area image with special effects or beautification effects back into the original image for the object to be identified In the corresponding area, a processed image with higher image quality and special effects or beautification effects can be obtained. Subsequently, the business server 1000 can return the processed image to the terminal device, and the user can view the processed image on the display page of the terminal device (viewing the image with higher image quality and special effects or with beautify the object to be identified).
当然,在业务服务器1000对原始图像进行锐化增强处理得到锐化增强图像后,业务服务器1000也可以不进行特效处理或美化处理,而是将该锐化增强图像返回至终端设备,则用户可以再该终端设备的显示页面上查看到该锐化增强图像(查看到具有较高图像质量的图像)。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 not perform special effects processing or beautification processing, but return the sharpened and enhanced image to the terminal device, then the user can The sharpened enhanced image is viewed on the display page of the terminal device (an image with higher image quality is viewed).
其中,对于业务服务器1000对原始图像进行锐化增强以得到锐化增强图像的具体过程,可以包括:业务服务器1000可以获取到用于进行滤波处理的滤波尺寸集合(该滤波尺寸集合中可包含有不同的滤波尺寸,如可包括有N个滤波尺寸,N为大于1的正整数);基于每个滤波尺寸,业务服务器1000可分别对原始图像进行低通滤波处理,由此可以得到不同的滤波图像;随后,业务服务器100可以根据原始图像降N个滤波图像分别进行图像转换,由此即可得到N个高频图像;随后,业务服务器1000可以将该N个高频图像进行图像融合,得到融合图像后,再将融合图像与原始图像进行融合,即可得到该原始图像所对应的锐化增强图像。其中,对于业务服务器1000对原始图像进行锐化增强以得到锐化增强图像的具体实现方式(如可以包含基于滤波尺寸对原始图像进行低通滤波处理,得到不同的滤波图像的具体实现方式;将某个滤波图像进行图像转换,得到高频图像的具体实现方式;将高频图像进行图像融合,得到融合图像的具体实现方式;基于融合图像与原始图像,得到锐化增强图像的具体实现方式),可以参见后续图3所对应实施例中的描述。The specific process for the business server 1000 to sharpen and enhance the original image to obtain the sharpened and enhanced image may include: the business server 1000 may obtain a filter size set for filtering (the filter size set may include Different filter sizes, for example, may include N filter sizes, N is a positive integer greater than 1); based on each filter size, the business server 1000 can perform low-pass filtering processing on the original image respectively, so that different filters can be obtained image; then, the business server 100 can perform image conversion by reducing the N filtered images from the original image, thereby obtaining N high-frequency images; then, the business server 1000 can perform image fusion on the N high-frequency images, and obtain After the images are fused, the fused image is fused with the original image to obtain a sharpened enhanced image corresponding to the original image. Among them, the specific implementation method for the business server 1000 to sharpen and enhance the original image to obtain the sharpened enhanced image (for example, it may include a specific implementation method to perform low-pass filtering on the original image based on the filter size to obtain different filtered images; Perform image conversion on a certain filtered image to obtain a specific implementation method of a high-frequency image; perform image fusion on a high-frequency image to obtain a specific implementation method of a fused image; based on the fused image and the original image, obtain a specific implementation method of sharpening an enhanced image) , please refer to the subsequent description of the embodiment corresponding to FIG. 3 .
应当理解,在图像处理中,锐化处理十分重要,通过锐化处理可以提高图像的清晰度,而在锐化处理中,滤波处理也显得十分关键。为了进一步提升锐化处理后的图像质量(如清晰度),本申请可以为图像的滤波处理配置不同的滤波尺寸,这些不同的滤波尺寸可以组成一个滤波尺寸集合,在将为某个原始图像进行滤波处理时,即可获取到该滤波尺寸集合,再通过该滤波尺寸集合对其进行滤波处理。通过不同的滤波尺寸进行滤波处理后所得到的锐化增强图像,可以从不同尺度对图像中的细节进行处理,可以很好地提升锐化增强图像的图像质量。It should be understood that in image processing, sharpening processing is very important. Sharpening processing can improve the clarity of the image, and in sharpening processing, filtering processing is also very critical. In order to further improve the image quality (such as clarity) after sharpening, this application can configure different filter sizes for the image filtering process. These different filter sizes can form a filter size set, which will be processed for a certain original image. During filtering processing, the filter size set can be obtained, and then filtered through the filter size set. The sharpened enhanced image obtained after filtering with different filter sizes can process details in the image from different scales, which can greatly improve the image quality of the sharpened enhanced image.
在上述过程中,对于业务服务器1000对某个图像(如锐化增强图像)中待识别对象所属的区域进行识别的具体方法,可以通过图像模型(如图像识别模型)来处理。而为了提高图像识别的准确率,可以对图像模型进行训练,使得训练调整后的图像模型达到最优,基于该训练后的图像模型,可以对图像进行图像识别处理(如对图像中的待识别对象所属的区域进行识别)。 In the above process, the specific method for the business server 1000 to identify the area to which the object to be recognized in an image (such as a sharpened enhanced image) belongs can be processed through an image model (such as an image recognition model). In order to improve the accuracy of image recognition, the image model can be trained so that the image model adjusted after training is optimal. Based on the trained image model, image recognition processing can be performed on the image (such as identifying the objects to be recognized in the image). identify the area to which the object belongs).
可以理解的是,本申请实施例提供的方法可以由计算机设备执行,计算机设备包括但不限于终端设备或业务服务器。其中,业务服务器可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、CDN、以及大数据和人工智能平台等基础云计算服务的云服务器。It can be understood that the methods provided by the embodiments of the present application can be executed by computer equipment, including but not limited to terminal equipment or business servers. Among them, the business server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, and cloud services. Cloud servers for basic cloud computing services such as communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
其中,终端设备以及业务服务器可以通过有线或无线通信方式进行直接或间接地连接,本申请在此不做限制。Among them, the terminal equipment and the service server can be connected directly or indirectly through wired or wireless communication methods, which is not limited in this application.
可以理解的是,上述计算机设备(如上述业务服务器1000、终端设备100a、终端设备100b等等)可以是一个分布式系统中的一个节点,其中,该分布式系统可以为区块链系统,该区块链系统可以是由该多个节点通过网络通信的形式连接形成的分布式系统。其中,节点之间可以组成的点对点(P2P,Peer To Peer)网络,P2P协议是一个运行在传输控制协议(TCP,Transmission Control Protocol)协议之上的应用层协议。在分布式系统中,任意形式的计算机设备,比如业务服务器、终端设备等电子设备都可以通过加入该点对点网络而成为该区块链系统中的一个节点。为便于理解,以下将对区块链的概念进行说明:区块链是一种分布式数据存储、点对点传输、共识机制以及加密算法等计算机技术的新型应用模式,主要用于对数据按时间顺序进行整理,并加密成账本,使其不可被篡改和伪造,同时可进行数据的验证、存储和更新。当计算机设备为区块链节点时,由于区块链的不可被篡改特性与防伪造特性,可以使得本申请中的数据(如上传的如目标图像之类的图像数据、锐化图像等等)具备真实性与安全性,从而可以使得基于这些数据进行相关数据处理后,得到的结果更为可靠。It can be understood that the above-mentioned computer device (such as the above-mentioned business 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 The blockchain system can be a distributed system formed by connecting multiple nodes through network communication. Among them, nodes can form a point-to-point (P2P, Peer To Peer) network. The P2P protocol is an application layer protocol running on the Transmission Control Protocol (TCP, Transmission Control Protocol) protocol. In a distributed system, any form of computer equipment, such as business servers, terminal equipment and other electronic equipment, can become a node in the blockchain system by joining the peer-to-peer network. For ease of understanding, the concept of blockchain will be explained below: Blockchain is a new application model of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. It is mainly used to process data in chronological order. Organize it and encrypt it into a ledger so that it cannot be tampered with or forged, and data can be verified, stored and updated at the same time. When the computer device is a blockchain node, due to the non-tampering and anti-counterfeiting properties of the blockchain, the data in this application (such as uploaded image data such as target images, sharpened images, etc.) It has authenticity and security, which can make the results obtained after relevant data processing based on these data more reliable.
需要说明的是,在本申请的具体实施方式中,涉及到用户信息、用户数据(如上传的图像、视频等)等相关的数据,需要经过用户授权许可才能进行获取。也就是说,当本申请以上实施例运用到具体产品或技术中时,需要获得用户许可或者同意,且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准。It should be noted that in the specific implementation of the present application, data related to user information, user data (such as uploaded images, videos, etc.) must be obtained with user authorization. In other words, when the above embodiments of this application are applied to specific products or technologies, user permission or consent needs to be obtained, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
本申请实施例可应用于各种场景,包括但不限于云技术、人工智能、智慧交通、辅助驾驶等。为便于理解,请参见图2,图2是本申请实施例提供的一种对图像进行锐化处理的场景示意图。其中,如图2所示的业务服务器200可以为上述图1所示的业务服务器1000,且如图2所示的终端设备100a可以为在上述图1所对应实施例的终端设备集群中所选取的任意一个终端设备,比如,该终端设备可以为上述终端设备100b;如图2所示的终端设备100b可以为在上述图1所对应实施例的终端设备集群中所选取的任意一个终端设备,比如,该终端设备可以为上述终端设备100a。Embodiments of this 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 scene for sharpening an image according to an embodiment of the present application. Among them, the service server 200 shown in Figure 2 can be the service server 1000 shown in Figure 1, and the terminal device 100a shown in Figure 2 can be selected from the terminal device cluster in the embodiment corresponding to Figure 1. Any terminal device, 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 in the embodiment corresponding to Figure 1, For example, the terminal device may be the above-mentioned terminal device 100a.
如图2所示,用户A可以通过终端设备100a运行应用(如短视频应用),用户A在短视频应用中上传了一张图像20a,其中,该图像20a中包括了待识别对象(例如对象B),该图像20a可以作为原始图像。业务服务器200可以通过终端设备100a的后台服务器接收到该原始图像20a。随后,业务服务器200可以基于不同的滤波尺寸(如可以包括滤波尺寸1、滤波尺寸2、…、滤波尺寸n,n可为大于1的正整数),对该原始图像20a进行低通滤波处理,由此可以得到滤波尺寸1对应的滤波图像1、滤波尺寸2对应的滤波图像2、…、滤波尺寸n对应的滤波图像n。其中,这里的滤波尺寸可为用于进行低通滤波处理的尺寸,该滤波尺寸可为预先设置的尺寸,该滤波尺寸可以包括有高有低的不同的尺寸,例如,滤波尺寸可包括5×5的尺寸、9×9的尺寸、17×17的尺寸等等,这里将不再进行一一举例说明。应当理解,低通滤波即为通过均值滤波等手段,以抑制视频或图像中的高频信息,使得视频或图像看上去更加模糊,那么实际上低通滤波处理后所得到的图像为模糊图像(即 低频图像),则该每个滤波图像(包括滤波图像、滤波图像2、…、滤波图像n)也可以称之为低频图像。As shown in Figure 2, user A can run an application (such as a short video application) through the terminal device 100a. User A uploads an image 20a in the short video application, where the image 20a includes an object to be recognized (such as an object B), this image 20a can be used as the original image. The service server 200 may receive the original image 20a through the backend server of the terminal device 100a. Subsequently, the service server 200 can perform low-pass filtering processing on the original image 20a based on different filter sizes (for example, it can include filter size 1, filter size 2, ..., filter size n, n can be a positive integer greater than 1), Thus, 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 can be obtained. The filter size here may be a size used for low-pass filtering. The filter size may be a preset size. The filter size may include different sizes, including high and low. For example, the filter size may include 5× The size of 5, the size of 9×9, the size of 17×17, etc. will not be explained one by one here. It should be understood that low-pass filtering uses means such as mean filtering to suppress high-frequency information in videos or images, making the video or image look blurry. In fact, the image obtained after low-pass filtering is a blurred image ( Right now low-frequency image), then each filtered image (including filtered image, filtered image 2, ..., filtered image n) can also be called a low-frequency image.
之后,业务服务器200可以根据原始图像与每个滤波图像,确定出不同滤波尺寸下的高频信息(也可称之为高频图像),如图2所示,可以根据原始图像20a与滤波图像1,确定出滤波图像1对应的高频图像1;可以根据原始图像20a与滤波图像2,确定出滤波图像2对应的高频图像2;…;可以根据原始图像20a与滤波图像n,确定出滤波图像n对应的高频图像n。随后,将该不同滤波尺寸下的高频图像进行融合后,即可得到包含各个滤波尺寸下的高频信息的融合图像,将该融合图像与原始图像20a进行融合,即为将各个滤波尺寸下的高频信息添加到原始图像20a中,那么进行融合后,即可得到该原始图像20a对应的锐化增强图像20b。应当理解,通过上述锐化增强的处理后,该锐化增强图像20b可以具备更高的清晰度(如,线条更清晰,分界更明显)。After that, the business server 200 can determine the high-frequency information (also called high-frequency images) under different filter sizes based on the original image 20a and each filtered image. As shown in Figure 2, the business server 200 can determine the high-frequency information (also called high-frequency images) under different filter sizes based on the original image 20a and the filtered image. 1. Determine the high-frequency image 1 corresponding to the filtered image 1; determine the high-frequency image 2 corresponding to the filtered image 2 based on the original image 20a and the filtered image 2; ...; determine the high-frequency image 2 corresponding to the filtered image 2 based on the original image 20a and the filtered image n. The high-frequency image n corresponding to the filtered image n. Subsequently, after fusing the high-frequency images under different filter sizes, a fused image containing high-frequency information under each filter size can be obtained. The fused image is fused with the original image 20a, that is, the fused image under each filter size is fused. The high-frequency information is added to the original image 20a, and then after fusion, the sharpened enhanced image 20b corresponding to the original image 20a can be obtained. It should be understood that after the above-mentioned sharpening enhancement processing, the sharpening-enhanced image 20b can have higher definition (for example, the lines are clearer and the boundaries are more obvious).
业务服务器200可以将该具备更高清晰度的锐化增强图像20b,发送至终端设备100b,则当用户C通过该终端设备100b使用该应用并浏览到该用户A所上传的图像时,所查看到的为具备更高清晰度的锐化增强图像20b,而不是失真图像。同理,业务服务器200也可以将该具备更高清晰度的锐化增强图像20b返回至终端设备100a,用户A可以在该终端设备100a的显示界面上查看到具备更高清晰度的锐化增强图像20b。The business server 200 can send the sharpened enhanced image 20b with higher definition to the terminal device 100b. Then when user C uses the application through the terminal device 100b and browses to the image uploaded by user A, the viewed image What is obtained is a sharpened enhanced image 20b with higher definition, rather than a distorted image. In the same way, the business server 200 can also return the sharpened image 20b with higher definition to the terminal device 100a, and user A can view the sharpened image 20b with higher definition on the display interface of the terminal device 100a. Image 20b.
可以理解的是,在对原始图像20a进行锐化增强处理,得到锐化增强图像20b后,还可以对该锐化增强图像20b进行后续图像处理(如添加特效处理),由此可以使得最终呈现至终端设备的显示界面(如上述终端设备100a的显示界面或终端设备100b的显示界面)的图像,更具备趣味性。为便于理解,请一并参见图3,图3是本申请实施例提供的一种图像处理场景示意图。如图3所示,业务服务器200可以将该锐化增强图像20b输入至图像模型(如图像识别模型)中,通过图像识别模型可以识别出该对象B在锐化增强图像20b中的所在区域。如图3,图像识别模型识别出对象B在锐化增强图像20b中所在区域为区域P(即,对象B的边界所包含的区域),图像识别模型可以将该包含对象B的区域P提取出来,随后,业务服务器200可以不再考虑图像20a中除区域P之外的其他区域,只对该区域P中的对象B进行特效处理。It can be understood that after performing sharpening and enhancement processing on the original image 20a to obtain the sharpened and enhanced image 20b, subsequent image processing (such as adding special effects processing) can also be performed on the sharpened and enhanced image 20b, so that the final presentation can be Images 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) are more interesting. For ease of understanding, please refer to Figure 3 as well. Figure 3 is a schematic diagram of an image processing scenario provided by an embodiment of the present application. As shown in FIG. 3 , the business server 200 can input the sharpened 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 enhanced image 20b. As shown in Figure 3, the image recognition model recognizes that the area where object B is located in the sharpened enhanced image 20b is area P (that is, the area included in the boundary of object B). The image recognition model can extract the area P including object B. , then, the business server 200 may no longer consider other areas in the image 20a except the area P, and only perform special effects processing on the object B in the area P.
如图3所示,业务服务器200对区域P中的对象B添加了“猫咪特效”,进一步地,业务服务器200可以将该带有“猫咪特效”的对象B,放回锐化增强图像20b中的区域P,由此可以得到带有“猫咪特效”的锐化增强图像20c。该带有“猫咪特效”的锐化增强图像20c如图3所示,随后,业务服务器200可以将该带有“猫咪特效”的锐化增强图像20c返回至终端设备100a,用户A可以在终端设备100a的显示界面上查看到该带有猫咪特效”的锐化增强图像20c。As shown in Figure 3, the business server 200 adds a "cat special effect" to the object B in the area P. Further, the business server 200 can put the object B with the "cat special effect" back into the sharpened enhanced image 20b. area P, from which a sharpened enhanced image 20c with "cat special effect" can be obtained. The sharpened and enhanced image 20c with "cat special effects" is shown in Figure 3. Subsequently, the service server 200 can return the sharpened and enhanced image 20c with "cat special effects" to the terminal device 100a. User A can log in to the terminal device 100a. The sharpened and enhanced image 20c with "cat special effect" is viewed on the display interface of the device 100a.
需要说明的是,本申请中的某个图像中的任一对象均可以作为待识别对象,例如,若上述图像20a中还包含除对象B以外的其余对象(如小卖部、自动扶梯、篮球等),则这些对象也可以作为待识别对象,图像识别模型也可以同时对除对象B以外的其他对象进行图像识别处理。且本申请中的图像识别模型可以为任一具备图像识别功能的模型,本申请对其不进行限制。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 concession stand, an escalator, a basketball, etc.) , then 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 except object B at the same time. And the image recognition model in this application can be any model with image recognition function, and this application does not limit it.
为便于理解,请参见图4,图4是本申请实施例提供的一种数据处理方法的流程示意图。该方法可以由终端设备(例如,上述图1所示的终端设备集群中的任一终端设备,如终端设备100a)执行,也可以由终端设备和业务服务器(如上述图1所对应实施例中的业务服务器1000)共同执行。为便于理解,本实施例以该方法由上述终端设备执行为例进行说明。如图4所示,该图像处理方法至少可以包括以下S101-S104: For ease of understanding, please refer to Figure 4, which is a schematic flow chart of a data processing method provided by an embodiment of the present application. This 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 the terminal device 100a), or can be executed by the terminal device and the service server (such as in the embodiment corresponding to Figure 1 above) The business server 1000) is jointly executed. For ease of understanding, this embodiment takes the method being executed by the above-mentioned terminal device as an example for description. As shown in Figure 4, the image processing method may at least include the following S101-S104:
S101,获取用于进行滤波处理的滤波尺寸集合;滤波尺寸集合中包括N个滤波尺寸,N为大于1的正整数;N个滤波尺寸中的任意两个滤波尺寸不同。S101, obtain a filter size set used for filtering processing; the filter size set includes N filter sizes, N is a positive integer greater than 1; any two filter sizes among the N filter sizes are different.
本申请中,滤波尺寸可以是指在图像上对某个像素点进行像素计算处理的模板尺寸。可以理解的是,某个图像可以包含一个或多个像素点,在滤波处理中,对于某个像素点,可以给定一个模板(即模板尺寸可为人为规定),该模板包含了其周围的临近像素点和其本身像素点,其中,该本身像素点是作为中心,其周围的临近像素点是以该像素点作为中心的一个或多个邻域像素点。而该本身像素点的像素值,可以基于该模板内的全部像素点的像素值来确定(即,基于该模板内的全部像素点的像素值所确定的一个最终像素值,可用于替代本身像素点的原始像素值)。例如,给定模板尺寸为5×5,那么该模板包含的像素点共为25个,对于某个像素点,需要选择其周围临近的24个像素点作为其邻域像素点,该像素点的最终像素值可以通过该模板内的25个像素点的像素值来共同确定。例如,当滤波处理为均值滤波处理时,该像素点的最终像素值可以为该模板内的25个像素点的像素值的平均值;当滤波处理为中值滤波处理时,可以将25个像素点的像素值按照大小顺序(如从大到小的顺序)进行排序,再在排序后的像素值序列中获取到中位值,该中位值即可作为该像素点的最终像素值。当然,不同类型的滤波处理方式,其模板的应用也不同,这里仅是以均值滤波处理和中值滤波处理为例作为示例性说明。In this application, the filter size may refer to the template size for performing pixel calculation processing on a certain pixel point on the image. It can be understood that an image can contain one or more pixels. In the filtering process, a template can be given for a certain pixel (that is, the size of the template can be artificially specified), and the template includes the surrounding pixels. neighboring pixels and its own pixel, where the own pixel is used as the center, and the neighboring pixels around it are one or more neighborhood pixels with the pixel as the center. The pixel value of the own pixel can be determined based on the pixel values of all pixels in the template (that is, a final pixel value determined based on the pixel values of all pixels in the template can be used to replace the own pixel. the original pixel value of the point). For example, given that the template size is 5×5, the template contains a total of 25 pixels. For a certain pixel, it is necessary to select 24 adjacent pixels as its neighborhood pixels. The final pixel value can be determined jointly by the pixel values of 25 pixels within the template. For example, when the filtering process is mean filtering, the final pixel value of the pixel can be the average of the pixel values of 25 pixels in the template; when the filtering is median filtering, 25 pixels can be The pixel values of the points are 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 processing methods have different template applications. Here, we only take the mean filtering processing and the median filtering processing as examples as an illustrative explanation.
为便于理解,请一并参见图5,图5是本申请实施例提供的一种基于均值滤波进行像素处理的示意图。如图5所示,图像50a可为原始图像,对于原始图像50a而言,该原始图像包含有49个像素点(其中,包含有像素点a1、像素点a2、像素点a3、…、像素点g7),这里假设将对该原始图像50a进行均值滤波处理,假设给定模板尺寸(即滤波尺寸)为3×3。如图5所示,以像素点b2为例,可以基于模板尺寸3×3,以像素点b2为中心,确定出其周围的邻域像素点为像素点a1、像素点a2、像素点a3、像素点b1、像素点b3、像素点c1、像素点c2以及像素点c3。其中,在确定像素点b2的邻域像素点时,可以以原始图像50a的某个顶点为坐标原点,将以该坐标原点为交点的两条图像边各作为一个坐标轴(可称之为x轴与y轴),由此可以构建得到一个以顶点为坐标原点的坐标系,那么该原始图像50a上的每个像素点可以对应一个坐标,那么对于像素点b2的邻域像素点,可以在像素点b2的坐标的基础上进行确定。例如,以像素点b2的坐标为(2,6)为例,可以在x轴上增加[-1,1](即增加-1,0,1),在y轴上增加[-1,1](即增加-1,0,1),即在坐标(2,6)上增加(-1,-1)、(-1,0)、(-1,1)、(0,-1)、(0,1)、(1,-1)、(1,0)以及(1,1),由此即可得到邻域像素点的坐标为(1,5)、(1,6)、(1,7)、(2,5)、(2,7)、(3,5)、(3,6)以及(3,7),由此即可通过坐标对应得到上述包含像素点a1等像素点的各个邻域像素点。For ease of understanding, please refer to Figure 5 as well. Figure 5 is a schematic diagram of pixel processing based on mean filtering provided by an embodiment of the present application. As shown in Figure 5, the image 50a may be an original image. For the original image 50a, the original image contains 49 pixels (including pixels a1, pixels a2, pixels a3, ..., pixels 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 (ie, filtering size) is 3×3. As shown in Figure 5, taking pixel b2 as an example, based on the template size 3×3, with pixel b2 as the center, the neighborhood pixels around it can be determined as pixel a1, pixel a2, pixel a3, Pixel point b1, pixel point b3, pixel point c1, pixel point c2 and pixel point c3. Among them, when determining the neighborhood pixel points of pixel point b2, a certain 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 point can each be used as a coordinate axis (which can be called x axis and y-axis), 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 for the neighborhood pixel points of pixel point b2, it can be It is determined based on the coordinates of pixel point b2. For example, taking the coordinates of pixel b2 as (2, 6), you can add [-1,1] to the x-axis (that is, add -1, 0, 1), and add [-1, 1] to the y-axis ] (that is, increase -1, 0, 1), that is, increase (-1, -1), (-1, 0), (-1, 1), (0, -1) on coordinate (2, 6) , (0,1), (1,-1), (1,0) and (1,1), from which the coordinates of the neighborhood pixels can be obtained as (1,5), (1,6), (1,7), (2,5), (2,7), (3,5), (3,6) and (3,7), from which the above-mentioned pixel points a1, etc. can be obtained through coordinate correspondence. Each neighborhood pixel of the pixel.
然后,可以获取到该模板内包含的全部像素点的像素值,即像素点a1、像素点a2、像素点a3、像素点b1、像素点b2、像素点b3、像素点c1、像素点c2以及像素点c3分别对应的像素值,以像素点a1、像素点a2、像素点a3、像素点b1、像素点b2、像素点b3、像素点c1、像素点c2以及像素点c3分别对应的像素值为11、8、11、10、9、12、10、10、9为例,可以确定出这些像素值对应的平均值为10(即将11、8、11、10、9、12、10、10、9进行相加后,所得到的相加和为90,该模板内所包含的全部像素的数量为9,则该平均值即为10),那么该平均值10即可作为该像素点b2的最终像素值。也就是说,通过该均值滤波处理,可以得到原始图像50a中每个像素点对应的最终像素值。Then, the pixel values of all pixels included in the template can be obtained, namely pixel a1, pixel a2, pixel a3, pixel b1, pixel b2, pixel b3, pixel c1, pixel c2 and The pixel values corresponding to pixel point c3 are the pixel values corresponding to pixel point a1, pixel point a2, pixel point a3, pixel point b1, pixel point b2, pixel point b3, pixel point c1, pixel point c2 and pixel point c3 respectively. Taking 11, 8, 11, 10, 9, 12, 10, 10, 9 as an example, it can be determined that the average value corresponding to these pixel values is 10 (that is, 11, 8, 11, 10, 9, 12, 10, 10 , 9 are added, the resulting sum is 90, the number of all pixels contained in the template is 9, then the average value is 10), then the average value of 10 can be used as the pixel point b2 the final pixel value. That is to say, through this mean filtering process, the final pixel value corresponding to each pixel point in the original image 50a can be obtained.
应当理解,在图像处理中,锐化处理十分重要,通过锐化处理可以提高图像的清晰度,而在锐化处理中,滤波处理也显得十分关键。为了提升锐化处理后的图像质量(如清晰度),本申请可以为图像的滤波处理配置不同的滤波尺寸,这些不同的滤波尺寸可以组成一个滤 波尺寸集合,在将为某个原始图像进行滤波处理时,即可获取到该滤波尺寸集合,再通过该滤波尺寸集合对其进行滤波处理。It should be understood that in image processing, sharpening processing is very important. Sharpening processing can improve the clarity of the image, and in sharpening processing, filtering processing is also very critical. In order to improve the image quality (such as clarity) after sharpening, this application can configure different filter sizes for the image filtering process. These different filter sizes can form a filter. Wave size set, when filtering a certain original image, the filter size set can be obtained, and then filtered through the filter size set.
S102,基于每个滤波尺寸分别对原始图像进行低通滤波处理,得到N个滤波图像。S102: Perform low-pass filtering on the original image based on each filter size to obtain N filtered images.
本申请中,通过上述可知,每个滤波尺寸可用于对原始图像进行滤波处理。本申请中的滤波处理可以是指低通滤波处理(如均值滤波处理、中值滤波处理等等),基于每个滤波尺寸对原始图像进行低通滤波处理的方式类似,为了便于介绍,可以将N个滤波尺寸中每个滤波尺寸分别作为滤波尺寸Si,将N个滤波图像中滤波尺寸Si所对应的滤波图像作为滤波图像Ti(i为正整数),基于某个滤波尺寸对原始图像进行低通滤波处理,得到该滤波尺寸对应的滤波图像的具体实现方式可为:获取原始图像对应的图像像素集合,以及获取图像像素集合对应的像素坐标集合;随后,可以在图像像素集合中获取待处理图像像素,并在像素坐标集合中获取待处理图像像素对应的待处理像素坐标;获取滤波尺寸Si所指示的坐标变化量,并根据待处理像素坐标以及坐标变化量,在像素坐标集合中确定针对待处理像素坐标的邻域像素坐标;根据待处理像素坐标与邻域像素坐标,即可确定滤波尺寸Si对应的滤波图像Ti。In this application, it can be known from the above that each filter size can be used to filter the original image. The filtering process in this application may refer to low-pass filtering processing (such as mean filtering processing, median filtering processing, etc.). The method of performing low-pass filtering processing on the original image based on each filter size is similar. For the convenience of introduction, it can be Each of the N filter sizes is taken as a filter size Si , and the filtered image corresponding to the filter size Si among the N filtered images is taken as a filtered image Ti (i is a positive integer). Based on a certain filter size, the original The image is subjected to low-pass filtering processing, and the specific implementation method of obtaining the filtered image corresponding to the filter size can be: obtaining the image pixel set corresponding to the original image, and obtaining the pixel coordinate set corresponding to the image pixel set; then, in the image pixel set, Obtain the pixels of the image to be processed, and obtain the pixel coordinates of the pixels to be processed corresponding to the pixels of the image to be processed in the pixel coordinate set; obtain the coordinate change amount indicated by the filter size Si , and based on the pixel coordinates to be processed and the coordinate change amount, at the pixel coordinates The neighborhood pixel coordinates for the pixel coordinates to be processed are determined in the set; based on the pixel coordinates to be processed and the neighborhood pixel coordinates, the filtered image Ti corresponding to the filter size Si can be determined.
可以理解的是,对于原始图像,可以包含有一个或多个像素点(也可称为图像像素),每个像素点(每个图像像素)可以对应一个坐标,其中,这里的坐标可以是指基于该原始图像所建立的坐标系中的坐标,例如,可以以该原始图像的某个图像顶点作为坐标原点,并将以该坐标原点为交点的两条图像边各作为一个坐标轴(可称之为x轴与y轴),由此可以构建得到一个以图像顶点为坐标原点的坐标系,那么每个像素点在该坐标系中可对应一个坐标。每个像素点所对应的坐标可称之为像素坐标,那么各个图像像素(像素点)可以组成一个图像像素集合(像素点集合),各个图像像素所对应的像素坐标可组成一个像素坐标集合,在对原始图像进行滤波处理时,可以获取到原始图像的图像像素集合以及图像像素集合所对应的像素坐标集合。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, where the coordinates here may refer to The coordinates in the coordinate system established based on the original image, for example, can use an image vertex of the original image as the origin of the coordinates, and each of the two image edges with the origin of the coordinates as the intersection as a coordinate axis (which can be called (x-axis and y-axis), from which a coordinate system with the image vertex as the coordinate origin can be constructed, then each pixel point can correspond to a coordinate in the coordinate system. The coordinates corresponding to each pixel point can be called pixel coordinates. Then each image pixel (pixel point) can form an image pixel set (pixel point set), and the pixel coordinates corresponding to each image pixel can 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 can be obtained.
通过上述图5所对应实施例可知,在低通滤波处理中(如均值滤波处理中),基于一个滤波尺寸(如3×3的尺寸),可以确定出某个图像像素(如待处理图像像素)的邻域图像像素。其中,基于滤波尺寸确定邻域图像像素的具体方式可通过像素坐标来确定,一个滤波尺寸可对应于一个坐标变化量,如3×3的尺寸可对应于坐标变化量[-1,1](即在x轴与y轴上同时增加-1,0或1);如3×3的尺寸可对应于坐标变化量[-2,2](即在x轴与y轴上同时增加-2,-1,0,1或2)。那么在获取到待处理图像像素对应的待处理像素坐标后,即可根据在该待处理像素坐标的基础上,基于该坐标变化量计算出邻域像素坐标,根据该邻域像素坐标即可确定出该待处理图像像素的邻域图像像素。其中,该邻域图像像素与该待处理图像像素所组成的区域即为该滤波尺寸所覆盖到的区域,该区域是以待处理图像像素作为中心位置。It can be seen from the above embodiment corresponding to Figure 5 that in low-pass filtering processing (such as mean filtering processing), based on a filter size (such as the size of 3×3), a certain image pixel (such as the pixel of the image to be processed) can be determined ) of the neighborhood image pixels. Among them, the specific way to determine the pixels of the neighborhood image based on the filter size can be determined by the pixel coordinates. One filter size can correspond to a coordinate change amount. For example, the size of 3×3 can correspond to the coordinate change amount [-1, 1] ( That is, increase -1, 0 or 1 on the x-axis and y-axis at the same time); for example, the size of 3×3 can correspond to the coordinate change amount [-2, 2] (that is, increase -2 on the x-axis and y-axis at the same time, -1, 0, 1 or 2). Then after obtaining the pixel coordinates to be processed corresponding to the pixels of the image to be processed, the neighborhood pixel coordinates can be calculated based on the pixel coordinates to be processed and the coordinate change, and the neighborhood pixel coordinates can be determined based on the coordinates of the pixels to be processed. Get the neighborhood image pixels of the image pixel to be processed. The area composed of the neighborhood image pixels and the to-be-processed image pixels is the area covered by the filter size, and the area has the to-be-processed image pixel as the center position.
然后,基于该待处理像素坐标以及该邻域像素坐标,即可确定出该滤波尺寸对应的滤波图像。这里以低通滤波处理为均值滤波处理为例,根据待处理像素坐标与邻域像素坐标,确定滤波尺寸Si对应的滤波图像Ti的具体实现方式可为:在图像像素集合中获取邻域像素坐标所对应的邻域图像像素;可以获取邻域图像像素的邻域像素值,以及获取待处理图像像素的像素值;随后,可以将邻域像素值与待处理图像像素的像素值进行相加处理,得到像素运算值;将像素运算值与像素总数量之间的比值,确定为待处理图像像素对应的更新像素值;其中,像素总数量为邻域图像像素的数量与待处理图像像素的数量之和;当确定出图像像素集合中每个图像像素分别对应的更新像素值时,即可将包含每个图像像素分别对应的更新像素值的图像,确定为滤波尺寸Si对应的滤波图像TiThen, based on the coordinates of the pixel to be processed and the coordinates of the neighborhood pixels, the filtered image corresponding to the filter size can be determined. Here, the low-pass filtering process is taken as the mean filtering process as an example. According to the pixel coordinates to be processed and the neighborhood pixel coordinates, the specific implementation method of determining the filtered image Ti corresponding to the filter size Si can be: obtaining the neighborhood in the image pixel set The neighborhood image pixel corresponding to the pixel coordinate; the neighborhood pixel value of the neighborhood image pixel can be obtained, and the pixel value of the image pixel to be processed can be obtained; subsequently, the neighborhood pixel value can be compared with the pixel value of the image pixel to be processed Add processing to obtain the 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 image pixel to be processed; where the total number of pixels is the number of neighborhood image pixels and the number of image pixels to be processed The sum of the numbers; when the updated pixel value corresponding to each image pixel in the image pixel set is determined, the image containing the updated pixel value corresponding to each image pixel can be determined as the filter corresponding to the filter size Si Image Ti .
也就是说,本申请实施例可以将该滤波尺寸所覆盖到的各个像素(包括待处理图像像素与邻域图像像素)的像素值(包括待处理图像像素的像素值与邻域像素值)进行相加处理,得到的像素运算值再求取均值(即确定出像素运算值与像素总数量之间的比值),该均值即可作为该待处理图像像素的更新像素值(即将该均值代替待处理图像像素的原始像素值,即代替待处理图像像素的像素值)。其具体示例性场景说明,可以参见上述图5所对应实施例中的场景示例描述。应当理解,对于原始图像中的每个图像像素,均可以采用如确定待处理图像像素的更新像素值的方式,确定出每个图像像素的更新像素值,那么在确定出每个图像像素的更新像素值时,可以认为基于该滤波尺寸对该原始图像的低通滤波处理的过程完成,此时可以将包含各个更新像素值的图像确定为该滤波尺寸(如滤波尺寸Si)对应的滤波图像(滤波图像Ti)。That is to say, the embodiment of the present application can perform the pixel value (including the pixel value of the image pixel to be processed and the neighbor pixel value) of each pixel (including the pixel value of the image pixel to be processed and the neighbor image pixel) covered by the filter size. After the addition process, the obtained pixel operation value is then averaged (that is, the ratio between the pixel operation value and the total number of pixels is determined), and the average value can be used as the updated pixel value of the pixel of the image to be processed (that is, the average value replaces the pixel to be processed). The original pixel value of the processed image pixel, that is, the pixel value that replaces the pixel of the image to be processed). For a detailed description of the exemplary scenario, please refer to the description of the scenario example 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 by determining the updated pixel value of the image pixel to be processed. Then, after determining the updated pixel value of each image pixel, pixel value, 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 filtered image corresponding to the filter size (such as filter size Si ) . (Filtered image Ti ).
以上仅以滤波尺寸Si为例,描述了基于某个滤波尺寸对原始图像进行低通滤波处理,对于N个滤波尺寸中的每个滤波尺寸,均可以采用相同的处理方式,对原始图像进行低通滤波处理(如均值滤波处理),由此可以得到不同滤波尺寸所分别对应的滤波图像,即得到N个滤波图像。The above only takes the filter size S i as an example to describe the low-pass filtering process on the original image based on a certain filter size. For each of the N filter sizes, the same processing method can be used to perform the original image. Through low-pass filtering (such as mean filtering), filtered images corresponding to different filter sizes can be obtained, that is, N filtered images can be obtained.
为便于理解,请一并参见公式(1)、公式(2)以及公式(3),公式(1)、公式(2)以及公式(3)是以N个滤波尺寸包括滤波尺寸5×5、9×9以及17×17为例,对原始图像进行均值滤波处理的具体实现方式。
For ease of understanding, please refer to formula (1), formula (2) and formula (3) together. Formula (1), formula (2) and formula (3) are based on N filter sizes including filter sizes 5×5, Taking 9×9 and 17×17 as examples, the specific implementation method of performing mean filtering on the original image.
其中,公式(1)中的可以表征基于滤波尺寸5×5对原始图像进行均值滤波处理后,所得到的原始图像中某个像素点的低频像素值(也可理解为滤波处理后的更新像素值);Δx与Δy可分别用于表征x轴上的坐标变化量以及y轴上的坐标变化量;x与y可分别用于表征原始图像上的某个像素点(如待处理图像像素)所对应的像素坐标(如待处理像素坐标),即待处理像素坐标为(Ix,y)。具体来说,对于原始图像中每个坐标位置为(x,y)的像素点(图像像素),在对其进行均值滤波处理时,可以基于滤波尺寸(模板尺寸5×5)确定出其周围的邻域图像像素,然后可以计算其本身像素值及其邻域图像像素的像素值的平均值,该平均值即可作为该滤波尺寸5×5下所对应的滤波图像中该图像像素的像素值。
Among them, in formula (1) It can represent the low-frequency pixel value of a certain pixel in the original image after performing mean filtering on the original image based on the filter size 5×5 (it can also be understood as the updated pixel value after filtering); Δx and Δy can be respectively Used to characterize the coordinate changes on the x-axis and the coordinate changes on the y-axis; Processing pixel coordinates), that is, the pixel coordinates to be processed are (I x, y ). Specifically, for each pixel (image pixel) with coordinate position (x, y) in the original image, when performing mean filtering on it, its surroundings can be determined based on the filter size (template size 5×5) neighborhood image pixels, and then the average of its own pixel value and the pixel value of its neighboring image pixels can be calculated. This average value can be used as the pixel of the image pixel in the filtered image corresponding to the filter size of 5×5. value.
其中,公式(2)中的可以表征基于滤波尺寸9×9对原始图像进行均值滤波处理后,所得到的原始图像中某个像素点的低频像素值(也可理解为滤波处理后的更新像素值);Δx与Δy可分别用于表征x轴上的坐标变化量以及y轴上的坐标变化量;x与y可分别用于表征原始图像上的某个像素点(如待处理图像像素)所对应的像素坐标(如待处理像素坐标),即待处理像素坐标为(Ix,y)。具体来说,对于原始图像中每个坐标位置为(x,y)的像素点(图像像素),在对其进行均值滤波处理时,可以基于滤波尺寸(模板尺寸9×9)确定出其周围的邻域图像像素,然后可以计算其本身像素值及其邻域图像像素的像素值的平均值,该平均值即可作为该滤波尺寸9×9下所对应的滤波图像中该图像像素的像素值。
Among them, in formula (2) It can represent the low-frequency pixel value of a certain pixel in the original image after performing mean filtering on the original image based on the filter size 9×9 (it can also be understood as the updated pixel value after filtering); Δx and Δy can be respectively Used to characterize the coordinate changes on the x-axis and the coordinate changes on the y-axis; Processing pixel coordinates), that is, the pixel coordinates to be processed are (I x, y ). Specifically, for each pixel (image pixel) with coordinate position (x, y) in the original image, when performing mean filtering on it, its surroundings can be determined based on the filter size (template size 9×9) Neighborhood image pixels, and then the average of its own pixel value and the pixel value of its neighboring image pixels can be calculated. This average value can be used as the pixel of the image pixel in the filtered image corresponding to the filter size of 9×9. value.
其中,公式(3)中的可以表征基于滤波尺寸17×17对原始图像进行均值滤波处理后,所得到的原始图像中某个像素点的低频像素值(也可理解为滤波处理后的更新像素值);Δx与Δy可分别用于表征x轴上的坐标变化量以及y轴上的坐标变化量;x与y可分别用于表征原始图像上的某个像素点(如待处理图像像素)所对应的像素坐标(如待处理像素坐标),即待处理像素坐标为(Ix,y)。具体来说,对于原始图像中每个坐标位置为(x,y)的像素点(图像像素),在对其进行均值滤波处理时,可以基于滤波尺寸(模板尺寸17×17)确定出其周围的邻域图像像素,然后可以计算其本身像素值及其邻域图像像素的像素值的平均值,该平均值即可作为该滤波尺寸17×17下所对应的滤波图像中该图像像素的像素值。Among them, in formula (3) It can represent the low-frequency pixel value of a certain pixel in the original image after performing mean filtering on the original image based on the filter size 17×17 (it can also be understood as the updated pixel value after filtering); Δx and Δy can be respectively Used to characterize the coordinate changes on the x-axis and the coordinate changes on the y-axis; Processing pixel coordinates), that is, the pixel coordinates to be processed are (I x, y ). Specifically, for each pixel (image pixel) with coordinate position (x, y) in the original image, when performing mean filtering on it, its surroundings can be determined based on the filter size (template size 17×17) Neighborhood image pixels, and then the average of its own pixel value and the pixel value of its neighboring image pixels can be calculated. This average value can be used as the pixel of the image pixel in the filtered image corresponding to the filter size of 17×17. value.
应当理解,通过上述公式(1),可以得到原始图像在低滤波尺寸下对应的一个滤波图像;通过上述公式(2),可以得到原始图像在中滤波尺寸下对应的一个滤波图像;通过上述公式(3),可以得到原始图像在高滤波尺寸下对应的一个滤波图像。It should be understood that through the above formula (1), a filtered image corresponding to the original image under a low filter size can be obtained; through the above formula (2), a filtered image corresponding to the original image under a medium filter size can be obtained; through the above formula (3), a filtered image corresponding to the original image under high filter size can be obtained.
S103,根据原始图像将N个滤波图像分别进行图像转换,得到N个高频图像。S103: Perform image conversion on N filtered images respectively according to the original image to obtain N high-frequency images.
本申请中,通过上述可知,可基于每个滤波尺寸对原始图像进行低通滤波处理,具体来说,低通滤波处理后所得到的为低频信息(即每个滤波图像可理解为低频图像),在得到低频信息后,可以基于原始图像与低频信息来提取出高频信息(高频信息可理解为高频图像)。在一种可能的实现方式中,提取出高频信息的方式可以是通过将原始图像与低频信息进行作差,将所得到的结果作为高频信息。将N个滤波尺寸中每个滤波尺寸分别作为滤波尺寸Si,将滤波尺寸Si所对应的滤波图像作为滤波图像Ti,将滤波图像Ti所对应的高频图像作为高频图像Zi(i为正整数),对于根据原始图像滤波图像Ti进行图像转换,得到高频图像Zi的具体实现方式可为:获取原始图像对应的图像像素集合,以及获取图像像素集合对应的像素坐标集合;随后,获取滤波图像Ti对应的滤波图像像素集合,以及获取滤波图像像素集合对应的滤波像素坐标集合;接下来,根据像素坐标集合与滤波像素坐标集合,即可确定滤波图像Ti对应的高频图像ZiIn this application, it can be seen from the above that low-pass filtering can be performed on the original image based on each filter size. Specifically, the information obtained after 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, the high-frequency information can be extracted based on the original image and low-frequency information (the high-frequency information can be understood as a high-frequency image). In a possible implementation, the method of extracting high-frequency information may be to perform a difference between the original image and the low-frequency information, and use the obtained result as high-frequency information. Let each of the N filter sizes be a filter size Si , take the filtered image corresponding to the filter size Si as the filtered image Ti, and take the high-frequency image corresponding to the filtered image Ti as the high-frequency image Z i (i is a positive integer). For image conversion based on the original image filtered image T i , the specific implementation method of obtaining the high-frequency image Z i can be: obtaining the image pixel set corresponding to the original image, and obtaining the pixel coordinates corresponding to the image pixel set. set; then, obtain the filtered image pixel set corresponding to the filtered image T i , and obtain the filtered pixel coordinate set corresponding to the filtered image pixel set; next, according to the pixel coordinate set and the filtered pixel coordinate set, the corresponding filtered image T i can be determined The high-frequency image Z i .
可以理解的是,通过上述可知,滤波图像可以是对原始图像的每个像素点的像素值进行更新后所得到,则实际上滤波图像与原始图像相比,像素点的坐标并未发生变化,但每个像素点的像素值可能会发生变化,则这里的滤波图像的滤波图像像素集合,可与原始图像的图像像素集合为相同的像素集合,滤波图像像素集合对应的滤波像素坐标集合,也可与图像像素集合对应的像素坐标集合为相同的像素集合。也就是说,滤波像素坐标集合中的每个滤波像素坐标,均会对应一个像素坐标集合中的一个像素坐标(两者为相同的坐标)。根据像素坐标集合与滤波像素坐标集合,即可确定某个滤波图像对应的高频图像。It can be understood from the above that the filtered image can be obtained by updating the pixel value of each pixel of the original image. In fact, compared with the original image, the coordinates of the pixels in the filtered image have not changed. However, the pixel value of each pixel may change, so 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 set of pixel coordinates corresponding to the set of image pixels can be the same set of pixels. That is to say, 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). According to the pixel coordinate set and the filtered pixel coordinate set, the high-frequency image corresponding to a certain filtered image can be determined.
以滤波图像Ti为例,对于根据像素坐标集合与滤波像素坐标集合,确定滤波图像Ti对应的高频图像Zi的具体实现方式可为:在滤波像素坐标集合中获取待处理滤波像素坐标,并将像素坐标集合中与待处理滤波像素坐标具有映射关系的像素坐标,确定为映射像素坐标;随后,可以在图像像素集合中获取映射像素坐标对应的映射图像像素,在滤波图像像素集合中可以获取待处理滤波像素坐标对应的待处理滤波像素;获取映射图像像素对应的映射像素值,以及获取待处理滤波像素对应的滤波像素值;将映射像素值与滤波像素值之间的差值像素值,确定为待处理滤波像素对应的高频像素值;当确定出滤波图像像素集合 中每个滤波图像像素分别对应的高频像素值时,即可将包含每个滤波图像像素分别对应的高频像素值的图像,确定为滤波图像Ti对应的高频图像ZiTaking the filtered image Ti as an example, the specific implementation method for determining the high-frequency image Z i corresponding to the filtered image Ti according to the pixel coordinate set and the filtered pixel coordinate set can be: obtaining the filtered pixel coordinates to be processed in the filtered pixel coordinate set , and determine the pixel coordinates in the pixel coordinate set that have a mapping relationship with the filtered pixel coordinates to be processed as the mapped pixel coordinates; then, the mapped image pixels corresponding to the mapped pixel coordinates can be obtained in the image pixel set, and in the filtered image pixel set You can obtain the filtered pixel to be processed corresponding to the coordinates of the filtered pixel to be processed; obtain the mapped pixel value corresponding to the mapped image pixel, and obtain the filtered pixel value corresponding to the filtered pixel to be processed; obtain the difference pixel between the mapped pixel value and the filtered pixel value value, determined as the high-frequency pixel value corresponding to the filtered pixel to be processed; when the filtered image pixel set is determined When the high-frequency pixel value corresponding to each filtered image pixel in the filtered image is determined, the image containing the high-frequency pixel value corresponding to each filtered image pixel can be determined as the high-frequency image Z i corresponding to the filtered image Ti.
可以理解的是,与待处理滤波像素坐标具有映射关系的像素坐标,实际上可理解为像素坐标集合中与待处理滤波像素坐标为相同坐标的像素坐标,通过上述可知,像素坐标集合与滤波像素坐标集合实际上为相同坐标集合,像素坐标集合中的每个像素坐标,均在滤波像素坐标集合中存在相同的坐标,这两个相同的坐标即可认为具有映射关系,其实际为同一像素点的坐标。映射图像像素对应的映射像素值可理解为原始图像中,未经过滤波处理的原始像素值(如上述待处理图像像素对应的目标像素值),滤波图像像素对应的滤波像素值可理解为对原始图像进行滤波处理后的像素值(如滤波图像像素为上述待处理图像像素时,滤波像素值可以是指待处理图像像素对应的更新像素值)。It can be understood that the pixel coordinates that have a mapping relationship with the filtered pixel coordinates to be processed can actually be understood as the pixel coordinates in the pixel coordinate set that are the same coordinates as the filtered pixel coordinates to be processed. From the above, it can be seen that the pixel coordinate set and the filtered pixel The coordinate set is actually the same coordinate set. Each pixel coordinate in the pixel coordinate set has the same coordinate in the filtered pixel coordinate set. These two same coordinates can be considered to have a mapping relationship and are actually the same pixel point. coordinate of. The mapped pixel value corresponding to the pixel of the mapped image can be understood as the original pixel value without filtering in the original image (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 original pixel value. The pixel value of the image after filtering (for example, when the filtered image pixel is the above-mentioned image pixel to be processed, the filtered pixel value may refer to the updated pixel value corresponding to the image pixel to be processed).
应当理解,对于每个像素点(如待处理滤波像素或映射图像像素),可以采用其更新像素值(即滤波像素值)与原始像素值(如映射像素值)进行作差,所得到的差值结果即可作为该像素点对应的高频信息(即高频像素值)。当确定出每个像素点对应的高频像素值时,即可得到一个包含各个高频像素值的高频图像。It should be understood that for each pixel (such as the filtered pixel to be processed or the mapped image pixel), the updated pixel value (ie, the filtered pixel value) and the original pixel value (such as the mapped pixel value) can be used to make a difference, and the resulting difference The value result can be used as the high-frequency information corresponding to the pixel (i.e., the high-frequency pixel value). When the high-frequency pixel value corresponding to each pixel is determined, a high-frequency image containing each high-frequency pixel value can be obtained.
为便于理解,请一并参见公式(4)、公式(5)以及公式(6),公式(4)、公式(5)以及公式(6)是以N个滤波尺寸包括滤波尺寸5×5、9×9以及17×17为例,提取高频信息的具体实现方式。
For ease of understanding, please refer to formula (4), formula (5) and formula (6) together. Formula (4), formula (5) and formula (6) are based on N filter sizes, including filter sizes 5×5, Taking 9×9 and 17×17 as examples, the specific implementation method of extracting high-frequency information.
其中,如公式(4)所示的Ix,y可用于表征原始图像中位置为(x,y)的像素点Ix,y所对应的原始像素值;可用于表征基于上述公式(1)所确定的该像素点Ix,y所对应的滤波像素值;即可表征该像素点Ix,y所对应的高频像素值。具体来说,对于原始图像中每个坐标位置为(x,y)的像素点(图像像素),或对于滤波图像中每个坐标位置为(x,y)的像素点(滤波图像像素),在对其提取高频信息时,均可以将其原始像素值与其滤波像素值进行作差处理,即可得到该像素点的高频像素值。当得到每个像素点对应的高频像素值时,即可得到包含各个高频像素值的高频图像。如公式(4)所示的高频图像可对应于滤波尺寸5×5。
Among them, I x, y as shown in formula (4) can be used to characterize the original pixel value corresponding to the pixel point I x, y at the position (x, y) in the original image; It can be used to characterize the filtered pixel value corresponding to the pixel point I x, y determined based on the above formula (1); It can represent the high-frequency pixel value corresponding to the pixel point I x, y . Specifically, for each pixel point (image pixel) with coordinate position (x, y) in the original image, or for each pixel point (image pixel) with coordinate position (x, y) in the filtered image, When extracting high-frequency information, the original pixel value and its filtered pixel value can be difference processed to obtain the high-frequency pixel value of the pixel. When the high-frequency pixel value corresponding to each pixel is obtained, a high-frequency image containing each high-frequency pixel value can be obtained. The high-frequency image as shown in equation (4) can correspond to the filter size 5×5.
其中,如公式(5)所示的Ix,y可用于表征原始图像中位置为(x,y)的像素点Ix,y所对应的原始像素值;可用于表征基于上述公式(2)所确定的该像素点Ix,y所对应的滤波像素值;即可表征该像素点Ix,y所对应的高频像素值。具体来说,对于原始图像中每个坐标位置为(x,y)的像素点(图像像素),或对于滤波图像中每个坐标位置为(x,y)的像素点(滤波图像像素),在对其提取高频信息时,均可以将其原始像素值与其滤波像素值进行作差处理,即可得到该像素点的高频像素值。当得到每个像素点对应的高频像素值时,即可得到包含各个高频像素值的高频图像。如公式(5)所示的高频图像可对应于滤波尺寸9×9。
Among them, I x, y as shown in formula (5) can be used to characterize the original pixel value corresponding to the pixel point I x, y at the position (x, y) in the original image; It can be used to characterize the filtered pixel value corresponding to the pixel point I x, y determined based on the above formula (2); It can represent the high-frequency pixel value corresponding to the pixel point I x, y . Specifically, for each pixel point (image pixel) with coordinate position (x, y) in the original image, or for each pixel point (image pixel) with coordinate position (x, y) in the filtered image, When extracting high-frequency information, the original pixel value and its filtered pixel value can be difference processed to obtain the high-frequency pixel value of the pixel. When the high-frequency pixel value corresponding to each pixel is obtained, a high-frequency image containing each high-frequency pixel value can be obtained. The high-frequency image as shown in equation (5) may correspond to the filter size 9×9.
其中,如公式(6)所示的Ix,y可用于表征原始图像中位置为(x,y)的像素点Ix,y所对应的原始像素值;可用于表征基于上述公式(3)所确定的该像素点Ix,y所对应的滤波像素值;即可表征该像素点Ix,y所对应的高频像素值。具体来说,对于原始图像中每个坐标位置为(x,y)的像素点(图像像素),或对于滤波图像中每个坐标位置为(x,y)的像素点(滤波图像像素),在对其提取高频信息时,均可以将其原始像素值与其滤波像素值进行作差处理,即可得到该像素点的高频像素值。当得到每个像素点对应的高频像素值时,即可得到包含各个高频像素值的高频图像。如公式(6)所示的高频图像可对应于滤波尺寸17×17。Among them, I x, y as shown in formula (6) can be used to characterize the original pixel value corresponding to the pixel point I x, y at the position (x, y) in the original image; It can be used to characterize the filtered pixel value corresponding to the pixel point I x, y determined based on the above formula (3); It can represent the high-frequency pixel value corresponding to the pixel point I x, y . Specifically, for each pixel point (image pixel) with coordinate position (x, y) in the original image, or for each pixel point (image pixel) with coordinate position (x, y) in the filtered image, When extracting high-frequency information, the original pixel value and its filtered pixel value can be difference processed to obtain the high-frequency pixel value of the pixel. When the high-frequency pixel value corresponding to each pixel is obtained, a high-frequency image containing each high-frequency pixel value can be obtained. The high-frequency image as shown in equation (6) can correspond to the filter size 17×17.
应当理解,通过小尺度的低通滤波处理(如滤波尺寸较小的均值滤波处理)所获取的高频信息相对较弱,而通过大尺度的低通滤波处理(如滤波尺寸较大的均值滤波处理)所获取的高频信息则相对较强。对于原始图像中锐利的纹理(内容复杂、变化剧烈且复杂的图像信息,如草地、树木的纹理),小尺度的低通滤波便可以提取到对应的高频信息,而使用大尺度的低通滤波很可能会导致对锐利纹理过度增强。而对于原始图像中平缓的纹理(内容简单、变化平缓的图像信息,如天空的纹理),则需要大尺度的低通滤波才可以提取到对应的高频信息,那么通过从小到大不同的滤波尺寸,对原始图像进行低通滤波处理后,可以以不同尺度的低通滤波来准确且针对性地获取到原始图像中不同类型的高频信息,可以很好地提升提取到的高频信息的准确性与全面性,进而可以在后续基于高频信息进行图像锐化增强处理时,可以提升锐化处理的针对性,由此可以提升锐化增强后的图像质量。It should be understood that the high-frequency information obtained through small-scale low-pass filtering (such as mean filtering with a smaller filter size) is relatively weak, while through large-scale low-pass filtering (such as mean filtering with a larger filter size) The high-frequency information obtained by processing) is relatively strong. For sharp textures in the original image (image information with complex content, dramatic changes, and complex content, such as the texture of grass and trees), small-scale low-pass filtering can extract the corresponding high-frequency information, while using large-scale low-pass filtering Filtering is likely to result in excessive enhancement of sharp textures. For gentle 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. Then different filters from small to large are needed. size, after performing low-pass filtering on the original image, low-pass filtering of different scales can be used to accurately and targetedly obtain different types of high-frequency information in the original image, which can greatly improve the quality of the extracted high-frequency information. Accuracy and comprehensiveness can improve the pertinence of the sharpening process when subsequent image sharpening and enhancement processing is performed based on high-frequency information, thus improving the image quality after sharpening and enhancement.
S104,将N个高频图像进行图像融合,得到融合图像,将融合图像与原始图像进行融合,得到原始图像对应的锐化增强图像。S104, perform image fusion on N high-frequency images to obtain a fused image, and fuse the fused image with the original image to obtain a sharpened enhanced image corresponding to the original image.
本申请中,对于提取到的不同滤波尺寸下的N个高频图像,可以将其进行图像融合。其中,图像融合的方式可以包括很多种,在一种可能的实现方式中,本申请主要采用几何平均的图像融合。以N个滤波尺寸包括第一滤波尺寸与第二滤波尺寸,N个滤波图像包括第一滤波尺寸对应的第一滤波图像与第二滤波尺寸对应的第二滤波图像,N个高频图像包括第一滤波图像对应的第一高频图像与第二滤波图像对应的第二高频图像为例,对于将第一高频图像与第二高频图像进行图像融合,得到融合图像的具体实现方式可为:可以获取第一滤波尺寸对应的第一融合权重,以及第二滤波尺寸对应的第二融合权重;随后,可以获取高频图像融合函数,根据第一融合权重、第二融合权重以及高频图像融合函数,可以将第一高频图像与第二高频图像进行图像融合,由此即可得到融合图像。In this application, the extracted N high-frequency images under different filter sizes can be image fused. There are many ways of image fusion. In one possible implementation, this application mainly uses geometric mean image fusion. 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 Taking the first high-frequency image corresponding to a filtered image and the second high-frequency image corresponding to the second filtered image as an example, a specific implementation method for image fusion of the first high-frequency image and the second high-frequency image to obtain the fused image can be is: the first fusion weight corresponding to the first filter size can be obtained, and the second fusion weight corresponding to the second filter size can be obtained; then, the high-frequency image fusion function can be obtained, according to the first fusion weight, the second fusion weight and the high-frequency The image fusion function can fuse the first high-frequency image with the second high-frequency image, thereby obtaining the fused image.
其中,对于根据第一融合权重、第二融合权重以及高频图像融合函数,将第一高频图像与第二高频图像进行图像融合,得到融合图像的具体实现方式可为:可以按照高频图像融合函数,将第一融合权重与第二融合权重进行相加处理,得到运算权重;可以确定第一融合权重与运算权重之间的第一比值,基于第一比值将第一高频图像进行指数幂运算,可以得到第一运算特征;可以确定第二融合权重与运算权重之间的第二比值,基于第二比值将第二高频图像进行指数幂运算,可以得到第二运算特征;按照高频图像融合函数,可以将第一运算特征与第二运算特征进行几何融合,得到融合图像。 Among them, the specific implementation method for 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 the fused image can be: according to the high-frequency The image fusion function adds the first fusion weight and the second fusion weight to obtain the operation weight; the first ratio between the first fusion weight and the operation weight can be determined, and the first high-frequency image is processed based on the first ratio. Exponential power operation can be used to obtain the first operation feature; the second ratio between the second fusion weight and the operation weight can be determined, and the second high-frequency image can be subjected to exponential power operation based on the second ratio to obtain the second operation feature; according to The high-frequency image fusion function can geometrically fuse the first operation feature and the second operation feature to obtain a fused image.
为便于理解,以滤波尺寸5×5、9×9以及17×17为例,高频图像可以包括滤波尺寸5×5、9×9以及17×17分别对应的高频图像。请一并参见公式(7),公式(7)为基于几何平均融合的方式,将N个高频图像进行图像融合,得到融合图像的具体实现方式:
For ease of understanding, taking the filter sizes of 5×5, 9×9, and 17×17 as an example, the high-frequency images may include high-frequency images corresponding to the filter sizes of 5×5, 9×9, and 17×17 respectively. Please also refer to formula (7). Formula (7) is a method based on geometric mean fusion, which fuses N high-frequency images to obtain the specific implementation method of the fused image:
其中,该公式(7)即可用于表征该高频图像融合函数;α可用于表征滤波尺寸5×5对应的权重参数(当该滤波尺寸为第一滤波尺寸时,该权重参数即可称之为第一融合权重);β可用于表征滤波尺寸9×9对应的权重参数(当其为第二滤波尺寸时,该权重参数即可称之为第二融合权重);γ可用于表征滤波尺寸17×17对应的权重参数(当其为第二滤波尺寸时,该权重参数即可称之为第二融合权重)。本申请中的α、β以及γ可分别取值为0.3、0.4以及0.3,当然,该参数的取值并不限定于此,这里仅是举例说明了一组合理的参数取值,本申请对其并不限制。可用于表征滤波尺寸5×5对应的高频图像中的某个位置为(x,y)的像素点的高频像素值,当其对应高频图像为第一高频图像时,且α用于表征第一融合权重时,即可用于表征第一比值;可用于表征滤波尺寸9×9对应的高频图像中的某个位置为(x,y)的像素点的高频像素值,当其对应高频图像为第二高频图像时,且β用于表征第二融合权重时,即可用于表征第二比值;可用于表征滤波尺寸17×17对应的高频图像中的某个位置为(x,y)的像素点的高频像素值,当其对应高频图像为第二高频图像时,且γ用于表征第二融合权重时,即可用于表征第二比值。可用于表征融合各个高频图像中的高频像素值后,所得到的位置为(x,y)的像素点的融合像素值。当确定出每个位置上的像素点的融合像素值时,即可得到包含各个融合像素值的融合图像(也就是融合后的高频信息)。也就是说,本申请中的几何融合可以是指将第一运算特征与第一运算特征进行如公式(7)所示的运算处理(如相乘运算处理),进行运算处理后得到的结果即为几何融合后得到的融合结果。Among them, the 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 5×5 (when the filter size is the first filter size, the weight parameter can be called is the first fusion weight); β can be used to characterize the weight parameter corresponding to the filter size 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 filter size The weight parameter corresponding to 17×17 (when it is the second filter size, the weight parameter can be called the second fusion weight). The values of α, β and γ in this application can be 0.3, 0.4 and 0.3 respectively. Of course, the value of this parameter is not limited to this. Here is just an example to illustrate a set of reasonable parameter values. This application has It is not limiting. It can be used to characterize 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 When characterizing the first fusion weight, It can be used to characterize the first ratio; It can be used to characterize 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 When characterizing the second fusion weight, It can be used to characterize the second ratio; It can be used to characterize 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 When characterizing the second fusion weight, It can be used to characterize the second ratio. It can be used to characterize 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 point at each position is determined, a fused image containing each fused pixel value (that is, the fused high-frequency information) can be obtained. That is to say, the geometric fusion in this application may refer to performing the operation processing (such as multiplication operation processing) on the first operation feature and the first operation feature as shown in formula (7), and the result obtained after the operation processing is is the fusion result obtained after geometric fusion.
当得到融合图像后,可以将融合后的高频信息添加到原始图像中,也就是将融合图像与原始图像进行融合,由此即可将原始图像中的高频信息进行增强,得到原始图像对应的锐化增强图像。将融合图像与原始图像进行融合的具体实现方式可如公式(8)所示:
When the fused image is obtained, the fused high-frequency information can be added to the original image, that is, the fused image and the original image can be fused. Thus, the high-frequency information in the original image can be enhanced to obtain the corresponding original image. Sharpen the image. The specific implementation method of fusing the fused image with the original image can be shown in formula (8):
其中,Ix,y可用于表征原始图像中位置坐标为(x,y)的像素点的原始像素值;可用于表征位置坐标为(x,y)的像素点的融合像素值;I′x,y可用于表征融合了高频像素值 的锐化增强像素值(也可称之为锐化像素值)。当确定出每个位置上的像素点的锐化像素值时,即可得到包含各个锐化像素值的锐化图像。也就是说,在获取到某个重映射像素时,可以在原始图像中获取到与该重映射像素具有映射关系的原始图像像素(或称之为图像像素),其中,具有映射关系可以是指具有相同像素坐标的关系,再将两个像素的像素值进行相加,即可得到该坐标上的像素的锐化像素值。即:将同一位置坐标上的重映射像素值与原始图像像素值(或称之为图像像素值)进行相加,得到该位置坐标上的像素的锐化像素值,在得到各个位置坐标上的锐化像素值时,即可得到一个包含各个锐化像素值的锐化增强图像。Among them, I x, y can be used to characterize the original pixel value of the pixel point with position coordinates (x, y) in the original image; It can be used to represent the fused pixel value of the pixel whose position coordinates are (x, y); I′ x, y can be used to represent the fused high-frequency pixel value. The sharpening enhancement pixel value (also called sharpening 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 certain remapped pixel is obtained, the original image pixel (or image pixel) that has a mapping relationship with the remapped pixel can be obtained in the original image, where having a mapping relationship can mean With the relationship of the same pixel coordinates, and then adding the pixel values of the two pixels, the sharpened pixel value of the pixel at the coordinates can be obtained. That is: add the remapped pixel value at the same position coordinate to the original image pixel value (or image pixel value) to obtain the sharpened pixel value of the pixel at the position coordinate, and then obtain the sharpened pixel value at each position coordinate. When you sharpen pixel values, you get a sharpened image that contains each sharpened pixel value.
在本申请实施例中,对于某个原始图像,可以利用不同尺度的低通滤波,提取到不同类型纹理的高频信息(即,基于不同的滤波尺寸对原始图像进行低通滤波处理,得到不同的滤波图像后,再基于原始图像与每个滤波图像获取到不同滤波图像对应的高频图像),且在对高频信息进行融合后,可以得到融合后的高频信息(即融合图像),在对融合图像与原始图像进行融合后即可得到锐化增强图像。该锐化增强图像,是基于不同尺度对原始图像中的平缓纹理和锐利纹理均进行了合理的增强处理所得到,所以该锐化增强图像具备较高的图像质量。综上,本申请可以在图像锐化业务中,提高锐化后的图像质量。In the 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, low-pass filtering is performed on the original image based on different filter sizes to obtain different After filtering the images, high-frequency images corresponding to 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 (i.e., the fused image) can be obtained, After fusing the fused image with the original image, a sharpened enhanced image can be obtained. The sharpened enhanced image is obtained by reasonably enhancing both the gentle texture and the sharp texture in the original image based on different scales, so the sharpened enhanced image has high image quality. In summary, this application can improve the quality of sharpened images in the image sharpening business.
通过上述可知,在对N个高频图像进行图像融合后,可以得到融合图像(得到每个像素点对应的融合像素值),随后可以将融合图像与原始图像进行融合(即对于每个像素点,将其融合像素值与原始像素值进行相加),即可得到锐化增强图像。在一种可行的实施例中,为了进一步提高融合后的高频信息(即融合像素值)的准确率与合理性,可将其进行线性的重映射与截断处理,得到处理后的融合像素值后,再将其余原始像素值进行融合。为便于理解,请一并参见图6,图6是本申请实施例提供的一种融合原始图像与融合图像,得到锐化增强图像的流程示意图。该流程也可对应于上述图4所对应实施例中,对于将融合图像与原始图像进行融合,得到原始图像对应的锐化增强图像的流程。如图6所示,该流程可以至少包括以下S201-S202:From the above, it can be seen that after image fusion of N high-frequency images, the 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 , add the fused pixel value to the original pixel value) to obtain a sharpened enhanced image. In a feasible embodiment, in order to further improve the accuracy and rationality of the fused high-frequency information (ie, fused pixel values), it can be linearly remapped and truncated to obtain the processed fused pixel values. Finally, the remaining original pixel values are fused. For ease of understanding, please refer to Figure 6 as well. Figure 6 is a schematic flowchart of fusing the original image and the fused image to obtain a sharpened enhanced image provided by 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 enhanced image corresponding to the original image in the embodiment corresponding to FIG. 4 . As shown in Figure 6, the process may include at least the following S201-S202:
S201,对融合图像进行重映射处理,得到重映射融合图像。S201: Perform remapping processing on the fused image to obtain a remapped fused image.
其中,重映射融合图像可以是指包含重映射像素值的图像,重映射像素值可以是按照重映射函数,将融合图像对应的融合像素值与像素值阈值进行比较之后所确定的。The remapping fusion image may refer to an image containing a remapping pixel value, and the remapping pixel value may be determined by comparing the fusion pixel value corresponding to the fusion image with a pixel value threshold according to the remapping function.
实际上,该融合图像中的每个像素点均与原始图像中的每个像素点相同,但每个像素点的像素值可能不同。对于原始图像中的某个像素点,其未经过处理的像素值可称之为原始像素值,在某个滤波图像中的像素值可称之为滤波像素值,在某个高频图像中的像素值可称之为高频像素值,而在融合图像中的像素值可称之为融合像素值。基于此,对融合图像进行重映射处理,得到重映射融合图像的一种可能的实现方式可为:获取融合图像对应的融合图像像素,以及获取融合图像像素对应的融合像素值;随后,可以获取重映射函数,并根据重映射函数以及融合像素值,确定融合图像像素对应的重映射像素值;随后,即可将包含重映射像素值的图像,确定为重映射融合图像。In fact, every pixel in the fused image is the same as every pixel in the original image, but the pixel value of each pixel may be different. For a certain pixel in the original image, its unprocessed pixel value can be called the original pixel value, the pixel value in a certain filtered image can be called the filtered pixel value, and the pixel value in a certain high-frequency image can be called the filtered pixel value. The pixel values can be called high-frequency pixel values, and the pixel values in the fused image can be called fused pixel values. Based on this, a possible implementation method of performing remapping processing on the fused image to obtain the remapped fused image can be: obtaining the fused image pixels corresponding to the fused image, and obtaining the fused pixel values corresponding to the fused image pixels; then, you can obtain The remapping function is used to determine the remapping pixel value corresponding to the fusion image pixel based on the remapping function and the fusion pixel value; then, the image containing the remapping pixel value can be determined as the remapping fusion image.
其中,对于根据重映射函数以及融合像素值,确定融合图像像素对应的重映射像素值的一种可能的实现方式可为:按照重映射函数,将融合像素值与像素值阈值进行比较;若融合像素值大于或等于像素值阈值,则可以将预设像素参数确定为融合图像像素对应的重映射像素值;若融合像素值小于像素值阈值,则可以将融合像素值与预设融合系数进行相乘处理,得到融合图像像素对应的重映射像素值。Among them, a possible implementation method for determining the remapped pixel value corresponding to the fused image pixel according to the remapping function and the fused pixel value can be: according to the remapping function, compare the fused pixel value with the pixel value threshold; if the fusion If the 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 fusion image pixel; if the fusion pixel value is less than the pixel value threshold, the fusion pixel value can be compared with the preset fusion coefficient. Multiplication processing is performed to obtain the remapped pixel values corresponding to the pixels of the fused image.
通过上述可知,每个像素点对应的滤波像素值,基于原始像素值所确定,高频像素值基于滤波像素值所确定,融合像素值基于高频像素值所确定。则这里的融合图像的融合图像像素,可与原始图像的图像像素集合中的某个图像像素为相同的像素。将每个像素点对 应的融合像素值进行重映射与截断处理(可简称为重映射处理)后,可得到每个像素点对应的重映射像素值,根据该像素的重映射像素值与原始像素值,即可确定该像素所对应的锐化像素值。在确定出每个像素点的锐化像素值时,即可得到包含各个锐化像素值的锐化增强图像。From the above, it can be seen that the filtered pixel value corresponding to each pixel 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. Pair each pixel After remapping and truncation of the corresponding fused pixel values (which can be referred to as remapping processing), the remapped pixel value corresponding to each pixel can be obtained. According to the remapped pixel value and the original pixel value of the pixel, it can be determined The sharpened pixel value corresponding to this pixel. When the sharpened pixel value of each pixel is determined, a sharpened enhanced image containing each sharpened pixel value can be obtained.
为便于理解,请一并参见公式(9),公式(9)为对融合图像进行重映射处理,得到重映射融合图像的具体实现方式。
For ease of understanding, please also refer to formula (9). Formula (9) is a specific implementation method for remapping the fused image to obtain the remapping fused image.
其中,如公式(9)所示的函数可用于表征重映射函数;可用于表征位置坐标为(x,y)的像素点的融合像素值;可用于表征位置坐标为(x,y)的像素点的重映射像素值;0.25可用于表征像素值阈值,该像素值阈值可为人为规定数值(这里仅是以0.25为举例说明,实际上,像素值阈值可为其他任意合理数值,本申请对其不进行限定)。0.8可为预设融合系数,该预设融合系数可为人为规定数值(这里仅是以0.8为举例说明,实际上,预设融合系数可为其他任意合理数值,本申请对其不进行限定)。当融合像素值低于像素值阈值时,可以将预设融合系数与融合像素值进行相乘处理,得到的结果即可作为锐化像素值;当融合像素值大于或等于像素值阈值时,即可将预设像素参数0.2作为锐化像素值。其中,预设像素参数也可为其他合理数值,0.2仅是合理数值中的一种,为举例描述。通过上述公式(9),即可得到每个像素点对应的重映射像素值。Among them, the function shown in formula (9) can be used to characterize the remapping function; It can be used to characterize the fused pixel value of a pixel whose position coordinates are (x, y); It can be used to characterize the remapped pixel value of the pixel whose position coordinates are (x, y); 0.25 can be used to characterize the pixel value threshold, which can be an artificially specified value (0.25 is only used as an example here. In fact, The pixel value threshold can be any other reasonable value, which is not limited in this application). 0.8 can be a preset fusion coefficient, and the preset fusion coefficient can be an artificially prescribed value (0.8 is only used as an example here. In fact, the preset fusion coefficient can be any other reasonable value, which is not limited in this application) . When the fusion pixel value is lower than the pixel value threshold, the preset fusion coefficient can be multiplied by the fusion pixel value, and the result can be used as the sharpened pixel value; when the fusion pixel value is greater than or equal to the pixel value threshold, that is The default pixel parameter 0.2 can be used as the sharpening pixel value. Among them, the preset pixel parameters can also be other reasonable values, and 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 can be obtained.
S202,将重映射融合图像与原始图像进行融合,得到锐化增强图像。S202, fuse the remapping fusion image with the original image to obtain a sharpened enhanced image.
将重映射融合图像与原始图像进行融合,得到锐化增强图像的一种可能的实现方式可为:获取重映射融合图像对应的重映射像素,以及获取重映射像素对应的重映射像素值;随后,可以获取原始图像对应的图像像素,以及获取图像像素对应的图像像素值;将重映射像素值与图像像素值进行相加处理,得到锐化像素值;可以将包含锐化像素值的图像,确定为锐化增强图像。One possible implementation method of fusing the remapping fusion image with the original image to obtain a sharpened enhanced image may be: obtaining the remapping pixels corresponding to the remapping fusion image, and obtaining the remapping pixel values corresponding to the remapping pixels; and then , you can obtain the image pixels corresponding to the original image, and obtain the image pixel values corresponding to the image pixels; add the remapped pixel values to the image pixel values to obtain the sharpened pixel values; you can convert the image containing the sharpened pixel values, Confirm to sharpen the image.
可以理解的是,当得到各个像素点对应的重映射像素值后,可以将重映射后的高频信息(即重映射像素值)添加到原始图像中,也就是将重映射后的融合图像与原始图像进行融合,由此即可将原始图像中的高频信息进行增强,得到原始图像对应的锐化增强图像。即:可以将每个像素点(即图像像素)对应的重映射像素值与原始像素值,进行相加处理,由此可以得到每个图像像素分别对应的锐化像素值,进而可以得到包含各个锐化像素值的锐化增强图像。It can be understood that after obtaining the remapped pixel value corresponding to each pixel point, the remapped high-frequency information (ie, the remapped pixel value) can be added to the original image, that is, the remapped fusion image and The original images are fused, whereby the high-frequency information in the original images can be enhanced to obtain a sharpened enhanced image corresponding to the original image. That is: the remapped pixel value corresponding to each pixel point (i.e., image pixel) can be added to the original pixel value, so that the sharpened pixel value corresponding to each image pixel can be obtained, and then the sharpened pixel value corresponding to each image pixel can be obtained. Sharpen the image by sharpening the pixel values.
对于基于重映射像素值与原始像素值,确定锐化增强图像的具体实现方式可如公式(10)所示:
For the specific implementation method of determining the sharpening enhanced image based on the remapped pixel value and the original pixel value, the specific implementation method can be as shown in formula (10):
其中,Ix,y可用于表征原始图像中位置坐标为(x,y)的像素点的原始像素值;可用于表征位置坐标为(x,y)的像素点的重映射像素值;I′x,y可用于表征融合了重映射像素值的锐化增强像素值(也可称之为锐化像素值)。当确定出每个位置上的像素点的锐化像素值时,即可得到包含各个锐化像素值的锐化图像。 Among them, I x, y can be used to characterize the original pixel value of the pixel point with position coordinates (x, y) in the original image; It can be used to represent the remapped pixel value of the pixel whose position coordinates are (x, y ); I′ ). 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.
在本申请实施例中,通过不同的滤波尺寸对原始图像进行低通滤波处理后,可以得到不同滤波尺寸下的低频图像(即N个滤波图像),然后通过原始图像本身与各个滤波图像,即可提取得到每个滤波图像各自对应的高频信息(即得到N个高频图像),对于多尺度的高频图像,本申请可以对其进行融合处理得到融合图像,处理后的融合图像可以与原始图像进行再次融合,从而可以从不同尺度(滤波尺寸)增强原始图像的高频强度,得到锐化增强图像。此外,由于本申请是采用不同滤波尺寸对原始图像同时进行低通滤波处理,所得到的高频信息也是不同滤波尺寸下的高频信息,可以对不同类型的图像细节(如平缓纹理与复杂锐利纹理)具有强自适应能力(如,对于复杂锐利纹理,基于低滤波尺寸的低通滤波处理便可以提取到对应的高频信息,并实现对应的增强;对于平缓纹理,基于高滤波尺寸的低通滤波处理可以提取到对应的高频信息,并实现对应的增强),即可以达到从不同尺度增强原始图像的细节信息,进而可以提升图像的锐化质量,提升图像的清晰度。综上,本申请可以在图像锐化业务中,提高锐化后的图像质量。In the embodiment of the present application, after low-pass filtering is performed on the original image through different filter sizes, low-frequency images (ie, N filtered images) under different filter sizes can be obtained, and then the original image itself is combined with each filtered image, that is, The corresponding high-frequency information of each filtered image can be extracted (that is, N high-frequency images are obtained). For multi-scale high-frequency images, this application can fuse them to obtain a fused image. The processed fused image can be combined with The original images are fused again, so that the high-frequency intensity of the original images can be enhanced from different scales (filter sizes) to obtain a sharpened enhanced image. In addition, since this 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, which can be used to filter different types of image details (such as smooth textures and complex sharp ones). Texture) has strong adaptive ability (for example, for complex and 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 The corresponding high-frequency information can be extracted through filtering and the corresponding enhancement can be achieved), that is, the detailed information of the original image can be enhanced from different scales, thereby improving the sharpening quality of the image and improving the clarity of the image. In summary, this application can improve the quality of sharpened images in the image sharpening business.
请参见图7,图7是本申请实施例提供的一种数据处理装置的结构示意图。该数据处理装置可以是运行于计算机设备中的一个计算机程序(包括程序指令),例如该数据处理装置为一个应用软件;该数据处理装置可以用于执行图4所示的方法。如图7所示,该数据处理装置1可以包括:尺寸获取模块11、滤波模块12、图像转换模块13、图像融合模块14以及图像锐化模块15。Please refer to FIG. 7 , which is a schematic structural diagram of a data processing device provided by an embodiment of the present application. The data processing device may be a computer program (including program instructions) running in a computer device, for example, the data processing device may be an application software; the data processing device may be used to execute the method shown in FIG. 4 . As shown in FIG. 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 .
尺寸获取模块11,用于获取用于进行滤波处理的滤波尺寸集合;滤波尺寸集合中包括N个滤波尺寸,N为大于1的正整数;N个滤波尺寸中的任意两个滤波尺寸不同;The size acquisition module 11 is used to obtain a filter size set for filtering processing; the filter size set includes N filter sizes, and N is a positive integer greater than 1; any two filter sizes among the N filter sizes are different;
滤波模块12,用于基于每个滤波尺寸分别对原始图像进行低通滤波处理,得到N个滤波图像;The filter module 12 is used to perform low-pass filtering on the original image based on each filter size to obtain N filtered images;
图像转换模块13,用于根据原始图像将N个滤波图像分别进行图像转换,得到N个高频图像;The image conversion module 13 is used to perform image conversion on N filtered images respectively according to the original image to obtain N high-frequency images;
图像融合模块14,用于将N个高频图像进行图像融合,得到融合图像;The image fusion module 14 is used to image fuse N high-frequency images to obtain a fused image;
图像锐化模块15,用于将融合图像与原始图像进行融合,得到原始图像对应的锐化增强图像。The image sharpening module 15 is used to fuse the fused image with the original image to obtain a sharpened enhanced image corresponding to the original image.
其中,尺寸获取模块11、滤波模块12、图像转换模块13、图像融合模块14以及图像锐化模块15的具体实现方式,可以参见上述图4所对应实施例中S101-S104的描述,这里将不再进行赘述。Among them, for the specific implementation 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, please refer to the description of S101-S104 in the embodiment corresponding to the above-mentioned Figure 4, which will not be mentioned here. Let’s go into details.
在一个实施例中,将N个滤波尺寸中每个滤波尺寸分别作为滤波尺寸Si,将滤波尺寸Si所对应的滤波图像作为滤波图像Ti,i为正整数;In one embodiment, each of the N filter sizes is taken as a filter size Si , and the filtered image corresponding to the filter size Si is taken as a filtered image Ti , i is a positive integer;
滤波模块12可以包括:集合获取单元121、坐标获取单元122、邻域坐标确定单元123以及滤波图像确定单元124。The filtering module 12 may include: a set acquisition unit 121, a coordinate acquisition unit 122, a neighborhood coordinate determination unit 123, and a filtered image determination unit 124.
集合获取单元121,用于获取原始图像对应的图像像素集合,以及获取图像像素集合对应的像素坐标集合;The set acquisition unit 121 is used to acquire the image pixel set corresponding to the original image, and to acquire the pixel coordinate set corresponding to the image pixel set;
坐标获取单元122,用于在图像像素集合中获取待处理图像像素,在像素坐标集合中获取待处理图像像素对应的待处理像素坐标; The coordinate acquisition unit 122 is used to acquire the image pixels to be processed in the image pixel set, and acquire the pixel coordinates to be processed corresponding to the image pixels to be processed in the pixel coordinate set;
邻域坐标确定单元123,用于获取滤波尺寸Si所指示的坐标变化量,并根据待处理像素坐标以及坐标变化量,在像素坐标集合中确定针对待处理像素坐标的邻域像素坐标;The neighborhood coordinate determination unit 123 is used to obtain the coordinate change amount indicated by the filter size Si , and determine the neighborhood pixel coordinates for the pixel coordinates to be processed in the pixel coordinate set according to the pixel coordinates to be processed and the coordinate change amount;
滤波图像确定单元124,用于根据待处理像素坐标与邻域像素坐标,确定滤波尺寸Si对应的滤波图像Ti The filtered image determination unit 124 is used to determine the filtered image Ti corresponding to the filter size Si according to the pixel coordinates to be processed and the neighbor pixel coordinates.
其中,集合获取单元121、坐标获取单元122、邻域坐标确定单元123以及滤波图像确定单元124的具体实现方式,可以参见上述图4所对应实施例中S102的描述,这里将不再进行赘述。For the specific implementation of the set acquisition unit 121, the coordinate acquisition unit 122, the neighborhood coordinate determination unit 123, and the filtered image determination unit 124, please refer to the description of S102 in the embodiment corresponding to Figure 4 above, and will not be described again here.
在一个实施例中,滤波图像确定单元124可以包括:像素运算子单元1241以及像素更新子单元1242。In one embodiment, the filtered image determination unit 124 may include: a pixel operation sub-unit 1241 and a pixel update sub-unit 1242.
像素运算子单元1241,用于在图像像素集合中获取邻域像素坐标所对应的邻域图像像素;The pixel operation subunit 1241 is used to obtain the neighborhood image pixels corresponding to the neighborhood pixel coordinates in the image pixel set;
像素运算子单元1241,还用于获取所述邻域图像像素的邻域像素值,以及获取所述待处理图像像素的像素值;The pixel operation subunit 1241 is also used to obtain the neighborhood pixel value of the neighborhood image pixel, and obtain the pixel value of the image pixel to be processed;
像素运算子单元1241,还用于将所述邻域像素值与所述待处理图像像素的像素值进行相加处理,得到像素运算值;The pixel operation subunit 1241 is also used to add the neighborhood pixel value and the pixel value of the image pixel to be processed to obtain a pixel operation value;
像素更新子单元1242,用于将像素运算值与像素总数量之间的比值,确定为待处理图像像素对应的更新像素值;像素总数量为邻域图像像素的数量与待处理图像像素的数量之和;Pixel update subunit 1242 is used to determine the ratio between the pixel operation value and the total number of pixels as the updated pixel value corresponding to the image pixel to be processed; the total number of pixels is the number of neighborhood image pixels and the number of image pixels to be processed. Sum;
像素更新子单元1242,还用于当确定出图像像素集合中每个图像像素分别对应的更新像素值时,将包含每个图像像素分别对应的更新像素值的图像,确定为滤波尺寸Si对应的滤波图像TiThe pixel update subunit 1242 is also used to determine the updated pixel value corresponding to each image pixel in the image pixel set, and determine the image containing the updated pixel value corresponding to each image pixel to be corresponding to the filter size Si filtered image Ti .
其中,像素运算子单元1241以及像素更新子单元1242的具体实现方式,可以参见上述图4所对应实施例中S102的描述,这里将不再进行赘述。For the specific implementation of the pixel operation sub-unit 1241 and the pixel update sub-unit 1242, please refer to the description of S102 in the embodiment corresponding to Figure 4 above, and will not be described again here.
在一个实施例中,将N个滤波尺寸中每个滤波尺寸分别作为滤波尺寸Si,将滤波尺寸Si所对应的滤波图像作为滤波图像Ti,将滤波图像Ti所对应的高频图像作为高频图像Z,i为正整数;In one embodiment, each of the N filter sizes is taken as a filter size Si , the filtered image corresponding to the filter size Si is taken as the filtered image Ti, and the high-frequency image corresponding to the filtered image Ti is taken as As the high-frequency image Z, i is a positive integer;
图像转换模块13可以包括:像素坐标获取单元131以及高频图像确定单元132。The image conversion module 13 may include: a pixel coordinate acquisition unit 131 and a high-frequency image determination unit 132.
像素坐标获取单元131,用于获取原始图像对应的图像像素集合,以及获取图像像素集合对应的像素坐标集合;The pixel coordinate acquisition unit 131 is used to acquire the image pixel set corresponding to the original image, and acquire the pixel coordinate set corresponding to the image pixel set;
像素坐标获取单元131,还用于获取滤波图像Ti对应的滤波图像像素集合,以及获取滤波图像像素集合对应的滤波像素坐标集合;The pixel coordinate acquisition unit 131 is also used to acquire the filtered image pixel set corresponding to the filtered image Ti , and to acquire the filtered pixel coordinate set corresponding to the filtered image pixel set;
高频图像确定单元132,用于根据像素坐标集合与滤波像素坐标集合,确定滤波图像Ti对应的高频图像ZiThe high-frequency image determination unit 132 is used to determine the high-frequency image Zi corresponding to the filtered image Ti according to the pixel coordinate set and the filtered pixel coordinate set.
其中,像素坐标获取单元131以及高频图像确定单元132的具体实现方式,可以参见上述图4所对应实施例中S103中对于确定高频图像的相关描述,这里将不再进行赘述。For the specific implementation of the pixel coordinate acquisition unit 131 and the high-frequency image determination unit 132, please refer to the relevant description of determining the high-frequency image in S103 in the embodiment corresponding to FIG. 4, and will not be described again here.
在一个实施例中,高频图像确定单元132可以包括:高频像素值确定子单元1321以及高频图像确定子单元1322。 In one embodiment, the high-frequency image determination unit 132 may include: a high-frequency pixel value determination sub-unit 1321 and a high-frequency image determination sub-unit 1322.
高频像素值确定子单元1321,用于在滤波像素坐标集合中获取待处理滤波像素坐标,将像素坐标集合中与待处理滤波像素坐标具有映射关系的像素坐标,确定为映射像素坐标;The high-frequency pixel value determination subunit 1321 is used to obtain the filtered pixel coordinates to be processed in the filtered pixel coordinate set, and determine the pixel coordinates in the pixel coordinate set that have a mapping relationship with the filtered pixel coordinates to be processed as mapped pixel coordinates;
高频像素值确定子单元1321,还用于在图像像素集合中获取映射像素坐标对应的映射图像像素,在滤波图像像素集合中获取待处理滤波像素坐标对应的待处理滤波像素;The high-frequency pixel value determination subunit 1321 is also used to obtain the mapped image pixels corresponding to the mapped pixel coordinates in the image pixel set, and to obtain the to-be-processed filtered pixels corresponding to the filtered pixel coordinates to be processed in the filtered image pixel set;
高频像素值确定子单元1321,还用于获取映射图像像素对应的映射像素值,以及获取待处理滤波像素对应的滤波像素值;The high-frequency pixel value determination subunit 1321 is also used to obtain the mapped pixel value corresponding to the mapped image pixel, and to obtain the filtered pixel value corresponding to the filtered pixel to be processed;
高频像素值确定子单元1321,还用于将映射像素值与滤波像素值之间的差值像素值,确定为待处理滤波像素对应的高频像素值;The high-frequency pixel value determination subunit 1321 is also used 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;
高频图像确定子单元1322,用于当确定出滤波图像像素集合中每个滤波图像像素分别对应的高频像素值时,将包含每个滤波图像像素分别对应的高频像素值的图像,确定为滤波图像Ti对应的高频图像ZiThe high-frequency image determination subunit 1322 is used to determine the image containing the high-frequency pixel value corresponding to each filtered image pixel in the filtered image pixel set when the high-frequency pixel value corresponding to each filtered image pixel in the filtered image pixel set is determined. is the high-frequency image Zi corresponding to the filtered image Ti .
其中,高频像素值确定子单元1321以及高频图像确定子单元1322的具体实现方式,可以参见上述图4所对应实施例中S103中的描述,这里将不再进行赘述。For the specific implementation of the high-frequency pixel value determination sub-unit 1321 and the high-frequency image determination sub-unit 1322, please refer to the description in S103 in the embodiment corresponding to Figure 4 above, and will not be described again here.
在一个实施例中,N个滤波尺寸包括第一滤波尺寸与第二滤波尺寸,N个滤波图像包括第一滤波尺寸对应的第一滤波图像与第二滤波尺寸对应的第二滤波图像,N个高频图像包括第一滤波图像对应的第一高频图像与第二滤波图像对应的第二高频图像;In one embodiment, the N filter sizes include a first filter size and a second filter size, and 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. N The high-frequency image includes a first high-frequency image corresponding to the first filtered image and a second high-frequency image corresponding to the second filtered image;
图像融合模块14可以包括:权重融合单元141以及高频图像融合单元142。The image fusion module 14 may include: a weight fusion unit 141 and a high-frequency image fusion unit 142.
权重融合单元141,用于获取第一滤波尺寸对应的第一融合权重,以及获取第二滤波尺寸对应的第二融合权重;The weight fusion unit 141 is used to obtain the first fusion weight corresponding to the first filter size, and obtain the second fusion weight corresponding to the second filter size;
高频图像融合单元142,用于获取高频图像融合函数;High-frequency image fusion unit 142, used to obtain a high-frequency image fusion function;
高频图像融合单元142,还用于根据第一融合权重、第二融合权重以及高频图像融合函数,将第一高频图像与第二高频图像进行图像融合,得到融合图像。The high-frequency image fusion unit 142 is also configured to image-fuse 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.
其中,权重融合单元141以及高频图像融合单元142的具体实现方式,可以参见上述图4所对应实施例中S104中对于图像融合的相关描述,这里将不再进行赘述。For the specific implementation of the weight fusion unit 141 and the high-frequency image fusion unit 142, please refer to the relevant description of image fusion in S104 in the embodiment corresponding to Figure 4, and will not be described again here.
在一个实施例中,高频图像融合单元142可以包括:权重运算子单元1421、图像运算子单元1422以及特征融合子单元1423。In one embodiment, the high-frequency image fusion unit 142 may include: a weight operation sub-unit 1421, an image operation sub-unit 1422, and a feature fusion sub-unit 1423.
权重运算子单元1421,用于按照高频图像融合函数,将第一图像融合权重与第二图像融合权重进行相加处理,得到运算权重;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 the operation weight;
图像运算子单元1422,用于确定第一融合权重与运算权重之间的第一比值,基于第一比值将第一高频图像进行指数幂运算,得到第一运算特征;The image operation subunit 1422 is used to determine the 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 the first operation feature;
图像运算子单元1422,还用于确定第二融合权重与运算权重之间的第二比值,基于第二比值将第二高频图像进行指数幂运算,得到第二运算特征;The image operation subunit 1422 is also used to determine the second ratio between the second fusion weight and the operation weight, and perform exponential power operation on the second high-frequency image based on the second ratio to obtain the second operation feature;
特征融合子单元1423,用于按照高频图像融合函数,将第一运算特征与第二运算特征进行几何融合,得到融合图像。The feature fusion subunit 1423 is used 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.
其中,权重运算子单元1421、图像运算子单元1422以及特征融合子单元1423的具体实现方式,可以参见上述图4所对应实施例中S104的描述,这里将不再进行赘述。For the specific implementation of the weight operation sub-unit 1421, the image operation sub-unit 1422 and the feature fusion sub-unit 1423, please refer to the description of S104 in the embodiment corresponding to Figure 4 above, and will not be described again here.
在一个实施例中,图像锐化模块15可以包括:重映射单元151以及图像锐化单元152。 In one embodiment, the image sharpening module 15 may include: a remapping unit 151 and an image sharpening unit 152.
重映射单元151,用于对融合图像进行重映射处理,得到重映射融合图像;The remapping unit 151 is used to perform remapping processing on the fused image to obtain a remapped fused image;
图像锐化单元152,用于将重映射融合图像与原始图像进行融合,得到锐化增强图像。The image sharpening unit 152 is used to fuse the remapped fusion image with the original image to obtain a sharpened enhanced image.
其中,重映射单元151以及图像锐化单元152的具体实现方式,可以参见上述图7所对应实施例中S201-S202的相关描述,这里将不再进行赘述。For the specific implementation of the remapping unit 151 and the image sharpening unit 152, please refer to the relevant description of S201-S202 in the embodiment corresponding to FIG. 7, and will not be described again here.
在一个实施例中,重映射融合图像是指包含重映射像素值的图像,重映射像素值是按照重映射函数,将融合图像对应的融合像素值与像素值阈值进行比较之后所确定的。In one embodiment, a remapped fusion image refers to an image containing remapped pixel values. The remapped pixel values are determined by comparing the fused pixel values corresponding to the fused image with a pixel value threshold according to the remapping function.
在一个实施例中,重映射单元151可以包括:重映射值确定子单元1511以及重映射图像确定子单元1512。In one embodiment, the remapping unit 151 may include: a remapping value determination subunit 1511 and a remapping image determination subunit 1512.
重映射值确定子单元1511,用于获取融合图像对应的融合图像像素,以及获取融合图像像素对应的融合像素值;The remapping value determination subunit 1511 is used to obtain the fused image pixels corresponding to the fused image, and to obtain the fused pixel values corresponding to the fused image pixels;
重映射值确定子单元1511,还用于获取重映射函数;The remapping value determination subunit 1511 is also used to obtain the remapping function;
重映射值确定子单元1511,还用于根据重映射函数以及融合像素值,确定融合图像像素对应的重映射像素值;The remapping value determination subunit 1511 is also used to determine the remapping pixel value corresponding to the fused image pixel according to the remapping function and the fused pixel value;
重映射图像确定子单元1512,用于将包含重映射像素值的图像,确定为重映射融合图像。The remapped image determination subunit 1512 is used to determine an image containing remapped pixel values as a remapped fusion image.
其中,重映射值确定子单元1511以及重映射图像确定子单元1512的具体实现方式,可以参见上述图7所对应实施例中S201中的描述,这里将不再进行赘述。For the specific implementation of the remapping value determination subunit 1511 and the remapping image determination subunit 1512, please refer to the description in S201 in the embodiment corresponding to Figure 7 above, and will not be described again here.
在一个实施例中,重映射值确定子单元1511,还具体用于按照重映射函数,将融合像素值与像素值阈值进行比较;In one embodiment, the remapping value determination subunit 1511 is also specifically used to compare the fused pixel value with the pixel value threshold according to the remapping function;
重映射值确定子单元1511,还具体用于若融合像素值大于或等于像素值阈值,则将预设像素参数确定为融合图像像素对应的重映射像素值;The remapping value determination subunit 1511 is also specifically configured to determine the preset pixel parameter as the remapping pixel value corresponding to the fusion image pixel if the fusion pixel value is greater than or equal to the pixel value threshold;
重映射值确定子单元1511,还具体用于若融合像素值小于像素值阈值,则将融合像素值与预设融合系数进行相乘处理,得到融合图像像素对应的重映射像素值。The remapping value determination subunit 1511 is also specifically configured to multiply the fused pixel value and the preset fusion coefficient to obtain the remapped pixel value corresponding to the fused image pixel if the fused pixel value is less than the pixel value threshold.
在一个实施例中,图像锐化单元152可以包括:锐化值确定子单元1521以及锐化图像确定子单元1522。In one embodiment, the image sharpening unit 152 may include: a sharpening value determination subunit 1521 and a sharpened image determination subunit 1522.
锐化值确定子单元1521,用于获取重映射融合图像对应的重映射像素,以及获取重映射像素对应的重映射像素值;The sharpening value determination subunit 1521 is used to obtain the remapped pixels corresponding to the remapped fusion image, and to obtain the remapped pixel values corresponding to the remapped pixels;
锐化值确定子单元1521,还用于获取原始图像对应的图像像素,以及获取图像像素对应的图像像素值;The sharpening value determination subunit 1521 is also used to obtain the image pixels corresponding to the original image, and to obtain the image pixel values corresponding to the image pixels;
锐化值确定子单元1521,还用于将重映射像素值与图像像素值进行相加处理,得到锐化像素值;The sharpening value determination subunit 1521 is also used to add the remapped pixel value and the image pixel value to obtain the sharpened pixel value;
锐化图像确定子单元1522,用于将包含锐化像素值的图像,确定为锐化增强图像。The sharpened image determination subunit 1522 is used to determine an image containing sharpened pixel values as a sharpened enhanced image.
其中,锐化值确定子单元1521以及锐化图像确定子单元1522的具体实现方式,可以参见上述图7所对应实施例中S202中的描述,这里将不再进行赘述。For the specific implementation of the sharpening value determination sub-unit 1521 and the sharpened image determination sub-unit 1522, please refer to the description in S202 in the embodiment corresponding to Figure 7 above, and will not be described again here.
在本申请实施例中,通过不同的滤波尺寸对原始图像进行低通滤波处理后,可以得到不同滤波尺寸下的低频图像(即N个滤波图像),然后通过原始图像本身与各个滤波图像,即可提取得到每个滤波图像各自对应的高频信息(即得到N个高频图像),对于多尺度的 高频图像,本申请可以对其进行融合处理得到融合图像,处理后的融合图像可以与原始图像进行再次融合,从而可以从不同尺度(滤波尺寸)增强原始图像的高频强度,得到锐化增强图像。此外,由于本申请是采用不同滤波尺寸对原始图像同时进行低通滤波处理,所得到的高频信息也是不同滤波尺寸下的高频信息,可以对不同类型的图像细节(如平缓纹理与复杂锐利纹理)具有强自适应能力(如,对于复杂锐利纹理,基于低滤波尺寸的低通滤波处理便可以提取到对应的高频信息,并实现对应的增强;对于平缓纹理,基于高滤波尺寸的低通滤波处理可以提取到对应的高频信息,并实现对应的增强),即可以达到从不同尺度增强原始图像的细节信息,进而可以提升图像的锐化质量,提升图像的清晰度。综上,本申请可以在图像锐化业务中,提高锐化后的图像质量。In the embodiment of the present application, after low-pass filtering is performed on the original image through different filter sizes, low-frequency images (ie, N filtered images) under different filter sizes can be obtained, and then the original image itself is combined with each filtered image, that is, The corresponding high-frequency information of each filtered image can be extracted (that is, N high-frequency images are obtained). For multi-scale High-frequency images, this application can fuse them to obtain a fused image. The processed fused image can be fused with the original image again, so that the high-frequency intensity of the original image can be enhanced from different scales (filter size) to obtain sharpening enhancement. image. In addition, since this 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, which can be used to filter different types of image details (such as smooth textures and complex sharp ones). Texture) has strong adaptive ability (for example, for complex and 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 The corresponding high-frequency information can be extracted through filtering and the corresponding enhancement can be achieved), that is, the detailed information of the original image can be enhanced from different scales, thereby improving the sharpening quality of the image and improving the clarity of the image. In summary, this application can improve the quality of sharpened images in the image sharpening business.
请参见图8,图8是本申请实施例提供的一种计算机设备的结构示意图。如图8所示,上述图7所对应实施例中的装置1可以应用于上述计算机设备8000,上述计算机设备8000可以包括:处理器8001,网络接口8004和存储器8005,此外,上述计算机设备8000还包括:用户接口8003,和至少一个通信总线8002。其中,通信总线8002用于实现这些组件之间的连接通信。其中,用户接口8003可以包括显示屏(Display)、键盘(Keyboard),可选用户接口8003还可以包括标准的有线接口、无线接口。网络接口8004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器8005可以是高速RAM存储器,也可以是非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器。存储器8005可选的还可以是至少一个位于远离前述处理器8001的存储装置。如图8所示,作为一种计算机可读存储介质的存储器8005中可以包括操作系统、网络通信模块、用户接口模块以及设备控制应用程序。Please refer to FIG. 8 , which is a schematic structural diagram of a computer device provided by 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 computer device 8000. The above computer device 8000 can include: a processor 8001, a network interface 8004 and a memory 8005. In addition, the above computer device 8000 also Including: user interface 8003, and at least one communication bus 8002. Among them, the communication bus 8002 is used to realize connection communication between these components. Among them, the user interface 8003 may include a display screen (Display) and 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 or a wireless interface (such as a WI-FI interface). The memory 8005 may be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. The memory 8005 may optionally be at least one storage device located remotely from the aforementioned processor 8001. As shown in Figure 8, memory 8005, which is a computer-readable storage medium, may include an operating system, a network communication module, a user interface module, and a device control application program.
在图8所示的计算机设备8000中,网络接口8004可提供网络通讯功能;而用户接口8003主要用于为用户提供输入的接口;而处理器8001可以用于调用存储器8005中存储的设备控制应用程序,以实现:In the computer device 8000 shown in Figure 8, the network interface 8004 can provide network communication functions; the user interface 8003 is mainly used to provide an input interface for the user; and the processor 8001 can be used to call the device control application stored in the memory 8005 program to achieve:
获取用于进行滤波处理的滤波尺寸集合;滤波尺寸集合中包括N个滤波尺寸,N为大于1的正整数;N个滤波尺寸中的任意两个滤波尺寸不同;Obtain the filter size set used for filtering processing; the filter size set includes N filter sizes, N is a positive integer greater than 1; any two filter sizes among the N filter sizes are different;
基于每个滤波尺寸分别对原始图像进行低通滤波处理,得到N个滤波图像;Perform low-pass filtering on the original image based on each filter size to obtain N filtered images;
根据原始图像将N个滤波图像分别进行图像转换,得到N个高频图像;Perform image conversion on N filtered images respectively based on the original image to obtain N high-frequency images;
将N个高频图像进行图像融合,得到融合图像,并将融合图像与原始图像进行融合,得到原始图像对应的锐化增强图像。Perform image fusion on N high-frequency images to obtain a fused image, and fuse the fused image with the original image to obtain a sharpened enhanced image corresponding to the original image.
应当理解,本申请实施例中所描述的计算机设备8000可执行前文图4到图7所对应实施例中对该数据处理方法的描述,也可执行前文图7所对应实施例中对该数据处理装置1的描述,在此不再赘述。另外,对采用相同方法的有益效果描述,也不再进行赘述。It should be understood that the computer device 8000 described in the embodiment of the present application can perform the data processing method described in the embodiment corresponding to FIG. 4 to FIG. 7, and can also perform the data processing method in the embodiment corresponding to FIG. 7. The description of device 1 will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be described again.
此外,这里需要指出的是:本申请实施例还提供了一种计算机可读存储介质,且上述计算机可读存储介质中存储有前文提及的数据处理的计算机设备8000所执行的计算机程序,且上述计算机程序包括程序指令,当上述处理器执行上述程序指令时,能够执行前文图4到图7所对应实施例中对上述数据处理方法的描述,因此,这里将不再进行赘述。另 外,对采用相同方法的有益效果描述,也不再进行赘述。对于本申请所涉及的计算机可读存储介质实施例中未披露的技术细节,请参照本申请方法实施例的描述。In addition, it should be pointed out here that the embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores the computer program executed by the aforementioned data processing computer device 8000, and The above-mentioned computer program includes program instructions. When the above-mentioned processor executes the above-mentioned program instructions, the above-mentioned data processing method described in the embodiment corresponding to FIG. 4 to FIG. 7 can be executed. Therefore, the details will not be described here. Other In addition, the description of the beneficial effects of using the same method will not be described again. For technical details not disclosed in the computer-readable storage medium embodiments involved in this application, please refer to the description of the method embodiments in this application.
上述计算机可读存储介质可以是前述任一实施例提供的数据处理装置或者上述计算机设备的内部存储单元,例如计算机设备的硬盘或内存。该计算机可读存储介质也可以是该计算机设备的外部存储设备,例如该计算机设备上配备的插接式硬盘,智能存储卡(smart media card,SMC),安全数字(secure digital,SD)卡,闪存卡(flash card)等。进一步地,该计算机可读存储介质还可以既包括该计算机设备的内部存储单元也包括外部存储设备。该计算机可读存储介质用于存储该计算机程序以及该计算机设备所需的其他程序和数据。该计算机可读存储介质还可以用于暂时地存储已经输出或者将要输出的数据。The above-mentioned computer-readable storage medium may be the data processing apparatus provided in any of the foregoing embodiments or the internal storage unit of the above-mentioned computer equipment, such as the hard disk or memory of the computer equipment. The computer-readable storage medium can 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 equipped on the computer device, Flash card, etc. Further, the computer-readable storage medium may also include both an 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 can also be used to temporarily store data that has been output or is to be output.
本申请的一个方面,提供了一种计算机程序产品,该计算机程序产品包括计算机程序,该计算机程序存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机程序,处理器执行该计算机程序,使得该计算机设备执行本申请实施例中一方面提供的方法。In one aspect of the present application, a computer program product is provided. The computer program product includes a computer program, and the computer program is stored in a computer-readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the method provided in one aspect of the embodiment of the present application.
本申请实施例的说明书和权利要求书及附图中的术语“第一”、“第二”等是用于区别不同对象,而非用于描述特定顺序。此外,术语“包括”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、装置、产品或设备没有限定于已列出的步骤或模块,而是可选地还包括没有列出的步骤或模块,或可选地还包括对于这些过程、方法、装置、产品或设备固有的其他步骤单元。The terms “first”, “second”, etc. in the description, claims, and drawings of the embodiments of this application are used to distinguish different objects, rather than describing a specific sequence. Furthermore, the term "includes" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, device, product or equipment that includes a series of steps or units is not limited to the listed steps or modules, but optionally also includes unlisted steps or modules, or optionally also includes Other step units inherent to such processes, methods, apparatus, products or equipment.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of both. In order to clearly illustrate the relationship between hardware and software Interchangeability, in the above description, the composition and steps of each example have been generally described according to functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each specific application, but such implementations should not be considered beyond the scope of this application.
本申请实施例提供的方法及相关装置是参照本申请实施例提供的方法流程图和/或结构示意图来描述的,具体可由计算机程序指令实现方法流程图和/或结构示意图的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。这些计算机程序指令可提供到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或结构示意图一个方框或多个方框中指定的功能的装置。这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或结构示意图一个方框或多个方框中指定的功能。这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或结构示意一个方框或多个方框中指定的功能的步骤。 The methods and related devices provided by the embodiments of the present application are described with reference to the method flowcharts and/or structural schematic diagrams provided by the embodiments of the present application. Specifically, each process and/or the method flowcharts and/or structural schematic diagrams can be implemented by computer program instructions. or blocks, and combinations of processes and/or blocks in flowcharts and/or block diagrams. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions executed by the processor of the computer or other programmable data processing device produce a use A device for realizing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the structural diagram. These computer program instructions may also be stored in a computer-readable memory that causes a computer or other programmable data processing apparatus to operate in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction means, the instructions The device implements the functions specified in one process or multiple processes in the flowchart and/or in one block or multiple blocks in the structural diagram. These computer program instructions may also be loaded onto a computer or other programmable data processing device, causing a series of operating steps to be performed on the computer or other programmable device to produce computer-implemented processing, thereby executing on the computer or other programmable device. Instructions provide steps for implementing the functions specified in a process or processes of a flowchart and/or a block or blocks of a structural representation.
以上所揭露的仅为本申请较佳实施例而已,当然不能以此来限定本申请之权利范围,因此依本申请权利要求所作的等同变化,仍属本申请所涵盖的范围。 What is disclosed above is only the preferred embodiment of the present application. Of course, it 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 still fall within the scope of the present application.

Claims (16)

  1. 一种数据处理方法,所述方法由计算机设备执行,包括:A data processing method, the method is executed by a computer device, including:
    获取用于进行滤波处理的滤波尺寸集合;所述滤波尺寸集合中包括N个滤波尺寸,N为大于1的正整数;所述N个滤波尺寸中的任意两个滤波尺寸不同;Obtain a filter size set used for filtering processing; the filter size set includes N filter sizes, N is a positive integer greater than 1; any two filter sizes among the N filter sizes are different;
    基于每个滤波尺寸分别对原始图像进行低通滤波处理,得到N个滤波图像;Perform low-pass filtering on the original image based on each filter size to obtain N filtered images;
    根据所述原始图像将所述N个滤波图像分别进行图像转换,得到N个高频图像;Perform image conversion on the N filtered images respectively according to the original image to obtain N high-frequency images;
    将所述N个高频图像进行图像融合,得到融合图像,并将所述融合图像与所述原始图像进行融合,得到所述原始图像对应的锐化增强图像。The N high-frequency images are image fused to obtain a fused image, and the fused image is fused with the original image to obtain a sharpened enhanced image corresponding to the original image.
  2. 根据权利要求1所述的方法,将所述N个滤波尺寸中每个滤波尺寸分别作为滤波尺寸Si,将所述滤波尺寸Si所对应的滤波图像作为滤波图像Ti,i为正整数;According to the method of claim 1, each of the N filter sizes is used as a filter size Si , and the filtered image corresponding to the filter size Si is used as a filtered image Ti , i is a positive integer. ;
    所述基于每个滤波尺寸分别对原始图像进行低通滤波处理,得到N个滤波图像,包括:The original image is subjected to low-pass filtering processing based on each filtering size to obtain N filtered images, including:
    获取所述原始图像对应的图像像素集合,以及获取所述图像像素集合对应的像素坐标集合;Obtain a set of image pixels corresponding to the original image, and obtain a set of pixel coordinates corresponding to the set of image pixels;
    在所述图像像素集合中获取待处理图像像素,并在所述像素坐标集合中获取所述待处理图像像素对应的待处理像素坐标;Obtain the image pixels to be processed in the image pixel set, and obtain the pixel coordinates to be processed corresponding to the image pixels to be processed in the pixel coordinate set;
    获取所述滤波尺寸Si所指示的坐标变化量,并根据所述待处理像素坐标以及所述坐标变化量,在所述像素坐标集合中确定针对所述待处理像素坐标的邻域像素坐标;Obtain the coordinate change amount indicated by the filter size Si, and determine the neighborhood pixel coordinates for the pixel coordinates to be processed in the pixel coordinate set according to the pixel coordinates to be processed and the coordinate change amount;
    根据所述待处理像素坐标与所述邻域像素坐标,确定所述滤波尺寸Si对应的所述滤波图像TiAccording to the coordinates of the pixel to be processed and the coordinates of the neighborhood pixels, the filtered image Ti corresponding to the filter size Si is determined.
  3. 根据权利要求2所述的方法,所述根据所述待处理像素坐标与所述邻域像素坐标,确定所述滤波尺寸Si对应的所述滤波图像Ti,包括: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 includes:
    在所述图像像素集合中获取所述邻域像素坐标所对应的邻域图像像素;Obtain the neighborhood image pixel corresponding to the neighborhood pixel coordinate in the image pixel set;
    获取所述邻域图像像素的邻域像素值,以及获取所述待处理图像像素的像素值;Obtain the neighborhood pixel value of the neighborhood image pixel, and obtain the pixel value of the image pixel to be processed;
    将所述邻域像素值与所述待处理图像像素的像素值进行相加处理,得到像素运算值;Add the neighborhood pixel value to the pixel value of the image pixel to be processed to obtain a pixel operation value;
    将所述像素运算值与像素总数量之间的比值,确定为所述待处理图像像素对应的更新像素值;所述像素总数量为所述邻域图像像素的数量与所述待处理图像像素的数量之和;The ratio between the pixel operation value and the total number of pixels is determined as the updated pixel value corresponding to the pixel of the image to be processed; the total number of pixels is the number of pixels in the neighborhood image and the pixels of the image to be processed. The sum of the quantities;
    当确定出所述图像像素集合中每个图像像素分别对应的更新像素值时,将包含所述每个图像像素分别对应的更新像素值的图像,确定为所述滤波尺寸Si对应的所述滤波图像TiWhen the updated pixel value corresponding to each image pixel in the image pixel set is determined, the image containing the updated pixel value corresponding to each image pixel is determined to be the corresponding updated pixel value of the filter size Si . Filter image Ti .
  4. 根据权利要求1所述的方法,将所述N个滤波尺寸中每个滤波尺寸分别作为滤波尺寸Si,将所述滤波尺寸Si所对应的滤波图像作为滤波图像Ti,将所述滤波图像Ti所对应的高频图像作为高频图像Zi,i为正整数;The method according to claim 1, using each of the N filter sizes as a filter size Si , using the filtered image corresponding to the filter size Si as a filtered image Ti , and using the filtered The high-frequency image corresponding to image T i is regarded as high-frequency image Z i , i is a positive integer;
    所述根据所述原始图像将所述N个滤波图像分别进行图像转换,得到N个高频图像,包括:The N filtered images are respectively subjected to image conversion according to the original image to obtain N high-frequency images, including:
    获取所述原始图像对应的图像像素集合,以及获取所述图像像素集合对应的像素坐标集合;Obtain a set of image pixels corresponding to the original image, and obtain a set of pixel coordinates corresponding to the set of image pixels;
    获取所述滤波图像Ti对应的滤波图像像素集合,以及获取所述滤波图像像素集合对应的滤波像素坐标集合; Obtain a set of filtered image pixels corresponding to the filtered image Ti, and obtain a set of filtered pixel coordinates corresponding to the set of filtered image pixels;
    根据所述像素坐标集合与所述滤波像素坐标集合,确定所述滤波图像Ti对应的所述高频图像ZiThe high-frequency image Zi corresponding to the filtered image Ti is determined according to the pixel coordinate set and the filtered pixel coordinate set.
  5. 根据权利要求4所述的方法,所述根据所述像素坐标集合与所述滤波像素坐标集合,确定所述滤波图像Ti对应的所述高频图像Zi,包括: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 includes:
    在所述滤波像素坐标集合中获取待处理滤波像素坐标,将所述像素坐标集合中与所述待处理滤波像素坐标具有映射关系的像素坐标,确定为映射像素坐标;Obtain the filtered pixel coordinates to be processed from the filtered pixel coordinate set, and determine the pixel coordinates in the pixel coordinate set that have a mapping relationship with the filtered pixel coordinates to be processed as mapped pixel coordinates;
    在所述图像像素集合中获取所述映射像素坐标对应的映射图像像素,在所述滤波图像像素集合中获取所述待处理滤波像素坐标对应的待处理滤波像素;Obtain the mapped image pixels corresponding to the mapped pixel coordinates in the image pixel set, and obtain the to-be-processed filtered pixels corresponding to the to-be-processed filtered pixel coordinates in the filtered image pixel set;
    获取所述映射图像像素对应的映射像素值,以及获取所述待处理滤波像素对应的滤波像素值;Obtain the mapped pixel value corresponding to the mapped image pixel, and obtain the filtered pixel value corresponding to the filtered pixel to be processed;
    将所述映射像素值与所述滤波像素值之间的差值像素值,确定为所述待处理滤波像素对应的高频像素值;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;
    当确定出所述滤波图像像素集合中每个滤波图像像素分别对应的高频像素值时,将包含所述每个滤波图像像素分别对应的高频像素值的图像,确定为所述滤波图像Ti对应的所述高频图像ZiWhen 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 is determined to be the filtered image Ti The corresponding high-frequency image Zi .
  6. 根据权利要求1所述的方法,所述N个滤波尺寸包括第一滤波尺寸与第二滤波尺寸,所述N个滤波图像包括所述第一滤波尺寸对应的第一滤波图像与所述第二滤波尺寸对应的第二滤波图像,所述N个高频图像包括所述第一滤波图像对应的第一高频图像与所述第二滤波图像对应的第二高频图像;The method according to claim 1, the N filter sizes include a first filter size and a second filter size, and the N filter images include a first filter image corresponding to the first filter size and the second filter size. A second filtered image corresponding to the filter size, the N high-frequency images including a first high-frequency image corresponding to the first filtered image and a second high-frequency image corresponding to the second filtered image;
    所述将所述N个高频图像进行图像融合,得到融合图像,包括:The image fusion of the N high-frequency images to obtain the fused image includes:
    获取所述第一滤波尺寸对应的第一融合权重,以及获取所述第二滤波尺寸对应的第二融合权重;Obtain the first fusion weight corresponding to the first filter size, and obtain the second fusion weight corresponding to the second filter size;
    获取高频图像融合函数,并根据所述第一融合权重、所述第二融合权重以及所述高频图像融合函数,将所述第一高频图像与所述第二高频图像进行图像融合,得到所述融合图像。Obtain a high-frequency image fusion function, and perform image fusion on 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 the fused image.
  7. 根据权利要求6所述的方法,所述根据所述第一融合权重、所述第二融合权重以及所述高频图像融合函数,将所述第一高频图像与所述第二高频图像进行图像融合,得到所述融合图像,包括:The method according to claim 6, wherein the first high-frequency image and the second high-frequency image are combined according to the first fusion weight, the second fusion weight and the high-frequency image fusion function. Perform image fusion to obtain the fused image, including:
    按照所述高频图像融合函数,将所述第一融合权重与所述第二融合权重进行相加处理,得到运算权重;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;
    确定所述第一融合权重与所述运算权重之间的第一比值,基于所述第一比值将所述第一高频图像进行指数幂运算,得到第一运算特征;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;
    确定所述第二融合权重与所述运算权重之间的第二比值,基于所述第二比值将所述第二高频图像进行指数幂运算,得到第二运算特征;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;
    按照所述高频图像融合函数,将所述第一运算特征与所述第二运算特征进行几何融合,得到所述融合图像。 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. 根据权利要求1-7任一项所述的方法,所述将所述融合图像与所述原始图像进行融合,得到所述原始图像对应的锐化增强图像,包括:The method according to any one of claims 1 to 7, said fusing the fused image with the original image to obtain a sharpened enhanced image corresponding to the original image includes:
    对所述融合图像进行重映射处理,得到重映射融合图像;Perform remapping processing on the fused image to obtain a remapped fused image;
    将所述重映射融合图像与所述原始图像进行融合,得到所述锐化增强图像。The remapped fusion image is fused with the original image to obtain the sharpened enhanced image.
  9. 根据权利要求8所述的方法,所述重映射融合图像是指包含重映射像素值的图像,所述重映射像素值是按照重映射函数,将所述融合图像对应的融合像素值与像素值阈值进行比较之后所确定的。The method according to claim 8, the remapping fusion image refers to an image containing a remapping pixel value, and the remapping pixel value is a fusion pixel value corresponding to the fusion image and a pixel value according to a remapping function. The threshold is determined after comparison.
  10. 根据权利要求9所述的方法,所述对所述融合图像进行重映射处理,得到重映射融合图像,包括:The method according to claim 9, performing remapping processing on the fused image to obtain a remapped fused image includes:
    获取所述融合图像对应的融合图像像素,以及获取所述融合图像像素对应的融合像素值;Obtain the fused image pixels corresponding to the fused image, and obtain the fused pixel values corresponding to the fused image pixels;
    获取重映射函数,并根据所述重映射函数以及所述融合像素值,确定所述融合图像像素对应的重映射像素值;Obtain a remapping function, and determine the remapping pixel value corresponding to the fused image pixel based on the remapping function and the fused pixel value;
    将包含所述重映射像素值的图像,确定为所述重映射融合图像。An image containing the remapped pixel values is determined as the remapped fusion image.
  11. 根据权利要求10所述的方法,所述根据所述重映射函数以及所述融合像素值,确定所述融合图像像素对应的重映射像素值,包括:The method according to claim 10, wherein determining the remapping pixel value corresponding to the fused image pixel according to the remapping function and the fused pixel value includes:
    按照所述重映射函数,将所述融合像素值与像素值阈值进行比较;Compare the fused pixel value with a pixel value threshold according to the remapping function;
    若所述融合像素值大于或等于像素值阈值,则将预设像素参数确定为所述融合图像像素对应的重映射像素值;If the fused pixel value is greater than or equal to the pixel value threshold, then determine 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. 根据权利要求8所述的方法,所述将所述重映射融合图像与所述原始图像进行融合,得到所述锐化增强图像,包括:The method according to claim 8, said fusing the remapped fusion image with the original image to obtain the sharpened enhanced image includes:
    获取所述重映射融合图像对应的重映射像素,以及获取所述重映射像素对应的重映射像素值;Obtain the remapped pixel corresponding to the remapped fusion image, and obtain the remapped pixel value corresponding to the remapped pixel;
    获取所述原始图像对应的图像像素,以及获取所述图像像素对应的图像像素值;Obtain the image pixel corresponding to the original image, and obtain the image pixel value corresponding to the image pixel;
    将所述重映射像素值与所述图像像素值进行相加处理,得到锐化像素值;Add the remapped pixel value to the image pixel value to obtain a sharpened pixel value;
    将包含所述锐化像素值的图像,确定为所述锐化增强图像。An image containing the sharpened pixel value is determined as the sharpened enhanced image.
  13. 一种数据处理装置,所述装置部署在计算机设备上,包括:A data processing device, the device is deployed on a computer device, including:
    尺寸获取模块,用于获取用于进行滤波处理的滤波尺寸集合;所述滤波尺寸集合中包括N个滤波尺寸,N为大于1的正整数;所述N个滤波尺寸中的任意两个滤波尺寸不同;A size acquisition module, used to obtain a filter size set for filtering processing; the filter size set includes N filter sizes, N is a positive integer greater than 1; any two filter sizes among the N filter sizes different;
    滤波模块,用于基于每个滤波尺寸分别对原始图像进行低通滤波处理,得到N个滤波图像;The filter module is used to perform low-pass filtering on the original image based on each filter size to obtain N filtered images;
    图像转换模块,用于根据所述原始图像将所述N个滤波图像分别进行图像转换,得到N个高频图像;An image conversion module, configured to perform image conversion on the N filtered images respectively according to the original image to obtain N high-frequency images;
    图像融合模块,用于将所述N个高频图像进行图像融合,得到融合图像; An image fusion module, used to perform image fusion on the N high-frequency images to obtain a fused image;
    图像锐化模块,用于将所述融合图像与所述原始图像进行融合,得到所述原始图像对应的锐化增强图像。An image sharpening module is used to fuse the fused image with the original image to obtain a sharpened enhanced image corresponding to the original image.
  14. 一种计算机设备,包括:处理器、存储器以及网络接口;A computer device including: a processor, a memory and a network interface;
    所述处理器与所述存储器、所述网络接口相连,其中,所述网络接口用于提供网络通信功能,所述存储器用于存储计算机程序,所述处理器用于调用所述计算机程序,以使所述计算机设备执行权利要求1-12任一项所述的方法。The processor is connected to the memory and the network interface, wherein the network interface is used to provide network communication functions, the memory is used to store computer programs, and the processor is used to call the computer program to enable The computer device performs the method of any one of claims 1-12.
  15. 一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,所述计算机程序适于由处理器加载并执行权利要求1-12任一项所述的方法。A computer-readable storage medium, in which a computer program is stored, and the computer program is adapted to be loaded by a processor and execute the method described in any one of claims 1-12.
  16. 一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现权利要求1-12任一项所述的方法。 A computer program product includes a computer program that implements the method of any one of claims 1-12 when executed by a processor.
PCT/CN2023/082111 2022-04-24 2023-03-17 Data processing method and apparatus, and device and readable storage medium WO2023207408A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210432913.5 2022-04-24
CN202210432913.5A CN114529490B (en) 2022-04-24 2022-04-24 Data processing method, device, equipment and readable storage medium

Publications (2)

Publication Number Publication Date
WO2023207408A1 true WO2023207408A1 (en) 2023-11-02
WO2023207408A9 WO2023207408A9 (en) 2024-09-12

Family

ID=81628012

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/082111 WO2023207408A1 (en) 2022-04-24 2023-03-17 Data processing method and apparatus, and device and readable storage medium

Country Status (2)

Country Link
CN (1) CN114529490B (en)
WO (1) WO2023207408A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118570622A (en) * 2024-07-31 2024-08-30 安徽农业大学 Image tampering detection method and device based on high-frequency information enhancement

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114529490B (en) * 2022-04-24 2022-07-15 腾讯科技(深圳)有限公司 Data processing method, device, equipment and readable storage medium
CN115100081B (en) * 2022-08-24 2022-11-15 深圳佳弟子科技有限公司 LCD display screen gray scale image enhancement method, device, equipment and storage medium
CN117057377B (en) * 2023-10-11 2024-01-12 青岛冠成软件有限公司 Code identification matching method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108876733A (en) * 2018-05-30 2018-11-23 上海联影医疗科技有限公司 A kind of image enchancing method, device, equipment and storage medium
CN109118466A (en) * 2018-08-29 2019-01-01 电子科技大学 A kind of processing method of infrared image and visual image fusion
US20210271937A1 (en) * 2018-11-21 2021-09-02 Zhejiang Dahua Technology Co., Ltd. Method and system for generating a fusion image
CN113781338A (en) * 2021-08-31 2021-12-10 咪咕文化科技有限公司 Image enhancement method, device, equipment and medium
CN114529490A (en) * 2022-04-24 2022-05-24 腾讯科技(深圳)有限公司 Data processing method, device, equipment and readable storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3416363A1 (en) * 2017-06-13 2018-12-19 Koninklijke Philips N.V. Gamut mapping for hdr (de)coding
CN111275804B (en) * 2020-01-17 2022-09-16 腾讯科技(深圳)有限公司 Image illumination removing method and device, storage medium and computer equipment
US20210304422A1 (en) * 2020-03-27 2021-09-30 Toshiba Tec Kabushiki Kaisha Generation of non-occluded image based on fusion of multiple occulded images
CN112634183B (en) * 2020-11-05 2024-10-15 北京迈格威科技有限公司 Image processing method and device
CN113570530B (en) * 2021-06-10 2024-04-16 北京旷视科技有限公司 Image fusion method, device, computer readable storage medium and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108876733A (en) * 2018-05-30 2018-11-23 上海联影医疗科技有限公司 A kind of image enchancing method, device, equipment and storage medium
CN109118466A (en) * 2018-08-29 2019-01-01 电子科技大学 A kind of processing method of infrared image and visual image fusion
US20210271937A1 (en) * 2018-11-21 2021-09-02 Zhejiang Dahua Technology Co., Ltd. Method and system for generating a fusion image
CN113781338A (en) * 2021-08-31 2021-12-10 咪咕文化科技有限公司 Image enhancement method, device, equipment and medium
CN114529490A (en) * 2022-04-24 2022-05-24 腾讯科技(深圳)有限公司 Data processing method, device, equipment and readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118570622A (en) * 2024-07-31 2024-08-30 安徽农业大学 Image tampering detection method and device based on high-frequency information enhancement

Also Published As

Publication number Publication date
CN114529490B (en) 2022-07-15
CN114529490A (en) 2022-05-24
WO2023207408A9 (en) 2024-09-12

Similar Documents

Publication Publication Date Title
WO2023207408A1 (en) Data processing method and apparatus, and device and readable storage medium
WO2021135391A1 (en) Image quality evaluation method and apparatus
CN110310229A (en) Image processing method, image processing apparatus, terminal device and readable storage medium storing program for executing
US10863230B1 (en) Content stream overlay positioning
TWI769725B (en) Image processing method, electronic device and computer readable storage medium
CN106384388B (en) The real-time try-in method of internet glasses and system based on HTML5 and augmented reality
Koppel et al. Temporally consistent handling of disocclusions with texture synthesis for depth-image-based rendering
CN112602088B (en) Method, system and computer readable medium for improving quality of low light images
CN105005426A (en) Screenshot method and system for touch screen terminal, and data sharing method and system for touch screen terminal
CN110070499A (en) Image processing method, device and computer readable storage medium
CN106815803A (en) The processing method and processing device of picture
WO2023202447A1 (en) Method for training image quality improvement model, and method for improving image quality of video conference system
US20240095886A1 (en) Image processing method, image generating method, apparatus, device, and medium
CN110717864B (en) Image enhancement method, device, terminal equipment and computer readable medium
WO2022166907A1 (en) Image processing method and apparatus, and device and readable storage medium
CN111097169A (en) Game image processing method, device, equipment and storage medium
CN111383289A (en) Image processing method, image processing device, terminal equipment and computer readable storage medium
CN117522760B (en) Image processing method, device, electronic equipment, medium and product
US9665963B1 (en) Dynamic collage layout generation
CN114298935A (en) Image enhancement method, device and computer readable storage medium
CN108881974A (en) Open the method and system of television set child mode
CN109194942A (en) A kind of naked eye 3D video broadcasting method, terminal and server
CN117076811A (en) Webpage export method, device, equipment and storage medium
CN111968605A (en) Exposure adjusting method and device
WO2022178975A1 (en) Noise field-based image noise reduction method and apparatus, device, and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23794844

Country of ref document: EP

Kind code of ref document: A1