Image data processing method, device, apparatus and storage medium

By performing unilinear and bilinear interpolation on the basic blocks of the target image, the problem of discontinuous image block boundaries is solved, thus improving the visual quality of the image.

CN115546065BActive Publication Date: 2025-11-11TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211340719.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-29
Publication Date
2025-11-11
Estimated Expiration
2042-10-29

AI Technical Summary

Technical Problem

In existing technologies, the pixel values ​​at the boundaries of image blocks are discontinuous due to block artifacts during image data processing, resulting in poor image quality after decoding.

Method used

By obtaining the target basic block in the target image and its neighboring basic blocks in different directions that meet the block effect fading condition, single linear interpolation is performed on the first boundary region and bilinear interpolation is performed on the second boundary region to reduce the block effect.

Benefits of technology

It effectively reduces the block artifacts between basic blocks, improves image quality, and enhances the overall visual effect of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115546065B_ABST
    Figure CN115546065B_ABST
Patent Text Reader

Abstract

This application discloses an image data processing method, apparatus, device, and storage medium, applicable to scenarios such as cloud gaming in cloud technology. The method includes: if a target basic block in a target image satisfies the block artifact reduction condition along with a first neighboring basic block in a first direction and a second neighboring basic block in a second direction, then a first boundary region and a second boundary region are determined within the target basic block; the target basic block, the first neighboring basic block, and the second neighboring basic block belong to different image blocks in the target image; single-linear interpolation is performed on the original pixel values ​​covered by the first boundary region to obtain a first image region; bilinear interpolation is performed on the original pixel values ​​covered by the second boundary region to obtain a second image region; and the target basic block after deblocking is determined based on the first image region and the second image region. Using this application embodiment can reduce block artifacts between basic blocks and improve image quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of cloud technology, and in particular to an image data processing method, apparatus, device and storage medium. Background Technology

[0002] In the process of image data processing, after the image is encoded, transformed and quantized, due to factors such as the low bit rate of the original image and the large quantization step size, the decoded image has block artifacts, that is, the pixel values ​​are discontinuous at the boundaries between image blocks in the image.

[0003] Current block artifact removal techniques typically use weighted mean filtering to smooth image blocks with block artifacts. However, the pixel differences between smoothed and unsmoothed pixels may still be significant, resulting in poor image quality after block artifact reduction. Summary of the Invention

[0004] The technical problem to be solved by the embodiments of this application is to provide an image data processing method, apparatus, device and storage medium that can reduce the block effect between basic blocks and improve image quality.

[0005] One embodiment of this application provides an image data processing method, including:

[0006] Acquire the target image;

[0007] If the target basic block in the target image satisfies the block effect fade condition with the first neighboring basic block in the first direction and the target basic block satisfies the second neighboring basic block in the second direction, then the first boundary region and the second boundary region are determined in the target basic block; the first direction and the second direction are perpendicular to each other, the target basic block, the first neighboring basic block and the second neighboring basic block belong to different image blocks in the target image, and the size of the target basic block, the first neighboring basic block and the second neighboring basic block is smaller than the size of the image block in the target image;

[0008] The original pixel values ​​covered by the first boundary region are subjected to single linear interpolation to obtain the first image region;

[0009] The original pixel values ​​covered by the second boundary region are subjected to bilinear interpolation to obtain the second image region;

[0010] Based on the first image region and the second image region, the target basic block after deblocking is determined.

[0011] One embodiment of this application provides an image data processing apparatus, including:

[0012] The image acquisition module is used to acquire the target image;

[0013] The condition determination module is used to determine a first boundary region and a second boundary region in the target basic block if the target basic block in the target image satisfies the block effect fade condition with the first neighboring basic block in the first direction and the target basic block satisfies the block effect fade condition with the second neighboring basic block in the second direction; the first direction and the second direction are perpendicular to each other, the target basic block, the first neighboring basic block and the second neighboring basic block belong to different image blocks in the target image, and the size of the target basic block, the first neighboring basic block and the second neighboring basic block is smaller than the size of the image block in the target image;

[0014] The first interpolation processing module is used to perform single-linear interpolation processing on the original pixel values ​​covered by the first boundary region to obtain the first image region;

[0015] The second interpolation processing module is used to perform bilinear interpolation processing on the original pixel values ​​covered by the second boundary region to obtain the second image region;

[0016] The determination module is used to determine the target basic block after deblocking based on the first image region and the second image region.

[0017] The condition determination module is used for:

[0018] If the target basic block in the target image satisfies the block effect fade condition with the first neighboring basic block in the first direction and the target basic block with the second neighboring basic block in the second direction, then in the target basic block, the boundary region that is adjacent to the first neighboring basic block and not adjacent to the second neighboring basic block is determined as the first boundary sub-region.

[0019] Within the target basic block, the boundary region adjacent to the second neighboring basic block and adjacent to the first neighboring basic block is defined as the second boundary sub-region, and the first boundary sub-region and the second boundary sub-region are defined as the first boundary region; the first boundary sub-region and the second boundary sub-region do not overlap.

[0020] In the target basic blocks excluding the first boundary region, the boundary region that is adjacent to both the first and second neighboring basic blocks is defined as the second boundary region.

[0021] The first interpolation module is used for:

[0022] In the target basic block, obtain the pixel value a that is adjacent to the pixel row R in the first boundary sub-region, and in the first neighboring basic block, obtain the pixel value b that is symmetrical to pixel value a; the axis of symmetry between pixel value a and pixel value b is the boundary between the target basic block and the first neighboring basic block, and R is the number of rows less than or equal to the number of rows in the first boundary sub-region.

[0023] Based on pixel value a and pixel value b, perform single linear interpolation on each original pixel value in pixel row R to obtain the first image sub-region;

[0024] In the target basic block, obtain the pixel value c that is adjacent to the pixel column L in the second boundary sub-region, and in the second neighboring basic block, obtain the pixel value d that is symmetrical to pixel value c; the axis of symmetry between pixel value c and pixel value d is the boundary between the target basic block and the second neighboring basic block, and L is the number of columns less than or equal to the number of columns in the second boundary sub-region.

[0025] Based on pixel values ​​c and d, single-linear interpolation is performed on each original pixel value in pixel column L to obtain the second image sub-region. The first image sub-region and the second image sub-region are then defined as the first image region.

[0026] The first interpolation module performs single-linear interpolation on each original pixel value within pixel row R based on pixel value a and pixel value b to obtain a first image sub-region, including:

[0027] Get the first pixel difference between pixel value b and pixel value a, and get the first positional distance between pixel value b and pixel value a;

[0028] Obtain the second position distance between each original pixel value in pixel row R and pixel value a, and determine the first pixel smoothing value by multiplying the first pixel difference and the ratio of the second position distance to the first position distance.

[0029] Based on pixel value a and first pixel smoothing value, determine the updated pixel value corresponding to each original pixel value in pixel row R, and determine the first boundary sub-region with each updated pixel value in pixel row R as the first image sub-region.

[0030] The first interpolation module performs single-linear interpolation on each original pixel value within pixel column L based on pixel value c and pixel value d to obtain a second image sub-region, including:

[0031] Get the second pixel difference between pixel value d and pixel value c, and get the third position distance between pixel value d and pixel value c;

[0032] Obtain the fourth position distance between each original pixel value in pixel column L and pixel value c, and determine the second pixel smoothing value by multiplying the second pixel difference and the ratio of the fourth position distance to the third position distance.

[0033] The sum of pixel value c and the second pixel smoothing value is determined as the updated pixel value corresponding to each original pixel value in pixel column L. The second boundary sub-region with each updated pixel value in pixel column L is determined as the second image sub-region.

[0034] The second interpolation module is used for:

[0035] Obtain the first pixel row region and the first pixel column region adjacent to the second boundary region in the target basic block; the number of columns in the first pixel row region is the same as the number of columns in the second boundary region, and the number of rows in the first pixel column region is the same as the number of rows in the second boundary region.

[0036] A second pixel column region symmetrical to the first pixel column region is determined in the first neighboring basic block, and a second pixel row region symmetrical to the first pixel row region is determined in the second neighboring basic block; the axis of symmetry between the first pixel column region and the second pixel column region is the boundary between the target basic block and the first neighboring basic block, and the axis of symmetry between the first pixel row region and the second pixel row region is the boundary between the target basic block and the second neighboring basic block.

[0037] Based on the pixel values ​​in the first pixel column region and the pixel values ​​in the second pixel column region, interpolation processing in the first direction is performed on each original pixel value in the second boundary region to obtain the first direction interpolation results corresponding to each original pixel value in the second boundary region.

[0038] Based on the pixel values ​​in the first pixel row region and the pixel values ​​in the second pixel row region, interpolation processing is performed on each original pixel value in the second boundary region in the second direction to obtain the second direction interpolation results corresponding to each original pixel value in the second boundary region.

[0039] The average of the first-direction interpolation result and the second-direction interpolation result is determined as the updated pixel value corresponding to each original pixel value within the second boundary region, and the second boundary region with the updated pixel value is determined as the second image region.

[0040] The determination module is used for:

[0041] The first image region and the second image region are determined as candidate image regions, and the original pixel values ​​corresponding to each updated pixel value in the candidate image region are obtained.

[0042] If the pixel difference between each updated pixel value and the corresponding original pixel value in the candidate image region is less than or equal to the pixel threshold, then each updated pixel value in the candidate image region is retained, and the target basic block after deblocking is obtained based on the candidate image region.

[0043] If there exists a candidate image region where the difference between the updated pixel value e and the corresponding original pixel value is greater than the pixel threshold, then the updated pixel value e is replaced with the corresponding original pixel value to obtain the updated candidate image region. Based on the updated candidate image region, the target basic block after deblocking is obtained.

[0044] The aforementioned condition determination module is also used for:

[0045] If the target basic block and the first neighboring basic block in the first direction satisfy the block effect dilution condition, and the target basic block and the second neighboring basic block in the second direction do not satisfy the block effect dilution condition, then in the target basic block, the boundary region adjacent to the first neighboring basic block and the second neighboring basic block is defined as the third boundary region; the number of rows in the third boundary region is the same as the number of rows in the target basic block.

[0046] The original pixel values ​​within the third boundary region are subjected to single linear interpolation in the first direction to obtain the target basic block after deblocking.

[0047] The aforementioned condition determination module is also used for:

[0048] If the target basic block and the second neighboring basic block in the second direction satisfy the block effect dilution condition, and the target basic block and the first neighboring basic block in the first direction do not satisfy the block effect dilution condition, then in the target basic block, the boundary region adjacent to the first neighboring basic block and the second neighboring basic block is defined as the fourth boundary region; the number of columns in the fourth boundary region is the same as the number of columns in the target basic block.

[0049] The original pixel values ​​within the fourth boundary region are subjected to single linear interpolation in the second direction to obtain the target basic block after deblocking.

[0050] The image data processing device also includes:

[0051] The region pixel acquisition module is used to acquire first region pixel information of a target basic block in the target image; the first region pixel information includes unsmoothed pixel information in the target basic block; and

[0052] The region pixel acquisition module is also used to acquire the first neighboring basic block of the target basic block in a first direction, and to acquire the second region pixel information of the first neighboring basic block; the second region pixel information includes the unsmoothed pixel information in the first neighboring basic block;

[0053] The distribution feature determination module is used to determine the first pixel distribution feature corresponding to the target basic block based on the pixel information of the first region, and to determine the second pixel distribution feature corresponding to the first neighboring basic block based on the pixel information of the second region.

[0054] The block effect fade-off condition determination module is used to determine that the target basic block and the first neighboring basic block satisfy the block effect fade-off condition if, based on the first pixel distribution features and the second pixel distribution features, the target basic block and the first neighboring basic block are located in a non-texture complex region and there is a block effect between the target basic block and the first neighboring basic block; the non-texture complex region is the region in the target image where the texture complexity is less than the complexity threshold.

[0055] The region pixel acquisition module acquires the first region pixel information of the target basic block in the target image, including:

[0056] Obtain a target image block containing N*N original pixel values ​​from the target image. Define the region consisting of K*K consecutive original pixel values ​​in the target image block as the unsmoothed region. The original pixel values ​​in the unsmoothed region are the unsmoothed pixel information. N and K are both positive integers, and N is greater than K. The unsmoothed region and the target image block have the same center point.

[0057] The target image patch is divided into multiple non-overlapping basic blocks, and the target basic block is selected from the multiple non-overlapping basic blocks; each basic block is a quarter region of the target image patch;

[0058] The original pixel values ​​covered by the target basic block in the unsmoothed area are determined as the first region pixel information of the target basic block.

[0059] The first region pixel information includes (K / 2)*(K / 2) original pixel values ​​in the unsmoothed region;

[0060] The distribution feature determination module determines the first pixel distribution features corresponding to the target basic block based on the pixel information of the first region, including:

[0061] The mean pixel value of the target basic block is determined based on the (K / 2)*(K / 2) original pixel values ​​corresponding to the target basic block and the number of pixels covered by the target basic block in the unsmoothed area.

[0062] Based on the mean pixel value, number of pixels, and (K / 2)*(K / 2) original pixel values ​​corresponding to the target basic block, determine the pixel standard deviation corresponding to the target basic block;

[0063] The mean pixel value and standard deviation of the target basic block are used to determine the first pixel distribution feature of the target basic block.

[0064] The block effect dilution condition determination module is also used for:

