Dct coefficient loss error concealment method and system based on spatial feature analysis

CN122989460APending Publication Date: 2026-10-27SHANGHAI COOL CORE SEMICONDUCTOR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611120537.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-27
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

而传统的空域插值方法通常采用统一的、各向同性的平滑处理,这种方式无法区分错误块的特征,在修复过程中容易破坏图像原有的结构特征,如边缘和方向性纹理,导致修复后的图像区域变得模糊,甚至可能引入新的块效应,视觉质量不佳

Benefits of technology

1、本发明通过对错误块的空域特征进行诊断,并根据诊断结果相应处理,例如对具有方向性的错误块采用方向性插值,对平坦区域的错误块采用平滑处理。这种自适应策略能够最大程度地保留和恢复图像的边缘与纹理细节,显著减少由传统方法引入的模糊和块效应,从而提升重建图像的整体视觉质量。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122989460A_ABST
    Figure CN122989460A_ABST
Patent Text Reader

Abstract

The application provides a DCT coefficient loss error concealment method and system based on space feature analysis, and belongs to the technical field of digital image processing. The scheme first locates the image error block formed by the transmission packet loss and DCT coefficient damage, and sequentially completes three types of feature detection of the error block symmetry, texture directionality, pixel dynamic range and smoothness in the pixel space domain; according to the feature results, the reconstruction strategy is adaptively matched: the mean smooth repair with micro disturbance is adopted for the symmetric / flat block, the directional neighborhood interpolation is carried out along the texture for the strong texture direction block, and the extreme value constraint nonlinear mapping is implemented for the pixel dynamic range abnormal block. The application is operated in the space domain all the time, avoids the high computing power overhead brought by the frequency domain transformation, does not need to rely on the DCT frequency domain model, can still effectively protect the image edge and texture details under the severe packet loss scene, suppresses the mosaic and block effect, has low calculation amount, and meets the real-time image processing demand of the resource limited equipment such as decoder.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of digital image processing technology, and more specifically, to a method and system for masking DCT coefficient loss errors based on spatial domain feature analysis. Background Technology

[0002] In digital image communication applications such as wireless image or video transmission, image data may be affected by channel interference or network packet loss during transmission, leading to errors or loss of data received at the decoding end, such as the loss of discrete cosine transform coefficients. These errors are reflected in the final displayed image as blocky errors such as mosaic or screen tearing, severely impacting the user's visual experience. To repair these damaged images, various error masking techniques have been proposed in the existing technology.

[0003] Currently, error masking techniques can be mainly divided into frequency domain methods and spatial domain interpolation methods. Frequency domain methods attempt to recover lost coefficients in the transform domain, such as the discrete cosine transform domain. However, these methods are usually computationally complex, and their recovery effect heavily depends on the accuracy of the frequency domain model used. When the channel error is severe, resulting in the loss of a large number of coefficients, the model may fail, and the recovery effect will significantly decrease. Spatial domain interpolation methods directly interpolate and repair the erroneous blocks in the pixel domain, such as by using neighborhood pixel averaging. Although these methods are computationally simple, their main drawback is that they fail to deeply analyze the nature of the erroneous blocks. Specifically, erroneous blocks caused by the loss of discrete cosine transform coefficients often exhibit specific texture patterns in their pixel distribution in the spatial domain. Traditional spatial domain interpolation methods usually use uniform, isotropic smoothing, which cannot distinguish the characteristics of the erroneous blocks. During the repair process, it is easy to destroy the original structural features of the image, such as edges and directional textures, resulting in blurred repaired image areas and even introducing new block artifacts, leading to poor visual quality.

[0004] Therefore, there is an urgent need in the market for a method and system for masking DCT coefficient loss based on spatial domain feature analysis that can overcome the above-mentioned technical defects, thereby achieving high-quality restoration of damaged image blocks with low computational cost and effectively preserving the texture and edge details of the original image. Summary of the Invention

[0005] To address the shortcomings of existing technologies, the purpose of this invention is to provide a method and system for masking DCT coefficient loss errors based on spatial domain feature analysis.

