CN115797325A - Bad pixel detection method based on sparse view - Google Patents

Bad pixel detection method based on sparse view Download PDF

Info

Publication number
CN115797325A
CN115797325A CN202211677723.6A CN202211677723A CN115797325A CN 115797325 A CN115797325 A CN 115797325A CN 202211677723 A CN202211677723 A CN 202211677723A CN 115797325 A CN115797325 A CN 115797325A
Authority
CN
China
Prior art keywords
pixel
bad
detected
pixels
gray value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211677723.6A
Other languages
Chinese (zh)
Inventor
宋雪冬
周琦
石峰源
潘迪
张徐玮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Aerospace Control Technology Institute
Original Assignee
Shanghai Aerospace Control Technology Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Aerospace Control Technology Institute filed Critical Shanghai Aerospace Control Technology Institute
Priority to CN202211677723.6A priority Critical patent/CN115797325A/en
Publication of CN115797325A publication Critical patent/CN115797325A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The invention provides a sparse-view-based bad pixel detection method, which comprises the following steps: acquiring a picture to be detected; establishing a bad image detection unit with the size of n x m, wherein pixels positioned at the non-edge of the bad image detection unit are pixels to be detected; dividing two pixels positioned at two sides of a pixel to be detected in a bad image detection unit into a comparison group; and respectively comparing the gray values of the pixel to be detected and the pixels in each comparison group. The bad image detection unit is designed based on the idea of sparse view, so that the influence of neighborhood bad pixels on a detection result can be effectively avoided, and the working performance of an algorithm is improved; the gray gradient is used for detecting bad pixels, so that the influence of the change of the background gray value on the detection result is avoided, and the detection accuracy is improved; the bad image detection unit is adopted to traverse and detect each pixel in the picture, the calculated amount in the processing process is small, the requirement on the storage space is low, and the method is suitable for real-time processing of the image data stream output by the space target detection camera along with the detector and has good timeliness.

Description