[0065] If the standard deviation of the pixels corresponding to the target basic block and the standard deviation of the pixels corresponding to the first neighboring basic block are both less than the standard deviation threshold, then the target basic block and the first neighboring basic block are determined to be in a non-texture complex region.

[0066] Obtain the mean difference between the mean pixel value of the target basic block located in a non-texture complex region and the mean pixel value of the first neighboring basic block;

[0067] If the absolute value of the mean difference is greater than or equal to the first mean threshold, and the absolute value of the mean difference is less than or equal to the second mean threshold, then it is determined that there is a block effect between the target basic block and the first neighboring basic block.

[0068] This application provides a computer device, including: a processor and a memory;

[0069] The aforementioned memory is used to store computer programs, and the aforementioned processor is used to invoke the aforementioned computer programs to execute the steps in the aforementioned method.

[0070] One embodiment of this application provides a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a processor, perform the steps in the above-described method.

[0071] One embodiment of this application provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the above-described method.

[0072] In this embodiment, a target image is acquired. If the target basic block in the target image satisfies the block effect reduction condition with a first neighboring basic block in a first direction and with a second neighboring basic block in a second direction, then a first boundary region and a second boundary region are determined in the target basic block. The first and second directions are perpendicular to each other, and the target basic block, the first neighboring basic block, and the second neighboring basic block belong to different image blocks in the target image. By performing single-linear interpolation on the original pixel values ​​in the first boundary region and bilinear interpolation on the original pixel values ​​in the second boundary region, the target basic block after deblocking can be obtained. It is evident that when the target basic block satisfies the block effect reduction condition with neighboring basic blocks in different directions, the target basic block can be divided into different regions. Different regions can use different interpolation methods for pixel smoothing, which can reduce the block effect between basic blocks and improve image quality. Attached Figure Description

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

[0074] Figure 1 This is a schematic diagram of a network architecture provided in this application;

[0075] Figure 2 This is a schematic diagram of image segmentation provided in an embodiment of this application;

[0076] Figure 3 This is a flowchart illustrating an image data processing method provided in this application;

[0077] Figure 4 This is a schematic diagram of interpolation processing of target basic blocks in a target image provided in an embodiment of this application;

[0078] Figure 5 This is a schematic diagram of interpolation processing for a target basic block in a target image, provided in another embodiment of this application.

[0079] Figure 6 This is a schematic diagram of interpolation processing for a target basic block in a target image, provided in another embodiment of this application.

[0080] Figure 7 This is a schematic flowchart of another image data processing method provided in an embodiment of this application;

[0081] Figure 8 This is a schematic diagram of two adjacent image blocks in a first direction in a target image provided in an embodiment of this application;

[0082] Figure 9 This is a schematic diagram of the interpolation region of an image block in a target image provided in an embodiment of this application;

[0083] Figure 10 This is a schematic diagram of a deblocking process for a target image provided in an embodiment of this application;

[0084] Figure 11 This is a schematic diagram of the structure of an image data processing device provided in an embodiment of this application;

[0085] Figure 12 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0086] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0087] This application relates to cloud gaming scenarios in cloud technology. For example, in this application, the cloud server renders the game scene as an initial video and audio stream, performs deblocking processing on the game screen in the initial video and audio stream to obtain the final video and audio stream, and transmits the video and audio stream to the player's game terminal, which can improve the picture quality of the game screen (such as clarity) and enhance the user experience.

[0088] Cloud technology refers to a hosting technology that unifies hardware, software, and network resources within a wide area network (WAN) or local area network (LAN) to achieve data computation, storage, processing, and sharing. Cloud technology is a collective term for network technologies, information technologies, integration technologies, management platform technologies, and application technologies applied to cloud computing business models. It can form resource pools, providing flexible and convenient on-demand access. Cloud computing technology will become a crucial support. Backend services of technical network systems require substantial computing and storage resources, such as video websites, image websites, and many portal websites. With the rapid development and application of the internet industry, every item may have its own identification mark in the future, requiring transmission to backend systems for logical processing. Data at different levels will be processed separately, and various industry data will require robust system support, which can only be achieved through cloud computing.

[0089] Understandably, cloud technology is widely used in scenarios such as healthcare, security, and cloud gaming. Cloud gaming, also known as gaming on demand, is an online gaming technology based on cloud computing. It enables thin client devices with relatively limited graphics processing and data processing capabilities to run high-quality games. In cloud gaming, the game does not reside on the player's terminal but runs on a cloud server. The cloud server renders the game scene as a video and audio stream, which is then transmitted to the player's terminal via the network. The player's terminal does not need powerful graphics processing and data processing capabilities; it only needs basic streaming media playback capabilities and the ability to receive player input commands and send them to the cloud server.

[0090] To facilitate understanding, the basic concepts involved in the embodiments of this application are briefly introduced below:

[0091] H.264 is a highly compressed digital video codec standard proposed by the Joint Video Team (JVT), which consists of the International Telecommunication Union (ITU-T) Video Coding Expert Group (VCEG) and the ISO / IEC (International Electrotechnical Commission) Moving Picture Experts Group (MPEG).

[0092] Block artifacts: In block-based video compression coding, excessive quantization errors can cause visual discontinuities at block boundaries in the decoded image.

[0093] Please see Figure 1 , Figure 1 This is a schematic diagram of a network architecture provided in an embodiment of this application, such as... Figure 1 As shown, the network architecture may include server 10a and a terminal cluster, which may include one or more terminal devices; the number of terminal devices included in the terminal cluster is not limited here. Figure 1 As shown, the terminal cluster may specifically include terminal device 10b, terminal device 10c, terminal device 10d, and terminal device 10e, etc.; wherein, terminal device 10b, terminal device 10c, terminal device 10d, and terminal device 10e can all be connected to server 10a via network, so that each terminal device can interact with the server via network connection.

[0094] It is understandable that server 10a can refer to a device used to provide backend services for image data. For example, server 10a can refer to a backend device that performs encoding, decoding, and deblocking processing on image data. Each terminal device can refer to a user-facing electronic device, or a device used to provide frontend services for image data. For example, a terminal device can refer to an electronic device used to render and play image data. Application clients, such as audio / video playback clients, short video clients, live streaming clients, and game clients, can be installed on terminal devices to play image data.

[0095] The terminal devices in the terminal cluster can include, but are not limited to: smartphones, tablets, laptops, PDAs, mobile internet devices (MIDs), wearable devices (such as smartwatches and smart bracelets), smart voice interaction devices, smart home appliances (such as smart TVs), in-vehicle devices, VR devices (such as VR headsets and VR glasses), and aircraft, as well as other electronic devices that support image data playback. Server 10a can be a single physical server, a server cluster or distributed system consisting of at least two physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. This application does not limit this. The terminal devices and server 10a can be directly or indirectly connected via wired or wireless communication. The number of terminal devices and servers can be one or at least two; this application does not limit this.

[0096] In the embodiments of this application, Figure 1 The terminal device 10b shown is used as an example for description. For an encoding standard that encodes the target image in units of image blocks (which can be macroblocks, i.e., Marco Blocks, or simply MBs) (e.g., the aforementioned encoding standard H.264, or other encoding standards, which are not limited in this application), the terminal device 10b can receive the encoded bitstream generated by the encoder of the encoding standard sent by the server 10a, and use the decoder of the encoding standard to decode the encoded bitstream to obtain the decoded image data.

[0097] Terminal device 10b can obtain a target image from the decoded image data. This target image can include multiple image blocks, and each image block can be divided into four non-overlapping basic blocks. Each basic block is a basic processing unit in this embodiment. A basic block is one-quarter of the area of ​​the image block; for example, if the size of the image block is 16*16, the size of a basic block can be 8*8. See also... Figure 2 , Figure 2 This is a schematic diagram of image segmentation provided in an embodiment of this application; for example... Figure 2 As shown, the target image 20a may include six image blocks, denoted as image block 1, image block 2, image block 3, image block 4, image block 5, and image block 6. Each image block in the target image 20a can be divided into four basic blocks. For example, image block 4 can be equally divided into basic block 1, basic block 2, basic block 3, and basic block 4.

[0098] Furthermore, the terminal device 10b can determine a target basic block (e.g., basic block 2 in image block 4) from the image blocks of the target image. This target basic block can be any basic block in a single image block of the target image. The terminal device 10b needs to determine whether the target basic block needs to undergo deblocking processing. Here, deblocking processing can be considered as block effect reduction processing, such as smoothing the pixels in the target basic block to reduce the block effect of the target basic block. In this embodiment, the deblocking processing can include interpolation processing, which can include at least one of single linear interpolation and bilinear interpolation. The step of the terminal device 10b determining whether the target basic block needs to undergo deblocking processing can include: determining whether the target basic block is in a non-texture complex region (a non-texture complex region is a region in the target image where the texture complexity is less than a complexity threshold, which can be set according to actual needs, and this application does not limit it) and determining whether the target basic block has block effect.

[0099] When a target basic block and its adjacent basic blocks are located in a non-textured complex region, and block artifacts exist between the target basic block and its adjacent basic blocks, it can be determined that deblocking processing is required for the target basic block. The aforementioned adjacent basic blocks can refer to basic blocks adjacent to the target basic block in the horizontal direction (for ease of understanding, they can be called first neighboring basic blocks), or basic blocks adjacent to the target basic block in the vertical direction (for ease of understanding, they can be called second neighboring basic blocks). The terminal device 10b can use linear interpolation to smooth the target basic block to obtain the deblocked target basic block; the specific process will be described in detail later. In other words, the image data processing method provided in this application embodiment can also be called a deblocking method.

[0100] In this application embodiment, the target image may refer to any frame of the decoded image data, or the target image may belong to any frame of the decoded target video data. The target video data may include, but is not limited to: live video data such as live sports events, live games, and live conferences, daily short videos, food short videos, film and television edits, and film and television video data.

[0101] It is understood that the deblocking process involved in the embodiments of this application can be handled by... Figure 1 Any of the terminal devices shown can execute independently, or can be operated by... Figure 1 The server 10a shown can be executed independently, or it can be executed collaboratively by the server 10a and the terminal device; this application does not limit this.

[0102] Furthermore, it should be noted that the network architecture described in the embodiments of this application is for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and does not constitute a limitation on the technical solutions of the embodiments of this application. As those skilled in the art will know, with the evolution of system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0103] Please see Figure 3 , Figure 3 This is a schematic flowchart of an image data processing method provided in an embodiment of this application; it can be understood that the image data processing method can be executed by a computer device, which can be... Figure 1 The terminal cluster shown can be executed by any terminal device, or it can be... Figure 1 The server 10a shown; wherein, the image data processing method may include the following steps:

[0104] Step S101: Obtain the target image. If the target basic block in the target image satisfies the block effect fade condition with the first neighboring basic block in the first direction and the target basic block with the second neighboring basic block in the second direction, then determine the first boundary region and the second boundary region in the target basic block. The first direction and the second direction are perpendicular to each other. The target basic block, the first neighboring basic block and the second neighboring basic block belong to different image blocks in the target image. The size of the target basic block, the first neighboring basic block and the second neighboring basic block is smaller than the size of the image block in the target image.

[0105] In this embodiment of the application, the computer device can acquire decoded image data. The decoded image data can be a set of decoded images output by the decoder. The set of decoded images can be obtained by the computer device in local decoding, or it can be decoded by other devices and then transmitted to the computer device. This application does not limit this.

[0106] In the process of decoding image data, the boundary regions of image blocks in the decoded image data are usually smoothed. In other words, the decoded image data acquired by the computer can be considered a smoothed decoded image, and this smoothed decoded image can be used as the target image. This smoothing process can refer to smoothing filtering. In practice, it has been found that block artifacts still exist between image blocks in the smoothed target image. Because the pixel values ​​of the smoothed regions within an image block have relatively small differences, they cannot accurately reflect the existence of block artifacts. Therefore, it is necessary for the computer to acquire the original, unsmoothed pixel values ​​of the image blocks in the target image and to detect the presence of block artifacts based on these original, unsmoothed pixel values. In this embodiment, basic blocks in the target image are used as basic processing units. A basic block can be a quarter of the image block. The basic block can also contain some smoothed original pixel values ​​and some unsmoothed original pixel values. Therefore, the unsmoothed original pixel values ​​in the basic block can be used to detect whether there is a block effect in the basic block of the target image. This can improve the accuracy of whether there is a block effect between basic blocks. The method for determining whether there is a block effect in the basic block will be described in subsequent embodiments.

[0107] The computer device can refer to the currently processed basic block as the target basic block. This target basic block can be any basic block in the target image. It can acquire the first neighboring basic block of the target basic block in a first direction, and the second neighboring basic block of the target basic block in a second direction. The target basic block, the first neighboring basic block, and the second neighboring basic block are non-overlapping image regions in the target image, and each belongs to a different image block in the target image. That is, the common boundary between the target basic block and the first neighboring basic block is the boundary of an image block in the target image, and the common boundary between the target basic block and the second neighboring basic block is also the boundary of an image block in the target image. The first direction can be the horizontal direction of the target image, and the second direction can be the vertical direction of the target image. The first and second directions are perpendicular to each other, meaning the angle between the first and second directions is 90 degrees.

