A bad pixel correction method, device, electronic equipment and storage medium

By determining and correcting the dead pixels in the image sensor, and using the second largest pixel value in the preset neighborhood to correct the bad pixels, the problem of incomplete correction of dead pixels in the prior art is solved and the image quality is improved.

CN117880649BActive Publication Date: 2024-10-29成都市元视芯智能科技有限公司
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410103613.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-25
Publication Date
2024-10-29
Estimated Expiration
2044-01-25

AI Technical Summary

Technical Problem

When the existing technology corrects dead pixels in an image sensor, if there is a group of dead pixels between a pixel and its adjacent pixels, it may be impossible to achieve effective correction of dead pixels and affect the image quality.

Method used

By determining the bad pixel of the first pixel, preset every pixel value in the neighborhood except the bad pixel, and select the second largest pixel value as the correction value, correct the pixel value of the bad pixel to this value, and determine whether it is Greater than or equal to the bad pixel threshold, if so, use the threshold, otherwise keep the original value to ensure that the bad pixels in the OB area are corrected in any scenario.

Benefits of technology

It effectively eliminates the influence of abnormal pixels in the OB area, improves image quality, and ensures that bad pixels can be corrected in any scene.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117880649B_ABST
    Figure CN117880649B_ABST
Patent Text Reader

Abstract

The present invention discloses a bad pixel correction method, device, electronic device and storage medium, belonging to the field of image processing technology, and determines the bad pixel in the first pixel by the pixel value of the first pixel; then determines the pixel value of each first pixel except the bad pixel in a preset neighborhood according to the bad pixel in the first pixel; then determines the pixel value of a second pixel according to the pixel value of each first pixel except the bad pixel in the preset neighborhood, and finally corrects the pixel value of the bad pixel to the pixel value of the second pixel according to the pixel value of the second pixel to correct the pixel value of the bad pixel. The bad pixel correction method provided by the present invention can correct the bad pixel in the shading area in any scene, thereby eliminating the influence of abnormal pixels in the OB area and improving the quality of the image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a bad pixel correction method, device, electronic equipment and storage medium. Background Art

[0002] like Figure 1 As shown, Figure 1 It is a schematic diagram of a two-dimensional pixel array of N rows × M columns in an image sensor, including an OB (Optical Black) area and an Active Area. The OB area is a physically completely light-shielded part, which is mainly used to correct dark current, while the Active area is mainly used to participate in the final imaging.

[0003] The dark current correction method is usually to calculate the average value of the pixel values ​​in the OB area and then use it as the final dark current correction value. However, due to process defects in the image sensor production process, the pixels in the OB area that should be shielded from light may have abnormal values ​​and appear to be bright. These pixels are usually called bad pixels. In order to ensure the accuracy of the statistical mean of the OB area, it is necessary to correct the bad pixels in the entire OB area to eliminate the influence of these abnormal pixels and improve the image quality.

[0004] See also Figure 2 , Figure 2 This is a schematic diagram of correcting bad pixels in the prior art. When pixel a 102 When it is a bad pixel, the calculation is based on pixel a 102 For the two adjacent central pixels a 101 With pixel a 102 The pixel average value is taken as pixel point a 102 Corrected pixel value. However, this correction method has certain limitations. If the pixel point a 101 With pixel a 102 When there is a group of bad pixels in the 101 With pixel a 102 The pixel average value is greater than the bad pixel threshold, resulting in the inability to implement the bad pixel correction process. Summary of the invention

[0005] To solve the above problem, an embodiment of the present invention provides a bad pixel correction method, comprising:

[0006] Based on a first pixel point in the correction object image, determining a pixel value of the first pixel point;

[0007] Determine a bad pixel in the first pixel based on the pixel value of the first pixel;

[0008] Based on the bad pixel among the first pixel points, determining the pixel value of each first pixel point in a preset neighborhood except the bad pixel;

[0009] Determine a pixel value of a second pixel based on the pixel value of each first pixel except the bad pixel in the preset neighborhood, the second pixel being the first pixel with the second largest pixel value except the bad pixel in the preset neighborhood;

[0010] Based on the pixel value of the second pixel, the pixel value of the bad pixel is corrected to the pixel value of the second pixel.

[0011] In some embodiments, determining a bad pixel in the first pixel includes:

[0012] Based on the pixel value of each first pixel point, it is determined whether the pixel value of the first pixel point is greater than the bad pixel threshold. If yes, the first pixel point is determined to be a bad pixel. If not, the first pixel point is determined to be a normal pixel.

[0013] In some embodiments, the preset neighborhood includes the bad pixel and includes five adjacent pixels centered at the bad pixel.

[0014] In some embodiments, before correcting the pixel value of the bad pixel to the pixel value of the second pixel based on the pixel value of the second pixel, the bad pixel correction method further includes:

[0015] Based on the pixel value of the second pixel, determine whether the pixel value of the second pixel is greater than or equal to the bad pixel threshold. If yes, use the bad pixel threshold as the pixel value of the second pixel. If not, maintain the pixel value of the second pixel unchanged.

[0016] In some embodiments, the preset neighborhood includes the bad pixel and includes five first pixel points centered on the bad pixel and adjacent to the bad pixel.

[0017] In some embodiments, determining the pixel value of each first pixel point other than the bad pixel point in a preset neighborhood based on the bad pixel point in the first pixel point comprises:

[0018] Input data, the data being a pixel value of a first pixel;

[0019] Performing delayed tapping processing based on the input data to determine pixel values ​​of a plurality of first pixel points;

[0020] Based on the pixel values ​​of the plurality of first pixel points, the pixel value of each first pixel point except the bad pixel in a preset neighborhood is determined.

[0021] On the other hand, an embodiment of the present invention provides a bad pixel correction device, comprising:

[0022] A first determination module, used to determine a pixel value of each first pixel in the correction object image;

[0023] A second determination module is used to determine whether the pixel value of the first pixel is greater than the bad pixel threshold according to the pixel value of the first pixel and the bad pixel threshold, and if so, determine that the first pixel is a bad pixel;

[0024] A third determination module, configured to determine, according to the bad pixel among the first pixel points, the pixel value of each first pixel point in a preset neighborhood except the bad pixel;

[0025] A fourth determination module, configured to determine a pixel value of a second pixel point according to a pixel value of each first pixel point except the bad pixel in a preset neighborhood;

[0026] The correction module is used to correct the pixel value of the bad pixel in the first pixel to the pixel value of the second pixel according to the pixel value of the second pixel.

[0027] In some embodiments, the fourth determining module includes:

[0028] A sorting unit, used for sorting the pixel values ​​of each first pixel point in a preset neighborhood except the bad pixel;

[0029] A selection unit, used for selecting a first pixel point with the second largest pixel value in a preset neighborhood as a second pixel point;

[0030] The judging unit is used to judge whether the pixel value of the second pixel is greater than the bad pixel threshold. If yes, the bad pixel threshold is used as the pixel value of the second pixel. If no, the pixel value of the second pixel is maintained unchanged.

[0031] On the other hand, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0032] Memory, used to store computer programs;

[0033] The processor is used to implement the method steps in any one of the above solutions when executing the program stored in the memory.

[0034] On the other hand, an embodiment of the present invention provides a computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method steps in any one of the above-mentioned schemes are implemented.

[0035] By adopting the above technical solution, the present invention mainly has the following technical effects:

[0036] Determine the bad pixel among the first pixel points by the pixel value of the first pixel point; then determine the pixel value of each first pixel point except the bad pixel in the preset neighborhood according to the bad pixel among the first pixel points; then determine the pixel value of the second pixel point according to the pixel value of each first pixel point except the bad pixel in the preset neighborhood; finally, according to the pixel value of the second pixel point, correct the pixel value of the bad pixel to the pixel value of the second pixel point to correct the pixel value of the bad pixel; at the same time, determine whether the pixel value of the second pixel point is greater than or equal to the bad pixel threshold, if yes, use the bad pixel threshold as the pixel value of the second pixel point, if no, maintain the pixel value of the second pixel point unchanged. The bad pixel correction method provided by the present invention can correct the bad pixel in the shading area in any scene, thereby eliminating the influence of abnormal pixels in the OB area and improving the quality of the image. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 is a schematic diagram of a two-dimensional pixel array of N rows×M columns in an image sensor;

[0038] Figure 2 It is a schematic diagram of correcting bad pixels in the prior art;

[0039] Figure 3 A flowchart of a bad pixel correction method provided by an embodiment of the present invention;

[0040] Figure 4 A schematic diagram of the correction principle when there is a group of bad pixels in the preset neighborhood according to an embodiment of the present invention;

[0041] Figure 5 A schematic diagram of the correction principle when there are two groups of bad pixels in a preset neighborhood according to an embodiment of the present invention;

[0042] Figure 6 A schematic diagram of the correction principle when there are two groups of bad pixels in a preset neighborhood according to an embodiment of the present invention;

[0043] Figure 7 A schematic diagram of the structure of a bad pixel correction device provided by an embodiment of the present invention;

[0044] Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention.

[0045] Among them, a101 is pixel a 101 ; a102 is pixel a 102 ; a103 is pixel a 103 ;

[0046] a1 is the first pixel a1; a2 is the first pixel a2; a3 is the first pixel a3; a4 is the first pixel a4; a5 is the first pixel a5; a3′ is the corrected bad pixel. DETAILED DESCRIPTION

[0047] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the specification of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0048] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0049] See also Figure 3 , Figure 3 The flowchart of the bad pixel correction method provided by the embodiment of the present invention includes the following steps:

[0050] S1. determining a pixel value of a first pixel in a correction target image based on the first pixel;

[0051] S2. determining a bad pixel in the first pixel based on the pixel value of the first pixel;

[0052] For a normal image, the pixel value of each pixel should not appear to be in a highlighted state in a sensory sense. If one of the pixels is a bad pixel, the pixel value of the bad pixel should be greater than the bad pixel threshold.

[0053] Specifically, determining a bad pixel in the first pixel includes:

[0054] S201, based on the pixel value of each first pixel point, determining whether the pixel value of the first pixel point is greater than a bad pixel threshold, if yes, determining that the first pixel point is a bad pixel, if no, determining that the first pixel point is a normal pixel;

[0055] Furthermore, after the bad pixel threshold is preset, it is possible to determine which first pixel points are bad pixels and which first pixel points are normal pixels according to the pixel value corresponding to each first pixel point and the bad pixel threshold.

[0056] S3. Based on the bad pixel among the first pixel points, determine the pixel value of each first pixel point in a preset neighborhood except the bad pixel;

[0057] In some preferred embodiments, the preset neighborhood includes the bad pixel and includes five first pixel points that are adjacent to the bad pixel and are centered on the bad pixel.

[0058] Specifically, after determining that the first pixel point a3 is a bad pixel, the pixel values ​​of the first pixel points a1, a2, a4, and a5 are determined respectively, wherein a1, a2, a3, a4, and a5 are five adjacent first pixel points respectively.

[0059] S4, determining a pixel value of a second pixel point based on the pixel value of each first pixel point excluding the bad pixel in the preset neighborhood, wherein the second pixel point is a first pixel point having a second largest pixel value excluding the bad pixel in the preset neighborhood;

[0060] Specifically, the pixel values ​​of each first pixel point except the bad pixel in the preset neighborhood are sorted from small to large. For example, if the sorting of each first pixel point except the bad pixel in the preset neighborhood is a1>a2≥a4≥a5, then the first pixel point a2 is used as the second pixel point, and the pixel value of the second pixel point a2 is determined.

[0061] S5. Based on the pixel value of the second pixel, correct the pixel value of the bad pixel to the pixel value of the second pixel;

[0062] Specifically, after the pixel value of the second pixel point a2 is determined, the pixel value of the second pixel point a2 is used as the pixel value of the corrected bad pixel.

[0063] Specifically, when determining the pixel value of each first pixel in a preset neighborhood except for the bad pixel based on the bad pixel among the first pixel, there are two first pixel in the preset neighborhood whose bad pixels have not been determined, therefore, the number of bad pixels in the preset neighborhood may be 1, 2 or 3. For example, after detecting that the first pixel a1 and a2 are normal pixels and the first pixel a3 is a bad pixel, there may be bad pixels in the first pixel a4 and a5, that is, the first pixel a3 is a bad pixel, and the first pixel a4 and / or a5 may be bad pixels.

[0064] See also Figure 4 , Figure 4 A schematic diagram of the correction principle when there is a group of bad pixels in the preset neighborhood according to an embodiment of the present invention;

[0065] When only the first pixel point a3 is a bad pixel in the preset neighborhood, and the first pixel points a1, a2, a4, and a5 are all normal points, and the order of each pixel point in the preset neighborhood except the bad pixel is a1>a2≥a4≥a5, it is reasonable to use the first pixel point a2 as the second pixel point and determine the pixel value of the second pixel point a2 as the pixel value of the corrected bad pixel, which can effectively correct the bad pixel in the first pixel point to a normal point.

[0066] See also Figure 5 , Figure 5 A schematic diagram of the correction principle when there are two groups of bad pixels in a preset neighborhood according to an embodiment of the present invention;

[0067] When more than one first pixel a3 is a bad pixel in the preset neighborhood, and there is a group of bad pixels among the first pixel points a4 and a5, since the pixel value of the bad pixel is greater than the bad pixel threshold, the pixel value of the first pixel point a4 or a5 is greater than the bad pixel threshold, that is, among the pixel values ​​of the first pixel points a1, a2, a4, and a5, only one group of pixel values ​​is greater than the bad pixel threshold. Therefore, it is reasonable to use the first pixel point a4 or a5 with the second largest pixel value among the first pixel points a1, a2, a4, and a5 as the second pixel point, and to use the pixel value of the second pixel point as the pixel value of the corrected bad pixel, and it can also effectively correct the bad pixel in the first pixel point to a normal point.

[0068] See also Figure 6 , Figure 6 A schematic diagram of the correction principle when there are two groups of bad pixels in a preset neighborhood according to an embodiment of the present invention;

[0069] When more than the first pixel a3 is a bad pixel in the preset neighborhood, and the first pixel points a4 and a5 are both bad pixels, since the pixel values ​​of the bad pixels are greater than the bad pixel threshold, the pixel values ​​of the first pixel points a4 and a5 are both greater than the bad pixel threshold, and two groups of pixel values ​​among the pixel values ​​of the first pixel points a1, a2, a4, and a5 are greater than the bad pixel threshold. Therefore, it is unreasonable to use the first pixel point with the second largest pixel value among the pixel points a1, a2, a4, and a5 as the second pixel point, and to use the pixel point of the second pixel point as the pixel value of the corrected bad pixel, and it is impossible to correct the bad pixels in the first pixels to normal points.

[0070] Therefore, in order to correct the situation where there are three groups of bad pixels in the preset neighborhood, in the embodiment of the present invention, before step S5, based on the pixel value of the second pixel point, correcting the pixel value of the bad pixel to the pixel value of the second pixel point, the bad pixel correction method further includes:

[0071] S6. Based on the pixel value of the second pixel, determine whether the pixel value of the second pixel is greater than or equal to a bad pixel threshold; if so, use the bad pixel threshold as the pixel value of the second pixel; if not, maintain the pixel value of the second pixel unchanged.

[0072] When it is determined that there are three groups of bad pixels in the preset neighborhood, the pixel value of the bad pixel a3 is corrected to the bad pixel threshold, which can correct the bad pixel to a normal pixel and reduce the influence of the bad pixel on the subsequent correction process. For example, when the first pixel points a3, a4, and a5 are all bad pixels, the pixel value of the bad pixel a3 is corrected to the bad pixel threshold.

[0073] In some preferred implementations, step S2, determining the pixel value of each first pixel point in a preset neighborhood except the bad pixel point based on the bad pixel point in the first pixel point, comprises:

[0074] Input data, the data being a pixel value of a first pixel;

[0075] Performing delayed tapping processing based on the input data to determine pixel values ​​of a plurality of first pixel points;

[0076] Based on the pixel values ​​of the plurality of first pixel points, determining the pixel value of each first pixel point except the bad pixel in a preset neighborhood;

[0077] Specifically, the delayed beat processing is a delay of 4 beats. After the delay of 4 beats, even if only one pixel of the first pixel point is transmitted in one clock cycle, the five first pixel points can be gathered together after the delay of 4 beats to meet the requirements of the preset neighborhood and correct the bad pixels in the first pixel point.

[0078] Figure 7 A schematic diagram of the structure of a bad pixel correction device provided by an embodiment of the present invention, wherein the bad pixel correction device comprises:

[0079] A first determination module 1, used to determine the pixel value of each first pixel in the correction object image;

[0080] A second determination module 2 is used to determine whether the pixel value of the first pixel is greater than the bad pixel threshold according to the pixel value of the first pixel and the bad pixel threshold, and if so, determine that the first pixel is a bad pixel;

[0081] A third determination module 3, used to determine the pixel value of each first pixel point in a preset neighborhood except the bad pixel in the first pixel point;

[0082] A fourth determination module 4, configured to determine a pixel value of a second pixel point according to a pixel value of each first pixel point except the bad pixel in a preset neighborhood;

[0083] A correction module 5, used for correcting the pixel value of the bad pixel in the first pixel to the pixel value of the second pixel according to the pixel value of the second pixel;

[0084] The fourth determination module 4 comprises:

[0085] A sorting unit 41, configured to sort the pixel values ​​of each first pixel point in a preset neighborhood except the bad pixel;

[0086] A selection unit 42, configured to select a first pixel point with the second largest pixel value in a preset neighborhood as a second pixel point;

[0087] The judging unit 43 is used to judge whether the pixel value of the second pixel is greater than the bad pixel threshold. If yes, the bad pixel threshold is used as the pixel value of the second pixel. If no, the pixel value of the second pixel is maintained unchanged.

[0088] The embodiment of the present invention further provides an electronic device, such as Figure 8 As shown, it includes: a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 communicate with each other through the communication bus 504;

[0089] The memory 503 stores a computer program. When the program is executed by the processor 501, the processor 501 performs the following steps:

[0090] Based on a first pixel point in the correction object image, determining a pixel value of the first pixel point;

[0091] Determine a bad pixel in the first pixel based on the pixel value of the first pixel;

[0092] Based on the bad pixel among the first pixel points, determining the pixel value of each first pixel point in a preset neighborhood except the bad pixel;

[0093] Determine a pixel value of a second pixel based on the pixel value of each first pixel except the bad pixel in the preset neighborhood, where the second pixel is the first pixel with the second largest pixel value except the bad pixel in the preset neighborhood;

[0094] Based on the pixel value of the second pixel, the pixel value of the bad pixel is corrected to the pixel value of the second pixel.

[0095] The communication bus 504 mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus 504 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0096] The communication interface 502 is used for communication between the electronic device and other devices.

[0097] The memory 503 may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory 503 may also be at least one storage device located away from the processor 501 .

[0098] The processor 501 may be a general-purpose processor, including a central processing unit, a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.

[0099] The embodiment of the present invention further provides a computer storage readable storage medium, wherein the computer readable storage medium stores a computer program executable by an electronic device, and when the program is run on the electronic device, the electronic device implements the following steps when executing:

[0100] Based on a first pixel point in the correction object image, determining a pixel value of the first pixel point;

[0101] Determine a bad pixel in the first pixel based on the pixel value of the first pixel;

[0102] Based on the bad pixel among the first pixel points, determining the pixel value of each first pixel point in a preset neighborhood except the bad pixel;

[0103] Determine a pixel value of a second pixel based on the pixel value of each first pixel except the bad pixel in the preset neighborhood, where the second pixel is the first pixel with the second largest pixel value except the bad pixel in the preset neighborhood;

[0104] Based on the pixel value of the second pixel, the pixel value of the bad pixel is corrected to the pixel value of the second pixel.

[0105] The above-mentioned computer-readable storage medium can be any available medium or data storage device that can be accessed by the processor 501 in the electronic device, including but not limited to magnetic storage such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc., optical storage such as CD, DVD, BD, HVD, etc., and semiconductor storage such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD), etc.

[0106] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that instructions executed by the processor 501 of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0107] These computer program instructions may also be stored in a computer readable memory 503 that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory 503 produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0108] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0109] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0110] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A bad pixel correction method, characterized in that: include: Based on a first pixel point in the correction object image, determining a pixel value of the first pixel point; Determine a bad pixel in the first pixel based on the pixel value of the first pixel; Based on the bad pixel among the first pixel points, determining the pixel value of each first pixel point in a preset neighborhood except the bad pixel; Determine a pixel value of a second pixel based on the pixel value of each first pixel except the bad pixel in the preset neighborhood, the second pixel being the first pixel with the second largest pixel value except the bad pixel in the preset neighborhood; Based on the pixel value of the second pixel, correcting the pixel value of the bad pixel to the pixel value of the second pixel; Before correcting the pixel value of the bad pixel to the pixel value of the second pixel based on the pixel value of the second pixel, the bad pixel correction method further includes: Based on the pixel value of the second pixel, determine whether the pixel value of the second pixel is greater than or equal to the bad pixel threshold. If yes, use the bad pixel threshold as the pixel value of the second pixel. If not, maintain the pixel value of the second pixel unchanged.

2. A bad pixel correction method according to claim 1, characterized in that: Determining a bad pixel in the first pixel includes: Based on the pixel value of each first pixel point, it is determined whether the pixel value of the first pixel point is greater than the bad pixel threshold. If yes, the first pixel point is determined to be a bad pixel. If not, the first pixel point is determined to be a normal pixel.

3. A bad pixel correction method according to claim 1, characterized in that: The preset neighborhood includes the bad pixel and includes five adjacent pixels centered on the bad pixel.

4. A bad pixel correction method according to claim 1, characterized in that: The preset neighborhood includes the bad pixel and includes five first pixel points that are adjacent to the bad pixel and are centered on the bad pixel.

5. A bad pixel correction method according to claim 1, characterized in that: The determining, based on the bad pixel among the first pixel points, the pixel value of each first pixel point in a preset neighborhood except the bad pixel point comprises: Input data, the data being a pixel value of a first pixel; Performing delayed tapping processing based on the input data to determine pixel values ​​of a plurality of first pixel points; Based on the pixel values ​​of the plurality of first pixel points, the pixel value of each first pixel point except the bad pixel in a preset neighborhood is determined.

6. A bad pixel correction device, characterized in that: include: A first determination module, used to determine a pixel value of each first pixel in the correction object image; A second determination module is used to determine whether the pixel value of the first pixel is greater than the bad pixel threshold according to the pixel value of the first pixel and the bad pixel threshold, and if so, determine that the first pixel is a bad pixel; A third determination module, configured to determine, according to the bad pixel among the first pixel points, the pixel value of each first pixel point in a preset neighborhood except the bad pixel; A fourth determination module, configured to determine a pixel value of a second pixel point according to a pixel value of each first pixel point except the bad pixel in a preset neighborhood; A correction module, used for correcting the pixel value of the bad pixel in the first pixel to the pixel value of the second pixel according to the pixel value of the second pixel; The fourth determination module comprises: A sorting unit, used for sorting the pixel values ​​of each first pixel point in a preset neighborhood except the bad pixel; A selection unit, used for selecting a first pixel point with the second largest pixel value in a preset neighborhood as a second pixel point; The judging unit is used to judge whether the pixel value of the second pixel is greater than the bad pixel threshold. If yes, the bad pixel threshold is used as the pixel value of the second pixel. If no, the pixel value of the second pixel is maintained unchanged.

7. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method according to any one of claims 1 to 5 when executing a program stored in a memory.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Image dead pixel processing method, electronic equipment and storage medium

    CN116506746A

  • Pixel dead pixel correction method and device, electronic equipment and storage medium

    CN116887060A

  • Device, method and equipment for correcting image dead pixels of image sensor and medium

    CN117135483A

  • Image sensor and compensation method thereof

    US20150077598A1