FPGA-based real-time infrared detector flash element detection and replacement method
By realizing real-time infrared detector flash element detection and replacement methods on FPGA, and using filter operators to process images, the problem that traditional methods cannot detect flash elements in real time is solved, and detection accuracy and efficiency are improved.
Patent Information
- Application Number
- CN202411932003.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2044-12-26
AI Technical Summary
The traditional offline calibration flash element method cannot detect flash elements of infrared detectors in real time under different working states, resulting in a decrease in imaging quality and a decrease in action distance.
The flash element detection and replacement method based on FPGA is used to process the image through the filter operator, determine whether the target cell is a suspected bad cell or flash element, and replace the grayscale value in real time.
Real-time flash element detection is realized in the actual working scenario of the infrared detection system, which improves detection accuracy and processing efficiency, better adaptability and reduces processing time.
Smart Images

Figure CN119863441A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of infrared detector imaging, and in particular relates to a real-time infrared detector flash element detection and replacement method based on FPGA. Background Art
[0002] With the development of infrared imaging technology, infrared detection systems are widely used in military, security, industry and other fields. Infrared detectors are key components in infrared detection systems. Due to the constraints of factors such as semiconductor materials and device manufacturing processes, infrared detectors have bad pixels. Bad pixels include blind pixels and flash pixels. The response rate of blind pixels is relatively stable, which is manifested as a response rate that is too high or too low; the response rate of flash pixels is relatively random, which is manifested as a response rate that is sometimes normal and sometimes abnormal. The processing of blind pixels is relatively simple. The blind pixel table can be calculated by collecting dozens of frames of image data, and the position of the blind pixels can be marked. Due to the randomness of the flash pixel response rate, it is usually necessary to use test equipment to collect tens of thousands of frames of images and store them, and then use the stored images to detect flash pixels; due to the large amount of image data, the processing time is long; and the calculated flash pixel table needs to be re-bound to the infrared detection system, and the processing flow is complicated.
[0003] When the detector working time, integration time, ambient temperature and other working conditions are different, the flash element characteristics will also change accordingly; therefore, the traditional offline flash element calibration method cannot perform real-time detection of flash elements in the current working state. Flash elements in the infrared detection system will affect the imaging quality, affect the detection and tracking of weak targets, and reduce the working distance of the infrared detection system.
[0004] Therefore, the traditional off-line flash calibration method has the problem of being unable to detect the detector flash in real time under the current working state. Summary of the invention
[0005] The purpose of the present invention is to provide a real-time infrared detector flash element detection and replacement method based on FPGA, so as to solve the problem that the traditional off-line flash element calibration method cannot detect the detector flash element in the current working state in real time.
[0006] To achieve the above object, the present invention adopts the following technical solution:
[0007] On the one hand, this specification provides a real-time infrared detector flash element detection and replacement method based on FPGA, the method is run in an FPGA chip, and includes:
[0008] Step 102, based on the first filtering operator, filtering the target pixels in a plurality of frames of images in turn to determine whether the target pixels are suspected bad pixels; the plurality of frames of images are obtained by real-time detection by the infrared detector and input into the FPGA in real time;
[0009] Step 104, based on the second filtering operator, filtering the target pixels of several frames of images in sequence to determine whether the target pixels are valid pixels;
[0010] Step 106, in the same frame image, if the target pixel is a suspected bad pixel and not a valid pixel, then the target pixel in the frame image is determined to be a valid bad pixel, and a valid bad pixel table of each frame image is obtained;
[0011] Step 108, based on the effective bad pixel table of each frame of image, count the number of effective bad pixels of the target pixel to obtain the cumulative number of effective bad pixels of the target pixel;
[0012] Step 110, based on the cumulative number of valid bad pixels of the target pixel, the first flash pixel judgment threshold and the second flash pixel judgment threshold, determine whether the target pixel is a flash pixel; if so, replace the target pixel grayscale value in each frame of the image with the corresponding target grayscale value and output it to the information processor or image acquisition device in real time.
[0013] On the other hand, this specification provides a real-time infrared detector flash element detection and replacement system based on FPGA, the system runs in an FPGA chip, including:
[0014] A suspected bad pixel judgment module is used to filter target pixels in a plurality of frames of images in turn based on a first filtering operator to judge whether the target pixels are suspected bad pixels; the plurality of frames of images are obtained by real-time detection by an infrared detector and input into the FPGA in real time;
[0015] An effective pixel determination module is used to perform filtering processing on target pixels of a plurality of frames of images in sequence based on a second filtering operator to determine whether the target pixels are effective pixels;
[0016] The effective bad pixel determination module is used for determining the target pixel in the same frame image as a valid bad pixel if the target pixel is a suspected bad pixel and is not a valid pixel, and obtaining a valid bad pixel table for each frame image;
[0017] A cumulative number statistics module is used to count the number of effective bad pixels of a target pixel based on the effective bad pixel table of each frame image, and obtain the cumulative number of effective bad pixels of the target pixel;
[0018] The flash pixel detection and replacement module is used to determine whether the target pixel is a flash pixel based on the cumulative number of valid bad pixels of the target pixel, the first flash pixel judgment threshold and the second flash pixel judgment threshold; if so, the target pixel grayscale value in each frame of the image is replaced with the corresponding target grayscale value and output to the information processor or image acquisition device in real time.
[0019] Based on the above technical solution, this specification can achieve the following technical effects:
[0020] This method uses FPGA to detect infrared detector flash pixels, which solves the problems of complex traditional offline processing procedures and long processing time. It can also detect infrared detector flash pixels in the actual working scenario of the infrared detection system. The detected flash pixels are better adapted to the working hours, integration time, ambient temperature and other working conditions of the infrared detector. This method eliminates valid pixels to obtain valid bad pixels, and finally determines the relationship between the cumulative number of valid bad pixels and the upper and lower limit flash pixel determination thresholds to perform flash pixel detection and flash pixel replacement, thereby improving the accuracy of flash pixel detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 The present invention is a flowchart of a method for detecting and replacing a flash element of a real-time infrared detector based on FPGA in one embodiment of the present invention.
[0022] Figure 2 Schematic diagram of a 3×3 filter operator in one embodiment of the present invention.
[0023] Figure 3 Schematic diagram of a 5×5 filter operator in one embodiment of the present invention.
[0024] Figure 4 The present invention is a schematic structural diagram of a real-time infrared detector flash element detection and replacement system based on FPGA in one embodiment of the present invention.
[0025] Figure 5 The figure is a schematic diagram of an electronic device according to the present invention. DETAILED DESCRIPTION
[0026] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. The advantages and features of the present invention will become more apparent from the following description and claims. It should be noted that the drawings are all in very simplified form and are not in precise proportions, and are only used to conveniently and clearly assist in explaining the purpose of the embodiments of the present invention.
[0027] It should be noted that, in order to clearly explain the content of the present invention, the present invention specifically cites multiple embodiments to further illustrate different implementations of the present invention, wherein the multiple embodiments are enumerated rather than exhaustive. In addition, for the sake of brevity of explanation, the contents mentioned in the previous embodiments are often omitted in the subsequent embodiments. Therefore, the contents not mentioned in the subsequent embodiments can refer to the previous embodiments accordingly.
[0028] Example 1
[0029] Please refer to Figure 1 , Figure 1 The figure shows a real-time infrared detector flash element detection and replacement method based on FPGA provided in this embodiment. In this embodiment, the method includes:
[0030] Step 102, based on the first filtering operator, filtering the target pixels in a plurality of frames of images in turn to determine whether the target pixels are suspected bad pixels; the plurality of frames of images are obtained by real-time detection by the infrared detector and input into the FPGA in real time;
[0031] In this embodiment, one implementation of step 102 is:
[0032] Step 202, obtaining a first target area based on a first filtering operator and a location of a target pixel;
[0033] Step 204, subtract the grayscale value of the target pixel from the grayscale values of other pixels in the first target area except the target pixel, and take the absolute value to obtain a number of absolute grayscale difference values;
[0034] Step 206: Based on a number of absolute grayscale differences and suspected bad pixel determination thresholds, determine whether the target pixel is a suspected bad pixel.
[0035] In this embodiment, if the plurality of absolute grayscale differences are all greater than the suspected bad pixel determination threshold, the target pixel is determined to be a suspected bad pixel.
[0036] In this embodiment, the first filtering operator is a 3×3 filtering operator.
[0037] Specifically, choose Figure 2 The 3×3 filter operator shown in the figure performs filtering on all pixels of the corrected image of the current frame. The grayscale value g(x,y) of the central pixel is subtracted from the grayscale values of the eight pixels in the surrounding area and the absolute values are taken. The eight absolute values calculated are compared with the judgment threshold th_gray. When all eight absolute values are greater than the threshold, the central pixel (x,y) is judged as a suspected bad pixel. The eight pixels are (x-1,y-1), (x,y-1), (x+1,y-1), (x+1,y), (x+1,y+1), (x,y+1), (x-1,y+1), (x-1,y+1), (x-1,y, respectively.
[0038] Step 104, based on the second filtering operator, filtering the target pixels of several frames of images in sequence to determine whether the target pixels are valid pixels;
[0039] In this embodiment, one implementation of step 104 is:
[0040] Step 302, obtaining a second target area based on the second filter operator and the location of the target pixel;
[0041] Step 304, calculating the mean of the grayscale values of the pixels other than the target pixel in the first target area to obtain a first grayscale mean value;
[0042] Step 306, calculating the average of the grayscale values of the pixels in the second target area except the pixels in the first area and the target pixels, to obtain a second grayscale value;
[0043] Step 308, subtract the first grayscale mean from the second grayscale mean and take the absolute value to obtain an absolute grayscale mean difference;
[0044] Step 310: determine whether the target pixel is a valid pixel based on the absolute grayscale mean difference and the valid pixel determination threshold.
[0045] In this embodiment, if the absolute grayscale mean difference is greater than the valid pixel determination threshold, the target pixel is determined to be a valid pixel, otherwise, it is determined to be a non-valid pixel.
[0046] In this embodiment, the second filtering operator is a 5×5 filtering operator.
[0047] Specifically, choose Figure 3 The 5×5 filter operator shown in the figure performs filtering on all pixels of the corrected image of the current frame. Calculate the average gray value of the eight pixels around the central pixel (x, y) of the first target area, gray_avg1(x, y), and the average gray value of the sixteen pixels outside the first target area in the second target area, gray_avg2(x, y). Subtract gray_avg1(x, y) and gray_avg2(x, y) and take the absolute value, and compare the calculated absolute value with the judgment threshold th_avg. When the absolute values are greater than the threshold, the central pixel (x, y) is judged as a valid pixel. The sixteen pixels are (x-2,y-2), (x-1,y-2), (x,y-2), (x+1,y-2), (x+2,y-2), (x+2,y-1), (x+2,y), (x+2, y+1), (x+2,y+2), (x+1,y+2), (x,y+2), (x-1,y+2), (x-2,y+2), (x-2,y+1), (x-2,y), (x-2,y-1).
[0048] Step 106, in the same frame image, if the target pixel is a suspected bad pixel and not a valid pixel, then the target pixel in the frame image is determined to be a valid bad pixel, and a valid bad pixel table of each frame image is obtained;
[0049] Specifically, when the center pixel (x, y) is judged as a suspected bad pixel in the first step and is judged as a valid pixel in the second step, the center pixel (x, y) should be removed from the suspected bad pixel table. By processing all pixels according to this method, the valid bad pixel table of the current frame image can be obtained.
[0050] Step 108, based on the effective bad pixel table of each frame of image, count the number of effective bad pixels of the target pixel to obtain the cumulative number of effective bad pixels of the target pixel;
[0051] In this embodiment, one implementation of step 108 is:
[0052] The number of valid bad pixels of target pixels in several frames of images is counted. If the target pixel is determined to be a valid bad pixel in one frame of image, the cumulative number of valid bad pixels is increased by 1. If it is not determined to be a valid bad pixel, the cumulative number of valid bad pixels remains unchanged. The initial value of the cumulative number of valid bad pixels is 0.
[0053] Specifically, when a pixel (x, y) is judged as a valid bad pixel in a frame image, the cumulative number frame (x, y) is increased by 1; when a pixel (x, y) is not judged as a valid bad pixel in a frame image, the cumulative number frame (x, y) remains unchanged. According to this counting method, the number of valid bad pixels is counted for all pixels in 50,000 frames of images.
[0054] It should be noted that the calculations in the previous steps need to process each pixel, and the calculation complexity is low, but the amount of calculation is large; therefore, the FPGA chip is used for processing, making full use of the strong parallel computing capability of the FPGA chip to achieve real-time processing requirements. The cumulative number of valid bad pixels for each pixel requires 16 bits of storage space. When the algorithm is applied to infrared detectors with a resolution of 320×256, 640×512, 1280×1024 or higher, a large amount of storage resources is required, and the Block Ram resources inside the FPGA are relatively tight; therefore, the off-chip memory DDR3 is used for data cache processing.
[0055] Step 110, based on the cumulative number of valid bad pixels of the target pixel, the first flash pixel judgment threshold and the second flash pixel judgment threshold, determine whether the target pixel is a flash pixel; if so, replace the target pixel grayscale value in each frame of the image with the corresponding target grayscale value and output it to the information processor or image acquisition device in real time.
[0056] In this embodiment, if the cumulative number of valid bad pixels of the target pixel is greater than the first flash pixel determination threshold and less than the second flash pixel determination threshold, the target pixel is determined to be a flash pixel.
[0057] In this embodiment, the target grayscale value is the grayscale median value of all pixels in the first target area centered on the target pixel in the current frame image.
[0058] Specifically, after the cumulative number of valid bad pixels of 50,000 frames of images is counted, the cumulative number of valid bad pixels of pixel (x, y) fra(m,e) is compared with the flicker pixel judgment thresholds th_frm1 and th_frm2; when th_frm1<frame(x, y)<th_frm2, the pixel (x, y) is judged as a flicker pixel. Then, the following is selected: Figure 2 The 3×3 filter operator shown in the figure performs filtering on all pixels of the corrected image of the current frame. The grayscale median mid(x,y) of the 9 pixels in the 3×3 area is calculated. When the pixel (x,y) is judged as a flash pixel in the fifth step, the grayscale value g(x,y) of (x,y) is replaced by mid(x,y).
[0059] In summary, this method solves the problems of complex and long processing time of traditional offline processing flow by using FPGA for infrared detector flash detection; and can perform infrared detector flash detection in the actual working scenario of the infrared detection system. The detected flash is better adapted to the working time, integration time, ambient temperature and other working conditions of the infrared detector. This method obtains effective bad pixels by eliminating effective pixels, and finally performs flash detection and flash replacement by judging the relationship between the cumulative number of effective bad pixels and the upper and lower limit flash judgment thresholds, thereby improving the accuracy of flash detection.
[0060] Example 2
[0061] Please refer to Figure 4 , Figure 4 The figure shows a real-time infrared detector flash element detection and replacement system based on FPGA provided in this embodiment. In this embodiment, the system includes:
[0062] A suspected bad pixel judgment module is used to filter target pixels in a plurality of frames of images in turn based on a first filtering operator to judge whether the target pixels are suspected bad pixels; the plurality of frames of images are obtained by real-time detection by an infrared detector and input into the FPGA in real time;
[0063] An effective pixel determination module is used to perform filtering processing on target pixels of a plurality of frames of images in sequence based on a second filtering operator to determine whether the target pixels are effective pixels;
[0064] The effective bad pixel determination module is used for determining the target pixel in the same frame image as a valid bad pixel if the target pixel is a suspected bad pixel and is not a valid pixel, and obtaining a valid bad pixel table for each frame image;
[0065] A cumulative number statistics module is used to count the number of effective bad pixels of a target pixel based on the effective bad pixel table of each frame image, and obtain the cumulative number of effective bad pixels of the target pixel;
[0066] The flash pixel detection and replacement module is used to determine whether the target pixel is a flash pixel based on the cumulative number of valid bad pixels of the target pixel, the first flash pixel judgment threshold and the second flash pixel judgment threshold; if so, the target pixel grayscale value in each frame of the image is replaced with the corresponding target grayscale value and output to the information processor or image acquisition device in real time.
[0067] Optionally, the suspected bad pixel judgment module includes:
[0068] A first target region acquisition unit, used for acquiring a first target region based on a first filtering operator and a position of a target pixel;
[0069] A plurality of absolute grayscale difference calculation units, used for respectively subtracting the grayscale value of the target pixel from the grayscale values of other pixels except the target pixel in the first target area and taking the absolute value to obtain a plurality of absolute grayscale difference values;
[0070] The suspected bad pixel judgment unit is used to judge whether the target pixel is a suspected bad pixel based on a number of absolute grayscale differences and a suspected bad pixel judgment threshold.
[0071] Optionally, if the plurality of absolute grayscale differences are all greater than the suspected bad pixel judgment threshold, the target pixel is determined to be a suspected bad pixel.
[0072] Optionally, the effective pixel judgment module includes:
[0073] A second target region acquisition unit, used for acquiring a second target region based on a second filtering operator and a position of a target pixel;
[0074] A first grayscale mean value calculation unit is used to calculate the mean of the grayscale values of other pixels except the target pixel in the first target area to obtain a first grayscale mean value;
[0075] A second gray value unit is used to calculate the average gray values of other pixels in the second target area except the first area pixels and the target pixels to obtain a second gray value;
[0076] An absolute grayscale mean difference calculation unit, used for calculating the difference between the first grayscale mean and the second grayscale mean and taking the absolute value to obtain an absolute grayscale mean difference;
[0077] The effective pixel judgment unit is used to judge whether the target pixel is a valid pixel based on the absolute grayscale mean difference and the effective pixel judgment threshold.
[0078] Optionally, if the absolute grayscale mean difference is greater than the valid pixel judgment threshold, the target pixel is determined to be a valid pixel; otherwise, it is determined to be not a valid pixel.
[0079] Optionally, a cumulative number statistics module is used to count the number of valid bad pixels of target pixels in several frames of images. If the target pixel is determined to be a valid bad pixel in a frame of image, the cumulative number of valid bad pixels is increased by 1; if it is not determined to be a valid bad pixel, the cumulative number of valid bad pixels remains unchanged; the initial value of the cumulative number of valid bad pixels is 0.
[0080] Optionally, a flash pixel detection and replacement module is used to determine the target pixel as a flash pixel if the cumulative number of valid bad pixels of the target pixel is greater than a first flash pixel judgment threshold and less than a second flash pixel judgment threshold.
[0081] Optionally, the first filter operator is a 3×3 filter operator; and the second filter operator is a 5×5 filter operator.
[0082] Optionally, the target grayscale value is the grayscale median value of all pixels in a first target area centered on the target pixel in the current frame image.
[0083] Based on this, this system solves the problems of complex traditional offline processing procedures and long processing time by using FPGA to detect flash pixels in infrared detectors. It can also perform infrared detector flash pixel detection in the actual working scenario of the infrared detection system. The detected flash pixels are better adapted to the working conditions such as the infrared detector working time, integration time, and ambient temperature. This method eliminates valid pixels to obtain valid bad pixels. Finally, by judging the relationship between the cumulative number of valid bad pixels and the upper and lower limit flash pixel judgment thresholds, flash pixel detection and flash pixel replacement are performed, thereby improving the accuracy of flash pixel detection.
[0084] Example 3
[0085] Please refer to Figure 5 , this embodiment provides an electronic device, which includes a processor, an internal bus, a network interface, a memory and a non-volatile memory, and of course may also include hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a real-time infrared detector flash element detection and replacement method based on FPGA at the logical level. Of course, in addition to the software implementation method, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0086] The network interface, processor and memory can be connected to each other through a bus system. The above bus can be divided into an address bus, a data bus, a control bus, etc.
[0087] The memory is used to store programs. Specifically, the program may include program code, and the program code includes computer operation instructions. The memory may include a read-only memory and a random access memory, and provides instructions and data to the processor.
[0088] The processor is used to execute the program stored in the above memory, and specifically perform:
[0089] Step 102, based on the first filtering operator, filtering the target pixels in a plurality of frames of images in turn to determine whether the target pixels are suspected bad pixels; the plurality of frames of images are obtained by real-time detection by the infrared detector and input into the FPGA in real time;
[0090] Step 104, based on the second filtering operator, filtering the target pixels of several frames of images in sequence to determine whether the target pixels are valid pixels;
[0091] Step 106, in the same frame image, if the target pixel is a suspected bad pixel and not a valid pixel, then the target pixel in the frame image is determined to be a valid bad pixel, and a valid bad pixel table of each frame image is obtained;
[0092] Step 108, based on the effective bad pixel table of each frame of image, count the number of effective bad pixels of the target pixel to obtain the cumulative number of effective bad pixels of the target pixel;
[0093] Step 110, based on the cumulative number of valid bad pixels of the target pixel, the first flash pixel judgment threshold and the second flash pixel judgment threshold, determine whether the target pixel is a flash pixel; if so, replace the target pixel grayscale value in each frame of the image with the corresponding target grayscale value and output it to the information processor or image acquisition device in real time.
[0094] The processor may be an integrated circuit chip with signal processing capability. In the implementation process, each step of the above method may be completed by an integrated logic circuit of the processor hardware or by instructions in the form of software.
[0095] Based on the same invention, the embodiment of this specification also provides a computer-readable storage medium, which stores one or more programs. When the one or more programs are executed by an electronic device including multiple application programs, the electronic device executes Figure 1-Figure 3 The corresponding embodiment provides a real-time infrared detector flash element detection and replacement method based on FPGA.
[0096] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-readable storage media containing computer-usable program code.
[0097] In addition, for the above-mentioned specific implementation of the system, since it is basically similar to the method implementation, the description is relatively simple, and the relevant parts can be referred to the partial description of the method implementation. Moreover, it should be noted that in each module of the system of the present application, the components therein are logically divided according to the functions to be implemented, but the present application is not limited thereto, and the components can be re-divided or combined as needed.
[0098] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other. Each embodiment focuses on the differences between it and other embodiments.
[0099] The above is a description of a specific embodiment of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the specific order or sequential order shown in the process depicted in the drawings is not necessarily required to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0100] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A real-time infrared detector flash element detection and replacement method based on FPGA, characterized in that: The method is run in an FPGA chip and includes: Based on the first filtering operator, filtering is performed on target pixels in a plurality of frames of images in turn to determine whether the target pixels are suspected bad pixels; the plurality of frames of images are obtained by real-time detection by an infrared detector and input into the FPGA in real time; Based on the second filtering operator, filtering is performed on target pixels of several frames of images in sequence to determine whether the target pixels are valid pixels; In the same frame image, if the target pixel is a suspected bad pixel and not a valid pixel, the target pixel in the frame image is determined to be a valid bad pixel, and a valid bad pixel table of each frame image is obtained; Based on the effective bad pixel table of each frame image, the number of effective bad pixels of the target pixel is counted to obtain the cumulative number of effective bad pixels of the target pixel; Based on the cumulative number of valid bad pixels of the target pixel, the first flash pixel judgment threshold and the second flash pixel judgment threshold, it is judged whether the target pixel is a flash pixel; if so, the target pixel grayscale value in each frame image is replaced with the corresponding target grayscale value and output to the information processor or image acquisition device in real time.
2. The method according to claim 1, characterized in that: The filtering process is performed on the target pixels in the plurality of frames of images in sequence based on the first filtering operator to determine whether the target pixels are suspected bad pixels, including: Based on the first filter operator and the location of the target pixel, a first target area is obtained; Subtract the grayscale value of the target pixel from the grayscale values of other pixels in the first target area except the target pixel and take the absolute value to obtain a number of absolute grayscale difference values; Based on a number of absolute grayscale differences and suspected bad pixel judgment thresholds, it is determined whether the target pixel is a suspected bad pixel.
3. The method according to claim 2, characterized in that If the absolute grayscale differences are all greater than the suspected bad pixel judgment threshold, the target pixel is determined to be a suspected bad pixel.
4. The method according to claim 3, characterized in that The filtering process is performed on the target pixels of the plurality of frames of images in sequence based on the second filtering operator to determine whether the target pixels are valid pixels, including: Based on the second filter operator and the location of the target pixel, a second target area is obtained; Calculate the mean of the grayscale values of the pixels other than the target pixel in the first target area to obtain a first grayscale mean; Calculate the average of the grayscale values of the pixels in the second target area except the pixels in the first area and the target pixels to obtain a second grayscale value; Subtract the first grayscale mean from the second grayscale mean and take the absolute value to obtain the absolute grayscale mean difference; Based on the absolute grayscale mean difference and the valid pixel judgment threshold, it is judged whether the target pixel is a valid pixel.
5. The method according to claim 4, characterized in that If the absolute grayscale mean difference is greater than the valid pixel judgment threshold, the target pixel is determined to be a valid pixel, otherwise, it is determined to be not a valid pixel.
6. The method according to claim 5, characterized in that The effective bad pixel table based on each frame of image is used to count the number of effective bad pixels of the target pixel, and the cumulative number of effective bad pixels of the target pixel is obtained, which includes: counting the number of effective bad pixels of the target pixels in a plurality of frames of image, if the target pixel is determined to be an effective bad pixel in one frame of image, the cumulative number of effective bad pixels is increased by 1, if it is not determined to be an effective bad pixel, the cumulative number of effective bad pixels remains unchanged; the initial value of the cumulative number of effective bad pixels is 0.
7. The method according to claim 6, characterized in that The method of judging whether a target pixel is a flash pixel based on the cumulative number of valid bad pixels of the target pixel, the first flash pixel judgment threshold and the second flash pixel judgment threshold includes: if the cumulative number of valid bad pixels of the target pixel is greater than the first flash pixel judgment threshold and less than the second flash pixel judgment threshold, then the target pixel is judged to be a flash pixel.
8. The method according to claim 7, characterized in that The first filter operator is a 3×3 filter operator; the second filter operator is a 5×5 filter operator.
9. The method according to claim 8, characterized in that The target grayscale value is the grayscale median value of all pixels in the first target area centered on the target pixel in the current frame image.
10. A real-time infrared detector flash element detection and replacement system based on FPGA, characterized in that: The system runs in an FPGA chip and includes: The suspected bad pixel judgment module is used to filter the target pixels in a plurality of frames of images in turn based on the first filtering operator to judge whether the target pixels are suspected bad pixels; the plurality of frames of images are obtained by real-time detection by the infrared detector and input into the FPGA in real time An effective pixel determination module is used to perform filtering processing on target pixels of a plurality of frames of images in sequence based on a second filtering operator to determine whether the target pixels are effective pixels; The effective bad pixel determination module is used for determining the target pixel in the same frame image as a valid bad pixel if the target pixel is a suspected bad pixel and is not a valid pixel, and obtaining a valid bad pixel table for each frame image; A cumulative number statistics module is used to count the number of effective bad pixels of a target pixel based on the effective bad pixel table of each frame image, and obtain the cumulative number of effective bad pixels of the target pixel; The flash pixel detection and replacement module is used to determine whether the target pixel is a flash pixel based on the cumulative number of valid bad pixels of the target pixel, the first flash pixel judgment threshold and the second flash pixel judgment threshold; if so, the target pixel grayscale value in each frame of the image is replaced with the corresponding target grayscale value and output to the information processor or image acquisition device in real time.
Citation Information
Patent Citations
Image dead pixel cluster correction method, computer device and computer readable storage medium
CN112911174A
Flash element testing device and flash element testing method for infrared focal plane detector
CN113049118A
Infrared focal plane detector blind pixel classification method, device, equipment and medium
CN117232662A
Method, apparatus and device for correcting infrared image, and refrigeration infrared imaging system
WO2022041356A1
Cited By
Bad pixel detection and compensation control method and system
CN121442210A