[0006] An image error masking method based on spatial domain feature analysis according to the present invention includes: Detect and locate erroneous blocks in image data; Feature analysis of the pixel distribution pattern of the erroneous block in the spatial domain is performed to identify its spatial characteristics; Based on the analysis results of the spatial characteristics, the corresponding spatial reconstruction strategy is adaptively selected and executed to recover the erroneous block.

[0007] Preferably, the spatial feature analysis of the erroneous block includes at least one of the following: A symmetry test is performed to determine whether the erroneous block has a symmetry pattern such as horizontal, vertical, or central symmetry. Directional detection is performed by calculating gradients in different directions within a block to analyze whether there are obvious directional textures or edges. Dynamic range and smoothness detection are performed to analyze the dynamic range of pixel values ​​within a block and the degree of drastic local changes.

[0008] Preferably, the adaptive spatial reconstruction strategy includes: When the erroneous block is detected to have obvious symmetry or smooth pixel changes, a mean smoothing strategy is adopted. The mean pixel value of the erroneous block is calculated and replaced with the mean pixel value in the block to restore the smoothness of the region.

[0009] Preferably, the adaptive spatial domain reconstruction strategy further includes: When the dynamic range of the erroneous block is detected to be extremely large or the local changes are drastic, a spatial extremum constraint strategy is adopted to constrain the pixels within the block with extrema and perform nonlinear mapping, limiting them to a reasonable range based on the statistics of the surrounding correct pixels, so as to suppress abnormal visual impact.

[0010] Preferably, the adaptive spatial domain reconstruction strategy further includes: When the erroneous block is detected to have obvious directional features, a directional neighborhood interpolation strategy is adopted to interpolate along the detected edge or texture direction using the correct neighboring pixels in that direction, so as to maintain the continuity of the edge.

[0011] Preferably, a micro-perturbation is added to fill the entire block when calculating the pixel mean of the erroneous block.

[0012] An image error masking system based on spatial domain feature analysis provided by the present invention is used to execute the image error masking method based on spatial domain feature analysis, comprising: The error detection module is used to detect and locate error blocks in the image; The feature analysis module is used to perform spatial domain feature analysis on the erroneous block in order to identify its spatial domain features; An adaptive reconstruction module is used to adaptively select and execute a corresponding spatial reconstruction strategy to repair the erroneous block based on the analysis results of the feature analysis module.

[0013] Preferably, the feature analysis module is configured to perform at least one of symmetry detection, orientation detection, and dynamic range and smoothness detection.

[0014] Preferably, the adaptive reconstruction module is configured to select one of the following strategies—mean smoothing, spatial extremum constraint, and directional neighborhood interpolation—to repair the erroneous block based on the analysis results.

[0015] Preferably, the adaptive reconstruction module includes: The mean smoothing submodule is used to execute the mean smoothing strategy; The directional neighborhood interpolation submodule is used to execute the directional neighborhood interpolation strategy; The spatial extremum constraint submodule is used to execute spatial extremum constraint strategies; The feature analysis module includes: The symmetry detection unit is responsible for performing the calculation and judgment logic of horizontal, vertical and central symmetry; The directional / edge detection unit is responsible for performing vertical and horizontal gradient detection; The dynamic range and smoothness detection unit is responsible for performing dynamic range calculation, flatness judgment, and necessary extreme value suppression preprocessing.

[0016] Compared with the prior art, the present invention has the following beneficial effects: 1. This invention diagnoses the spatial features of erroneous blocks and processes them accordingly, such as using directional interpolation for directional erroneous blocks and smoothing for erroneous blocks in flat regions. This adaptive strategy can preserve and restore the edge and texture details of the image to the greatest extent, significantly reducing the blurring and block artifacts introduced by traditional methods, thereby improving the overall visual quality of the reconstructed image.

[0017] 2. This invention operates entirely on pixels in the spatial domain, avoiding the complex forward and inverse transformation processes and the reliance on solving frequency domain models found in frequency domain methods. Therefore, this application requires less computation, processes faster, and is more suitable for real-time processing on resource-constrained devices such as decoders.