[0108] If the target basic block and its first neighboring basic block, as well as the target basic block and its second neighboring basic block, both satisfy the block effect fading condition, then the first boundary region and the second boundary region can be determined within the target basic block. The block effect fading condition can refer to two adjacent basic blocks being located in a non-texture-complex region, and a block effect existing between the two adjacent basic blocks. Two basic blocks satisfying the block effect fading condition indicate that deblocking processing is required. This deblocking processing can be understood as smoothing processing, such as single-linear interpolation or bilinear interpolation. A non-texture-complex region can refer to a region in the target image where the texture complexity is less than a complexity threshold. This complexity threshold can be customized according to actual needs, and this application does not limit it. Texture complexity is related to the pixel distribution characteristics of the original pixel values ​​covered by the non-texture-complex region. For example, texture complexity can be the pixel standard deviation in the pixel distribution characteristics, or it can be other distribution characteristics, and this application does not limit it. The process for determining whether the target basic block and the first neighboring basic block (or the target basic block and the second neighboring basic block) are located in a non-textured complex region, and the process for detecting whether there is a block effect between the target basic block and the first neighboring basic block (or the target basic block and the second neighboring basic block), will be described in subsequent embodiments. The first boundary region may include two non-overlapping boundary sub-regions, one boundary sub-region being adjacent only to the first neighboring basic block, and the other boundary sub-region being adjacent only to the second neighboring basic block, and the two boundary sub-regions containing the same number of original pixel values; the second boundary region may be adjacent to both the first neighboring basic block and the second neighboring basic block simultaneously, and the width and height of the second boundary region are the same.

[0109] Optionally, if both the target basic block and the first neighboring basic block, and the target basic block and the second neighboring basic block, satisfy the block effect fading condition, then the boundary region in the target basic block that is adjacent to the first neighboring basic block but not adjacent to the second neighboring basic block is defined as the first boundary sub-region; the boundary region in the target basic block that is adjacent to the second neighboring basic block but not adjacent to the first neighboring basic block is defined as the second boundary sub-region. These first and second boundary sub-regions can be referred to as the first boundary region, and they do not overlap. In target basic blocks other than the aforementioned first boundary regions, the boundary region that is simultaneously adjacent to both the first and second neighboring basic blocks can be defined as the second boundary region. It is understood that the original pixel values ​​in the first and second boundary regions of the target basic block need to be smoothed.