Bad pixel detection method based on sparse view
Technical Field
The invention relates to a sparse-view-based bad pixel detection method.
Background
The space target detection camera is widely applied to the optical sensor and the optical payload of the satellite platform, and the reliability and the precision of the space target detection camera are the keys for determining the performance of products. The space target detection camera adopting the infrared focal plane detector has the advantages of miniaturization, low power consumption, high detection rate, good uniformity and the like, and the infrared image has strong anti-interference capability and high imaging stability. However, due to long-term on-orbit operation, the infrared focal plane is inevitably influenced by space irradiation environment or high-energy particles, and new bad pixel elements are easy to appear. The bad pixel has weak light sensing capability and can only output a constant value. This may seriously affect the centroid coordinate accuracy of the camera measurement target. Therefore, bad pixels need to be detected and compensated in real time on track.
The real-time bad pixel detection and compensation method has high requirements on calculated amount, processing flow and data storage space. A digital logic circuit is designed by adopting a Field Programmable Gate Array (FPGA) to realize a bad pixel detection and compensation algorithm, and the method has the characteristics of high operation speed, high reliability, low power consumption, flexible design and the like. The existing bad pixel detection and compensation method has the characteristics of large calculation amount, high requirement on storage space and the like, is not beneficial to on-orbit real-time processing of a camera, and is not suitable for FPGA realization. Both missing detection and false detection of the bad pixels can affect the imaging quality, cause the loss of image information and finally affect the result of target detection. Therefore, the real-time bad pixel detection and compensation algorithm with quick calculation, accurate detection and reliable compensation has very important research significance.
Disclosure of Invention
The invention aims to provide a sparse-view-based bad pixel detection method which has the advantages of high operation speed, high reliability, low power consumption and flexible design.
In order to achieve the above object, the present invention provides a bad pixel detection method based on sparse view, which comprises:
s10, acquiring a picture to be detected;
s20, establishing a bad image detection unit with the size of n x m, wherein pixels at the non-edge of the bad image detection unit are pixels to be detected, and both n and m are more than or equal to 3;
s30, dividing two pixels positioned at two sides of the pixel to be detected in the bad image detection unit into a comparison group;
s40, respectively comparing the gray value of the pixel to be detected with the gray value of the pixel in each comparison group, and if the gray value of the pixel to be detected is far greater than the gray value of any pixel in each comparison group, judging the pixel to be detected to be a bright point type dead pixel; and if the gray value of the pixel to be detected is far smaller than the gray value of any pixel in the comparison group, determining the pixel to be detected as a dark point type dead pixel.
In the scheme, the gray value of the pixel to be detected in one bad image detection unit is compared with the gray values of the pixels in the comparison groups positioned at two sides of the pixel to be detected, so that the influence of the neighborhood bad pixels on the detection result is avoided, and the accuracy of bad image detection is improved.
Preferably, the size of the bad image detection unit is 3*3.
In this embodiment, in order to obtain the comparison result as quickly as possible, and to ensure the dead pixel detection accuracy and also to achieve the dead pixel detection speed, the size of the dead pixel detection unit is set to 3*3.
Preferably, two pixels in any one of the comparison groups and the pixel to be detected are located on a straight line.
In the scheme, the condition that a detection result is inaccurate due to dead pixels in the neighborhood can be avoided by comparing the gray values of the pixel to be detected and the two pixels on the same straight line on the two sides, and the detection precision is improved.
Preferably, in S40, it is determined whether the gray scale value of the pixel to be detected is much larger than the larger gray scale value of the pixel in any of the comparison groups by comparing whether the difference between the gray scale value of the pixel to be detected and the bright point detection determination threshold is larger than the larger gray scale value of the pixel in any of the comparison groups.
Preferably, when the gray level value of the picture is quantized by 8 bits, the bright point detection judgment threshold is 30.
Preferably, in S40, it is determined whether the gray value of the pixel to be detected is far smaller than the gray value of the pixel in any of the comparison groups by comparing whether the sum of the gray value of the pixel to be detected and the dark point detection determination threshold is smaller than the gray value of the pixel in any of the comparison groups that is smaller than the gray value of the pixel in any of the comparison groups.
Preferably, when the gray value of the picture is quantized by 8 bits, the dark point detection judgment threshold is 10.
Preferably, the method for detecting a bad pixel further comprises:
and S50, compensating the bright spot type dead pixel or the dark spot type dead pixel.
Preferably, the bright-point type dead pixel and the dark-point type dead pixel are dead pixels to be repaired, the dead pixel is taken as a center, and an average value of gray values of 8 pixel points around the dead pixel is taken as a gray value of the dead pixel.
In the scheme, in one picture, the relevance between adjacent pixel points is high, the probability of abrupt change of the gray values between the adjacent pixel points is low, the gray values of the pixel points around the dead pixel are averaged and then are given to the dead pixel, and the effective repair of the dead pixel can be realized.
In summary, compared with the prior art, the sparse-view-based bad pixel detection method provided by the invention has the following beneficial effects:
according to the bad pixel detection method based on the sparse view, the bad pixel detection unit is designed based on the idea of the sparse view, so that the influence of neighborhood bad pixels on the detection result can be effectively avoided, and the working performance of the algorithm is improved; the gray gradient is used for detecting bad pixels, the change degree of the gray value of the pixel elements is directly reflected, the influence of the change of the background gray value on a detection result is avoided, and the detection accuracy is improved; the bad image detection unit is adopted to traverse and detect each pixel in the picture, the processing process is small in calculated amount and low in requirement on storage space, and the method is suitable for real-time processing of the image data stream output by the space target detection camera along with the detector and good in timeliness.
Drawings
Fig. 1 is a flowchart of the sparse-view-based bad pixel detection method according to the present application.
Fig. 2 is a schematic diagram of a bad image detection unit.
Fig. 3 is a schematic diagram of the bad image compensation unit.
Fig. 4 is a star map with bad pixels.
Fig. 5 is a star map of fig. 4 after compensation.
Detailed Description
The technical solution, the structural features, the achieved objects and the effects in the embodiments of the present invention will be described in detail with reference to fig. 1 to 5 in the embodiments of the present invention.
It should be noted that the drawings are simplified in form and not to precise scale, and are only used for convenience and clarity to assist in describing the embodiments of the present invention, but not for limiting the conditions of the embodiments of the present invention, and therefore, the present invention is not limited by the technical spirit, and any structural modifications, changes in the proportional relationship, or adjustments in size, should fall within the scope of the technical content of the present invention without affecting the function and the achievable purpose of the present invention.
It should be noted that, in the present invention, the relational terms such as first and second, and the like are only used for distinguishing one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
As shown in fig. 1, the invention provides a sparse-view-based bad pixel detection method, which comprises the following steps:
s10, acquiring a picture to be detected;
s20, establishing a bad image detection unit with the size of n x m, wherein pixels located at the non-edge of the bad image detection unit are pixels to be detected, and both n and m are larger than or equal to 3. The dead pixel detection unit consists of n × m pixels, and the pixels to be detected cannot be located at the edge position of the dead pixel detection unit because the gray values of the pixels to be detected and the pixels located at the two sides of the pixels to be detected are required to be compared to judge whether the pixels to be detected are dead pixels; and the minimum size of the bad image detection unit is 3*3.
And S30, dividing two pixels positioned at two sides of the pixel to be detected in the bad image detection unit into a comparison group. As shown in fig. 2, in this embodiment, two pixels in any comparison group and a pixel to be detected are located on a same straight line, one comparison group may also be referred to as a field of view, the two pixels located on two sides of the pixel to be detected are divided into one comparison group, and then the comparison group is used as a unit to compare with the pixel to be detected, and the comparison group is used for comparison, so that a comparison result of the pixel to be detected is prevented from deviating due to a dead pixel occurring in a neighborhood of the pixel to be detected, for example, the pixel to be compared having a problem cannot be identified or a normal pixel to be compared is determined as a dead pixel.
In other embodiments, two pixels not on the same straight line may be classified into the same comparison group, for example, x 11 And x 31 、x 13 And x 33 Divided into a comparison group.
S40, comparing the gray value of the pixel to be detected with the gray value of the pixel in each comparison group respectively, and if the gray value of the pixel to be detected is far greater than the gray value of any pixel in the comparison groups, judging the pixel to be detected to be a bright point type dead pixel; and if the gray value of the pixel to be detected is far smaller than the gray value of any pixel in the comparison group, determining the pixel to be detected as a dark-point dead pixel. In this step, the gray value of the pixel to be detected is sequentially compared with the gray values of the pixels in each comparison group in the bad image detection unit. The detection method in this embodiment is used to detect a bright-dot type dead pixel, i.e., a pixel that is always high-luminance regardless of the received light intensity and displays as a white dot on a picture, or a dark-dot type dead pixel. A dark-dot dead pixel, i.e., a pixel that is always low in brightness regardless of the intensity of light received, appears as a black dot on a picture. According to experience, information between adjacent pixels on a picture often has coherence, and for the overall gray distribution of the picture, the coherence means that the gray between the adjacent pixels has less sudden change, and whether a dead pixel exists is detected by comparing whether the gray value between the pixel to be detected and the surrounding pixels has sudden change, wherein the sudden change means that the gray value of the pixel to be detected is far larger or far smaller than the gray value of the surrounding pixels. If the gray value of the pixel to be detected is far larger than the gray values of the surrounding pixels, the pixel to be detected is likely to be a bright point type dead pixel; if the gray value of the pixel to be detected is much smaller than the gray values of the surrounding pixels, the pixel to be detected is likely to be a dark-point dead pixel. In consideration of the occurrence of the situation that two adjacent points are dead points at the same time, in this embodiment, two pixels around the pixel to be detected are programmed into one comparison group for comparison, and the pixel to be compared is compared with the plurality of comparison groups in one comparison process, so as to avoid the situation that two adjacent pixels are dead points and cause misjudgment.
In this embodiment, in order to obtain the comparison result as quickly as possible, and to ensure the dead pixel detection accuracy and also the dead pixel detection speed, the size of the dead pixel detection unit is 3*3.
In other embodiments, the size of the bad pixel detection unit may also be 4*4 or 5*5, or other sizes.
In S40, whether the gray value of the pixel to be detected is much larger than the larger gray value of the pixel in any comparison group is determined by comparing whether the difference between the gray value of the pixel to be detected and the bright point detection determination threshold is larger than the larger gray value of the pixel in any comparison group. The judgment method comprises the following steps:
Figure BDA0004017741520000051
in the formula, x 22 As gray value of the pixel to be detected, g 1 And g 2 Gray values, T, of two pixels in a comparison group lht And judging a threshold value for the bright point detection. When the image to be detectedGrey value x of a pixel 22 Subtract bright point detection judgment threshold T lht And when the gray value is larger than the gray value in the comparison group, assigning 1 to the judgment result, and judging that the pixel point is a bright point type dead pixel.
In this embodiment, when the gray level of the picture is quantized by 8 bits, the bright point detection and determination threshold T is set lht Was taken as 30. In other embodiments, the bright point detection determination threshold T may also be adjusted according to the gray scale of the object to be photographed by the camera lht
In S40, whether the gray value of the pixel to be detected is far smaller than the gray value of the pixel in any comparison group is determined by comparing whether the sum of the gray value of the pixel to be detected and the dark point detection determination threshold is smaller than the gray value of the pixel in any comparison group. The judgment method comprises the following steps:
Figure BDA0004017741520000061
in the formula, x 22 As gray value of the pixel to be detected, g 1 And g 2 Gray values, T, of two pixels in a comparison group drk A threshold is determined for dark spot detection. When the gray value x of the pixel to be detected 22 Adding a dark spot detection judgment threshold value T drk And when the gray value is smaller than the gray value in the comparison group, assigning 1 to the judgment result, and judging the pixel point to be a dark point type dead pixel.
In this embodiment, when the gray level of the picture is quantized by 8 bits, the dark point detection judgment threshold T is set drk Taken as 10. In other embodiments, the dark spot detection determination threshold T may also be adjusted according to the gray level of the shooting object of the camera drk
The bad pixel detection method further comprises the following steps: and S50, compensating the bright spot type dead pixel or the dark spot type dead pixel. And when the bad point on the sensor is detected, repairing the bad point. As shown in fig. 3, the bright-dot type dead pixel and the dark-dot type dead pixel are used as dead pixels to be repaired, and the gray values of 8 pixel points around the dead pixel are averaged to obtain the gray value of the dead pixel.
Figure BDA0004017741520000062
In the formula, x 22 For the corrected gray value of the dead pixel, g i Is the gray value of the normal pixels in the neighborhood pixels, K is the number of the normal pixels in the neighborhood pixels, and the neighborhood pixels refer to 8 pixels surrounding the bad pixels.
The bad pixel detection method based on the sparse view field does not need to detect whether the bad pixel exists or not every time when continuous picture streams are input, and after the bad pixel is detected, the bad pixel in the outer space can not be automatically repaired, and only the bad pixel needs to be compensated subsequently. And detecting whether new dead pixels are generated or not at certain time intervals.
As shown in fig. 4, fig. 4 is a star map with a plurality of bad pixels. The method is adopted to detect and compensate the bad pixels. Fig. 5 is a diagram of the results after detection and compensation. The method successfully detects all dead pixels in the image, the detection success rate reaches 100%, and the dead pixels are compensated based on the detection result, so that the method has an excellent compensation effect. The detection and compensation of the bad pixels are beneficial to improving the accuracy of other calculations of subsequent images.
While the present invention has been described in detail with reference to the preferred embodiments, it should be understood that the above description should not be taken as limiting the invention. Various modifications and alterations to this invention will become apparent to those skilled in the art upon reading the foregoing description. Accordingly, the scope of the invention should be determined from the following claims.

