A method for real-time monitoring of dirt on rearview mirror lenses
By extracting block features and determining temporal stability of rearview mirror images, and combining hysteresis state machine model and spatial topology merging analysis, the problems of false alarms and resource consumption in electronic rearview mirror lens dirt detection are solved, and efficient and accurate dirt monitoring is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SUZHOU CHUANGXIN MATERIAL TECH CO LTD
- Filing Date
- 2026-02-06
- Publication Date
- 2026-05-26
Smart Images

Figure CN121661614B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to the field of target detection technology based on image processing, specifically to a method for real-time monitoring of dirt on a rearview mirror lens. Background Technology
[0002] Current electronic rearview mirrors (CMS) mostly employ detection schemes based on image gradients (such as Sobel or Canny operators). Their core logic is that when the lens is obscured by dirt, image edge information is lost; dirt is determined by statistically analyzing global or local edge strength. Existing technologies for dirt detection in electronic rearview mirrors primarily rely on image gradient analysis or machine learning algorithms, but these have the following drawbacks:
[0003] 1. False alarm problem with smooth background: When a vehicle is driving on a smooth background such as a white wall, the image lacks texture. The gradient operator is prone to misjudging such areas as blurry or dirty, resulting in false alarms.
[0004] 2. Sensitive to environmental noise: Factors such as sudden changes in ambient light and sensor noise may cause the detection value to frequently jump at the critical point, generating false alarms and affecting the user experience;
[0005] 3. High computational resource consumption: Traditional algorithms rely on floating-point operations, which require high computing power from embedded MCU processors, making it difficult to run in real time on resource-constrained platforms, and also consumes a lot of power. Summary of the Invention
[0006] A primary objective of this invention is to overcome at least one of the aforementioned deficiencies by providing a method for real-time monitoring of dirt on rearview mirror lenses, which improves anti-interference capabilities while maintaining detection accuracy, and reduces computational requirements and resource consumption.
[0007] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0008] This invention provides a method for real-time monitoring of dirt in rearview mirror lenses. The method involves image segmentation and feature extraction of images captured by the rearview mirror lens, temporal stability determination based on the extracted feature data, preliminary determination of dirty sub-blocks based on the temporal stability determination results, secondary determination of the preliminary determination results based on a hysteresis state machine model to verify dirty sub-blocks in the image, spatial topological merging of the verified dirty sub-blocks to obtain connected components containing dirt, and issuing a dirt alarm based on the area of the connected components.
[0009] According to one embodiment of the present invention, image segmentation and feature extraction are performed on the image captured by the rearview mirror lens, including:
[0010] The image captured by the rearview mirror lens is divided into a grid structure of N rows * M columns, where N and M are natural numbers not less than 20, thus forming N*M sub-blocks;
[0011] Feature extraction is performed on each sub-block, and the blur and brightness of each sub-block are calculated.
[0012] According to one embodiment of the present invention, when extracting features from each sub-block, at least one of the fixed-point Scharr operator, the weighted Sobel operator, or a high-pass filter is used.
[0013] According to one embodiment of the present invention, a temporal stability determination is performed based on the extracted feature data, and a preliminary determination result is made based on the temporal stability determination result to identify sub-blocks with contamination, including:
[0014] Maintain a brightness history record for each sub-block for 10-15 frames and use a circular buffer to store the historical data;
[0015] Calculate the temporal variance of the blur and brightness of each sub-block. If the temporal variance is less than the set variance threshold, it is preliminarily determined that the corresponding sub-block is dirty, and the result is saved or updated to form a preliminary judgment result.
[0016] According to one embodiment of the present invention, weights are assigned to the ambiguity and brightness of each sub-block, and after obtaining the feature values of the ambiguity and brightness of each sub-block, a weighted sum is performed to obtain a comprehensive feature value. The comprehensive temporal variance is calculated based on the comprehensive feature value, and the comparison between the comprehensive temporal variance and a set variance threshold is used to make a preliminary judgment on the dirtiness of the sub-block.
[0017] According to one embodiment of the present invention, a secondary judgment is performed on the preliminary judgment result based on a hysteresis state machine model to identify and verify the presence of dirty sub-blocks in the image, including:
[0018] Set an activation threshold corresponding to the number of image frames, with the activation threshold set to 3-5 frames;
[0019] Based on historical data and preliminary judgment results, if the number of consecutive frames in which a sub-block initially judged as dirty exceeds the opening threshold, the secondary judgment is successful, confirming that the sub-block is indeed dirty; otherwise, the dirt judgment result for the sub-block is cancelled.
[0020] According to one embodiment of the present invention, a secondary judgment is performed on the preliminary judgment result based on a hysteresis state machine model to identify and verify the presence of dirty sub-blocks in the image, including:
[0021] Set a recovery threshold corresponding to the number of image frames, with the recovery threshold set to 8-10 frames;
[0022] Based on historical data and preliminary judgment results, if no sub-blocks are judged as dirty and the number of consecutive frames is greater than the recovery threshold, the dirty judgment is exited.
[0023] According to one embodiment of the present invention, spatial topology merging is performed on sub-blocks identified as dirty to obtain connected regions containing dirt, and a dirt alarm is issued based on the area of the connected regions, including:
[0024] For the aforementioned sub-blocks identified as having dirt, construct an independent set of sub-blocks;
[0025] If two sub-blocks in a set of sub-blocks are adjacent, they are merged until at least one connected component is formed.
[0026] The area of each connected region is calculated based on the number of sub-blocks in each connected region. Then, the area of each connected region is compared with the set region area threshold. If it is greater than the region area threshold, a dirt alarm is issued.
[0027] According to one embodiment of the present invention, the domain area threshold includes multiple single domain area thresholds, and the area of each connected domain is compared with each single domain area threshold respectively, and a dirt alarm of different levels is issued based on the comparison result.
[0028] According to one embodiment of the present invention, the domain area threshold includes a total domain area threshold. The sum of the areas of each connected domain is compared with the total domain area threshold. If the sum is greater than the total domain area threshold, the highest level of dirt alarm is issued.
[0029] In particular, the present invention also provides a computing device including a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor executes the computer program to implement the method described above.
[0030] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described above. The computer-readable storage medium is preferably a non-volatile readable storage medium.
[0031] Compared with existing technologies, the advantages and beneficial effects of the real-time monitoring method for rearview mirror lens dirt in this patent application are as follows:
[0032] The real-time dirt detection method for rearview mirror lenses in this application improves the accuracy of dirt detection by extracting and fusing block-based and multi-dimensional features (such as ambiguity, brightness, and variance). It can also eliminate static fuzzy false alarms in scenes such as smooth walls and garages. The hysteresis state machine model and connected component analysis ensure that "small stains are not reported, but large areas of dirt are reported", which is in line with the driver's visual psychology and achieves highly robust dirt detection with low false alarms.
[0033] In addition, the real-time monitoring method for dirt on rearview mirror lenses in this application adopts a logic of combining all integer operations and low-computing-power algorithms for calculation and updating, which greatly reduces the processor's computing power consumption and cost. Attached Figure Description
[0034] The following sections will describe some specific embodiments of the invention in a detailed manner by way of example and not limitation, with reference to the accompanying drawings. The same reference numerals in the drawings denote the same or similar parts or portions. Those skilled in the art should understand that these drawings are not necessarily drawn to scale. In the drawings:
[0035] Figure 1 This is a schematic diagram illustrating the workflow of a real-time monitoring method for dirt on a rearview mirror lens according to an embodiment of the present invention.
[0036] Figure 2 This is a structural diagram of a computing device according to another embodiment of this application;
[0037] Figure 3 This is a computer-readable storage medium structure diagram according to another embodiment of this application. Detailed Implementation
[0038] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0039] Furthermore, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0040] This embodiment describes a method for real-time monitoring of dirt on a rearview mirror lens, such as... Figure 1 As shown, it performs image segmentation and feature extraction on the image captured by the rearview mirror lens, performs temporal stability determination based on the extracted feature data, preliminarily determines the dirty sub-blocks based on the temporal stability determination results to form a preliminary determination result, performs a secondary determination on the preliminary determination result based on the hysteresis state machine model to verify the dirty sub-blocks in the image, performs spatial topological merging on the verified dirty sub-blocks to obtain the dirty connected components, and issues a dirt alarm based on the area of the connected components.
[0041] In one implementation, when segmenting the image captured by the rearview mirror lens, the image is divided into an N x M grid structure, where N and M are natural numbers not less than 20, thus forming N x M sub-blocks. Generally, the real-time image of the rearview mirror can be uniformly divided into 32 x 32 sub-blocks (a total of 1024 sub-blocks), and for edge areas smaller than 32 x 32, mirror filling or zero filling is used. Each sub-block contains a number of pixels. Of course, the real-time image acquired by the rearview mirror lens can also be divided into other sizes, but considering that excessively small sub-blocks will increase the computational load, and excessively large sub-blocks will make it difficult to accurately locate small areas of dirt, the final choice of 32 x 32 sub-blocks can balance computational efficiency and feature accuracy.
[0042] After image segmentation, feature extraction is performed on each sub-block, and the blur and brightness of each sub-block are calculated. When extracting features from each sub-block, at least one of the following is used: fixed-point Scharr operator, weighted Sobel operator, or high-pass filter.
[0043] Taking the fixed-point Scharr operator for feature extraction as an example: For the ambiguity calculation of sub-blocks, the Scharr operator is applied to calculate the horizontal and vertical gradients of each sub-block, and then the gradient magnitude of the pixels (or pixel blocks, for example, dividing each sub-block into several pixel blocks) in the sub-block is calculated. The ambiguity is then calculated and determined by comparing the gradient magnitude with a set gradient threshold. The ambiguity percentage = (number of pixels with gradient magnitude less than the gradient threshold / total number of pixels in the sub-block) × 100%. For the brightness calculation of sub-blocks, the image is converted from an RGB image to a grayscale image, and the average grayscale value of all pixels (same as above, or pixel blocks, for example, dividing each sub-block into several pixel blocks) in the sub-block is calculated, ranging from 0 to 255, and the brightness of each sub-block is finally determined. To reduce the impact of lighting changes, local contrast normalization can be used. The fixed-point Scharr operator converts floating-point operations into integer operations and uses 16-bit fixed-point numbers to represent intermediate results. Square root and division operations are accelerated by pre-computed lookup tables. This optimization can reduce computing resource consumption by 30%-40%, making it suitable for embedded systems with low computing power.
[0044] In one implementation, temporal stability is determined based on the extracted feature data, and a preliminary determination result is formed based on the temporal stability determination result to identify sub-blocks with contamination, including:
[0045] Maintain a brightness history record for each sub-block for 10-15 frames (approximately 0.3-0.5 seconds of video stream), and use a circular buffer to store the historical data to avoid infinite memory growth;
[0046] The temporal variance of blur and brightness for each sub-block is calculated. If the temporal variance is less than a set variance threshold, the corresponding sub-block is preliminarily determined to be dirty, and the result is saved or updated. Variance thresholds are set for blur and brightness respectively. In addition, the above variance thresholds can be automatically adjusted when the ambient light changes. For example, the basic threshold for brightness is set to 5 to 8 (based on an 8-bit grayscale image). The threshold is reduced by 30% in night mode and increased by 20% in strong light. After calculating the temporal variance of blur and / or brightness for each sub-block, the temporal variance is compared with the variance threshold. If the temporal variance is less than the set variance threshold, the corresponding sub-block is relatively stationary, and it can be preliminarily determined that the corresponding sub-block may be dirty. However, if the temporal variance is greater than or equal to the set variance threshold, the corresponding sub-block is dynamically changing and may be a moving object. This can effectively eliminate dynamic interference such as curtains and wipers and reduce the false alarm rate.
[0047] Furthermore, weights are assigned to the blurriness and brightness of each sub-block. After obtaining the feature values of blurriness and brightness for each sub-block, a weighted sum is performed to obtain a comprehensive feature value. Based on the comprehensive feature value, a comprehensive temporal variance is calculated. The comprehensive temporal variance is compared with a set variance threshold to make a preliminary judgment on the dirt in the sub-block. Adding weights to blurriness and brightness allows the blurriness and brightness features to be complementary. For example, for non-transparent dirt such as mud and paint, the main characteristic is a sudden change in local brightness with extremely low temporal variance in that area; for semi-transparent dirt such as water mist and fingerprints, the main characteristic is a significant increase in the percentage of blurriness. Therefore, in the judgment process, by weighting and summing the blurriness weight Wf and the brightness weight Wl, a comprehensive dirt index is constructed to form a comprehensive feature value. This can effectively identify various lens obstructions with different physical properties and avoid missed detections of single features under specific lighting conditions.
[0048] In one implementation, a secondary judgment is performed on the preliminary judgment result based on a hysteresis state machine model to identify and verify the presence of dirty sub-blocks in the image, including:
[0049] Set an activation threshold corresponding to the number of image frames, with the activation threshold set to 3-5 frames;
[0050] Based on historical data and preliminary judgment results, if the number of consecutive frames in which a sub-block initially judged as dirty exceeds the opening threshold, the secondary judgment is successful, confirming that the sub-block is indeed dirty; otherwise, the dirt judgment result for the sub-block is cancelled.
[0051] By enabling the threshold setting, a sub-block will only be identified as dirty when it appears for 3 to 5 consecutive frames. This ensures that the alarm is based on continuous characteristics, avoids false alarms caused by single-frame anomalies, eliminates detection jitter, and prevents alarms from being triggered when there is temporary occlusion (such as flying insects).
[0052] In addition, a secondary judgment is performed on the preliminary judgment results based on the hysteresis state machine model to identify and verify the presence of dirty sub-blocks in the image, including:
[0053] Set a recovery threshold corresponding to the number of image frames, with the recovery threshold set to 8-10 frames;
[0054] Based on historical data and preliminary judgment results, if no sub-blocks are identified as dirty and the number of consecutive frames exceeds the recovery threshold, the dirty detection process is exited, and the dirty alarm is cleared. Setting the recovery threshold automatically eliminates the dirty alarm after the dirt is removed, thus avoiding false alarms.
[0055] In addition, since the input frame rate of the rearview mirror camera varies, the activation threshold and recovery threshold can be set according to the set activation time detection constant and the corresponding recovery judgment time constant, rather than a fixed number of frames. For example, the activation threshold Non can be calculated as Non = rounded up (f * Ton), where f is the frame rate and Ton is the set activation time detection constant, such as 0.1s-0.15s. The calculation result can be rounded up to ensure at least one frame. The recovery threshold Noff can be calculated as Noff = rounded up (f * Toff), where f is the frame rate and Toff is the set recovery judgment time constant (generally 0.1s~0.3s). The calculation result can be rounded up to ensure at least one frame.
[0056] In one implementation, spatial topology merging is performed on sub-blocks identified as dirty to obtain connected components containing dirt, and a dirt alarm is issued based on the area of the connected components, including:
[0057] For the aforementioned sub-blocks identified as having dirt, construct an independent set of sub-blocks;
[0058] If two sub-blocks in a set of sub-blocks are adjacent, they are merged until at least one connected component is formed.
[0059] The area of each connected region is calculated based on the number of sub-blocks in each connected region. Then, the area of each connected region is compared with the set region area threshold. If it is greater than the region area threshold, a dirt alarm is issued.
[0060] A domain area threshold can be set to the sum of the areas of 10 sub-blocks. This means that an alarm is issued when the area of a dirty connected domain exceeds the area of 10 sub-blocks. Furthermore, the domain area threshold can include multiple single-domain area thresholds. A single-domain area threshold is a threshold used to compare the area of a single connected domain. The area of each connected domain is compared with its respective single-domain area threshold, and different levels of dirt alarms are issued based on the comparison results. For example, setting the first single-domain area threshold to 10 sub-blocks, the second to 20 sub-blocks, and the third to 30 sub-blocks, will trigger a "cleaning reminder" when the area of a single connected domain exceeds 10 but not more than 20 sub-blocks; a "cleaning recommended" when the area exceeds 20 but not more than 30 sub-blocks; and a "clean immediately" when the area exceeds 20 but not more than 30 sub-blocks. Additionally, different alert sounds or lights can be configured for different alarm levels.
[0061] Additionally, while individual connected components may not be large, the sheer number of connected components can lead to a large total dirt area. For example, dense, fine dirt can be detected by configuring a total domain area threshold within the domain area threshold. The sum of the areas of all connected components is compared to this threshold. If the sum exceeds the threshold, the highest-level dirt alarm is issued, further improving dirt detection. Considering that rearview mirror lenses may be affected by small, non-adjacent splashes of dirt (such as raindrops or dust), this method adds discrete analysis logic to the spatial topology merging. When no connected components reaching the single domain area threshold are formed in the image, but the total number of discrete sub-blocks in the dirt detection state exceeds a set proportion (e.g., 15% of the total image area), it is classified as 'discrete dirt', and an alarm of the corresponding level is issued. This addresses the issue of small, unconnected dirt areas obstructing the view.
[0062] In summary, the real-time dirt detection method for rearview mirror lenses proposed in this application improves the accuracy of dirt detection by extracting and fusing block-based and multi-dimensional features (such as ambiguity, brightness, and variance). It also eliminates false alarms caused by static ambiguity in scenarios like smooth walls and garages. The hysteresis state machine model and connected component analysis ensure that "small stains are not reported, but large areas of dirt are always reported," aligning with driver visual psychology and achieving highly robust dirt detection with low false alarms. Furthermore, the real-time dirt detection method for rearview mirror lenses employs a logic combining all-integer arithmetic and low-computing-power algorithms for calculation and updates, significantly reducing processor computational power consumption and costs.
[0063] This application also provides a computing device, referring to... Figure 2The computing device includes a memory 1120, a processor 1110, and a computer program stored in the memory 1120 and executable by the processor 1110. The computer program is stored in a space 1130 for program code in the memory 1120. When executed by the processor 1110, the computer program implements a method step 1131 according to the invention.
[0064] This application also provides a computer-readable storage medium. (See attached embodiments.) Figure 3 The computer-readable storage medium includes a storage unit for program code, the storage unit being provided with a program 1131' for performing the method steps according to the invention, the program being executed by a processor.
[0065] This application also provides a computer program product containing instructions. When the computer program product is run on a computer, it causes the computer to perform the method steps according to the invention.
[0066] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When a computer loads and executes the computer program instructions, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)).
[0067] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0068] Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing a processor. The program can be stored in a computer-readable storage medium, which is a non-transitory medium, such as random access memory, read-only memory, flash memory, hard disk, solid-state drive, magnetic tape, floppy disk, optical disk, and any combination thereof.
[0069] In particular, the present invention also provides a computing device including a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor executes the computer program to implement the method described above.
[0070] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described above. The computer-readable storage medium is preferably a non-volatile readable storage medium.
[0071] The above embodiments are only for illustrating the technical concept and features of the present invention. Their purpose is to enable those skilled in the art to understand the content of the present invention and implement it accordingly. They should not be used to limit the scope of protection of the present invention. All equivalent changes or modifications made in accordance with the spirit and essence of the present invention should be covered within the scope of protection of the present invention.
Claims
1. A method for real-time monitoring of dirt on a rearview mirror lens, characterized in that, The image captured by the rearview mirror lens is segmented and its features are extracted. Temporal stability is determined based on the extracted feature data. Based on the temporal stability determination result, sub-blocks with dirt are initially identified to form a preliminary determination result. The preliminary determination result is then re-evaluated based on the hysteresis state machine model to verify the sub-blocks with dirt in the image. Spatial topology merging is performed on the verified dirty sub-blocks to obtain connected components with dirt. A dirt alarm is issued based on the area of the connected components. The process of image segmentation and feature extraction for the image captured by the rearview mirror lens includes: dividing the image captured by the rearview mirror lens into a grid structure of N rows * M columns, where N and M are natural numbers not less than 20, thereby forming N*M sub-blocks; extracting features from each sub-block and calculating the blur and brightness of each sub-block; Based on the extracted feature data, temporal stability is determined. Based on the temporal stability determination results, sub-blocks with contamination are initially identified to form a preliminary determination result. This includes: maintaining a brightness history record for each sub-block for 10-15 frames and storing the historical data using a circular buffer; calculating the temporal variance of the blur and brightness of each sub-block; if the temporal variance is less than a set variance threshold, the corresponding sub-block is initially determined to be contaminant, and the result is saved or updated to form the preliminary determination result. The process of performing a secondary judgment based on the hysteresis state machine model to identify dirty sub-blocks in the image includes: setting an opening threshold corresponding to the number of image frames, wherein the opening threshold is set to 3-5 frames; based on the historical data and the preliminary judgment result, if the number of consecutive frames in which the sub-block initially judged as dirty exists is greater than the opening threshold, the secondary judgment is successful, and the sub-block is confirmed to be dirty; otherwise, the dirt judgment result for the sub-block is cancelled; setting a recovery threshold corresponding to the number of image frames, wherein the recovery threshold is set to 8-10 frames; based on the historical data and the preliminary judgment result, if there are no sub-blocks judged as dirty and the number of consecutive frames is greater than the recovery threshold, the dirt judgment is exited. Spatial topology merging is performed on the sub-blocks identified as dirty to obtain the connected regions containing dirt, and a dirt alarm is issued based on the area of the connected regions. This includes: constructing an independent set of sub-blocks for the aforementioned sub-blocks identified as dirty; merging two adjacent sub-blocks in the set of sub-blocks until at least one connected region is formed; calculating the area of each connected region based on the number of sub-blocks in each connected region, and then comparing the area of each connected region with a set region area threshold. If the area is greater than the region area threshold, a dirt alarm is issued. The domain area threshold includes multiple single domain area thresholds. The area of each connected domain is compared with each single domain area threshold, and different levels of dirt alarms are issued based on the comparison results. Alternatively, the domain area threshold includes a total domain area threshold. The sum of the areas of each connected domain is compared with the total domain area threshold. If the sum is greater than the total domain area threshold, the highest level of dirt alarm is issued.
2. The method for real-time monitoring of dirt on a rearview mirror lens according to claim 1, characterized in that, When extracting features from each sub-block, at least one of the following is used: fixed-point Scharr operator, weighted Sobel operator, or high-pass filter.
3. The method for real-time monitoring of dirt on a rearview mirror lens according to claim 1, characterized in that, Weights are assigned to the blurriness and brightness of each sub-block. After obtaining the feature values of blurriness and brightness of each sub-block, a weighted sum is performed to obtain a comprehensive feature value. The comprehensive temporal variance is calculated based on the comprehensive feature value. The comprehensive temporal variance is compared with a set variance threshold to make a preliminary judgment on the dirtiness of the sub-block.