WO2019192071A1 - 用于视频处理的方法和设备 - Google Patents

用于视频处理的方法和设备 Download PDF

Info

Publication number
WO2019192071A1
WO2019192071A1 PCT/CN2018/089669 CN2018089669W WO2019192071A1 WO 2019192071 A1 WO2019192071 A1 WO 2019192071A1 CN 2018089669 W CN2018089669 W CN 2018089669W WO 2019192071 A1 WO2019192071 A1 WO 2019192071A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
filtered
search
similar
blocks
Prior art date
Application number
PCT/CN2018/089669
Other languages
English (en)
French (fr)
Inventor
孟学苇
马思伟
郑萧桢
Original Assignee
北京大学
深圳市大疆创新科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京大学, 深圳市大疆创新科技有限公司 filed Critical 北京大学
Priority to CN201880012519.8A priority Critical patent/CN110383837B/zh
Publication of WO2019192071A1 publication Critical patent/WO2019192071A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/117Filters, e.g. for pre-processing or post-processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/182Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a pixel
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • H04N19/517Processing of motion vectors by encoding
    • H04N19/52Processing of motion vectors by encoding by predictive encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding

Definitions

  • the present application relates to the field of video processing and, more particularly, to a method and apparatus for video processing.
  • filtering the reconstructed pixels is a key part. It is mainly used to reduce the compression distortion generated during the encoding process.
  • the filter of the current video codec includes, for example, a non-local means filter (NLM), or a loop filter based on non-local similarity (specifically, a video coding filter based on a non-local structure (Non-local) Structure-based Filter, NLSF)).
  • NLM non-local means filter
  • NLSF non-local structure
  • the embodiment of the present application provides a method and device for video processing, which can reduce the complexity of the filtering process.
  • a method for video processing comprising: acquiring at least one first similar block of a block to be filtered in at least one set of pixels, wherein the set of pixels comprises sparse reconstructed pixels, to be filtered
  • the block includes at least one reconstructed pixel; and the block to be filtered is filtered based on the at least one first similar block.
  • a method for video processing including: determining a target search template from a plurality of candidate search templates; and acquiring, by using the target search template, a block to be filtered in a reconstructed pixel of a current image At least one target similarity block; filtering the to-be-filtered block with the at least one target similarity block.
  • a third aspect provides a method for video processing, comprising: acquiring at least one similar block of a block to be filtered from a reconstructed pixel, the block to be filtered comprising at least one reconstructed pixel, wherein The value of the parameter of the similarity of the block to be filtered and the similar block exceeds a first threshold; and the block to be filtered is filtered based on the at least one similar block.
  • a fourth aspect provides an apparatus for video processing, including an acquiring unit and a filtering unit, where the acquiring unit is configured to: acquire, in at least one set of pixels, at least one first similar block of a block to be filtered, The pixel set includes a sparse reconstructed pixel, the to-be-filtered block includes at least one reconstructed pixel, and the filtering unit is configured to: filter the to-be-filtered block based on the at least one first similar block.
  • an apparatus for video processing including a determining unit, an obtaining unit, and a filtering unit, wherein the determining unit is configured to: determine a target search template from among a plurality of candidate search templates; The unit is configured to: acquire, by using the target search template, at least one target similarity block of the to-be-filtered block in the reconstructed pixel of the current image; the filtering unit is configured to: use the at least one target similarity block to The filter block performs filtering.
  • the sixth aspect provides an apparatus for video processing, including an acquiring unit and a filtering unit, where the acquiring unit is configured to: acquire, from the reconstructed pixels, at least one similar block of the block to be filtered, where the to-be-filtered The block includes at least one reconstructed pixel, wherein a value of a parameter for characterizing a similarity of the block to be filtered and the similar block exceeds a first threshold; the filtering unit is configured to: based on the at least one similar block, The block to be filtered is filtered.
  • a computer system comprising: a memory for storing computer executable instructions; a processor for accessing the memory and executing the computer executable instructions to perform the first aspect or the second aspect above Or the operation in the method of the third aspect.
  • a computer storage medium storing program code, the program code being operative to indicate a method of performing the first aspect or the second aspect or the third aspect.
  • a computer program product comprising program code, the program code being operative to indicate execution of the method of the first aspect or the second or third aspect.
  • the method for video processing in the embodiment of the present application acquires at least one first similar block of a block to be filtered in at least one set of pixels, wherein the set of pixels includes a sparse reconstructed pixel, and the block to be filtered includes The at least one reconstructed pixel is filtered based on the at least one first similar block, which can reduce the filtering complexity, thereby reducing the complexity of the codec and saving the coding and decoding time, while ensuring the minimum coding performance loss.
  • FIG. 1 is a schematic diagram of an encoding system in accordance with an embodiment of the present application.
  • FIG. 2 is a schematic diagram of an encoding framework in accordance with an embodiment of the present application.
  • Figure 3 is a schematic diagram of the process of SVD decomposition.
  • FIG. 4 is a schematic diagram of a process of hard thresholds.
  • FIG. 5 is a schematic flowchart of a method for video processing according to an embodiment of the present application.
  • FIG. 6 is a schematic diagram of current block selection in accordance with an embodiment of the present application.
  • FIG. 7 is a schematic diagram of pixel distribution in a search template in accordance with an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a search template or a collection of pixels in accordance with an embodiment of the present application.
  • FIG. 9 is a schematic diagram of acquiring similar blocks in reconstructed pixels, in accordance with an embodiment of the present application.
  • FIG. 10 is a schematic diagram of acquiring similar blocks in a reconstructed pixel, according to an embodiment of the present application.
  • FIG. 11 is a schematic diagram of a search template in accordance with an embodiment of the present application.
  • FIG. 12 is a schematic diagram of a search template according to an embodiment of the present application.
  • FIG. 13 is a schematic diagram of a search template according to an embodiment of the present application.
  • FIG. 14 is a schematic diagram of a search template according to an embodiment of the present application.
  • 15 is a schematic diagram of an image block in accordance with an embodiment of the present application.
  • 16 is a schematic diagram of pixels of an image block and surrounding areas, in accordance with an embodiment of the present application.
  • 17 is a schematic diagram of pixel residuals of an image block and surrounding areas according to an embodiment of the present application.
  • FIG. 18 is a schematic diagram of a method for video processing according to an embodiment of the present application.
  • 19 is a schematic diagram of a method for video processing in accordance with an embodiment of the present application.
  • FIG. 20 is a schematic block diagram of an apparatus for video processing according to an embodiment of the present application.
  • 21 is a schematic block diagram of an apparatus for video processing according to an embodiment of the present application.
  • FIG. 22 is a schematic block diagram of an apparatus for video processing according to an embodiment of the present application.
  • FIG. 23 is a schematic block diagram of a computer system in accordance with an embodiment of the present application.
  • FIG. 1 is an architectural diagram of a technical solution to which an embodiment of the present application is applied.
  • system 100 can receive data to be processed 102 and process data to be processed 102 to produce processed data 108.
  • system 100 can receive data to be encoded, encode the data to be encoded to produce encoded data, or system 100 can receive the data to be decoded and decode the data to be decoded to produce decoded data.
  • components in system 100 may be implemented by one or more processors, which may be processors in a computing device or processors in a mobile device (eg, a drone).
  • the processor may be any type of processor, which is not limited in this embodiment of the present application.
  • the processor may include an Image Signal Processor (ISP), an encoder or decoder, and the like.
  • ISP Image Signal Processor
  • One or more memories may also be included in system 100.
  • the memory can be used to store instructions and data, such as computer executable instructions to implement the technical solution of the embodiments of the present application, data to be processed 102, processed data 108, and the like.
  • the memory may be any kind of memory, which is not limited in this embodiment of the present application.
  • the data to be processed 102 may include text, images, graphic objects, animation sequences, audio, video, or any other data that needs to be encoded or decoded.
  • Any suitable encoding or decoding technique can be used to encode or decode the data 102 to be processed.
  • the type of encoding or decoding depends on the data to be processed and the specific encoding or decoding requirements.
  • the code or decoder may implement one or more different codecs.
  • Each codec may include code, instructions or a computer program that implements different encoding or decoding algorithms. Based on various factors, including the type and/or source of the data 102 to be processed, the receiving entity of the data to be processed, the available computing resources, the network environment, the business environment, rules and standards, etc., a suitable encoding or decoding can be selected.
  • the algorithm encodes or decodes a given data 102 to be processed.
  • the code or decoder can be configured to encode or decode a series of video frames. Encoding or decoding the data in each frame can take a series of steps.
  • FIG. 2 is a block diagram of an encoder in accordance with an embodiment of the present application. The flow of interframe coding and intraframe coding will be respectively described below with reference to FIG.
  • the process of interframe coding can be as follows:
  • the current frame image is acquired.
  • a reference frame image is acquired.
  • motion estimation is performed using the reference frame image to obtain a motion vector (Motion Vector, MV) of each image block of the current frame image.
  • MV Motion Vector
  • the motion vector obtained by the motion estimation is used for motion compensation to obtain an estimated value of the current image block.
  • the estimated value of the current image block is subtracted from the current image block to obtain a residual.
  • the residual is transformed to obtain transform coefficients.
  • the transform coefficients are quantized to obtain quantized coefficients.
  • the quantized coefficients are entropy encoded, and finally the entropy encoded bit stream and the encoded coding mode information are stored or transmitted to the decoding end.
  • the quantized results are inverse quantized.
  • the inverse quantization result is inverse transformed.
  • the reconstructed pixel is obtained using the inverse transform result and the motion compensation result.
  • the reconstructed pixels are filtered.
  • the filtered reconstructed pixels are output.
  • the process of intraframe coding can be as follows:
  • the current frame image is acquired.
  • intra prediction selection is performed on the current frame image.
  • the current image block in the current frame is intra predicted.
  • the estimated value of the current image block is subtracted from the current image block to obtain a residual.
  • the residual of the image block is transformed to obtain transform coefficients.
  • the transform coefficients are quantized to obtain quantized coefficients.
  • the quantized coefficients are entropy encoded, and finally the entropy encoded bit stream and the encoded coding mode signal are stored or transmitted to the decoding end.
  • the quantized result is inverse quantized.
  • the inverse quantization result is inverse transformed, and in 211, the reconstructed pixel is obtained using the inverse transform result and the intra prediction result.
  • the filtering process in 212 can be used to reduce compression distortion in the encoding process.
  • the filtering in 212 can be implemented in a variety of ways.
  • the filtering in the embodiment of the present application may be loop filtering.
  • NLSF non-local Structure-Based Filter for Video Coding
  • the currently reconstructed image frame or image block can be processed in blocks.
  • the image can be divided into K blocks, and these blocks are respectively used as the current block.
  • M similar blocks are grouped together.
  • the collection of these similar blocks is represented by a mathematical structure, which can be a one-dimensional, two-dimensional or three-dimensional matrix.
  • the above process can be called Group Construction.
  • the process of filtering is the processing of the matrix (structure array), the purpose is to filter out the distortion and noise introduced in the encoding process, this process can be called Group-based filtering.
  • the Singular Value Decomposition can be performed on the array of the structure, and the singular value is subjected to a hard threshold operation.
  • the reconstructed structure group is obtained according to the result of the singular value decomposition, and finally the reconstructed image is obtained.
  • the purpose of SVD decomposition is to extract the principal components of the structure array.
  • the simple SVD can not play the role of filtering.
  • the key of filtering is to remove noise.
  • the place where noise is removed in NLSF is hard threshold operation.
  • Figure 3 is the process of SVD decomposition, which can be understood as the transformation of the matrix.
  • the two-dimensional matrix can be decomposed into the form of three matrix products.
  • the matrix in the middle is a diagonal matrix, and the elements on the diagonal are The upper left corner to the lower right corner are sequentially reduced, and the smaller element can be considered as noise.
  • the "smaller" evaluation criterion can adopt a threshold. If the threshold is 60, the portion smaller than 60 is considered as noise, and is directly set to 0.
  • the three matrices can be multiplied together, and the obtained matrix and the original decomposed matrix can be different. This is the result after filtering out the noise, and the process can be called a hard threshold process.
  • the similar blocks of the current block may be searched first, and then the similar blocks may be weighted averaged.
  • the currently reconstructed image frame or image block can be processed in blocks.
  • the image can be divided into K blocks, and these blocks are respectively used as the current block.
  • each of the M similar blocks can be assigned a weight, and then the weighted average of all similar blocks of the current block can be calculated, and the value after the weighted average can be used as the result of the current block filtering, wherein multiple ways can be used. Calculate the weight.
  • the magnitude of the weight of each similar block may be positively correlated with the similarity of each similar block to the current block. That is, the more similar the current block is to the similar block, the greater the weight of the similar block.
  • the similarity here can be measured by the Euclidean distance.
  • a similar block may have a weight, or each pixel in a similar block may have a corresponding weight.
  • similar blocks may be filtered as a whole.
  • filtering no pixel points are split, and a similar block may have a weight.
  • the filtering may be performed in units of pixel points, and the filtering result of each pixel point is combined to obtain the filtering result of the current block.
  • each pixel point in each similar block may have a similar block respectively.
  • i and j can have two explanations.
  • i is the current pixel point in the current block
  • I is the corresponding pixel point of the current pixel in each similar block (eg, a similar point occupying the same position in a similar block, eg, the current block
  • the corresponding pixel of the central pixel is a set of central pixel points of similar blocks
  • j is the element in set I
  • v(j) represents the pixel value of j
  • w(i,j) represents the weight.
  • i can be understood as the current block
  • I is the set of similar blocks of the current block
  • j is the element in set I
  • v(j) represents the pixel value of j (eg, can be the pixel included in j)
  • w(i, j) represents the weight.
  • NL[v](i) represents the filtering result corresponding to the current block or the current pixel point.
  • Equation 2 and 3 It can represent the Euclidean distance between the current block and the similar block, or the Euclidean distance between the current pixel point and the corresponding image point in the similar block.
  • the complexity of the filtering process is derived from acquiring similar blocks of the current block.
  • the full search mode which may also be referred to as a point-by-point scan
  • the square search window searches for the most similar block of the current block.
  • the search process can start from the upper left corner of the search window, pixel by pixel, and end to the bottom right corner.
  • Each small block found during the search requires a Sum of Squared Differences (SSD).
  • SSD Sum of Squared Differences
  • sort the SSDs and select the small blocks corresponding to the smallest M SSDs. Specifically, if a similar block search is performed using the full search method, 30 most similar blocks are searched in the 33x33 search window, and the number of candidate blocks searched during the search is 1089. The portion of block matching is too redundant and may result in a much larger number of candidate blocks than the number of similar blocks required for filtering.
  • the embodiment of the present application provides a video processing method, which can simplify the complexity of similar block acquisition in the filtering process, thereby improving the efficiency of video encoding and decoding.
  • the method and apparatus of the embodiments of the present application may be applied to the coding framework shown in FIG. 2, and may be applied to other coding frameworks, which is not specifically limited in this embodiment of the present application.
  • the method and apparatus in the embodiments of the present application may be adopted as long as the codec frame that performs filtering by using similar blocks is adopted.
  • FIG. 5 is a schematic flowchart of a method 300 for video processing according to an embodiment of the present application.
  • the method 300 includes at least a portion of the following.
  • the method 300 can be applied to the encoding end or to the decoding end.
  • the method 300 can be implemented by a filter, which can be part of an encoder or decoder, or can exist independently of the encoder or decoder.
  • the filter may be an NLSF filter, or an NLM filter, or other filter.
  • the filter acquires at least one first similar block of the current block in at least one set of pixels, wherein the set of pixels includes sparse reconstructed pixels, the current block including at least one reconstructed pixel.
  • the current block is the block to be filtered.
  • the reconstructed pixels included in the pixel set in the embodiment of the present application may be reconstructed pixels before filtering.
  • the similar block mentioned in the embodiment of the present application may be a block with higher similarity to the current block, and the size of the similar block may be equal to the current The size of the block.
  • the metric parameter used for the similarity judgment may be: a difference of the hash value, a sum of squared differences (SSD), an absolute error, and (Sum of Absolute). Differences, SAD), Mean Absolute Differences (MAD), Mean Square Differences (MSD), or Structural SIMilarity SSIM.
  • f(h, w) represents the pixel of the current block at coordinates (h, w)
  • Representing a search block (also referred to as a candidate similar block) at the coordinates (h, w) of the pixel Indicates the number of pixels the current block contains.
  • the similarity can be determined by the size of the hash value. The closer the hash value of the two blocks is, the more similar the hash value can pass through the pixel of the block. , horizontal, vertical gradient, etc. to represent.
  • the similarity can be judged by the difference between the hash values of the two blocks. The smaller the difference of the hash values, the higher the similarity.
  • the threshold which may include the threshold number
  • the value of the metric parameter is larger, the similarity is higher, and the parameter for characterizing the similarity is used.
  • a value exceeding a certain value means that the value of the parameter is greater than or equal to the threshold; if the value of the metric parameter is smaller, the higher the similarity, the value of the parameter used to represent the similarity exceeds a certain value, indicating that the value of the parameter is less than or equal to the value.
  • Threshold For a hash value, the value of the parameter used to characterize the similarity exceeds a certain value to represent that the difference between the hash values of the two blocks is less than or equal to the threshold.
  • a value of a parameter used to represent a similarity between the current block and a similar block of the current block exceeds a first threshold.
  • the first threshold is determined according to at least one of a size of the current block, a bit depth of the video, a pixel of the current block, and a horizontal gradient of a pixel of the current block, the current block The vertical gradient of the pixels.
  • the size of the current block directly determines the number of sums in the SSD calculation process.
  • the bit depth of the video represents the range of values of the pixel values (such as 8-bit video, each pixel value is between 0 and 255; 10 bits) For video, each pixel value is a number between 0 and 1023. Obviously, different bit depths and different pixel values range, and the calculated SSD size range is different.
  • the parameter determining the threshold may be related to the parameter used in the calculation of the metric parameter.
  • the first threshold is determined based on at least one of the following parameters:
  • the similarity can be determined by the size of the hash value. The closer the hash values of the two blocks are to the representative, the more similar the hash value can be represented by the pixel sum of the block, the horizontal and vertical gradients, and the like.
  • the first threshold is determined based on at least one of the following parameters: a size of the current block, and a bit depth of the video.
  • the first threshold may be related to the size of the current block and the bit depth of the video, and the first threshold may be calculated by using Equation 5:
  • bitDepth is the bit depth of the test video, which is typically 8 or 10.
  • can be calculated based on the statistical characteristics of the SSD between the current block and the similar block. Indicates the number of pixels the current block contains.
  • the first threshold is determined based on a bit depth of the video.
  • the first threshold may be obtained according to the following formula 6:
  • the similarity between the selected similar block and the current block is higher than a certain threshold, so that the similarity between the selected similar block and the current block is higher, so that the selected similar block may be avoided and current.
  • the block difference is large, so as to avoid the problem that the filtering complexity of these blocks is not helpful to the filtering process.
  • the embodiment of the present application may be implemented by the encoding end or by the decoding end.
  • the encoding end may calculate the first threshold and transmit the first threshold to the decoding end in the code stream.
  • the decoding end may obtain the first threshold from the code stream, and no longer calculate the first threshold.
  • the encoding end and the decoding end may respectively calculate the first threshold, and the encoding end does not need to transmit the first threshold in the code stream.
  • the embodiment of the present application may obtain the current block from the reconstructed frame after acquiring the entire reconstructed frame.
  • Figure 6 first look at the two boxes on the upper left side, if the box on the left is the current block being processed, then the next block to be processed is the box on the right, and there can be overlap between the two blocks. It can be next to each other, or it can be separated by a certain distance.
  • the step value between the two frames (which can be the interval of the leftmost pixel of the two frames) can be 1, 2, 3...etc.
  • the two blocks are separated by a certain distance.
  • the other one is the spacing problem between the upper and lower blocks. For example, the two boxes in the middle as shown in Figure 6. If the upper frame is the current block being processed, the next block to be processed is the lower frame. There can be overlap between the two blocks, either next to each other or at a certain distance.
  • the pixel in the pixel set may be a pixel at any position in the reconstructed image of the current frame, or may be a partial pixel in a search window, for example, may be one A partial pixel in a 32x32 pixel set, where the current block can be located at a central location in the search window.
  • the reconstructed pixel used to acquire the similar block of the current block includes: a reconstructed pixel of the coding unit itself to which the current block belongs, a reconstructed pixel on an upper side of the coding unit, a reconstructed pixel on a left side of the coding unit, and a coding unit The reconstructed pixel on the right side and the reconstructed pixel on the lower side of the coding unit.
  • each block in the coding unit may be filtered.
  • the coding unit may be a block of 128 ⁇ 128, currently A block may be a 6x6 sized block, which is generally referred to as an image block. Since at the time of encoding, when the reconstructed pixels of the current coding unit are acquired, the reconstructed pixels of the coding units of the left and upper sides have been acquired, the reconstructed pixels used to acquire the similar blocks of the current block may be the left of the associated coding unit. The reconstructed pixel on the side and the reconstructed pixel on the upper side.
  • the reconstructed pixels on the upper side need to be stored in units of image behavior, and the reconstructed pixels on the right side are stored in units of image block height.
  • the reconstructed pixels on the upper side are stored in units of 3840, and the reconstructed pixels on the right side are stored in units of 128. It can be seen that the storage overhead of the reconstructed pixels on the upper side is generally greater than the storage overhead of the reconstructed pixels on the right side.
  • the number of pixels in the vertical direction of the reconstructed pixel of the upper side may be less than or equal to the left
  • the number of pixels in the horizontal direction of the reconstructed pixel of the side (generally, it can be considered as the number of columns of the reconstructed pixel on the left side).
  • the reconstructed pixel used to acquire the similar block of the current block may also be the reconstructed pixel on the left side of the coding unit to which the current block belongs, the reconstructed pixel on the upper side, and the reconstructed pixel on the right side (wherein the right side needs to wait)
  • the coding unit is reconstructed).
  • the embodiment of the present application may also have other implementation manners.
  • the reconstructed pixel used to acquire the similar block may be the left side and the upper part of the current block.
  • the reconstructed pixels on the side, the lower side, and the right side, since the reconstructed pixels on the right and bottom sides of the current block still belong to the current coding unit.
  • the reconstructed pixel used to acquire the similar block may be the reconstructed pixel on the left side and the upper side of the current block, because the reconstructed pixel on the right side and the lower side of the current block.
  • the coding units belonging to the right side and the lower side, and the coding units on the right and lower sides have not been reconstructed, so they cannot be used to acquire similar blocks of the current block.
  • the pixel set of the embodiment of the present application includes a sparse reconstructed pixel, meaning that there are some pixels in the set of pixels, and the interval between the pixels (for example, the shortest linear distance between the pixels) does not belong to the set. Pixels.
  • some pixels in the set of pixels may also be aggregated into blocks, and the set of pixels may be aggregated into multiple separated blocks (the adjacent blocks are not present between the blocks mentioned herein). ), wherein the size of each block can be greater than or equal to the size of the current block.
  • the pixel set includes five blocks, each block being larger than the current block (assuming the current block size is 6x6), wherein each of the five blocks can be One or more candidate similar blocks are formed as mentioned below.
  • the filter may acquire a set of pixels based on the search template.
  • a search template may be preset in the filter, and the search template is used to circle some reconstructed pixels in a search window, and the reconstructed pixels may understand the pixel set mentioned in the embodiment of the present application.
  • the search template may also be understood as a set of pixels, and the pixels included in the search template may be symmetric with respect to the center of the search template. Alternatively, from the center of the search template to the edge of the search template, the pixels may be increasingly sparse.
  • the search template when used to determine a set of pixels for acquiring similar blocks, there may be a result that the number of pixels in the set of pixels is smaller than the number of pixels included in the search template, because the search template is used.
  • the edges of the search template may exceed the edge of the search range.
  • the search template includes a plurality of candidate similar blocks for selecting the first similarity block, the size of the candidate similarity block being equal to the size of the current block.
  • the candidate similarity block means that when the similarity with the current block is higher than a certain threshold, it can be selected as a similar block.
  • the pixels included in the plurality of candidate similar blocks may not overlap or partially overlap.
  • the search template includes multiple sets of candidate similar blocks from the center to the edge, each set of candidate similar blocks enclosing a ring, the ring is symmetric with respect to the center of the search template, and the candidates in the group are similar.
  • the blocks are evenly arranged.
  • the candidate similar blocks included in the search template may also be asymmetric.
  • the search template includes four sets of candidate similar blocks, and the edge pixels of the four candidate candidate similar blocks that are far from the center of the search template are separated by 1 pixel and 2 pixels respectively from the center of the search template. Pixels and 8 pixels.
  • the four sets of candidate similar blocks respectively have 4 candidate similar blocks, 8 candidate similar blocks, 8 candidate similar blocks and 8 candidate similar blocks, wherein a candidate similar block with 4 candidate similar blocks Close to the center of the search template.
  • the search template shown in FIG. 8 (which can also be considered as a set of pixels obtained based on the search template) will be exemplified below.
  • the intersection of a plurality of ⁇ in the figure may be one pixel position, and each independent number represents an independent candidate similarity block.
  • each independent number represents an independent candidate similarity block.
  • the number 1248 may be one pixel position of the candidate similar block, for example, may be the pixel position on the edge of the candidate similar block far from the center of the search template, specifically, the pixel position in the upper left corner, the pixel position in the lower left corner, and the upper right corner.
  • the numbers in the figures represent other pixel locations that may also be candidate similar blocks, for example, may be central pixel locations, and the like. Assuming that each candidate similar block is a block of size 6x6, it means that these candidate similar blocks overlap each other.
  • the filter may determine the pixel set by using at least two search templates.
  • different pixel sets may be determined by using different search templates.
  • search template of the embodiment of the present application may also include other numbers of candidate similar block groups, and each group of candidate similar blocks may also include other numbers of candidate similar blocks.
  • the pixels of the search template may be formed into a cross shape, a bar shape, a polygon other than a quadrangle, and the like. Wherein, in forming other polygons than the quadrilateral, it may be similar to FIG. 7 in a loop, for example, a larger pentagon sleeve with a smaller pentagon.
  • search template or the set of pixels mentioned in the embodiment of the present application may also include sparse reconstructed pixels, and perform matching of similar blocks in the sparse reconstructed pixels according to a certain rule.
  • the concept of candidate similar blocks may also include sparse reconstructed pixels, and perform matching of similar blocks in the sparse reconstructed pixels according to a certain rule. The concept of candidate similar blocks.
  • the filter may determine the first pixel set based on a location of the reconstructed pixel included in the current block; and obtain the first similar block from the first pixel set.
  • the pixels in the first set of pixels may be sparse reconstructed pixels, and the pixels in the first set of pixels may be symmetric with respect to the reconstructed pixels included in the current block.
  • the pixel location may be one pixel location of the current block, for example, may be the pixel location of the upper left corner of the current block or the pixel location of the center or the pixel location of the lower right corner, and the like.
  • the first similar block may be obtained from the first set of pixels according to a search manner from the current block to the current block.
  • the similarity matching may be performed on the candidate similarity block 1, and then the similarity matching is performed on the candidate similarity block 2, and then the similarity of the candidate similarity block 4 is performed. Matching, and finally matching the similarity of the candidate similar blocks 8.
  • the candidate similar blocks need to be sorted according to the similarity to obtain a certain number of blocks with the highest similarity as similar blocks, and the candidate is similar to the position closer to the current block.
  • the similarity between the block and the current block may be higher, and the possibility of being selected as a similar block is larger.
  • the number of candidate similar blocks that need to be adjusted is less, thereby reducing The complexity of filtering.
  • the number of the first similar blocks acquired from the first set of pixels may not exceed a certain value, for example, a second threshold.
  • the similarity between all the search blocks (also referred to as candidate similar blocks) in the first pixel set and the current block may be obtained, and the similarity is arranged in a high-to-low similarity manner, and the number of the selected blocks is The first similar block of the second threshold.
  • the desired block when the number of desired blocks searched in the first set of pixels reaches a second threshold, the desired block is taken as the first similar block, and stops at the first pixel.
  • a search of the first similarity block is performed in the set, wherein a value of a parameter used to characterize a similarity of the current block to the desired block exceeds a first threshold.
  • the likelihood is from high to low according to the similarity, and the expected from the search In the block, the first similar block whose number is equal to the second threshold is determined, wherein a value of a parameter used to characterize a similarity of the current block to the desired block exceeds a first threshold.
  • the second pixel set may be determined according to the position of the reconstructed pixel included in the first similar block obtained last time; and the first similar block is obtained again from the second pixel set.
  • the pixels in the second set of pixels may be sparse reconstructed pixels, and the pixels in the second set of pixels may be symmetric with respect to the reconstructed pixels included in the previously determined first similar block.
  • the previously determined first similar block may be a similar block searched from a first set of pixels (a set of pixels determined based on a location of a current block), or may be based on another second set of pixels (based on previous and previous times)
  • the first similar block is determined by the position of the determined pixel set).
  • N may be an integer whose value is greater than or equal to 1.
  • the size of N may be determined according to actual conditions.
  • two candidate similar blocks 8 (the number in the circle in the circle is gray and the word is white 8) are determined as similar blocks, and the pixel sets are respectively determined around the two candidate similar blocks 8 (by In the figure, the circle is a gray bottom, and the word is a black number.
  • similar blocks are determined in the two pixel sets respectively, that is, the circle in the figure is a black matrix, and the word is a white number to represent a similarity.
  • Block ie, 5 similar blocks.
  • the block that has been similarly matched before in the second set of pixels does not perform the matching operation of the similar block, thereby saving the complexity of the filtering.
  • the block that has performed the similar block matching operation is not included in the second pixel set, that is, when the second pixel set is determined by using the search template, some blocks have been similar. If the degree matches, then the candidate similar block is no longer included in the second set of pixels.
  • the candidate similar block determined based on the block 8 determined to be a similar block in the lower right corner includes only 17 candidate similar blocks instead of 28 candidate similar blocks because there are some candidate similar blocks that have been performed. Similar block matching.
  • the matching operation of the similar block is no longer performed. That is to say, even if the similarity matching has been performed before, since the similarity block is not determined, the matching can still be performed again.
  • the threshold value used to determine whether it is a similar block may be due to a different order search process. different.
  • blocks that have been determined to be similar blocks are not included in the second set of pixels, that is, when certain blocks have been determined to be similar blocks when the second set of pixels is determined by the search template, the candidate is similar The block is no longer included in the second set of pixels.
  • the number of similar blocks acquired from a second set of pixels may not exceed a certain value, for example, a third threshold.
  • a third set of pixels can be understood as a pixel surrounded by a search template around a first similar block.
  • the similarity between all the search blocks in the second pixel set and the current block may be acquired, arranged in a high-to-low similarity manner, and the first similar block in the third threshold is selected.
  • determining the desired block as the first similar block, and stopping at the second A search of the first similarity block is performed in a set of pixels, wherein a value of a parameter used to characterize a similarity of the current block to the desired block exceeds a first threshold.
  • the likelihood is from high to low according to the similarity
  • the first similar block whose number is equal to the third threshold is determined, wherein a value of a parameter used to characterize the similarity of the current block to the desired block exceeds a first threshold.
  • the embodiments of the present application are limited to the foregoing implementation manner, wherein the similar blocks searched in the plurality of pixel sets may not exceed the third threshold.
  • the plurality of pixel sets can be understood as a plurality of pixel sets corresponding to the plurality of similar blocks in the first-order search process in the above N-th order search process.
  • the search templates corresponding to the first pixel set and the second pixel set may be the same.
  • the search templates corresponding to the first set of pixels and the second set of pixels may be different.
  • search templates sampled in the different order search process may be different, and may of course be the same.
  • the templates used in the different levels of the search process may be referred to as sub-search templates, and the collections of these sub-search templates are collectively referred to as search templates.
  • the pixel window may be separately determined based on the position of the first similarity block; Within the pixel window, the second similar block is obtained.
  • the second similar block may be determined in a point-by-point scanning manner.
  • a pixel window is respectively defined around two similar blocks 8 (the bottom in the circle is gray and the word is white), wherein the pixel window can be determined relative to The similar block symmetry can also be matched.
  • the pixel window may be square or other shapes.
  • the point-by-point scanning mentioned in the embodiment of the present application may be implemented in a sliding window manner, and the step size of the sliding window sliding may be 1, wherein the size of the sliding window may be equal to the size of the current block.
  • the number of similar blocks acquired from one pixel window may not exceed a certain value, for example, a fourth threshold.
  • One pixel window can be understood as a pixel window that covers a first similar block.
  • the similarity between all the search blocks in the pixel window and the current block may be acquired, arranged in a high-to-low similarity manner, and the second similar block having the fourth threshold is selected.
  • the searched desired block is determined as the second similar block, and stops at the pixel.
  • a search of the second similarity block is performed in the window, wherein a value of a parameter used to characterize the similarity of the current block to the desired block exceeds a first threshold.
  • the similar blocks searched in the plurality of pixel windows may not exceed the fourth threshold.
  • the plurality of pixel windows can be understood as pixel windows corresponding to all of the above first similar blocks.
  • the threshold may exist in each search phase, but the embodiment of the present application is not limited thereto.
  • thresholds for defining the number of similar blocks searched for in each search phase there is no threshold for defining the number of similar blocks searched for in each search phase, and embodiments of the present application may set a threshold for defining the total number of all similar blocks.
  • the desired block is taken as the similar block, and the searching of the similar block is stopped, wherein the current block is used to represent the expected The value of the parameter of the similarity of the block exceeds the first threshold.
  • the number of the expected blocks is equal to the value according to the similarity from high to low.
  • the similarity block wherein a value of a parameter used to characterize a similarity of the current block to the desired block exceeds a first threshold.
  • searching for similar blocks based on the pixel window may be part of the multi-order similar block search of the embodiment of the present application.
  • performing the searching of the multi-order similarity block may refer to: using the current to-be-filtered block, performing a fixed acquisition of the pixel set or the pixel window on the search template, searching for the similar block, and then searching based on the Similar blocks, again perform a fixed acquisition pixel set or pixel window of the search template, and search for similar blocks, and then can stop the search of similar blocks, or can also fix the search template based on the similar blocks searched again, and so on.
  • the process can be referred to as a multi-level search process based on similar blocks mentioned in the embodiment of the present application.
  • the pixel window mentioned above may also be acquired based on a search template.
  • the encoding end may determine each of the foregoing thresholds for limiting the number of similar blocks, and encode the one or more thresholds and pass the same to the decoding end. And, when implemented by the decoding end, the decoding end can obtain the one or more thresholds from the code stream.
  • the encoding end and the decoding end may respectively determine the foregoing thresholds for limiting the number of similar blocks, and the encoding end does not need to transmit the thresholds in the code stream.
  • Both the pixel set and the pixel window described above may be acquired by a search template.
  • the target search template that is, the search template that needs to be adopted mentioned above, may be selected from a plurality of candidate search templates.
  • the search template in the embodiment of the present application may include a plurality of sub-search templates.
  • Each sub-search template can be used to make a determination of a pixel set or a pixel window.
  • each search template includes a different sub-search template and/or a different order of use.
  • the search template 1 includes a sub-search template 1, a sub-search template 2, and a sub-search template 3, and the search template 2 includes a sub-search template 1 and a sub-search template 2, and the search template 1 and the search template 2 are different.
  • the search template 1 includes a sub-search template 1, a sub-search template 2, and a sub-search template 3, and the search template 2 includes a sub-search template 2, a sub-search template 4, and a sub-search template 5, and the search template 1 and the search template 2 are different.
  • both the search template 1 and the search template 2 include a sub-search template 1, a sub-search template 2, and a sub-search template 3, but for the search template 1, the sub-search templates are used in the order of sub-search template 1, sub-search template 2, and sub-search.
  • Template 3 is searched, and for search template 2, the order of use of the sub-search templates is sub-search template 2, sub-search template 1 and sub-search template 3, and search template 1 and search template 2 are different.
  • the search template in the embodiment of the present application may be understood as a search template set, which includes a plurality of search templates.
  • multiple candidate search templates may be preset in the filter.
  • the number and arrangement of reconstructed pixels in each search template may be preset.
  • the filter may obtain the plurality of candidate search templates preset from the memory, that is, the filter does not need to know the deformation law between the multiple candidate search templates.
  • the filter may also obtain a candidate search template from the memory, and then may deform according to a certain rule to obtain other search templates.
  • the resulting candidate search template can be increased or decreased by one or more columns of pixels in one or more directions.
  • the determined target search template may include one search template, or multiple search templates, and each search template may also include one or more sub-search templates.
  • the filter may determine, according to at least one candidate to be filtered in the target image block, the first search template from at least part of the candidate search templates of the multiple candidate search templates;
  • the target search template includes the first search template, and the first search template is used to acquire similar blocks for the at least one block to be filtered.
  • the filter may determine the target search template in units of image blocks, and may use the determined target search template for filtering of the block to be filtered included in the image block.
  • the image block may include a block to be filtered or a plurality of blocks to be filtered.
  • the image block can be a reconstructed image block.
  • the image block may be a reconstructed image of one frame or may be a reconstructed CTU.
  • the filter may determine the target search template from at least part of the candidate search templates based on the at least one block to be filtered included in the image block.
  • the following describes how the filter determines the target search template based on at least one block to be filtered included in the image block in combination with two implementations. It should be understood that the two implementations are not independent, and may be used in combination or in combination with other methods. to realise.
  • the first implementation manner may be referred to as a traversal-based manner to acquire a target search template
  • the second implementation manner is referred to as an image content-based acquisition of a search template.
  • the filter may traverse each candidate search template in the at least part of the candidate search templates for the at least one to-be-filtered block; and determine the first from the at least part of the candidate search templates according to the traversal result Search for a template.
  • the filter may use the candidate search templates to perform similar block acquisition for each block to be filtered, and determine the target search template according to the acquisition result of the similar block (that is, the traversal result mentioned above). That is to say, according to the acquisition result of the similar block, the preferred candidate search template can be selected as the target search template.
  • the traversal result can include:
  • the similarity of the similar blocks obtained, the number of similar blocks, and the number of blocks to be searched for the similar block are respectively obtained.
  • the traversal result includes the total number of similar blocks obtained for all the blocks to be filtered in the at least one block to be filtered, when calculating the total number of similar blocks obtained, when searching for a similar block, It is possible to add 1 to the number of similar blocks, without distinguishing which one is to be filtered based on, or alternatively, to determine the number of similar blocks based on each block to be filtered, and to obtain similar blocks for each block to be filtered. The amount is added and processed.
  • the traversal result includes all the blocks to be filtered in the at least one block to be filtered, and the total number of blocks to be searched for the similar block is obtained, when the total number of blocks to be searched is counted, it is performed (or When a block search is to be performed or is in progress, 1 can be added to the number of statistical blocks, without distinguishing which block to be filtered is used for similar block search, or it can be separately calculated based on each block to be filtered. The number of blocks to search for when searching for similar blocks, and adding and processing.
  • the first search template may be a search template in the at least part of the candidate search templates that satisfies the following conditions:
  • the total number of blocks searched is at least or less than a first threshold
  • the total number of similar blocks obtained is at most and/or greater than or equal to a second threshold; and/or,
  • the average of the similarities of the obtained similar blocks is the highest and/or exceeds the third threshold.
  • the filter may determine a preferred search template of each block to be filtered; and determine the first search template according to the preferred search template of each block to be filtered.
  • the filter may determine, according to each candidate search template, a preferred search template of each block to be filtered for each search result of the filter block, and determine the number based on the number of times each candidate search template is determined to be a preferred search template.
  • a search template may be determined, according to each candidate search template, a preferred search template of each block to be filtered for each search result of the filter block, and determine the number based on the number of times each candidate search template is determined to be a preferred search template.
  • the number of blocks to be filtered that uses the first search template as a preferred search template is at most and/or greater than or equal to a fourth threshold.
  • a search template may include a plurality of sub-search templates, in which case the similarity of similar blocks obtained in the process of acquiring similar blocks for all filter blocks or respective filter blocks is determined using each search template.
  • the degree, the total number of similar blocks, and the total number of blocks required to acquire a similar block may be determined by using the plurality of sub-search templates to determine the similarity of similar blocks obtained during the process of acquiring similar blocks for all filter blocks or respective filter blocks. Degree, the total number of similar blocks, and the total number of blocks required to retrieve similar blocks.
  • the plurality of sub-search templates may be used to perform multi-level similar block search, and the similar block obtained in the previous order is used for fixing the next-order sub-search template.
  • the first search template is determined from the at least part of the candidate search templates according to the image content of the at least one block to be filtered included in the target image block.
  • each gray filled original circle can be a pixel representing a block to be searched (which may be referred to as a candidate similar block), such as a pixel point or a center pixel point in the upper left corner,
  • a pixel representing the current block to be filtered such as a pixel point or a center pixel in the upper left corner, and the like.
  • FIG. 15 shows four image blocks in one frame image.
  • the image block A in FIG. 15 can adopt the search template shown in FIG. 14, and the image block B can adopt the image block B.
  • the image block C can adopt the search template shown in FIG. 13
  • the image block D can adopt the search template shown in FIG.
  • the search can be performed along the direction of the boundary, and for regions without obvious boundary characteristics, the search can be performed by traversal.
  • the image content of the at least one block to be filtered may include: image edge information of the target image block.
  • the edge information of the target image block may include a gradient direction of an edge of the image block and/or a pixel residual of the pixel around the target image block and the target image block.
  • the filter may be based on a gradient direction of the edge of the at least one block to be filtered (may be further combined with a gradient size) and/or a pixel residual of the pixel around the target image block and the target image block, and the at least partial candidate search
  • the arrangement direction of the pixels of the template for example, the oblique direction, from which the first search template is determined.
  • A can represent the pixel matrix of the target image block, and Gx and Gy represent the images detected through the horizontal and vertical edges.
  • G represents the gradient size and ⁇ represents the gradient direction.
  • the preferred search templates of the respective blocks to be filtered may be selected based on the gradient directions of the edges of the respective blocks to be filtered included in the target image block, and based on this, the target search template for performing similar block search on the target image blocks is selected.
  • the target search template may be selected directly from the candidate search templates based on the gradient direction of the edges of the entire target image block (without the need to split the block to be filtered).
  • the pixel residuals of the target image block and the pixel residual of the target image block may be calculated by: summing the absolute values of the difference between the pixel values of the target image block or the respective blocks to be filtered and the search block. (ie, Manhattan distance), or the squared difference between the pixel values and then summed (ie, Euclidean distance).
  • the pixel residual when calculating the pixel residual, may be calculated by performing a full search (ie, point-by-point scanning) on the surrounding area of the target image block (which may include the target image block itself).
  • a full search ie, point-by-point scanning
  • a full search may be performed in a surrounding area of the block to be filtered (which may include all or part of the area of the target image block), and the corresponding point of the search block and the one to be calculated are calculated.
  • the residual point of the corresponding point of the filter block in the associated block, having the same position, for example, both in the middle of the associated block, upper left corner, lower left corner, etc.).
  • the target image block may be used as a block, and a full search may be performed in a surrounding area of the one block (which may include all or part of the target image block), and the search block is calculated accordingly.
  • the point is the residual of the point corresponding to the one block.
  • the target image block includes a plurality of blocks to be filtered, for a single filter block, a full search is performed in a surrounding area of the target image block (which may include all or part of the area of the target image block), and corresponding points of the search block are calculated. The residual of the corresponding point of a single filter block.
  • a full search may be performed on the surrounding area of the single block to be filtered (which may include all or part of the area of the single block to be filtered), and the search block is calculated.
  • the residual of the corresponding point and the corresponding point of a single filter block is calculated.
  • the pixel residual of the target image block and the surrounding area can be calculated by performing a full search on the surrounding area.
  • the embodiment of the present application is not limited thereto, and the pixel residual may be calculated by means of spot scanning. .
  • a preferred search template of each block to be filtered may be calculated, and based on this, the target search template of the target image block may be selected.
  • each small box represents a pixel position, and the number in the box represents the pixel value at the position, wherein the underlined pixel value is the pixel value of the current block (2x2 block), which can be
  • the surrounding area of the current block is subjected to a full search (the entire area is scanned by point by point), and the residual is calculated.
  • the residual calculation result can be as shown in Fig. 17, in which, in Fig. 17, each small square represents the residual of one block of the search, and a total of 16 blocks are searched, and the smallest residual can be seen from Fig. 17. It is a 45 degree angular distribution.
  • the search template shown in Fig. 11 can be used.
  • a set of search templates may also be selected according to the content of the target image block (ie, the first search template includes a plurality of sub-search templates).
  • a candidate search template in which the gradient directions of the plurality of sub-search templates included are equal or substantially uniform in the gradient direction of the edge of the target image block is used as the first search template.
  • the first search template determined above may be used to determine similar blocks.
  • the second search template is determined according to the first search template, in addition to the candidate search template for determining the first search template.
  • the second search template may be determined according to the determined first search template from the remaining partial candidate search templates.
  • the similar blocks are jointly determined by the first search template and the second search template.
  • search template 1 the search template 2, and the search template 3 constitute a search template group A
  • search template 4 the search template 5, and the search template 6 constitute a search template group B
  • search template 7 The search template 8 and the search template 9 constitute a search template group C.
  • a search template needs to be used for searching; it can be selected according to the above-mentioned traversal method and according to the content of the target image block.
  • a search template specifically, a target search template may be selected from the candidate search template 1, the candidate search template 4, and the candidate search template 7, for example, if the selected target search template is the search template 4, then the search template 5 is selected.
  • search template 4 belongs to the same search template group, and the search templates 5 and 6 can be used as the target search template, that is, the search template 4, the search template 5, and the search template 6 can be used to perform similar block search.
  • the target search template may be included only in the first search template, and the second search template is not present.
  • the difference between the first search template and the second search template is that the manner of obtaining is different.
  • search template 1 search template 2, and search template 3 constitute search template group A
  • search template 4 search template 5, and search template 6 constitute search template group B
  • search template 7 search template 8 and the search template 9 constitute a search template group C.
  • the first search template mentioned above may include a plurality of sub-search templates, wherein if one of the search template groups in the above example is referred to as a search template, each of the search templates may be referred to as a sub-search template.
  • the second search template mentioned above may also include one or more sub-search templates.
  • a target search template includes L sub-search templates
  • the L-th sub-search templates are used to search for L-th order target similar blocks, wherein the target similar blocks obtained by the jth-order target similar block search are used for performing the first
  • the sub-search template is fixed in the search process of the j+1-order target similar block, where j takes a value from 1 to L, and L is an integer greater than or equal to 1.
  • the same sub-search template can search for multi-order target similar blocks.
  • the N search templates may be used to search for the M-th order target similar block, where the target similar block obtained by the i-th target matching block search is used for performing the (i+1)th
  • the sub-search template or the target search template is fixed in the search process of the meta-target similar block, where i takes a value from 1 to M, M is greater than or equal to N, and N and M are integers greater than or equal to 1.
  • a search of M (M equal to N)-order similar blocks may be performed.
  • the target similarity block obtained by the i-th target matching block search is used for fixing the search template in the search process of the i+1th target similar block.
  • the search of the non-N-th order target similar blocks can also be performed by using the N target search templates.
  • the same target search template can perform multi-level target similar block search.
  • a search of M (M is greater than N)-order similar blocks may be performed, where the i-th target is similar to the block search.
  • the target similarity block is used to fix the sub-search template in the search process of the i+1th-order target similarity block.
  • the method may be used in an encoding end.
  • the number of the target search template may be encoded, wherein the number of the used target search template may be written into the code stream, so that the decoding end may be in the slave code stream.
  • the target search template is determined according to the number, so that the target search template can be determined based on the number to filter the corresponding block to be filtered.
  • the encoding end acquires the target search template and uses the target search template to filter the filter block
  • the number may not be written into the code stream, and the decoding end may be the same according to the encoding end.
  • the method is to obtain a target search template, for example, the manner of traversing mentioned above or the selection of a target search template according to the content of the target image block.
  • a filter is filtered based on the at least one first similar block.
  • an array of structures may be constructed based on the at least one first similar block; the array of structures is decomposed; and an array of reconstructed structures is obtained according to the decomposed array of structures.
  • an array of structures may be constructed based on the first similar block and the second similar block.
  • the constructed array of structures may be a one-dimensional, two-dimensional or three-dimensional matrix.
  • the Singular Value Decomposition can be performed on the array of the structure, and the singular value is subjected to a hard threshold operation.
  • the reconstructed structure group is obtained according to the result of the singular value decomposition, and finally the reconstructed image is obtained.
  • the purpose of SVD decomposition is to extract the principal components of the structure array.
  • the simple SVD can not play the role of filtering.
  • the key of filtering is to remove noise.
  • the place where noise is removed in NLSF is hard threshold operation.
  • DCT Discrete Cosine Transform
  • KLT Kerhunen-Loève Transform
  • SDT Dependent Transform
  • wavelet transform etc.
  • the block to be filtered is filtered based on a weighted average result of pixel values of the at least one first similar block.
  • a weighted average may be performed based on pixel values of the first similar block and the second similar block.
  • the filtering mode of the embodiment of the present application may be used in combination with other filtering methods. Specifically, filtering in other manners may be performed after filtering in the embodiment of the present application, or filtering in accordance with an embodiment of the present application may be performed after filtering in other manners.
  • filtering techniques may include bilateral filtering, deblocking filtering, adaptive sample compensation filtering, and adaptive loop filtering. among them,
  • Bilateral filtering is calculated by the weighted average of the current pixel and its neighboring four point pixel values to achieve edge-preserving denoising.
  • Deblocking filtering is used to predict the boundary between the unit and the transform unit, and the trained low-pass filter is used to perform nonlinear weighting of the boundary pixels, thereby reducing the block effect.
  • the adaptive sample compensation filter suppresses the ringing effect by classifying the pixels in the image block and adding the same compensation value to each type of pixel to make the reconstructed image closer to the original image.
  • Adaptive loop filtering is a Wiener filter that is mainly used to minimize the mean square error between the original image and the reconstructed image.
  • Table 1 below shows a comparison diagram of the points of the prior art and the present application that need to be searched (the number of search points is equivalent to the number of similarity matching operations, and one search point is equal to one similarity matching).
  • the search window for searching for similar blocks set for the current block is 33x33
  • the prior art averages 1072 points for each current block when performing similar block search.
  • the five sequence sequences of MarketPlace, BQTTerrace, BasketballDrive, RitualDance, and Cactus need to search on average.
  • the present invention saves search points by 72.9%.
  • the five sequences MarketPlace, BQTTerrace, BasketballDrive, RitualDance, Cactus can reduce the search points by 74.6%, 70.3%, 71.5%, 75.2%, and 72.9%, respectively.
  • the method for video processing in the embodiment of the present application acquires, in at least one set of pixels, at least one first similar block of the current block, where the set of pixels includes sparse reconstructed pixels, so that the similarity can be reduced in the filtering process.
  • the complexity of block acquisition can reduce the filtering complexity, thus reducing the complexity of codec and saving the time of codec, while ensuring the minimum loss of coding performance.
  • FIG. 18 is a schematic flow diagram of a method 400 for video processing in accordance with an embodiment of the present application.
  • the method 400 includes at least a portion of the following.
  • the method 400 can be applied to the encoding end, and can also be applied to the decoding end.
  • the method 400 can be implemented by a filter, which can be part of an encoder or decoder, or can exist independently of the encoder or decoder.
  • the filter may be an NLSF filter, or an NLM filter, or other filter.
  • the filter determines a target search template from among a plurality of candidate search templates.
  • the search template in the embodiment of the present application is used to circle some reconstructed pixels in the reconstructed image or image block, and the filter may search for similar blocks from the reconstructed pixels.
  • the shape of the search template is the same as the shape of the circled reconstructed pixels used to search for similar blocks.
  • the pixel included in the search template can be understood as fixing the search template to the pixel enclosed by the reconstructed image or the image block.
  • the shape of the search template mentioned in the method 400 (which can be understood as pixel arrangement, number of pixels, etc.) is not specifically defined.
  • the search template in method 400 can include sparse reconstructed pixels, wherein the search template includes sparse reconstructed pixels meaning that there are some pixels in the search template, the spacing between the pixels (eg, the shortest between pixels) There is a pixel that does not belong to the set in the straight line distance, for example, a search template as shown in FIGS. 7 and 8.
  • the search template in method 400 may also include non-sparse reconstructed pixels, for example, a search template as shown in FIG. 10, but the search template including non-sparse reconstructed pixels may also have other shapes, for example, may be rectangular Search templates, diamond search templates, and circular search templates.
  • the search template in the embodiment of the present application may include a plurality of sub-search templates, each of which includes different sub-search templates and/or different order of use.
  • the search template 1 includes a sub-search template 1, a sub-search template 2, and a sub-search template 3, and the search template 2 includes a sub-search template 1 and a sub-search template 2, and the search template 1 and the search template 2 are different.
  • the search template 1 includes a sub-search template 1, a sub-search template 2, and a sub-search template 3, and the search template 2 includes a sub-search template 2, a sub-search template 4, and a sub-search template 5, and the search template 1 and the search template 2 are different.
  • both the search template 1 and the search template 2 include a sub-search template 1, a sub-search template 2, and a sub-search template 3, but for the search template 1, the sub-search templates are used in the order of sub-search template 1, sub-search template 2, and sub-search.
  • Template 3 is searched, and for search template 2, the order of use of the sub-search templates is sub-search template 2, sub-search template 1 and sub-search template 3, and search template 1 and search template 2 are different.
  • the sub-search template may also include sparse reconstructed pixels or non-sparse reconstructed pixels.
  • the search template in the embodiment of the present application may be understood as a search template set, which includes a plurality of search templates.
  • multiple candidate search templates may be preset in the filter.
  • the number and arrangement of reconstructed pixels in each search template may be preset.
  • the filter may obtain the plurality of candidate search templates preset from the memory, that is, the filter does not need to know the deformation law between the multiple candidate search templates.
  • the filter may also obtain a candidate search template from the memory, and then may deform according to a certain rule to obtain other search templates.
  • the resulting candidate search template can be increased or decreased by one or more columns of pixels in one or more directions.
  • the determined target search template may include one search template, or multiple search templates, and each search template may also include one or more sub-search templates.
  • the filter may determine, according to at least one candidate to be filtered in the target image block, the first search template from at least part of the candidate search templates of the multiple candidate search templates;
  • the target search template includes the first search template, and the first search template is used for the at least one block to be filtered to acquire a target similar block.
  • the filter may determine the target search template in units of image blocks, and may use the determined target search template for filtering of the block to be filtered included in the image block.
  • the image block may include a block to be filtered or a plurality of blocks to be filtered.
  • the image block can be a reconstructed image block.
  • the image block may be a reconstructed image of one frame or may be a reconstructed CTU.
  • the filter may determine the target search template from at least part of the candidate search templates based on the at least one block to be filtered included in the image block.
  • the following describes how the filter determines the target search template based on at least one block to be filtered included in the image block in combination with two implementations. It should be understood that the two implementations are not independent, and may be used in combination or in combination with other methods. to realise.
  • the first implementation manner may be referred to as a traversal-based manner to acquire a target search template
  • the second implementation manner is referred to as an image content-based acquisition of a search template.
  • the filter may traverse each candidate search template in the at least part of the candidate search templates for the at least one to-be-filtered block; and determine the first from the at least part of the candidate search templates according to the traversal result Search for a template.
  • the filter may use the candidate search templates to perform similar block acquisition for each block to be filtered, and determine the target search template according to the acquisition result of the similar block (that is, the traversal result mentioned above). That is to say, according to the acquisition result of the similar block, the preferred candidate search template can be selected as the target search template.
  • the traversal result can include:
  • the similarity of the similar blocks obtained, the number of similar blocks, and the number of blocks to be searched for the similar block are respectively obtained.
  • the traversal result includes the total number of similar blocks obtained for all the blocks to be filtered in the at least one block to be filtered, when calculating the total number of similar blocks obtained, when searching for a similar block, It is possible to add 1 to the number of similar blocks, without distinguishing which is to be obtained based on which block to be filtered, or to separately determine the number of similar blocks obtained based on each block to be filtered, and to obtain the filter blocks obtained for each similar block. The quantity is added and processed.
  • the traversal result includes all the blocks to be filtered in the at least one block to be filtered, and the total number of blocks to be searched for the similar block is obtained, when the total number of blocks to be searched is counted, it is performed (or When a block search is to be performed or is in progress, 1 can be added to the number of statistical blocks, without distinguishing which block to be filtered is used for similar block search, or it can be separately calculated based on each block to be filtered. The number of blocks to search for when searching for similar blocks, and adding and processing.
  • the first search template may be a search template of the at least part of the candidate search templates that satisfies the following conditions:
  • the total number of blocks searched is at least or less than a first threshold
  • the total number of similar blocks obtained is at most and/or greater than or equal to a second threshold; and/or,
  • the average of the similarities of the obtained similar blocks is the highest and/or exceeds the third threshold.
  • the filter may determine a preferred search template of each block to be filtered; and determine the first search template according to the preferred search template of each block to be filtered.
  • the filter may determine, according to each candidate search template, a preferred search template of each block to be filtered for each search result of the filter block, and determine the number based on the number of times each candidate search template is determined to be a preferred search template.
  • a search template may be determined, according to each candidate search template, a preferred search template of each block to be filtered for each search result of the filter block, and determine the number based on the number of times each candidate search template is determined to be a preferred search template.
  • the number of blocks to be filtered that uses the first search template as a preferred search template is at most and/or greater than or equal to a fourth threshold.
  • a search template may include a plurality of sub-search templates, in which case the similarity of similar blocks obtained in the process of acquiring similar blocks for all filter blocks or respective filter blocks is determined using each search template.
  • the degree, the total number of similar blocks, and the total number of blocks required to acquire a similar block may be determined by using the plurality of sub-search templates to determine the similarity of similar blocks obtained during the process of acquiring similar blocks for all filter blocks or respective filter blocks. Degree, the total number of similar blocks, and the total number of blocks required to retrieve similar blocks.
  • the plurality of sub-search templates can perform multi-level similar block search, and the similar block obtained in the previous order is used for fixing the next-order sub-search template.
  • the first search template is determined from the at least part of the candidate search templates according to the image content of the at least one block to be filtered included in the target image block.
  • FIG. 15 shows four image blocks in one frame of image.
  • the image block A in FIG. 15 can be Using the search template shown in FIG. 14, the image block B can adopt the search template shown in FIG. 11, the image block C can adopt the search template shown in FIG. 13, and the image block D can adopt the search template shown in FIG.
  • the search can be performed along the direction of the boundary, and for regions without obvious boundary characteristics, the search can be performed by traversal.
  • the image content of the at least one block to be filtered may include: image edge information of the target image block.
  • the edge information of the target image block may include a gradient direction of an edge of the image block and/or a pixel residual of the pixel around the target image block and the target image block.
  • the filter may be based on a gradient direction of the edge of the at least one block to be filtered (may be further combined with a gradient size) and/or a pixel residual of the pixel around the target image block and the target image block, and the at least partial candidate search
  • the arrangement direction of the pixels of the template for example, the oblique direction, from which the first search template is determined.
  • the gradient size and direction of the edge it can be calculated by various calculation methods, for example, Sobel operator, Robinson operator or Laplace operator can be used for calculation.
  • the preferred search templates of the respective blocks to be filtered may be selected based on the gradient directions of the edges of the respective blocks to be filtered included in the target image block, and based on this, the target search template for performing similar block search on the target image blocks is selected.
  • the target search template may be selected directly from the candidate search templates based on the gradient direction of the edges of the entire target image block (without the need to split the block to be filtered).
  • the pixel residuals of the target image block and the pixel residual of the target image block may be calculated by: summing the absolute values of the difference between the pixel values of the target image block or the respective blocks to be filtered and the search block. (ie, Manhattan distance), or the squared difference between the pixel values and then summed (ie, Euclidean distance).
  • the pixel residual when calculating the pixel residual, may be calculated by performing a full search (ie, point-by-point scanning) on the surrounding area of the target image block (which may include the target image block itself).
  • a full search ie, point-by-point scanning
  • a full search may be performed in a surrounding area of the block to be filtered (which may include all or part of the area of the target image block), and the corresponding point of the search block and the one to be calculated are calculated.
  • the residual point of the corresponding point of the filter block in the associated block, having the same position, for example, both in the middle of the associated block, upper left corner, lower left corner, etc.).
  • the target image block may be used as a block, and a full search may be performed in a surrounding area of the one block (which may include all or part of the target image block), and the search block is calculated accordingly.
  • the point is the residual of the point corresponding to the one block.
  • the target image block includes a plurality of blocks to be filtered, for a single filter block, a full search is performed in a surrounding area of the target image block (which may include all or part of the area of the target image block), and corresponding points of the search block are calculated. The residual of the corresponding point of a single filter block.
  • a full search may be performed on the surrounding area of the single block to be filtered (which may include all or part of the area of the single block to be filtered), and the search block is calculated.
  • the residual of the corresponding point and the corresponding point of a single filter block is calculated.
  • the pixel residual of the target image block and the surrounding area can be calculated by performing a full search on the surrounding area.
  • the embodiment of the present application is not limited thereto, and the pixel residual may be calculated by means of spot scanning. .
  • a preferred search template of each block to be filtered may be calculated, and based on this, the target search template of the target image block may be selected.
  • each small box represents a pixel position
  • the number in the box represents the pixel value at the position, wherein the underlined pixel value is the pixel value of the current block, and the surrounding area of the current block can be Perform a full search (the way the point-by-point scan is performed throughout the area) to calculate the residual.
  • the residual calculation result can be as shown in Fig. 17, in which, in Fig. 17, each small square represents the residual of one block of the search, and a total of 16 blocks are searched, and the smallest residual can be seen from Fig. 17. It is a 45 degree angular distribution.
  • the search template shown in Fig. 13 can be used.
  • a set of search templates may also be selected according to the content of the target image block (ie, the first search template includes a plurality of sub-search templates).
  • a candidate search template in which the gradient directions of the plurality of sub-search templates included are equal or substantially uniform in the gradient direction of the edge of the target image block is used as the first search template.
  • the first search template determined above may be used to determine similar blocks.
  • the second search template is determined according to the first search template, in addition to the candidate search template for determining the first search template.
  • the second search template may be determined according to the determined first search template from the remaining partial candidate search templates.
  • the similar blocks are jointly determined by the first search template and the second search template.
  • search template 1 the search template 2, and the search template 3 constitute a search template group A
  • search template 4 the search template 5, and the search template 6 constitute a search template group B
  • search template 7 The search template 8 and the search template 9 constitute a search template group C.
  • a search template needs to be used for searching; it can be selected according to the above-mentioned traversal method and according to the content of the target image block.
  • a search template specifically, a target search template may be selected from the candidate search template 1, the candidate search template 4, and the candidate search template 7, for example, if the selected target search template is the search template 4, then the search template 5 is selected.
  • search template 4 belongs to the same search template group, and the search templates 5 and 6 can be used as the target search template, that is, the search template 4, the search template 5, and the search template 6 can be used to perform similar block search.
  • the target search template may be included only in the first search template, and the second search template is not present.
  • search template 1 search template 2, and search template 3 constitute search template group A
  • search template 4 search template 5, and search template 6 constitute search template group B
  • search template 7 search template 8 and the search template 9 constitute a search template group C.
  • the first search template mentioned above may include a plurality of sub-search templates, wherein if one of the search template groups in the above example is referred to as a search template, each of the search templates may be referred to as a sub-search template.
  • the second search template mentioned above may also include one or more sub-search templates.
  • the filter acquires at least one target similar block of the block to be filtered.
  • a target search template includes L sub-search templates
  • the L-th sub-search templates are used to search for L-th order target similar blocks, wherein the target similar blocks obtained by the jth-order target similar block search are used for performing the first
  • the sub-search template is fixed in the search process of the j+1-order target similar block, where j takes a value from 1 to L, and L is an integer greater than or equal to 1.
  • the same sub-search template can search for multi-order target similar blocks.
  • the N search templates may be used to search for the M-th order target similar block, where the target similar block obtained by the i-th target matching block search is used for performing the (i+1)th
  • the sub-search template or the target search template is fixed in the search process of the meta-target similar block, where i takes a value from 1 to M, M is greater than or equal to N, and N and M are integers greater than or equal to 1.
  • a search of M (M equal to N)-order similar blocks may be performed.
  • the target similarity block obtained by the i-th target matching block search is used for fixing the search template in the search process of the i+1th target similar block.
  • the search of the non-N-th order target similar blocks can also be performed by using the N target search templates.
  • the same target search template can perform multi-level target similar block search.
  • a search of M (M is greater than N)-order similar blocks may be performed, where the i-th target is similar to the block search.
  • the target similarity block is used to fix the sub-search template in the search process of the i+1th-order target similarity block.
  • performing the searching of the multi-order similar block may refer to: using the current to-be-filtered block, fixing the search template, searching for similar blocks, and then performing the similarity based on the searched similar blocks again.
  • the search template is fixed and searched for similar blocks, and then the search for similar blocks can be stopped, or the search template can be fixed based on the similar blocks searched again, and so on.
  • the process can be referred to as a multi-level search process based on similar blocks mentioned in the embodiment of the present application.
  • the search template may be fixed based on the plurality of similar blocks, and a similar block search process may be performed.
  • the similarity block matching process has been performed on the similar block search process in the previous similar block search process, and the matching operation of the similar block is no longer performed, thereby saving the filtering complexity.
  • the matching operation of the similar block is no longer performed. That is to say, even if the similarity matching has been performed before, since the similarity block is not determined, the matching can still be performed again.
  • the threshold value used to determine whether it is a similar block may be due to a different order search process. different.
  • the number of similar blocks acquired in a certain order similar block search process may not exceed a certain value.
  • the similarity between all the search blocks in the current to-be-filtered block and the current block may be acquired, and the similarity is arranged from high to low, and the specific one is selected. A similar number of blocks.
  • a certain order similar block search process when the number of searched desired blocks reaches a certain number, the desired block is determined to be a similar block, and the search for the order similar block is stopped. And a value of a parameter for characterizing a similarity between the current to-be-filtered block and the desired block exceeds a first threshold.
  • the fixing of the similarity block mentioned above for the search template or the sub-search template may refer to the point that the similar block is used as a fixed search template or a sub-search template. If there are multiple similar blocks for fixing the search template or the sub-search template, it may refer to moving the search template or the sub-search template based on the plurality of similar blocks, and obtaining a plurality of pixel sets by using the search template or the sub-search template. Search for the next order similar block.
  • the block to be filtered is filtered using the at least one target similarity block.
  • an array of structures may be constructed based on the at least one target similarity block; the array of structures is decomposed; and an array of reconstructed structures is obtained according to the decomposed array of structures.
  • the to-be-filtered block is filtered based on a weighted average result of pixel values of the at least one target similarity block.
  • the method may be used in an encoding end.
  • the number of the target search template may be encoded, wherein the number of the used target search template may be written into the code stream, so that the decoding end may be in the slave code stream.
  • the target search template is determined according to the number, so that the target search template can be determined based on the number to filter the corresponding block to be filtered.
  • the encoding end acquires the target search template and uses the target search template to filter the filter block
  • the number may not be written into the code stream, and the decoding end may be the same according to the encoding end.
  • the method is to obtain a target search template, for example, the manner of traversing mentioned above or the selection of a target search template according to the content of the target image block.
  • the target search template is determined; and the target search template is used to acquire at least one target similar block for filtering the filter block in the reconstructed pixel of the current image, and the search may be flexibly selected. Templates, avoiding the unreasonable problem of similar block acquisition caused by the search of similar blocks using a fixed search template.
  • FIG. 19 is a schematic flow diagram of a method 500 for video processing in accordance with an embodiment of the present application. As shown in FIG. 19, the method 500 includes at least some of the following. The method 400 can be applied to the encoding end or to the decoding end.
  • the filter acquires, from the reconstructed pixels, at least one similar block of the current block, the current block including at least one reconstructed pixel, wherein a value of a parameter used to characterize the similarity of the current block to the similar block The first threshold is exceeded.
  • the reconstructed pixel may be a pixel in the search window, and a similar block of the current block may be obtained from the search window by using a point-by-point scan.
  • the filter performs filtering based on the at least one first similar block.
  • the desired block is taken as the similar block, and the searching of the similar block is stopped, wherein the current block is used to represent The value of the parameter of the similarity of the desired block exceeds a first threshold.
  • the number of the searched desired blocks is greater than the second threshold, the number is determined to be equal to the number of the expected blocks according to the similarity from high to low.
  • the similar block of the second threshold wherein a value of a parameter used to characterize the similarity of the current block to the desired block exceeds a first threshold.
  • the first threshold is determined according to at least one of the following parameters: a size of the current block, a bit depth of the video, a pixel of the current block, and a horizontal gradient of a pixel of the current block, the current block The vertical gradient of the pixels.
  • the first threshold is determined according to at least one of the following parameters: a pixel of the current block, and a level of a pixel of the current block. Gradient, the vertical gradient of the pixels of the current block.
  • the first threshold is determined based on at least one of the following parameters: a size of the current block, and a bit depth of the video.
  • the first threshold is determined based on a bit depth of the video.
  • the metric parameter used to obtain the similarity judgment performed by the similar block is: a difference value of the hash value, SSD, SAD, MAD, MSD, or SSIM.
  • the method is implemented by an encoding end; the method further includes: the encoding end determining the first threshold, and encoding the first threshold.
  • the method is implemented by a decoding end; the method further includes: the decoding end acquiring the first threshold in the code stream.
  • an array of structures may be constructed based on the at least one target similarity block; the array of structures is decomposed; and an array of reconstructed structures is obtained according to the decomposed array of structures.
  • the to-be-filtered block is filtered based on a weighted average result of pixel values of the at least one similar block.
  • FIG. 20 is a schematic block diagram of an apparatus 600 for video processing in accordance with an embodiment of the present application. As shown in FIG. 20, the device 600 includes an obtaining unit 610 and a filtering unit 620;
  • the acquiring unit 610 is configured to: acquire, in the at least one set of pixels, at least one first similar block of the block to be filtered, where the set of pixels includes a sparse reconstructed pixel, and the block to be filtered includes at least one reconstructed pixel;
  • the filtering unit 620 is configured to: filter the to-be-filtered block based on the at least one first similar block.
  • the at least one pixel set includes a first pixel set
  • the device further includes: a determining unit 630, configured to:
  • the obtaining unit 610 is further configured to: acquire the first similar block from the first set of pixels.
  • the obtaining unit 610 is further configured to:
  • the first similar block is obtained from the first set of pixels according to a search manner from the block to be filtered to the block away from the block to be filtered.
  • the obtaining unit 610 is further configured to:
  • the desired block is taken as the first similar block, and the first similarity is stopped in the first set of pixels
  • the obtaining unit 610 is further configured to:
  • the number of the determined blocks is equal to the determined number from the searched desired blocks in a manner that the similarity is from high to low.
  • the first similarity block of the second threshold wherein a value of a parameter used to characterize a similarity of the to-be-filtered block to the desired block exceeds a first threshold.
  • the at least one pixel set includes a second pixel set
  • the determining unit 630 is further configured to:
  • the obtaining unit 610 is further configured to:
  • the first similar block is acquired again.
  • the obtaining unit 610 is further configured to:
  • the obtaining unit 610 is further configured to:
  • the obtaining unit 610 is further configured to:
  • the determined number is equal to the The first similarity block of the third threshold, wherein a value of a parameter used to characterize the similarity of the to-be-filtered block to the desired block exceeds a first threshold.
  • the obtaining unit 610 is further configured to:
  • a block in which the similar block matching operation has been performed is not included in the second set of pixels.
  • the device further includes a determining unit 630, configured to:
  • the set of pixels is determined based on a target search template.
  • the reconstructed pixels in the target search template are aggregated into a plurality of scattered image blocks, and the size of each image block is greater than or equal to the size of the block to be filtered.
  • the target search template includes a plurality of candidate similar blocks for selecting the first similarity block, and the size of the candidate similarity block is equal to a size of the to-be-filtered block.
  • the target search template includes multiple sets of candidate similar blocks from the center to the edge, each set of candidate similar blocks enclosing a ring, the ring being symmetric with respect to a center of the target search template, and candidate similar blocks within the group Evenly arranged.
  • the target search template includes four sets of candidate similar blocks, and the edge pixels of the four sets of candidate similar blocks that are far from the center of the target search template are separated by one from the center of the target search template. Pixels, 2 pixels, 4 pixels and 8 pixels.
  • the four sets of candidate similar blocks respectively have 4 candidate similar blocks, 8 candidate similar blocks, 8 candidate similar blocks, and 8 candidate similar blocks, wherein a set of candidate similarities with 4 candidate similar blocks The block is closest to the center of the target search template.
  • different sets of pixels are determined based on different target search templates.
  • the determining unit 630 is further configured to:
  • the target search template is determined.
  • the determining unit 630 is further configured to:
  • the target search template includes the first search template, and the first search template is used to acquire a target similar block by the at least one to-be-filtered block.
  • the determining unit 630 is further configured to:
  • the first search template is determined from the at least part of the candidate search templates based on the traversal result.
  • the traversing result includes:
  • the first search template is a search template in the at least part of the candidate search templates that satisfies the following conditions:
  • the total number of blocks searched is at least or less than a first threshold
  • the total number of similar blocks obtained is at most and/or greater than or equal to a second threshold; and/or,
  • the average of the similarities of the obtained similar blocks is the highest and/or exceeds the third threshold.
  • the determining unit 630 is further configured to:
  • the image content of the at least one block to be filtered includes: a gradient direction of an image edge of the target image block and/or a pixel residual of the pixel surrounding the target image block and the target image block.
  • the determining unit 630 is further configured to:
  • the first search template is determined.
  • the determining unit 630 is further configured to:
  • the number of blocks to be filtered that use the first search template as a preferred search template is at most and/or greater than or equal to a fourth threshold.
  • the determining unit 630 is further configured to:
  • the search template includes multiple sub-search templates
  • Different search templates include different sub-search templates and/or sub-search templates in different order of use.
  • the device is for an encoding end.
  • the device further includes an encoding unit 640, configured to:
  • the number that encodes the target search template is the number that encodes the target search template.
  • the device is for a decoding end.
  • the device is used by the decoding end, and the determining unit 630 is further configured to:
  • the target search template is determined from the plurality of candidate search templates according to the number of the target search template.
  • the device further includes: determining unit 630, configured to:
  • the obtaining unit 610 is further configured to:
  • the filtering unit 620 is further configured to:
  • Filtering is performed based on the first similar block and the second similar block.
  • the obtaining unit 610 is further configured to:
  • the second similar block is determined in a point-by-point manner.
  • the obtaining unit 610 is further configured to:
  • a block in the pixel window that has been subjected to a similar block matching operation does not perform a matching operation of a similar block
  • Blocks that have been subjected to similar block matching operations are not included in the search window.
  • the obtaining unit 610 is further configured to:
  • the obtaining unit 610 is further configured to:
  • the number of the similarities is determined from high to low, and from the desired blocks, the number is determined to be equal to the fourth threshold.
  • the second similarity block wherein a value of a parameter used to characterize a similarity between the to-be-filtered block and the desired block exceeds a first threshold.
  • a value of a parameter used to characterize a similarity between the block to be filtered and a similar block of the block to be filtered exceeds a first threshold.
  • the first threshold is determined based on at least one of the following parameters:
  • the parameter characterizing the similarity is a difference of hash values
  • the first threshold is determined based on at least one of the following parameters:
  • a pixel of the block to be filtered and a horizontal gradient of a pixel of the block to be filtered, and a vertical gradient of a pixel of the block to be filtered.
  • the parameter characterizing the similarity is an error squared sum SSD or an absolute error and SAD
  • the first threshold is determined based on at least one of the following parameters: a size of the block to be filtered, and a bit depth of the video.
  • the parameters characterizing the similarity are an average absolute difference MAD, an average error squared sum MSD or a structural similarity indicator SSIM,
  • the first threshold is determined based on a bit depth of the video.
  • the device is implemented by an encoding end; the device further includes an encoding unit 640, configured to:
  • the device is implemented by a decoding end; the obtaining unit 610 is further configured to:
  • the parameter characterizing the similarity is: a difference of hash values, SSD, SAD, MAD, MSD or SSIM.
  • the reconstructed pixel used to obtain the similar block includes:
  • a reconstructed pixel on an upper side of the coding unit to which the block to be filtered belongs a reconstructed pixel on a left side of the coding unit, and a reconstructed pixel of the coding unit;
  • Reconstruction pixel on the upper side of the coding unit reconstructed pixel on the left side of the coding unit, reconstructed pixel on the right side of the coding unit, reconstructed pixel on the lower side of the coding unit, and reconstruction of the coding unit Pixel; or,
  • a reconstructed pixel of the coding unit A reconstructed pixel of the coding unit.
  • the number of pixels in the vertical direction of the reconstructed pixel on the upper side of the coding unit is less than or equal to the number of pixels in the horizontal direction of the reconstructed pixel on the left side of the coding unit.
  • the filtering unit 620 is further configured to:
  • the filtering unit 620 is further configured to:
  • the block to be filtered is filtered based on a weighted average result of pixel values of the at least one first similar block.
  • the device 600 can implement the operations of the filter in the foregoing method 300.
  • the device 600 can implement the operations of the filter in the foregoing method 300.
  • details are not described herein again.
  • the device 700 includes: a determining unit 710, an obtaining unit 720, and a filtering unit 730;
  • the determining unit 710 is configured to: determine, from a plurality of candidate search templates, a target search template;
  • the obtaining unit 720 is configured to: acquire, by using the target search template, at least one target similarity block of the to-be-filtered block in the reconstructed pixel of the current image;
  • the filtering unit 730 is configured to: filter the to-be-filtered block by using the at least one target similarity block.
  • the determining unit 710 is further configured to:
  • the target search template includes the first search template, and the first search template is used to acquire a target similar block by the at least one to-be-filtered block.
  • the determining unit 710 is further configured to:
  • the first search template is determined from the at least part of the candidate search templates based on the traversal result.
  • the traversing result includes:
  • the first search template is a search template in the at least part of the candidate search templates that satisfies the following conditions:
  • the total number of blocks searched is at least or less than a first threshold
  • the total number of similar blocks obtained is at most and/or greater than or equal to a second threshold; and/or,
  • the average of the similarities of the obtained similar blocks is the highest and/or exceeds the third threshold.
  • the determining unit 710 is further configured to:
  • the image content of the at least one block to be filtered includes: a gradient direction of an image edge of the target image block and/or a pixel residual of the pixel surrounding the target image block and the target image block.
  • the determining unit 710 is further configured to:
  • the first search template is determined.
  • the determining unit 710 is further configured to:
  • the number of blocks to be filtered that use the first search template as a preferred search template is at most and/or greater than or equal to a fourth threshold.
  • the determining unit 710 is further configured to:
  • the search template includes multiple sub-search templates
  • Different search templates include different sub-search templates and/or sub-search templates in different order of use.
  • the target search template includes L sub-search templates
  • the obtaining unit 720 is further configured to:
  • the target search template includes N search templates
  • the obtaining unit 720 is further configured to:
  • the filtering unit 730 is further configured to:
  • the filtering unit 730 is further configured to:
  • the to-be-filtered block is filtered based on a weighted average result of pixel values of the at least one target similarity block.
  • the device is for an encoding end.
  • the device further includes an encoding unit 740, configured to:
  • the number of the target search template is encoded for delivery to the decoder.
  • the device is for a decoding end.
  • the device is used by the decoding end, and the determining unit 710 is further configured to:
  • the target search template is determined from the plurality of candidate search templates according to the number of the target search template.
  • the device 700 can implement the operations of the filter in the foregoing method 400.
  • the device 700 can implement the operations of the filter in the foregoing method 400.
  • details are not described herein again.
  • FIG. 22 is a schematic block diagram of an apparatus 800 for video processing in accordance with an embodiment of the present application.
  • the device 800 includes an obtaining unit 810 and a filtering unit 820.
  • the obtaining unit 810 is configured to: acquire, from the reconstructed pixels, at least one similar block of the to-be-filtered block, where the to-be-filtered block includes at least one reconstructed pixel, where a value of a parameter used to characterize a similarity between the block to be filtered and the similar block exceeds a first threshold;
  • the filtering unit 820 is configured to: filter the to-be-filtered block based on the at least one similar block.
  • the number of similar blocks is less than or equal to a second threshold.
  • the obtaining unit 810 is further configured to:
  • the desired block is taken as the similar block, and the search of the similar block is stopped, wherein the block to be filtered and the expectation are used to characterize The value of the parameter of the similarity of the block exceeds the first threshold.
  • the obtaining unit 810 is further configured to:
  • the number of determinations is equal to the second threshold from the desired block in a manner that the similarity is high to low.
  • the similar block wherein a value of a parameter used to characterize a similarity of the block to be filtered and the desired block exceeds a first threshold.
  • the first threshold is determined based on at least one of the following parameters:
  • the parameter characterizing the similarity is a difference of hash values
  • the first threshold is determined based on at least one of the following parameters:
  • a pixel of the block to be filtered and a horizontal gradient of a pixel of the block to be filtered, and a vertical gradient of a pixel of the block to be filtered.
  • the parameter characterizing the similarity is an error squared sum SSD or an absolute error and SAD
  • the first threshold is determined based on at least one of the following parameters: a size of the block to be filtered, and a bit depth of the video.
  • the parameters characterizing the similarity are an average absolute difference MAD, an average error squared sum MSD or a structural similarity indicator SSIM,
  • the first threshold is determined based on a bit depth of the video.
  • the parameter characterizing the similarity is: a difference of hash values, SSD, SAD, MAD, MSD or SSIM.
  • the device is implemented by an encoding end; the device further includes an encoding unit 820, configured to:
  • the encoding end determines the first threshold and encodes the first threshold.
  • the device is implemented by a decoding end; the obtaining unit 810 is further configured to:
  • the filtering unit 820 is further configured to:
  • the filtering unit 820 is further configured to:
  • the block to be filtered is filtered based on a weighted average result of pixel values of the at least one similar block.
  • the device 800 can implement the operations of the filter in the foregoing method 500.
  • the device 800 can implement the operations of the filter in the foregoing method 500.
  • details are not described herein again.
  • the device for video processing in the foregoing embodiment of the present application may be a chip, which may be specifically implemented by a circuit, but the specific implementation manner is not limited in the embodiment of the present application.
  • the embodiment of the present application further provides an encoder, which is used to implement the function of the encoding end in the embodiment of the present application, and may include the module for the encoding end in the device for video processing in the foregoing embodiment of the present application.
  • the embodiment of the present application further provides a decoder, which is used to implement the function of the decoding end in the embodiment of the present application, and may include the module for the decoding end in the device for video processing in the foregoing embodiment of the present application.
  • the embodiment of the present application further provides a codec, which includes the device for video processing in the foregoing embodiment of the present application.
  • FIG. 23 shows a schematic block diagram of a computer system 900 in accordance with an embodiment of the present application.
  • the computer system 900 can include a processor 910 and a memory 920.
  • the computer system 900 may also include components that are generally included in other computer systems, such as input and output devices, communication interfaces, and the like, which are not limited by the embodiments of the present application.
  • Memory 920 is for storing computer executable instructions.
  • the memory 920 may be various types of memory, for example, may include a high speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. This example is not limited to this.
  • RAM high speed random access memory
  • non-volatile memory such as at least one disk memory. This example is not limited to this.
  • the processor 910 is configured to access the memory 920 and execute the computer executable instructions to perform the operations in the method for video processing of the embodiments of the present application described above.
  • the processor 910 may include a microprocessor, a field-programmable gate array (FPGA), a central processing unit (CPU), a graphics processing unit (GPU), etc., and is implemented in the present application. This example is not limited to this.
  • the apparatus and computer system for video processing of the embodiments of the present application may correspond to an execution body of a method for video processing of the embodiments of the present application, and the above and other components of the video processing apparatus and various modules in the computer system
  • the operations and/or functions are respectively implemented in order to implement the corresponding processes of the foregoing various methods, and are not described herein for brevity.
  • the embodiment of the present application further provides an electronic device, which may include the device or computer system for video processing of the various embodiments of the present application described above.
  • the embodiment of the present application further provides a computer storage medium, where the program code is stored in the computer storage medium, and the program code may be used to indicate a method for performing the filtering of the embodiment of the present application.
  • the term "and/or” is merely an association relationship describing an associated object, indicating that there may be three relationships.
  • a and/or B may indicate that A exists separately, and A and B exist simultaneously, and B cases exist alone.
  • the character "/" in this article generally indicates that the contextual object is an "or" relationship.
  • the disclosed systems, devices, and methods may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, or an electrical, mechanical or other form of connection.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the embodiments of the present application.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present application may be in essence or part of the contribution to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Image Analysis (AREA)

Abstract

本申请实施例提供一种用于视频处理的方法和设备,可以降低滤波过程的复杂度。该方法包括:在至少一个像素集合中,获取当前块的至少一个第一相似块,其中,该像素集合包括稀疏的重建像素,该当前块包括至少一个重建像素;基于该至少一个第一相似块,进行滤波。

Description

用于视频处理的方法和设备
题述申请要求于2018年4月2号递交中国专利局,发明名称为“用于视频处理的方法和设备”,申请号为PCT/CN2018/081653的PCT申请的优先权,其全部内容通过引用合并于此。
版权申明
本专利文件披露的内容包含受版权保护的材料。该版权为版权所有人所有。版权所有人不反对任何人复制专利与商标局的官方记录和档案中所存在的该专利文件或者该专利披露。
技术领域
本申请涉及视频处理领域,并且更具体地,涉及一种用于视频处理的方法和设备。
背景技术
在视频编码过程中,对重建像素进行滤波是关键部分。它主要用于减少编码过程中产生的压缩失真。
当前视频编解码的滤波器例如包括均值滤波器(Non-local means filter,NLM),或者基于非局部相似性的环路滤波器(具体可以为基于非局部结构的视频编码滤波器(Non-local Structure-based Filter,NLSF))。
在进行滤波时,需要对当前块进行相似块的搜索,并基于搜索到的相似块进行滤波。其中,在搜索相似块时,需要对搜索窗中的所有像素进行逐点扫描,导致复杂度过高,难以实用。
因此,如何降低滤波过程的复杂度是一项亟待解决的问题。
发明内容
本申请实施例提供一种用于视频处理的方法和设备,可以降低滤波过程的复杂度。
第一方面,提供了一种用于视频处理的方法,包括:在至少一个像素集合中,获取待滤波块的至少一个第一相似块,其中,该像素集合包括稀疏的重建像素,该待滤波块包括至少一个重建像素;基于该至少一个第一相似块, 对该待滤波块进行滤波。
第二方面,提供了一种用于视频处理的方法,包括:从多个候选搜索模板中,确定目标搜索模板;利用所述目标搜索模板,在当前图像的重建像素中,获取待滤波块的至少一个目标相似块;利用所述至少一个目标相似块,对所述待滤波块进行滤波。
第三方面,提供了一种用于视频处理的方法,包括:从重建像素中,获取待滤波块的至少一个相似块,所述待滤波块包括至少一个重建像素,其中,用于表征所述待滤波块与所述相似块的相似度的参量的值超出第一阈值;基于所述至少一个相似块,对所述待滤波块进行滤波。
第四方面,提供了一种用于视频处理的设备,包括获取单元和滤波单元;其中,所述获取单元用于:在至少一个像素集合中,获取待滤波块的至少一个第一相似块,其中,所述像素集合包括稀疏的重建像素,所述待滤波块包括至少一个重建像素;所述滤波单元用于:基于所述至少一个第一相似块,对所述待滤波块进行滤波。
第五方面,提供了一种用于视频处理的设备,包括确定单元、获取单元和滤波单元;其中,所述确定单元用于:从多个候选搜索模板中,确定目标搜索模板;所述获取单元用于:利用所述目标搜索模板,在当前图像的重建像素中,获取待滤波块的至少一个目标相似块;所述滤波单元用于:利用所述至少一个目标相似块,对所述待滤波块进行滤波。
第六方面,提供了一种用于视频处理的设备,包括获取单元和滤波单元;其中,所述获取单元用于:从重建像素中,获取待滤波块的至少一个相似块,所述待滤波块包括至少一个重建像素,其中,用于表征所述待滤波块与所述相似块的相似度的参量的值超出第一阈值;所述滤波单元用于:基于所述至少一个相似块,对所述待滤波块进行滤波。
第七方面,提供了一种计算机***,包括:存储器,用于存储计算机可执行指令;处理器,用于访问该存储器,并执行该计算机可执行指令,以进行上述第一方面或第二方面或第三方面的方法中的操作。
第八方面,提供了一种计算机存储介质,该计算机存储介质中存储有程序代码,该程序代码可以用于指示执行上述第一方面或第二方面或第三方面的方法。
第九方面,提供了一种计算机程序产品,该程序产品包括程序代码,该 程序代码可以用于指示执行上述第一方面或第二方面或第三方面的方法。
因此,本申请实施例中的用于视频处理的方法,在至少一个像素集合中,获取待滤波块的至少一个第一相似块,其中,该像素集合包括稀疏的重建像素,该待滤波块包括至少一个重建像素,基于该至少一个第一相似块,进行滤波,可以在保证最小的编码性能损失的情况下,降低滤波复杂度,从而降低编解码的复杂度,以及节省编解码的时间。
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是根据本申请实施例的编码***的示意性图。
图2是根据本申请实施例的编码框架的示意图。
图3是SVD分解的过程的示意性图。
图4是硬阈值的过程的示意性图。
图5是根据本申请实施例的用于视频处理的方法的示意性流程图。
图6是根据本申请实施例的当前块选取的示意性图。
图7是根据本申请实施例中的搜索模板中的像素分布的示意性图。
图8是根据本申请实施例的搜索模板或像素集合的示意图。
图9是根据本申请实施例的在重建像素中获取相似块的示意性图。
图10是根据本申请实施例的在重建像素中获取相似块的示意性图。
图11是根据本申请实施例的搜索模板的示意性图。
图12是根据本申请实施例的搜索模板的示意性图。
图13是根据本申请实施例的搜索模板的示意性图。
图14是根据本申请实施例的搜索模板的示意性图。
图15是根据本申请实施例的图像块的示意性图。
图16是根据本申请实施例的图像块与周围区域的像素的示意性图。
图17是根据本申请实施例的图像块与周围区域的像素残差的示意性图
图18是根据本申请实施例的用于视频处理的方法示意性图。
图19是根据本申请实施例的用于视频处理的方法示意性图。
图20是根据本申请实施例的用于视频处理的设备的示意性框图。
图21是根据本申请实施例的用于视频处理的设备的示意性框图。
图22是根据本申请实施例的用于视频处理的设备的示意性框图。
图23是根据本申请实施例的计算机***的示意性框图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
除非另有说明,本申请实施例所使用的所有技术和科学术语与本申请的技术领域的技术人员通常理解的含义相同。本申请中所使用的术语只是为了描述具体的实施例的目的,不是旨在限制本申请的范围。
图1是应用本申请实施例的技术方案的架构图。
如图1所示,***100可以接收待处理数据102,对待处理数据102进行处理,产生处理后的数据108。例如,***100可以接收待编码数据,对待编码数据进行编码以产生编码后的数据,或者,***100可以接收待解码数据,对待解码数据进行解码以产生解码后的数据。在一些实施例中,***100中的部件可以由一个或多个处理器实现,该处理器可以是计算设备中的处理器,也可以是移动设备(例如无人机)中的处理器。该处理器可以为任意种类的处理器,本申请实施例对此不做限定。在一些可能的设计中,该处理器可以包括图像信号处理器(Image Signal Processor,ISP)、编码或解码器等。***100中还可以包括一个或多个存储器。该存储器可用于存储指令和数据,例如,实现本申请实施例的技术方案的计算机可执行指令,待处理数据102、处理后的数据108等。该存储器可以为任意种类的存储器,本申请实施例对此也不做限定。
待处理数据102可以包括文本,图像,图形对象,动画序列,音频,视频,或者任何需要编码或解码的其他数据。
任何合适的编码或解码技术都可以用于编码或解码待处理数据102。编码或解码类型依赖于待处理数据和具体的编码或解码需求。
在一些实施例中,编码或解码器可以实现一种或多种不同的编解码器。每种编解码器可以包括实现不同编码或解码算法的代码,指令或计算机程序。基于各种因素,包括待处理数据102的类型和/或来源,待处理数据数据的接收实体,可用的计算资源,网络环境,商业环境,规则和标准等,可以选择一种合适的编码或解码算法编码或解码给定的待处理数据102。
例如,编码或解码器可以被配置为编码或解码一系列视频帧。编码或解码每个帧中的数据可以采用一系列步骤。
图2是根据本申请实施例的一种编码器的框架图。以下将结合图2分别介绍帧间编码和帧内编码的流程。
如图2所示,帧间编码的流程可以如下所示:
在201中,获取当前帧图像。在202中,获取参考帧图像。在203a中,利用参考帧图像,进行运动估计,以得到当前帧图像的各个图像块的运动矢量(Motion Vector,MV)。在204a中,利用运动估计得到的运动矢量,进行运动补偿,以得到当前图像块的估计值。在205中,将当前图像块的估计值与当前图像块相减,得到残差。在206中,对残差进行变换,以得到变换系数。在207中,变换系数经量化可得到量化后的系数。在208中,将量化后的系数进行熵编码,最后将熵编码得到的比特流及进行编码后的编码模式信息进行存储或发送到解码端。在209中,对量化的结果进行反量化。在210中,对反量化结果进行反变换。在211中,利用反变换结果以及运动补偿结果,得到重建像素。在212中,对重建像素进行滤波。在213中,输出滤波后的重建像素。
如图2所示,帧内编码的流程可以如下所示:
在202中,获取当前帧图像。在203b中,对当前帧图像进行帧内预测选择。在204b中,当前帧中的当前图像块进行帧内预测。在205中,将当前图像块的估计值与当前图像块相减,得到残差。在206中,对图像块的残差进行变换,以得到变换系数。在207中,变换系数经量化可得到量化后的系数。在208中,将量化后的系数进行熵编码,最后将熵编码得到的比特流及进行编码后的编码模式信进行存储或发送到解码端。在209中,对量化结果进行反量化。在210中,对反量化结果进行反变换,在211中,利用反变换结果以及帧内预测结果,得到重建像素。
其中,212中的滤波过程可以用于减少编码过程中的压缩失真。
其中,212中的滤波可以由多种方式来实现。本申请实施例中的滤波可以为环路滤波。
以下将介绍两种实现方式,应理解,本申请实施例中的滤波还可以有其他的实现方式,本申请实施例对此不作具体限定。
在一种实现方式中,可以由基于图像非局部相似特性的环路滤波器(Non-local Structure-Based Filter for Video Coding,NLSF)来实现,该滤波器主要利用图像非局部结构相似特性,对搜索得到的相似结构组进行协同滤波。
具体地,可以将当前重建图像帧或图像块按块进行处理。具体可以将图像分为K个块,以这些块分别作为当前块。并在图像帧或图像块的一些重建像素中获取当前块的M个相似块。将M个相似块组成集合。然后将这些相似块组成的集合用数学结构来表示,可以是一维、二维或者三维矩阵,以上过程可以叫做结构数组的构建(Group Construction)。滤波的过程就是对矩阵(结构数组)的处理过程,目的是滤除编码过程中引入的失真和噪声,此过程可以称为基于结构数组的滤波(Group-based filtering)。其中,可以对该结构数组进行奇异值分解(Singular Value Decomposition,SVD),并对奇异值进行硬阈值操作,根据奇异值分解的结果获得重建结构组,最后获取重建图像。其中,SVD分解的目的是将结构数组提取主成分,单纯的SVD并不能起到滤波的作用,滤波的关键在于去除噪声,NLSF中去除噪声的地方采用的是硬阈值的操作。
以下将结合图3和图4进行描述。其中,图3是SVD分解的过程,这可以理解为矩阵的变换,具体地可以将二维矩阵分解为三个矩阵乘积的形式,中间的矩阵是一个对角矩阵,对角线上的元素从左上角到右下角依次减小,可以将较小的元素认为是噪声,其中,“较小”的评价标准可以采用一个阈值,如果阈值为60,那么小于60的部分认为是噪声,直接设置为0。如图4所示,可以再将三个矩阵相乘,得到的矩阵和原始进行分解的矩阵可以不相同,这就是滤除噪声之后的结果,可以将该过程称为硬阈值的过程。
在另一种实现方式中,可以先搜索当前块的相似块,进而可以对相似块做加权平均。
具体地,可以将当前重建图像帧或图像块按块进行处理。具体可以将图像分为K个块,以这些块分别作为当前块。并在图像帧或图像块的一些重建像素中获取当前块的M个相似块。然后,可以为M个相似块中每一个相似块分配一个权重,再计算当前块所有相似块的加权平均,加权平均之后的值可以作为当前块滤波之后的结果,其中,可以采用多种方式来计算权重。
可选地,各个相似块的权重的大小可以与各个相似块与当前块的相似度正相关。也即当前块与相似块越相似,则该相似块的权重越大。其中,此处的相似度可以用欧式距离来衡量。
例如,假设对于当前块p,具有三个相似块q1、q2和q3,如果q1、q2与当前块更加相似,对应的权重就更大,则q3对应的权重就更小。
其中,一个相似块可以具有一个权重,或者,一个相似块中的各个像素点可以分别具有相应的权重。
可选地,可以将相似块作为整体进行滤波,在滤波时,不再进行像素点的拆分,此时一个相似块可以具有一个权重。或者,也可以以像素点为单位进行滤波,结合各个像素点的滤波结果,得到当前块的滤波结果,此时每个相似块中各个像素点可以分别具有一个相似块。
以下将结合式1-3进行说明。
其中,在以下的公式中,i和j可以有两种解释。
在一种解释中,i为当前块中的当前像素点,I为当前像素点在各个相似块中对应的像素点(例如,在相似块中占用相同的位置的相似点,例如,当前块的中心像素点的对应像素点为相似块的中心像素点)的集合,j为集合I中的元素,v(j)表示j的像素值,w(i,j)表示权重。
在另一种解释中,i可以理解为当前块,I为当前块的相似块的集合,j为集合I中的元素,v(j)表示j的像素值(例如,可以是j包括的像素点的像素值的平均值),w(i,j)表示权重。
Figure PCTCN2018089669-appb-000001
其中,NL[v](i)表示当前块或当前像素点对应的滤波结果。
Figure PCTCN2018089669-appb-000002
Figure PCTCN2018089669-appb-000003
其中,式2和式3中,
Figure PCTCN2018089669-appb-000004
可以表示当前块与相似块之间的欧式距离,或者表示当前像素点与相似块中对应的像点之间的欧式距离。
在以上的滤波方式中,滤波过程的复杂度来源于获取当前块的相似块。例如,如果采用全搜索的方式(也可以称为逐点扫描的方式)在正方形搜索窗口搜索当前块的最相似块。搜索过程可以从搜索窗口左上角开始,按照光栅扫描顺序逐像素进行,到右下角终止。搜索过程中搜到的每一个小块都需要和当前块计算误差平方和(Sum of Squared Differences,SSD)。最后将SSD排序,选取最小的M个SSD对应的小块。具体来讲,如果使用全搜索的方式进行相似块搜索,在33x33的搜索窗口中搜索30个最相似块,搜索过程中搜到的候选块的数目为1089。块匹配的部分过于冗余,并且可能导致候选块的数目远远高于滤波需要的相似块数目。
因此,本申请实施例提供了一种视频处理的方法,可以简化滤波过程中相似块获取的复杂度,从而可以提高视频编解码的效率。
应理解,本申请实施例的方法和装置可以应用于图2所示的编码框架,也可以适用于其他的编码框架,本申请实施例对此不作具体限定。例如,只要采用利用相似块进行滤波的编解码框架均可以采用本申请实施例中的方法和装置。
图5是根据本申请实施例的用于视频处理的方法300的示意性流程图。该方法300包括以下内容中的至少部分内容。其中,该方法300可以由应用于编码端,也可以应用于解码端。
可选地,该方法300可以由滤波器实现,该滤波器可以是编码器或解码器的一部分,也可以独立于编码器或解码器存在。可选地,该滤波器可以是NLSF滤波器,或NLM滤波器,或者其他滤波器。
在310中,滤波器在至少一个像素集合中,获取当前块的至少一个第一相似块,其中,该像素集合包括稀疏的重建像素,该当前块包括至少一个重建像素。该当前块为待滤波块。
可选地,本申请实施例中的像素集合包括的重建像素可以是滤波之前的重建像素。
可选地,本申请实施例中提到的相似块(包括第一相似块和后面提到的第二相似块)可以是与当前块相似度较高的块,该相似块的大小可以等于当前块的大小。与当前块的相似度越高,则被选择为相似块的可能性越大。
其中,用于相似度判断的度量参量(也即用于表征相似度的参量)可以为:哈希值的差值、误差平方和(Sum of Squared Differences,SSD)、绝对误差和(Sum of Absolute Differences,SAD)、平均绝对差(Mean Absolute Differences,MAD)、平均误差平方和(Mean Square Differences,MSD)或结构相似性指标(Structural SIMilarity SSIM)。
例如,假设相似度的度量参量为SSD,SSD的计算方式如下式4所示:
Figure PCTCN2018089669-appb-000005
其中,f(h,w)表示当前块在坐标(h,w)的像素,
Figure PCTCN2018089669-appb-000006
表示搜索块(也可以称为候选相似块)在坐标(h,w)的像素,
Figure PCTCN2018089669-appb-000007
表示当前块包含的像素数目。
例如,表征假设相似度的度量参量是哈希值,则可以通过哈希(hash)值的大小来判断相似度,两个块的hash值越接近代表越相似,hash值可以通过块的像素和、水平、垂直梯度等等来表示。
应理解,以上度量参量中,有些值越大,则表明相似度越高,而有些值越小,则表明相似度越高。
例如,对于SSD而言,SSD的值越小,则表明相似度越高。而对于哈希值而言,相似度可以通过两个块的哈希值的差来判断,哈希值的差越小,则表明相似度越高。
还应理解,对于本申请实施例提到的用于表征相似度的参量超过阈值(可以包括阈值本数)而言,如果度量参量的值越大相似度越高,用于表征相似度的参量的值超过一定值代表着该参量的值大于或等于该阈值;如果度量参量的值越小相似度越高,用于表征相似度的参量的值超过一定值代表着该参量的值小于或等于该阈值。而对于哈希值而言,用于表征相似度的参量的值超过一定值代表着两个块的哈希值的差小于或等于该阈值。
可选地,在本申请实施例中,用于表征所述当前块与所述当前块的相似块的相似度的参量的值超出第一阈值。
可选地,该第一阈值是基于以下参数中的至少一种确定的:该当前块的大小,视频的比特深度,该当前块的像素和,该当前块的像素的水平梯度, 该当前块的像素的垂直梯度。
其中,当前块的大小直接决定SSD计算过程中加和的次数,视频的比特深度代表的是像素值的取值范围(比如8bit的视频,每个像素值是0~255之间的数;10bit视频,每个像素值是0~1023之间的数,显然不同的比特深度,像素值范围不同,计算得到的SSD的大小范围也就不同)。
其中,确定阈值的参数可以是与度量参量计算时所采用的参数有关。
在一种实现方式中,在该相似度的度量参量是哈希值时,该第一阈值是基于以下参数中的至少一种确定的:
该当前块的像素和,该当前块的像素的水平梯度,该当前块的像素的垂直梯度。
具体地,可以通过哈希(hash)值的大小来判断相似度,两个块的hash值越接近代表越相似,hash值可以通过块的像素和、水平、垂直梯度等等来表示。
在一种实现方式中,该相似度的度量参量是SSD或SAD时,该第一阈值是基于以下参数中的至少一种确定的:该当前块的大小,视频的比特深度。
其中,第一阈值可以和当前块的大小以及视频的比特深度有关,可以通过以下公式5计算第一阈值:
ε=B s×(1<<(2×bitDepth))×λ      式5
其中bitDepth是测试视频的比特深度,一般是8或10。λ可以根据当前块和相似块之间SSD的统计特性计算得到,
Figure PCTCN2018089669-appb-000008
表示当前块包含的像素数目。
在一种实现方式中,该相似度的度量参量是MAD,MSD或SSIM时,该第一阈值是基于视频的比特深度确定的。
具体地,第一阈值可以是按照以下公式6得到的:
ε=(1<<(2×bitDepth))×λ      式6
因此,在本申请实施例中,选择的相似块与当前块之前的相似度高到超出一定阈值可以使得选择的相似块与当前块的相似度更高,从而可以避免选中的相似块可能和当前块差别较大,从而避免这些块对滤波过程帮助不大所造成的滤波复杂度较高的问题。
可选地,本申请实施例可以由编码端实现,也可以由解码端实现,在由编码端实现时,编码端可以计算第一阈值,并将第一阈值在码流中传递给解码端。以及,在由解码端实现时,解码端可以从码流中获取第一阈值,不再 进行第一阈值的计算。
当然,在本申请实施例中,编码端和解码端可以分别计算第一阈值,则编码端无需在码流中传递该第一阈值。
可选地,本申请实施例可以在获取到整个重建帧之后,从该重建帧中获取当前块。其中,见图6,首先看左上侧的两个框,如果左侧的框为正在处理的当前块,那么下一个即将处理的块就是右侧的框,这两个块之间可以有重叠,可以紧挨着,也可以隔一定的距离,比如对于6x6大小的当前块,两个框之间的步长值(可以是两个框的最左侧的像素的间隔)可以是1,2,3…等等任意整数值,其中步长值为1,2,3,4,5时两个块之间就有一定的重叠,步长值为6时两个块紧挨着,大于6时,两个块隔一定的距离。另外一个就是上下两个块的间隔问题,例如,如图6所示的中间的两个框,如果上侧的框为正在处理的当前块,那么下一个即将处理的块就是下侧的框,这两个块之间可以有重叠,可以紧挨着,也可以隔一定的距离。
可选地,在获取到整帧重建图像进行滤波时,像素集合中的像素可以是当前帧的重建图像中的任意位置的像素,也可以是一个搜索窗口中的部分像素,例如,可以是一个32x32像素集合中的部分像素,其中,当前块可以位于该搜索窗口中的中心位置。
可选地,用于获取该当前块的相似块的重建像素包括:该当前块所属的编码单元本身的重建像素、编码单元的上侧的重建像素、编码单元的左侧的重建像素、编码单元的右侧的重建像素和编码单元的下侧的重建像素。
可选地,在本申请实施例中,也可以在获取到重建后的编码单元(例如,CTU)之后,对该编码单元中的各个块进行滤波,例如,该编码单元可以128x128的块,当前块可以是6x6大小的块,所述的编码单元一般被称为图像块。由于在编码时,在获取到当前编码单元的重建像素时,左侧和上侧的编码单元的重建像素已获取,则用于获取当前块的相似块的重建像素可以是所属的编码单元的左侧的重建像素以及上侧的重建像素。
进一步的,在实际的视频编解码***中,所述的上侧的重建像素需要以图像行为单位进行存储,所述的右侧的重建像素以图像块高度为单位进行存储。如对于一个宽度为3840、图像块高度为128的图像,其所述的上侧的重建像素以3840为单位进行存储,所述的右侧的重建像素以128为单位进行存储。可见所述的上侧的重建像素的存储开销通常大于所述的右侧的重建像 素的存储开销。为了减少视频编解码***的存储开销,所述上侧的重建像素的垂直方向的像素个数(通常来说可以认为是所述上侧的重建像素的行数)可以少于或等于所述左侧的重建像素的水平方向的像素个数(通常来说可以认为是所述左侧的重建像素的列数)。
当然,用于获取当前块的相似块的重建像素也可以为所述当前块所属的编码单元的左侧的重建像素,上侧的重建像素和右侧的重建像素(其中,需要等待右侧的编码单元被重建)。
本申请实施例还可以具有其他的实现方式,例如,对于当前已重建的编码单元,对于该编码单元的左上侧的当前块,用于获取相似块的重建像素可以是当前块的左侧、上侧、下侧和右侧的重建像素,这是由于该当前块的右侧和下侧的重建像素仍然属于当前编码单元。而对于该编码单元的右下侧的当前块,用于获取相似块的重建像素可以是当前块的左侧和上侧的重建像素,这是由于该当前块的右侧和下侧的重建像素属于右侧和下侧的编码单元,而右侧和下侧的编码单元还未重建,所以不能用于获取当前块的相似块。
应理解,本申请实施例的像素集合包括稀疏的重建像素意味着:该像素集合中存在这样的一些像素,这些像素之间间隔(例如,像素之间的最短直线距离上)有不属于该集合的像素。
可选地,在本申请实施例中,像素集合中的部分像素也可以聚集成块,像素集合可以聚集成分离的多个块(此处提到的块与块之间不存在相邻的像素),其中,每个块的大小可以大于或等于当前块的大小。例如,如图7所示(一个□代表一个像素位置),像素集合中包括五个块,每个块大于当前块(假设当前块大小为6x6),其中,该五个块中每个块可以形成为下文提到的一个或一个以上的候选相似块。
可选地,在本申请实施例中,滤波器可以基于搜索模板,获取像素集合。具体地,可以在滤波器中预设搜索模板,利用该搜索模板在一个搜索窗口中圈定一些重建像素,这些重建像素可以理解本申请实施例提到的像素集合。
可选地,在本申请实施例中,搜索模板也可以是理解为一种像素集合,该搜索模板包括的像素可以是相对于搜索模板中心对称的。可选地,从该搜索模板的中心到该搜索模板的边缘,像素可以是越来越稀疏的。
可选地,在用搜索模板确定用于获取相似块的像素集合时,可能会存在这样一种结果,即:像素集合中的像素数量小于搜索模板包括的像素数量, 这是由于用搜索模板在一个搜索范围中圈定一些重建像素时,搜索模板的边缘可能会超出搜索范围的边缘。
可选地,该搜索模板包括用于选择该第一相似块的多个候选相似块,该候选相似块的大小等于该当前块的大小。其中,候选相似块意味着在与当前块的相似度高到超过一定阈值时,可以被选择作为相似块。其中,多个候选相似块包括的像素可以不重叠或部分重叠。
可选地,在本申请实施例中,该搜索模板包括从中心到边缘的多组候选相似块,每组候选相似块围成环形,该环形相对该搜索模板的中心对称,组内的候选相似块均匀排布。当然,该搜索模板包括的候选相似块也可以是不对称的。
可选地,该搜索模板包括四组候选相似块,该四组候选相似块的远离该搜索模板的中心的边缘像素,相对于该搜索模板的中心,分别间隔1个像素,2个像素,4个像素和8个像素。
可选地,该四组候选相似块分别具有4个候选相似块,8个候选相似块,8个候选相似块和8个候选相似块,其中,具有4个候选相似块的一组候选相似块距离该搜索模板的中心最近。
具体地,以下将结合图8所示的搜索模板(图8也可以认为是基于搜索模板得到的像素集合)进行举例说明。例如,如图8所示,图中多个□的交叉点可以是一个像素位置,每个独立的数字代表着一个独立的候选相似块,例如,存在8个⑧,则代表有8个候选相似块,存在8个④,也代表有8个候选相似块,8个②代表有8个候选相似块,4个①代表有4个候选相似块,则整个搜索模板包括28个候选相似块。数字①②④⑧可以分别是候选相似块的一个像素位置,例如,可以是候选相似块的远离搜索模板的中心的边缘上像素位置,具体可以是左上角的像素位置,左下角的像素位置,右上角的像素位置,或右下角的像素位置。当然,图中的数字代表也可以是候选相似块的其它像素位置,例如,可以是中心像素位置等。假设每个候选相似块为大小6x6的块,则意味着这些候选相似块是相互重叠的。
可选地,在本申请实施例中,滤波器可以采用至少两个以上的搜索模板进行像素集合的确定,例如,不同的像素集合可以采用不同的搜索模板进行确定。
应理解,本申请实施例的搜索模板也可以包括其它数量的候选相似块 组,以及每组候选相似块也可以包括其它数量的候选相似块。
例如,搜索模板的像素可以组成十字形,条形,除四边形之外的其他多边形等。其中,在组成除四边形之外的其他多边形时,可以类似于图7是一环套一环的,例如,较大的五边形套较小的五边形。
还应理解,以上介绍的关于搜索模板中的像素特征同样适用于像素集合。为了简洁,在此不再赘述。
应理解,本申请实施例提到的搜索模板或像素集合也可以是包括稀疏的重建像素,按照一定的规则,在该稀疏的重建像素中进行相似块的匹配,此时意味着不存在上述提到的候选相似块的概念。
可选地,在本申请实施例中,滤波器可以基于该当前块包括的重建像素的位置,确定该第一像素集合;从该第一像素集合中,获取该第一相似块。
其中,该第一像素集合中的像素可以是稀疏的重建像素,该第一像素集合中的像素可以相对于该当前块包括的重建像素对称。例如,如图7所示,
Figure PCTCN2018089669-appb-000009
所在像素位置可以是当前块的一个像素位置,例如,可以是当前块的左上角的像素位置或中心的像素位置或右下角的像素位置等。
可选地,可以按照从靠近该当前块到远离该当前块的搜索方式,从该第一像素集合中,获取该第一相似块。
具体地,在如图8所示的像素集合中,可以先对候选相似块①进行相似度的匹配,然后再对候选相似块②进行相似度的匹配,再对候选相似块④进行相似度的匹配,最后对候选相似块⑧进行相似度的匹配。
这是由于在候选相似块中选取相似块的过程中,需要按照相似度对候选相似块进行排序,来得到相似度最高的一定数量的块作为相似块,在越靠近当前块的位置,候选相似块与当前块的相似度可能越高,被选择作为相似块的可能性越大,在该种搜索方式下,在选取相似块时,需要调整位置的候选相似块的数量较少,从而可以降低滤波的复杂度。
可选地,在本申请实施例中,从第一像素集合中获取的第一相似块的数量可以不超过一定数值,例如,第二阈值。
在一种实现方式中,可以获取到第一像素集合中所有搜索块(也可以称为候选相似块)与当前块的相似度,按照相似度从高到低的方式排布,挑出数量为第二阈值的第一相似块。
在另一种实现方式中,在所述第一像素集合中搜索到的期望块的数量达 到第二阈值时,将所述期望块作为所述第一相似块,并停止在所述第一像素集合中进行所述第一相似块的搜索,其中,用于表征所述当前块与所述期望块的相似度的参量的值超出第一阈值。
在另一种实现方式中,在所述第一像素集合的所有像素中,搜索到的期望块的数量大于第二阈值时,按照相似度从高到低的方式,从搜索到的所述期望块中,确定数量等于所述第二阈值的所述第一相似块,其中,用于表征所述当前块与所述期望块的相似度的参量的值超出第一阈值。
可选地,在本申请实施例中,可以根据前次得到的第一相似块包括的重建像素的位置,确定第二像素集合;从该第二像素集合中,再次获取该第一相似块。
其中,该第二像素集合中的像素可以是稀疏的重建像素,该第二像素集合中的像素可以相对于之前确定的第一相似块包括的重建像素对称。
其中,该之前确定的第一相似块可以是从第一像素集合(基于当前块的位置确定的像素集合)中搜索得到的相似块,也可以是基于另一第二像素集合(基于前前次的第一相似块的位置确定的像素集合)中搜索得到的相似块。
也就是说,在本申请实施例中,在基于当前块的位置得到一个像素集合之后,在该像素集合中搜索相似块,然后再基于搜索到的相似块的像素位置,再次确定像素集合,在再次确定的像素集合中搜索相似块,然后可以停止基于像素集合的相似块的搜索,或者也可以基于再次搜索到的相似块确定像素集合,并以此类推。其中,可以将该过程称为基于本申请实施例提到的相似块的N阶搜索过程,N可以为取值大于等于1的整数,N的大小可以根据实际情况而定。
以下将结合图9进行详细说明。如图9所示,在基于当前块
Figure PCTCN2018089669-appb-000010
确定的像素集合中,两个候选相似块⑧(图中圈内是灰底,字是白色的8的数字)被确定为相似块,在该两个候选相似块⑧周围分别确定像素集合(由图中圈内是灰底,字是黑色的数字来表示),然后,在该两个像素集合中分别确定相似块,即,图中圈内是黑底,字是白色的数字来表示的相似块,即,5个相似块。由此,加上之前得到的两个相似块在图9中共示出了7个相似块。
可选地,在本申请实施例中,在该第二像素集合中之前已经进行了相似度匹配的块,不再进行相似块的匹配操作,由此可以节省滤波的复杂度。
或者,在本申请实施例中,在该第二像素集合中不包括已经进行了相似 块匹配操作的块,也就是说,在用搜索模板确定第二像素集合时,某些块已经进行了相似度匹配,则该候选相似块不再被包括在第二像素集合中。
例如,如图9所示,基于右下角被确定为相似块的块⑧确定的候选相似块,仅包括17个候选相似块,而非28个候选相似块,因为,存在一些候选相似块已经进行了相似块匹配。
但应理解,本申请实施例并不限于此。
例如,在该第二像素集合中之前已经被确定为相似块的块,不再进行相似块的匹配操作。也就是说,即使之前已经进行了相似度匹配,但是由于没有被确定为相似块,仍然可以再次进行匹配,例如,可以是由于不同阶搜索过程中,用来判断是否为相似块的阈值可以是不同的。
类似地,在该第二像素集合中不包括已经被确定为相似块的块,也就是说,在用搜索模板确定第二像素集合时,某些块已经被确定为了相似块,则该候选相似块不再被包括在第二像素集合中。
可选地,在本申请实施例中,从一个第二像素集合中获取的相似块的数量可以不超过一定数值,例如,第三阈值。其中,一个第三像素集合可以理解为在一个第一相似块周围用一次搜索模板套住的像素。
在一种实现方式中,可以获取到第二像素集合中所有搜索块与当前块的相似度,按照相似度从高到低的方式排布,挑出数量为第三阈值的第一相似块。
在另一种实现方式中,在所述第二像素集合中搜索到的期望块的数量达到第三阈值时,将所述期望块确定为所述第一相似块,并停止在所述第二像素集合中进行所述第一相似块的搜索,其中,用于表征所述当前块与所述期望块的相似度的参量的值超出第一阈值。
在另一种实现方式中,在所述第二像素集合的所有像素中,搜索到的期望块的数量大于第三阈值时,按照相似度从高到低的方式,从搜索到的所述期望块中,确定数量等于所述第三阈值的所述第一相似块,其中,用于表征所述当前块与所述期望块的相似度的参量的值超出第一阈值。
但应理解,本申请实施例,并限于以上的实现方式,其中,可以是多个像素集合中搜索的相似块不超过第三阈值。例如,该多个像素集合可以理解为以上的N阶搜索过程中的其中一阶搜索过程得到多个相似块对应的多个像素集合。
可选地,在本申请实施例中,第一像素集合和第二像素集合对应的搜索模板可以相同。或者,第一像素集合和第二像素集合对应的搜索模板可以不相同。
可选地,对于不同阶搜索过程中采样的搜索模板可以不相同,当然也可以相同。
其中,可以将不同阶搜索过程中所采用的模板称为子搜索模板,将这些子搜索模板的集合统称为搜索模板。
以上已经介绍了利用稀疏的像素集合确定第一相似块的方案,在本申请实施例中,在获取到第一相似块之后,还可以基于该第一相似块的位置,分别确定像素窗口;在该像素窗口内,获取该第二相似块。
其中,在该像素窗口内,可以按照逐点扫描的方式,确定该第二相似块。
例如,如图10所示,在搜索到的两个相似块⑧(图中圈内是灰底,字是白色的8)周围分别划定一个像素窗口,其中,该像素窗口可以相对于已确定的相似块对称,也可以不对阵。其中,该像素窗口可以是方形的,也可以是其它形状的。
其中,本申请实施例提到的逐点扫描可以是以滑窗的方式实现的,滑窗滑动的步长可以为1,其中,滑窗的大小可以等于当前块的大小。
可选地,在本申请实施例中,在从一个像素窗口中获取的相似块的数量可以不超过一定数值,例如,第四阈值。其中,一个像素窗口可以理解为套住一个第一相似块的像素窗口。
在一种实现方式中,可以获取到像素窗口中所有搜索块与当前块的相似度,按照相似度从高到低的方式排布,挑出数量为第四阈值的第二相似块。
在另一种实现方式中,在所述像素窗口中搜索到的期望块的数量达到第四阈值时,将搜索到的所述期望块确定为所述第二相似块,并停止在所述像素窗口中进行所述第二相似块的搜索,其中,用于表征所述当前块与所述期望块的相似度的参量的值超出第一阈值。
在另一种实现方式中,在所述像素窗口中的所有像素中,搜索到的期望块的数量大于第四阈值时,按照相似度从高到低的方式,从所述期望块中,确定数量等于所述第四阈值的所述第二相似块,其中,用于表征所述当前块与所述期望块的相似度的参量的值超出第一阈值。
但应理解,本申请实施例并限于以上的实现方式,其中,可以是多个像 素窗口中搜索的相似块不超过第四阈值。例如,该多个像素窗口可以理解为以上的全部第一相似块对应的像素窗口。
可选地,在本申请实施中,以上阐述了各个搜索阶段均可能存在阈值,但是本申请实施例并不限于此。
例如,每个搜索阶段不存在用于限定搜索到的相似块的数量的阈值,本申请实施例可以设置一个用于限定总的所有相似块的数量的阈值。
可选地,在搜索到的期望块的数量达到一定数值时,将所述期望块作为所述相似块,并停止所述相似块的搜索,其中,用于表征所述当前块与所述期望块的相似度的参量的值超出第一阈值。
可选地,在用于相似块搜索的全部重建像素中,搜索到的期望块的数量大于一定数值时,按照相似度从高到低的方式,从所述期望块中,确定数量等于该数值的所述相似块,其中,用于表征所述当前块与所述期望块的相似度的参量的值超出第一阈值。
当然,既可以设置限制各个阶段得到相似块的数量的阈值,也可以同时设置一个用于限定总的所有相似块的数量的阈值。
其中,基于像素窗口进行相似块的搜索可以为本申请实施例的多阶相似块搜索的一部分。
可选地,在本申请实施例中,进行多阶相似块的搜索可以是指:利用当前待滤波块,对搜索模板进行固定获取像素集合或像素窗口,并搜索相似块,然后再基于搜索到的相似块,再次进行搜索模板的固定获取像素集合或像素窗口,并搜索相似块,然后可以停止相似块的搜索,或者也可以基于再次搜索到的相似块进行搜索模板的固定,并以此类推。其中,可以将该过程称为基于本申请实施例提到的相似块的多阶搜索过程。
其中,上述提到的像素窗口也可以是基于搜索模板进行获取的。
可选地,在本申请实施例由编码端实现时,编码端可以确定上述各个用于限制相似块数量的阈值,并将这一个或多个阈值进行编码,并传递给解码端。以及,在由解码端实现时,解码端可以从码流中获取该一个或多个阈值。
当然,在本申请实施例中,编码端和解码端可以分别确定上述各个用于限制相似块数量的阈值,则编码端无需在码流中传递这些阈值。
以上所述的像素集合和像素窗口均可以是由搜索模板获取的。在本申请实施例中,可以从多个候选搜索模板中,选择目标搜索模板,也即上述提到 的需要采用的搜索模板。
本申请实施例中的搜索模板可以包括多个子搜索模板。每个子搜索模板均可以用于进行像素集合或像素窗口的确定。
可选地,每个搜索模板包括的子搜索模板不同和/或使用顺序不同。
例如,搜索模板1包括子搜索模板1、子搜索模板2和子搜索模板3,搜索模板2包括子搜索模板1和子搜索模板2,则搜索模板1和搜索模板2不同。
例如,搜索模板1包括子搜索模板1、子搜索模板2和子搜索模板3,搜索模板2包括子搜索模板2、子搜索模板4和子搜索模板5,则搜索模板1和搜索模板2不同。
例如,搜索模板1和搜索模板2均包括子搜索模板1、子搜索模板2和子搜索模板3,但对搜索模板1而言,子搜索模板的使用顺序为子搜索模板1、子搜索模板2和子搜索模板3,而对搜索模板2而言,子搜索模板的使用顺序为子搜索模板2、子搜索模板1和子搜索模板3,则搜索模板1和搜索模板2不同。
还应理解,在搜索模板包括多个子搜索模板的情况下,本申请实施例中的搜索模板可以理解为搜索模板集合,其包括多个搜索模板。
可选地,在本申请实施例中,可以在滤波器中预设多个候选搜索模板,具体地,可以预设每个搜索模板中重建像素的数量和排列方式等。
其中,滤波器可以从存储器中得到分别预设的该多个候选搜索模板,也即,滤波器无需获知该多个候选搜索模板之间的变形规律。
或者,在本申请实施例中,滤波器也可以从存储器中得到一个候选搜索模板,然后可以按照一定规律变形得到其他的搜索模板。
例如,可以将该得到的候选搜索模板在某一个或多个方向上增加或减少一列或多列像素。
可选地,在本申请实施例中,确定的目标搜索模板可以包括一个搜索模板,或多个搜索模板,而每个搜索模板也可以包括一个或多个子搜索模板。
可选地,在本申请实施例中,滤波器可以基于目标图像块中的至少一个待滤波块,从该多个候选搜索模板的至少部分候选搜索模板中,确定第一搜索模板;其中,该目标搜索模板包括该第一搜索模板,该第一搜索模板用于该至少一个待滤波块获取相似块。
具体地说,滤波器可以以图像块为单位确定目标搜索模板,并可以将确定的目标搜索模板用于进行该图像块包括的待滤波块的滤波。
其中,该图像块可以包括一个待滤波块或多个待滤波块。该图像块可以是重建后的图像块。
例如,该图像块可以是重建后的一帧图像或者也可以是重建后的一个CTU。
其中,滤波器可以基于该图像块包括的至少一个待滤波块,从至少部分候选搜索模板中,确定目标搜索模板。
以下将结合两种实现方式介绍滤波器如何基于该图像块包括的至少一个待滤波块来确定目标搜索模板,应理解,该两种实现方式并非是独立的,其可以相互结合使用或者结合其他方式来实现。
其中,在下文中,为了描述的方便,可以将第一种实现方式称之为基于遍历的方式获取目标搜索模板,将第二种实现方式称为为基于图像内容的方式获取搜索模板。
在第一种实现方式中,滤波器可以针对该至少一个待滤波块,遍历该至少部分候选搜索模板中的各个候选搜索模板;根据遍历结果,从该至少部分候选搜索模板中,确定该第一搜索模板。
具体地,滤波器可以利用各个候选搜索模板,针对各个待滤波块进行相似块的获取,根据相似块的获取结果(也即上述提到的遍历结果),来确定目标搜索模板。也就是说,可以根据相似块的获取结果,选取较优的候选搜索模板作为目标搜索模板。
可选地,该遍历结果可以包括:
针对该至少一个待滤波块中全部滤波块,得到的相似块的相似度、相似块的总数量和获取相似块所需搜索的总块数中的至少一个;和/或,
针对该至少一个待滤波块中各个滤波块,分别得到的相似块的相似度、相似块的数量和获取相似块所需搜索的块数中的至少一个。
其中,在遍历结果包括针对该至少一个待滤波块中全部待滤波块,得到的相似块的总数量的情况下,在计算该得到的相似块的总数量时,在搜索到一个相似块时,可以在得到相似块的数量上加1,而不区分是基于哪个待滤波块得到的,或者,也可以分别确定基于各个待滤波块得到相似块的数量,并对各个待滤波块得到的相似块的数量进行加和处理。
同样,在遍历结果包括针对该至少一个待滤波块中全部待滤波块,获取相似块所需搜索的总块数的情况下,在统计所需搜索的总块数时,在进行了(或者是将要进行或正在进行)一个块的搜索时,可以在统计的块的数量上加1,而不区分是基于哪个待滤波块进行相似块搜索的,或者,也可以分别统计基于各个待滤波块进行相似块搜索时所需搜索的块数,并进行加和处理。
可选地,该第一搜索模板可以是该至少部分候选搜索模板中满足以下条件的搜索模板:
得到该至少一个待滤波块中全部待滤波块的相似块的过程中,搜索的总块数最少或小于等于第一阈值;和/或,
针对该至少一个待滤波块中全部待滤波块,得到的相似块的总数量最多和/或大于或等于第二阈值;和/或,
针对该至少一个待滤波块中全部待滤波块,得到的相似块的相似度的平均值最高和/或超出第三阈值。
可选地,滤波器可以确定各个待滤波块的优选搜索模板;根据该各个待滤波块的优选搜索模板,确定该第一搜索模板。
具体地,滤波器可以根据各个候选搜索模板,针对各个滤波块的搜索结果,确定每个待滤波块的优选搜索模板,并基于各个候选搜索模板被确定为优选搜索模板的次数,来确定该第一搜索模板。
可选地,将该第一搜索模板作为优选搜索模板的待滤波块的数量最多和/或大于或等于第四阈值。
正如上文所述,一个搜索模板可以包括多个子搜索模板,在该种情况下,在利用每个搜索模板,来确定针对全部滤波块或各个滤波块获取相似块过程中得到的相似块的相似度、相似块的总数量和获取相似块所需搜索的总块数时,可以是利用该多个子搜索模板,来确定针对全部滤波块或各个滤波块获取相似块过程中得到的相似块的相似度、相似块的总数量和获取相似块所需搜索的总块数。其中,该多个子搜索模板可以用于进行多阶相似块的搜索,上一阶得到的相似块用于下一阶子搜索模板的固定。
在第二种实现方式中,根据目标图像块包括的该至少一个待滤波块的图像内容,从该至少部分候选搜索模板中,确定该第一搜索模板。
例如,假设存在如图11-14所示的4个搜索模板,其中,在图11-图14 所示的模板中,多个□的交叉点可以是一个像素位置,每个灰色填充原圈可以代表一个待搜索块(可以称为候选相似块)的一个像素点,例如左上角的像素点或中心像素点等,
Figure PCTCN2018089669-appb-000011
代表当前待滤波块的一个像素点,例如左上角的像素点或中心像素点等。
图15示出了一帧图像中四个图像块,从图15中各个图像块可以看出,图15中的图像块A可以采用图14所示的搜索模板,图像块B可以采用图11所示的搜索模板,图像块C可以采用图13所示的搜索模板,图像块D可以采用图12所示的搜索模板。
也就是说,对于边界比较明显的区域,可以顺着边界的方向进行搜索,而对于无明显边界特性的区域,则可以采用遍历的方式进行搜索。
可选地,该至少一个待滤波块的图像内容可以包括:该目标图像块的图像边缘信息。
可选地,该目标图像块的边缘信息可以包括该图像块的边缘的梯度方向和/或该目标图像块周围像素与该目标图像块的像素残差。
具体地,滤波器可以根据该至少一个待滤波块的边缘的梯度方向(可以进一步结合梯度大小)和/或该目标图像块周围像素与该目标图像块的像素残差,以及该至少部分候选搜索模板的像素的排布方向(例如,倾斜方向),从该至少部分候选搜索模板中,确定该第一搜索模板。
其中,在边缘的计算梯度大小和方向时,可以采用多种计算方式进行计算,例如可以采用Sobel算子、Robinson算子或Laplace算子等进行计算。
以下结合式7-10介绍sobel算子的实现方式,应理解,本申请实施例并不限于此。
Figure PCTCN2018089669-appb-000012
Figure PCTCN2018089669-appb-000013
Figure PCTCN2018089669-appb-000014
Figure PCTCN2018089669-appb-000015
其中,A可以代表目标图像块的像素矩阵,Gx和Gy代表经过横向以及 纵向边缘检测的图像。G代表梯度大小,Θ代表梯度方向。
可选地,可以基于目标图像块包括的各个待滤波块的边缘的梯度方向,来选择各个待滤波块的优选搜索模板,并基于此,选择对目标图像块进行相似块搜索的目标搜索模板。
或者,可以基于整个目标图像块(无需进行待滤波块的拆分)的边缘的梯度方向,直接从候选搜索模板中,选择目标搜索模板。
可选地,该目标图像块周围像素与该目标图像块的像素残差的计算方式可以是:该目标图像块或包括的各个待滤波块和搜索块对应位置像素值之差绝对值再求和(即曼哈顿距离),或者像素值之差平方再求和(即欧氏距离)。
其中,在计算像素残差时,可以在目标图像块的周围区域(可以包括该目标图像块本身)进行全搜索(也即逐点扫描)的方式来计算像素残差。
其中,如果目标图像块包括一个待滤波块,则可以在该一个待滤波块的周围区域(可以包括该目标图像块的全部或部分区域)进行全搜索,计算搜索块相应的点与该一个待滤波块相应点(在所属的块中,具有相同的位置,例如,均位于所属块的中间,左上角,左下角等)的残差。
如果目标图像块包括多个待滤波块,则可以将该目标图像块作为一个块,在该一个块的周围区域(可以包括该目标图像块的全部或部分区域)进行全搜索,计算搜索块相应的点与该一个块相应点的残差。
或者,如果目标图像块包括多个待滤波块,针对单个滤波块,在该目标图像块的周围区域(可以包括该目标图像块的全部或部分区域)进行全搜索,计算搜索块相应的点与单个滤波块的相应的点的残差。
当然,如果目标图像块包括多个待滤波块,针对单个滤波块,也可以在该单个待滤波块的周围区域(可以包括该单个待滤波块的全部或部分区域)进行全搜索,计算搜索块相应的点与单个滤波块的相应的点的残差。
应理解,以上介绍了可以利用对周围区域进行全搜索的方式计算目标图像块与周围区域的像素残差,但是本申请实施例并不限于此,也可以隔点扫描的方式来计算像素残差。
其中,在针对单个待滤波块分别计算其与周围像素的像素残差时,可以计算各个待滤波块的优选搜索模板,并可以基于此,选择该目标图像块的目标搜索模板。
以下结合采用曼哈顿距离进行残差的计算来举例说明。
如图16所示每个小方框代表一个像素位置,方框中的数字代表该位置处的像素值,其中,像素值下带下划线的为当前块(2x2的块)的像素值,可以对当前块的周围区域进行全搜索(整个区域进行逐点扫描的方式),计算残差。
残差计算结果可以如图17所示,其中,在图17中,每个小方框代表搜索的一个块的残差,总共搜索了16个块,从图17中可以看出最小的残差是45度角方向分布,这种情况下可以采用图11所示的搜索模板。
可选地,也可以依据目标图像块的内容选择一组搜索模板(也即第一搜索模板包括多个子搜索模板)。
例如,将包括的多个子搜索模板的倾斜方向均于目标图像块的边缘的梯度方向一致或基本一致的候选搜索模板作为第一搜索模板。
可选地,在本申请实施例中,以上确定的第一搜索模板可以用来确定相似块。
可选地,在本申请实施例中,从该多个候选搜索模板中除用于确定第一搜索模板之外的候选搜索模板中,根据该第一搜索模板,确定第二搜索模板。
具体地,在从部分候选搜索模板中,按照上述提到的方法确定出第一搜索模板之后,可以从剩下的部分候选搜索模板中,依据确定的第一搜索模板,确定第二搜索模板,由第一搜索模板和第二搜索模板来共同确定相似块。
例如,假设存在9个搜索模板,其中,搜索模板1、搜索模板2和搜索模板3组成搜索模板组A,搜索模板4、搜索模板5和搜索模板6组成搜索模板组B,以及搜索模板7、搜索模板8和搜索模板9组成搜索模板组C,在进行相似块的搜索时,需要利用一组搜索模板进行搜索;可以依据上述提到的遍历的方式和按照目标图像块的内容的方式,选择一个搜索模板,具体地,可以从候选搜索模板1、候选搜索模板4和候选搜索模板7中挑择一个目标搜索模板,例如,假设选择的为目标搜索模板为搜索模板4,则由于搜索模板5和6与搜索模板4属于同一搜索模板组,则可以将该搜索模板5和6作为目标搜索模板,也即可以利用搜索模板4、搜索模板5和搜索模板6来进行相似块的搜索。
当然,在本申请实施例中,得到目标搜索模板可以仅包括第一搜索模板,而不存在第二搜索模板。其中,第一搜索模板与第二搜索模板的区别在于获取的方式不同。
例如,同样假设存在9个搜索模板,其中,搜索模板1、搜索模板2和搜索模板3组成搜索模板组A,搜索模板4、搜索模板5和搜索模板6组成搜索模板组B,以及搜索模板7、搜索模板8和搜索模板9组成搜索模板组C,在进行相似块的搜索时,需要利用一组搜索模板进行搜索;可以依据上述提到的遍历的方式和按照目标图像块的内容的方式,直接选择一组搜索模板。
上述提到的第一搜索模板可以包多个子搜索模板,其中,如果将上述例子中的一个搜索模板组称为一个搜索模板的话,则其中的各个搜索模板可以称为子搜索模板。
可选地,上述提到的第二搜索模板也可以包括一个或多个子搜索模板。
可选地,在一个目标搜索模板包括L个子搜索模板时,利用该L个子搜索模板,进行L阶目标相似块的搜索,其中,第j阶目标相似块搜索得到的目标相似块用于进行第j+1阶目标相似块的搜索过程中的子搜索模板的固定,其中,j取值从1到L,L为大于或等于1的整数。
当然,利用该L个子搜索模板,也可以进行非L阶目标相似块的搜索。
例如,同一子搜索模板,可以进行多阶目标相似块的搜索。
可选地,如果存在N目标搜索模板,则可以利用该N个搜索模板,进行M阶目标相似块的搜索,其中,第i阶目标相似块搜索得到的目标相似块用于进行第i+1阶目标相似块的搜索过程中的子搜索模板或目标搜索模板的固定,其中,i取值从1到M,M大于或等于N,N与M为大于或等于1的整数。
其中,在存在N个目标搜索模板,而目标搜索模板均未包括子搜索模板(也可以理解为包括一个子搜索模板)的情况下,则可以进行M(M等于N)阶相似块的搜索,其中,第i阶目标相似块搜索得到的目标相似块用于进行第i+1阶目标相似块的搜索过程中的搜索模板的固定。
当然,此时,利用该N个目标搜索模板,也可以进行非N阶目标相似块的搜索。
例如,同一目标搜索模板,可以进行多阶目标相似块的搜索。
或者,在存在N个目标搜索模板,而目标搜索模板中包括多个子搜索模板的情况下,则可以进行M(M大于N)阶相似块的搜索,其中,第i阶目标相似块搜索得到的目标相似块用于进行第i+1阶目标相似块的搜索过程中 的子搜索模板的固定。
可选地,在本申请实施例中,该方法可以用于编码端。
其中,在该方法用于编码端时,可以对该目标搜索模板的编号进行编码,其中,可以将用到的目标搜索模板的编号写入到码流中,从而解码端可以在从码流中获取目标搜索模板的编号时,按照该编号,确定目标搜索模板,从而可以基于该编号,确定目标搜索模板,以对相应的待滤波块进行滤波。
应理解,在本申请实施例中,编码端在获取到目标搜索模板,并利用目标搜索模板对待滤波块进行滤波时,也可以不将编号写入到码流中,解码端可以依据编码端相同的方法来获取目标搜索模板,例如,以上提到的遍历的方式或者按照目标图像块的内容进行目标搜索模板的选取。
在320中,滤波器基于该至少一个第一相似块,进行滤波。
在一种实现方式中,可以基于该至少一个第一相似块,构建结构数组;对该结构数组进行分解;根据分解的结构数组,获得重建结构数组。
可选地,在本申请实施中,如果确定了上述第二相似块,则可以基于该第一相似块和第二相似块,构建结构数组。
可选地,构建的结构数组可以是一维、二维或者三维矩阵。
其中,可以对该结构数组进行奇异值分解(Singular Value Decomposition,SVD),并对奇异值进行硬阈值操作,根据奇异值分解的结果获得重建结构组,最后获取重建图像。其中,SVD分解的目的是将结构数组提取主成分,单纯的SVD并不能起到滤波的作用,滤波的关键在于去除噪声,NLSF中去除噪声的地方采用的是硬阈值的操作。
可选地,在本申请实施例中,除了采用SVD的滤波方式,还可以利用离散余弦变换(Discrete Cosine Transform,DCT)变换、哈达玛变换、KLT(Karhunen-Loève Transform)、依赖信号转换(Signal Dependent Transform,SDT)、小波变换等等滤波方式。
在另一种实现方式中,基于所述至少一个第一相似块的像素值的加权平均结果对所述待滤波块进行滤波。
可选地,在本申请实施中,如果确定了上述第二相似块,则可以基于该第一相似块和第二相似块的像素值,进行加权平均。
可选地,本申请实施例的滤波方式可以与其他的滤波方式结合使用。具体地,可以在本申请实施例的滤波之后执行其他方式的滤波,或者,在其他 方式的滤波之后执行根据本申请实施例的滤波方式。
其他的滤波技术可以包括双边滤波、去块滤波、自适应样值补偿滤波和自适应环路滤波。其中,
双边滤波是当前像素由它自身和相邻四个点像素值的加权平均来计算,实现保边去噪。去块滤波用于预测单元和变换单元的边界,利用训练得到的低通滤波器进行边界像素的非线性加权,从而减少块效应。自适应样值补偿滤波通过对图像块内像素进行分类,进而为每类像素加上相同补偿值的方式使得重构图像更接近原始图像,从而起到抑制振铃效应的作用。自适应环路滤波是一种维纳滤波器,主要用于最小化原始图像和重构图像之间的均方误差。
以下表1示出了现有技术与本申请的需要搜索的点数(搜索点数相当于相似度匹配操作次数,一个搜索点等于一次相似度匹配)的比照图。其中,在为当前块设置的用于搜索相似块的搜索窗口为33x33的情况下,现有技术在进行相似块搜索时平均每个当前块需要搜索1072个点。使用本申请中的如图8所示的搜索搜索模板,在第一次搜索时,最多需要搜索28个点,几次迭代后,MarketPlace、BQTTerrace、BasketballDrive、RitualDance、Cactus五个序列序列平均需要搜索291个点,本发明使得搜索点数节省了72.9%。其中,五个序列MarketPlace、BQTTerrace、BasketballDrive、RitualDance、Cactus分别可以减少74.6%、70.3%、71.5%、75.2%、72.9%的搜索点数。
表1
Figure PCTCN2018089669-appb-000016
因此,本申请实施例中的用于视频处理的方法,在至少一个像素集合中,获取当前块的至少一个第一相似块,该像素集合包括稀疏的重建像素,从而可以在过滤过程中降低相似块获取的复杂度,可以在保证最小的编码性能损 失的情况下,降低滤波复杂度,从而降低编解码的复杂度,以及节省编解码的时间。
图18是根据本申请实施例的用于视频处理的方法400的示意性流程图。该方法400包括以下内容中的至少部分内容。其中,该方法400可以应用于编码端,也可以应用于解码端。
可选地,该方法400可以由滤波器实现,该滤波器可以是编码器或解码器的一部分,也可以独立于编码器或解码器存在。可选地,该滤波器可以是NLSF滤波器,或NLM滤波器,或者其他滤波器。
在410中,滤波器从多个候选搜索模板中,确定目标搜索模板。
可选地,本申请实施例中的搜索模板用于在重建的图像或图像块中圈住一些重建像素,滤波器可以从这些重建像素中搜索相似块。搜索模板的形状与圈住的用于搜索相似块的重建像素的排布形状是一样的。
其中,搜索模板包括的像素可以理解为将该搜索模板固定在重建图像或图像块所圈住的像素。
本申请实施例对方法400提到的搜索模板的形状(可用理解为像素排布和像素数量等)不作具体的现定。
例如,方法400中的搜索模板可以包括稀疏的重建像素,其中,搜索模板包括稀疏的重建像素意味着:该搜索模板中存在这样的一些像素,这些像素之间间隔(例如,像素之间的最短直线距离上)有不属于该集合的像素,例如,可以如图7和图8所示的搜索模板。
或者,方法400中的搜索模板也可以包括非稀疏的重建像素,例如,如图10所示的搜索模板,但是包括非稀疏的重建像素的搜索模板还可以具有其他的形状,例如,可以是长方形搜索模板、菱形搜索模板和圆形搜索模板等。
本申请实施例中的搜索模板可以包括多个子搜索模板,每个搜索模板包括的子搜索模板不同和/或使用顺序不同。
例如,搜索模板1包括子搜索模板1、子搜索模板2和子搜索模板3,搜索模板2包括子搜索模板1和子搜索模板2,则搜索模板1和搜索模板2不同。
例如,搜索模板1包括子搜索模板1、子搜索模板2和子搜索模板3,搜索模板2包括子搜索模板2、子搜索模板4和子搜索模板5,则搜索模板1 和搜索模板2不同。
例如,搜索模板1和搜索模板2均包括子搜索模板1、子搜索模板2和子搜索模板3,但对搜索模板1而言,子搜索模板的使用顺序为子搜索模板1、子搜索模板2和子搜索模板3,而对搜索模板2而言,子搜索模板的使用顺序为子搜索模板2、子搜索模板1和子搜索模板3,则搜索模板1和搜索模板2不同。
应理解,在本申请实施例中,子搜索模板也可以包括稀疏的重建像素或非稀疏的重建像素。
还应理解,在搜索模板包括多个子搜索模板的情况下,本申请实施例中的搜索模板可以理解为搜索模板集合,其包括多个搜索模板。
可选地,在本申请实施例中,可以在滤波器中预设多个候选搜索模板,具体地,可以预设每个搜索模板中重建像素的数量和排列方式等。
其中,滤波器可以从存储器中得到分别预设的该多个候选搜索模板,也即,滤波器无需获知该多个候选搜索模板之间的变形规律。
或者,在本申请实施例中,滤波器也可以从存储器中得到一个候选搜索模板,然后可以按照一定规律变形得到其他的搜索模板。
例如,可以将该得到的候选搜索模板在某一个或多个方向上增加或减少一列或多列像素。
可选地,在本申请实施例中,确定的目标搜索模板可以包括一个搜索模板,或多个搜索模板,而每个搜索模板也可以包括一个或多个子搜索模板。
可选地,在本申请实施例中,滤波器可以基于目标图像块中的至少一个待滤波块,从该多个候选搜索模板的至少部分候选搜索模板中,确定第一搜索模板;其中,该目标搜索模板包括该第一搜索模板,该第一搜索模板用于该至少一个待滤波块获取目标相似块。
具体地说,滤波器可以以图像块为单位确定目标搜索模板,并可以将确定的目标搜索模板用于进行该图像块包括的待滤波块的滤波。
其中,该图像块可以包括一个待滤波块或多个待滤波块。该图像块可以是重建后的图像块。
例如,该图像块可以是重建后的一帧图像或者也可以是重建后的一个CTU。
其中,滤波器可以基于该图像块包括的至少一个待滤波块,从至少部分 候选搜索模板中,确定目标搜索模板。
以下将结合两种实现方式介绍滤波器如何基于该图像块包括的至少一个待滤波块来确定目标搜索模板,应理解,该两种实现方式并非是独立的,其可以相互结合使用或者结合其他方式来实现。
其中,在下文中,为了描述的方便,可以将第一种实现方式称之为基于遍历的方式获取目标搜索模板,将第二种实现方式称为为基于图像内容的方式获取搜索模板。
在第一种实现方式中,滤波器可以针对该至少一个待滤波块,遍历该至少部分候选搜索模板中的各个候选搜索模板;根据遍历结果,从该至少部分候选搜索模板中,确定该第一搜索模板。
具体地,滤波器可以利用各个候选搜索模板,针对各个待滤波块进行相似块的获取,根据相似块的获取结果(也即上述提到的遍历结果),来确定目标搜索模板。也就是说,可以根据相似块的获取结果,选取较优的候选搜索模板作为目标搜索模板。
可选地,该遍历结果可以包括:
针对该至少一个待滤波块中全部滤波块,得到的相似块的相似度、相似块的总数量和获取相似块所需搜索的总块数中的至少一个;和/或,
针对该至少一个待滤波块中各个滤波块,分别得到的相似块的相似度、相似块的数量和获取相似块所需搜索的块数中的至少一个。
其中,在遍历结果包括针对该至少一个待滤波块中全部待滤波块,得到的相似块的总数量的情况下,在计算该得到的相似块的总数量时,在搜索到一个相似块时,可以在得到相似块的数量上加1,而不区分是基于哪个待滤波块得到的,或者,也可以分别确定基于各个待滤波块得到相似块的数量,并对各个相似块得到的滤波块的数量进行加和处理。
同样,在遍历结果包括针对该至少一个待滤波块中全部待滤波块,获取相似块所需搜索的总块数的情况下,在统计所需搜索的总块数时,在进行了(或者是将要进行或正在进行)一个块的搜索时,可以在统计的块的数量上加1,而不区分是基于哪个待滤波块进行相似块搜索的,或者,也可以分别统计基于各个待滤波块进行相似块搜索时所需搜索的块数,并进行加和处理。
可选地,该第一搜索模板可以是该至少部分候选搜索模板中满足以下条 件的搜索模板:
得到该至少一个待滤波块中全部待滤波块的相似块的过程中,搜索的总块数最少或小于等于第一阈值;和/或,
针对该至少一个待滤波块中全部待滤波块,得到的相似块的总数量最多和/或大于或等于第二阈值;和/或,
针对该至少一个待滤波块中全部待滤波块,得到的相似块的相似度的平均值最高和/或超出第三阈值。
可选地,滤波器可以确定各个待滤波块的优选搜索模板;根据该各个待滤波块的优选搜索模板,确定该第一搜索模板。
具体地,滤波器可以根据各个候选搜索模板,针对各个滤波块的搜索结果,确定每个待滤波块的优选搜索模板,并基于各个候选搜索模板被确定为优选搜索模板的次数,来确定该第一搜索模板。
可选地,将该第一搜索模板作为优选搜索模板的待滤波块的数量最多和/或大于或等于第四阈值。
正如上文所述,一个搜索模板可以包括多个子搜索模板,在该种情况下,在利用每个搜索模板,来确定针对全部滤波块或各个滤波块获取相似块过程中得到的相似块的相似度、相似块的总数量和获取相似块所需搜索的总块数时,可以是利用该多个子搜索模板,来确定针对全部滤波块或各个滤波块获取相似块过程中得到的相似块的相似度、相似块的总数量和获取相似块所需搜索的总块数。其中,该多个子搜索模板可以进行多阶相似块的搜索,上一阶得到的相似块用于下一阶子搜索模板的固定。
在第二种实现方式中,根据目标图像块包括的该至少一个待滤波块的图像内容,从该至少部分候选搜索模板中,确定该第一搜索模板。
例如,假设存在如图11-14所示的4个搜索模板,图15示出了一帧图像中四个图像块,从图15中各个图像块可以看出,图15中的图像块A可以采用图14所示的搜索模板,图像块B可以采用图11所示的搜索模板,图像块C可以采用图13所示的搜索模板,图像块D可以采用图12所示的搜索模板。
也就是说,对于边界比较明显的区域,可以顺着边界的方向进行搜索,而对于无明显边界特性的区域,则可以采用遍历的方式进行搜索。
可选地,该至少一个待滤波块的图像内容可以包括:该目标图像块的图像边缘信息。
可选地,该目标图像块的边缘信息可以包括该图像块的边缘的梯度方向和/或该目标图像块周围像素与该目标图像块的像素残差。
具体地,滤波器可以根据该至少一个待滤波块的边缘的梯度方向(可以进一步结合梯度大小)和/或该目标图像块周围像素与该目标图像块的像素残差,以及该至少部分候选搜索模板的像素的排布方向(例如,倾斜方向),从该至少部分候选搜索模板中,确定该第一搜索模板。
其中,在边缘的计算梯度大小和方向时,可以多种计算方式进行计算,例如可以采用Sobel算子、Robinson算子或Laplace算子等进行计算。
sobel算子的实现可以结合上述方法300中的描述。
可选地,可以基于目标图像块包括的各个待滤波块的边缘的梯度方向,来选择各个待滤波块的优选搜索模板,并基于此,选择对目标图像块进行相似块搜索的目标搜索模板。
或者,可以基于整个目标图像块(无需进行待滤波块的拆分)的边缘的梯度方向,直接从候选搜索模板中,选择目标搜索模板。
可选地,该目标图像块周围像素与该目标图像块的像素残差的计算方式可以是:该目标图像块或包括的各个待滤波块和搜索块对应位置像素值之差绝对值再求和(即曼哈顿距离),或者像素值之差平方再求和(即欧氏距离)。
其中,在计算像素残差时,可以在目标图像块的周围区域(可以包括该目标图像块本身)进行全搜索(也即逐点扫描)的方式来计算像素残差。
其中,如果目标图像块包括一个待滤波块,则可以在该一个待滤波块的周围区域(可以包括该目标图像块的全部或部分区域)进行全搜索,计算搜索块相应的点与该一个待滤波块相应点(在所属的块中,具有相同的位置,例如,均位于所属块的中间,左上角,左下角等)的残差。
如果目标图像块包括多个待滤波块,则可以将该目标图像块作为一个块,在该一个块的周围区域(可以包括该目标图像块的全部或部分区域)进行全搜索,计算搜索块相应的点与该一个块相应点的残差。
或者,如果目标图像块包括多个待滤波块,针对单个滤波块,在该目标图像块的周围区域(可以包括该目标图像块的全部或部分区域)进行全搜索,计算搜索块相应的点与单个滤波块的相应的点的残差。
当然,如果目标图像块包括多个待滤波块,针对单个滤波块,也可以在该单个待滤波块的周围区域(可以包括该单个待滤波块的全部或部分区域) 进行全搜索,计算搜索块相应的点与单个滤波块的相应的点的残差。
应理解,以上介绍了可以利用对周围区域进行全搜索的方式计算目标图像块与周围区域的像素残差,但是本申请实施例并不限于此,也可以隔点扫描的方式来计算像素残差。
其中,在针对单个待滤波块分别计算其与周围像素的像素残差时,可以计算各个待滤波块的优选搜索模板,并可以基于此,选择该目标图像块的目标搜索模板。
以下结合采用曼哈顿距离进行残差的计算来举例说明。
如图16所示每个小方框代表一个像素位置,方框中的数字代表该位置处的像素值,其中,像素值下带下划线的为当前块的像素值,可以对当前块的周围区域进行全搜索(整个区域进行逐点扫描的方式),计算残差。
残差计算结果可以如图17所示,其中,在图17中,每个小方框代表搜索的一个块的残差,总共搜索了16个块,从图17中可以看出最小的残差是45度角方向分布,这种情况下可以采用图13所示的搜索模板。
可选地,也可以依据目标图像块的内容选择一组搜索模板(也即第一搜索模板包括多个子搜索模板)。
例如,将包括的多个子搜索模板的倾斜方向均于目标图像块的边缘的梯度方向一致或基本一致的候选搜索模板作为第一搜索模板。
可选地,在本申请实施例中,以上确定的第一搜索模板可以用来确定相似块。
可选地,在本申请实施例中,从该多个候选搜索模板中除用于确定第一搜索模板之外的候选搜索模板中,根据该第一搜索模板,确定第二搜索模板。
具体地,在从部分候选搜索模板中,按照上述提到的方法确定出第一搜索模板之后,可以从剩下的部分候选搜索模板中,依据确定的第一搜索模板,确定第二搜索模板,由第一搜索模板和第二搜索模板来共同确定相似块。
例如,假设存在9个搜索模板,其中,搜索模板1、搜索模板2和搜索模板3组成搜索模板组A,搜索模板4、搜索模板5和搜索模板6组成搜索模板组B,以及搜索模板7、搜索模板8和搜索模板9组成搜索模板组C,在进行相似块的搜索时,需要利用一组搜索模板进行搜索;可以依据上述提到的遍历的方式和按照目标图像块的内容的方式,选择一个搜索模板,具体地,可以从候选搜索模板1、候选搜索模板4和候选搜索模板7中挑择一个 目标搜索模板,例如,假设选择的为目标搜索模板为搜索模板4,则由于搜索模板5和6与搜索模板4属于同一搜索模板组,则可以将该搜索模板5和6作为目标搜索模板,也即可以利用搜索模板4、搜索模板5和搜索模板6来进行相似块的搜索。
当然,在本申请实施例中,得到目标搜索模板可以仅包括第一搜索模板,而不存在第二搜索模板。
例如,同样假设存在9个搜索模板,其中,搜索模板1、搜索模板2和搜索模板3组成搜索模板组A,搜索模板4、搜索模板5和搜索模板6组成搜索模板组B,以及搜索模板7、搜索模板8和搜索模板9组成搜索模板组C,在进行相似块的搜索时,需要利用一组搜索模板进行搜索;可以依据上述提到的遍历的方式和按照目标图像块的内容的方式,直接选择一组搜索模板。
上述提到的第一搜索模板可以包多个子搜索模板,其中,如果将上述例子中的一个搜索模板组称为一个搜索模板的话,则其中的各个搜索模板可以称为子搜索模板。
可选地,上述提到的第二搜索模板也可以包括一个或多个子搜索模板。
在420中,利用该目标搜索模板,在当前图像的重建像素中,滤波器获取待滤波块的至少一个目标相似块。
可选地,在一个目标搜索模板包括L个子搜索模板时,利用该L个子搜索模板,进行L阶目标相似块的搜索,其中,第j阶目标相似块搜索得到的目标相似块用于进行第j+1阶目标相似块的搜索过程中的子搜索模板的固定,其中,j取值从1到L,L为大于或等于1的整数。
当然,利用该L个子搜索模板,也可以进行非L阶目标相似块的搜索。
例如,同一子搜索模板,可以进行多阶目标相似块的搜索。
可选地,如果存在N目标搜索模板,则可以利用该N个搜索模板,进行M阶目标相似块的搜索,其中,第i阶目标相似块搜索得到的目标相似块用于进行第i+1阶目标相似块的搜索过程中的子搜索模板或目标搜索模板的固定,其中,i取值从1到M,M大于或等于N,N与M为大于或等于1的整数。
其中,在存在N个目标搜索模板,而目标搜索模板均未包括子搜索模板(也可以理解为包括一个子搜索模板)的情况下,则可以进行M(M等于N) 阶相似块的搜索,其中,第i阶目标相似块搜索得到的目标相似块用于进行第i+1阶目标相似块的搜索过程中的搜索模板的固定。
当然,此时,利用该N个目标搜索模板,也可以进行非N阶目标相似块的搜索。
例如,同一目标搜索模板,可以进行多阶目标相似块的搜索。
或者,在存在N个目标搜索模板,而目标搜索模板中包括多个子搜索模板的情况下,则可以进行M(M大于N)阶相似块的搜索,其中,第i阶目标相似块搜索得到的目标相似块用于进行第i+1阶目标相似块的搜索过程中的子搜索模板的固定。
可选地,在本申请实施例中,进行多阶相似块的搜索可以是指:利用当前待滤波块,对搜索模板进行固定,并搜索相似块,然后再基于搜索到的相似块,再次进行搜索模板的固定,并搜索相似块,然后可以停止相似块的搜索,或者也可以基于再次搜索到的相似块进行搜索模板的固定,并以此类推。其中,可以将该过程称为基于本申请实施例提到的相似块的多阶搜索过程。
其中,如果某一阶搜索过程得到了多个相似块,则可以分别基于该多个相似块进行搜索模板的固定,并进行相似块的搜索过程。
可选地,在本申请实施例中,在之前的相似块搜索过程已经进行了相似度匹配的块,不再进行相似块的匹配操作,由此可以节省滤波的复杂度。
但应理解,本申请实施例并不限于此。
例如,在之前的相似块搜索过程已经被确定为相似块的块,不再进行相似块的匹配操作。也就是说,即使之前已经进行了相似度匹配,但是由于没有被确定为相似块,仍然可以再次进行匹配,例如,可以是由于不同阶搜索过程中,用来判断是否为相似块的阈值可以是不同的。
可选地,在本申请实施例中,某一阶相似块搜索过程中获取的相似块的数量可以不超过一定数值。
在一种实现方式中,在某一阶相似块搜索过程中,可以获取到当前待滤波块中所有搜索块与当前块的相似度,按照相似度从高到低的方式排布,挑出特定数量的相似块。
在另一种实现方式中,在某一阶相似块搜索过程中,在搜索到的期望块的数量达到特定数量时,将所述期望块确定为相似块,并停止进行该阶相似块的搜索,其中,用于表征所述当前待滤波块与所述期望块的相似度的参量 的值超出第一阈值。
在另一种实现方式中,在某一阶相似块搜索过程中,在搜索到的期望块的数量大于特定数量时,按照相似度从高到低的方式,从搜索到的所述期望块中,确定出特定数量的相似块,其中,用于表征所述当前待滤波块与所述期望块的相似度的参量的值超出第一阈值。
但应理解,本申请实施例,并限于以上的实现方式,其中,可以是多阶搜索过程的相似块的总和不超过特定数量,不对每阶搜索过程中的相似块的数量进行限定。
应理解,以上提到的相似块用于搜索模板或子搜索模板的固定可以是指将该相似块作为固定搜索模板或子搜索模板的一点。如果存在多个相似块用于搜索模板或子搜索模板的固定,可以是指基于该多个相似块来移动搜索模板或子搜索模板,用搜索模板或子搜索模板得到多个像素集合,来进行下一阶相似块的搜索。
还应理解,在采用遍历的方式获取目标搜索模板的情况下,在基于目标搜索模板确定相似块时,可以不再进行相似块的具体搜索操作,而是采用在确定目标搜索过程中所得到的相似块获取结果。
在430中,利用该至少一个目标相似块,对该待滤波块进行滤波。
在一种实现方式中,可以基于该至少一个目标相似块,构建结构数组;对该结构数组进行分解;根据分解的结构数组,获得重建结构数组。
在另一种实现方式中,基于所述至少一个目标相似块的像素值的加权平均结果对所述待滤波块进行滤波。
可选地,在本申请实施例中,该方法可以用于编码端。
其中,在该方法用于编码端时,可以对该目标搜索模板的编号进行编码,其中,可以将用到的目标搜索模板的编号写入到码流中,从而解码端可以在从码流中获取目标搜索模板的编号时,按照该编号,确定目标搜索模板,从而可以基于该编号,确定目标搜索模板,以对相应的待滤波块进行滤波。
应理解,在本申请实施例中,编码端在获取到目标搜索模板,并利用目标搜索模板对待滤波块进行滤波时,也可以不将编号写入到码流中,解码端可以依据编码端相同的方法来获取目标搜索模板,例如,以上提到的遍历的方式或者按照目标图像块的内容进行目标搜索模板的选取。
因此,在从多个候选搜索模板中,确定目标搜索模板;利用所述目标搜 索模板,在当前图像的重建像素中,获取用于对待滤波块进行滤波的至少一个目标相似块,可以灵活选取搜索模板,避免采用固定的搜索模板进行相似块的搜索所带来的相似块获取不合理的问题。
应理解,本申请实施例中的方法300和方法400中的描述可以相互参考,例如,关于术语的解释和可选方案的实现方式(例如,关于相似块的表征、多阶搜索过程的描述、模板的描述以及模板的选择的描述等等)均可以相互参考,以及方法300和方法400可以结合使用,为了简洁,在此不再赘述。
图19是根据本申请实施例的用于视频处理的方法500的示意性流程图。如图19所示,该方法500包括以下内容中的至少部分内容。其中,该方法400可以由应用于编码端,也可以应用于解码端。
在510中,滤波器从重建像素中,获取当前块的至少一个相似块,该当前块包括至少一个重建像素,其中,用于表征所述当前块与所述相似块的相似度的参量的值超出第一阈值。
其中,该重建像素可以是搜索窗口中的像素,可以利用逐点扫描的方式,从该搜索窗口中,获取当前块的相似块。
在520中,滤波器基于该至少一个第一相似块,进行滤波。
可选地,在搜索到的期望块的数量达到所述第二阈值时,将所述期望块作为所述相似块,并停止所述相似块的搜索,其中,用于表征所述当前块与所述期望块的相似度的参量的值超出第一阈值。
可选地,在所述重建像素的所有像素中,搜索到的期望块的数量大于所述第二阈值时,按照相似度从高到低的方式,从所述期望块中,确定数量等于所述第二阈值的所述相似块,其中,用于表征所述当前块与所述期望块的相似度的参量的值超出第一阈值。
可选地,该第一阈值是基于以下参数中的至少一种确定的:该当前块的大小,视频的比特深度,该当前块的像素和,该当前块的像素的水平梯度,该当前块的像素的垂直梯度。
可选地,在该相似度的度量参量是哈希值的差值时,该第一阈值是基于以下参数中的至少一种确定的:该当前块的像素和,该当前块的像素的水平梯度,该当前块的像素的垂直梯度。
可选地,该相似度的度量参量是SSD或SAD时,该第一阈值是基于以下参数中的至少一种确定的:该当前块的大小,视频的比特深度。
可选地,该相似度的度量参量是MAD,MSD或SSIM时,该第一阈值是基于视频的比特深度确定的。
可选地,用于获取该相似块进行的相似度判断的度量参量为:哈希值的差值、SSD、SAD、MAD、MSD或SSIM。
可选地,该方法由编码端实现;该方法还包括:所述编码端确定所述第一阈值,以及将所述第一阈值进行编码。
可选地,该方法由解码端实现;该方法还包括:所述解码端获取码流中的所述第一阈值。
可选地,可以基于该至少一个目标相似块,构建结构数组;对该结构数组进行分解;根据分解的结构数组,获得重建结构数组。
可选地,基于该至少一个相似块的像素值的加权平均结果,该待滤波块进行滤波。
应理解,该方法500中的各个操作的实现可以参照方法300或400的描述,为了简洁,在此不再赘述。
图20是根据本申请实施例的用于视频处理的设备600的示意性框图。如图20所示,该设备600包括获取单元610和滤波单元620;其中,
所述获取单元610用于:在至少一个像素集合中,获取待滤波块的至少一个第一相似块,其中,所述像素集合包括稀疏的重建像素,所述待滤波块包括至少一个重建像素;
所述滤波单元620用于:基于所述至少一个第一相似块,对所述待滤波块进行滤波。
可选地,所述至少一个像素集合包括第一像素集合;
所述设备还包括,确定单元630用于:
基于所述待滤波块包括的重建像素的位置,确定所述第一像素集合;
所述获取单元610进一步用于:从所述第一像素集合中,获取所述第一相似块。
可选地,所述获取单元610进一步用于:
按照从靠近所述待滤波块到远离所述待滤波块的搜索方式,从所述第一像素集合中,获取所述第一相似块。
可选地,所述获取单元610进一步用于:
在所述第一像素集合中搜索到的期望块的数量达到第二阈值时,将所述 期望块作为所述第一相似块,并停止在所述第一像素集合中进行所述第一相似块的搜索,其中,用于表征所述待滤波块与所述期望块的相似度的参量的值超出第一阈值。
可选地,所述获取单元610进一步用于:
在所述第一像素集合的所有像素中,搜索到的期望块的数量大于第二阈值时,按照相似度从高到低的方式,从搜索到的所述期望块中,确定数量等于所述第二阈值的所述第一相似块,其中,用于表征所述待滤波块与所述期望块的相似度的参量的值超出第一阈值。
可选地,所述至少一个像素集合包括第二像素集合;
所述确定单元630进一步用于:
根据前次得到的第一相似块包括的重建像素的位置,确定第二像素集合;
所述获取单元610进一步用于:
从所述第二像素集合中,再次获取所述第一相似块。
可选地,所述获取单元610进一步用于:
基于从靠近所述前次得到的所述第一相似块到远离所述前次得到的所述第一相似块的搜索方式,从所述第二像素集合中,再次获取所述第一相似块。
可选地,所述获取单元610进一步用于:
在所述第二像素集合中搜索到的期望块的数量达到第三阈值时,将所述期望块确定为所述第一相似块,并停止在所述第二像素集合中进行所述第一相似块的搜索,其中,用于表征所述待滤波块与所述期望块的相似度的参量的值超出第一阈值。
可选地,所述获取单元610进一步用于:
在所述第二像素集合的所有像素中,搜索到的期望块的数量大于第三阈值时,按照相似度从高到低的方式,从搜索到的所述期望块中,确定数量等于所述第三阈值的所述第一相似块,其中,用于表征所述待滤波块与所述期望块的相似度的参量的值超出第一阈值。
可选地,所述获取单元610进一步用于:
所述第二像素集合中之前已经进行了相似块匹配操作的块,不再进行相似块的匹配操作;或者,
所述第二像素集合中不包括已经进行了相似块匹配操作的块。
可选地,所述设备还包括确定单元630,用于:
基于目标搜索模板,确定所述像素集合。
可选地,所述目标搜索模板中的重建像素聚集为多个分散的图像块,每个图像块的大小大于或等于所述待滤波块的大小。
可选地,所述目标搜索模板包括用于选择所述第一相似块的多个候选相似块,所述候选相似块的大小等于所述待滤波块的大小。
可选地,所述目标搜索模板包括从中心到边缘的多组候选相似块,每组候选相似块块围成环形,所述环形相对所述目标搜索模板的中心对称,组内的候选相似块均匀排布。
可选地,所述目标搜索模板包括四组候选相似块,所述四组候选相似块的远离所述目标搜索模板的中心的边缘像素,相对于所述目标搜索模板的中心,分别间隔1个像素,2个像素,4个像素和8个像素。
可选地,所述四组候选相似块分别具有4个候选相似块,8个候选相似块,8个候选相似块和8个候选相似块,其中,具有4个候选相似块的一组候选相似块距离所述目标搜索模板的中心最近。
可选地,所述至少一个像素集合中,不同的像素集合是基于不同的目标搜索模板确定的。
可选地,所述确定单元630进一步用于:
从多个候选搜索模板中,确定所述目标搜索模板。
可选地,所述确定单元630进一步用于:
基于目标图像块中的至少一个待滤波块,从所述多个候选搜索模板的至少部分候选搜索模板中,确定第一搜索模板;
其中,所述目标搜索模板包括所述第一搜索模板,所述第一搜索模板用于所述至少一个待滤波块获取目标相似块。
可选地,所述确定单元630进一步用于:
针对所述至少一个待滤波块,遍历所述至少部分候选搜索模板中的各个候选搜索模板;
根据遍历结果,从所述至少部分候选搜索模板中,确定所述第一搜索模板。
可选地,所述遍历结果包括:
针对所述至少一个待滤波块中全部滤波块,得到的相似块的相似度、相似块的总数量和获取相似块所需搜索的总块数中的至少一个;和/或,
针对所述至少一个待滤波块中各个滤波块,分别得到的相似块的相似度、相似块的数量和获取相似块所需搜索的块数中的至少一个。
可选地,所述第一搜索模板是所述至少部分候选搜索模板中满足以下条件的搜索模板:
得到所述至少一个待滤波块中全部待滤波块的相似块的过程中,搜索的总块数最少或小于等于第一阈值;和/或,
针对所述至少一个待滤波块中全部待滤波块,得到的相似块的总数量最多和/或大于或等于第二阈值;和/或,
针对所述至少一个待滤波块中全部待滤波块,得到的相似块的相似度的平均值最高和/或超出第三阈值。
可选地,所述确定单元630进一步用于:
根据所述至少一个待滤波块的图像内容,从所述至少部分候选搜索模板中,确定所述第一搜索模板。
可选地,所述至少一个待滤波块的图像内容包括:所述目标图像块的图像边缘的梯度方向和/或所述目标图像块周围像素与所述目标图像块的像素残差。
可选地,所述确定单元630进一步用于:
根据所述至少一个待滤波块的图像边缘的梯度方向和/或所述目标图像块周围像素与所述目标图像块的像素残差,以及所述至少部分候选搜索模板的倾斜度,从所述至少部分候选搜索模板中,确定所述第一搜索模板。
可选地,所述确定单元630进一步用于:
确定所述至少一个待滤波块中的各个待滤波块的优选搜索模板;
根据所述各个待滤波块的优选搜索模板,确定所述第一搜索模板。
可选地,将所述第一搜索模板作为优选搜索模板的待滤波块的数量最多和/或大于或等于第四阈值。
可选地,所述确定单元630进一步用于:
从所述多个候选搜索模板中除所述至少部分搜索模板之外的搜索模板中,根据所述第一搜索模板,确定第二搜索模板。
可选地,所述搜索模板包括多个子搜索模板;
不同的搜索模板包括的子搜索模板不同和/或子搜索模板的使用顺序不同。
可选地,所述设备用于编码端。
可选地,所述设备还包括编码单元640,用于:
编码所述目标搜索模板的编号。
可选地,所述设备用于解码端。
可选地,所述设备用于解码端,所述确定单元630进一步用于:
从码流中获取所述目标搜索模板的编号;
根据所述目标搜索模板的编号,从所述多个候选搜索模板中,确定所述目标搜索模板。
可选地,所述设备还包括,确定单元630用于:
基于每个所述第一相似块的位置,分别确定像素窗口;
所述获取单元610进一步用于:
在所述像素窗口内,获取所述第二相似块;
所述滤波单元620进一步用于:
基于所述第一相似块和所述第二相似块,进行滤波。
可选地,所述获取单元610进一步用于:
按照逐点扫描的方式,确定所述第二相似块。
可选地,所述获取单元610进一步用于:
所述像素窗口中已进行了相似块匹配操作的块,不再进行相似块的匹配操作;或者,
所述搜索窗口中不包括已经进行了相似块匹配操作的块。
可选地,所述获取单元610进一步用于:
在所述像素窗口中搜索到的期望块的数量达到第四阈值时,将搜索到的所述期望块确定为所述第二相似块,并停止在所述像素窗口中进行所述第二相似块的搜索,其中,用于表征所述待滤波块与所述期望块的相似度的参量的值超出第一阈值。
可选地,所述获取单元610进一步用于:
在所述像素窗口中的所有像素中,搜索到的期望块的数量大于第四阈值时,按照相似度从高到低的方式,从所述期望块中,确定数量等于所述第四阈值的所述第二相似块,其中,用于表征所述待滤波块与所述期望块的相似 度的参量的值超出第一阈值。
可选地,用于表征所述待滤波块与所述待滤波块的相似块的相似度的参量的值超出第一阈值。
可选地,所述第一阈值是基于以下参数中的至少一种确定的:
所述待滤波块的大小,视频的比特深度,所述待滤波块的像素和,所述待滤波块的像素的水平梯度,所述待滤波块的像素的垂直梯度。
可选地,在表征所述相似度的参量是哈希值的差值时,
所述第一阈值是基于以下参数中的至少一种确定的:
所述待滤波块的像素和,所述待滤波块的像素的水平梯度,所述待滤波块的像素的垂直梯度。
可选地,在表征所述相似度的参量是误差平方和SSD或绝对误差和SAD时,
所述第一阈值是基于以下参数中的至少一种确定的:所述待滤波块的大小,视频的比特深度。
可选地,在表征所述相似度的参量是平均绝对差MAD,平均误差平方和MSD或结构相似性指标SSIM时,
所述第一阈值是基于视频的比特深度确定的。
可选地,所述设备由编码端实现;所述设备还包括编码单元640,用于:
确定所述第一阈值,以及将所述第一阈值进行编码。
可选地,所述设备由解码端实现;所述获取单元610进一步用于:
获取码流中的所述第一阈值。
可选地,表征相似度的参量为:哈希值的差值、SSD、SAD、MAD、MSD或SSIM。
可选地,用于获取所述相似块的重建像素包括:
所述待滤波块所属的编码单元的上侧的重建像素、所述编码单元的左侧的重建像素和所述编码单元的重建像素;或,
所述编码单元的上侧的重建像素、所述编码单元的左侧的重建像素、所述编码单元的右侧的重建像素、所述编码单元的下侧的重建像素和所述编码单元的重建像素;或,
所述编码单元的重建像素。
可选地,所述编码单元的上侧的重建像素的垂直方向的像素个数少于或 等于所述编码单元的左侧的重建像素的水平方向的像素个数。
可选地,所述滤波单元620进一步用于:
基于所述至少一个第一相似块,构建结构数组;
对所述结构数组进行分解;
根据分解的结构数组,获得重建结构数组。
可选地,所述滤波单元620进一步用于:
基于所述至少一个第一相似块的像素值的加权平均结果对所述待滤波块进行滤波。
可选地,该设备600可以实现上述方法300中的滤波器的操作,为了简洁,在此不再赘述。
图21是根据本申请实施例的用于视频处理的设备700的示意性框图。如图21所示,该设备700包括:包括确定单元710、获取单元720和滤波单元730;其中,
所述确定单元710用于:从多个候选搜索模板中,确定目标搜索模板;
所述获取单元720用于:利用所述目标搜索模板,在当前图像的重建像素中,获取待滤波块的至少一个目标相似块;
所述滤波单元730用于:利用所述至少一个目标相似块,对所述待滤波块进行滤波。
可选地,所述确定单元710进一步用于:
基于目标图像块中的至少一个待滤波块,从所述多个候选搜索模板的至少部分候选搜索模板中,确定第一搜索模板;
其中,所述目标搜索模板包括所述第一搜索模板,所述第一搜索模板用于所述至少一个待滤波块获取目标相似块。
可选地,所述确定单元710进一步用于:
针对所述至少一个待滤波块,遍历所述至少部分候选搜索模板中的各个候选搜索模板;
根据遍历结果,从所述至少部分候选搜索模板中,确定所述第一搜索模板。
可选地,所述遍历结果包括:
针对所述至少一个待滤波块中全部滤波块,得到的相似块的相似度、相似块的总数量和获取相似块所需搜索的总块数中的至少一个;和/或,
针对所述至少一个待滤波块中各个滤波块,分别得到的相似块的相似度、相似块的数量和获取相似块所需搜索的块数中的至少一个。
可选地,所述第一搜索模板是所述至少部分候选搜索模板中满足以下条件的搜索模板:
得到所述至少一个待滤波块中全部待滤波块的相似块的过程中,搜索的总块数最少或小于等于第一阈值;和/或,
针对所述至少一个待滤波块中全部待滤波块,得到的相似块的总数量最多和/或大于或等于第二阈值;和/或,
针对所述至少一个待滤波块中全部待滤波块,得到的相似块的相似度的平均值最高和/或超出第三阈值。
可选地,所述确定单元710进一步用于:
根据所述至少一个待滤波块的图像内容,从所述至少部分候选搜索模板中,确定所述第一搜索模板。
可选地,所述至少一个待滤波块的图像内容包括:所述目标图像块的图像边缘的梯度方向和/或所述目标图像块周围像素与所述目标图像块的像素残差。
可选地,所述确定单元710进一步用于:
根据所述至少一个待滤波块的图像边缘的梯度方向和/或所述目标图像块周围像素与所述目标图像块的像素残差,以及所述至少部分候选搜索模板的倾斜度,从所述至少部分候选搜索模板中,确定所述第一搜索模板。
可选地,所述确定单元710进一步用于:
确定所述至少一个待滤波块中的各个待滤波块的优选搜索模板;
根据所述各个待滤波块的优选搜索模板,确定所述第一搜索模板。
可选地,将所述第一搜索模板作为优选搜索模板的待滤波块的数量最多和/或大于或等于第四阈值。
可选地,所述确定单元710进一步用于:
从所述多个候选搜索模板中除所述至少部分搜索模板之外的搜索模板中,根据所述第一搜索模板,确定第二搜索模板。
可选地,所述搜索模板包括多个子搜索模板;
不同的搜索模板包括的子搜索模板不同和/或子搜索模板的使用顺序不同。
可选地,所述目标搜索模板包括L个子搜索模板;
所述获取单元720进一步用于:
利用所述L个子搜索模板,进行L阶目标相似块的搜索,其中,第j阶目标相似块搜索得到的目标相似块用于进行第j+1阶目标相似块的搜索过程中的子搜索模板的固定,其中,j取值从1到L,L为大于或等于1的整数。
可选地,所述目标搜索模板包括N个搜索模板;
所述获取单元720进一步用于:
利用所述N个搜索模板,进行M阶目标相似块的搜索,其中,第i阶目标相似块搜索得到的目标相似块用于进行第i+1阶目标相似块的搜索过程中的子搜索模板或目标搜索模板的固定,其中,i取值从1到M,M大于或等于N,N与M为大于或等于1的整数。
可选地,所述滤波单元730进一步用于:
基于所述至少一个目标相似块,构建结构数组;
对所述结构数组进行分解;
根据分解的结构数组,获得重建结构数组。
可选地,所述滤波单元730进一步用于:
基于所述至少一个目标相似块的像素值的加权平均结果对所述待滤波块进行滤波。
可选地,所述设备用于编码端。
可选地,所述设备还包括编码单元740,用于:
编码所述目标搜索模板的编号,以传递给解码端。
可选地,所述设备用于解码端。
可选地,所述设备用于解码端,所述确定单元710进一步用于:
从码流中获取所述目标搜索模板的编号;
根据所述目标搜索模板的编号,从所述多个候选搜索模板中,确定所述目标搜索模板。
可选地,该设备700可以实现上述方法400中的滤波器的操作,为了简洁,在此不再赘述。
图22是根据本申请实施例的用于视频处理的设备800的示意性框图。
该设备800包括获取单元810和滤波单元820;其中,所述获取单元810用于:从重建像素中,获取待滤波块的至少一个相似块,所述待滤波块包括 至少一个重建像素,其中,用于表征所述待滤波块与所述相似块的相似度的参量的值超出第一阈值;
所述滤波单元820用于:基于所述至少一个相似块,对所述待滤波块进行滤波。
可选地,所述相似块的数量小于或等于第二阈值。
可选地,所述获取单元810进一步用于:
在搜索到的期望块的数量达到所述第二阈值时,将所述期望块作为所述相似块,并停止所述相似块的搜索,其中,用于表征所述待滤波块与所述期望块的相似度的参量的值超出第一阈值。
可选地,所述获取单元810进一步用于:
在所述重建像素的所有像素中,搜索到的期望块的数量大于所述第二阈值时,按照相似度从高到低的方式,从所述期望块中,确定数量等于所述第二阈值的所述相似块,其中,用于表征所述待滤波块与所述期望块的相似度的参量的值超出第一阈值。
可选地,所述第一阈值是基于以下参数中的至少一种确定的:
所述待滤波块的大小,视频的比特深度,所述待滤波块的像素和,所述待滤波块的像素的水平梯度,所述待滤波块的像素的垂直梯度。
可选地,在表征所述相似度的参量是哈希值的差值时,
所述第一阈值是基于以下参数中的至少一种确定的:
所述待滤波块的像素和,所述待滤波块的像素的水平梯度,所述待滤波块的像素的垂直梯度。
可选地,在表征所述相似度的参量是误差平方和SSD或绝对误差和SAD时,
所述第一阈值是基于以下参数中的至少一种确定的:所述待滤波块的大小,视频的比特深度。
可选地,在表征所述相似度的参量是平均绝对差MAD,平均误差平方和MSD或结构相似性指标SSIM时,
所述第一阈值是基于视频的比特深度确定的。
可选地,表征相似度的参量为:哈希值的差值、SSD、SAD、MAD、MSD或SSIM。
可选地,所述设备由编码端实现;所述设备还包括编码单元820,用于:
所述编码端确定所述第一阈值,以及将所述第一阈值进行编码。
可选地,所述设备由解码端实现;所述获取单元810进一步用于:
获取码流中的所述第一阈值。
可选地,所述滤波单元820进一步用于:
基于所述至少一个相似块,构建结构数组;
对所述结构数组进行分解;
根据分解的结构数组,获得重建结构数组。
可选地,所述滤波单元820进一步用于:
基于所述至少一个相似块的像素值的加权平均结果对所述待滤波块进行滤波。
可选地,该设备800可以实现上述方法500中的滤波器的操作,为了简洁,在此不再赘述。
应理解,上述本申请实施例的用于视频处理的设备可以是芯片,其具体可以由电路实现,但本申请实施例对具体的实现形式不做限定。
本申请实施例还提供了一种编码器,该编码器用于实现本申请实施例中编码端的功能,可以包括上述本申请实施例的用于视频处理的设备中用于编码端的模块。
本申请实施例还提供了一种解码器,该解码器用于实现本申请实施例中解码端的功能,可以包括上述本申请实施例的用于视频处理的设备中用于解码端的模块。
本申请实施例还提供了一种编解码器,该编解码器包括上述本申请实施例的用于视频处理的设备。
图23示出了本申请实施例的计算机***900的示意性框图。
如图23所示,该计算机***900可以包括处理器910和存储器920。
应理解,该计算机***900还可以包括其他计算机***中通常所包括的部件,例如,输入输出设备、通信接口等,本申请实施例对此并不限定。
存储器920用于存储计算机可执行指令。
存储器920可以是各种种类的存储器,例如可以包括高速随机存取存储器(Random Access Memory,RAM),还可以包括非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器,本申请实施例对此并不限定。
处理器910用于访问该存储器920,并执行该计算机可执行指令,以进行上述本申请实施例的用于视频处理的方法中的操作。
处理器910可以包括微处理器,现场可编程门阵列(Field-Programmable Gate Array,FPGA),中央处理器(Central Processing unit,CPU),图形处理器(Graphics Processing Unit,GPU)等,本申请实施例对此并不限定。
本申请实施例的用于视频处理的设备和计算机***可对应于本申请实施例的用于视频处理的方法的执行主体,并且用于视频处理的设备和计算机***中的各个模块的上述和其它操作和/或功能分别为了实现前述各个方法的相应流程,为了简洁,在此不再赘述。
本申请实施例还提供了一种电子设备,该电子设备可以包括上述本申请各种实施例的用于视频处理的设备或者计算机***。
本申请实施例还提供了一种计算机存储介质,该计算机存储介质中存储有程序代码,该程序代码可以用于指示执行上述本申请实施例的滤波的方法。
应理解,在本申请实施例中,术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系。例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的***、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的***、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可 以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本申请实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (166)

  1. 一种用于视频处理的方法,其特征在于,包括:
    在至少一个像素集合中,获取待滤波块的至少一个第一相似块,其中,所述像素集合包括稀疏的重建像素,所述待滤波块包括至少一个重建像素;
    基于所述至少一个第一相似块,对所述待滤波块进行滤波。
  2. 根据权利要求1所述的方法,其特征在于,所述至少一个像素集合包括第一像素集合;
    所述在至少一个像素集合中,获取所述至少一个第一相似块,包括:
    基于所述待滤波块包括的重建像素的位置,确定所述第一像素集合;
    从所述第一像素集合中,获取所述第一相似块。
  3. 根据权利要求2所述的方法,其特征在于,从所述第一像素集合中,获取所述第一相似块,包括:
    按照从靠近所述待滤波块到远离所述待滤波块的搜索方式,从所述第一像素集合中,获取所述第一相似块。
  4. 根据权利要求2或3所述的方法,其特征在于,从所述第一像素集合中,获取所述第一相似块,包括:
    在所述第一像素集合中搜索到的期望块的数量达到第二阈值时,将所述期望块作为所述第一相似块,并停止在所述第一像素集合中进行所述第一相似块的搜索,其中,用于表征所述待滤波块与所述期望块的相似度的参量的值超出第一阈值。
  5. 根据权利要求2或3所述的方法,其特征在于,从所述第一像素集合中,获取所述第一相似块,包括:
    在所述第一像素集合的所有像素中,搜索到的期望块的数量大于第二阈值时,按照相似度从高到低的方式,从搜索到的所述期望块中,确定数量等于所述第二阈值的所述第一相似块,其中,用于表征所述待滤波块与所述期望块的相似度的参量的值超出第一阈值。
  6. 根据权利要求2至5中任一项所述的方法,其特征在于,所述至少一个像素集合包括第二像素集合;
    所述在至少一个像素集合中,获取第一相似块,包括:
    根据前次得到的第一相似块包括的重建像素的位置,确定第二像素集合;
    从所述第二像素集合中,再次获取所述第一相似块。
  7. 根据权利要求6所述的方法,其特征在于,从所述第二像素集合中,再次获取所述第一相似块,包括:
    基于从靠近所述前次得到的所述第一相似块到远离所述前次得到的所述第一相似块的搜索方式,从所述第二像素集合中,再次获取所述第一相似块。
  8. 根据权利要求6或7所述的方法,其特征在于,从所述第二像素集合中,再次获取所述第一相似块,包括:
    在所述第二像素集合中搜索到的期望块的数量达到第三阈值时,将所述期望块确定为所述第一相似块,并停止在所述第二像素集合中进行所述第一相似块的搜索,其中,用于表征所述待滤波块与所述期望块的相似度的参量的值超出第一阈值。
  9. 根据权利要求6或7所述的方法,其特征在于,从所述第二像素集合中,再次获取所述第一相似块,包括:
    在所述第二像素集合的所有像素中,搜索到的期望块的数量大于第三阈值时,按照相似度从高到低的方式,从搜索到的所述期望块中,确定数量等于所述第三阈值的所述第一相似块,其中,用于表征所述待滤波块与所述期望块的相似度的参量的值超出第一阈值。
  10. 根据权利要求6至9中任一项所述的方法,其特征在于,
    从所述第二像素集合中,再次获取所述第一相似块,包括:所述第二像素集合中之前已经进行了相似块匹配操作的块,不再进行相似块的匹配操作;或者,
    所述第二像素集合中不包括已经进行了相似块匹配操作的块。
  11. 根据权利要求1至10中任一项所述的方法,其特征在于,所述方法还包括:
    基于目标搜索模板,确定所述像素集合。
  12. 根据权利要求11所述的方法,其特征在于,所述目标搜索模板中的重建像素聚集为多个分散的图像块,每个图像块的大小大于或等于所述待滤波块的大小。
  13. 根据权利要求11或12所述的方法,其特征在于,所述目标搜索模板包括用于选择所述第一相似块的多个候选相似块,所述候选相似块的大小 等于所述待滤波块的大小。
  14. 根据权利要求13所述的方法,其特征在于,所述目标搜索模板包括从中心到边缘的多组候选相似块,每组候选相似块块围成环形,所述环形相对所述目标搜索模板的中心对称,组内的候选相似块均匀排布。
  15. 根据权利要求14所述的方法,其特征在于,所述目标搜索模板包括四组候选相似块,所述四组候选相似块的远离所述目标搜索模板的中心的边缘像素,相对于所述目标搜索模板的中心,分别间隔1个像素,2个像素,4个像素和8个像素。
  16. 根据权利要求14或15所述的方法,其特征在于,所述四组候选相似块分别具有4个候选相似块,8个候选相似块,8个候选相似块和8个候选相似块,其中,具有4个候选相似块的一组候选相似块距离所述目标搜索模板的中心最近。
  17. 根据权利要求11至16中任一项所述的方法,其特征在于,所述至少一个像素集合中,不同的像素集合是基于不同的目标搜索模板确定的。
  18. 根据权利要求11至17中任一项所述的方法,其特征在于,所述方法还包括:
    从多个候选搜索模板中,确定所述目标搜索模板。
  19. 根据权利要求18所述的方法,其特征在于,所述从多个候选搜索模板中,确定目标搜索模板,包括:
    基于目标图像块中的至少一个待滤波块,从所述多个候选搜索模板的至少部分候选搜索模板中,确定第一搜索模板;
    其中,所述目标搜索模板包括所述第一搜索模板,所述第一搜索模板用于所述至少一个待滤波块获取目标相似块。
  20. 根据权利要求19所述的方法,其特征在于,所述从所述多个候选搜索模板的至少部分候选搜索模板中,确定第一搜索模板,包括:
    针对所述至少一个待滤波块,遍历所述至少部分候选搜索模板中的各个候选搜索模板;
    根据遍历结果,从所述至少部分候选搜索模板中,确定所述第一搜索模板。
  21. 根据权利要求20所述的方法,其特征在于,所述遍历结果包括:
    针对所述至少一个待滤波块中全部滤波块,得到的相似块的相似度、相 似块的总数量和获取相似块所需搜索的总块数中的至少一个;和/或,
    针对所述至少一个待滤波块中各个滤波块,分别得到的相似块的相似度、相似块的数量和获取相似块所需搜索的块数中的至少一个。
  22. 根据权利要求21所述的方法,其特征在于,所述第一搜索模板是所述至少部分候选搜索模板中满足以下条件的搜索模板:
    得到所述至少一个待滤波块中全部待滤波块的相似块的过程中,搜索的总块数最少或小于等于第一阈值;和/或,
    针对所述至少一个待滤波块中全部待滤波块,得到的相似块的总数量最多和/或大于或等于第二阈值;和/或,
    针对所述至少一个待滤波块中全部待滤波块,得到的相似块的相似度的平均值最高和/或超出第三阈值。
  23. 根据权利要求19所述的方法,其特征在于,所述基于目标图像块的至少一个待滤波块,从所述多个候选搜索模板的至少部分候选搜索模板中,确定第一搜索模板,包括:
    根据所述至少一个待滤波块的图像内容,从所述至少部分候选搜索模板中,确定所述第一搜索模板。
  24. 根据权利要求23所述的方法,其特征在于,所述至少一个待滤波块的图像内容包括:所述目标图像块的图像边缘的梯度方向和/或所述目标图像块周围像素与所述目标图像块的像素残差。
  25. 根据权利要求23或24所述的方法,其特征在于,所述根据所述至少一个待滤波块的图像内容,从所述至少部分候选搜索模板中,确定所述第一搜索模板,包括:
    根据所述至少一个待滤波块的图像边缘的梯度方向和/或所述目标图像块周围像素与所述目标图像块的像素残差,以及所述至少部分候选搜索模板的倾斜度,从所述至少部分候选搜索模板中,确定所述第一搜索模板。
  26. 根据权利要求19至21和23至25中任一项所述的方法,其特征在于,所述从所述多个候选搜索模板的至少部分候选搜索模板中,确定所述第一搜索模板,包括:
    确定所述至少一个待滤波块中的各个待滤波块的优选搜索模板;
    根据所述各个待滤波块的优选搜索模板,确定所述第一搜索模板。
  27. 根据权利要求26所述的方法,其特征在于,将所述第一搜索模板 作为优选搜索模板的待滤波块的数量最多和/或大于或等于第四阈值。
  28. 根据权利要求18至27中任一项所述的方法,其特征在于,所述从多个候选搜索模板中,确定目标搜索模板,包括:
    从所述多个候选搜索模板中除所述至少部分搜索模板之外的搜索模板中,根据所述第一搜索模板,确定第二搜索模板。
  29. 根据权利要求18至28中任一项所述的方法,其特征在于,所述搜索模板包括多个子搜索模板;
    不同的搜索模板包括的子搜索模板不同和/或子搜索模板的使用顺序不同。
  30. 根据权利要求18至29中任一项所述的方法,其特征在于,所述方法用于编码端。
  31. 根据权利要求30所述的方法,其特征在于,所述方法还包括:
    编码所述目标搜索模板的编号。
  32. 根据权利要求18至29中任一项所述的方法,其特征在于,所述方法用于解码端。
  33. 根据权利要求18所述的方法、其特征在于,所述方法用于解码端,所述从多个候选搜索模板中,确定目标搜索模板,包括:
    从码流中获取所述目标搜索模板的编号;
    根据所述目标搜索模板的编号,从所述多个候选搜索模板中,确定所述目标搜索模板。
  34. 根据权利要求1至33中任一项所述的方法,其特征在于,所述方法还包括:
    基于每个所述第一相似块的位置,分别确定像素窗口;
    在所述像素窗口内,获取所述第二相似块;
    所述基于所述至少一个第一相似块,进行滤波,包括:
    基于所述第一相似块和所述第二相似块,进行滤波。
  35. 根据权利要求34所述的方法,其特征在于,在所述像素窗口内,确定第二相似块,包括:
    按照逐点扫描的方式,确定所述第二相似块。
  36. 根据权利要求34或35所述的方法,其特征在于,在所述像素窗口内,获取所述第二相似块,包括:
    所述像素窗口中已进行了相似块匹配操作的块,不再进行相似块的匹配操作;或者,
    所述搜索窗口中不包括已经进行了相似块匹配操作的块。
  37. 根据权利要求34至36中任一项所述的方法,其特征在于,所述在所述像素窗口内,获取所述第二相似块,包括:
    在所述像素窗口中搜索到的期望块的数量达到第四阈值时,将搜索到的所述期望块确定为所述第二相似块,并停止在所述像素窗口中进行所述第二相似块的搜索,其中,用于表征所述待滤波块与所述期望块的相似度的参量的值超出第一阈值。
  38. 根据权利要求34至36中任一项所述的方法,其特征在于,所述在所述像素窗口内,获取所述第二相似块,包括:
    在所述像素窗口中的所有像素中,搜索到的期望块的数量大于第四阈值时,按照相似度从高到低的方式,从所述期望块中,确定数量等于所述第四阈值的所述第二相似块,其中,用于表征所述待滤波块与所述期望块的相似度的参量的值超出第一阈值。
  39. 根据权利要求1至38中任一项所述的方法,其特征在于,用于表征所述待滤波块与所述待滤波块的相似块的相似度的参量的值超出第一阈值。
  40. 根据权利要求39所述的方法,其特征在于,所述第一阈值是基于以下参数中的至少一种确定的:
    所述待滤波块的大小,视频的比特深度,所述待滤波块的像素和,所述待滤波块的像素的水平梯度,所述待滤波块的像素的垂直梯度。
  41. 根据权利要求40所述的方法,其特征在于,在表征所述相似度的参量是哈希值的差值时,
    所述第一阈值是基于以下参数中的至少一种确定的:
    所述待滤波块的像素和,所述待滤波块的像素的水平梯度,所述待滤波块的像素的垂直梯度。
  42. 根据权利要求40所述的方法,其特征在于,在表征所述相似度的参量是误差平方和SSD或绝对误差和SAD时,
    所述第一阈值是基于以下参数中的至少一种确定的:所述待滤波块的大小,视频的比特深度。
  43. 根据权利要求40所述的方法,其特征在于,在表征所述相似度的参量是平均绝对差MAD,平均误差平方和MSD或结构相似性指标SSIM时,
    所述第一阈值是基于视频的比特深度确定的。
  44. 根据权利要求39至43中任一项所述的方法,其特征在于,所述方法由编码端实现;所述方法还包括:
    所述编码端确定所述第一阈值,以及将所述第一阈值进行编码。
  45. 根据权利要求39至43中任一项所述的方法,其特征在于,所述方法由解码端实现;所述方法还包括:
    所述解码端获取码流中的所述第一阈值。
  46. 根据权利要求1至45中任一项所述的方法,其特征在于,表征相似度的参量为:哈希值的差值、SSD、SAD、MAD、MSD或SSIM。
  47. 根据权利要求1至46中任一项所述的方法,其特征在于,用于获取所述相似块的重建像素包括:
    所述待滤波块所属的编码单元的上侧的重建像素、所述编码单元的左侧的重建像素和所述编码单元的重建像素;或,
    所述编码单元的上侧的重建像素、所述编码单元的左侧的重建像素、所述编码单元的右侧的重建像素、所述编码单元的下侧的重建像素和所述编码单元的重建像素;或,
    所述编码单元的重建像素。
  48. 根据权利要求47所述的方法,其特征在于,所述编码单元的上侧的重建像素的垂直方向的像素个数少于或等于所述编码单元的左侧的重建像素的水平方向的像素个数。
  49. 根据权利要求1至48中任一项所述的方法,其特征在于,所述利用所述至少一个第一相似块,对所述待滤波块进行滤波,包括:
    基于所述至少一个第一相似块,构建结构数组;
    对所述结构数组进行分解;
    根据分解的结构数组,获得重建结构数组。
  50. 根据权利要求1至48中任一项所述的方法,其特征在于,所述利用所述至少一个第一相似块,对所述待滤波块进行滤波,包括:
    基于所述至少一个第一相似块的像素值的加权平均结果对所述待滤波块进行滤波。
  51. 一种用于视频处理的方法,其特征在于,包括:
    从多个候选搜索模板中,确定目标搜索模板;
    利用所述目标搜索模板,在当前图像的重建像素中,获取待滤波块的至少一个目标相似块;
    利用所述至少一个目标相似块,对所述待滤波块进行滤波。
  52. 根据权利要求51所述的方法,其特征在于,所述从多个候选搜索模板中,确定目标搜索模板,包括:
    基于目标图像块中的至少一个待滤波块,从所述多个候选搜索模板的至少部分候选搜索模板中,确定第一搜索模板;
    其中,所述目标搜索模板包括所述第一搜索模板,所述第一搜索模板用于所述至少一个待滤波块获取目标相似块。
  53. 根据权利要求52所述的方法,其特征在于,所述从所述多个候选搜索模板的至少部分候选搜索模板中,确定第一搜索模板,包括:
    针对所述至少一个待滤波块,遍历所述至少部分候选搜索模板中的各个候选搜索模板;
    根据遍历结果,从所述至少部分候选搜索模板中,确定所述第一搜索模板。
  54. 根据权利要求53所述的方法,其特征在于,所述遍历结果包括:
    针对所述至少一个待滤波块中全部滤波块,得到的相似块的相似度、相似块的总数量和获取相似块所需搜索的总块数中的至少一个;和/或,
    针对所述至少一个待滤波块中各个滤波块,分别得到的相似块的相似度、相似块的数量和获取相似块所需搜索的块数中的至少一个。
  55. 根据权利要求54所述的方法,其特征在于,所述第一搜索模板是所述至少部分候选搜索模板中满足以下条件的搜索模板:
    得到所述至少一个待滤波块中全部待滤波块的相似块的过程中,搜索的总块数最少或小于等于第一阈值;和/或,
    针对所述至少一个待滤波块中全部待滤波块,得到的相似块的总数量最多和/或大于或等于第二阈值;和/或,
    针对所述至少一个待滤波块中全部待滤波块,得到的相似块的相似度的平均值最高和/或超出第三阈值。
  56. 根据权利要求52所述的方法,其特征在于,所述基于目标图像块 的至少一个待滤波块,从所述多个候选搜索模板的至少部分候选搜索模板中,确定第一搜索模板,包括:
    根据所述至少一个待滤波块的图像内容,从所述至少部分候选搜索模板中,确定所述第一搜索模板。
  57. 根据权利要求56所述的方法,其特征在于,所述至少一个待滤波块的图像内容包括:所述目标图像块的图像边缘的梯度方向和/或所述目标图像块周围像素与所述目标图像块的像素残差。
  58. 根据权利要求56或57所述的方法,其特征在于,所述根据所述至少一个待滤波块的图像内容,从所述至少部分候选搜索模板中,确定所述第一搜索模板,包括:
    根据所述至少一个待滤波块的图像边缘的梯度方向和/或所述目标图像块周围像素与所述目标图像块的像素残差,以及所述至少部分候选搜索模板的倾斜度,从所述至少部分候选搜索模板中,确定所述第一搜索模板。
  59. 根据权利要求52至54和56至58中任一项所述的方法,其特征在于,所述从所述多个候选搜索模板的至少部分候选搜索模板中,确定所述第一搜索模板,包括:
    确定所述至少一个待滤波块中的各个待滤波块的优选搜索模板;
    根据所述各个待滤波块的优选搜索模板,确定所述第一搜索模板。
  60. 根据权利要求59所述的方法,其特征在于,将所述第一搜索模板作为优选搜索模板的待滤波块的数量最多和/或大于或等于第四阈值。
  61. 根据权利要求52至60中任一项所述的方法,其特征在于,所述从多个候选搜索模板中,确定目标搜索模板,包括:
    从所述多个候选搜索模板中除所述至少部分搜索模板之外的搜索模板中,根据所述第一搜索模板,确定第二搜索模板。
  62. 根据权利要求51至61中任一项所述的方法,其特征在于,所述搜索模板包括多个子搜索模板;
    不同的搜索模板包括的子搜索模板不同和/或子搜索模板的使用顺序不同。
  63. 根据权利要求62所述的方法,其特征在于,所述目标搜索模板包括L个子搜索模板;
    所述利用所述目标搜索模板,在重建像素中,获取待滤波块的至少一个 目标相似块,包括:
    利用所述L个子搜索模板,进行L阶目标相似块的搜索,其中,第j阶目标相似块搜索得到的目标相似块用于进行第j+1阶目标相似块的搜索过程中的子搜索模板的固定,其中,j取值从1到L,L为大于或等于1的整数。
  64. 根据权利要求51至63中任一项所述的方法,其特征在于,所述目标搜索模板包括N个搜索模板;
    所述利用所述目标搜索模板,在重建像素中,获取待滤波块的至少一个目标相似块,包括:
    利用所述N个搜索模板,进行M阶目标相似块的搜索,其中,第i阶目标相似块搜索得到的目标相似块用于进行第i+1阶目标相似块的搜索过程中的子搜索模板或目标搜索模板的固定,其中,i取值从1到M,M大于或等于N,N与M为大于或等于1的整数。
  65. 根据权利要求51至64中任一项所述的方法,其特征在于,所述利用所述至少一个目标相似块,对所述待滤波块进行滤波,包括:
    基于所述至少一个目标相似块,构建结构数组;
    对所述结构数组进行分解;
    根据分解的结构数组,获得重建结构数组。
  66. 根据权利要求51至65中任一项所述的方法,其特征在于,所述利用所述至少一个目标相似块,对所述待滤波块进行滤波,包括:
    基于所述至少一个目标相似块的像素值的加权平均结果对所述待滤波块进行滤波。
  67. 根据权利要求51至66中任一项所述的方法,其特征在于,所述方法用于编码端。
  68. 根据权利要求67所述的方法,其特征在于,所述方法还包括:
    编码所述目标搜索模板的编号。
  69. 根据权利要求51至66中任一项所述的方法,其特征在于,所述方法用于解码端。
  70. 根据权利要求51所述的方法、其特征在于,所述方法用于解码端,所述从多个候选搜索模板中,确定目标搜索模板,包括:
    从码流中获取所述目标搜索模板的编号;
    根据所述目标搜索模板的编号,从所述多个候选搜索模板中,确定所述 目标搜索模板。
  71. 一种用于视频处理的方法,其特征在于,包括:
    从重建像素中,获取待滤波块的至少一个相似块,所述待滤波块包括至少一个重建像素,其中,用于表征所述待滤波块与所述相似块的相似度的参量的值超出第一阈值;
    基于所述至少一个相似块,对所述待滤波块进行滤波。
  72. 根据权利要求71所述的方法,其特征在于,所述相似块的数量小于或等于第二阈值。
  73. 根据权利要求72所述的方法,其特征在于,所述从重建像素中,获取待滤波块的至少一个相似块,包括:
    在搜索到的期望块的数量达到所述第二阈值时,将所述期望块作为所述相似块,并停止所述相似块的搜索,其中,用于表征所述待滤波块与所述期望块的相似度的参量的值超出第一阈值。
  74. 根据权利要求72所述的方法,其特征在于,所述从重建像素中,获取待滤波块的至少一个相似块,包括:
    在所述重建像素的所有像素中,搜索到的期望块的数量大于所述第二阈值时,按照相似度从高到低的方式,从所述期望块中,确定数量等于所述第二阈值的所述相似块,其中,用于表征所述待滤波块与所述期望块的相似度的参量的值超出第一阈值。
  75. 根据权利要求71至74中任一项所述的方法,其特征在于,所述第一阈值是基于以下参数中的至少一种确定的:
    所述待滤波块的大小,视频的比特深度,所述待滤波块的像素和,所述待滤波块的像素的水平梯度,所述待滤波块的像素的垂直梯度。
  76. 根据权利要求75所述的方法,其特征在于,在表征所述相似度的参量是哈希值的差值时,
    所述第一阈值是基于以下参数中的至少一种确定的:
    所述待滤波块的像素和,所述待滤波块的像素的水平梯度,所述待滤波块的像素的垂直梯度。
  77. 根据权利要求75所述的方法,其特征在于,在表征所述相似度的参量是误差平方和SSD或绝对误差和SAD时,
    所述第一阈值是基于以下参数中的至少一种确定的:所述待滤波块的大 小,视频的比特深度。
  78. 根据权利要求75所述的方法,其特征在于,在表征所述相似度的参量是平均绝对差MAD,平均误差平方和MSD或结构相似性指标SSIM时,
    所述第一阈值是基于视频的比特深度确定的。
  79. 根据权利要求71至78中任一项所述的方法,其特征在于,表征相似度的参量为:哈希值的差值、SSD、SAD、MAD、MSD或SSIM。
  80. 根据权利要求71至79中任一项所述的方法,其特征在于,所述方法由编码端实现;所述方法还包括:
    所述编码端确定所述第一阈值,以及将所述第一阈值进行编码。
  81. 根据权利要求71至79中任一项所述的方法,其特征在于,所述方法由解码端实现;所述方法还包括:
    所述解码端获取码流中的所述第一阈值。
  82. 根据权利要求71至81中任一项所述的方法,其特征在于,所述基于所述至少一个相似块,对所述待滤波块进行滤波,包括:
    基于所述至少一个相似块,构建结构数组;
    对所述结构数组进行分解;
    根据分解的结构数组,获得重建结构数组。
  83. 根据权利要求71至82中任一项所述的方法,其特征在于,所述基于所述至少一个相似块,对所述待滤波块进行滤波,包括:
    基于所述至少一个相似块的像素值的加权平均结果对所述待滤波块进行滤波。
  84. 一种用于视频处理的设备,其特征在于,包括获取单元和滤波单元;其中,
    所述获取单元用于:在至少一个像素集合中,获取待滤波块的至少一个第一相似块,其中,所述像素集合包括稀疏的重建像素,所述待滤波块包括至少一个重建像素;
    所述滤波单元用于:基于所述至少一个第一相似块,对所述待滤波块进行滤波。
  85. 根据权利要求84所述的设备,其特征在于,所述至少一个像素集合包括第一像素集合;
    所述设备还包括,确定单元用于:
    基于所述待滤波块包括的重建像素的位置,确定所述第一像素集合;
    所述获取单元进一步用于:从所述第一像素集合中,获取所述第一相似块。
  86. 根据权利要求85所述的设备,其特征在于,所述获取单元进一步用于:
    按照从靠近所述待滤波块到远离所述待滤波块的搜索方式,从所述第一像素集合中,获取所述第一相似块。
  87. 根据权利要求85或86所述的设备,其特征在于,所述获取单元进一步用于:
    在所述第一像素集合中搜索到的期望块的数量达到第二阈值时,将所述期望块作为所述第一相似块,并停止在所述第一像素集合中进行所述第一相似块的搜索,其中,用于表征所述待滤波块与所述期望块的相似度的参量的值超出第一阈值。
  88. 根据权利要求85或86所述的设备,其特征在于,所述获取单元进一步用于:
    在所述第一像素集合的所有像素中,搜索到的期望块的数量大于第二阈值时,按照相似度从高到低的方式,从搜索到的所述期望块中,确定数量等于所述第二阈值的所述第一相似块,其中,用于表征所述待滤波块与所述期望块的相似度的参量的值超出第一阈值。
  89. 根据权利要求85至88中任一项所述的设备,其特征在于,所述至少一个像素集合包括第二像素集合;
    所述确定单元进一步用于:
    根据前次得到的第一相似块包括的重建像素的位置,确定第二像素集合;
    所述获取单元进一步用于:
    从所述第二像素集合中,再次获取所述第一相似块。
  90. 根据权利要求89所述的设备,其特征在于,所述获取单元进一步用于:
    基于从靠近所述前次得到的所述第一相似块到远离所述前次得到的所述第一相似块的搜索方式,从所述第二像素集合中,再次获取所述第一相似块。
  91. 根据权利要求89或90所述的设备,其特征在于,所述获取单元进一步用于:
    在所述第二像素集合中搜索到的期望块的数量达到第三阈值时,将所述期望块确定为所述第一相似块,并停止在所述第二像素集合中进行所述第一相似块的搜索,其中,用于表征所述待滤波块与所述期望块的相似度的参量的值超出第一阈值。
  92. 根据权利要求89或90所述的设备,其特征在于,所述获取单元进一步用于:
    在所述第二像素集合的所有像素中,搜索到的期望块的数量大于第三阈值时,按照相似度从高到低的方式,从搜索到的所述期望块中,确定数量等于所述第三阈值的所述第一相似块,其中,用于表征所述待滤波块与所述期望块的相似度的参量的值超出第一阈值。
  93. 根据权利要求89至92中任一项所述的设备,其特征在于,所述获取单元进一步用于:
    所述第二像素集合中之前已经进行了相似块匹配操作的块,不再进行相似块的匹配操作;或者,
    所述第二像素集合中不包括已经进行了相似块匹配操作的块。
  94. 根据权利要求84至93中任一项所述的设备,其特征在于,所述设备还包括确定单元,用于:
    基于目标搜索模板,确定所述像素集合。
  95. 根据权利要求94所述的设备,其特征在于,所述目标搜索模板中的重建像素聚集为多个分散的图像块,每个图像块的大小大于或等于所述待滤波块的大小。
  96. 根据权利要求94或95所述的设备,其特征在于,所述目标搜索模板包括用于选择所述第一相似块的多个候选相似块,所述候选相似块的大小等于所述待滤波块的大小。
  97. 根据权利要求96所述的设备,其特征在于,所述目标搜索模板包括从中心到边缘的多组候选相似块,每组候选相似块块围成环形,所述环形相对所述目标搜索模板的中心对称,组内的候选相似块均匀排布。
  98. 根据权利要求97所述的设备,其特征在于,所述目标搜索模板包括四组候选相似块,所述四组候选相似块的远离所述目标搜索模板的中心的 边缘像素,相对于所述目标搜索模板的中心,分别间隔1个像素,2个像素,4个像素和8个像素。
  99. 根据权利要求97或98所述的设备,其特征在于,所述四组候选相似块分别具有4个候选相似块,8个候选相似块,8个候选相似块和8个候选相似块,其中,具有4个候选相似块的一组候选相似块距离所述目标搜索模板的中心最近。
  100. 根据权利要求94至99中任一项所述的设备,其特征在于,所述至少一个像素集合中,不同的像素集合是基于不同的目标搜索模板确定的。
  101. 根据权利要求94至100中任一项所述的设备,其特征在于,所述确定单元进一步用于:
    从多个候选搜索模板中,确定所述目标搜索模板。
  102. 根据权利要求101所述的设备,其特征在于,所述确定单元进一步用于:
    基于目标图像块中的至少一个待滤波块,从所述多个候选搜索模板的至少部分候选搜索模板中,确定第一搜索模板;
    其中,所述目标搜索模板包括所述第一搜索模板,所述第一搜索模板用于所述至少一个待滤波块获取目标相似块。
  103. 根据权利要求102所述的设备,其特征在于,所述确定单元进一步用于:
    针对所述至少一个待滤波块,遍历所述至少部分候选搜索模板中的各个候选搜索模板;
    根据遍历结果,从所述至少部分候选搜索模板中,确定所述第一搜索模板。
  104. 根据权利要求103所述的设备,其特征在于,所述遍历结果包括:
    针对所述至少一个待滤波块中全部滤波块,得到的相似块的相似度、相似块的总数量和获取相似块所需搜索的总块数中的至少一个;和/或,
    针对所述至少一个待滤波块中各个滤波块,分别得到的相似块的相似度、相似块的数量和获取相似块所需搜索的块数中的至少一个。
  105. 根据权利要求104所述的设备,其特征在于,所述第一搜索模板是所述至少部分候选搜索模板中满足以下条件的搜索模板:
    得到所述至少一个待滤波块中全部待滤波块的相似块的过程中,搜索的 总块数最少或小于等于第一阈值;和/或,
    针对所述至少一个待滤波块中全部待滤波块,得到的相似块的总数量最多和/或大于或等于第二阈值;和/或,
    针对所述至少一个待滤波块中全部待滤波块,得到的相似块的相似度的平均值最高和/或超出第三阈值。
  106. 根据权利要求102所述的设备,其特征在于,所述确定单元进一步用于:
    根据所述至少一个待滤波块的图像内容,从所述至少部分候选搜索模板中,确定所述第一搜索模板。
  107. 根据权利要求106所述的设备,其特征在于,所述至少一个待滤波块的图像内容包括:所述目标图像块的图像边缘的梯度方向和/或所述目标图像块周围像素与所述目标图像块的像素残差。
  108. 根据权利要求106或107所述的设备,其特征在于,所述确定单元进一步用于:
    根据所述至少一个待滤波块的图像边缘的梯度方向和/或所述目标图像块周围像素与所述目标图像块的像素残差,以及所述至少部分候选搜索模板的倾斜度,从所述至少部分候选搜索模板中,确定所述第一搜索模板。
  109. 根据权利要求102至104和106至108中任一项所述的设备,其特征在于,所述确定单元进一步用于:
    确定所述至少一个待滤波块中的各个待滤波块的优选搜索模板;
    根据所述各个待滤波块的优选搜索模板,确定所述第一搜索模板。
  110. 根据权利要求109所述的设备,其特征在于,将所述第一搜索模板作为优选搜索模板的待滤波块的数量最多和/或大于或等于第四阈值。
  111. 根据权利要求101至110中任一项所述的设备,其特征在于,所述确定单元进一步用于:
    从所述多个候选搜索模板中除所述至少部分搜索模板之外的搜索模板中,根据所述第一搜索模板,确定第二搜索模板。
  112. 根据权利要求101至111中任一项所述的设备,其特征在于,所述搜索模板包括多个子搜索模板;
    不同的搜索模板包括的子搜索模板不同和/或子搜索模板的使用顺序不同。
  113. 根据权利要求101至112中任一项所述的设备,其特征在于,所述设备用于编码端。
  114. 根据权利要求113所述的设备,其特征在于,所述设备还包括编码单元,用于:
    编码所述目标搜索模板的编号。
  115. 根据权利要求101至112中任一项所述的设备,其特征在于,所述设备用于解码端。
  116. 根据权利要求101所述的设备、其特征在于,所述设备用于解码端,所述确定单元进一步用于:
    从码流中获取所述目标搜索模板的编号;
    根据所述目标搜索模板的编号,从所述多个候选搜索模板中,确定所述目标搜索模板。
  117. 根据权利要求84至116中任一项所述的设备,其特征在于,所述设备还包括,确定单元用于:
    基于每个所述第一相似块的位置,分别确定像素窗口;
    所述获取单元进一步用于:
    在所述像素窗口内,获取所述第二相似块;
    所述滤波单元进一步用于:
    基于所述第一相似块和所述第二相似块,进行滤波。
  118. 根据权利要求117所述的设备,其特征在于,所述获取单元进一步用于:
    按照逐点扫描的方式,确定所述第二相似块。
  119. 根据权利要求117或118所述的设备,其特征在于,所述获取单元进一步用于:
    所述像素窗口中已进行了相似块匹配操作的块,不再进行相似块的匹配操作;或者,
    所述搜索窗口中不包括已经进行了相似块匹配操作的块。
  120. 根据权利要求117至119中任一项所述的设备,其特征在于,所述获取单元进一步用于:
    在所述像素窗口中搜索到的期望块的数量达到第四阈值时,将搜索到的所述期望块确定为所述第二相似块,并停止在所述像素窗口中进行所述第二 相似块的搜索,其中,用于表征所述待滤波块与所述期望块的相似度的参量的值超出第一阈值。
  121. 根据权利要求117至119中任一项所述的设备,其特征在于,所述获取单元进一步用于:
    在所述像素窗口中的所有像素中,搜索到的期望块的数量大于第四阈值时,按照相似度从高到低的方式,从所述期望块中,确定数量等于所述第四阈值的所述第二相似块,其中,用于表征所述待滤波块与所述期望块的相似度的参量的值超出第一阈值。
  122. 根据权利要求84至121中任一项所述的设备,其特征在于,用于表征所述待滤波块与所述待滤波块的相似块的相似度的参量的值超出第一阈值。
  123. 根据权利要求122所述的设备,其特征在于,所述第一阈值是基于以下参数中的至少一种确定的:
    所述待滤波块的大小,视频的比特深度,所述待滤波块的像素和,所述待滤波块的像素的水平梯度,所述待滤波块的像素的垂直梯度。
  124. 根据权利要求123所述的设备,其特征在于,在表征所述相似度的参量是哈希值的差值时,
    所述第一阈值是基于以下参数中的至少一种确定的:
    所述待滤波块的像素和,所述待滤波块的像素的水平梯度,所述待滤波块的像素的垂直梯度。
  125. 根据权利要求123所述的设备,其特征在于,在表征所述相似度的参量是误差平方和SSD或绝对误差和SAD时,
    所述第一阈值是基于以下参数中的至少一种确定的:所述待滤波块的大小,视频的比特深度。
  126. 根据权利要求123所述的设备,其特征在于,在表征所述相似度的参量是平均绝对差MAD,平均误差平方和MSD或结构相似性指标SSIM时,
    所述第一阈值是基于视频的比特深度确定的。
  127. 根据权利要求122至126中任一项所述的设备,其特征在于,所述设备由编码端实现;所述设备还包括编码单元,用于:
    确定所述第一阈值,以及将所述第一阈值进行编码。
  128. 根据权利要求122至126中任一项所述的设备,其特征在于,所述设备由解码端实现;所述获取单元进一步用于:
    获取码流中的所述第一阈值。
  129. 根据权利要求84至128中任一项所述的设备,其特征在于,表征相似度的参量为:哈希值的差值、SSD、SAD、MAD、MSD或SSIM。
  130. 根据权利要求84至129中任一项所述的设备,其特征在于,用于获取所述相似块的重建像素包括:
    所述待滤波块所属的编码单元的上侧的重建像素、所述编码单元的左侧的重建像素和所述编码单元的重建像素;或,
    所述编码单元的上侧的重建像素、所述编码单元的左侧的重建像素、所述编码单元的右侧的重建像素、所述编码单元的下侧的重建像素和所述编码单元的重建像素;或,
    所述编码单元的重建像素。
  131. 根据权利要求130所述的设备,其特征在于,所述编码单元的上侧的重建像素的垂直方向的像素个数少于或等于所述编码单元的左侧的重建像素的水平方向的像素个数。
  132. 根据权利要求84至131中任一项所述的设备,其特征在于,所述滤波单元进一步用于:
    基于所述至少一个第一相似块,构建结构数组;
    对所述结构数组进行分解;
    根据分解的结构数组,获得重建结构数组。
  133. 根据权利要求84至131中任一项所述的设备,其特征在于,所述滤波单元进一步用于:
    基于所述至少一个第一相似块的像素值的加权平均结果对所述待滤波块进行滤波。
  134. 一种用于视频处理的设备,其特征在于,包括确定单元、获取单元和滤波单元;其中,
    所述确定单元用于:从多个候选搜索模板中,确定目标搜索模板;
    所述获取单元用于:利用所述目标搜索模板,在当前图像的重建像素中,获取待滤波块的至少一个目标相似块;
    所述滤波单元用于:利用所述至少一个目标相似块,对所述待滤波块进 行滤波。
  135. 根据权利要求134所述的设备,其特征在于,所述确定单元进一步用于:
    基于目标图像块中的至少一个待滤波块,从所述多个候选搜索模板的至少部分候选搜索模板中,确定第一搜索模板;
    其中,所述目标搜索模板包括所述第一搜索模板,所述第一搜索模板用于所述至少一个待滤波块获取目标相似块。
  136. 根据权利要求135所述的设备,其特征在于,所述确定单元进一步用于:
    针对所述至少一个待滤波块,遍历所述至少部分候选搜索模板中的各个候选搜索模板;
    根据遍历结果,从所述至少部分候选搜索模板中,确定所述第一搜索模板。
  137. 根据权利要求136所述的设备,其特征在于,所述遍历结果包括:
    针对所述至少一个待滤波块中全部滤波块,得到的相似块的相似度、相似块的总数量和获取相似块所需搜索的总块数中的至少一个;和/或,
    针对所述至少一个待滤波块中各个滤波块,分别得到的相似块的相似度、相似块的数量和获取相似块所需搜索的块数中的至少一个。
  138. 根据权利要求137所述的设备,其特征在于,所述第一搜索模板是所述至少部分候选搜索模板中满足以下条件的搜索模板:
    得到所述至少一个待滤波块中全部待滤波块的相似块的过程中,搜索的总块数最少或小于等于第一阈值;和/或,
    针对所述至少一个待滤波块中全部待滤波块,得到的相似块的总数量最多和/或大于或等于第二阈值;和/或,
    针对所述至少一个待滤波块中全部待滤波块,得到的相似块的相似度的平均值最高和/或超出第三阈值。
  139. 根据权利要求135所述的设备,其特征在于,所述确定单元进一步用于:
    根据所述至少一个待滤波块的图像内容,从所述至少部分候选搜索模板中,确定所述第一搜索模板。
  140. 根据权利要求139所述的设备,其特征在于,所述至少一个待滤 波块的图像内容包括:所述目标图像块的图像边缘的梯度方向和/或所述目标图像块周围像素与所述目标图像块的像素残差。
  141. 根据权利要求139或140所述的设备,其特征在于,所述确定单元进一步用于:
    根据所述至少一个待滤波块的图像边缘的梯度方向和/或所述目标图像块周围像素与所述目标图像块的像素残差,以及所述至少部分候选搜索模板的倾斜度,从所述至少部分候选搜索模板中,确定所述第一搜索模板。
  142. 根据权利要求135至137和139至141中任一项所述的设备,其特征在于,所述确定单元进一步用于:
    确定所述至少一个待滤波块中的各个待滤波块的优选搜索模板;
    根据所述各个待滤波块的优选搜索模板,确定所述第一搜索模板。
  143. 根据权利要求142所述的设备,其特征在于,将所述第一搜索模板作为优选搜索模板的待滤波块的数量最多和/或大于或等于第四阈值。
  144. 根据权利要求135至143中任一项所述的设备,其特征在于,所述确定单元进一步用于:
    从所述多个候选搜索模板中除所述至少部分搜索模板之外的搜索模板中,根据所述第一搜索模板,确定第二搜索模板。
  145. 根据权利要求134至144中任一项所述的设备,其特征在于,所述搜索模板包括多个子搜索模板;
    不同的搜索模板包括的子搜索模板不同和/或子搜索模板的使用顺序不同。
  146. 根据权利要求145所述的设备,其特征在于,所述目标搜索模板包括L个子搜索模板;
    所述获取单元进一步用于:
    利用所述L个子搜索模板,进行L阶目标相似块的搜索,其中,第j阶目标相似块搜索得到的目标相似块用于进行第j+1阶目标相似块的搜索过程中的子搜索模板的固定,其中,j取值从1到L,L为大于或等于1的整数。
  147. 根据权利要求134至146中任一项所述的设备,其特征在于,所述目标搜索模板包括N个搜索模板;
    所述获取单元进一步用于:
    利用所述N个搜索模板,进行M阶目标相似块的搜索,其中,第i阶 目标相似块搜索得到的目标相似块用于进行第i+1阶目标相似块的搜索过程中的子搜索模板或目标搜索模板的固定,其中,i取值从1到M,M大于或等于N,N与M为大于或等于1的整数。
  148. 根据权利要求134至147中任一项所述的设备,其特征在于,所述滤波单元进一步用于:
    基于所述至少一个目标相似块,构建结构数组;
    对所述结构数组进行分解;
    根据分解的结构数组,获得重建结构数组。
  149. 根据权利要求134至148中任一项所述的设备,其特征在于,所述滤波单元进一步用于:
    基于所述至少一个目标相似块的像素值的加权平均结果对所述待滤波块进行滤波。
  150. 根据权利要求134至149中任一项所述的设备,其特征在于,所述设备用于编码端。
  151. 根据权利要求150所述的设备,其特征在于,所述设备还包括编码单元,用于:
    编码所述目标搜索模板的编号,以传递给解码端。
  152. 根据权利要求134至149中任一项所述的设备,其特征在于,所述设备用于解码端。
  153. 根据权利要求134所述的设备、其特征在于,所述设备用于解码端,所述确定单元进一步用于:
    从码流中获取所述目标搜索模板的编号;
    根据所述目标搜索模板的编号,从所述多个候选搜索模板中,确定所述目标搜索模板。
  154. 一种用于视频处理的设备,其特征在于,获取单元和滤波单元;其中,
    所述获取单元用于:从重建像素中,获取待滤波块的至少一个相似块,所述待滤波块包括至少一个重建像素,其中,用于表征所述待滤波块与所述相似块的相似度的参量的值超出第一阈值;
    所述滤波单元用于:基于所述至少一个相似块,对所述待滤波块进行滤波。
  155. 根据权利要求154所述的设备,其特征在于,所述相似块的数量小于或等于第二阈值。
  156. 根据权利要求155所述的设备,其特征在于,所述获取单元进一步用于:
    在搜索到的期望块的数量达到所述第二阈值时,将所述期望块作为所述相似块,并停止所述相似块的搜索,其中,用于表征所述待滤波块与所述期望块的相似度的参量的值超出第一阈值。
  157. 根据权利要求155所述的设备,其特征在于,所述获取单元进一步用于:
    在所述重建像素的所有像素中,搜索到的期望块的数量大于所述第二阈值时,按照相似度从高到低的方式,从所述期望块中,确定数量等于所述第二阈值的所述相似块,其中,用于表征所述待滤波块与所述期望块的相似度的参量的值超出第一阈值。
  158. 根据权利要求154至157中任一项所述的设备,其特征在于,所述第一阈值是基于以下参数中的至少一种确定的:
    所述待滤波块的大小,视频的比特深度,所述待滤波块的像素和,所述待滤波块的像素的水平梯度,所述待滤波块的像素的垂直梯度。
  159. 根据权利要求158所述的设备,其特征在于,在表征所述相似度的参量是哈希值的差值时,
    所述第一阈值是基于以下参数中的至少一种确定的:
    所述待滤波块的像素和,所述待滤波块的像素的水平梯度,所述待滤波块的像素的垂直梯度。
  160. 根据权利要求158所述的设备,其特征在于,在表征所述相似度的参量是误差平方和SSD或绝对误差和SAD时,
    所述第一阈值是基于以下参数中的至少一种确定的:所述待滤波块的大小,视频的比特深度。
  161. 根据权利要求158所述的设备,其特征在于,在表征所述相似度的参量是平均绝对差MAD,平均误差平方和MSD或结构相似性指标SSIM时,
    所述第一阈值是基于视频的比特深度确定的。
  162. 根据权利要求154至161中任一项所述的设备,其特征在于,表 征相似度的参量为:哈希值的差值、SSD、SAD、MAD、MSD或SSIM。
  163. 根据权利要求154至162中任一项所述的设备,其特征在于,所述设备由编码端实现;所述设备还包括编码单元,用于:
    所述编码端确定所述第一阈值,以及将所述第一阈值进行编码。
  164. 根据权利要求154至162中任一项所述的设备,其特征在于,所述设备由解码端实现;所述获取单元进一步用于:
    获取码流中的所述第一阈值。
  165. 根据权利要求154至164中任一项所述的设备,其特征在于,所述滤波单元进一步用于:
    基于所述至少一个相似块,构建结构数组;
    对所述结构数组进行分解;
    根据分解的结构数组,获得重建结构数组。
  166. 根据权利要求154至164中任一项所述的设备,其特征在于,所述滤波单元进一步用于:
    基于所述至少一个相似块的像素值的加权平均结果对所述待滤波块进行滤波。
PCT/CN2018/089669 2018-04-02 2018-06-01 用于视频处理的方法和设备 WO2019192071A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201880012519.8A CN110383837B (zh) 2018-04-02 2018-06-01 用于视频处理的方法和设备

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CNPCT/CN2018/081653 2018-04-02
PCT/CN2018/081653 WO2019191891A1 (zh) 2018-04-02 2018-04-02 用于视频处理的方法和设备

Publications (1)

Publication Number Publication Date
WO2019192071A1 true WO2019192071A1 (zh) 2019-10-10

Family

ID=68099773

Family Applications (2)

Application Number Title Priority Date Filing Date
PCT/CN2018/081653 WO2019191891A1 (zh) 2018-04-02 2018-04-02 用于视频处理的方法和设备
PCT/CN2018/089669 WO2019192071A1 (zh) 2018-04-02 2018-06-01 用于视频处理的方法和设备

Family Applications Before (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/081653 WO2019191891A1 (zh) 2018-04-02 2018-04-02 用于视频处理的方法和设备

Country Status (2)

Country Link
CN (2) CN110352599A (zh)
WO (2) WO2019191891A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111914890B (zh) * 2020-06-23 2024-05-14 北京迈格威科技有限公司 图像之间的图像块匹配方法、图像配准方法和产品
CN112804528B (zh) * 2021-02-05 2022-10-28 北京字节跳动网络技术有限公司 屏幕内容处理方法、装置及设备
CN113382246B (zh) * 2021-04-20 2024-03-01 浙江大华技术股份有限公司 编码方法、装置、电子设备及计算机可读存储介质
CN118175311A (zh) * 2022-12-09 2024-06-11 腾讯科技(深圳)有限公司 视频数据处理方法、装置、存储介质及设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103020918A (zh) * 2013-01-09 2013-04-03 西安电子科技大学 基于形状自适应邻域均值的非局部均值去噪方法
CN103473740A (zh) * 2013-08-31 2013-12-25 西安电子科技大学 基于稀疏表示和低秩双重约束的非局部去噪方法
CN105763881A (zh) * 2016-02-23 2016-07-13 北京大学 利用图像非局部结构相似性特征的视频编码图像滤波方法
CN105791877A (zh) * 2016-03-15 2016-07-20 北京大学 视频编解码中自适应环路滤波的方法
US9576346B2 (en) * 2015-03-24 2017-02-21 Intel Corporation Non-local means image denoising with an adaptive directional spatial filter

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7315655B2 (en) * 2004-06-30 2008-01-01 Comet Technologies Llc Method of data compression including compression of video data
KR100896279B1 (ko) * 2005-04-15 2009-05-07 엘지전자 주식회사 영상 신호의 스케일러블 인코딩 및 디코딩 방법
CN101783957B (zh) * 2010-03-12 2012-04-18 清华大学 一种视频预测编码方法和装置
CN101833667A (zh) * 2010-04-21 2010-09-15 中国科学院半导体研究所 一种基于分组稀疏表示的模式识别分类方法
CN101895297B (zh) * 2010-07-30 2012-12-26 哈尔滨工业大学 一种面向压缩感知的块稀疏信号重构方法
CN102164282B (zh) * 2011-04-29 2013-12-11 中南民族大学 一种用于图像编码的基于系数随机置换的压缩感知方法及***
CN105096351B (zh) * 2014-05-19 2018-04-17 北京大学 图像去块效应处理方法和装置
CN106572832A (zh) * 2014-07-30 2017-04-19 株式会社日立制作所 数据处理方法、数据处理装置以及x射线ct装置
CN106327422B (zh) * 2015-07-01 2019-05-07 北京大学 一种图像风格化重建方法及装置
CN105513026B (zh) * 2015-12-17 2019-05-21 浙江大学 一种基于图像非局部相似的压缩感知重构方法
CN107292852B (zh) * 2017-07-19 2020-05-05 南京邮电大学 一种基于低秩理论的图像去噪算法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103020918A (zh) * 2013-01-09 2013-04-03 西安电子科技大学 基于形状自适应邻域均值的非局部均值去噪方法
CN103473740A (zh) * 2013-08-31 2013-12-25 西安电子科技大学 基于稀疏表示和低秩双重约束的非局部去噪方法
US9576346B2 (en) * 2015-03-24 2017-02-21 Intel Corporation Non-local means image denoising with an adaptive directional spatial filter
CN105763881A (zh) * 2016-02-23 2016-07-13 北京大学 利用图像非局部结构相似性特征的视频编码图像滤波方法
CN105791877A (zh) * 2016-03-15 2016-07-20 北京大学 视频编解码中自适应环路滤波的方法

Also Published As

Publication number Publication date
CN110383837B (zh) 2021-10-22
CN110383837A (zh) 2019-10-25
WO2019191891A1 (zh) 2019-10-10
CN110352599A (zh) 2019-10-18

Similar Documents

Publication Publication Date Title
JP7024897B2 (ja) Hevcビデオ符号化における論理的イントラモードネーミング
WO2019192071A1 (zh) 用于视频处理的方法和设备
CN108028941B (zh) 用于通过超像素编码和解码数字图像的方法和装置
KR102252816B1 (ko) 부호화유닛 심도 확정 방법 및 장치
US20150016521A1 (en) Video encoder for images
US10536692B2 (en) Picture prediction method and related apparatus
WO2016180129A1 (zh) 预测模式选择方法、装置及设备
BR122020024465B1 (pt) Método para decodificar uma imagem
Pavez et al. GTT: Graph template transforms with applications to image coding
US11394966B2 (en) Video encoding and decoding method and apparatus
Song et al. Lossless medical image compression using geometry-adaptive partitioning and least square-based prediction
US11212527B2 (en) Entropy-inspired directional filtering for image coding
CN114731160A (zh) 环路滤波器块灵活分区
JP2024054290A (ja) イントラ予測方法及び装置、コンピュータ可読記憶媒体
JP2024087036A (ja) 画像およびビデオ圧縮のイントラ予測
CN111669595A (zh) 一种屏幕内容编码方法、装置、设备和介质
CN108200439A (zh) 提高数字信号变换性能的方法及数字信号变换方法和装置
Emara et al. Image compression using advanced optimization algorithms
Xu et al. Detecting double H. 266/VVC compression with the same coding parameters
CN116760983B (zh) 用于视频编码的环路滤波方法及装置
WO2019191888A1 (zh) 环路滤波的方法、装置和计算机***
CN111279706B (zh) 环路滤波的方法、装置、计算机***和可移动设备
WO2023023914A1 (zh) 帧内预测、编解码方法及装置、编解码器、设备、介质
WO2019191887A1 (zh) 运动补偿的方法、装置和计算机***
JP6737699B2 (ja) 線形予測係数出力方法、線形予測係数出力装置及び線形予測係数出力プログラム

Legal Events

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

Ref document number: 18913305

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18913305

Country of ref document: EP

Kind code of ref document: A1