Claims (9)

1. A bad pixel detection method based on sparse visual field is characterized by comprising the following steps:
s10, acquiring a picture to be detected;
s20, establishing a bad image detection unit with the size of n x m, wherein pixels at the non-edge of the bad image detection unit are pixels to be detected, and both n and m are more than or equal to 3;
s30, dividing two pixels positioned at two sides of the pixel to be detected in the bad image detection unit into a comparison group;
s40, respectively comparing the gray value of the pixel to be detected with the gray value of the pixel in each comparison group, and if the gray value of the pixel to be detected is far greater than the gray value of any pixel in each comparison group, judging the pixel to be detected to be a bright point type dead pixel; and if the gray value of the pixel to be detected is far smaller than the gray value of any pixel in the comparison group, determining the pixel to be detected as a dark-point dead pixel.
2. The sparse-view-based bad pixel detection method of claim 1, wherein the size of the bad pixel detection unit is 3*3.
3. The sparse-view-based bad pixel detection method of claim 2, wherein two pixels in any one of the comparison groups and the pixel to be detected are located on a straight line.
4. The sparse-view-based bad pixel detection method of claim 1, wherein in S40, it is determined whether the gray value of the pixel to be detected is much larger than the larger gray value of the pixel in any of the comparison groups by comparing whether the difference between the gray value of the pixel to be detected and the bright point detection determination threshold is larger than the larger gray value of the pixel in any of the comparison groups.
5. The sparse-view-based bad pixel detection method according to claim 4, wherein when the gray level value of the picture is quantized with 8 bits, the bright point detection judgment threshold is 30.
6. The sparse-view-based bad pixel detection method of claim 1, wherein in S40, it is determined whether the gray value of the pixel to be detected is much smaller than the gray value of the pixel in any of the comparison groups by comparing whether the sum of the gray value of the pixel to be detected and the dark point detection determination threshold is smaller than the gray value of the pixel in any of the comparison groups that is smaller.
7. The sparse-view-based bad pixel detection method of claim 6, wherein when 8-bit quantization is adopted for the gray value of the picture, the dark point detection judgment threshold is 10.
8. The sparse view-based bad pixel detection method of claim 1, further comprising:
and S50, compensating the bright spot type dead pixel or the dark spot type dead pixel.
9. The sparse-view-field-based bad pixel detection method of claim 8, wherein the bright-dot type bad pixels and the dark-dot type bad pixels are used as bad pixels to be repaired, the bad pixels are used as centers, and the gray values of 8 pixel points around the bad pixels are averaged to be used as the gray value of the bad pixels.
CN202211677723.6A 2022-12-26 2022-12-26 Bad pixel detection method based on sparse view Pending CN115797325A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211677723.6A CN115797325A (en) 2022-12-26 2022-12-26 Bad pixel detection method based on sparse view

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211677723.6A CN115797325A (en) 2022-12-26 2022-12-26 Bad pixel detection method based on sparse view