[0018] 3. This invention does not rely on a specific frequency domain model. Therefore, even in severe cases with serious channel errors and loss of multiple discrete cosine transform coefficients, it can still effectively repair the problem by analyzing the residual pixel patterns, demonstrating better robustness and adaptability than traditional frequency domain methods. Attached Figure Description

[0019] Other features, objects, and advantages of the present invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is a schematic diagram of the working method of the present invention. Detailed Implementation

[0020] The present invention will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present invention, but do not limit the invention in any way. It should be noted that those skilled in the art can make several changes and improvements without departing from the concept of the present invention. These all fall within the protection scope of the present invention.

[0021] This invention operates entirely in the spatial domain at the decoding end. By analyzing the pixel distribution pattern of erroneous blocks caused by the loss of DCT coefficients, it identifies the spatial features (such as symmetry and directionality) of the DCT-like base image. Based on the diagnostic results of these features, it adaptively selects the most suitable spatial strategy (such as mean smoothing, extreme value constraint, and directional interpolation) to reconstruct the erroneous blocks, thereby achieving accurate restoration of image texture and avoiding image blurring and block effects caused by traditional methods.

[0022] Example 1 According to the present invention, a method for masking DCT coefficient loss errors based on spatial domain feature analysis is provided, such as... Figure 1 As shown, it includes: Step S1: Error Block Detection and Location. At the decoding end, the system detects and locates image macroblocks / blocks (such as 8x8 pixel blocks) that have lost or are erroneous due to transmission errors in DCT coefficients. In other words, during image or video decoding, the system first needs to identify image blocks with data errors or missing data, with the aim of accurately locating the areas in the image that need repair. It should be noted that this detection and location function can be implemented using the decoder's underlying error detection mechanism. For example, in mainstream video coding standards such as MPEG, H.264 / AVC, or H.265 / HEVC, the data stream itself contains rich syntax structures and checksum information. When the decoder parses the bitstream, if it finds that a data packet is missing, the data of a macroblock or coding unit does not conform to the syntax rules, or its cyclic redundancy check fails, the decoder can mark the macroblock or coding unit as an error block. In this embodiment, it is assumed that the basic unit of processing is an 8x8 pixel block, but this is not a limitation; other sizes, such as 16x16 pixel macroblocks, can also be used. Once a block is marked as an error, the system records its position coordinates in the image and passes its pixel data to subsequent processing steps.

[0023] Step S2: Spatial Feature Analysis of Error Blocks. This involves directly analyzing the pixel distribution patterns of the error blocks located in Step S1 in the spatial domain (rather than the transform domain). The core idea is that different types of lost discrete cosine transform coefficients will produce artifacts with specific patterns in the spatial domain. By identifying these patterns in the spatial domain, the root cause of the error can be diagnosed, thus providing a basis for subsequent adaptive repair. The core of this analysis is identifying the spatial texture patterns presented by the loss of specific DCT basis image coefficients.

