Loop filtering method and terminal
By acquiring semantic block information of an image and using corresponding filters for loop filtering, the problem of inaccurate image feature extraction in existing technologies is solved, thereby improving the encoding and decoding efficiency and image quality of video compression.
Patent Information
- Application Number
- CN202210853644.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-12-28
- Filing Date
- 2022-07-11
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2042-07-11
AI Technical Summary
Existing loop filtering methods are not accurate enough in image feature extraction, which leads to reduced encoding and decoding efficiency in the video compression process.
By acquiring semantic block information of the image to be filtered, the semantic blocks included in the image to be filtered are determined, and a corresponding filter is used for loop filtering for each semantic block to improve the accuracy of image feature extraction.
It improves the encoding and decoding efficiency in the video compression process, enhances image quality, and reduces bit rate.
Smart Images

Figure CN116366841B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of video compression technology, specifically relating to a loop filtering method and terminal. Background Technology
[0002] In the video compression encoding and decoding process, the loop filtering method improves the image quality and reduces the image bitrate by filtering the image, thereby achieving video compression.
[0003] Current loop filtering methods determine the filter based on the bitrate point corresponding to the image and then use the filter to filter the image. However, the image features extracted by the filter determined by the above method are not accurate enough, which reduces the encoding and decoding efficiency in the video compression process. Summary of the Invention
[0004] This application provides a loop filtering method and terminal, which can solve the technical problem that the image features extracted by the filter are not accurate enough, thereby reducing the encoding and decoding efficiency in the video compression process.
[0005] Firstly, a loop filtering method is provided, which includes:
[0006] Electronic devices acquire semantic block information of the image to be filtered;
[0007] Based on the semantic block information, at least one semantic block is determined to be included in the image to be filtered;
[0008] For each semantic block, the filter corresponding to the semantic block is used to perform loop filtering on the first reconstructed value corresponding to the semantic block to obtain the second reconstructed value corresponding to the semantic block.
[0009] Secondly, a loop filter device is provided, comprising:
[0010] The first acquisition module is used to acquire semantic block information of the image to be filtered;
[0011] The first determining module is used to determine at least one semantic block included in the image to be filtered based on the semantic block information;
[0012] The first filtering module is used to perform loop filtering on the first reconstructed value corresponding to the semantic block for each semantic block using the filter corresponding to the semantic block, so as to obtain the second reconstructed value corresponding to the semantic block.
[0013] Thirdly, a terminal is provided, comprising a processor and a memory, the memory storing a program or instructions executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the method described in the first aspect.
[0014] Fourthly, a readable storage medium is provided, on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.
[0015] Fifthly, a chip is provided, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the method as described in the first aspect.
[0016] In a sixth aspect, a computer program / program product is provided, the computer program / program product being stored in a storage medium, the computer program / program product being executed by at least one processor to perform the steps of the method as described in the first aspect.
[0017] In this embodiment, the electronic device acquires semantic block information of the image to be filtered; based on the semantic block information, it determines at least one semantic block included in the image to be filtered; for each semantic block, it uses the filter corresponding to the semantic block to perform loop filtering on the first reconstructed value corresponding to the semantic block to obtain a second reconstructed value corresponding to the semantic block. In this embodiment, based on the semantic block information of the image to be filtered, semantic blocks in the image to be filtered are determined; for each semantic block, based on the semantic type corresponding to the semantic block, the filter corresponding to the semantic block is used to perform loop filtering on the first reconstructed value corresponding to the semantic block, thereby realizing loop filtering of the image to be filtered. That is, this embodiment uses corresponding filters to filter semantic blocks of different semantic types, rather than using the same filter, thereby improving the accuracy of image feature extraction and thus improving the encoding and decoding efficiency in the video compression process. Attached Figure Description
[0018] Figure 1 This is one of the application diagrams of existing loop filters;
[0019] Figure 2 This is one of the application diagrams of existing loop filters;
[0020] Figure 3 This is a flowchart of the loop filtering method provided in the embodiments of this application;
[0021] Figure 4 This is one of the application schematic diagrams of the loop filtering method provided in the embodiments of this application;
[0022] Figure 5 This is the second schematic diagram illustrating the application of the loop filtering method provided in the embodiments of this application;
[0023] Figure 6 This is the third schematic diagram illustrating the application of the loop filtering method provided in the embodiments of this application;
[0024] Figure 7 This is the fourth schematic diagram illustrating the application of the loop filtering method provided in the embodiments of this application;
[0025] Figure 8 This is a structural diagram of the loop filter device provided in the embodiments of this application;
[0026] Figure 9 This is a structural diagram of the communication device provided in the embodiments of this application;
[0027] Figure 10 This is a schematic diagram of the hardware structure of the terminal provided in the embodiments of this application. Detailed Implementation
[0028] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0029] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of the same class, not limited in number; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0030] In the embodiments of this application, the loop filtering devices corresponding to the loop filtering methods can all be terminals, which can also be called terminal devices or user equipment (UE). Terminals can be mobile phones, tablet computers, laptop computers, personal digital assistants (PDAs), handheld computers, netbooks, ultra-mobile personal computers (UMPCs), mobile internet devices (MIDs), augmented reality (AR) / virtual reality (VR) devices, robots, wearable devices or vehicle-mounted devices (VUEs), pedestrian terminals (PUEs), smart home devices (home appliances with wireless communication capabilities, such as refrigerators, televisions, washing machines, or furniture), game consoles, and personal computers. Terminal devices such as computers (PCs), ATMs, or self-service machines; wearable devices include smartwatches, smart bracelets, smart earphones, smart glasses, smart jewelry (smart bracelets, smart necklaces, smart anklets, smart ankle chains, etc.), smart wristbands, smart clothing, etc. It should be noted that the embodiments in this application do not limit the specific type of terminal.
[0031] For ease of understanding, the following describes some aspects of the embodiments of this application:
[0032] In existing video compression technologies, the following two types of loop filters are used to perform loop filtering on the reconstructed values of the image.
[0033] The first type of loop filter is a loop filter that includes a deblocking filter, a sample adaptive offset module, and an adaptive in-loop filtering module.
[0034] The deblocking filter calculates the boundary strength based on the reconstructed values of the boundary pixels of adjacent image blocks in the image. The filter coefficients of the deblocking filter are set according to the boundary strength, and then the deblocking filter is used to filter the image to eliminate the discontinuity of boundary pixels in the image.
[0035] The sample adaptive offset module is used to compensate for local information in different regions of an image after eliminating discontinuities at boundary pixels, thereby reducing distortion between the original and reconstructed images. Specifically, sample adaptive offset includes two methods: boundary compensation and strip compensation.
[0036] Boundary compensation involves classifying the current image patch based on its reconstructed value and that of its neighboring patches, and compensating the current image patch with the same value for patches of the same category. See point 1 for details, where the positional relationship between the neighboring image patches and the current image patch can be described as follows: Figure 1 As shown.
[0037] Strip compensation divides the current image block into 32 equal strips based on the pixel range of the current image block, and compensates the pixels within the same strip with the same pixel value.
[0038] The adaptive in-loop filtering module, after compensating for pixel values in the image, determines the filter corresponding to the current image patch based on the gradient features of pixels in the current image patch, and then uses this filter to perform filtering processing on the image. For an example, please refer to [link to example]. Figure 2 It should be understood that when the current image patch is a chroma patch, the following applies: Figure 2 The 5x5 filter shown in the image; when the current image patch is a luminance patch, it is used. Figure 2 The filter shown is 7x7 in size.
[0039] The second type of loop filter is the neural network-based loop filter. Currently, neural network-based loop filters determine the filter based on the bit rate point corresponding to the image, and then use this filter to perform filtering processing on the image.
[0040] However, the first type of loop filter mentioned above determines the filter corresponding to the current image block based on the gradient features of pixels in the current image block. This means that regions with different semantic types within the current image block may be processed using the same filter, leading to inaccurate image features extracted by the filter. The second type of loop filter mentioned above determines the filter based on the corresponding bitrate point in the image. Again, this means that regions with different semantic types within the current image block may be processed using the same filter, resulting in inaccurate image features extracted by the filter. Therefore, the image features extracted by the filters determined by the above methods are inaccurate, thus reducing the encoding and decoding efficiency in the video compression process.
[0041] To address the aforementioned potential technical problems, embodiments of this application provide a loop filtering method. The loop filtering method provided by these embodiments will be described in detail below with reference to the accompanying drawings and through some examples and application scenarios.
[0042] Please see Figure 3 , Figure 3 This is a flowchart of the loop filtering method provided in this application. The loop filtering method provided in this embodiment includes the following steps:
[0043] S101, the electronic device acquires the semantic block information of the image to be filtered.
[0044] The loop filtering method provided in this application can be applied to electronic devices, which acquire semantic block information of the image to be filtered. Here, the semantic block can be understood as a sub-block in the image to be filtered, and each semantic block information corresponds to one semantic block. The semantic block information is pre-set information related to the corresponding semantic block.
[0045] S102, based on the semantic block information, determine at least one semantic block included in the image to be filtered.
[0046] In this step, after obtaining the semantic block information, the semantic block information is parsed, and at least one semantic block included in the image to be filtered is determined based on the content represented by the semantic block information. Specifically, if the image to be filtered corresponds to a unique semantic element, then the image to be filtered is determined as a semantic block. For a detailed explanation of the technical solution for determining at least one semantic block included in the image to be filtered, please refer to subsequent embodiments.
[0047] S103, for each semantic block, use the filter corresponding to the semantic block to perform loop filtering on the first reconstructed value corresponding to the semantic block to obtain the second reconstructed value corresponding to the semantic block.
[0048] In this step, after determining the semantic blocks corresponding to the image to be filtered, the semantic type and first reconstructed value corresponding to each semantic block are obtained. The filter corresponding to the semantic block can be determined based on the semantic type. Then, the first reconstructed value corresponding to the semantic block is subjected to loop filtering using the aforementioned filter to obtain the second reconstructed value corresponding to the semantic block, thereby achieving the filtering of the image to be filtered.
[0049] Optionally, a first identifier representing the semantic type is preset, and the semantic type corresponding to the semantic block can be determined by obtaining the first identifier corresponding to each semantic block.
[0050] An optional implementation is to define the number of the above semantic types as C, set the value range of the first identifier to be 0 to C-1, and one first identifier corresponds to one semantic type, that is, the semantic type is a single semantic type.
[0051] For example, if the semantic types include five categories: vehicles, roads, overpasses, plants, and pedestrians, then five first identifiers can be set, and each first identifier corresponds to a semantic type.
[0052] Another optional implementation is that the semantic type is a mixed semantic type, the number of mixed semantic types is defined as D, the value range of the first identifier is set to C to (D+C-1), and one first identifier corresponds to one mixed semantic type.
[0053] For example, if the mixed semantic types include three types, namely vehicles and roads, vehicles and pedestrians, and roads and pedestrians, then three first identifiers can be set, and each first identifier corresponds to a mixed semantic type.
[0054] In this embodiment, the electronic device acquires semantic block information of the image to be filtered; based on the semantic block information, it determines at least one semantic block included in the image to be filtered; for each semantic block, it uses the filter corresponding to the semantic block to perform loop filtering on the first reconstructed value corresponding to the semantic block to obtain a second reconstructed value corresponding to the semantic block. In this embodiment, based on the semantic block information of the image to be filtered, semantic blocks in the image to be filtered are determined; for each semantic block, based on the semantic type corresponding to the semantic block, the filter corresponding to the semantic block is used to perform loop filtering on the first reconstructed value corresponding to the semantic block, thereby realizing loop filtering of the image to be filtered. That is, this embodiment uses corresponding filters to filter semantic blocks of different semantic types, rather than using the same filter, thereby improving the accuracy of image feature extraction and thus improving the encoding and decoding efficiency in the video compression process.
[0055] Optionally, determining at least one semantic block included in the image to be filtered based on the semantic block information includes:
[0056] The image to be filtered is divided into at least one image block;
[0057] The image block is identified as the semantic block.
[0058] The aforementioned semantic block information includes first size information, which, as one possible implementation, is used to characterize the size of the largest semantic block in the image to be filtered.
[0059] In this embodiment, the image to be filtered is divided into at least one image block, and the image block is defined as a semantic block. The size of the image block is the same as the size represented by the first size information. It should be understood that this embodiment does not limit the specific division method of the image to be filtered.
[0060] For example, when the size of the image to be filtered is 128*128 and the size represented by the first size information is 64*64, the image to be filtered can be divided into four quadtrees to obtain four image blocks of size 64*64, and these image blocks are determined as semantic blocks.
[0061] In other embodiments, if the size of the image to be filtered is less than or equal to the size represented by the first size information, the image to be filtered can be determined as a semantic block.
[0062] In this embodiment, the semantic block corresponding to the image to be filtered is determined by using the first size information included in the semantic block information. Then, the first reconstructed value corresponding to the semantic block is subjected to loop filtering based on the filter corresponding to the semantic block, thereby improving the encoding and decoding efficiency in the video compression process.
[0063] Optionally, after obtaining at least one image patch, the method further includes:
[0064] The first image block is divided into sub-blocks;
[0065] The sub-block is identified as the semantic block.
[0066] The semantic block information also includes second size information associated with the first image block, wherein the first image block is an image block associated with the second size information. As one possible implementation, the second size information is used to characterize the size of the smallest semantic block in the image to be filtered.
[0067] In this embodiment, after obtaining at least one image block, the first image block is divided into sub-blocks, and these sub-blocks are defined as semantic blocks. The size of each sub-block is greater than or equal to the size represented by the second size information; however, this embodiment does not limit the specific division method.
[0068] Optionally, dividing the first image block into sub-blocks includes:
[0069] The first image block is divided using the N-ary tree partitioning method until the partitioning depth of the resulting sub-blocks is the same as the preset partitioning depth.
[0070] The semantic block information also includes the N-ary tree partitioning method associated with the first image block.
[0071] In this embodiment, the first image block can be divided using an N-ary tree partitioning method from the semantic block information until the partitioning depth of the resulting sub-blocks is the same as the preset partitioning depth. The preset partitioning depth can be the partitioning depth represented by the partitioning depth information included in the semantic block information.
[0072] Specifically, after each division of the first image block using the N-ary tree method, the size of the resulting sub-block is compared with the size represented by the second size information. If the size of the sub-block is greater than the size represented by the second size information, the N-ary tree method is used to continue dividing the sub-block; if the size of the sub-block is equal to the size represented by the second size information, the division of the sub-block is stopped.
[0073] The above N-ary tree partitioning methods can be represented in the form of partition identifiers. The above N-ary tree partitioning methods include, but are not limited to, quadtree partitioning, ternary tree partitioning, or binary tree partitioning.
[0074] In an alternative embodiment, the first image block can be divided using the above-described N-ary tree partitioning method to obtain sub-blocks of the same size.
[0075] For example, please refer to Figure 4 It can be used Figure 4 The shown partitioning method divides the first image block into a ternary tree or a binary tree, resulting in sub-blocks with the same area.
[0076] In another alternative embodiment, the first image block can be divided using the above-described N-ary tree partitioning method to obtain sub-blocks of different sizes.
[0077] For example, please refer to Figure 5 It can be used Figure 5 The partitioning method shown divides the first image block into a binary tree, resulting in sub-blocks with different areas.
[0078] For example, please refer to Figure 6 , Figure 6 The diagram shows the sub-blocks obtained after dividing the image to be filtered using an N-ary tree partitioning method.
[0079] In this embodiment, the first image block is divided using the second size information associated with the first image block and the N-ary tree partitioning method, thereby determining the semantic block corresponding to the image to be filtered. Then, based on the filter corresponding to the semantic block, the first reconstructed value corresponding to the semantic block is subjected to loop filtering, thereby improving the encoding and decoding efficiency in the video compression process.
[0080] Optionally, when the electronic device is a decoding end, acquiring the semantic block information of the image to be filtered includes:
[0081] Obtain the semantic information bitstream;
[0082] The semantic information bitstream is parsed to obtain the semantic block information of the image to be filtered.
[0083] In this embodiment, when the electronic device is the decoding end, that is, during the video decoding process, the semantic information bitstream is acquired and parsed to obtain the semantic block information of the image to be filtered. The aforementioned semantic information bitstream is a data stream that encodes the semantic block information of the original image corresponding to the image to be filtered; the semantic block information includes first size information, second size information associated with the first image block, and an N-ary tree partitioning method. In other embodiments, the aforementioned semantic block information can be written into the video bitstream, and during the video decoding process, the video bitstream is parsed to obtain the semantic block information.
[0084] Optionally, when the electronic device is an encoding end, acquiring the semantic block information of the image to be filtered includes:
[0085] Obtain the original image;
[0086] The original image is subjected to semantic segmentation processing to determine the semantic block information of the original image;
[0087] The semantic block information of the original image is the same as the semantic block information of the image to be filtered.
[0088] In this embodiment, when the electronic device is the encoding end, that is, during the process of encoding the video, the above semantic block information can be compiled into a semantic information bitstream, and the semantic information bitstream and the video bitstream can be transmitted and parsed respectively.
[0089] Alternatively, different stream identifiers can be added to the semantic information stream and the video stream to distinguish the two streams. For example, the stream identifier of the semantic information stream is 1, and the stream identifier of the video stream is 0.
[0090] In this embodiment, an original image is obtained. This original image is an image that has not undergone preprocessing before being filtered. Preprocessing includes, but is not limited to, spatial transformation and noise reduction. Semantic segmentation is then performed on the original image to determine its semantic block information. Optionally, please refer to... Figure 7 , Figure 7 The image shown is a semantic segmentation image obtained after semantic segmentation of the original image using a semantic segmentation neural network. Image features of semantically identical regions in the semantic segmentation image can be extracted to obtain semantic block information of the original image.
[0091] It should be understood that the semantic block information of the original image is the same as the semantic block information of the image to be filtered.
[0092] Optionally, the step of performing loop filtering on the first reconstructed value corresponding to the semantic block using the filter corresponding to the semantic block to obtain the second reconstructed value corresponding to the semantic block includes:
[0093] The first target filter is used to perform loop filtering on the first reconstructed value corresponding to the semantic block to obtain the second reconstructed value corresponding to the semantic block.
[0094] The first target filter mentioned above is associated with the image to be filtered. In this embodiment, if the image to be filtered corresponds to a semantic type, that is, all semantic blocks in the image to be filtered correspond to the same semantic type, then the first target filter associated with the image to be filtered can be used to perform loop filtering on the first reconstructed value corresponding to each semantic block, thereby obtaining the second reconstructed value corresponding to each semantic block.
[0095] Optionally, before performing loop filtering on the first reconstructed value corresponding to the semantic block using the filter corresponding to the semantic block to obtain the second reconstructed value corresponding to the semantic block for each semantic block, the method further includes:
[0096] Obtain the scene information corresponding to the image to be filtered, as well as the semantic type and location information corresponding to each semantic block;
[0097] Determine the filter and the first reconstructed value corresponding to the semantic block.
[0098] The semantic type corresponding to each of the above semantic blocks can be represented by a first identifier, and the scene information corresponding to the above image to be filtered can be represented by a second identifier.
[0099] In this embodiment, after determining that the image to be filtered includes at least one semantic block, a second identifier corresponding to the image to be filtered, and a first identifier and location information corresponding to each semantic block are obtained. Specifically, the reconstructed value of the pixel represented by the location information in the image to be filtered can be determined as the reconstructed value of the semantic block corresponding to that location information. In this embodiment, the filter corresponding to the semantic block can be determined based on the second identifier and the first identifier corresponding to the semantic block.
[0100] Specifically, the second identifier can be used to characterize the scene information corresponding to the image to be filtered, such as a traffic monitoring scene, a video conferencing scene, or a daily life scene. It should be understood that if two image patches have the same first identifier but different second identifiers, then these two image patches will be filtered using different filters in the loop.
[0101] For example, a second identifier of 0 indicates a traffic monitoring scenario; a second identifier of 1 indicates a video conferencing scenario. If the second identifier corresponding to the first semantic block is 0 and the first identifier is 1, it means that the semantics corresponding to the first semantic block are vehicles in a traffic monitoring scenario; if the second identifier corresponding to the first semantic block is 1 and the first identifier is 1, it means that the semantics corresponding to the first semantic block are people in a video conferencing scenario. Although the first identifier corresponding to the first semantic block is the same as the first identifier corresponding to the second semantic block, the filter corresponding to the first semantic block is different from the filter corresponding to the second semantic block.
[0102] In this embodiment, different second identifiers are set according to the scene corresponding to the image to be filtered, and the filter corresponding to the image block is determined based on the first identifier and the second identifier. When there are a large number of scenes corresponding to the image to be filtered, it is not necessary to set a large number of first identifiers to determine the filter corresponding to the image block, thereby reducing the memory space occupied by the identifier information.
[0103] Optionally, the step of using the filter corresponding to the semantic block to perform loop filtering on the first reconstructed value corresponding to the semantic block to obtain the second reconstructed value corresponding to the semantic block includes:
[0104] When the semantic type of the semantic block is the first semantic type, the first filter corresponding to the semantic block is used to perform loop filtering on the first reconstructed value corresponding to the semantic block to obtain the second reconstructed value corresponding to the semantic block.
[0105] The aforementioned first semantic type is a single semantic type, meaning that a semantic block corresponds to only one semantic type. Optionally, the first filter is a filter trained based on a first training image, and the first training image includes training images with the same semantic type.
[0106] In this embodiment, when the semantic type of the semantic block is the first semantic type, the first filter corresponding to the semantic block is used to perform loop filtering on the first reconstructed value corresponding to the semantic block to obtain the second reconstructed value corresponding to the semantic block. Thus, based on the number of semantic types corresponding to the semantic block, corresponding filters are used for filtering, thereby improving the accuracy of image feature extraction and thus improving the encoding and decoding efficiency in the video compression process.
[0107] Optionally, performing loop filtering on the first reconstructed value corresponding to the semantic block using the filter corresponding to the semantic block to obtain the second reconstructed value corresponding to the semantic block includes:
[0108] When the semantic type of the semantic block is the second semantic type, the second filter corresponding to the semantic block is used to perform loop filtering on the first reconstructed value corresponding to the semantic block to obtain the second reconstructed value corresponding to the semantic block.
[0109] The aforementioned second semantic type is a hybrid semantic type, meaning that the semantic block corresponds to multiple semantics. Optionally, the second filter is a filter trained based on a second training image, which includes training images with different semantic types.
[0110] In this embodiment, when the semantic type of the semantic block is the second semantic type, the second filter corresponding to the semantic block is used to perform loop filtering on the first reconstructed value corresponding to the semantic block to obtain the second reconstructed value corresponding to the semantic block. Thus, based on the number of semantic types corresponding to the semantic block, corresponding filters are used for filtering, thereby improving the accuracy of image feature extraction and thus improving the encoding and decoding efficiency in the video compression process.
[0111] To facilitate understanding, the process of obtaining training data for the filter is briefly explained below.
[0112] The original image is acquired, and semantic segmentation is performed on it to obtain a semantically segmented image. The specific method for performing semantic segmentation on the original image can be found in the above embodiments, and will not be repeated here.
[0113] The first training image is a subset of images belonging to the same semantic region from the semantic segmentation image. The second training image is a subset of images belonging to different semantic regions from the semantic segmentation image.
[0114] Furthermore, the neural network in the filter is trained using the first training image to obtain a trained filter, which is then designated as the first filter. The neural network in the filter is then trained using the second training image to obtain a trained filter, which is then designated as the second filter. The training process of the neural network using either the first or second training image is consistent with the existing neural network training process and will not be elaborated upon here.
[0115] Optionally, obtaining the semantic block information of the image to be filtered includes:
[0116] Obtain the filter identifier corresponding to the image to be filtered;
[0117] When the filter identifier is a preset identifier, the semantic block information of the image to be filtered is obtained.
[0118] In this embodiment, a filter identifier corresponding to the image to be filtered is preset. After obtaining the filter identifier corresponding to the image to be filtered, if the filter identifier is a preset identifier, it indicates that the loop filtering method provided in this application embodiment is used to filter the image to be filtered. Then, the semantic block information of the image to be filtered can be obtained, and the loop filtering method provided in this application embodiment can be used for filtering.
[0119] In other embodiments, the method of performing loop filtering on the reconstructed values corresponding to the semantic block can also be determined based on the filter identifier.
[0120] Optionally, in the above case, if the filter identifier is 0, a loop filter including a deblocking filter, a sample adaptive offset module, and an adaptive in-loop filtering module is used to perform loop filtering on the first reconstructed value corresponding to the semantic block.
[0121] If the filter identifier is 1, then a loop filter based on a neural network is used to perform loop filtering on the first reconstructed value corresponding to the semantic block.
[0122] If the preset identifier is set to 2, and the filter identifier is 2, then based on the semantic block information of the image to be filtered, at least one semantic block is determined to be included in the image to be filtered. Then, for each semantic block, the filter corresponding to the semantic block is used to perform loop filtering on the first reconstructed value corresponding to the semantic block. In other words, the loop filtering method provided in the embodiments of this application can be used to perform loop filtering on the image to be filtered.
[0123] In other embodiments, the image sequence of the images to be filtered includes a filter identifier. In this case, the filter corresponding to the filter identifier is used for loop filtering of all images in the image sequence.
[0124] Optionally, in the above case, if the filter identifier is 0 or 1, a loop filter including a deblocking filter, a sample adaptive offset module, and an adaptive in-loop filtering module can be used, or a neural network-based loop filter can be used to perform loop filtering on the first reconstructed value corresponding to the semantic block.
[0125] If the filter is identified as 2, then the image to be filtered can be processed by loop filtering based on the loop filtering method provided in the embodiments of this application.
[0126] Optionally, the step of performing loop filtering on the first reconstructed value corresponding to the semantic block using the filter corresponding to the semantic block to obtain the second reconstructed value corresponding to the semantic block includes:
[0127] The first reconstructed value is subjected to loop filtering using a third filter to obtain the third reconstructed value;
[0128] The third reconstructed value is subjected to loop filtering using a fourth filter to obtain the second reconstructed value.
[0129] In this embodiment, multiple loop filtering combinations can be used to perform loop filtering on the semantic block. The third or fourth filter mentioned above is determined based on the semantic type of the semantic block; that is, loop filtering is performed on the first reconstructed value using filters in the prior art and filters provided in this embodiment.
[0130] In one optional implementation, the third filter is determined based on the semantic type of the semantic block, and the fourth filter is a loop filter including a deblocking filter, a sample adaptive offset module, and an adaptive in-loop filtering module.
[0131] Another alternative implementation is that the third filter is determined based on the semantic type of the semantic block, and the fourth filter is a loop filter based on a neural network in the prior art.
[0132] Another alternative implementation is that the third filter is a loop filter including a deblocking filter, a sample adaptive offset module, and an adaptive in-loop filtering module, and the fourth filter is determined based on the semantic type of the semantic block.
[0133] Another alternative implementation is that the third filter is a loop filter based on a neural network in the prior art, and the fourth filter is determined based on the semantic type of the semantic block.
[0134] Optionally, the step of performing loop filtering on the first reconstructed value corresponding to the semantic block using the filter corresponding to the semantic block to obtain the second reconstructed value corresponding to the semantic block includes:
[0135] The semantic type information corresponding to the semantic block and the first reconstructed value corresponding to the semantic block are input into the second target filter to obtain the second reconstructed value corresponding to the semantic block.
[0136] The aforementioned semantic type information is used to characterize the semantic type of a semantic block, and the aforementioned second target filter is a preset neural network filter. In this embodiment, regardless of whether the semantic types corresponding to each semantic block are the same, the semantic type information and the first reconstructed value corresponding to each semantic block are input into the same filter, namely the second target filter. For each semantic block, the neural network parameters in the second target filter are adjusted according to the semantic type information corresponding to that semantic block, and then the adjusted second target filter is used to perform loop filtering on the first reconstructed value corresponding to that semantic block, thereby obtaining the second reconstructed value corresponding to each semantic block.
[0137] In this embodiment, for each semantic block, based on the semantic type corresponding to the semantic block, the neural network parameters in the second target filter are adjusted, and the adjusted second target filter is used to perform loop filtering on the first reconstructed value corresponding to the semantic block, thereby realizing loop filtering of the image to be filtered, thereby improving the accuracy of image feature extraction and thus improving the encoding and decoding efficiency in the video compression process.
[0138] The loop filtering method provided in this application can be executed by a loop filtering device. This application uses a loop filtering device to execute the loop filtering method as an example to illustrate the loop filtering device provided in this application.
[0139] like Figure 8 As shown, the loop filter device 800 includes:
[0140] The first acquisition module 801 is used to acquire semantic block information of the image to be filtered;
[0141] The first determining module 802 is used to determine at least one semantic block included in the image to be filtered based on the semantic block information;
[0142] The filtering module 803 is used to perform loop filtering on the first reconstructed value corresponding to the semantic block for each semantic block using the filter corresponding to the semantic block, so as to obtain the second reconstructed value corresponding to the semantic block.
[0143] Optionally, the first determining module 802 is specifically used for:
[0144] The image to be filtered is divided into at least one image block;
[0145] The image block is identified as the semantic block.
[0146] Optionally, the first determining module 802 is further specifically used for:
[0147] The first image block is divided into sub-blocks;
[0148] The sub-block is identified as the semantic block.
[0149] Optionally, the first determining module 802 is further specifically used for:
[0150] The first image block is divided using the N-ary tree partitioning method until the partitioning depth of the resulting sub-blocks is the same as the preset partitioning depth.
[0151] Optionally, when the loop filter 800 is a decoding end, the first acquisition module 801 is specifically used for:
[0152] Obtain the semantic information bitstream;
[0153] The semantic information bitstream is parsed to obtain the semantic block information of the image to be filtered.
[0154] Optionally, when the loop filter 800 is an encoding end, the first acquisition module 801 is further specifically used for:
[0155] Obtain the original image;
[0156] The original image is subjected to semantic segmentation processing to determine the semantic block information of the original image.
[0157] Optionally, the filtering module 803 is specifically used for:
[0158] The first target filter is used to perform loop filtering on the first reconstructed value corresponding to the semantic block to obtain the second reconstructed value corresponding to the semantic block.
[0159] Optionally, the loop filter 800 further includes:
[0160] The second acquisition module is used to acquire scene information corresponding to the image to be filtered, as well as semantic type and location information corresponding to each semantic block;
[0161] The second determining module is used to determine the filter and the first reconstructed value corresponding to the semantic block.
[0162] Optionally, the filtering module 803 is further specifically used for:
[0163] When the semantic type of the semantic block is the first semantic type, the first filter corresponding to the semantic block is used to perform loop filtering on the first reconstructed value corresponding to the semantic block to obtain the second reconstructed value corresponding to the semantic block.
[0164] Optionally, the filtering module 803 is further specifically used for:
[0165] When the semantic type of the semantic block is the second semantic type, the second filter corresponding to the semantic block is used to perform loop filtering on the first reconstructed value corresponding to the semantic block to obtain the second reconstructed value corresponding to the semantic block.
[0166] Optionally, the first acquisition module 801 is further specifically used for:
[0167] Obtain the filter identifier corresponding to the image to be filtered;
[0168] When the filter identifier is a preset identifier, the semantic block information of the image to be filtered is obtained.
[0169] Optionally, the filtering module 803 is further specifically used for:
[0170] The first reconstructed value is subjected to loop filtering using a third filter to obtain the third reconstructed value;
[0171] The third reconstructed value is subjected to loop filtering using a fourth filter to obtain the second reconstructed value.
[0172] Optionally, the filtering module 803 is further specifically used for:
[0173] The semantic type information corresponding to the semantic block and the first reconstructed value corresponding to the semantic block are input into the second target filter to obtain the second reconstructed value corresponding to the semantic block.
[0174] In this embodiment, the electronic device acquires semantic block information of the image to be filtered; based on the semantic block information, it determines at least one semantic block included in the image to be filtered; for each semantic block, it uses the filter corresponding to the semantic block to perform loop filtering on the first reconstructed value corresponding to the semantic block to obtain a second reconstructed value corresponding to the semantic block. In this embodiment, based on the semantic block information of the image to be filtered, semantic blocks in the image to be filtered are determined; for each semantic block, based on the semantic type corresponding to the semantic block, the filter corresponding to the semantic block is used to perform loop filtering on the first reconstructed value corresponding to the semantic block, thereby realizing loop filtering of the image to be filtered. That is, this embodiment uses corresponding filters to filter semantic blocks of different semantic types, rather than using the same filter, thereby improving the accuracy of image feature extraction and thus improving the encoding and decoding efficiency in the video compression process.
[0175] The loop filter device provided in this application embodiment can achieve... Figure 3 The various processes implemented in the method embodiments achieve the same technical effect, and will not be described again here to avoid repetition.
[0176] The loop filter device in this application embodiment can be an electronic device, such as an electronic device with an operating system, or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices besides a terminal. For example, the terminal can include, but is not limited to, the types of terminals listed above; other devices can be servers, network attached storage (NAS), etc., and this application embodiment does not specifically limit the types.
[0177] Optionally, such as Figure 9 As shown, this application embodiment also provides a communication device 900, including a processor 901 and a memory 902. The memory 902 stores a program or instructions that can run on the processor 901. For example, when the communication device 900 is a terminal, when the program or instructions are executed by the processor 901, they implement the various steps of the above-described loop filtering method embodiment and achieve the same technical effect.
[0178] This application embodiment also provides a terminal, including a processor and a communication interface, wherein the processor is used to perform the following operations:
[0179] Obtain semantic block information of the image to be filtered;
[0180] Based on the semantic block information, at least one semantic block is determined to be included in the image to be filtered;
[0181] For each semantic block, the filter corresponding to the semantic block is used to perform loop filtering on the first reconstructed value corresponding to the semantic block to obtain the second reconstructed value corresponding to the semantic block.
[0182] This terminal embodiment corresponds to the aforementioned terminal-side method embodiment. All implementation processes and methods of the aforementioned method embodiments can be applied to this terminal embodiment and achieve the same technical effect. Specifically, Figure 10 A schematic diagram of the hardware structure of a terminal to implement an embodiment of this application.
[0183] The terminal 1000 includes, but is not limited to, the following components: radio frequency unit 1001, network module 1002, audio output unit 1003, input unit 1004, sensor 1005, display unit 1006, user input unit 1007, interface unit 1008, memory 1009, and processor 1010.
[0184] Those skilled in the art will understand that the terminal 1000 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 1010 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 10 The terminal structure shown does not constitute a limitation on the terminal. The terminal may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0185] It should be understood that, in this embodiment, the input unit 1004 may include a graphics processing unit (GPU) 10041 and a microphone 10042. The GPU 10041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 1006 may include a display panel 10061, which may be configured as a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 1007 includes a touch panel 10071 and at least one of other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.
[0186] In this embodiment, after receiving downlink data from the network-side device, the radio frequency unit 1001 can transmit it to the processor 1010 for processing; the radio frequency unit 1001 can also send uplink data to the network-side device. Typically, the radio frequency unit 1001 includes, but is not limited to, antennas, amplifiers, transceivers, couplers, low-noise amplifiers, and duplexers.
[0187] The memory 1009 can be used to store software programs or instructions and various data. The memory 1009 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback function, image playback function, etc.). Furthermore, the memory 1009 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 1009 in this embodiment includes, but is not limited to, these and any other suitable types of memory.
[0188] The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into the processor 1010.
[0189] The processor 1010 is used to perform the following operations:
[0190] Obtain semantic block information of the image to be filtered;
[0191] Based on the semantic block information, at least one semantic block is determined to be included in the image to be filtered;
[0192] For each semantic block, the filter corresponding to the semantic block is used to perform loop filtering on the first reconstructed value corresponding to the semantic block to obtain the second reconstructed value corresponding to the semantic block.
[0193] In this embodiment, the electronic device acquires semantic block information of the image to be filtered; based on the semantic block information, it determines at least one semantic block included in the image to be filtered; for each semantic block, it uses the filter corresponding to the semantic block to perform loop filtering on the first reconstructed value corresponding to the semantic block to obtain a second reconstructed value corresponding to the semantic block; wherein, the filter is determined based on the semantic type of the corresponding semantic block. In this embodiment, based on the semantic block information of the image to be filtered, the semantic blocks in the image to be filtered are determined; for each semantic block, based on the semantic type corresponding to the semantic block, the filter corresponding to the semantic block is used to perform loop filtering on the first reconstructed value corresponding to the semantic block, thereby realizing loop filtering of the image to be filtered. That is to say, this embodiment uses corresponding filters to filter semantic blocks of different semantic types, rather than using the same filter for filtering, thereby improving the accuracy of image feature extraction and thus improving the encoding and decoding efficiency in the video compression process.
[0194] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described loop filtering method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0195] The processor is the processor in the terminal described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0196] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described loop filtering method embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.
[0197] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0198] This application also provides a computer program / program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above-described loop filtering method embodiments, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0199] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0200] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0201] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A loop filtering method, characterized in that, include: Electronic devices acquire semantic block information of the image to be filtered; Based on the semantic block information, at least one semantic block is determined to be included in the image to be filtered; For each semantic block, the filter corresponding to the semantic block is used to perform loop filtering on the first reconstructed value corresponding to the semantic block to obtain the second reconstructed value corresponding to the semantic block; The semantic block information includes first size information, and determining at least one semantic block included in the image to be filtered based on the semantic block information includes: The image to be filtered is divided to obtain at least one image block; the size of the image block is the same as the size represented by the first size information. The image block is identified as the semantic block.
2. The method according to claim 1, characterized in that, The semantic block information also includes second size information associated with the first image block, and after obtaining at least one image block, the method further includes: The first image block is divided into sub-blocks; the size of the sub-block is greater than or equal to the size represented by the second size information; The sub-block is identified as the semantic block.
3. The method according to claim 2, characterized in that, The semantic block information also includes an N-ary tree partitioning method associated with the first image block, wherein partitioning the first image block into sub-blocks includes: The first image block is divided using the N-ary tree partitioning method until the partitioning depth of the resulting sub-blocks is the same as the preset partitioning depth.
4. The method according to claim 1, characterized in that, When the electronic device is a decoding end, the acquisition of semantic block information of the image to be filtered includes: Obtain the semantic information bitstream, which is a data stream that encodes the semantic block information of the original image corresponding to the image to be filtered; The semantic information bitstream is parsed to obtain the semantic block information of the image to be filtered.
5. The method according to claim 1, characterized in that, When the electronic device is an encoding end, the step of acquiring the semantic block information of the image to be filtered includes: Obtain the original image; the original image is the image that has not been preprocessed before the image to be filtered. The original image is subjected to semantic segmentation processing to determine the semantic block information of the original image; The semantic block information of the original image is the same as the semantic block information of the image to be filtered.
6. The method according to claim 1, characterized in that, The step of performing loop filtering on the first reconstructed value corresponding to the semantic block using the filter corresponding to the semantic block to obtain the second reconstructed value corresponding to the semantic block includes: The first target filter is used to perform loop filtering on the first reconstructed value corresponding to the semantic block to obtain the second reconstructed value corresponding to the semantic block; The first target filter is associated with the image to be filtered.
7. The method according to claim 1, characterized in that, Before performing loop filtering on the first reconstructed value corresponding to the semantic block using the filter corresponding to the semantic block to obtain the second reconstructed value corresponding to the semantic block for each semantic block, the method further includes: Obtain the scene information corresponding to the image to be filtered, as well as the semantic type and location information corresponding to each semantic block; Determine the filter and the first reconstructed value corresponding to the semantic block; The filter is determined based on the scene information and the semantic type, and the first reconstructed value is the reconstructed value of the pixel represented by the position information in the image to be filtered.
8. The method according to claim 1, characterized in that, The step of performing loop filtering on the first reconstructed value corresponding to the semantic block using the filter corresponding to the semantic block to obtain the second reconstructed value corresponding to the semantic block includes: When the semantic type of the semantic block is the first semantic type, the first filter corresponding to the semantic block is used to perform loop filtering on the first reconstructed value corresponding to the semantic block to obtain the second reconstructed value corresponding to the semantic block; The first semantic type is a single semantic type.
9. The method according to claim 8, characterized in that, The first filter is a filter trained based on a first training image, and the first training image includes training images with the same semantic type.
10. The method according to claim 1, characterized in that, The step of performing loop filtering on the first reconstructed value corresponding to the semantic block using the filter corresponding to the semantic block to obtain the second reconstructed value corresponding to the semantic block includes: When the semantic type of the semantic block is the second semantic type, the second filter corresponding to the semantic block is used to perform loop filtering on the first reconstructed value corresponding to the semantic block to obtain the second reconstructed value corresponding to the semantic block; The second semantic type is a mixed semantic type.
11. The method according to claim 10, characterized in that, The second filter is a filter trained based on the second training images, which include training images with different semantic types.
12. The method according to claim 1, characterized in that, The acquisition of semantic block information of the image to be filtered includes: Obtain the filter identifier corresponding to the image to be filtered; When the filter identifier is a preset identifier, the semantic block information of the image to be filtered is obtained.
13. The method according to claim 1, characterized in that, The filter includes a third filter and a fourth filter. The step of using the filter corresponding to the semantic block to perform loop filtering on the first reconstructed value corresponding to the semantic block to obtain the second reconstructed value corresponding to the semantic block includes: The first reconstructed value is subjected to loop filtering using a third filter to obtain the third reconstructed value; The third reconstructed value is subjected to loop filtering using a fourth filter to obtain the second reconstructed value; The third filter or the fourth filter is determined based on the semantic type of the semantic block.
14. The method according to claim 1, characterized in that, The step of performing loop filtering on the first reconstructed value corresponding to the semantic block using the filter corresponding to the semantic block to obtain the second reconstructed value corresponding to the semantic block includes: The semantic type information corresponding to the semantic block and the first reconstructed value corresponding to the semantic block are input into the second target filter to obtain the second reconstructed value corresponding to the semantic block; The second target filter is a preset neural network filter, and the semantic type information is used to characterize the semantic type of the corresponding semantic block.
15. A loop filter device, characterized in that, include: The first acquisition module is used to acquire semantic block information of the image to be filtered; The first determining module is used to determine at least one semantic block included in the image to be filtered based on the semantic block information; The filtering module is used to perform loop filtering on the first reconstructed value corresponding to the semantic block for each semantic block using the filter corresponding to the semantic block, so as to obtain the second reconstructed value corresponding to the semantic block. The semantic block information includes first size information, and the first determining module is specifically used for: The image to be filtered is divided to obtain at least one image block; the size of the image block is the same as the size represented by the first size information. The image block is identified as the semantic block.
16. The apparatus according to claim 15, characterized in that, The semantic block information also includes second size information associated with the first image block, and the first determining module is further specifically used for: The first image block is divided into sub-blocks; the size of the sub-block is greater than or equal to the size represented by the second size information; The sub-block is identified as the semantic block.
17. The apparatus according to claim 16, characterized in that, The semantic block information also includes an N-ary tree partitioning method associated with the first image block, and the first determining module is further specifically used for: The first image block is divided using the N-ary tree partitioning method until the partitioning depth of the resulting sub-blocks is the same as the preset partitioning depth.
18. The apparatus according to claim 15, characterized in that, When the device is a decoding end, the first acquisition module is specifically used for: Obtain the semantic information bitstream, which is a data stream that encodes the semantic block information of the original image corresponding to the image to be filtered; The semantic information bitstream is parsed to obtain the semantic block information of the image to be filtered.
19. The apparatus according to claim 15, characterized in that, When the device is an encoding end, the first acquisition module is further specifically used for: Obtain the original image; the original image is the image that has not been preprocessed before the image to be filtered. The original image is subjected to semantic segmentation processing to determine the semantic block information of the original image; The semantic block information of the original image is the same as the semantic block information of the image to be filtered.
20. The apparatus according to claim 15, characterized in that, The filtering module is specifically used for: The first target filter is used to perform loop filtering on the first reconstructed value corresponding to the semantic block to obtain the second reconstructed value corresponding to the semantic block; The first target filter is associated with the image to be filtered.
21. The apparatus according to claim 15, characterized in that, The device further includes: The second acquisition module is used to acquire scene information corresponding to the image to be filtered, as well as semantic type and location information corresponding to each semantic block; The second determining module is used to determine the filter and the first reconstructed value corresponding to the semantic block; The filter is determined based on the scene information and the semantic type, and the first reconstructed value is the reconstructed value of the pixel represented by the position information in the image to be filtered.
22. The apparatus according to claim 15, characterized in that, The filtering module is also specifically used for: When the semantic type of the semantic block is the first semantic type, the first filter corresponding to the semantic block is used to perform loop filtering on the first reconstructed value corresponding to the semantic block to obtain the second reconstructed value corresponding to the semantic block; The first semantic type is a single semantic type.
23. The apparatus according to claim 15, characterized in that, The filtering module is also specifically used for: When the semantic type of the semantic block is the second semantic type, the second filter corresponding to the semantic block is used to perform loop filtering on the first reconstructed value corresponding to the semantic block to obtain the second reconstructed value corresponding to the semantic block; The second semantic type is a mixed semantic type.
24. The apparatus according to claim 15, characterized in that, The first acquisition module is also specifically used for: Obtain the filter identifier corresponding to the image to be filtered; When the filter identifier is a preset identifier, the semantic block information of the image to be filtered is obtained.
25. The apparatus according to claim 15, characterized in that, The filter includes a third filter and a fourth filter, and the filtering module is further specifically used for: The first reconstructed value is subjected to loop filtering using a third filter to obtain the third reconstructed value; The third reconstructed value is subjected to loop filtering using a fourth filter to obtain the second reconstructed value; The third filter or the fourth filter is determined based on the semantic type of the semantic block.
26. The apparatus according to claim 15, characterized in that, The filtering module is also specifically used for: The semantic type information corresponding to the semantic block and the first reconstructed value corresponding to the semantic block are input into the second target filter to obtain the second reconstructed value corresponding to the semantic block; The second target filter is a preset neural network filter, and the semantic type information is used to characterize the semantic type of the corresponding semantic block.
27. A terminal, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the loop filtering method as described in any one of claims 1-14.
28. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the loop filtering method as described in any one of claims 1-14.
Citation Information
Patent Citations
Decoder, encoder, method for decoding and encoding, data stream
US20130034159A1
A computer software module arrangement, a circuitry arrangement, an arrangement and a method for improved image processing
WO2021239224A1