[0110] Please see Figure 4 , Figure 4 This is a schematic diagram of interpolation processing for target basic blocks in a target image provided in an embodiment of this application; as shown... Figure 4As shown, the area within the black dashed box represents the target basic block in the target image. This target basic block has a size of 8*8, and it is located in the first direction (e.g., Figure 4 The first neighboring basic block in the x-direction (also known as the horizontal direction of the target image, i.e., the direction of the pixel rows in the target image) is shown in the figure. Figure 4 As shown in basic block 30b, the target basic block is in the second direction (e.g. Figure 4 The second neighboring basic block (as shown in the y-direction, also known as the vertical direction of the target image, i.e., the direction of the pixel column in the target image) is as follows: Figure 4 The target basic block 30a is shown in the figure; the target basic block, basic block 30a, and basic block 30b have the same size, i.e., 8*8. If the target basic block and basic block 30a satisfy the block effect dilution condition, and the target basic block and basic block 30b also satisfy the block effect dilution condition, then the target basic block can be divided into regions. The first boundary region may include the boundary sub-region 30e (first boundary sub-region) adjacent to basic block 30b and the boundary sub-region 30d (second boundary sub-region) adjacent to basic block 30a. The second boundary region in the target basic block is as follows: Figure 4 The boundary region 30c is shown in the figure.

[0111] It is understandable that, such as Figure 4 The first boundary sub-region (12 pixel values), the second boundary sub-region (12 pixel values), and the second boundary region (36 pixel values) shown are merely illustrative examples of embodiments of this application. The number of pixels requiring interpolation can be set according to actual needs, that is, the size of the first boundary sub-region, the second boundary sub-region, and the second boundary region can be determined according to actual needs.

[0112] Step S102: Perform single-linear interpolation on the original pixel values ​​covered by the first boundary region to obtain the first image region.

[0113] In this embodiment, the computer device can perform interpolation processing on the first boundary region and the second boundary region in the target basic block in different ways, which can improve the smoothing effect of the target basic block. For example, the first boundary region only needs to be smoothed in one direction, i.e., single-linear interpolation processing; the first boundary sub-region in the first boundary region needs to be smoothed in a first direction; the second boundary sub-region in the first boundary region needs to be smoothed in a second direction; the second boundary region needs to be smoothed in two directions, i.e., bilinear interpolation processing, where the two directions include the first direction and the second direction. Figure 4 As shown, boundary sub-regions 30d and 30e require single-linear interpolation, while boundary region 30c requires bilinear interpolation smoothing.

[0114] Optionally, the single-linear interpolation processing of the first boundary region may include: obtaining pixel value a adjacent to pixel row R in the first boundary sub-region in the target basic block, and obtaining pixel value b symmetrical to pixel value a in the first neighboring basic block; the axis of symmetry between pixel value a and pixel value b is the boundary between the target basic block and the first neighboring basic block, and R is less than or equal to the number of rows in the first boundary sub-region; performing single-linear interpolation processing on each original pixel value in pixel row R based on pixel value a and pixel value b to obtain the first image sub-region; obtaining pixel value c adjacent to pixel column L in the second boundary sub-region in the target basic block, and obtaining pixel value d symmetrical to pixel value c in the second neighboring basic block; the axis of symmetry between pixel value c and pixel value d is the boundary between the target basic block and the second neighboring basic block, and L is less than or equal to the number of columns in the second boundary sub-region; performing single-linear interpolation processing on each original pixel value in pixel column L based on pixel value c and pixel value d to obtain the second image sub-region, and determining the first image sub-region and the second image sub-region as the first image region.

[0115] For example, such as Figure 4 As shown, the first boundary sub-region is Figure 4 As shown in the boundary sub-region 30e, the coordinate numbers of the original pixel values ​​contained in the first boundary sub-region in the first direction (horizontal direction) range from p = 2, 3, ..., 7 (p is used to represent the coordinate number in the first direction), and the coordinate numbers of the original pixel values ​​contained in the first boundary sub-region in the second direction (vertical direction) range from q = 0, 1 (q is used to represent the coordinate number in the second direction). Then the number of rows in the first boundary sub-region is 2 (containing two pixel rows), that is, the value of the above pixel row R can be 1 or 2.

[0116] When pixel row R is the first pixel row in the first boundary sub-region (the coordinate numbers q of the original pixel values ​​in the first pixel row are all 1, also known as row 1), the pixel value a adjacent to the first pixel row in the target basic block can be denoted as I (p=1, q=1). At this time, the pixel value b symmetrical to pixel value a in the first neighboring basic block (basic block 30b) can be denoted as I (p=14, q=1). When pixel row R is the second pixel row in the first boundary sub-region (the coordinate numbers q of the original pixel values ​​in the second pixel row are all 0, also known as row 0), the pixel value a adjacent to the second pixel row in the target basic block can be denoted as I (p=1, q=0). At this time, the pixel value b symmetrical to pixel value a in the first neighboring basic block (basic block 30b) can be denoted as I (p=14, q=0).

[0117] Furthermore, based on pixel values ​​I(p=1, q=1) and I(p=14, q=1), single-linear interpolation can be performed on each original pixel value of the first pixel row in the first boundary sub-region. Based on pixel values ​​I(p=1, q=0) and I(p=14, q=0), single-linear interpolation can be performed on each original pixel value of the second pixel row in the first boundary sub-region. After completing the single-linear interpolation of each pixel row in the first boundary sub-region, the first image sub-region can be obtained.

[0118] like Figure 4 As shown, the second boundary sub-region is Figure 4 As shown in the boundary sub-region 30d, the coordinates of the original pixel values ​​contained in the second boundary sub-region in the first direction (horizontal direction) range from p = 0, 1, and the coordinates of the original pixel values ​​contained in the second boundary sub-region in the second direction (vertical direction) range from q = 2, 3, ..., 7. Therefore, the number of columns in the second boundary sub-region is 2 (containing two pixel columns), that is, the value of the above pixel column L can be 1 or 2.

[0119] When pixel column L is the first pixel column in the second boundary sub-region (the coordinate numbers p of the original pixel values ​​in the first pixel column are all 0, also known as column 0), the pixel value c adjacent to the first pixel column in the target basic block can be denoted as I (p = 0, q = 1). At this time, the pixel value d symmetrical to pixel value c in the second neighboring basic block (basic block 30a) can be denoted as I (p = 0, q = 14). When pixel column L is the second pixel column in the second boundary sub-region (the coordinate numbers p of the original pixel values ​​in the second pixel column are all 1, also known as column 1), the pixel value c adjacent to the second pixel column in the target basic block can be denoted as I (p = 1, q = 1). At this time, the pixel value d symmetrical to pixel value c in the second neighboring basic block (basic block 30a) can be denoted as I (p = 1, q = 14).

[0120] Furthermore, based on pixel values ​​I(p=0, q=1) and I(p=0, q=14), single-linear interpolation can be performed on each original pixel value of the first pixel column in the second boundary sub-region. Based on pixel values ​​I(p=1, q=1) and I(p=1, q=14), single-linear interpolation can be performed on each original pixel value of the second pixel column in the second boundary sub-region. After completing the single-linear interpolation of each pixel column in the second boundary sub-region, the second image sub-region can be obtained. The first image sub-region and the second image sub-region can be collectively referred to as the first image region.

[0121] Optionally, the specific process of single linear interpolation processing within the first boundary sub-region may include, but is not limited to: obtaining a first pixel difference between pixel value b and pixel value a, and obtaining a first positional distance between pixel value b and pixel value a; obtaining a second positional distance between each original pixel value in pixel row R and pixel value a, and determining the first pixel smoothing value as the product of the first pixel difference and the ratio of the second positional distance to the first positional distance; determining the updated pixel value corresponding to each original pixel value in pixel row R based on pixel value a and the first pixel smoothing value, and determining the first boundary sub-region having each updated pixel value in pixel row R as the first image sub-region.

[0122] by Figure 4 Taking the target basic block shown as an example, the computer device can use the following formula (1) to calculate the updated pixel value of each original pixel value in the first boundary sub-region (boundary sub-region 30e):

[0123]

[0124] In formula (1), I′(p,q) represents the updated pixel value obtained after single-linear interpolation (smoothing in the first direction) of the original pixel value with coordinate number p in the first direction and coordinate number q in the second direction within the boundary sub-region 30e; I(1,q) represents the original pixel value (the aforementioned pixel value a) with coordinate number 1 in the first direction and coordinate number q in the second direction within the boundary sub-region 30e; I(14,q) represents the original pixel value (the aforementioned pixel value b) with coordinate number 14 in the first direction and coordinate number q in the second direction within the first neighboring basic block (basic block 30b). (p-1) represents the second positional distance between the original pixel value and pixel value a within pixel row R, and 13 is the first positional distance between pixel value b and pixel value a. This represents the smoothed value of the first pixel. It can be understood that by using the aforementioned formula (1) to perform single linear interpolation on each original pixel value within the boundary sub-region 30e in the first direction, a first image sub-region containing the updated pixel values ​​corresponding to each original pixel value can be obtained.

[0125] For example, such as Figure 4 As shown, when p=3 and q=1, the original pixel value with coordinate number 3 in the first direction and coordinate number q in the second direction within the boundary sub-region 30e, after single linear interpolation, yields the updated pixel value:

[0126] Optionally, the specific process of single linear interpolation processing within the second boundary sub-region may include, but is not limited to: obtaining a second pixel difference between pixel value d and pixel value c, and obtaining a third positional distance between pixel value d and pixel value c; obtaining a fourth positional distance between each original pixel value in pixel column L and pixel value c, and determining the product of the second pixel difference and the ratio of the fourth positional distance to the third positional distance as a second pixel smoothing value; determining the sum of pixel value c and the second pixel smoothing value as the updated pixel value corresponding to each original pixel value in pixel column L, and determining the second boundary sub-region having each updated pixel value in pixel column L as a second image sub-region.

[0127] by Figure 4 Taking the target basic block shown as an example, the computer device can use the following formula (2) to calculate the updated pixel value of each original pixel value in the second boundary sub-region (boundary sub-region 30d):

[0128]

[0129] In formula (2), I′(p,q) represents the updated pixel value obtained after single-linear interpolation (smoothing in the second direction) of the original pixel value with coordinate number p in the first direction and coordinate number q in the second direction within the boundary sub-region 30e; I(p,1) represents the original pixel value (the aforementioned pixel value c) with coordinate number p in the first direction and coordinate number 1 in the second direction within the boundary sub-region 30e; I(p,14) represents the original pixel value (the aforementioned pixel value d) with coordinate number p in the first direction and coordinate number 14 in the second direction within the second neighboring basic block (basic block 30a). (q-1) represents the fourth position distance between the original pixel value and pixel value c within pixel column L, and 13 is the third position distance between pixel value d and pixel value c (the third position distance here is equal to the aforementioned first position distance). This represents the smoothed value of the second pixel. It can be understood that by using the aforementioned formula (2) to perform single linear interpolation on each original pixel value within the boundary sub-region 30d in the second direction, a second image sub-region containing the updated pixel values ​​corresponding to each original pixel value can be obtained.

[0130] For example, such as Figure 4 As shown, when p=0 and q=2, the original pixel values ​​with coordinate number 0 in the first direction and coordinate number q in the second direction within the boundary sub-region 30d are updated after single linear interpolation to obtain the following pixel values:

[0131] It is understood that the computer device can use the above formula (1) to perform single linear interpolation processing in the first direction on the first boundary sub-region, and use the above formula (2) to perform single linear interpolation processing in the second direction on the second boundary sub-region to obtain the first image region. The pixel values ​​contained in the first image region are all updated pixel values ​​obtained after single linear interpolation processing.

[0132] Step S103: Perform bilinear interpolation on the original pixel values ​​covered by the second boundary region to obtain the second image region.

[0133] In this embodiment of the application, since the second boundary region is shared by the horizontal and vertical boundaries of the target basic block, it is necessary to perform linear interpolation processing in two directions on the original pixel values ​​in the second boundary region, that is, bilinear interpolation processing.

[0134] The bilinear interpolation processing for the second boundary region may include, but is not limited to: obtaining a first pixel row region and a first pixel column region adjacent to the second boundary region in the target basic block; the number of columns in the first pixel row region is the same as the number of columns in the second boundary region, and the number of rows in the first pixel column region is the same as the number of rows in the second boundary region. For example... Figure 4 As shown, the first pixel row region can be the first pixel row in the boundary sub-region 30e, and the first pixel column region can be the second pixel column in the boundary sub-region 30d.

[0135] A second pixel column region symmetrical to the first pixel column region is determined in the first neighboring basic block, and a second pixel row region symmetrical to the first pixel row region is determined in the second neighboring basic block; wherein, the axis of symmetry between the first pixel column region and the second pixel column region is the boundary between the target basic block and the first neighboring basic block, and the axis of symmetry between the first pixel row region and the second pixel row region is the boundary between the target basic block and the second neighboring basic block. Figure 4 As shown, the second pixel row region contains all the original pixel values ​​in the basic block 30a (second neighboring basic block) with coordinate numbers p from 2 to 7 in the first direction and coordinate number q from 14 in the second direction; the second pixel column region contains all the original pixel values ​​in the basic block 30b (first neighboring basic block) with coordinate number 14 in the first direction and coordinate number q from 2 to 7 in the second direction.

[0136] Further, based on the pixel values ​​in the first pixel column region and the pixel values ​​in the second pixel column region, interpolation processing in the first direction can be performed on each original pixel value in the second boundary region to obtain the first direction interpolation result corresponding to each original pixel value in the second boundary region; then, based on the pixel values ​​in the first pixel row region and the pixel values ​​in the second pixel row region, interpolation processing in the second direction can be performed on each original pixel value in the second boundary region to obtain the second direction interpolation result corresponding to each original pixel value in the second boundary region; the average value of the first direction interpolation result and the second direction interpolation result is determined as the updated pixel value corresponding to each original pixel value in the second boundary region, and the second boundary region with the updated pixel value is determined as the second image region. Among them, the pixel values ​​in the first pixel column region and the pixel values ​​in the first pixel row region can be the original pixel values ​​of the target basic block before interpolation processing, or they can be the updated pixel values ​​after single linear interpolation processing by the aforementioned formula (1) and the aforementioned formula (2), and this application does not limit them.

[0137] by Figure 4 Taking the target basic block shown as an example, the computer device can use the following formula (3) to calculate the updated pixel value of each original pixel value in the second boundary region (boundary region 30c):

[0138]

[0139] In formula (3), I′(p,q) represents the updated pixel value obtained by bilinear interpolation of the original pixel value with coordinate number p in the first direction and coordinate number q in the second direction within the boundary region 30c, I(1,q) represents the original pixel value in the first pixel column region, I(14,q) represents the original pixel value in the second pixel column region, I(p,1) represents the original pixel value in the first pixel row region, and I(p,14) represents the original pixel value in the second pixel row region.

[0140] It is understandable that the computer device can use the above formula (3) to perform bilinear interpolation processing on the second boundary region in the first and second directions to obtain the second image region. The pixel values ​​contained in the second image region are all updated pixel values ​​obtained after bilinear interpolation processing.

[0141] Step S104: Determine the target basic block after deblocking based on the first image region and the second image region.

[0142] In this embodiment, the computer device can determine the target basic block after deblocking by using a first image region obtained through single linear interpolation, a second image region obtained through bilinear interpolation, and the original pixel values ​​in the target basic block that have not undergone interpolation. By dividing the target basic block into different boundary regions and using single linear interpolation and bilinear interpolation to smooth these different boundary regions, the smoothing effect of the target basic block can be improved, thereby enhancing image quality.

[0143] Optionally, the step of determining the target basic block after deblocking based on the first image region and the second image region may include: the computer device may determine the first image region and the second image region as candidate image regions, and obtain the original pixel values ​​corresponding to each updated pixel value in the candidate image region; if the pixel difference between each updated pixel value in the candidate image region and the corresponding original pixel value is less than or equal to a pixel threshold, then each updated pixel value in the candidate image region is retained, and the target basic block after deblocking is obtained based on the candidate image region; if there is an updated pixel value e in the candidate image region and the pixel difference between the corresponding original pixel value is greater than a pixel threshold, then the updated pixel value e is replaced with the corresponding original pixel value to obtain an updated candidate image region, and the target basic block after deblocking is obtained based on the updated candidate image region.

[0144] The target basic block requiring interpolation may contain subtle textures, such as stars in the sky. These textures need to be preserved as much as possible. Therefore, this application embodiment can implement protective measures for a small amount of detailed textures in the target basic block. For example, when the updated pixel value obtained after interpolation differs significantly from the original pixel value, it indicates that the original pixel value represents a detailed texture portion, and the original pixel information needs to be retained. For instance, when the absolute value of the pixel difference between the updated pixel value and its corresponding original pixel value in the candidate image region is greater than or equal to a pixel threshold (this pixel threshold is used to manage the difference between the updated pixel value and the original pixel value, and can be customized according to actual needs, such as setting the pixel threshold to 15), the updated pixel value can be replaced with the original pixel value. When the absolute value of the pixel difference between the updated pixel value and its corresponding original pixel value in the candidate image region is less than the pixel threshold, the updated pixel value after interpolation can be retained. After performing the aforementioned operations on each updated pixel value after interpolation in the target basic block, the target basic block after deblocking can be obtained. By protecting the detailed textures in the target basic block, we can avoid deleting the actual detailed textures in the target basic block, thereby improving image quality and ensuring the authenticity of the image.

[0145] Optionally, if the target basic block and the first neighboring basic block in the first direction satisfy the block effect fading condition, and the target basic block and the second neighboring basic block in the second direction do not satisfy the block effect fading condition, then in the target basic block, the boundary region adjacent to the first and second neighboring basic blocks is determined as the third boundary region; the number of rows in the third boundary region is the same as the number of rows in the target basic block; the original pixel values ​​in the third boundary region are subjected to single linear interpolation in the first direction to obtain the target basic block after deblocking. In other words, when the target basic block only satisfies the block effect fading condition with the first neighboring basic block in the first direction, single linear interpolation in the first direction is required for the target basic block, and bilinear interpolation is not required.

[0146] Please see Figure 5 , Figure 5 This is a schematic diagram of interpolation processing for a target basic block in a target image, provided in another embodiment of this application. Figure 5 The black dashed box area shown represents the target basic block in the target image. If the target basic block is perpendicular to the first direction (e.g., Figure 5 The basic block 30b (first neighboring basic block) in the x-direction (as shown) satisfies the block effect fading condition, and the target basic block and the second direction (as shown) Figure 5 If the basic block 30a (second neighboring basic block) in the y-direction does not satisfy the block effect fading condition, then a boundary region 30f (third boundary region) that needs to be processed by single linear interpolation can be determined in the target basic block. The coordinate code p of the original pixel value in the first direction in the boundary region 30f is in the range of: p = 2, 3, ..., 7; the coordinate code q of the original pixel value in the second direction in the boundary region 30f is in the range of: q = 0, 1, 2, 3, ..., 7.

[0147] by Figure 5 Taking the target basic block shown as an example, the computer device can use the following formula (4) to calculate the updated pixel value of each original pixel value in the third boundary region (boundary region 30f):

[0148]

[0149] In formula (4), I′(p,q) represents the updated pixel value obtained by linear interpolation of the original pixel value with coordinate number p in the first direction and coordinate number q in the second direction within the boundary region 30f. Other symbols in formula (4) can be found in the descriptions of formulas (1) to (2) above, and will not be repeated here.

[0150] Optionally, if the target basic block and the second neighboring basic block in the second direction satisfy the block effect fading condition, and the target basic block and the first neighboring basic block in the first direction do not satisfy the block effect fading condition, then in the target basic block, the boundary region adjacent to the first and second neighboring basic blocks is defined as the fourth boundary region; the number of columns in the fourth boundary region is the same as the number of columns in the target basic block; the original pixel values ​​in the fourth boundary region are subjected to single linear interpolation in the second direction to obtain the target basic block after deblocking. In other words, when the target basic block only satisfies the block effect fading condition with the second neighboring basic block in the second direction, single linear interpolation in the second direction is required for the target basic block, and bilinear interpolation is not required.

[0151] Please see Figure 6 , Figure 6 This is a schematic diagram of interpolation processing for target basic blocks in a target image, provided in another embodiment of this application. Figure 6 The black dashed box area shown represents the target basic block in the target image. If the target basic block is perpendicular to the first direction (e.g., Figure 6 The basic block 30b (first neighboring basic block) in the x-direction shown does not satisfy the block effect fade-out condition, and the target basic block is adjacent to the second direction (as shown in the figure). Figure 6 If the basic block 30a (second neighboring basic block) in the y-direction (shown) satisfies the block effect fading condition, then the boundary region 30g (fourth boundary region) that needs to be processed by single linear interpolation can be determined in the target basic block. The coordinate code p of the original pixel value in the first direction of the boundary region 30g is in the range of: p = 0, 1, ..., 7; the coordinate code q of the original pixel value in the second direction of the boundary region 30f is in the range of: q = 2, 3, ..., 7.

[0152] by Figure 6 Taking the target basic block shown as an example, the computer device can use the following formula (5) to calculate the updated pixel value of each original pixel value in the fourth boundary region (boundary region 30g):

[0153]

[0154] In formula (5), I′(p,q) represents the updated pixel value obtained by linear interpolation in the second direction after the original pixel value with coordinate number p in the first direction and coordinate number q in the second direction within the boundary region 30g. Other symbols in formula (5) can be found in the descriptions in formulas (1) to (2) above, and will not be repeated here.

[0155] Optionally, if the target basic block in the target image does not satisfy the block effect fade-off condition with the first neighboring basic block in the first direction, and the target basic block does not satisfy the block effect fade-off condition with the second neighboring basic block in the second direction, then there is no need to perform interpolation processing on the target basic block.

[0156] It is understood that the descriptions of steps S101 to S104 above are all based on a basic block (i.e., the target basic block) in the target image. However, for the entire target image, each basic block in the target image can be processed using the aforementioned steps. This allows for the deblocking of the target image based on the interpolation processing of the basic blocks. Optionally, the computer device can perform deblocking processing (as described above, interpolation processing) on ​​the basic blocks in the target image sequentially in a first direction (the horizontal direction of the target image), or it can perform deblocking processing on the basic blocks in the target image sequentially in a second direction (the vertical direction of the target image), or it can perform deblocking processing on the basic blocks in the target image sequentially in other pre-set orders. This application does not limit this. For example, suppose the basic blocks in the target image can include: basic block B11, basic block B12, basic block B13, basic block B14, basic block B21, basic block B22, basic block B23, basic block B24, basic block B31, basic block B32, basic block B33, and basic block B34. Then, when deblocking the target image, the basic blocks in the target image can be deblocked sequentially in the aforementioned order to obtain deblocked basic blocks. The deblocked target image can be constructed from these deblocked basic blocks. The deblocked target image includes basic blocks that have undergone interpolation processing, as well as basic blocks that do not require deblocking.

[0157] In this embodiment, when the target basic block in the target image satisfies the block effect fading condition with neighboring basic blocks in two directions (the first neighboring basic block in the first direction and the second neighboring basic block in the second direction), a first boundary region requiring single-linear interpolation and a second boundary region requiring bilinear interpolation can be determined within the target basic block. That is, different boundary regions can employ different interpolation methods. When the target basic block in the target image satisfies the block effect fading condition with only one neighboring basic block in one direction (e.g., the first neighboring basic block in the first direction or the second neighboring basic block in the second direction), a region requiring single-linear interpolation (e.g., the aforementioned third boundary region or fourth boundary region) can be determined within the target region. In this case, there is no region within the target basic block requiring bilinear interpolation. In other words, based on whether the target basic block in the target image satisfies the block effect fading condition with the neighboring basic blocks in two directions, or whether the boundary region of the target basic block is shared by basic blocks in two directions, performing single linear interpolation or bilinear interpolation on the target basic block can improve the smoothness of the target basic block, reduce the block effect of the target basic block, and thus improve the image quality.

[0158] Please see Figure 7 , Figure 7 This is a schematic flowchart of another image data processing method provided in an embodiment of this application; it can be understood that this image data processing method can be executed by a computer device, which can be... Figure 1 The terminal cluster shown can be executed by any terminal device, or can be... Figure 1 The server 10a shown; wherein, the image data processing method may include the following steps:

[0159] Step S201: Obtain the first region pixel information of the target basic block in the target image; the first region pixel information includes the unsmoothed pixel information in the target basic block.

[0160] In this embodiment, after acquiring the decoded image data, the computer device can use any image frame from the decoded image data as the target image. The target image can include multiple image blocks, each of which can be divided into multiple basic blocks, all of which have the same size. Since block artifacts may exist between image blocks in the target image, and basic blocks are also regions within image blocks, block artifacts may also exist between basic blocks in the target image. Therefore, the computer device needs to acquire the regional pixel information of the basic blocks in the target image. This regional pixel information consists of the unsmoothed original pixel values ​​within the basic blocks of the target image (the boundary regions of the image blocks are smoothed during decoding, and the differences between the smoothed pixel values ​​are small, failing to accurately reflect block artifacts between image blocks). This allows for the determination of whether block artifacts exist in the basic blocks of the target image based on the regional pixel information of the basic blocks, thereby improving the accuracy of identifying block artifacts in the basic blocks.

[0161] A computer device can use the currently processed basic block as the target basic block, and determine the unsmoothed raw pixel values ​​contained in the target basic block as the region pixel information corresponding to the target basic block (for ease of understanding, this region pixel information can be referred to as the first region pixel information). It can be understood that before obtaining the first region pixel information corresponding to the target basic block, the unsmoothed region in the target image block to which the target basic block belongs can be determined first. This unsmoothed region refers to the area in the target image block where the unsmoothed raw pixel values ​​are located; that is, the pixel values ​​within the unsmoothed region are all unsmoothed raw pixel values. The raw pixel values ​​covered by the target basic block within this unsmoothed region can be used as the first region pixel information corresponding to the target basic block.

[0162] The method for determining the unsmoothed areas in the target image block may include: the computer device can obtain the smoothing parameters of the image block in the target image from the decoder, and the unsmoothed areas in the target image block can be determined based on the smoothing parameters; the smoothing parameters here can be used to indicate the areas in the target image block that have been smoothed or are about to be smoothed.

[0163] Optionally, the method for determining the unsmoothed region in the target image block may also include: during the decoding process, the target boundary region of the image block in the target image is usually smoothed. The target boundary region of the image block can refer to the region formed by the Z rows of pixels closest to the upper boundary line of the image block, the Z rows of pixels closest to the lower boundary line of the image block, the Z columns of pixels closest to the left edge line of the image block, and the Z columns of pixels closest to the right edge line of the image block. Z can be set according to requirements, such as Z can be 1 or 3, etc. Assuming that the target image block in the target image contains N*N original pixel values, the computer device can determine the region formed by K*K consecutive original pixel values ​​in the target image block as the unsmoothed region; the original pixel values ​​in the unsmoothed region are the unsmoothed pixel information, N and K are both positive integers, and N is greater than K, the difference between N and K is 2*Z, and the unsmoothed region has the same center point as the target image block; that is, the unsmoothed region can be considered as the central position region in the target image block.

[0164] Furthermore, the target image patch can be divided into multiple non-overlapping basic blocks. One of these basic blocks can be arbitrarily selected as the target basic block. Each basic block can represent a quarter of the target image patch. The original pixel values ​​covered by the unsmoothed area of ​​the target basic block can then be defined as the first region pixel information corresponding to the target basic block. Since the unsmoothed area in the target image patch contains K*K original pixel values, and the target basic block is a quarter of the target image patch, the first region pixel information of the target basic block can include (K / 2)*(K / 2) original pixel values ​​within the unsmoothed area. Detecting the presence of block artifacts in the target basic block using the first region pixel information avoids interference from already smoothed pixel information, thus improving the accuracy of block artifact detection.

[0165] Step S202: Obtain the first neighboring basic block of the target basic block in the first direction, and obtain the second region pixel information of the first neighboring basic block; the second region pixel information includes the unsmoothed pixel information in the first neighboring basic block.

[0166] In this embodiment, the computer device can acquire the first neighboring basic block of the target basic block in a first direction, that is, it can acquire the basic block adjacent to the target basic block in the horizontal direction of the target image. This horizontally adjacent basic block can be called the first neighboring basic block. The target basic block and the first neighboring basic block belong to two horizontally adjacent image blocks in the target image, respectively. The unsmoothed original pixel values ​​contained in the first neighboring basic block are determined as the region pixel information corresponding to the first neighboring basic block (for ease of understanding, the region pixel information here can be called the second region pixel information). It is understood that the method of acquiring the second region pixel information of the first neighboring basic block is the same as the method of acquiring the first region pixel information, and will not be described again here.

[0167] For example, please see Figure 8 , Figure 8 This is a schematic diagram of two adjacent image blocks in a first direction in a target image provided in an embodiment of this application. For example... Figure 8 As shown, the target image includes image block 1 and image block 2. Both image block 1 and image block 2 consist of 16*16 pixel values. Unsmoothed region 1 in image block 1 and unsmoothed region 2 in image block 2 each consist of 10*10 pixel values ​​(the original, unsmoothed pixel values). The center point of unsmoothed region 1 is the same as the center point of image block 1, and the center point of unsmoothed region 2 is the same as the center point of image block 2. Figure 8 As shown, both image patch 1 and image patch 2 can be divided into 4 basic blocks, and each basic block can be composed of 8*8 pixel values. Figure 8 The two dashed box regions shown represent two adjacent basic blocks in the first direction (horizontal direction) of the target image. For example, the dashed box region in image block 1 is the target basic block, and the dashed box region in image 2 is the first neighboring basic block in the first direction of the basic block in the target image.

[0168] Step S203: Based on the pixel information of the first region, determine the first pixel distribution features corresponding to the target basic block; based on the pixel information of the second region, determine the second pixel distribution features corresponding to the first neighboring basic block.

[0169] In this embodiment, the computer device can determine a first pixel distribution feature corresponding to the unsmoothed original pixel values ​​in the target basic block based on the pixel information of the first region of the target basic block. This first pixel distribution feature may include at least one of pixel mean and pixel standard deviation. The pixel mean reflects the central tendency of the original pixel values ​​in the target basic block, and the pixel standard deviation reflects the dispersion of the original pixel values ​​in the target basic block. Similarly, the computer device can determine a second pixel distribution feature corresponding to the unsmoothed original pixel values ​​in the first neighboring basic block based on the pixel information of the second region of the first neighboring basic block.

[0170] The first region pixel information of the target basic block may include (K / 2)*(K / 2) original pixel values ​​in the unsmoothed region. The calculation method of the first pixel distribution feature may include: the computer device can determine the pixel mean of the target basic block based on the (K / 2)*(K / 2) original pixel values ​​corresponding to the target basic block and the number of pixels covered by the target basic block in the unsmoothed region; further, the pixel standard deviation of the target basic block can be determined based on the pixel mean, the number of pixels, and the (K / 2)*(K / 2) original pixel values ​​corresponding to the target basic block; the pixel mean and the pixel standard deviation of the target basic block are determined as the first pixel distribution feature of the target basic block. For ease of understanding, the region covered by the target basic block in the unsmoothed region (i.e., the region where the aforementioned (K / 2)*(K / 2) original pixel values ​​are located) can be called the detection region, and the size of the detection region is (K / 2)*(K / 2). Figure 8 The gray area within the dashed frame region (target basic block) of image block 1 shown.

[0171] The specific calculation method for the pixel mean corresponding to the target basic block may include: the computer device can accumulate (K / 2)*(K / 2) original pixel values ​​in the detection area of ​​the target basic block to obtain the sum of the original pixel values; then the ratio between the sum of the original pixel values ​​and the number of pixels in the detection area of ​​the target basic block can be determined as the pixel mean corresponding to the detection area in the target basic block. For example, assuming that K is 10, the target basic block may include 25 original pixel values ​​in the unsmoothed area, that is, the detection area of ​​the target basic block includes 25 original pixel values, and the pixel mean of the target basic block can be expressed by the following formula (6):

[0172]

[0173] In formula (6), I i This represents the value of the i-th original pixel within the detection region of the target basic block.s This represents the average pixel value of the target basic block.

[0174] The specific calculation method for the pixel standard deviation corresponding to the target basic block can include: the computer device can obtain the pixel differences between the (K / 2)*(K / 2) original pixel values ​​corresponding to the target basic block and the pixel mean corresponding to the target basic block, as the third pixel difference, and then perform a sum of squares on the (K / 2)*(K / 2) third pixel differences corresponding to the target basic block to obtain the cumulative pixel difference; and perform a square root operation on the ratio between the cumulative pixel difference and the number of pixels in the target basic block to obtain the pixel standard deviation in the detection area of ​​the target basic block. For example, if K is 10 and the detection area of ​​the basic block includes 25 original pixel values, the pixel standard deviation of the target basic block can be expressed by the following formula (7):

[0175]

[0176] In formula (7), σ s This represents the pixel standard deviation of the target basic block.

[0177] It is understood that the second pixel distribution feature may include the pixel mean and pixel standard deviation corresponding to the first neighboring basic block. The pixel mean of the first neighboring basic block can also be calculated using formula (6), and the pixel standard deviation of the first neighboring basic block can be calculated using formula (7). The specific calculation process can be found in the above description, and will not be repeated here.

[0178] Step S204: If, based on the first pixel distribution features and the second pixel distribution features, it is determined that the target basic block and the first neighboring basic block are located in a non-texture complex region, and there is a block effect between the target basic block and the first neighboring basic block, then it is determined that the target basic block and the first neighboring basic block satisfy the block effect fading condition.

[0179] In this embodiment, because the texture masking effect is relatively weak in non-texture-complex areas, the basic blocks in these areas are more susceptible to block effects. In other words, if block effects exist in basic blocks within non-texture-complex areas, the impact on the quality of the basic blocks is more pronounced; the block effects are more easily perceived by the human eye, such as the individual squares visible to the naked eye. Here, a non-texture-complex area can refer to a region in the target image where the texture complexity is less than a complexity threshold. This non-texture-complex area can also be called a low-texture-complexity area, meaning a region with a relatively uniform pixel distribution. Non-texture-complex areas can include areas containing the sky, lake surfaces, walls, etc. The complexity threshold can be determined based on environmental parameters during the capture of the target image, such as weather and lighting information. Conversely, a texture-complex area refers to a region in the target image where the texture complexity is greater than or equal to the complexity threshold. This texture complexity can be represented by pixel standard values.

[0180] Therefore, a computer device only needs to detect whether there is a block effect between two adjacent basic blocks that are located in a non-textured complex region. In other words, if a computer device needs to determine whether there is a block effect between two adjacent basic blocks, it must first determine whether these two basic blocks are located in a non-textured complex region. That is, only after determining that both adjacent basic blocks are located in a non-textured complex region will it continue to determine whether there is a block effect between these two basic blocks. When both adjacent basic blocks are located in a non-textured complex region and there is a block effect between these two basic blocks, it can be determined that these two basic blocks meet the block effect fading condition, that is, these two basic blocks need to be deblocked.

[0181] Understandably, pixel values ​​are typically more evenly distributed in non-texture-complex regions, meaning their standard deviation is smaller. The target block and the first neighboring block, being two adjacent blocks in the first direction of the target image, are compared with standard deviation thresholds after calculating their pixel mean and standard deviation. If both are less than the threshold, the pixel value distribution within them is relatively even, indicating they are located in non-texture-complex regions. Conversely, if both are greater than or equal to the threshold, the pixel value distribution is relatively discrete, indicating they are located in texture-complex regions. By using the pixel standard deviation of the basic blocks, two adjacent basic blocks (the target basic block and the first neighboring basic block) belonging to a non-texture complex region can be detected, which is helpful for subsequent detection of whether there is block effect between two adjacent basic blocks.

[0182] The standard deviation threshold can be determined by environmental parameters at the time the target image was captured. These parameters can include information such as weather and lighting, or they can be empirical values. For example, the standard deviation threshold can be 5, or other values; this application does not limit this. The standard deviation threshold can also be used as a complexity threshold for non-textured complex regions. Assume the pixel standard deviations of the target basic block and the first neighboring basic block are σ... s σ t When σ s and σ t When both are less than 5, it can be determined that the target basic block and the first neighboring basic block are both in a textured complex region.

[0183] Furthermore, if both the target basic block and the first neighboring basic block are located in non-texture-complex regions, the mean difference between the mean pixel value of the target basic block in the non-texture-complex region and the mean pixel value of the first neighboring basic block can be obtained. If the absolute value of the mean difference between the target basic block and the first neighboring basic block is too large, it indicates that the target basic block and the first neighboring basic block do not belong to the same texture region, that is, the pixel value difference between the target basic block and the first neighboring basic block is caused by the texture itself in the target image, rather than by block effects. If the absolute value of the mean difference between the target basic block and the first neighboring basic block is too small, it indicates that there are no block effects between the target basic block and the first neighboring basic block. If the absolute value of the mean difference is greater than or equal to the first mean threshold, and the absolute value of the mean difference is less than or equal to the second mean threshold, it can be determined that there are block effects between the target basic block and the first neighboring basic block. By using the mean difference between the target basic block and the first neighboring basic block, the existence of block effects between the target basic block and the first neighboring basic block can be detected, thereby improving the accuracy of block effect detection.

[0184] The first and second mean thresholds can constitute a pixel difference interval, which can be determined by environmental parameters at the time the target image was captured. These environmental parameters can include information such as weather and lighting, or they can be empirical values. This difference interval can be set to [2, 10]. In this case, the first mean threshold can be set to 2, and the second mean threshold can be set to 10. Assuming the pixel mean values ​​of the target basic block and the first neighboring basic block are μ... s μ t When μ s and μ t When 2 ≤ |μ1 - μ2| ≤ 10, a block effect can be determined between the target basic block and its first neighboring basic block. Of course, this difference interval can also be set to other values.

[0185] It should be noted that when both the target basic block and the first neighboring basic block are located in non-textured complex regions, and there is a block effect between the target basic block and the first neighboring basic block, it can be determined that the target basic block and the first neighboring basic block meet the block effect fading condition, indicating that the target basic block needs to undergo deblocking processing. When both the target basic block and the first neighboring basic block are located in non-textured complex regions, and there is no block effect between the target basic block and the first neighboring basic block, it can be determined that the target basic block and the first neighboring basic block do not meet the block effect fading condition. When the target basic block and the first neighboring basic block are located in textured complex regions, it can be directly determined that there is no block effect between the target basic block and the first neighboring basic block, which means that the target basic block and the first neighboring basic block do not meet the block effect fading condition.

[0186] In this context, the target basic block and the first neighboring basic block are two basic blocks adjacent in the first direction. Through the aforementioned steps S201 to S204, it can be determined whether the target basic block and the first neighboring basic block satisfy the block effect fade-off condition. The computer device can also acquire the basic blocks adjacent to the target basic block in the second direction (i.e., the second neighboring basic block, where the target basic block and the second neighboring basic block are two image blocks that are vertically adjacent in the target image), and determine whether the target basic block and the second neighboring basic block satisfy the block effect fade-off condition. The determination process is the same as that between the target basic block and the first neighboring basic block, and will not be elaborated here.

[0187] Step S205: If the target basic block in the target image satisfies the block effect fade condition with the first neighboring basic block in the first direction and the target basic block with the second neighboring basic block in the second direction, then the first boundary region and the second boundary region are determined in the target basic block; the first direction and the second direction are perpendicular to each other.

[0188] Step S206: Perform single-linear interpolation on the original pixel values ​​covered by the first boundary region to obtain the first image region.

[0189] Step S207: Perform bilinear interpolation on the original pixel values ​​covered by the second boundary region to obtain the second image region.

[0190] Step S208: Determine the target basic block after deblocking based on the first image region and the second image region.

[0191] The specific implementation process of steps S205 to S208 can be found in the foregoing. Figure 3 The descriptions of steps S101 to S104 in the corresponding embodiments will not be repeated here. It is understood that for two adjacent image blocks in the first direction of the target image, if the basic blocks in both image blocks satisfy the block effect fade-off condition along with the adjacent basic blocks in both directions (horizontal and vertical), then the interpolation regions in these two image blocks are as follows: Figure 9 As shown, Figure 9 This is a schematic diagram of the interpolation region of an image block in a target image provided in an embodiment of this application. Figure 9 This represents two image patches in the first direction (horizontal direction) of the target image. The region with the same color as region 1 is the region that needs to be processed by single linear interpolation, and the region with the same color as region 2 is the region that needs to be processed by bilinear interpolation.

[0192] In this embodiment, when the target block in the target image satisfies the block effect fading condition with neighboring blocks in two directions, a first boundary region requiring single-linear interpolation and a second boundary region requiring bilinear interpolation can be determined within the target block. That is, different interpolation methods can be used for different boundary regions. When the target block in the target image satisfies the block effect fading condition with only one neighboring block in one direction, a region requiring single-linear interpolation can be determined within the target block. In this case, there is no region in the target block requiring bilinear interpolation. In other words, based on whether the target basic block in the target image satisfies the block effect fading condition with its neighboring basic blocks in two directions, or whether the boundary region of the target basic block is shared by image blocks in two directions, performing single-linear or bilinear interpolation on the target basic block can improve the smoothing effect of the target basic block, reduce the block effect between target basic blocks, and thus improve image quality. Detecting whether the target basic block satisfies the block effect fading condition by using the unsmoothed original pixel values ​​in the target basic block can avoid interference from the smoothed original pixel values ​​in the target basic block during the block effect fading condition detection process, thereby improving the detection accuracy of the block effect fading condition of the target basic block.

[0193] Please see Figure 10 , Figure 10 This is a schematic diagram of a deblocking process for a target image provided in an embodiment of this application. The deblocking process may include the following steps S301 to S307:

[0194] S301, Does the target image contain any untraversed basic blocks? The computer device can acquire the decoded image data and use the decoded image frame as the target image. It can then acquire all the basic blocks in the target image and traverse them sequentially. If all the basic blocks in the target image have been traversed, the current process ends. If there are untraversed basic blocks in the target image, then step S302 is executed.

[0195] S302, determine whether block effect fading interpolation is needed between the horizontally adjacent basic blocks (first neighboring basic blocks) and the vertically adjacent basic blocks (second neighboring basic blocks) and the current basic block (target basic block). The computer device can obtain the pixel mean and pixel standard deviation corresponding to the detection area in the current basic block, the pixel mean and pixel standard deviation corresponding to the detection area in the horizontally adjacent basic blocks, and the pixel mean and pixel standard deviation corresponding to the detection area in the vertical basic blocks. Further, the computer device can determine whether the current basic block and the horizontally adjacent basic blocks meet the block effect fading condition based on the pixel mean and pixel standard deviation of the current basic block and the horizontally adjacent basic blocks; and determine whether the current basic block and the vertically adjacent basic blocks meet the block effect fading condition based on the pixel mean and pixel standard deviation of the current basic block and the vertically adjacent basic blocks; the block effect fading condition may include detecting whether the current basic block and its adjacent basic blocks (horizontally adjacent basic blocks or vertical basic blocks) are in a non-texture complex region, and detecting whether there is block effect between the current basic block and its adjacent basic blocks in both directions.

[0196] If the current basic block and its horizontally adjacent basic blocks are not located in a non-textured complex region, or if there is no block effect between the current basic block and its horizontally adjacent basic blocks, then the current basic block and its horizontally adjacent basic blocks do not meet the block effect fading condition, and no block effect fading interpolation is needed in the horizontal direction. If the current basic block and its horizontally adjacent basic blocks are located in a non-textured complex region, and there is a block effect between the current basic block and its horizontally adjacent basic blocks, then the current basic block and its horizontally adjacent basic blocks meet the block effect fading condition, and block effect fading interpolation needs to be performed in the horizontal direction. If the current basic block and its vertically adjacent basic blocks are not located in a non-textured complex region, or if there is no block effect between the current basic block and its vertically adjacent basic blocks, then the current basic block and its vertically adjacent basic blocks do not meet the block effect fading condition, and no block effect fading interpolation is needed in the vertical direction. If the current basic block and its vertically adjacent basic blocks are located in a non-textured complex region, and there is a block effect between the current basic block and its vertically adjacent basic blocks, then the current basic block and its vertically adjacent basic blocks meet the block effect fading condition, and block effect fading interpolation needs to be performed in the vertical direction.

[0197] S303, determine whether the current basic block needs interpolation in both directions (horizontal and vertical). If the current basic block and its horizontally adjacent basic blocks do not meet the block effect dilution condition, and the current basic block and its vertically adjacent basic blocks do not meet the block effect dilution condition, then the current basic block does not need block effect dilution interpolation in either the horizontal or vertical direction, and step S301 can continue. If the current basic block and its horizontally adjacent basic blocks meet the block effect dilution condition, and / or, the current basic block and its vertically adjacent basic blocks meet the block effect dilution condition, then step S304 is executed.

[0198] S304, determine whether the current basic block needs interpolation in one direction. If the current basic block and its horizontally adjacent basic block satisfy the block effect dilution condition, or if the current basic block and its vertically adjacent basic block satisfy the block effect dilution condition, then the current basic block needs block effect dilution interpolation in one direction, and proceed to step S305. If the current basic block and its horizontally adjacent basic block satisfy the block effect dilution condition, and the current basic block and its vertically adjacent basic block satisfy the block effect dilution condition, then the current basic block needs block effect dilution interpolation in both directions, and proceed to step S306.

[0199] S305, Single linear interpolation is applied to all pixels that need interpolation. The computer device can use formula (4) or formula (5) to perform single linear interpolation on the original pixel values ​​that need interpolation in the current basic block to obtain the updated pixel values ​​in the current basic block.

[0200] S306, bilinear interpolation is used in the corner region of the image block, while single linear interpolation is used in other regions that require interpolation. Formula (3) can be used to perform bilinear interpolation on the original pixel values ​​in the corner region of the image block in the current basic block (the corner region of the image block to which the current basic block belongs, such as the second boundary region) to obtain the updated pixel values ​​in the corner region of the image block. Formulas (1) and (2) can be used to perform single linear interpolation on the original pixel values ​​in other regions that require interpolation in the current basic block to obtain the updated pixel values ​​in other regions that require interpolation.

[0201] S307, Detail Texture Protection. When the difference between the updated pixel value and the original pixel value is too large, the original pixel value is used. The computer device can calculate the pixel difference between the updated pixel value and the original pixel value within the current basic block. If the pixel difference between the updated pixel value e and its corresponding original pixel value in the current basic block is less than or equal to a pixel threshold, it indicates that the original pixel value does not belong to the detail texture region in the target image, and the updated pixel value e is determined as the final pixel value after deblocking. If the pixel difference between the updated pixel value e and its corresponding original pixel value in the current basic block is greater than a pixel threshold, it indicates that the pixel difference between the updated pixel value e and its corresponding original pixel value is too large, indicating that the original pixel value corresponding to the updated pixel value e belongs to the detail texture region in the target image, and the original pixel value is retained while the updated pixel value e is discarded. That is, the pixel values ​​of pixels within the detail texture region are not updated, thus protecting the detail texture region and improving image quality. Pixel e can be any pixel within the current basic block.

[0202] In summary, based on whether the target basic block in the target image satisfies the block effect fading condition with adjacent basic blocks in two directions (which can also be understood as whether the boundary region of the target basic block is shared by image blocks in two directions), performing single-linear or bilinear interpolation on the target basic block can improve the smoothing effect of the target basic block, reduce the block effect between target basic blocks, and thus improve image quality. Detecting whether the target basic block satisfies the block effect fading condition by using the unsmoothed original pixel values ​​of the target basic block avoids interference from the smoothed original pixel values ​​in the target basic block's block effect fading condition detection process, thus improving the detection accuracy of the block effect fading condition. Simultaneously, protecting the detailed texture regions in the target image avoids deleting genuinely existing details and textures, improving image quality and ensuring image authenticity.

[0203] Please see Figure 11 This is a schematic diagram of the structure of an image data processing apparatus provided in an embodiment of this application. The aforementioned image data processing apparatus can be a computer program (including program code) running on a computer device; for example, the image data processing apparatus is application software. This apparatus can be used to execute the corresponding steps in the method provided in the embodiments of this application. Figure 11 As shown, the image data processing device 1 may include: an image acquisition module 10, a condition determination module 11, a first interpolation processing module 12, a second interpolation processing module 13, and a determination module 14.

[0204] Image acquisition module 10 is used to acquire target images;

[0205] The condition determination module 11 is used to determine a first boundary region and a second boundary region in the target basic block if the target basic block in the target image satisfies the block effect fade condition with the first neighboring basic block in the first direction and the target basic block satisfies the block effect fade condition with the second neighboring basic block in the second direction; the first direction and the second direction are perpendicular to each other, the target basic block, the first neighboring basic block and the second neighboring basic block belong to different image blocks in the target image, and the size of the target basic block, the first neighboring basic block and the second neighboring basic block is smaller than the size of the image block in the target image;

[0206] The first interpolation processing module 12 is used to perform single linear interpolation processing on the original pixel values ​​covered by the first boundary region to obtain the first image region;

[0207] The second interpolation processing module 13 is used to perform bilinear interpolation processing on the original pixel values ​​covered by the second boundary region to obtain the second image region;

[0208] The determination module 14 is used to determine the target basic block after deblocking based on the first image region and the second image region.

[0209] In one or more embodiments, the condition determination module 11 is used to:

[0210] If the target basic block in the target image satisfies the block effect fade condition with the first neighboring basic block in the first direction and the target basic block with the second neighboring basic block in the second direction, then in the target basic block, the boundary region that is adjacent to the first neighboring basic block and not adjacent to the second neighboring basic block is determined as the first boundary sub-region.

[0211] Within the target basic block, the boundary region adjacent to the second neighboring basic block and adjacent to the first neighboring basic block is defined as the second boundary sub-region, and the first boundary sub-region and the second boundary sub-region are defined as the first boundary region; the first boundary sub-region and the second boundary sub-region do not overlap.

[0212] In the target basic blocks excluding the first boundary region, the boundary region that is adjacent to both the first and second neighboring basic blocks is defined as the second boundary region.

[0213] In one or more embodiments, the first interpolation processing module 12 is used to:

[0214] In the target basic block, obtain the pixel value a that is adjacent to the pixel row R in the first boundary sub-region, and in the first neighboring basic block, obtain the pixel value b that is symmetrical to pixel value a; the axis of symmetry between pixel value a and pixel value b is the boundary between the target basic block and the first neighboring basic block, and R is the number of rows less than or equal to the number of rows in the first boundary sub-region.

[0215] Based on pixel value a and pixel value b, perform single linear interpolation on each original pixel value in pixel row R to obtain the first image sub-region;

[0216] In the target basic block, obtain the pixel value c that is adjacent to the pixel column L in the second boundary sub-region, and in the second neighboring basic block, obtain the pixel value d that is symmetrical to pixel value c; the axis of symmetry between pixel value c and pixel value d is the boundary between the target basic block and the second neighboring basic block, and L is the number of columns less than or equal to the number of columns in the second boundary sub-region.

[0217] Based on pixel values ​​c and d, single-linear interpolation is performed on each original pixel value in pixel column L to obtain the second image sub-region. The first image sub-region and the second image sub-region are then defined as the first image region.

[0218] In one or more embodiments, the first interpolation processing module 12 performs single-linear interpolation processing on each original pixel value within pixel row R based on pixel value a and pixel value b to obtain a first image sub-region, including:

[0219] Get the first pixel difference between pixel value b and pixel value a, and get the first positional distance between pixel value b and pixel value a;

[0220] Obtain the second position distance between each original pixel value in pixel row R and pixel value a, and determine the first pixel smoothing value by multiplying the first pixel difference and the ratio of the second position distance to the first position distance.

[0221] Based on pixel value a and first pixel smoothing value, determine the updated pixel value corresponding to each original pixel value in pixel row R, and determine the first boundary sub-region with each updated pixel value in pixel row R as the first image sub-region.

[0222] In one or more embodiments, the first difference processing module 12 performs single-linear interpolation processing on each original pixel value within the pixel column L based on pixel value c and pixel value d to obtain a second image sub-region, including:

[0223] Get the second pixel difference between pixel value d and pixel value c, and get the third position distance between pixel value d and pixel value c;

[0224] Obtain the fourth position distance between each original pixel value in pixel column L and pixel value c, and determine the second pixel smoothing value by multiplying the second pixel difference and the ratio of the fourth position distance to the third position distance.

[0225] The sum of pixel value c and the second pixel smoothing value is determined as the updated pixel value corresponding to each original pixel value in pixel column L. The second boundary sub-region with each updated pixel value in pixel column L is determined as the second image sub-region.

[0226] In one or more embodiments, the second interpolation processing module 13 is used to:

[0227] Obtain the first pixel row region and the first pixel column region adjacent to the second boundary region in the target basic block; the number of columns in the first pixel row region is the same as the number of columns in the second boundary region, and the number of rows in the first pixel column region is the same as the number of rows in the second boundary region.

[0228] A second pixel column region symmetrical to the first pixel column region is determined in the first neighboring basic block, and a second pixel row region symmetrical to the first pixel row region is determined in the second neighboring basic block; the axis of symmetry between the first pixel column region and the second pixel column region is the boundary between the target basic block and the first neighboring basic block, and the axis of symmetry between the first pixel row region and the second pixel row region is the boundary between the target basic block and the second neighboring basic block.

[0229] Based on the pixel values ​​in the first pixel column region and the pixel values ​​in the second pixel column region, interpolation processing in the first direction is performed on each original pixel value in the second boundary region to obtain the first direction interpolation results corresponding to each original pixel value in the second boundary region.

[0230] Based on the pixel values ​​in the first pixel row region and the pixel values ​​in the second pixel row region, interpolation processing is performed on each original pixel value in the second boundary region in the second direction to obtain the second direction interpolation results corresponding to each original pixel value in the second boundary region.

[0231] The average of the first-direction interpolation result and the second-direction interpolation result is determined as the updated pixel value corresponding to each original pixel value within the second boundary region, and the second boundary region with the updated pixel value is determined as the second image region.

[0232] In one or more embodiments, the determining module 14 is used to:

[0233] The first image region and the second image region are determined as candidate image regions, and the original pixel values ​​corresponding to each updated pixel value in the candidate image region are obtained.

[0234] If the pixel difference between each updated pixel value and the corresponding original pixel value in the candidate image region is less than or equal to the pixel threshold, then each updated pixel value in the candidate image region is retained, and the target basic block after deblocking is obtained based on the candidate image region.

[0235] If there exists a candidate image region where the difference between the updated pixel value e and the corresponding original pixel value is greater than the pixel threshold, then the updated pixel value e is replaced with the corresponding original pixel value to obtain the updated candidate image region. Based on the updated candidate image region, the target basic block after deblocking is obtained.

[0236] In one or more embodiments, the condition determination module 11 is further configured to:

[0237] If the target basic block and the first neighboring basic block in the first direction satisfy the block effect dilution condition, and the target basic block and the second neighboring basic block in the second direction do not satisfy the block effect dilution condition, then in the target basic block, the boundary region adjacent to the first neighboring basic block and the second neighboring basic block is defined as the third boundary region; the number of rows in the third boundary region is the same as the number of rows in the target basic block.

[0238] The original pixel values ​​within the third boundary region are subjected to single linear interpolation in the first direction to obtain the target basic block after deblocking.

[0239] In one or more embodiments, the condition determination module 11 is further configured to:

[0240] If the target basic block and the second neighboring basic block in the second direction satisfy the block effect dilution condition, and the target basic block and the first neighboring basic block in the first direction do not satisfy the block effect dilution condition, then in the target basic block, the boundary region adjacent to the first neighboring basic block and the second neighboring basic block is defined as the fourth boundary region; the number of columns in the fourth boundary region is the same as the number of columns in the target basic block.

[0241] The original pixel values ​​within the fourth boundary region are subjected to single linear interpolation in the second direction to obtain the target basic block after deblocking.

[0242] In one or more embodiments, the image data processing device 1 further includes: a region pixel acquisition module 15, a distribution feature determination module 16, and a block effect fade-out condition determination module 17.

[0243] The region pixel acquisition module 15 is used to acquire first region pixel information of the target basic block in the target image; the first region pixel information includes unsmoothed pixel information in the target basic block.

[0244] The region pixel acquisition module 15 is further configured to acquire the first neighboring basic block of the target basic block in a first direction, and acquire the second region pixel information of the first neighboring basic block; the second region pixel information includes the unsmoothed pixel information in the first neighboring basic block.

[0245] The distribution feature determination module 16 is used to determine the first pixel distribution feature corresponding to the target basic block based on the first region pixel information, and to determine the second pixel distribution feature corresponding to the first neighboring basic block based on the second region pixel information.

[0246] The block effect fading condition determination module 17 is used to determine that the target basic block and the first neighboring basic block satisfy the block effect fading condition if, based on the first pixel distribution features and the second pixel distribution features, it is determined that the target basic block and the first neighboring basic block are in a non-texture complex region and there is a block effect between the target basic block and the first neighboring basic block; the non-texture complex region is a region in the target image where the texture complexity is less than the complexity threshold.

[0247] In one or more embodiments, the region pixel acquisition module 15 acquires first region pixel information of a target basic block in the target image, including:

[0248] Obtain a target image block containing N*N original pixel values ​​from the target image. Define the region consisting of K*K consecutive original pixel values ​​in the target image block as the unsmoothed region. The original pixel values ​​in the unsmoothed region are the unsmoothed pixel information. N and K are both positive integers, and N is greater than K. The unsmoothed region and the target image block have the same center point.

[0249] The target image patch is divided into multiple non-overlapping basic blocks, and the target basic block is selected from the multiple non-overlapping basic blocks; each basic block is a quarter region of the target image patch;

[0250] The original pixel values ​​covered by the target basic block in the unsmoothed area are determined as the first region pixel information of the target basic block.

[0251] In one or more embodiments, the first region pixel information includes (K / 2)*(K / 2) original pixel values ​​in the unsmoothed region;

[0252] The distribution feature determination module 16 determines the first pixel distribution features corresponding to the target basic block based on the pixel information of the first region, including:

[0253] The mean pixel value of the target basic block is determined based on the (K / 2)*(K / 2) original pixel values ​​corresponding to the target basic block and the number of pixels covered by the target basic block in the unsmoothed area.

[0254] Based on the mean pixel value, number of pixels, and (K / 2)*(K / 2) original pixel values ​​corresponding to the target basic block, determine the pixel standard deviation corresponding to the target basic block;

[0255] The mean pixel value and standard deviation of the target basic block are used to determine the first pixel distribution feature of the target basic block.

[0256] In one or more embodiments, the block effect fade-out condition determination module 17 is further configured to:

[0257] If the standard deviation of the pixels corresponding to the target basic block and the standard deviation of the pixels corresponding to the first neighboring basic block are both less than the standard deviation threshold, then the target basic block and the first neighboring basic block are determined to be in a non-texture complex region.

[0258] Obtain the mean difference between the mean pixel value of the target basic block located in a non-texture complex region and the mean pixel value of the first neighboring basic block;

[0259] If the absolute value of the mean difference is greater than or equal to the first mean threshold, and the absolute value of the mean difference is less than or equal to the second mean threshold, then it is determined that there is a block effect between the target basic block and the first neighboring basic block.

[0260] According to one embodiment of this application, the steps involved in the image processing method described above can be performed by... Figure 11 The image data processing apparatus 1 shown is executed by each module. For example, Figure 3 The step S101 shown can be performed by Figure 11 The image acquisition module 10 and the condition determination module 11 shown are used to perform this. Figure 3 The step S102 shown can be performed by Figure 11 The first interpolation processing module 12 shown is used to perform this. Figure 3 The step S103 shown can be performed by Figure 11 The second interpolation processing module 13 shown is used to perform this. Figure 3 The step S104 shown can be performed by Figure 11 The determination module 14 shown is used to perform the above.

[0261] According to one embodiment of this application, Figure 11 The modules in the image data processing apparatus 1 shown can be individually or entirely combined into one or more units, or some of these units can be further divided into at least two functionally smaller sub-units to achieve the same operation without affecting the technical effects of the embodiments of this application. The above modules are based on logical functional division. In practical applications, the function of one module can be implemented by at least two units, or the function of at least two modules can be implemented by one unit. In other embodiments of this application, the image data processing apparatus 1 may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented collaboratively by at least two units.

[0262] In this embodiment, when the target block in the target image satisfies the block effect fading condition with neighboring blocks in two directions, a first boundary region requiring single-linear interpolation and a second boundary region requiring bilinear interpolation can be determined within the target block. That is, different interpolation methods can be used for different boundary regions. When the target block in the target image satisfies the block effect fading condition with only one neighboring block in one direction, a region requiring single-linear interpolation can be determined within the target block. In this case, there is no region in the target block requiring bilinear interpolation. In other words, based on whether the target basic block in the target image satisfies the block effect fading condition with its neighboring basic blocks in two directions, or whether the boundary region of the target basic block is shared by basic blocks in two directions, performing single-linear or bilinear interpolation on the target basic block can improve the smoothing effect of the target basic block, reduce the block effect, and thus improve image quality. Detecting whether the target basic block satisfies the block effect fading condition by using the unsmoothed original pixel values ​​in the target basic block can avoid interference from the smoothed original pixel values ​​in the target basic block during the block effect fading condition detection process, thereby improving the detection accuracy of the block effect fading condition.

[0263] Please see Figure 12 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Figure 12 As shown, the computer device 1000 may include a processor 1001, a network interface 1004, and a memory 1005. Furthermore, the computer device 1000 may also include a user interface 1003 and at least one communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as Wi-Fi). I -F I Interface). The memory 1005 can be a high-speed RAM or a non-volatile memory. i (e.g., memory), such as at least one disk storage device. Optionally, memory 1005 may also be at least one storage device located remotely from the aforementioned processor 1001. For example... Figure 12 As shown, the memory 1005, which is a computer-readable storage medium, may include an operating system, a network communication module, a media content interface module, and a device control application.

[0264] exist Figure 12 In the computer device 1000 shown, the network interface 1004 provides network communication functions; while the user interface 1003 is mainly used to provide an interface for inputting media content.

[0265] Understandably, processor 1001 can be used to call device-defined applications stored in memory 1005 to achieve:

[0266] Acquire the target image;

[0267] If the target basic block in the target image satisfies the block effect fade condition with the first neighboring basic block in the first direction and the target basic block satisfies the second neighboring basic block in the second direction, then the first boundary region and the second boundary region are determined in the target basic block; the first direction and the second direction are perpendicular to each other, the target basic block, the first neighboring basic block and the second neighboring basic block belong to different image blocks in the target image, and the size of the target basic block, the first neighboring basic block and the second neighboring basic block is smaller than the size of the image block in the target image;

[0268] The original pixel values ​​covered by the first boundary region are subjected to single linear interpolation to obtain the first image region;

[0269] The original pixel values ​​covered by the second boundary region are subjected to bilinear interpolation to obtain the second image region;

[0270] Based on the first image region and the second image region, the target basic block after deblocking is determined.

[0271] It should be understood that the computer device 1000 described in the embodiments of this application can execute the foregoing text. Figure 3 , Figure 7 as well as Figure 10 The description of the image data processing method in any of the corresponding embodiments can also be performed as described above. Figure 11 The description of the image data processing apparatus 1 in the corresponding embodiment will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated here.

[0272] Furthermore, it should be noted that this application embodiment also provides a computer-readable storage medium, which stores a computer program executed by the image data processing device 1 mentioned above. The computer program includes program instructions, and when the processor executes the program instructions, it can execute the aforementioned... Figure 3 , Figure 7 as well as Figure 10The description of the image data processing method in any corresponding embodiment is already provided, and therefore will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated. For technical details not disclosed in the computer-readable storage medium embodiments related to this application, please refer to the description of the method embodiments of this application.

[0273] As an example, the above program instructions can be deployed and executed on a single computer device, or deployed and executed on at least two computer devices located in one location, or executed on at least two computer devices distributed in at least two locations and interconnected by a communication network. At least two computer devices distributed in at least two locations and interconnected by a communication network can form a blockchain network.

[0274] The aforementioned computer-readable storage medium can be an internal storage unit of the image data processing apparatus provided in any of the foregoing embodiments or the computer device described above, such as a hard disk or memory of the computer device. The computer-readable storage medium can also be an external storage device of the computer device, such as a plug-in hard disk, smart memory card (SMC), secure digital card (SD) card, flash card, etc., provided on the computer device. Furthermore, the computer-readable storage medium can include both internal storage units and external storage devices of the computer 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 will be output.

[0275] Furthermore, it should be noted that this application also provides a computer program product or computer program, which may include computer instructions, which may be stored in a computer-readable storage medium. The processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor may execute the computer instructions, causing the computer device to perform the aforementioned actions. Figure 3 , Figure 7 as well as Figure 10 The description of the point cloud processing method in any corresponding embodiment is already provided, and therefore will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated. For technical details not disclosed in the computer program products or computer program embodiments involved in this application, please refer to the description of the method embodiments of this application.

[0276] The terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish different media content, not to describe a specific order. Furthermore, the term "comprising," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, product, or device that includes a series of steps or units is not limited to the listed steps or modules, but may optionally include steps or modules not listed, or may optionally include other step units inherent to these processes, methods, apparatuses, products, or devices.

[0277] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.

[0278] The methods and related apparatuses provided in this application are described with reference to the method flowcharts and / or structural diagrams provided in this application. Specifically, each block of the method flowchart and / or structural diagram, as well as combinations of blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to create a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, generate instructions for implementing the process. Figure 1 A schematic diagram of one or more processes and / or structures. Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 A schematic diagram of one or more processes and / or structures. Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 A process or multiple processes and / or structures illustrate the steps of the functions specified in one or more boxes.

[0279] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.

Claims

1. An image data processing method, characterized in that, include: Acquire the target image; If the target basic block in the target image satisfies the block effect fade condition with the first neighboring basic block in the first direction and the target basic block satisfies the second neighboring basic block in the second direction, then a first boundary region and a second boundary region are determined in the target basic block; the first direction and the second direction are perpendicular to each other, the target basic block, the first neighboring basic block and the second neighboring basic block belong to different image blocks in the target image, and the size of the target basic block, the first neighboring basic block and the second neighboring basic block are all smaller than the size of the image block in the target image; The original pixel values ​​covered by the first boundary region are subjected to single linear interpolation to obtain the first image region; The original pixel values ​​covered by the second boundary region are subjected to bilinear interpolation to obtain the second image region; Based on the first image region and the second image region, the target basic block after deblocking is determined.

2. The method according to claim 1, characterized in that, If the target basic block in the target image satisfies the block effect fade-off condition with a first neighboring basic block in a first direction, and the target basic block satisfies the block effect fade-off condition with a second neighboring basic block in a second direction, then determining a first boundary region and a second boundary region in the target basic block includes: If the target basic block in the target image satisfies the block effect fade condition with the first neighboring basic block in the first direction and the target basic block with the second neighboring basic block in the second direction, then in the target basic block, the boundary region that is adjacent to the first neighboring basic block and not adjacent to the second neighboring basic block is determined as the first boundary sub-region. In the target basic block, the boundary region adjacent to the second neighboring basic block and the first neighboring basic block is defined as the second boundary sub-region, and the first boundary sub-region and the second boundary sub-region are defined as the first boundary region; the first boundary sub-region and the second boundary sub-region do not overlap with each other; In the target basic blocks excluding the first boundary region, the boundary region that is adjacent to both the first neighboring basic block and the second neighboring basic block is defined as the second boundary region.

3. The method according to claim 2, characterized in that, The step of performing single-linear interpolation on the original pixel values ​​covered by the first boundary region to obtain the first image region includes: In the target basic block, obtain the pixel value a that is adjacent to the pixel row R in the first boundary sub-region, and in the first neighboring basic block, obtain the pixel value b that is symmetrical to the pixel value a; the axis of symmetry between the pixel value a and the pixel value b is the boundary between the target basic block and the first neighboring basic block, and R is the number of rows in the first boundary sub-region that is less than or equal to the number of rows in the first boundary sub-region. Based on the pixel value a and the pixel value b, a single linear interpolation process is performed on each original pixel value in the pixel row R to obtain the first image sub-region; In the target basic block, obtain the pixel value c that is adjacent to the pixel column L in the second boundary sub-region, and in the second neighboring basic block, obtain the pixel value d that is symmetrical to the pixel value c; the axis of symmetry between the pixel value c and the pixel value d is the boundary between the target basic block and the second neighboring basic block, and L is less than or equal to the number of columns in the second boundary sub-region; Based on the pixel value c and the pixel value d, a single linear interpolation process is performed on each original pixel value in the pixel column L to obtain a second image sub-region. The first image sub-region and the second image sub-region are then determined as the first image region.

4. The method according to claim 3, characterized in that, The step of performing single-linear interpolation on each original pixel value within the pixel row R based on the pixel value a and the pixel value b to obtain the first image sub-region includes: Obtain the first pixel difference between pixel value b and pixel value a, and obtain the first positional distance between pixel value b and pixel value a; Obtain the second positional distance between each original pixel value in the pixel row R and the pixel value a, and determine the first pixel smoothing value as the product of the first pixel difference and the ratio of the second positional distance to the first positional distance; Based on the pixel value a and the first pixel smoothing value, the updated pixel values ​​corresponding to each original pixel value in the pixel row R are determined, and the first boundary sub-region having each updated pixel value in the pixel row R is determined as the first image sub-region.

5. The method according to claim 3, characterized in that, The step of performing single-linear interpolation on each original pixel value within the pixel column L based on the pixel value c and the pixel value d to obtain the second image sub-region includes: Obtain the second pixel difference between the pixel value d and the pixel value c, and obtain the third positional distance between the pixel value d and the pixel value c; Obtain the fourth position distance between each original pixel value in the pixel column L and the pixel value c, and determine the second pixel smoothing value as the product of the second pixel difference and the ratio of the fourth position distance to the third position distance; The sum of the pixel value c and the second pixel smoothing value is determined as the updated pixel value corresponding to each original pixel value in the pixel column L. The second boundary sub-region having each updated pixel value in the pixel column L is determined as the second image sub-region.

6. The method according to any one of claims 1 or 2, characterized in that, The step of performing bilinear interpolation on the original pixel values ​​covered by the second boundary region to obtain the second image region includes: In the target basic block, obtain a first pixel row region and a first pixel column region adjacent to the second boundary region; the number of columns in the first pixel row region is the same as the number of columns in the second boundary region, and the number of rows in the first pixel column region is the same as the number of rows in the second boundary region; A second pixel column region symmetrical to the first pixel column region is determined in the first neighboring basic block, and a second pixel row region symmetrical to the first pixel row region is determined in the second neighboring basic block; the axis of symmetry between the first pixel column region and the second pixel column region is the boundary between the target basic block and the first neighboring basic block, and the axis of symmetry between the first pixel row region and the second pixel row region is the boundary between the target basic block and the second neighboring basic block; Based on the pixel values ​​in the first pixel column region and the pixel values ​​in the second pixel column region, interpolation processing in the first direction is performed on each original pixel value in the second boundary region to obtain the first direction interpolation result corresponding to each original pixel value in the second boundary region. Based on the pixel values ​​in the first pixel row region and the pixel values ​​in the second pixel row region, interpolation processing in the second direction is performed on each original pixel value in the second boundary region to obtain the second direction interpolation results corresponding to each original pixel value in the second boundary region. The average of the first-direction interpolation result and the second-direction interpolation result is determined as the updated pixel value corresponding to each original pixel value within the second boundary region, and the second boundary region with the updated pixel value is determined as the second image region.

7. The method according to claim 1, characterized in that, The step of determining the target basic block after deblocking based on the first image region and the second image region includes: The first image region and the second image region are determined as candidate image regions, and the original pixel values ​​corresponding to each updated pixel value in the candidate image region are obtained. If the pixel difference between each updated pixel value and the corresponding original pixel value in the candidate image region is less than or equal to the pixel threshold, then each updated pixel value in the candidate image region is retained, and the target basic block after deblocking is obtained based on the candidate image region. If there exists a pixel difference between the updated pixel value e and the corresponding original pixel value within the candidate image region that is greater than the pixel threshold, then the updated pixel value e is replaced with the corresponding original pixel value to obtain the updated candidate image region. Based on the updated candidate image region, the target basic block after deblocking is obtained.

8. The method according to claim 1, characterized in that, Also includes: If the target basic block and the first neighboring basic block in the first direction satisfy the block effect dilution condition, and the target basic block and the second neighboring basic block in the second direction do not satisfy the block effect dilution condition, then in the target basic block, the boundary region adjacent to the first neighboring basic block and the second neighboring basic block is determined as the third boundary region; the number of rows in the third boundary region is the same as the number of rows in the target basic block. The original pixel values ​​within the third boundary region are subjected to single linear interpolation in the first direction to obtain the target basic block after deblocking.

9. The method according to claim 1, characterized in that, Also includes: If the target basic block and the second neighboring basic block in the second direction satisfy the block effect fading condition, and the target basic block and the first neighboring basic block in the first direction do not satisfy the block effect fading condition, then in the target basic block, the boundary region adjacent to the first neighboring basic block and the second neighboring basic block is determined as the fourth boundary region; the number of columns in the fourth boundary region is the same as the number of columns in the target basic block. The original pixel values ​​within the fourth boundary region are subjected to single linear interpolation in the second direction to obtain the target basic block after deblocking.

10. The method according to claim 1, characterized in that, Also includes: Obtain the pixel information of the first region of the target basic block in the target image; The first region pixel information includes unsmoothed pixel information in the target basic block; The target basic block is obtained from a first neighboring basic block in a first direction, and the second region pixel information of the first neighboring basic block is obtained; the second region pixel information includes unsmoothed pixel information in the first neighboring basic block. Based on the pixel information of the first region, the first pixel distribution feature corresponding to the target basic block is determined, and based on the pixel information of the second region, the second pixel distribution feature corresponding to the first neighboring basic block is determined. If, based on the first pixel distribution features and the second pixel distribution features, it is determined that the target basic block and the first neighboring basic block are in a non-texture complex region, and there is a block effect between the target basic block and the first neighboring basic block, then it is determined that the target basic block and the first neighboring basic block satisfy the block effect fading condition; the non-texture complex region is the region in the target image where the texture complexity is less than the complexity threshold.

11. The method according to claim 10, characterized in that, The step of obtaining the first region pixel information of the target basic block in the target image includes: A target image block containing N*N original pixel values ​​is obtained from the target image. The region consisting of K*K consecutive original pixel values ​​in the target image block is determined as the unsmoothed region. The original pixel values ​​in the unsmoothed region are the unsmoothed pixel information. N and K are both positive integers, and N is greater than K. The unsmoothed region and the target image block have the same center point. The target image block is divided into multiple non-overlapping basic blocks, and a target basic block is selected from the multiple non-overlapping basic blocks; each basic block is a quarter region of the target image block; The original pixel values ​​covered by the target basic block in the unsmoothed area are determined as the first region pixel information of the target basic block.

12. The method according to claim 11, characterized in that, The first region pixel information includes (K / 2)*(K / 2) original pixel values ​​in the unsmoothed region; The step of determining the first pixel distribution feature corresponding to the target basic block based on the pixel information of the first region includes: The mean pixel value corresponding to the target basic block is determined based on the (K / 2)*(K / 2) original pixel values ​​corresponding to the target basic block and the number of pixels covered by the target basic block in the unsmoothed area. Based on the mean pixel value corresponding to the target basic block, the number of pixels, and (K / 2)*(K / 2) original pixel values ​​corresponding to the target basic block, determine the pixel standard deviation corresponding to the target basic block; The mean pixel value and the standard deviation of the pixel value corresponding to the target basic block are determined as the first pixel distribution feature corresponding to the target basic block.

13. The method according to claim 12, characterized in that, Also includes: If the standard deviation of the pixel corresponding to the target basic block and the standard deviation of the pixel corresponding to the first neighboring basic block are both less than the standard deviation threshold, then it is determined that the target basic block and the first neighboring basic block are in a non-texture complex region. Obtain the mean difference between the mean pixel value corresponding to the target basic block located in the non-texture complex region and the mean pixel value corresponding to the first neighboring basic block; If the absolute value of the mean difference is greater than or equal to the first mean threshold, and the absolute value of the mean difference is less than or equal to the second mean threshold, then it is determined that there is a block effect between the target basic block and the first neighboring basic block.

14. An image data processing apparatus, characterized in that, include: The image acquisition module is used to acquire the target image; The condition determination module is used to determine a first boundary region and a second boundary region in the target basic block if the target basic block in the target image satisfies the block effect fade condition with a first neighboring basic block in a first direction and the target basic block satisfies the block effect fade condition with a second neighboring basic block in a second direction; the first direction and the second direction are perpendicular to each other, the target basic block, the first neighboring basic block and the second neighboring basic block belong to different image blocks in the target image, and the size of the target basic block, the first neighboring basic block and the second neighboring basic block is smaller than the size of the image block in the target image; The first interpolation processing module is used to perform single linear interpolation processing on the original pixel values ​​covered by the first boundary region to obtain the first image region; The second interpolation processing module is used to perform bilinear interpolation processing on the original pixel values ​​covered by the second boundary region to obtain the second image region; The determination module is used to determine the target basic block after deblocking based on the first image region and the second image region.

15. A computer device, characterized in that, include: Processor and memory; The processor is connected to a memory; the memory is used to store program code, and the processor is used to call the program code to execute the method as described in any one of claims 1 to 13.

16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the method as described in any one of claims 1 to 13.

17. A computer program product, characterized in that, Includes a computer program / instruction that, when executed by a processor, implements the method of any one of claims 1 to 13.

Citation Information

Patent Citations

  • Image processing method, device and equipment and storage medium

    CN111402165A

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

    CN113962856A