[0024] Assume we are currently processing a size of (in, Error block B, its pixel value is Where i and j are the coordinates within the block. Spatial feature analysis specifically includes the following detections: Step S2.1: Symmetry Detection. Calculate the similarity of corresponding positions of pixels within the block in the horizontal, vertical, diagonal, or after rotating 180 degrees around the center to determine whether the erroneous block exhibits a certain symmetry pattern. This step aims to determine whether the erroneous block displays a certain symmetry, which typically occurs when the lost discrete cosine transform coefficients are mainly low-frequency components. For example, retaining only DC coefficients or a few low-frequency AC coefficients will result in a smooth and symmetrical gradient pattern within the block. Specific detection methods may include: Lateral axisymmetry detection: Used to determine whether an erroneous block is symmetrical about its vertical central axis. To ensure robustness, it compares not only symmetrical points but also texture information within the block. The specific calculation process is as follows: First, given... and Then, the average difference between the left and right symmetrical points. As shown in the following formula:

[0025] This value measures the similarity between the pixels in the left and right columns of a block. Next, to eliminate interference from flat blocks (i.e., similarity between the left and right sides only due to the absence of content within the block), the internal differences on the left side need to be calculated. Differences between the right and internal sides The formulas are as follows:

[0026]

[0027] These two values ​​reflect the degree of pixel variation in the left and right edge regions of the block. Ultimately, the condition for determining whether it is horizontally symmetrical is:

[0028] This composite condition means that the pixel heights of the left and right edges of the block are similar, but at the same time there are enough pixel variations within the left and right parts of the block, which constitutes meaningful symmetry.

[0029] Vertical axisymmetry detection: Similar to horizontal axisymmetry detection, it is used to determine whether an erroneous block is symmetrical about its horizontal central axis. First, given... and Calculate the average difference between the upper and lower symmetrical points. As shown in the following formula:

[0030] Accordingly, calculate the internal differences on the upper side. Differences between the lower and internal sides Their formulas are respectively

[0031]

[0032] The conditions for determining whether it is longitudinally axially symmetric (about the horizontal midline) are as follows: .

[0033] Central symmetry detection: Used to determine whether an erroneous block is symmetric about its center point. This symmetry may occur in certain AC coefficient loss modes. First, given... and As shown in the following formula:

[0034] And calculate the corner difference. (Difference between maximum and minimum values):

[0035] Simultaneously, the difference between reference points near a center can be calculated. For example, take the first The formula for row 1 and column 1 is as follows:

[0036] Define the block after rotating 180 degrees (Equivalent to flipping horizontally and then vertically):

[0037] Then, calculate the original block B and the block obtained by rotating it 180 degrees. Overall average absolute difference between :

[0038] The conditions for determining whether something is centrally symmetric (symmetric about 180 degrees of rotation) are:

[0039] This condition means that there are significant pixel variations within the block (non-flat block), while its structure remains essentially unchanged after being rotated 180 degrees.

[0040] Furthermore, this analysis step includes step S2.2, directionality / edge detection. This step is used to analyze whether there are dominant directional textures or edges within the erroneous block, a phenomenon typically associated with the loss of mid-frequency AC coefficients in a specific direction. By calculating gradients in different directions within the block, it analyzes whether there are obvious directional textures or edges, determining whether they are similar to those caused by the loss of AC basis images in a specific direction. Specific detection may include: Vertical gradient detection: Used to determine whether a stable gradient exists within a block, either from top to bottom or from bottom to top. Given a new set of thresholds, such as T... sim1 (Similarity threshold 1), T diff1 (Difference threshold 1).

[0041] Calculate the mean absolute difference between the corresponding positions of the outer layer corresponding point pairs (row 1 and row h) and the inner layer corresponding point pairs (row 2 and row h-1), respectively. Corresponding points in the inner layer They are respectively:

[0042]

[0043] Mean absolute difference at corresponding positions in the outer layer for:

[0044] Mean absolute difference at corresponding positions in the inner layer for:

[0045] Simultaneously calculate the standard deviation of the differences between the four corresponding points in the outer layer. (or difference mean) and the standard deviation of the difference between the four corresponding points in the inner layer. (or difference mean):

[0046]

[0047] in, . This represents the absolute pixel difference between the first row (top edge) and the h-th row (bottom edge) of an image patch at the same column position j. It measures the similarity of the outer pixels of the patch in the vertical direction, reflecting the grayscale changes at the top and bottom edges. This indicates the second row and the h-th row of the image patch. The absolute difference of pixels at column position j in row 1 (i.e., the second to last row). Measures the similarity of inner (near the center) pixels in the vertical direction of the block, used to detect the consistency of gradient trends.

[0048]

[0049] Finally, define the difference between the upper and lower endpoints on the same side (e.g., the left side). :

[0050] The conditions for determining a vertical gradient are:

[0051] Determining Horizontal Gradients: Similar to detecting vertical gradients, the existence of horizontal gradients can be determined by swapping rows and columns. This involves calculating the corresponding differences between the outer layer (column 1 and column w) and the inner layer (column 2 and column w-1), where the corresponding points in the outer layer... Corresponding points in the inner layer They are respectively:

[0052]

[0053] Mean absolute difference at corresponding positions in the outer layer The average absolute difference between the inner and corresponding positions They are respectively:

[0054]

[0055] Calculate the standard deviation of the differences between the four corresponding points in the outer layer. (Difference mean) and the standard deviation of the difference between the four corresponding points in the inner layer The (difference mean) are as follows:

[0056]

[0057] in,, , . The absolute difference in pixels at position i in the same row between column 1 (left edge) and column w (right edge) of an image patch. Measures the similarity of the outer pixels of the patch in the horizontal direction, reflecting the grayscale changes at the left and right edges. The second column of the sub-image block and the w-th The absolute difference of pixels at position i in the same row of column 1 (i.e., the second to last column). Measures the similarity of inner (near the center) pixels in the horizontal direction of the block, used to detect the consistency of horizontal gradient trends.

[0058] Finally, calculate the difference between the left and right endpoints of the same row:

[0059] The conditions for determining a gradient to be horizontal are:

[0060] Additionally, this analysis step also includes step S2.3, dynamic range and smoothness detection. This step is used to evaluate the pixel value distribution of the erroneous block, especially whether there are extreme values ​​or whether the overall distribution is flat. The dynamic range (difference between the maximum and minimum values) of the pixel values ​​within the block and the degree of local variation are analyzed to assess the complexity of the error. Specifically, firstly, the dynamic range of the pixel values ​​within the block is calculated. :

[0061] like The value is very large, for example, for an 8-bit image. >240 (Pixel value variation exceeds 240, approaching the full range of 0) If the value is 255, it indicates that there may be extreme bright or dark spots within the block due to errors in high-frequency coefficients. These spots are visually very abrupt. In this case, extreme value suppression processing can be performed. For example, mapping can be performed on each pixel B(i,j) within the block, as shown in the following formula:

[0062] in To conform to uniformly distributed random noise, It represents a uniform distribution on the interval [0,1]. , , This random perturbation is introduced to avoid mapping all extreme values ​​to the same value, thus creating new unnaturally flat regions. Conversely, if the value of R is very small, for example, less than a certain flatness threshold, then the block can be marked as a flat block.

[0063] Update image patches after processing: .

[0064] After completing the above series of spatial feature analyses, step S3, adaptive spatial reconstruction, is then executed. Based on the analysis results of step S2, this step adaptively selects and executes the corresponding spatial reconstruction strategy to recover the erroneous block.

[0065] At the start of the decision-making process, the analysis results of step S2 are checked first. If the result of the symmetry detection step S2.1 indicates that the current block has obvious symmetry (i.e., If true), or if the result of dynamic range and smoothness detection step S2.3 indicates that the block is a flat block (i.e., ...). If true, then choose strategy A: mean smoothing step S3.1.

[0066] Strategy A: Mean Smoothing and Micro-Perturbation Step S3.1. This strategy is suitable for repairing error blocks with flat content or simple symmetry. Specifically, a symmetry determination criterion is defined. :

[0067] in,

[0068]

[0069]

[0070] In the formula , and These respectively represent the symbols for horizontal axisymmetry, vertical axisymmetry, and central symmetry.

[0071] Define the smoothness criterion (small pixel change):

[0072] Smoothing Trigger Conditions :

[0073] During execution, the average value of all pixels within error block B is first calculated. The formula is as follows:

[0074] Then, the value of each pixel B(i,j) within the block is reset to the mean value μ. As a preferred implementation, to avoid a block effect caused by completely flat edges, a small random perturbation can be added to the mean value. ,Right now,

[0075] in, For small random perturbations with a mean of 0:

[0076] Update image patches after processing: This perturbation helps the reconstructed block blend better into the surrounding image texture.

[0077] If the current block is neither symmetrical nor flat, the decision process continues to evaluate the result of the directionality / edge detection step S2.2. If the block is detected to have obvious directional features (i.e., For example, true or If true, then choose strategy C: directional neighborhood interpolation step S3.3.

[0078] Strategy C: Directional Neighborhood Interpolation Step S3.3. This strategy is specifically designed to repair erroneous blocks with clear edge or texture directions. Its core idea is to interpolate along the detected structural direction to maintain structural continuity. For example, if step S2.2 detects a significant vertical gradient in block B, the repair should primarily utilize the information from its correct neighboring blocks above and below it. Directional determination flag:

[0079] This indicates the result of the horizontal gradient detection (gradual change from left to right). This indicates the result of the longitudinal gradient detection (gradual change from top to bottom).

[0080] When the directional / edge detection step detects an erroneous block with obvious directional features, interpolation is performed along the detected edge or texture direction using the correct neighboring pixels in that direction to maintain edge continuity, rather than using isotropic bilinear interpolation. The directional interpolation rule is as follows:

[0081] In the formula, This represents the pixel value in the i-th row and j-th column of the image patch after directional interpolation repair. For each pixel location within the erroneous block, the corresponding interpolation method is selected to calculate the restored value based on the detected directional features. `interpvertical(i,j)` represents horizontal gradient interpolation (along the horizontal direction), suitable for cases where `is_horizontal_gradient = true` is detected. It performs linear interpolation within each row using the correct neighboring pixels on the left and right sides of the block. `interpvertical(i,j)` represents vertical gradient interpolation (along the vertical direction), suitable for cases where `is_vertical_gradient = true` is detected. It performs linear interpolation within each column using the correct neighboring pixels on the top and bottom sides of the block. `interpisotropic(i,j)` represents isotropic bilinear interpolation, suitable for cases where no obvious directional features are detected. It performs bilinear interpolation using the correct neighboring pixels at the four corners of the block. This directional interpolation method effectively reconstructs edges, avoiding the edge blurring problems caused by traditional isotropic interpolation (such as bilinear interpolation).

[0082] If the block does not satisfy the conditions of symmetry or flatness, nor does it satisfy the condition of having obvious directionality, the decision-making process will enter the default or more complex processing branch, namely strategy B: spatial extremum constraint step S3.2.

[0083] Strategy B: Spatial Extremum Constraints and Texture Preservation Step S3.2. When the dynamic range and smoothness detection steps detect that the current block has an extremely large dynamic range or drastic local changes, and no obvious symmetry is found, extremum constraints and nonlinear mapping are applied to the pixels within the block to limit them to a reasonable range obtained from the statistics of the surrounding correct pixels, in order to suppress abnormal visual impact and attempt to preserve texture trends.

[0084] Extreme value constraints refer to the principle that, from the perspective of natural images, data will not be concentrated in a range of extreme values. Most image pixels are concentrated between 16 and 235, while the actual YUV range is 0-255. When pixel values ​​of 0-16 or 235-255 appear, it is highly likely that an error has occurred. To constrain this error, we can: 1. Directly set a threshold for intervention, such as truncating to the range of pixel values ​​of 16-235 or 16-240, which is determined by experience.

[0085] 2. Alternatively, due to the correlation of the image, the average value can be taken from the surrounding correct pixels, allowing for a certain degree of fluctuation, which is also set as a threshold and constrained within this range.

[0086] Through the complete process of steps S1, S2 and S3 described above, the method of this embodiment of the invention can intelligently and adaptively repair erroneous blocks in decoded images, thereby improving the visual quality of error masking.

[0087] Example 2 The present invention also provides a DCT coefficient loss error masking system based on spatial domain feature analysis. The DCT coefficient loss error masking system based on spatial domain feature analysis can be implemented by executing the process steps of the DCT coefficient loss error masking method based on spatial domain feature analysis. That is, those skilled in the art can understand the DCT coefficient loss error masking method based on spatial domain feature analysis as a preferred embodiment of the DCT coefficient loss error masking system based on spatial domain feature analysis.

[0088] According to the present invention, a DCT coefficient loss error masking system based on spatial domain feature analysis is provided, which is designed to perform the method described in Embodiment 1 above. The system can be implemented as a hardware entity, for example, integrated into a dedicated image processing chip or field-programmable gate array; or it can be implemented as a software module, running on a general-purpose processor, digital signal processor, or graphics processing unit.

[0089] The error masking system consists of three core modules that work together: an error detection module, a feature analysis module, and an adaptive reconstruction module.

[0090] The error detection module performs the aforementioned error block detection and location step S1. This module is typically tightly coupled to the core logic of the decoder, responsible for monitoring the data flow during decoding and capturing error signals emitted by the decoder. For example, when the decoder attempts to decode a data block but finds the data incomplete or the checksum incorrect, it sends a notification containing the error block location information to the error detection module. Upon receiving this notification, the error detection module packages the block's coordinates and the invalid pixel data currently in the frame buffer for that error block into a processing task and passes it to the feature analysis module.

[0091] The feature analysis module is responsible for performing the aforementioned error block spatial feature analysis step S2. This module receives error block data from the error detection module. Internally, it can be designed to include multiple parallel processing units to improve analysis speed. Specifically, this module includes: a symmetry detection unit, responsible for performing the calculation and judgment logic of lateral, longitudinal, and central symmetry described in step S2.1, whose input is the pixel matrix of the error block and output is one or more Boolean symmetry flags; a directionality / edge detection unit, responsible for performing the detection of longitudinal and lateral gradients described in step S2.2, whose input is the pixel matrix and output is a directionality flag and the detected dominant direction (if present); and a dynamic range and smoothness detection unit, responsible for performing the dynamic range calculation, flatness judgment, and necessary extremum suppression preprocessing described in step S2.3, whose input is the pixel matrix, output is the dynamic range value, flatness flag, and, when necessary, the pixel matrix after extremum suppression processing. The processing results of these units are summarized into a detailed feature analysis report, which contains all diagnostic information about the error block, and this report is then sent to the adaptive reconstruction module.

[0092] The adaptive reconstruction module implements the aforementioned adaptive spatial domain reconstruction step S3. This module is the core of the entire system's decision-making and execution. It first receives a feature analysis report from the feature analysis module. Internally, the module contains a decision logic unit that determines the appropriate repair strategy based on input information such as symmetry, directionality, and flatness indicators. Once a decision is made, the corresponding repair submodule is invoked to execute the specific repair operation. In one implementation, the adaptive reconstruction module internally includes: The mean smoothing submodule is used to execute strategy A (S3.1). When invoked, this submodule calculates the pixel mean of the error block and fills the entire block with that mean (optionally with micro-perturbations). The directional neighborhood interpolation submodule is used to execute strategy C (S3.3). When invoked, this submodule reads the correct neighborhood block data in the corresponding direction from the frame buffer based on the direction information (horizontal or vertical) passed by the decision logic unit, and executes the directional interpolation algorithm to reconstruct the erroneous block.

[0093] The spatial extremum constraint submodule is used to execute strategy B (S3.2). When invoked, this submodule also needs to access the neighboring block data to obtain statistical information, and then perform constraint operations such as clipping or nonlinear mapping on the pixels in the erroneous block. After the repair operation is complete, the adaptive reconstruction module will generate a repaired image block. This new, more reasonable image block will be written back to the original error location in the video frame buffer to replace the original erroneous data. Finally, when the entire image frame is sent to the display device, the viewer will be presented with a seamlessly repaired image of higher visual quality.

[0094] In summary, the error masking system of this embodiment, through its modular design and clear logical flow, effectively implements an adaptive error masking method based on spatial domain feature analysis, which can effectively improve the visual quality of images and videos in various complex error scenarios.

[0095] Those skilled in the art will understand that, besides implementing the system and its various devices, modules, and units provided by this invention in the form of purely computer-readable program code, the same functions can be achieved entirely through logical programming of the method steps, making the system and its various devices, modules, and units of this invention function in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, the system and its various devices, modules, and units provided by this invention can be considered as a hardware component, and the devices, modules, and units included therein for implementing various functions can also be considered as structures within the hardware component; alternatively, the devices, modules, and units for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.

[0096] Specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art can make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. Unless otherwise specified, the embodiments and features described in this application can be arbitrarily combined with each other.

Claims

1. An image error concealment method based on spatial domain feature analysis, characterized in that, include: Detect and locate erroneous blocks in image data; Feature analysis of the pixel distribution pattern of the erroneous block in the spatial domain is performed to identify its spatial characteristics; Based on the analysis results of the spatial characteristics, the corresponding spatial reconstruction strategy is adaptively selected and executed to recover the erroneous block.

2. The image error masking method based on spatial domain feature analysis according to claim 1, characterized in that, The spatial feature analysis of the erroneous block includes at least one of the following: A symmetry test is performed to determine whether the erroneous block has a symmetry pattern such as horizontal, vertical, or central symmetry. Directional detection is performed by calculating gradients in different directions within a block to analyze whether there are obvious directional textures or edges. Dynamic range and smoothness detection are performed to analyze the dynamic range of pixel values ​​within a block and the degree of drastic local changes.

3. The image error masking method based on spatial domain feature analysis according to claim 1, characterized in that, The adaptive spatial domain reconstruction strategy includes: When the erroneous block is detected to have obvious symmetry or smooth pixel changes, a mean smoothing strategy is adopted. The mean pixel value of the erroneous block is calculated and replaced with the mean pixel value in the block to restore the smoothness of the region.

4. The image error masking method based on spatial domain feature analysis according to claim 1, characterized in that, The adaptive spatial reconstruction strategy also includes: When the dynamic range of the erroneous block is detected to be extremely large or the local changes are drastic, a spatial extremum constraint strategy is adopted to constrain the pixels within the block with extrema and perform nonlinear mapping, limiting them to a reasonable range based on the statistics of the surrounding correct pixels, so as to suppress abnormal visual impact.

5. The image error masking method based on spatial domain feature analysis according to claim 1, characterized in that, The adaptive spatial reconstruction strategy also includes: When the erroneous block is detected to have obvious directional features, a directional neighborhood interpolation strategy is adopted to interpolate along the detected edge or texture direction using the correct neighboring pixels in that direction, so as to maintain the continuity of the edge.

6. The image error masking method based on spatial domain feature analysis according to claim 3, characterized in that, When calculating the pixel mean of the erroneous block, a small perturbation is added to fill the entire block.

7. An image error concealment system based on spatial domain feature analysis, characterized in that, An image error masking method based on spatial domain feature analysis according to any one of claims 1 to 6 includes: The error detection module is used to detect and locate error blocks in the image; The feature analysis module is used to perform spatial domain feature analysis on the erroneous block in order to identify its spatial domain features; An adaptive reconstruction module is used to adaptively select and execute a corresponding spatial reconstruction strategy to repair the erroneous block based on the analysis results of the feature analysis module.

8. The image error masking system based on spatial domain feature analysis according to claim 7, characterized in that, The feature analysis module is configured to perform at least one of symmetry detection, directionality detection, and dynamic range and smoothness detection.

9. The image error masking method based on spatial domain feature analysis according to claim 7, characterized in that, The adaptive reconstruction module is configured to select one of the following strategies—mean smoothing, spatial extremum constraint, and directional neighborhood interpolation—to repair the erroneous block based on the analysis results.

10. The image error masking method based on spatial domain feature analysis according to claim 7, characterized in that, The adaptive reconstruction module includes: The mean smoothing submodule is used to execute the mean smoothing strategy; The directional neighborhood interpolation submodule is used to execute the directional neighborhood interpolation strategy; The spatial extremum constraint submodule is used to execute spatial extremum constraint strategies; The feature analysis module includes: The symmetry detection unit is responsible for performing the calculation and judgment logic of horizontal, vertical and central symmetry; The directional / edge detection unit is responsible for performing vertical and horizontal gradient detection; The dynamic range and smoothness detection unit is responsible for performing dynamic range calculation, flatness judgment, and necessary extreme value suppression preprocessing.