Image dead pixel correction method and device, and storage medium

文档序号:1510751 发布日期:2020-02-07 浏览:7次 中文

阅读说明:本技术 图像坏点校正方法及设备、存储介质 (Image dead pixel correction method and device, and storage medium ) 是由 何健 于 2018-08-30 设计创作,主要内容包括:一种图像坏点校正方法,包括:获取第一曝光时长,所述第一曝光时长为第一图像的曝光时长(S100);根据所述第一曝光时长从预设的至少两个坏点坐标表中确定目标坏点坐标表,其中,所述预设的至少两个坏点坐标表包括在不同的曝光参数下标定出的坏点坐标表(S200);根据所述目标坏点坐标表对所述第一图像进行坏点校正(S300)。所述方法可以防止校正明显过度或校正明显不足的问题。(An image dead pixel correction method, comprising: acquiring a first exposure duration, wherein the first exposure duration is the exposure duration of a first image (S100); determining a target bad point coordinate table from at least two preset bad point coordinate tables according to the first exposure duration, wherein the at least two preset bad point coordinate tables comprise bad point coordinate tables which are determined under different exposure parameters (S200); and carrying out dead pixel correction on the first image according to the target dead pixel coordinate table (S300). The method can prevent the problem of obvious over-correction or obvious under-correction.)

1. An image dead pixel correction method, comprising:

acquiring a first exposure duration, wherein the first exposure duration is the exposure duration of a first image;

determining a target dead pixel coordinate table from at least two preset dead pixel coordinate tables according to the first exposure duration, wherein the at least two preset dead pixel coordinate tables comprise dead pixel coordinate tables which are determined under different exposure parameters;

and carrying out dead pixel correction on the first image according to the target dead pixel coordinate table.

2. The image dead pixel correction method of claim 1, wherein the predetermined at least two dead pixel coordinate tables include dead pixel coordinate tables defined at different exposure time periods.

3. The image dead pixel correction method of claim 1, wherein the target dead pixel coordinate table is a dead pixel coordinate table.

4. The image dead pixel correction method of claim 3, wherein an exposure time period corresponding to the target dead pixel coordinate table is equal to the first exposure time period; alternatively, the first and second electrodes may be,

the target dead pixel coordinate table is a dead pixel coordinate table with the smallest absolute value of the difference value between the corresponding exposure time length and the first exposure time length in the preset at least two dead pixel coordinate tables; alternatively, the first and second electrodes may be,

the target dead pixel coordinate table is a positive dead pixel coordinate table in which the difference value between the corresponding exposure time length and the first exposure time length is the minimum in the at least two preset dead pixel coordinate tables; alternatively, the first and second electrodes may be,

the target dead pixel coordinate table is a negative dead pixel coordinate table in which the difference between the corresponding exposure time length and the first exposure time length is the largest in the at least two preset dead pixel coordinate tables.

5. The image dead pixel correction method of claim 1, wherein the target dead pixel coordinate table includes two dead pixel coordinate tables.

6. The image dead pixel correction method of claim 5, wherein the target dead pixel coordinate table includes a positive dead pixel coordinate table in which a difference between the corresponding exposure time period and the first exposure time period is the smallest and a negative dead pixel coordinate table in which a difference between the corresponding exposure time period and the first exposure time period is the largest, of the preset at least two dead pixel coordinate tables.

7. The image dead pixel correction method of claim 5 or 6, wherein the target dead pixel coordinate table includes a first dead pixel coordinate table and a second dead pixel coordinate table;

the dead pixel correction of the first image according to the target dead pixel coordinate table comprises the following steps:

performing dead pixel correction on the first image according to the first dead pixel coordinate table to obtain a first target image;

performing dead pixel correction on the first image according to the second dead pixel coordinate table to obtain a second target image;

and carrying out fusion processing on the first target image and the second target image.

8. The method for correcting the image dead pixel as claimed in claim 7, wherein the fusing the first target image and the second target image comprises:

determining a first weight and a second weight, wherein the first weight is a weight corresponding to a first bad point coordinate table, and the second weight is a weight corresponding to a second bad point coordinate table;

according to the first weight and the second weight, carrying out weighted average on a target pixel in the first target image and a pixel in the second target image, wherein the pixel is at the same position as the target pixel;

and determining the image of the first image after dead pixel correction according to the pixels after weighted average.

9. The method of claim 8, wherein performing a weighted average of a target pixel in the first target image and a pixel in the second target image at the same position as the target pixel based on the first weight and the second weight comprises:

and summing the target pixel in the first target image weighted by the first weight and the pixel in the second target image weighted by the second weight and having the same position as the target pixel to obtain a weighted average pixel.

10. The image dead pixel correction method of claim 9, wherein the determining the first weight and the second weight comprises:

determining the first weight in the established corresponding relation between the exposure duration and the first weight according to the first exposure duration;

determining the second weight according to the first weight.

11. The image dead pixel correction method of claim 10, wherein an exposure time period corresponding to the first dead pixel coordinate table is longer than an exposure time period corresponding to the second dead pixel coordinate table;

in the established correspondence relationship between the exposure time length and the first weight, the exposure time length T1 corresponds to the first weight W1, the exposure time length T2 corresponds to the first weight W2, the T1 is greater than the T2, and the W1 is greater than the W2.

12. The image dead pixel correction method of claim 8, wherein the first weight includes a first center weight and a first peripheral weight; the second weight comprises a second central weight and a second peripheral weight;

according to the first weight and the second weight, carrying out weighted average on a target pixel in the first target image and a pixel in the second target image, which is at the same position as the target pixel, and the weighted average comprises the following steps:

summing the target pixel in the set central area in the first target image weighted by the first central weight and the pixel in the same position as the target pixel in the second target image weighted by the second central weight to obtain the pixel in the set central area after weighted average;

and summing the target pixel outside the set central area in the first target image weighted by the first peripheral weight and the pixel at the same position as the target pixel in the second target image weighted by the second peripheral weight to obtain the weighted average pixel outside the set central area.

13. The image dead pixel correction method of claim 12, wherein the determining the first weight and the second weight comprises:

determining a first center weight in the established first corresponding relation between the exposure duration and the first center weight according to the first exposure duration;

determining a first peripheral weight according to the first exposure duration in the established second corresponding relation between the exposure duration and the first peripheral weight;

determining a second central weight according to the determined first central weight, and determining a second peripheral weight according to the determined first peripheral weight;

the exposure duration corresponding to the first dead pixel coordinate table is longer than the exposure duration corresponding to the second dead pixel coordinate table; the first central weight corresponding to the first exposure duration is greater than the corresponding first peripheral weight.

14. The image dead pixel correction method of claim 13, wherein in the first correspondence, an exposure time period T3 corresponds to a first center weight W3, an exposure time period T4 corresponds to a first center weight W4, the T3 is greater than the T4, and the W3 is greater than or equal to the W4; and/or the presence of a gas in the gas,

in the second correspondence, the exposure time period T5 corresponds to the first peripheral weight W5, the exposure time period T6 corresponds to the first peripheral weight W6, the T5 is greater than the T6, and the W5 is greater than the W6.

15. The image dead pixel correction method of claim 8, wherein the target pixel comprises: all pixels in the first target image, or pixels in the first target image after dead pixel correction.

16. The method of image dead pixel correction according to claim 8, wherein said determining the first image dead pixel corrected image based on the weighted average pixels comprises:

modifying pixels used for weighted average in the first target image into corresponding pixels after weighted average, and determining the modified first target image as an image of the first image after dead pixel correction;

alternatively, the first and second electrodes may be,

and modifying the pixels used for weighted average in the second target image into corresponding weighted average pixels, and determining the modified second target image as the image of the first image after dead pixel correction.

17. The image dead pixel correction method of claim 7, wherein the first dead pixel coordinate table records all dead pixel coordinates calibrated at a corresponding exposure time duration;

and the second dead pixel coordinate table records all dead pixel coordinates calibrated under the corresponding exposure duration.

18. The image dead pixel correction method of claim 7, wherein the second dead pixel coordinate table records all dead pixel coordinates calibrated at a corresponding exposure time duration;

and the first dead pixel coordinate table records dead pixel coordinates which are calibrated under the corresponding exposure duration and are different from the dead pixel coordinates recorded in the second dead pixel coordinate table.

19. An electronic device, comprising: a memory and a processor;

the memory for storing program code;

the processor, configured to invoke the program code, when the program code is executed, is configured to perform the following:

acquiring a first exposure duration, wherein the first exposure duration is the exposure duration of a first image;

determining a target dead pixel coordinate table from at least two preset dead pixel coordinate tables according to the first exposure duration, wherein the at least two preset dead pixel coordinate tables comprise dead pixel coordinate tables which are determined under different exposure parameters;

and carrying out dead pixel correction on the first image according to the target dead pixel coordinate table.

20. The electronic device of claim 19, wherein the predetermined at least two bad pixel coordinate tables include bad pixel coordinate tables defined at different exposure time periods.

21. The electronic device of claim 19, wherein the target bad point coordinate table is a bad point coordinate table.

22. The electronic device of claim 21, wherein an exposure time duration corresponding to the target bad pixel coordinate table is equal to the first exposure time duration; alternatively, the first and second electrodes may be,

the target dead pixel coordinate table is a dead pixel coordinate table with the smallest absolute value of the difference value between the corresponding exposure time length and the first exposure time length in the preset at least two dead pixel coordinate tables; alternatively, the first and second electrodes may be,

the target dead pixel coordinate table is a positive dead pixel coordinate table in which the difference value between the corresponding exposure time length and the first exposure time length is the minimum in the at least two preset dead pixel coordinate tables; alternatively, the first and second electrodes may be,

the target dead pixel coordinate table is a negative dead pixel coordinate table in which the difference between the corresponding exposure time length and the first exposure time length is the largest in the at least two preset dead pixel coordinate tables.

23. The electronic device of claim 19, wherein the target bad point coordinate table comprises two bad point coordinate tables.

24. The electronic device according to claim 23, wherein the target bad point coordinate table includes a bad point coordinate table of a positive value in which a difference between the corresponding exposure time period and the first exposure time period is smallest, and a bad point coordinate table of a negative value in which a difference between the corresponding exposure time period and the first exposure time period is largest, of the preset at least two bad point coordinate tables.

25. The electronic device of claim 23 or 24, wherein the target bad point coordinate table comprises a first bad point coordinate table and a second bad point coordinate table;

the processor is specifically configured to, when performing the dead pixel correction on the first image according to the target dead pixel coordinate table:

performing dead pixel correction on the first image according to the first dead pixel coordinate table to obtain a first target image;

performing dead pixel correction on the first image according to the second dead pixel coordinate table to obtain a second target image;

and carrying out fusion processing on the first target image and the second target image.

26. The electronic device of claim 25, wherein the processor, when performing the fusion process on the first target image and the second target image, is specifically configured to:

determining a first weight and a second weight, wherein the first weight is a weight corresponding to a first bad point coordinate table, and the second weight is a weight corresponding to a second bad point coordinate table;

according to the first weight and the second weight, carrying out weighted average on a target pixel in the first target image and a pixel in the second target image, wherein the pixel is at the same position as the target pixel;

and determining the image of the first image after dead pixel correction according to the pixels after weighted average.

27. The electronic device of claim 26, wherein the processor, based on the first weight and the second weight, is specifically configured to perform a weighted average of a target pixel in the first target image and a pixel in the second target image at a same position as the target pixel:

and summing the target pixel in the first target image weighted by the first weight and the pixel in the second target image weighted by the second weight and having the same position as the target pixel to obtain a weighted average pixel.

28. The electronic device of claim 27, wherein the processor, when determining the first weight and the second weight, is specifically configured to:

determining the first weight in the established corresponding relation between the exposure duration and the first weight according to the first exposure duration;

determining the second weight according to the first weight.

29. The electronic device of claim 28, wherein an exposure time duration corresponding to the first bad pixel coordinate table is longer than an exposure time duration corresponding to the second bad pixel coordinate table;

in the established correspondence relationship between the exposure time length and the first weight, the exposure time length T1 corresponds to the first weight W1, the exposure time length T2 corresponds to the first weight W2, the T1 is greater than the T2, and the W1 is greater than the W2.

30. The electronic device of claim 26, wherein the first weight comprises a first center weight and a first peripheral weight; the second weight comprises a second central weight and a second peripheral weight;

the processor, according to the first weight and the second weight, is specifically configured to, when performing weighted averaging on a target pixel in the first target image and a pixel in the second target image at the same position as the target pixel:

summing the target pixel in the set central area in the first target image weighted by the first central weight and the pixel in the same position as the target pixel in the second target image weighted by the second central weight to obtain the pixel in the set central area after weighted average;

and summing the target pixel outside the set central area in the first target image weighted by the first peripheral weight and the pixel at the same position as the target pixel in the second target image weighted by the second peripheral weight to obtain the weighted average pixel outside the set central area.

31. The electronic device of claim 30, wherein the processor, when determining the first weight and the second weight, is specifically configured to:

determining a first center weight in the established first corresponding relation between the exposure duration and the first center weight according to the first exposure duration;

determining a first peripheral weight according to the first exposure duration in the established second corresponding relation between the exposure duration and the first peripheral weight;

determining a second central weight according to the determined first central weight, and determining a second peripheral weight according to the determined first peripheral weight;

the exposure duration corresponding to the first dead pixel coordinate table is longer than the exposure duration corresponding to the second dead pixel coordinate table; the first central weight corresponding to the first exposure duration is greater than the corresponding first peripheral weight.

32. The electronic device of claim 31, wherein in the first correspondence, an exposure time period T3 corresponds to a first center weight W3, an exposure time period T4 corresponds to a first center weight W4, the T3 is greater than the T4, the W3 is greater than or equal to the W4; and/or the presence of a gas in the gas,

in the second correspondence, the exposure time period T5 corresponds to the first peripheral weight W5, the exposure time period T6 corresponds to the first peripheral weight W6, the T5 is greater than the T6, and the W5 is greater than the W6.

33. The electronic device of claim 26, wherein the target pixel comprises: all pixels in the first target image, or pixels in the first target image after dead pixel correction.

34. The electronic device of claim 26, wherein the processor determines the first dead pixel corrected image from the weighted average of the pixels is specifically configured to:

modifying pixels used for weighted average in the first target image into corresponding pixels after weighted average, and determining the modified first target image as an image of the first image after dead pixel correction;

alternatively, the first and second electrodes may be,

and modifying the pixels used for weighted average in the second target image into corresponding weighted average pixels, and determining the modified second target image as the image of the first image after dead pixel correction.

35. The electronic device of claim 25, wherein the first bad pixel coordinate table records all bad pixel coordinates calibrated at a corresponding exposure time duration;

and the second dead pixel coordinate table records all dead pixel coordinates calibrated under the corresponding exposure duration.

36. The electronic device of claim 25, wherein the second bad pixel coordinate table records all bad pixel coordinates calibrated for a corresponding exposure duration;

and the first dead pixel coordinate table records dead pixel coordinates which are calibrated under the corresponding exposure duration and are different from the dead pixel coordinates recorded in the second dead pixel coordinate table.

37. A computer-readable storage medium, characterized in that,

the computer readable storage medium having stored thereon computer instructions which, when executed, implement the image dead pixel correction method of any one of claims 1-18.

Technical Field

The present invention relates to the field of image processing technologies, and in particular, to a method and an apparatus for correcting an image dead pixel, and a storage medium.

Background

An imaging device (such as an image sensor) has a defect in a manufacturing process, or an error in optical signal conversion, and the like, and thus a dead pixel exists in a captured image. Image dead spots include bright spots and dark spots. Generally, the brightness value of a pixel point is proportional to incident light, while the brightness value of a bright point is obviously greater than the incident light multiplied by the corresponding proportion, and the brightness of the point is obviously increased along with the increase of exposure time; whereas for a dark spot, the pixel value of the spot is close to 0, whatever the incident light. The positions of the dead pixels on the image are fixed, so that the dead pixels can be corrected by only calibrating the position coordinates of all the dead pixels and then utilizing the position coordinates.

In the related image dead pixel correction mode, for the same imaging device, no matter how the exposure parameters change when the image is acquired, only one dead pixel coordinate table specified under the same exposure parameters is adopted when the image is corrected.

However, the number of bad spots appearing on the image is different for different exposure parameters. In the above manner, since a bad pixel coordinate table specified under the same exposure parameter is used for image correction of different exposure parameters, there may be a problem of significant over-correction or significant under-correction.

Disclosure of Invention

The invention provides an image dead pixel correction method, an image dead pixel correction device and a storage medium, which can prevent the problems of obvious excessive correction or obvious insufficient correction.

In a first aspect of the embodiments of the present invention, a method for correcting an image dead pixel is provided, including:

acquiring a first exposure duration, wherein the first exposure duration is the exposure duration of a first image;

determining a target dead pixel coordinate table from at least two preset dead pixel coordinate tables according to the first exposure duration, wherein the at least two preset dead pixel coordinate tables comprise dead pixel coordinate tables which are determined under different exposure parameters;

and carrying out dead pixel correction on the first image according to the target dead pixel coordinate table.

In a second aspect of the embodiments of the present invention, there is provided an electronic device, including: a memory and a processor;

the memory for storing program code;

the processor, configured to invoke the program code, when the program code is executed, is configured to perform the following:

acquiring a first exposure duration, wherein the first exposure duration is the exposure duration of a first image;

determining a target dead pixel coordinate table from at least two preset dead pixel coordinate tables according to the first exposure duration, wherein the at least two preset dead pixel coordinate tables comprise dead pixel coordinate tables which are determined under different exposure parameters;

and carrying out dead pixel correction on the first image according to the target dead pixel coordinate table.

In a third aspect of the embodiments of the present invention, a computer-readable storage medium is provided, where computer instructions are stored on the computer-readable storage medium, and when the computer instructions are executed, the method for correcting an image dead pixel according to the first aspect of the embodiments of the present invention is implemented.

Based on the technical scheme, in the embodiment of the invention, when the dead pixel correction needs to be performed on the first image, the exposure time of the first image, namely the first exposure time, can be obtained, the target dead pixel coordinate table is determined for the first image according to the first exposure time, and the target dead pixel coordinate table is determined from the dead pixel coordinate tables determined by at least two preset different exposure parameters according to the exposure time of the image, so that under the condition that the exposure times are different, the target dead pixel coordinate table suitable for performing the dead pixel correction on the first image can be determined according to the exposure time, the influence of the exposure time is considered in the image dead pixel correction, the more suitable dead pixel correction under different exposure times can be realized, and the problems of obvious excessive correction or obvious insufficient correction are prevented.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments of the present invention will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments described in the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings of the embodiments of the present invention.

FIG. 1 is a flowchart illustrating an image dead pixel correction method according to an embodiment of the present invention;

FIG. 2 is a schematic view illustrating a process of performing dead pixel correction on a first image according to a target dead pixel coordinate table according to an embodiment of the present invention;

FIG. 3 is a schematic diagram illustrating a dead pixel correction of a first image according to a target dead pixel coordinate table according to an embodiment of the present invention;

FIG. 4 is a diagram illustrating a relationship between exposure duration and first weight according to an embodiment of the present invention;

FIG. 5 is a schematic diagram of an image divided into a set center region and an outer region according to an embodiment of the present invention;

FIG. 6 is a diagram illustrating another relationship between exposure duration and first weight according to an embodiment of the present invention;

fig. 7 is a block diagram of an electronic device according to an embodiment of the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention. In addition, the features in the embodiments and the examples described below may be combined with each other without conflict.

The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein and in the claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should be understood that the term "and/or" as used herein is meant to encompass any and all possible combinations of one or more of the associated listed items.

Although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present invention. Depending on the context, moreover, the word "if" is used may be interpreted as "at … …," or "when … …," or "in response to a determination.

The embodiment of the invention provides an image dead pixel correction method, and an execution main body of the method can be electronic equipment. The specific type of electronic device is not limited, and the electronic device may be, but is not limited to, an imaging device.

For example, when the electronic device is an imaging device, an imaging device such as an image sensor with image capturing capability is integrated on the electronic device, and the electronic device corrects an image exposed by the imaging device when executing the image dead pixel correction method; for another example, when the electronic device is other than the imaging device, the electronic device may be a device electrically connected to the imaging device, and the electronic device may acquire an image on the imaging device and execute a corresponding image dead pixel correction method, which is not limited in particular.

In the related image dead pixel correction mode, for an imaging device, images acquired under different exposure parameters are corrected according to a dead pixel coordinate table calibrated under the same exposure parameter.

However, the number of dead pixels defined by different exposure parameters is different, and taking the exposure parameter as the exposure duration (also called exposure time, i.e. the time interval from the shutter being opened to the shutter being closed) as an example, the number of dead pixels appearing in the image in the short exposure duration is significantly smaller than the number of dead pixels appearing in the image in the long exposure duration.

Generally, it is chosen to calibrate the bad pixel coordinate table for long exposure durations, since this exposes more bad pixels on the image. However, if the image collected in the short exposure time is corrected by the dead pixel calibrated in the long exposure time, many pixels which are not dead pixels in the short exposure time will be also used as dead pixels to be corrected, which results in the loss of image information of these non-dead pixels and reduces the image resolution.

Based on the above findings, an embodiment of the present invention provides an image dead pixel correction method, and referring to fig. 1, the method includes the following steps:

s100: acquiring a first exposure duration, wherein the first exposure duration is the exposure duration of a first image;

s200: determining a target dead pixel coordinate table from at least two preset dead pixel coordinate tables according to the first exposure duration, wherein the at least two preset dead pixel coordinate tables comprise dead pixel coordinate tables which are determined under different exposure parameters;

s300: and carrying out dead pixel correction on the first image according to the target dead pixel coordinate table.

Specifically, the main body of execution of the image dead pixel correction method may be an electronic device, and further may be a processor of the electronic device, where the processor may be one or more processors, and the processor may be a general-purpose processor or a special-purpose processor.

The electronic device may be the imaging device itself or may be connected to the imaging device, and the electronic device is described below as the imaging device.

The electronic device may include, in addition to the processor, a memory storing a program and a dead-spot coordinate table required when the processor executes, an imaging device (an image sensor or the like) for capturing an image, and/or a display or the like for displaying an image, without limitation.

At least two bad point coordinate tables which are designated under different exposure parameters are preset in the device and can be stored in a memory in the device, and the processor calls the bad point coordinate tables or reads the table entries in the bad point coordinate tables when needed. It can be understood that the dead pixel coordinates specified under the corresponding exposure parameters are recorded in each dead pixel coordinate table, and dead pixels on the image acquired by the device can be positioned according to the dead pixel coordinates.

The equipment can acquire images under different exposure time lengths. Before step S100 is executed, a first image may be acquired, and then dead pixel correction may be executed on the first image, where an exposure duration when the first image is acquired is the first exposure duration.

The first image can be any frame of image acquired by the equipment. The mode of acquiring the first image may be that the device acquires in real time, or may determine the first image from the acquired images, which is not limited specifically.

In step S100, a first exposure duration is obtained, where the first exposure duration is an exposure duration of the first image.

The acquisition of the first exposure time is not particularly limited. For example, if the first image is a currently captured image, the first exposure time period configured in the present apparatus may be read at the time of capture. For another example, if the first image is an image that has been acquired and stored in the present apparatus, when the dead pixel correction needs to be performed on the first image, a first exposure duration corresponding to the first image may be determined from exposure durations pre-stored in the present apparatus, where the exposure duration and the acquired image may be stored in the present apparatus correspondingly when the image is acquired.

In step S200, a target bad point coordinate table is determined from at least two preset bad point coordinate tables according to the first exposure duration, where the at least two preset bad point coordinate tables include bad point coordinate tables defined under different exposure parameters.

The exposure parameters may include exposure duration, and/or aperture size F value, etc., and the number of bad pixel coordinates obtained for different exposure parameters may vary for the same imaging device.

And determining a target dead pixel coordinate table from the dead pixel coordinate tables calibrated by the different exposure parameters according to the first exposure time, so as to obtain the most appropriate dead pixel coordinate table for the first exposure time. The number of the determined target dead pixel coordinate tables can be more than one, and is determined according to the first exposure time length.

For example, the bad point coordinate table whose corresponding exposure time length is closest to the first exposure time length may be obtained from all the bad point coordinate tables, and is not particularly limited thereto.

After the target dead pixel coordinate table is obtained, step 300 is executed, and dead pixel correction is performed on the first image according to the determined target dead pixel coordinate table.

The specific dead pixel correction method is not limited, and for example, the dead pixel in the first image may be located according to the dead pixel coordinate recorded in the target dead pixel coordinate table, and then the pixel value of the dead pixel may be modified to the calculated value of the pixel value of at least one pixel adjacent to the dead pixel. The operation value may be a value obtained by averaging pixel values of several adjacent pixels of the dead pixel.

In the embodiment of the invention, when the dead pixel correction needs to be carried out on the first image, the exposure time of the first image, namely the first exposure time, can be obtained, the target dead pixel coordinate table is determined for the first image according to the first exposure time, and the target dead pixel coordinate table is determined from the dead pixel coordinate tables determined by presetting at least two different exposure parameters according to the exposure time of the image, so that under the condition of different exposure times, the target dead pixel coordinate table suitable for carrying out dead pixel correction on the first image can be determined according to the exposure time, the influence of the exposure time is considered in the dead pixel correction of the image, the more suitable dead pixel correction under different exposure times can be realized, and the problems of obvious excessive correction or obvious insufficient correction are prevented.

In one embodiment, the at least two preset bad pixel coordinate tables include bad pixel coordinate tables specified at different exposure time periods.

The number of bad spots exposed by different exposure time lengths is different, and the number of the bad spots exposed along with the change of the exposure time length is not changed linearly. Optionally, the exposure duration of the sudden increase of the exposable bad point number is determined as the exposure duration of the bad point coordinate table to be calibrated. Actually, a relation curve between the exposure time and the corresponding exposed bad point number can be made, and the exposure time with the suddenly increased bad point number is determined from the relation curve and is used as the exposure time needing to be calibrated in the bad point coordinate table. The bad point coordinate table specified under the exposure time with the suddenly increased bad point number is used, so that the correction effect is better.

For example, at 1s, the number of exposed dead pixels is 3; at 2s, the number of exposed dead pixels is 4; when the number of the dead pixels is 3s, the number of the exposed dead pixels is 8; the number of exposed bad points is 9 in 4 s; at 5s, the number of exposed dead pixels is 14; then 3s and 5s are used as two exposure time periods needed to calibrate the bad point coordinate table. Thus, when the exposure time is 4s (or 3s to 4 s) between 3s and 5s, the number of exposed dead pixels is closer to the number of exposed dead pixels when the exposure time is 3s, and compared with the case that the difference of the numbers is larger, when dead pixel correction is performed according to the dead pixel coordinate table corresponding to the exposure time of 3s, more dead pixels can be corrected, so that the correction effect is better. Of course, this is merely exemplary, and is only for illustrating that the bad pixel coordinate table corresponding to the exposure time determined in the above manner may bring about a better correction effect, and is not limited.

It can be understood that the exposure time length required to calibrate the dead pixel coordinate table is not particularly limited, and may be determined as required, and for different exposure time lengths, the dead pixel coordinate may be calibrated to obtain the corresponding dead pixel coordinate table.

In one embodiment, the target dead pixel coordinate table is a dead pixel coordinate table.

Optionally, the exposure duration corresponding to the target bad point coordinate table is equal to the first exposure duration. In other words, the preset dead pixel coordinate table has a dead pixel coordinate table corresponding to the first exposure time length, and the determined target dead pixel coordinate table can be the dead pixel coordinate table corresponding to the first exposure time length.

Optionally, the target bad point coordinate table is a bad point coordinate table in which an absolute value of a difference between a corresponding exposure time length and the first exposure time length is the smallest in the at least two preset bad point coordinate tables. In other words, the difference between the exposure time period corresponding to the target bad point coordinate table and the first exposure time period may be a positive value or a negative value, but the absolute value is the smallest of the absolute values of the differences between the exposure time periods corresponding to all the bad point coordinate tables and the first exposure time period.

Optionally, the target bad point coordinate table is a positive bad point coordinate table in which a difference between the corresponding exposure time length and the first exposure time length is the minimum, among the at least two preset bad point coordinate tables. In other words, the difference between the exposure time length corresponding to the target bad point coordinate table and the first exposure time length is a positive value, and is the smallest of the positive values obtained by the difference between the exposure time length corresponding to each bad point coordinate table and the first exposure time length.

Optionally, the target bad point coordinate table is a bad point coordinate table with a negative value, where a difference between the corresponding exposure time length and the first exposure time length is the largest, in the at least two preset bad point coordinate tables. In other words, the difference between the exposure time length corresponding to the target bad point coordinate table and the first exposure time length is a negative value, and is the largest of negative values obtained by the difference between the exposure time length corresponding to each bad point coordinate table and the first exposure time length.

The exposure time length corresponding to the dead pixel coordinate table is the same as or closest to the first exposure time length, so that the matching degree of the dead pixel coordinate recorded in the target dead pixel coordinate table and the actual dead pixel coordinate in the first image is the highest, and the correction effect is the best.

It is understood that the difference between the corresponding exposure duration and the first exposure duration refers to a difference obtained by subtracting the first exposure duration from the corresponding exposure duration. Since the exposure time length has a magnitude relationship, the difference value has a positive value and a negative value.

In the case that the target dead pixel coordinate table is a dead pixel coordinate table, in step S300, after dead pixels in the first image are located according to the target dead pixel coordinate table, the dead pixels may be directly corrected, so as to realize dead pixel correction of the first image.

In one embodiment, the target bad point coordinate table includes two bad point coordinate tables.

Optionally, the target bad point coordinate table includes a positive bad point coordinate table in which a difference between the corresponding exposure time length and the first exposure time length is the minimum, and a negative bad point coordinate table in which a difference between the corresponding exposure time length and the first exposure time length is the maximum, among the at least two preset bad point coordinate tables.

For example, the preset exposure duration corresponding to the bad point coordinate table includes: 0.002s, 1s, 2s, 5s, and the first exposure time period is 1.5s, the target bad point coordinate table is the bad point coordinate table corresponding to 1s ((1.5-1) s is a positive value and is the smallest of all positive values), and the bad point coordinate table corresponding to 2s ((1.5-2) s is a negative value and is the largest of all negative values).

In one embodiment, the target dead pixel coordinate table comprises a first dead pixel coordinate table and a second dead pixel coordinate table;

referring to fig. 2, in step S300, the performing dead pixel correction on the first image according to the target dead pixel coordinate table may include the following steps:

s301: performing dead pixel correction on the first image according to the first dead pixel coordinate table to obtain a first target image;

s302: performing dead pixel correction on the first image according to the second dead pixel coordinate table to obtain a second target image;

s303: and carrying out fusion processing on the first target image and the second target image.

In step S301, the following steps may be included:

s3011: determining a dead pixel in the first image according to the dead pixel coordinate recorded in the first dead pixel coordinate table;

s3012: performing operation on pixel characteristics of at least two pixels adjacent to a dead pixel in a first image to obtain the operated pixel characteristics;

s3013: and modifying the pixel characteristics of the dead pixel into the pixel characteristics after corresponding operation to obtain a first target image.

In step S302, the following steps may be included:

s3021: determining a dead pixel in the first image according to the dead pixel coordinate recorded in the second dead pixel coordinate table;

s3022: performing operation on pixel characteristics of at least two pixels adjacent to a dead pixel in a first image to obtain the operated pixel characteristics;

s3023: and modifying the pixel characteristics of the dead pixel into the pixel characteristics after corresponding operation to obtain a second target image.

The operation performed on the pixel characteristics of the pixel in step S3012 and step S3022 may be an averaging operation, and is not limited in particular.

It is to be understood that the first images in step 301 and step S302 are two identical first images, and another first image may be obtained by copying the first images, or both the two first images are obtained by copying the original first image, which is not limited in particular.

After the first target image and the second target image are obtained, step S303 is executed to perform fusion processing on the first target image and the second target image, and the specific fusion manner is not limited.

Referring to fig. 3, an image 501 is a first image acquired in a first exposure duration, an image 502 and an image 503 are two images obtained by copying the image 501, dead pixel correction is performed on the image 502 and the image 503 respectively to obtain a first target image 504 and a second target image 505, and fusion processing is performed on the first target image 504 and the second target image 505 to obtain an image 506 with dead pixel correction.

The first dead pixel coordinate table is, for example, a positive dead pixel coordinate table in which a difference between a corresponding exposure time length and the first exposure time length is the minimum, among at least two preset dead pixel coordinate tables; the second bad point coordinate table is, for example, a negative bad point coordinate table in which a difference between the corresponding exposure time length and the first exposure time length is the largest, among at least two preset bad point coordinate tables. Of course, the two may be interchanged.

The method comprises the steps of obtaining a first image, obtaining a second image, obtaining a first target image and a second target image, performing image dead pixel correction on the first image according to a first dead pixel coordinate table and the second dead pixel coordinate table, and fusing the first target image and the second target image to obtain an image with a dead pixel corrected.

In one embodiment, in step S303, the fusing the first target image and the second target image includes the following steps:

s3031: determining a first weight and a second weight, wherein the first weight is a weight corresponding to a first bad point coordinate table, and the second weight is a weight corresponding to a second bad point coordinate table;

s3032: according to the first weight and the second weight, carrying out weighted average on a target pixel in the first target image and a pixel in the second target image, wherein the pixel is at the same position as the target pixel;

s3033: and determining the image of the first image after dead pixel correction according to the pixels after weighted average.

In step S3031, the first weight may be determined first, and then the second weight may be determined according to the first weight, or vice versa. Preferably, the first weight and the second weight are not fixed and may be determined according to the first exposure time period.

It is to be understood that, in step S3032, performing weighted average on two pixels according to the first weight and the second weight means performing weighted average on pixel values of the two pixels. For example, if the first weight is 0.4, the second weight is 0.6, the pixel value of the target pixel in the first target image is 100, and the pixel value of the pixel at the same position as the target pixel in the second target image is 200, the weighted average value is 100 × 0.4+200 × 0.6 — 160.

Optionally, the target pixel includes: all pixels in the first target image, or pixels in the first target image after dead pixel correction.

In step S3033, the image of the first image after dead pixel correction is determined according to the weighted average pixels.

In the process of performing fusion processing on the first target image and the second target image, weighted averaging is performed instead of simply performing averaging processing on pixels corresponding to positions on the first target image and the second target image, so that whether correction is inclined to a dead pixel coordinate table corresponding to a long exposure time or inclined to a dead pixel coordinate table corresponding to a short exposure time can be determined according to the specific situation of the first exposure time.

In one embodiment, in step S3032, performing a weighted average on a target pixel in the first target image and a pixel in the second target image at the same position as the target pixel according to the first weight and the second weight includes:

and summing the target pixel in the first target image weighted by the first weight and the pixel in the second target image weighted by the second weight and having the same position as the target pixel to obtain a weighted average pixel.

In the weighted average mode, all target pixels in a first target image are weighted by the same first weight; and weighting the pixels corresponding to the target pixels in the second target image by using the same second weight.

In one embodiment, regarding the above manner of weighted averaging, in step S3031, the determining the first weight and the second weight may include the following steps:

determining the first weight in the established corresponding relation between the exposure duration and the first weight according to the first exposure duration;

determining the second weight according to the first weight.

The established correspondence between the exposure duration and the first weight may be a calculation formula, or a relationship table, and correspondingly, the manner of determining the first weight may be to calculate a band by substituting the first exposure duration into the calculation formula, or to search the relationship table for the first weight corresponding to the first exposure duration, and is not limited to the above manner.

Preferably, the exposure duration corresponding to the first dead pixel coordinate table is longer than the exposure duration corresponding to the second dead pixel coordinate table;

in the established correspondence relationship between the exposure time length and the first weight, the exposure time length T1 corresponds to the first weight W1, the exposure time length T2 corresponds to the first weight W2, the T1 is greater than the T2, and the W1 is greater than the W2.

In the correspondence relationship between the exposure time and the first weight, the longer the exposure time, the larger the first weight, and of course, the functional relationship between the exposure time and the first weight is not necessarily a continuous straight line or curve, and may be a step-like broken line segment. The larger the first weight, i.e. the larger the weight value used in the first target image, and correspondingly the smaller the weight value used in the second target image.

Based on the above correspondence between the exposure duration and the first weight, when the first exposure duration is closer to the exposure duration corresponding to the first dead pixel coordinate table (the number of exposed dead pixels is more), the determined first weight is larger (more correction effect of actual dead pixels needs to be considered), and when the first exposure duration is closer to the exposure duration corresponding to the second dead pixel coordinate table (the number of exposed dead pixels is less), the determined second weight is larger (more correction effect needs to be considered), so that the correction effect is better.

Referring to fig. 4, a coordinate relationship between the first weight and the exposure duration is shown, where long refers to the exposure duration corresponding to the first dead pixel coordinate table, short refers to the exposure duration corresponding to the second dead pixel coordinate table, and taking long as 5s and short as 0.01s as examples, the calculation formula of the first weight under the first exposure duration short 1 is as follows (1):

wgt_L1=(shutter1–0.01)/(5-0.01) (1);

accordingly, the calculation formula for determining the second weight according to the first weight is as follows (2):

wgt_S1=1-wgt_L1 (2)。

when the number of the preset bad point coordinate tables is two, when the first exposure time length is greater than or equal to long and less than or equal to max (maximum exposure time length), wgt _ L1 is 1, wgt _ S1 is 0, and the target bad point coordinate table is one and is the first bad point coordinate table corresponding to long; when the first exposure duration is less than or equal to short and greater than min (minimum exposure duration), wgt _ L1 is 0, wgt _ S1 is 1, and the target dead pixel coordinate table is one and is a second dead pixel coordinate table corresponding to the short.

In one embodiment, the first weight comprises a first central weight and a first peripheral weight; the second weight comprises a second central weight and a second peripheral weight;

in step S3032, performing a weighted average on the target pixel in the first target image and the pixel in the second target image at the same position as the target pixel according to the first weight and the second weight, including:

summing the target pixel in the set central area in the first target image weighted by the first central weight and the pixel in the same position as the target pixel in the second target image weighted by the second central weight to obtain the pixel in the set central area after weighted average;

and summing the target pixel outside the set central area in the first target image weighted by the first peripheral weight and the pixel at the same position as the target pixel in the second target image weighted by the second peripheral weight to obtain the weighted average pixel outside the set central area.

Referring to fig. 5, showing the division of the first target image into a set central region and an outer region, zone1 is the set central region and zone2 is the set peripheral region (i.e., the set central region is the outer region). The specific location of the central region may be: and the rectangular area is positioned in the center of the first target image, and has distances of V/4 to two horizontal side lengths and distances of H/4 to two vertical side lengths, wherein H is the length of the horizontal side length of the first target image, and V is the length of the vertical side length of the first target image. It will be appreciated that the region division of figure 5 is also applicable to the second target image.

When the target pixel in the zone1 in the first target image and the pixel at the corresponding position in the second target image are weighted, the utilized weight parameters are respectively a first center weight and a second center weight; when the target pixel in the zone2 in the first target image and the pixel at the corresponding position in the second target image are weighted, the utilized weight parameters are the first middle-outer peripheral weight and the second outer peripheral weight respectively.

Because the attention degrees of the central area and the peripheral area on the image are different, the weight parameters inside and outside the central area are set to be different, different correction effects can be embodied on the central area and the peripheral area of the image, and the method is more in line with actual requirements.

In one embodiment, regarding the above manner of weighted average, in step S3031, the determining the first weight and the second weight includes:

determining a first center weight in the established first corresponding relation between the exposure duration and the first center weight according to the first exposure duration;

determining a first peripheral weight according to the first exposure duration in the established second corresponding relation between the exposure duration and the first peripheral weight;

determining a second central weight according to the determined first central weight, and determining a second peripheral weight according to the determined first peripheral weight;

the exposure duration corresponding to the first dead pixel coordinate table is longer than the exposure duration corresponding to the second dead pixel coordinate table; the first central weight corresponding to the first exposure duration is greater than the corresponding first peripheral weight.

Based on the first corresponding relation and the second corresponding relation, the first central weight corresponding to the obtained first exposure duration is greater than the corresponding first peripheral weight, so that when the target pixel in the first target image and the pixel corresponding to the position in the second target image are weighted, the first central weight corresponding to the target pixel in the set central area is greater than the first peripheral weight corresponding to the target pixel outside the set central area, the actual dead pixel in the image central area is corrected as much as possible, and meanwhile, the resolution of the image peripheral area is ensured.

Preferably, in the first corresponding relationship, the exposure time length T3 corresponds to a first center weight W3, the exposure time length T4 corresponds to a first center weight W4, the T3 is greater than the T4, and the W3 is greater than or equal to the W4; and/or the presence of a gas in the gas,

in the second correspondence, the exposure time period T5 corresponds to the first peripheral weight W5, the exposure time period T6 corresponds to the first peripheral weight W6, the T5 is greater than the T6, and the W5 is greater than the W6.

In the first corresponding relationship between the exposure time and the first center weight, the longer the exposure time, the larger the first center weight, and of course, the functional relationship between the exposure time and the first center weight is not necessarily a continuous straight line or curve, and may be a step-shaped broken line segment. The larger the first center weight, i.e., the larger the weight value in the set center region in the first target image, and correspondingly, the smaller the weight value in the set center region in the second target image.

In the second corresponding relationship between the exposure time and the first peripheral weight, the longer the exposure time, the larger the first peripheral weight corresponding to the longer the exposure time, and of course, the functional relationship between the exposure time and the first peripheral weight is not necessarily a continuous straight line or curve, and may also be a step-shaped broken line segment. The greater the first peripheral weight, i.e., the greater the weight value outside the central region set in the first target image, and correspondingly, the smaller the weight value outside the central region set in the second target image.

Based on the first and second correspondence relationships, when the first exposure duration is closer to the exposure duration corresponding to the first dead pixel coordinate table (the number of exposed dead pixels is larger), the determined first center weight and the first peripheral weight are larger (more correction effects of actual dead pixels need to be considered), and when the first exposure duration is closer to the exposure duration corresponding to the second dead pixel coordinate table (the number of exposed dead pixels is smaller), the determined second center weight and the determined second peripheral weight are larger (more correction effects of image resolution need to be considered), so that the correction effects are better.

Referring to fig. 5 and 6, a solid line represents a first corresponding relationship between the first center weight and the exposure duration, and a solid line represents a second corresponding relationship between the first peripheral weight and the exposure duration, where long refers to the exposure duration corresponding to the first dead pixel coordinate table, short refers to the exposure duration corresponding to the second dead pixel coordinate table, and the calculation formula of the first weight under the first exposure duration, short 2, is as follows (3):

Figure BDA0002317677350000151

in equation (3), for the target pixels in the zone1 in the first target image, the coefficient α larger than 1 is multiplied in the equation for calculating wgt _ L2, so that wgt _ L2 (first central weight) corresponding to the zone1 is larger than wgt _ L2 (first peripheral weight) corresponding to the zone 2. of course, when wgt _ L2 corresponding to the zone1 is larger than 1, the value of wgt _ L2 is modified to 1 so as not to cause the second central weight to be larger than 1.

Accordingly, the calculation formula for determining the second weight according to the first weight is as follows (4):

wgt_S2=1-wgt_L2 (4)。

similarly, when the number of the preset dead pixel coordinate tables is two, and the first exposure time length is greater than or equal to long and less than or equal to max (maximum exposure time length), wgt _ L2 is 1, wgt _ S2 is 0, and the target dead pixel coordinate table is one and is the first dead pixel coordinate table corresponding to long; when the first exposure duration is less than or equal to short and greater than min (minimum exposure duration), wgt _ L2 is 0, wgt _ S2 is 1, and the target dead pixel coordinate table is one and is the second dead pixel coordinate table corresponding to the short.

In one embodiment, the determining the first image after dead pixel correction according to the weighted-average pixels in step S3033 may include:

modifying pixels used for weighted average in the first target image into corresponding pixels after weighted average, and determining the modified first target image as an image of the first image after dead pixel correction;

alternatively, the first and second electrodes may be,

and modifying the pixels used for weighted average in the second target image into corresponding weighted average pixels, and determining the modified second target image as the image of the first image after dead pixel correction.

It is to be understood that the specific manner of determining the image after dead pixel correction of the first image according to the weighted-average pixels is not limited thereto, and for example, the pixels on the third image that have the same position as the weighted-average pixels are modified into the weighted-average pixels, and if the weighted-average pixels are not all the pixels of the first image, the remaining pixels are modified into corresponding pixels of the first image, and the third image is an image that has the same size as the first image and all the pixels are blank pixels.

Optionally, the first dead pixel coordinate table records all dead pixel coordinates calibrated under the corresponding exposure duration; and the second dead pixel coordinate table records all dead pixel coordinates calibrated under the corresponding exposure duration.

Optionally, the second bad point coordinate table records all bad point coordinates calibrated under the corresponding exposure duration; and the first dead pixel coordinate table records dead pixel coordinates which are calibrated under the corresponding exposure duration and are different from the dead pixel coordinates recorded in the second dead pixel coordinate table. In other words, the bad point coordinates recorded in the second bad point coordinate table may be the bad point coordinates added on the basis of the first bad point coordinate table, which may reduce the required storage space.

Based on the same concept as the image dead pixel correction method described above, referring to fig. 7, an electronic apparatus 100 includes: a memory 101 and a processor 102 (e.g., one or more processors). The specific type of electronic device is not limited, and the electronic device may be, but is not limited to, an imaging device. The electronic device may be, for example, a device electrically connected to the imaging device, and may acquire an image and exposure parameters of the imaging device.

In one embodiment, the memory is to store program code; the processor, configured to invoke the program code, when the program code is executed, is configured to perform the following:

acquiring a first exposure duration, wherein the first exposure duration is the exposure duration of a first image;

determining a target dead pixel coordinate table from at least two preset dead pixel coordinate tables according to the first exposure duration, wherein the at least two preset dead pixel coordinate tables comprise dead pixel coordinate tables which are determined under different exposure parameters;

and carrying out dead pixel correction on the first image according to the target dead pixel coordinate table.

Preferably, the at least two preset bad pixel coordinate tables include bad pixel coordinate tables specified at different exposure time lengths.

Preferably, the target dead pixel coordinate table is a dead pixel coordinate table.

Preferably, the exposure duration corresponding to the target dead pixel coordinate table is equal to the first exposure duration; alternatively, the first and second electrodes may be,

the target dead pixel coordinate table is a dead pixel coordinate table with the smallest absolute value of the difference value between the corresponding exposure time length and the first exposure time length in the preset at least two dead pixel coordinate tables; alternatively, the first and second electrodes may be,

the target dead pixel coordinate table is a positive dead pixel coordinate table in which the difference value between the corresponding exposure time length and the first exposure time length is the minimum in the at least two preset dead pixel coordinate tables; alternatively, the first and second electrodes may be,

the target dead pixel coordinate table is a negative dead pixel coordinate table in which the difference between the corresponding exposure time length and the first exposure time length is the largest in the at least two preset dead pixel coordinate tables.

Preferably, the target dead pixel coordinate table comprises two dead pixel coordinate tables.

Preferably, the target bad point coordinate table includes a positive bad point coordinate table in which a difference between the corresponding exposure time length and the first exposure time length is the minimum, and a negative bad point coordinate table in which a difference between the corresponding exposure time length and the first exposure time length is the maximum, among the at least two preset bad point coordinate tables.

Preferably, the target dead pixel coordinate table comprises a first dead pixel coordinate table and a second dead pixel coordinate table;

the processor is specifically configured to, when performing the dead pixel correction on the first image according to the target dead pixel coordinate table:

performing dead pixel correction on the first image according to the first dead pixel coordinate table to obtain a first target image;

performing dead pixel correction on the first image according to the second dead pixel coordinate table to obtain a second target image;

and carrying out fusion processing on the first target image and the second target image.

Preferably, when the processor performs the fusion processing on the first target image and the second target image, the processor is specifically configured to:

determining a first weight and a second weight, wherein the first weight is a weight corresponding to a first bad point coordinate table, and the second weight is a weight corresponding to a second bad point coordinate table;

according to the first weight and the second weight, carrying out weighted average on a target pixel in the first target image and a pixel in the second target image, wherein the pixel is at the same position as the target pixel;

and determining the image of the first image after dead pixel correction according to the pixels after weighted average.

Preferably, the processor, according to the first weight and the second weight, is specifically configured to, when performing weighted averaging on a target pixel in the first target image and a pixel in the second target image at the same position as the target pixel:

and summing the target pixel in the first target image weighted by the first weight and the pixel in the second target image weighted by the second weight and having the same position as the target pixel to obtain a weighted average pixel.

Preferably, the processor, when determining the first weight and the second weight, is specifically configured to:

determining the first weight in the established corresponding relation between the exposure duration and the first weight according to the first exposure duration;

determining the second weight according to the first weight.

Preferably, the exposure duration corresponding to the first dead pixel coordinate table is longer than the exposure duration corresponding to the second dead pixel coordinate table;

in the established correspondence relationship between the exposure time length and the first weight, the exposure time length T1 corresponds to the first weight W1, the exposure time length T2 corresponds to the first weight W2, the T1 is greater than the T2, and the W1 is greater than the W2.

Preferably, the first weight includes a first central weight and a first peripheral weight; the second weight comprises a second central weight and a second peripheral weight;

the processor, according to the first weight and the second weight, is specifically configured to, when performing weighted averaging on a target pixel in the first target image and a pixel in the second target image at the same position as the target pixel:

summing the target pixel in the set central area in the first target image weighted by the first central weight and the pixel in the same position as the target pixel in the second target image weighted by the second central weight to obtain the pixel in the set central area after weighted average;

and summing the target pixel outside the set central area in the first target image weighted by the first peripheral weight and the pixel at the same position as the target pixel in the second target image weighted by the second peripheral weight to obtain the weighted average pixel outside the set central area.

Preferably, the processor, when determining the first weight and the second weight, is specifically configured to:

determining a first center weight in the established first corresponding relation between the exposure duration and the first center weight according to the first exposure duration;

determining a first peripheral weight according to the first exposure duration in the established second corresponding relation between the exposure duration and the first peripheral weight;

determining a second central weight according to the determined first central weight, and determining a second peripheral weight according to the determined first peripheral weight;

the exposure duration corresponding to the first dead pixel coordinate table is longer than the exposure duration corresponding to the second dead pixel coordinate table; the first central weight corresponding to the first exposure duration is greater than the corresponding first peripheral weight.

Preferably, in the first corresponding relationship, the exposure time length T3 corresponds to a first center weight W3, the exposure time length T4 corresponds to a first center weight W4, the T3 is greater than the T4, and the W3 is greater than or equal to the W4; and/or the presence of a gas in the gas,

in the second correspondence, the exposure time period T5 corresponds to the first peripheral weight W5, the exposure time period T6 corresponds to the first peripheral weight W6, the T5 is greater than the T6, and the W5 is greater than the W6.

Preferably, the target pixel includes: all pixels in the first target image, or pixels in the first target image after dead pixel correction.

Preferably, the processor is specifically configured to, when determining the image with the dead pixel correction of the first image according to the weighted-average pixels:

modifying pixels used for weighted average in the first target image into corresponding pixels after weighted average, and determining the modified first target image as an image of the first image after dead pixel correction;

alternatively, the first and second electrodes may be,

and modifying the pixels used for weighted average in the second target image into corresponding weighted average pixels, and determining the modified second target image as the image of the first image after dead pixel correction.

Preferably, the first dead pixel coordinate table records all dead pixel coordinates calibrated under the corresponding exposure duration;

and the second dead pixel coordinate table records all dead pixel coordinates calibrated under the corresponding exposure duration.

Preferably, the second dead pixel coordinate table records all dead pixel coordinates calibrated under the corresponding exposure duration;

and the first dead pixel coordinate table records dead pixel coordinates which are calibrated under the corresponding exposure duration and are different from the dead pixel coordinates recorded in the second dead pixel coordinate table.

Based on the same inventive concept as the method, the present invention further provides a computer-readable storage medium, wherein computer instructions are stored on the computer-readable storage medium, and when executed, the computer instructions implement the image dead pixel correction method according to the foregoing embodiment.

The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by an article of manufacture with certain functionality. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.

For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the units may be implemented in the same software and/or hardware or in a plurality of software and/or hardware when implementing the invention.

As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.

The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

Furthermore, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

The above description is only an example of the present invention, and is not intended to limit the present invention. Various modifications and alterations to this invention will become apparent to those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.

22页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:多孔径成像设备、成像系统、和用于提供多孔径成像设备的方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类