A bad pixel has appeared in the image! Discuss the identification and correction of sensor bad pixels.
Source:Shenzhen Kai Mo Rui Electronic Technology Co. LTD2026-05-22
01 What is a Sensor defect point
a What is a defect?
A bad point refers to a point that fails to accurately reflect light intensity.
I found a schematic diagram online.
As shown in the figure below, an abnormal bright spot appears in the enlarged area (image source: internet).

Common types of defects can be categorized into the following based on their manifestations.
· Dead Pixel (Dead Pixel): A pixel whose luminance output consistently approaches zero (black dots).
· Hot Pixel: Consistently outputs high values (white/colored highlights).
· Stuck Pixel (no better translation exists—it can't be transliterated as' Stark Pixel', can it?): Consistently outputs an intermediate value unaffected by light conditions (fixed at a specific color point).
While the impact of a few hundred to several thousand bad pixels is negligible for sensors with resolutions ranging from hundreds to tens of millions of pixels, correcting these defects becomes essential to achieve superior image quality and performance.
The purpose of bad point correction is to eliminate the impact of these defective points on image quality (Image source: Internet).

b Classification and causes of defects
Generally, pixel defects are directly caused by malfunctioning pixel units (PD+ readout circuits) on the sensor.
This condition typically results from inherent defects in the sensor manufacturing process or prolonged use/temperature rise, representing an unavoidable flaw that can only be corrected through subsequent calibration.
From a causal perspective, bad points can be divided into two types:
Static bad points: These are fixed defects, typically caused by manufacturing flaws in the sensor chip. During factory calibration, the location and quantity of these bad points can be determined, and a Defect Map can be generated.
Dynamic bad spots: These appear due to environmental changes (e.g., high temperature, high gain) or aging after prolonged use, with their quantity and location being variable.
02 Identification and Correction of Defects
Now that we understand how bad pixels affect image quality, let's briefly discuss how to minimize their impact.
Generally speaking, removing bad pixels from the final image requires precise knowledge of their exact locations to ensure targeted treatment.
Therefore, the identification method is as important as the correction method.
a Static defect point and defect coordinate table
In the previous discussion, we noted that static defects are identified and recorded during the initial calibration. The table documenting the coordinates (positions) and types of these defects is referred to as the Defect Map.
Generally, this coordinate table is stored either in the sensor's OTP area (One-Time Programmable region—those familiar with memory technology should note that this is a non-inversible storage zone where data can only be written from 1 to 0 but not vice versa), or in the camera sensor's firmware/internal memory.
For example, Sony's IMX-477 datasheet explicitly states that the static bad pixel correction data is stored in a dedicated area within the OTP memory designated for factory settings:

During calibration, simply reading this table yields the factory-set static defect data, enabling further precision adjustments.
b Identification of dynamic bad points
As mentioned earlier, dynamic bad pixels are characterized by their variable location types, necessitating post-shooting detection of these pixels.
In fact, some sensors without a storage area cannot store the Defect Map.
In such cases, static bad sectors are also processed together with dynamic bad sectors.
Generally, defective pixels that significantly affect image quality share a common characteristic: they exhibit a notable disparity compared to surrounding pixels, as illustrated below.

From a result-oriented perspective, if the color of the detected defect point differs little from its surrounding colors, no significant correction is required for this reading.
Therefore, a commonly used method for detecting defective pixels involves comparing the pixel with its adjacent homogeneous color region; if significant color deviation is observed, the pixel is identified as defective.
It should be noted that we are discussing RAW images just processed through the Bayer Filter, so comparisons are made based on color channels.
As shown in the figure below, the central green pixel is compared with the surrounding pixels of the same color (green)—in practice, more comparisons may occur than the four points depicted.

In fact, there are other methods for assessing negative aspects.
However, combining efficiency and algorithms makes this approach to determining detection thresholds the most common method.
However, this correction method poses a challenge for the high-frequency regions of images—areas where details change rapidly.
c Common methods for spot correction
Having covered recognition, we can now move on to correction.
Whether correcting dynamic or static bad pixels, the principle remains the same: it infers the value of the missing pixel by reconstructing it from surrounding pixels within the same color gamut.
In fact, the principle of calibration is similar to that of interpolation algorithms.
However, this process deals with RAW data, so interpolation is performed using pixel values from adjacent pixels within the same color gamut.
Generally, the data area used for calibration and testing is similar in size or larger.
For example, in the figure above, to reconstruct the green pixel region within the central white border, a weighted average can be calculated using the four surrounding green pixels.
For cases with more missing pixels, reconstruction can be performed using pixel information from a larger surrounding area. As illustrated below, within a 9×6 window, the color information of the missing blue pixel is calculated using data from ten adjacent blue pixels (this approach closely resembles interpolation, though the underlying principle remains similar):

However, as always, whether for recognition or correction, it is crucial to strike a balance between recognition accuracy and the preservation of high-frequency image details.
Of course, another approach is to capture the images in RAW format and then perform post-processing corrections based on the raw data according to your needs.
03 Summary
The occurrence of defects is unavoidable; the only option is to minimize their impact.
The hotspot dead point is blocked, and the lighting information cannot be restored.
Static bad sectors remain unchanged; recording their handling makes the process easier.
Dynamic bad points are not fixed and are identified by comparing colors.
Determine the position and recalibrate; calculate the average of surrounding pixels.
When performing calibration and recognition, ensure balanced image quality processing.
The direct output quality is unsatisfactory; extract the RAW file for post-processing.
Related News
Basic Knowledge of Image Processing - Color Mode (Display Mode)
2026-05-23Basic Knowledge of Image Processing - Image Enhancement
2026-05-23- 2026-05-23
Basic Knowledge of Image Processing - Image Compression
2026-05-22- 2026-05-22
- 2026-05-22






+8613798538021