Publications (1)

Publication Number Publication Date
CN115797325A true CN115797325A (en) 2023-03-14

Family

ID=85426775

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211677723.6A Pending CN115797325A (en) 2022-12-26 2022-12-26 Bad pixel detection method based on sparse view

Country Status (1)

Country Link
CN (1) CN115797325A (en)

Similar Documents

Publication Publication Date Title
CN111612757B (en) Screen crack detection method, device, equipment and storage medium
KR950005024B1 (en) Method and apparatus for checking defect on display screen
US20060159333A1 (en) Image defect inspection method, image defect inspection apparatus, and appearance inspection apparatus
US7239740B1 (en) Image processing apparatus and method, medium storing program for image processing, and inspection apparatus
US7024041B2 (en) Pattern inspection apparatus and method
KR20090101356A (en) Defect detecting device, and defect detecting method
CN108168541B (en) Improved sub-pixel star point centroid positioning method
CN111724335A (en) Detection method and detection system
JP2017166942A (en) Testing method of crack on rubber
CN111967345A (en) Method for judging shielding state of camera in real time
CN115752969A (en) Method, system and equipment for detecting sealing performance of aluminum foil seal
CN115797325A (en) Bad pixel detection method based on sparse view
CN116718351A (en) Point inspection method and device for imaging equipment, electronic equipment and storage medium
CN110672631B (en) Panel defect photographing method and panel defect photographing device
CN114283170B (en) Light spot extraction method
CN112734719B (en) Dead pixel detection method of image sensor, storage medium and shooting device
CN112465780B (en) Method and device for monitoring abnormal film thickness of insulating layer
CN111435080B (en) Water level measuring method, device and system
CN110310239B (en) Image processing method for eliminating illumination influence based on characteristic value fitting
Zhongtang et al. High Precision Autocollimation Measurement Technology Based on Image Recognition
CN117710366B (en) Quality inspection method and device for thermos cup and storage medium
JP2747396B2 (en) Appearance inspection equipment for electronic components
JP2001258054A (en) Image quality inspection device and detector for center of gravity of luminance used therefor
US20210097693A1 (en) Image processing circuit and method
CN116823764A (en) Infrared image blind pixel detection method based on sliding window

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination