An infrared image blind pixel detection method based on a sliding window
By employing a sliding window infrared image blind pixel detection method, which utilizes difference judgment and median substitution techniques, the accuracy and speed issues of infrared image blind pixel detection are resolved, achieving fast and effective blind pixel detection and protection of weak targets.
Patent Information
- Application Number
- CN202310758738.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-26
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2043-06-26
AI Technical Summary
Existing technologies cannot accurately remove blind pixels in infrared images, leading to decreased image quality and false negatives or missed detections. They are particularly ineffective when detecting small targets and are also slow.
The infrared image blind pixel detection method using a sliding window determines blind pixels by judging the difference and absolute value of the difference between the current pixel and its surrounding pixels, combined with a constant n. Candidate blind pixels are gradually confirmed or eliminated, and the median value is used to replace the determined blind pixel.
It achieves effective detection of fixed and random blind elements in various scenarios, maintains the integrity of weak targets, has a fast detection speed, and is suitable for systems with high real-time requirements.
Smart Images

Figure CN116823764B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for detecting blind pixels in infrared images based on a sliding window, and relates to the field of digital image processing. Background Technology
[0002] Infrared detectors are crucial components in infrared imaging systems. Influenced by various factors such as the external environment, infrared sensing elements, circuit structure, and semiconductor characteristics, blind pixels are prevalent in infrared images. These blind pixels cause bright or dark spots in the image. The presence of blind pixels severely impacts the imaging quality of infrared systems, affecting subsequent image analysis and processing. When detecting weak targets, it is easy to miss detections.
[0003] Existing technologies cannot accurately remove blind pixels, which can easily lead to missed or false detections, and some algorithms are slow. In order to achieve blind pixel detection quickly and accurately, this invention proposes an infrared image blind pixel detection method based on a sliding window. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to overcome the shortcomings of the prior art and provide a method for detecting blind pixels in infrared images using a sliding window.
[0005] The technical solution adopted by the present invention to solve the above-mentioned technical problems is as follows:
[0006] A method for detecting blind pixels in infrared images using a sliding window, the method comprising:
[0007] Centered on the current pixel, select a 3x3 window and determine whether the current pixel is a candidate blind cell.
[0008] Then, based on the difference between the candidate blind pixel and its 8 surrounding pixels, as well as the difference between the 8 surrounding pixels, it is determined whether the pixel is a true blind pixel. If the candidate blind pixel is not identified as a blind pixel, then the maximum or minimum value among the 8 surrounding pixels is used to determine whether the pixel is a blind pixel.
[0009] Furthermore, for the input image, a 3x3 window is selected centered on each pixel. If the pixel is the maximum or minimum value within the window, then the pixel is classified as a candidate blind pixel.
[0010] Furthermore, for a candidate blind pixel (r, c) (r and c are the row and column coordinates of the candidate blind pixel, respectively), calculate the absolute value of the difference between the candidate blind pixel (r, c) and the values of the 8 surrounding pixels within the window, and take the maximum value t1. Then, extract the 8 pixels surrounding the candidate blind pixel, calculate the absolute value of the difference between two adjacent pixels, and take the maximum value t2. If:
[0011] t1>3*t2+n
[0012] Where n is a constant, 5 < n < 15, then the candidate blind cell (r, c) is determined to be a blind cell, and the median point within the window is used to replace the candidate blind cell (r, c). If:
[0013] t1<t2+n
[0014] Then, the candidate blind element (r,c) is determined to be a non-blind element if:
[0015] t2+n≤t1≤3*t2+n
[0016] Then candidate blind cell (r,c) is still a candidate blind cell.
[0017] Furthermore, if candidate blind cell (r,c) is still a candidate blind cell, then the maximum value point (r) is found among the 8 pixels surrounding candidate blind cell (r,c). max ,c max )(r max ,c max (Row and column coordinates of the maximum point respectively), with the maximum point (r) max ,c max Using 0 as the center, take a 3x3 window and calculate the maximum value point (r). max ,c max The absolute difference between the pixel (r, c) and its surrounding 7 pixels (excluding candidate blind pixels (r, c)) is taken as the maximum value m1. Then, the absolute difference between any two adjacent pixels of the surrounding 7 pixels is calculated, and the maximum value m2 is taken. If:
[0018] m1 > 3*m2 + n
[0019] Then the maximum value point (r) max ,c max Both (r,c) and candidate blind cells are simultaneously determined as blind cells, and the maximum value point (r) is used as the starting point for each. max ,c max Centered on the candidate blind element (r, c), take a 3x3 window and replace the maximum value (r) with the median of the window. max ,c max If a candidate blind cell (r,c) is selected, then the candidate blind cell (r,c) is selected; otherwise, the candidate blind cell (r,c) is still considered a candidate blind cell.
[0020] Furthermore, if candidate blind cell (r,c) is still a candidate blind cell, then the minimum value point (r) is found among the 8 pixels surrounding candidate blind cell (r,c). min ,c min )(r min ,c min (Row and column coordinates of the maximum point, respectively) and the minimum point (r) min ,c min Using 0 as the center, take a 3x3 window and calculate the minimum point (r). min ,c minThe absolute difference between the pixel (r, c) and its surrounding 7 pixels (excluding candidate blind pixels) is taken as the maximum value f1. Then, the absolute difference between any two adjacent pixels of the surrounding 7 pixels is calculated, and the maximum value f2 is taken. If:
[0021] f1 > 3*f2 + n
[0022] Then the minimum point (r) min ,c min Both (r,c) and the candidate blind element (r,c) are simultaneously determined as blind elements, and the minimum value point (r) is used as the basis for their determination. min ,c min Centered on (r,c) and the candidate blind cell (r,c), a 3x3 window is taken, and the median value within the window is used to replace (r). min ,c min If a candidate blind cell (r,c) is selected, then the candidate blind cell (r,c) is selected as a non-blind cell.
[0023] The beneficial effects of this invention are as follows:
[0024] 1. This invention is applicable to the detection of blind pixels in infrared images in various scenarios. It can detect not only fixed blind pixels, but also random blind pixels.
[0025] 2. This invention has good performance in single-point and continuous two-point blind element detection;
[0026] 3. The present invention has a good effect on the detection of blind pixels in infrared images with weak targets. While detecting blind pixels, it can preserve weak targets and avoid the weak targets being detected as blind pixels.
[0027] 4. The model used in this invention is simple, has low computational complexity, and fast computation speed, making it suitable for various blind element detection systems with high real-time requirements. Attached Figure Description
[0028] Figure 1 This is a flowchart of an infrared image blind pixel detection method based on a sliding window according to the present invention.
[0029] Figure 2 A 3x3 window is centered on the candidate blind cell, and p1 to p8 represent the 8 pixels surrounding the candidate blind cell;
[0030] Figure 3 A 3x3 window is formed with the candidate blind cell and the maximum value point around the candidate blind cell as the center. p1 to p7 represent the 7 pixels around the maximum value point (excluding candidate blind cells).
[0031] Figure 4 A 3x3 window is formed with the candidate blind cell and the minimum value point around the candidate blind cell as the center. p1 to p7 represent the 7 pixels around the minimum value point (excluding candidate blind cells).
[0032] Figure 5 The image shows the result of blind pixel detection and correction of infrared weak target images according to the present invention, where (a) is the original image and (b) is the result of blind pixel detection and correction. Detailed Implementation
[0033] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0034] like Figure 1 As shown, the present invention provides an infrared image blind pixel detection method based on a sliding window, which specifically includes the following steps:
[0035] The first step is to select a 3x3 window centered on each pixel in the input image. If the pixel is the maximum or minimum value within the window, then the pixel is classified as a candidate blind pixel.
[0036] The second step is to calculate the absolute value of the difference between the candidate blind pixel (r,c) and the values p1 to p8 of the surrounding 8 pixels within the window, for each candidate blind pixel (r,c) (where r and c are the row and column coordinates of the candidate blind pixel, respectively). Figure 2 As shown, the maximum value t1 is taken, then 8 pixels around the candidate blind cell are extracted, the absolute value of the difference between two adjacent pixels is calculated, and the maximum value t2 is taken. If:
[0037] t1>3*t2+n
[0038] Where n is a constant, 5 < n < 15, then the candidate blind cell (r, c) is determined to be a blind cell, and the median point within the window is used to replace the candidate blind cell (r, c). If:
[0039] t1<t2+n
[0040] Then, the candidate blind element (r,c) is determined to be a non-blind element if:
[0041] t2+n≤t1≤3*t2+n
[0042] Then candidate blind cell (r,c) is still a candidate blind cell.
[0043] Third, if the candidate blind cell (r,c) is still a candidate blind cell after the second step, then find the maximum value point (r) among the 8 pixels surrounding (r,c). max ,c max )(r max ,c max (Row and column coordinates of the maximum point respectively), with the maximum point (r) max ,c max Using 0 as the center, take a 3x3 window and calculate the maximum value point (r). max ,c maxThe absolute value of the difference between (r,c) and the surrounding 7 pixels p1 to p7 (excluding candidate blind cells (r,c)), such as Figure 3 As shown, take the maximum value m1, then calculate the absolute value of the difference between any two adjacent points of the surrounding 7 pixels, and take the maximum value m2. If:
[0044] m1 > 3*m2 + n
[0045] Then the maximum value point (r) max ,c max Both (r,c) and candidate blind cells are simultaneously determined as blind cells, and the maximum value point (r) is used as the starting point for each. max ,c max Centered on the candidate blind element (r, c), take a 3x3 window and replace the maximum value (r) with the median of the window. max ,c max If a candidate blind cell (r,c) is selected, then the candidate blind cell (r,c) is selected; otherwise, the candidate blind cell (r,c) is still considered a candidate blind cell.
[0046] Fourth step: If the candidate blind cell (r,c) is still a candidate blind cell after the third step, then find the minimum value point (r) among the 8 pixels surrounding the candidate blind cell (r,c). min ,c min )(r min ,c min (Row and column coordinates of the maximum point, respectively) and the minimum point (r) min ,c min Using 0 as the center, take a 3x3 window and calculate the minimum point (r). min ,c min The absolute value of the difference between (r,c) and the surrounding 7 pixels p1 to p7 (excluding candidate blind cells (r,c)), such as Figure 4 As shown, take the maximum value f1, then calculate the absolute value of the difference between any two adjacent points of the surrounding 7 pixels, and take the maximum value f2. If:
[0047] f1 > 3*f2 + n
[0048] Then the minimum point (r) min ,c min Both (r,c) and the candidate blind element (r,c) are simultaneously determined as blind elements, and the minimum value point (r) is used as the basis for their determination. min ,c min Centered on the candidate blind element (r, c), take a 3x3 window and replace the minimum point (r) with the median of the window. min ,c min If a candidate blind cell (r,c) is selected, then the candidate blind cell (r,c) is selected as a non-blind cell.
[0049] exist Figure 5 In the image, (a) is the original infrared image containing a small target and several blind pixels, and (b) is the image after blind pixel detection and correction.
[0050] The parts of this invention not described in detail are well-known in the art. The embodiments described above are merely preferred embodiments of the present invention, and do not exhaustively describe all details, nor do they limit the invention to the specific embodiments described. Various modifications and improvements to the technical solutions of this invention made by those skilled in the art without departing from the spirit of the invention should fall within the protection scope defined by the claims of this invention.
Claims
1. A method for detecting blind pixels in infrared images based on a sliding window, characterized in that, The method includes: Centered on the current pixel, select a 3x3 window and determine whether the current pixel is a candidate blind cell. Then, based on the difference between the candidate blind pixel and its 8 surrounding pixels, as well as the difference between the 8 surrounding pixels, it is determined whether the current pixel is a blind pixel. If the candidate blind pixel is still a candidate blind pixel, then the maximum value among the 8 surrounding pixels is used to determine whether the current pixel is a blind pixel. If the current pixel is still a candidate blind pixel, then the minimum value among the 8 surrounding pixels is used to determine whether the current pixel is a blind pixel. For candidate blind cells ,in, , Calculate the candidate blind cells based on their row and column coordinates. Take the maximum value of the absolute difference between the value and the value of the value surrounding the window's eight pixels. Then, extract the 8 pixels surrounding the candidate blind cell, calculate the absolute value of the difference between any two adjacent pixels, and take the maximum value. ,if: in, It is a constant. Then, candidate blind cells If a cell is identified as a blind cell, the median point within the window is used to replace the candidate blind cell. ,if: Then, the candidate blind cells will be... If it is determined to be a non-blind cell, then: Then candidate blind elements Still a candidate blind element.
2. The infrared image blind pixel detection method based on a sliding window according to claim 1, characterized in that, For the input image, a 3x3 window is selected with each pixel as the center. If the pixel is the maximum or minimum value within the window, then the pixel is classified as a candidate blind pixel.
3. The infrared image blind pixel detection method based on a sliding window according to claim 1, characterized in that, If candidate blind If it is still a candidate blind, then start from the candidate blind. Find the maximum value among the surrounding 8 pixels. ,in, , The row and column coordinates of the maximum point are respectively used as the reference. Centered on a 3x3 window, calculate the maximum value point. With the elimination of candidate blinds Take the absolute value of the difference between the next 7 pixels and the next pixel, and take the maximum value. Then calculate the absolute value of the difference between any two adjacent pixels in the surrounding 7 pixels, and take the maximum value. ,if: Then the maximum value point and candidate blinds Simultaneously identified as blind elements, each with its maximum value point... and candidate blinds Centered on a 3x3 window, replace the maximum value with the median value within the window. and candidate blinds Otherwise, candidate blind cells Still a candidate blind element.
4. The infrared image blind pixel detection method based on a sliding window according to claim 2, characterized in that, If candidate blind If it is still a candidate blind, then start from the candidate blind. Find the minimum value among the surrounding 8 pixels. ,in, , The row and column coordinates of the minimum point are respectively used as the minimum point. Using a 3x3 window centered on the minimum value, calculate the minimum point. With the elimination of candidate blinds Take the absolute value of the difference between the next 7 pixels and the next pixel, and take the maximum value. Then calculate the absolute value of the difference between any two adjacent pixels in the surrounding 7 pixels, and take the maximum value. ,if: Then the minimum point and candidate blinds Simultaneously identified as blind cells, each with its minimum value point... and candidate blinds Centered on a 3x3 window, replace the minimum value with the median value within the window. and candidate blinds Otherwise, candidate blind cells It has been determined to be a non-blind element.
Citation Information
Patent Citations
Remote sensing image-based land parcel segmentation method
CN115661173A
Infrared image blind pixel detection processing method and system
CN115880241A