WO2020042083A1 - 图像坏点校正方法及设备、存储介质 - Google Patents

图像坏点校正方法及设备、存储介质 Download PDF

Info

Publication number
WO2020042083A1
WO2020042083A1 PCT/CN2018/103263 CN2018103263W WO2020042083A1 WO 2020042083 A1 WO2020042083 A1 WO 2020042083A1 CN 2018103263 W CN2018103263 W CN 2018103263W WO 2020042083 A1 WO2020042083 A1 WO 2020042083A1
Authority
WO
WIPO (PCT)
Prior art keywords
weight
point coordinate
target
image
coordinate table
Prior art date
Application number
PCT/CN2018/103263
Other languages
English (en)
French (fr)
Inventor
何健
Original Assignee
深圳市大疆创新科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to PCT/CN2018/103263 priority Critical patent/WO2020042083A1/zh
Priority to CN201880039797.2A priority patent/CN110771131B/zh
Publication of WO2020042083A1 publication Critical patent/WO2020042083A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N25/00Circuitry of solid-state image sensors [SSIS]; Control thereof
    • H04N25/60Noise processing, e.g. detecting, correcting, reducing or removing noise
    • H04N25/63Noise processing, e.g. detecting, correcting, reducing or removing noise applied to dark current
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/81Camera processing pipelines; Components thereof for suppressing or minimising disturbance in the image signal generation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N25/00Circuitry of solid-state image sensors [SSIS]; Control thereof
    • H04N25/60Noise processing, e.g. detecting, correcting, reducing or removing noise

Definitions

  • the present invention relates to the technical field of image processing, and in particular, to a method and device for image dead pixel correction, and a storage medium.
  • An imaging device may have a defective point on the acquired image due to a defect in the manufacturing process or an error in the conversion of the optical signal.
  • Image dead spots include bright and dark spots.
  • the brightness value of a pixel point is proportional to the incident light, and the brightness value of a bright point is significantly larger than the incident light multiplied by the corresponding proportion, and the brightness of the point will increase significantly with the increase of the exposure time; In other words, the pixel value at this point is close to 0 no matter what the incident light is.
  • the positions of the dead pixels on the image are fixed, so only the position coordinates of all the dead pixels need to be calibrated, and the dead pixels can be corrected later by using these position coordinates.
  • the invention provides a method and a device for correcting an image dead point, and a storage medium, so as to prevent the problems of obvious overcorrection or undercorrection.
  • an image dead point correction method including:
  • the first exposure duration is the exposure duration of the first image
  • a target bad point coordinate table from a preset at least two bad point coordinate table according to the first exposure duration, wherein the preset at least two bad point coordinate tables include calibrations calibrated under different exposure parameters Bad point coordinate table
  • an electronic device including: a memory and a processor;
  • the memory is used to store program code
  • the processor is configured to call the program code, and when the program code is executed, is configured to perform the following operations:
  • the first exposure duration is the exposure duration of the first image
  • a target bad point coordinate table from a preset at least two bad point coordinate table according to the first exposure duration, wherein the preset at least two bad point coordinate tables include calibrations calibrated under different exposure parameters Bad point coordinate table
  • a computer-readable storage medium stores computer instructions.
  • the image according to the first aspect of the embodiments of the present invention is implemented. Dead pixel correction method.
  • an exposure duration of the first image that is, a first exposure duration may be obtained, and a target may be determined for the first image according to the first exposure duration.
  • the dead point coordinate table because the target dead point coordinate table is determined from the preset dead point coordinate table calibrated under at least two different exposure parameters according to the exposure time of the image, so when the exposure time is different, The target bad point coordinate table suitable for the first image can be determined according to the exposure time.
  • the effect of the exposure time is considered in the image dead point correction, which can achieve more suitable dead point correction under different exposure time and prevent the obvious correction. Over- or under-corrected problems.
  • FIG. 1 is a schematic flowchart of an image dead point correction method according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of performing a bad pixel correction on a first image according to a target bad pixel coordinate table according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of performing a bad point correction on a first image according to a target bad point coordinate table according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of a correspondence relationship between an exposure duration and a first weight according to an embodiment of the present invention
  • FIG. 5 is a schematic diagram of an image divided into a set center area and outside, according to an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of another correspondence relationship between an exposure duration and a first weight according to an embodiment of the present invention.
  • FIG. 7 is a structural block diagram of an electronic device according to an embodiment of the present invention.
  • first, second, third, etc. may be used in the present invention to describe various information, these information should not be limited to these terms. These terms are used to distinguish the same type of information from each other.
  • first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information.
  • word “if” can be interpreted as “at”, or “at ", or "in response to a determination”.
  • An embodiment of the present invention provides an image dead point correction method, and the method may be executed by an electronic device.
  • the specific type of the electronic device is not limited, and the electronic device may be an imaging device but is not limited to an imaging device.
  • the electronic device when the electronic device is an imaging device, an imaging device such as an image sensor is integrated with the image acquisition capability on the electronic device.
  • the electronic device executes the image dead point correction method described above, the electronic device corrects the image exposed by the imaging device.
  • the electronic device may be a device electrically connected to the imaging device, and may acquire an image on the imaging device and perform a corresponding image dead pixel correction method, which is not limited in particular.
  • an image acquired under different exposure parameters is corrected according to a dead point coordinate table calibrated under the same exposure parameter.
  • the number of dead pixels calibrated under different exposure parameters is different.
  • the exposure parameter also known as the exposure time, that is, the time interval between the shutter opening and closing
  • the number of dead pixels in the image under a short exposure time is significantly less than the number of dead pixels in the image at long exposures.
  • the bad point coordinate table will be calibrated under the condition of long exposure time, because this can expose more bad points on the image.
  • the images acquired under the short exposure time are corrected with the dead pixels calibrated under the long exposure time, many pixels that are not dead pixels under the short exposure time conditions will also be corrected as dead pixels, causing the image information of these non-bad pixels The loss reduces image resolution.
  • an embodiment of the present invention provides an image dead point correction method.
  • the method includes the following steps:
  • S200 Determine a target bad point coordinate table from a preset at least two bad point coordinate table according to the first exposure duration, wherein the preset at least two bad point coordinate tables include calibration under different exposure parameters Coordinate table of the dead point;
  • S300 Perform a dead point correction on the first image according to the target dead point coordinate table.
  • the execution subject of the image dead point correction method may be an electronic device, and further may be a processor of the electronic device, wherein the processor may be one or more, and the processor may be a general-purpose processor or a special-purpose processor .
  • the electronic device may be the imaging device itself or connected to the imaging device.
  • the electronic device is described as an imaging device in the following.
  • the electronic device may include a memory storing a program required by the processor for execution, a dead point coordinate table memory, an imaging device (image sensor, etc.) for acquiring images, and / or for displaying an image
  • a memory storing a program required by the processor for execution
  • a dead point coordinate table memory storing a program required by the processor for execution
  • an imaging device image sensor, etc.
  • the display is unlimited.
  • This device is preset with at least two bad point coordinate tables calibrated under different exposure parameters, which can be stored in the memory of the device, and when needed, the processor calls the bad point coordinate table or reads the bad point coordinates.
  • the entries in the table are sufficient. It can be understood that the bad pixel coordinates recorded under the corresponding exposure parameters are recorded in each bad pixel coordinate table, and the bad pixel on the image collected by the device can be located according to the bad pixel coordinates.
  • the device can acquire images under different exposure time. Before step S100 is performed, a first image may be acquired first, and then a dead pixel correction may be performed on the first image, where the exposure time when the first image is acquired is the first exposure time.
  • the first image may be any one frame image collected by the device.
  • the method for acquiring the first image may be real-time acquisition by the device, or the first image may be determined from the acquired images, which is not limited.
  • step S100 a first exposure duration is obtained, and the first exposure duration is an exposure duration of the first image.
  • the length of time for obtaining the first exposure is not limited.
  • the first exposure duration configured in the device may be read during acquisition.
  • the first image is an image that has been acquired and stored in the device, and when a bad point correction is required for the first image, the first corresponding to the first image can be determined from the exposure time stored in the device. Exposure duration, where the exposure duration can be stored in the device corresponding to the captured image when an image is acquired.
  • a target bad point coordinate table is determined from the preset at least two bad point coordinate tables according to the first exposure duration, wherein the preset at least two bad point coordinate tables include different exposures.
  • the coordinate table of the dead point calibrated under the parameters.
  • the exposure parameters may include exposure duration, and / or aperture size F value, etc.
  • the number of coordinates of the bad points obtained under different exposure parameters may be different.
  • the target bad point coordinate table is determined from the bad point coordinate tables calibrated by these different exposure parameters according to the first exposure time, and the most suitable bad point coordinate table can be obtained in terms of the first exposure time.
  • the number of the determined target bad point coordinate tables may be more than one, which is determined according to the first exposure duration.
  • a bad point coordinate table whose corresponding exposure time is closest to the first exposure time length may be obtained from all the bad point coordinate tables, which is not limited thereto.
  • step 300 is performed to perform a dead point correction on the first image according to the determined target dead point coordinate table.
  • the dead pixels there are no specific ways to correct the dead pixels. For example, you can locate the dead pixels in the first image according to the coordinates of the dead pixels recorded in the target dead pixel coordinate table, and then modify the pixel value of the dead pixels to be adjacent to the dead pixels The calculated value of the pixel value of at least one pixel.
  • the operation value may be a value obtained by averaging pixel values of several adjacent pixels of the bad pixel.
  • an exposure duration of the first image that is, a first exposure duration
  • a target dead point coordinate table may be determined for the first image according to the first exposure duration. Because the target dead point coordinate table is determined from the preset dead point coordinate table calibrated under at least two different exposure parameters according to the exposure time of the image, it can be determined according to the exposure time when the exposure time is different.
  • a target bad point coordinate table suitable for correcting the bad point of the first image is generated. The effect of the exposure time is considered in the image bad point correction, and a more suitable bad point correction can be achieved at different exposure time lengths to prevent significant overcorrection or undercorrection. The problem.
  • the preset at least two bad point coordinate tables include bad point coordinate tables that are calibrated under different exposure durations.
  • the number of bad dots that can be exposed varies with different exposure durations, and the number of dead dots that are exposed as the exposure duration changes does not change linearly.
  • the exposure time for which the number of bad pixels that can be exposed suddenly increases is determined as the exposure time for which a coordinate table of the dead pixels needs to be calibrated.
  • a relationship curve between the exposure time and the number of corresponding exposed bad points can be made, and the exposure time with a sudden increase in the number of bad points can be determined from the relationship curve as the exposure time of the coordinate table of the bad points that needs to be calibrated. Using the bad point coordinate table calibrated under the sudden increase in the number of bad points can make the correction effect better.
  • the number of exposed dead pixels is 3; at 2s, the number of exposed dead pixels is 4; at 3s, the number of exposed dead pixels is 8; at 4s, the number of exposed dead pixels is 9 ; At 5s, the number of exposed dead pixels is 14; then 3s and 5s are taken as the two exposure times for which the coordinate table of the dead pixels needs to be calibrated. In this way, when the exposure time is 4s (or between 3s and 4s) between 3s and 5s, the number of exposed bad points is close to the number when the exposure time is 3s, compared with the case where the number is greatly different.
  • the exposure time for which the bad point coordinate table needs to be calibrated is not limited. It can be determined according to the needs. For different exposure time, the bad point coordinates can be calibrated to obtain the corresponding bad point coordinate table.
  • the target bad point coordinate table is a bad point coordinate table.
  • an exposure duration corresponding to the target bad point coordinate table is equal to the first exposure duration.
  • the determined target bad point coordinate table can be a bad point coordinate table corresponding to the first exposure time.
  • the target bad point coordinate table is a bad point coordinate table in which the absolute value of the difference between the corresponding exposure duration and the first exposure duration is the smallest in the preset at least two bad spot coordinate tables.
  • the difference between the exposure time corresponding to the target bad point coordinate table and the first exposure time can be positive or negative, but the absolute value is the absolute value of the difference between the exposure time corresponding to all the bad point coordinate tables and the first exposure time. The smallest of the values.
  • the target bad point coordinate table is a bad point coordinate table in which the difference between the corresponding exposure time length and the first exposure time length is the smallest positive value in the preset at least two bad point coordinate tables.
  • the difference between the exposure time corresponding to the target bad point coordinate table and the first exposure time is a positive value, and it is the smallest of the positive values obtained by making the difference between the exposure time corresponding to each bad point coordinate table and the first exposure time.
  • the target bad point coordinate table is a bad point coordinate table in which the difference between the corresponding exposure duration and the first exposure duration is the largest negative value in the preset at least two bad point coordinate tables.
  • the difference between the exposure time corresponding to the target dead point coordinate table and the first exposure time is a negative value, and it is the largest of the negative values obtained by the difference between the exposure time corresponding to each dead point coordinate table and the first exposure time.
  • the exposure time corresponding to the bad point coordinate table is the same as or the closest to the first exposure time, which can make the bad pixel coordinates recorded in the target bad point coordinate table match the actual bad point coordinates in the first image to the highest degree, so that the correction effect is the best .
  • the difference between the corresponding exposure duration and the first exposure duration refers to the difference obtained by subtracting the first exposure duration from the corresponding exposure duration. Because the exposure time has a size relationship, there are positive and negative values for the difference.
  • step S300 after the bad pixel in the first image is located according to the target bad pixel coordinate table, the bad pixel can be corrected directly to achieve the first Image dead point correction.
  • the target bad point coordinate table includes two bad point coordinate tables.
  • the target bad point coordinate table includes among the preset at least two bad point coordinate tables, a corresponding bad point coordinate table with a minimum positive difference between a corresponding exposure duration and the first exposure duration. And a bad point coordinate table with the largest negative difference between the corresponding exposure duration and the first exposure duration.
  • the preset exposure time corresponding to the bad point coordinate table includes: 0.002s, 1s, 2s, and 5s, and the first exposure time is 1.5s, then the target bad point coordinate table is 1s ((1.5-1) s is A bad point coordinate table corresponding to a positive value and the smallest of all positive values), and a bad point coordinate table corresponding to 2s ((1.5-2) s is a negative value and the largest of all negative values).
  • the target bad point coordinate table includes a first bad point coordinate table and a second bad point coordinate table
  • step S300 the performing a dead point correction on the first image according to the target dead point coordinate table may include the following steps:
  • S301 Perform a bad point correction on the first image according to the first bad point coordinate table to obtain a first target image.
  • S302 Perform a dead point correction on the first image according to the second dead point coordinate table to obtain a second target image.
  • step S301 the following steps may be included:
  • S3011 Determine the pixels of the bad pixels in the first image according to the coordinates of the bad pixels recorded in the first bad pixel coordinate table;
  • S3012 Perform operation on the pixel features of at least two pixels adjacent to the bad pixel in the first image to obtain the calculated pixel features;
  • S3013 Modify the pixel feature of the bad pixel to the pixel feature after the corresponding operation to obtain a first target image.
  • step S302 the following steps may be included:
  • S3021 Determine the pixels of the bad pixels in the first image according to the coordinates of the bad pixels recorded in the second bad pixel coordinate table;
  • S3022 Perform operation on the pixel features of at least two pixels adjacent to the bad pixel in the first image to obtain the calculated pixel features;
  • S3023 Modify the pixel characteristics of the bad pixel to the pixel characteristics after the corresponding operation to obtain a second target image.
  • the operation performed on the pixel characteristics of the pixels in steps S3012 and S3022 may be an average operation, which is not limited in particular.
  • the first images in steps 301 and S302 are the same two first images, and another first image can be obtained by copying the first image, or both the first images are obtained by copying the original first image Is not limited.
  • step S303 is performed to perform fusion processing on the first target image and the second target image, and the specific fusion method is not limited.
  • an image 501 is a first image acquired at a first exposure time
  • an image 502 and an image 503 are two images obtained by copying the image 501
  • a first target is obtained after image 502 and image 503 are corrected for dead pixels
  • a fusion process is performed on the first target image 504 and the second target image 505 to obtain an image 506 after the dead pixel correction.
  • the first bad point coordinate table is, for example, at least two preset bad point coordinate tables, and the corresponding difference between the corresponding exposure time length and the first exposure time length is the smallest positive value; the second bad point coordinate;
  • the table is, for example, a preset bad point coordinate table in which at least two preset bad point coordinate tables have the largest difference between the corresponding exposure duration and the first exposure duration. Of course, the two are interchangeable.
  • the first exposure time is between the exposure time corresponding to the first bad point coordinate table and the exposure time corresponding to the second bad point coordinate table.
  • the first image is executed according to the first bad point coordinate table and the second bad point coordinate table.
  • Image dead point correction a fusion of the first target image and the second target image to obtain a dead pixel corrected image.
  • one of the first target image and the second target image is used to ensure the actual dead pixel It can be corrected as much as possible, and another one can weaken the influence of non-bad pixels but be corrected as bad pixels.
  • the corrected image of the dead pixels improves the image resolution under short exposure time. It can guarantee the actual dead point correction effect under long exposure time.
  • step S303 performing the fusion processing on the first target image and the second target image includes the following steps:
  • S3031 Determine a first weight and a second weight, the first weight is a weight corresponding to a first bad point coordinate table, and the second weight is a weight corresponding to the second bad point coordinate table;
  • S3032 performing a weighted average on the target pixels in the first target image and pixels in the second target image at the same position as the target pixel according to the first weight and the second weight;
  • S3033 Determine, according to the weighted average pixels, an image of the first image after the dead pixel correction.
  • the first weight may be determined first, and then the second weight may be determined according to the first weight, and vice versa.
  • the first weight and the second weight are not fixed, and may be determined according to the first exposure duration.
  • step S3032 performing weighted average of two pixels according to the first weight and the second weight refers to weighted average of the pixel values of the two pixels.
  • 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
  • the pixel value of the pixel in the second target image that is the same as the target pixel position is 200.
  • the target pixels include: all pixels in the first target image, or pixels in the first target image that have been corrected for dead pixels.
  • step S3033 an image after the dead pixel correction of the first image is determined according to the weighted average pixels.
  • the process of performing fusion processing on the first target image and the second target image is not a simple process of averaging the pixels corresponding to the positions on the first target image and the second target image, but a weighted average. In this way, according to the first A specific situation of the exposure time is used to determine whether to correct the bad point coordinate table corresponding to the long exposure time or the bad point coordinate table corresponding to the short exposure time.
  • step S3032 according to the first weight and the second weight, the target pixel in the first target image is at the same position as the target pixel in the second target image.
  • Weighted average of pixels including:
  • all target pixels in the first target image are weighted by the same first weight; pixels corresponding to each target pixel in the second target image are weighted by the same second weight. Weighted.
  • the determining the first weight and the second weight may include the following steps:
  • the established correspondence between the exposure time and the first weight can be a calculation formula or a relationship table.
  • the first weight can be determined by substituting the first exposure time into the calculation formula, or in the relationship table.
  • the search for the first weight corresponding to the first exposure duration is specifically not limited to the foregoing manner.
  • the exposure time corresponding to the first bad point coordinate table is greater than the exposure time corresponding to the second bad point coordinate table
  • the exposure duration T1 corresponds to the first weight W1
  • the exposure duration T2 corresponds to the first weight W2.
  • the T1 is greater than the T2, and the W1 is greater than the W2.
  • the function relationship between the exposure time and the first weight is not necessarily a continuous straight line or curve, and it may also be a step. Shaped polyline segments. The larger the first weight, that is, the larger the weight value used in the first target image, the smaller the weight value used in the second target image.
  • the determined first weight is more Large (need to consider more the effect of correcting the actual dead pixels), and the first exposure time is closer to the exposure time corresponding to the second dead point coordinate table (the number of exposed dead pixels will be less), the determined second The weight is larger (more image resolution needs to be considered), making the correction effect better.
  • the calculation formula of the first weight for the first exposure duration shutter1 is as follows (1):
  • wgt_L1 (shutter1–0.01) / (5-0.01) (1);
  • wgt_S1 1-wgt_L1 (2).
  • the first weight includes a first center weight and a first peripheral weight
  • the second weight includes a second center weight and a second peripheral weight
  • step S3032 according to the first weight and the second weight, a weighted average is performed on the target pixels in the first target image and the pixels in the second target image at the same position as the target pixel, include:
  • Target pixels in a set center region in the first target image weighted by using the first center weight, and target pixels in the second target image weighted by using the second center weight Sum the pixels with the same target pixel position to obtain the pixels in the set center area after the weighted average;
  • Target pixels outside the set center region in the first target image weighted by using the first peripheral weight, and target pixels in the second target image weighted by using the second peripheral weight and The pixels with the same target pixel position are summed to obtain the pixels outside the set center area after the weighted average.
  • zone1 is the set center area
  • zone2 is the set peripheral area (that is, outside the set center area).
  • the specific position of the center region may be: a rectangular region located in the center of the first target image and having a distance of two horizontal sides from both V / 4 and a distance of two vertical sides from both H / 4, where , 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 can be understood that the area division of FIG. 5 is also applicable to the second target image.
  • the weight parameters used are the first center weight and the second center weight, respectively; and in the first target image, When the target pixel in zone 2 and the corresponding position pixel in the second target image are weighted, the weight parameters used are the first middle peripheral weight and the second peripheral weight, respectively.
  • step S3031 the determining the first weight and the second weight includes:
  • the exposure time corresponding to the first bad point coordinate table is greater than the exposure time corresponding to the second bad point coordinate table; the first center weight corresponding to the first exposure time length is greater than the corresponding first peripheral weight.
  • the first center weight corresponding to the obtained first exposure duration is greater than the corresponding first peripheral weight, so that the target pixel in the first target image corresponds to the position in the second target image.
  • the first center weight corresponding to the target pixels in the center area is set to be larger than the first peripheral weight corresponding to the target pixels outside the center area. The actual dead pixel in the center area of the image is corrected as much as possible. , While ensuring the resolution of the peripheral area of the image.
  • the exposure duration T3 corresponds to the first center weight W3
  • the exposure duration T4 corresponds to the first center weight W4
  • the T3 is greater than the T4
  • the W3 is greater than or equal to the W4 ;and / or
  • the exposure duration T5 corresponds to the first peripheral weight W5
  • the exposure duration T6 corresponds to the first peripheral weight W6.
  • the T5 is greater than the T6, and the W5 is greater than the W6.
  • the longer the exposure time the larger the first center weight.
  • the function relationship between the exposure time and the first center weight may not be a continuous straight line or curve. , Or a stepped polyline segment.
  • the longer the exposure time the larger the first peripheral weight.
  • the function relationship between the exposure time and the first peripheral weight is not necessarily a continuous straight line or curve. , Or a stepped polyline segment.
  • the larger the first peripheral weight that is, the larger the weight value used to set outside the central area in the first target image, the correspondingly, the smaller the weight value used to set outside the central area in the second target image.
  • the determined first center weight, and the first A peripheral weight are larger (more correction effects of actual dead pixels need to be considered), and the first exposure time is closer to the exposure time corresponding to the second dead point coordinate table (the number of exposed dead pixels will be less),
  • the determined second center weight and the second peripheral weight are larger (more image resolution needs to be considered), which makes the correction effect better.
  • the solid line represents a first correspondence between the first center weight and the exposure duration
  • the solid line represents the second correspondence between the first peripheral weight and the exposure duration
  • long refers to the first bad
  • the exposure time corresponding to the point coordinate table, short refers to the exposure time corresponding to the second bad point coordinate table
  • the formula for calculating the first weight under shutter2 for the first exposure time is as follows (3):
  • the formula for calculating wgt_L2 is multiplied by a coefficient ⁇ greater than 1, so that wgt_L2 (the first center weight) corresponding to zone1 is greater than wgt_L2 corresponding to zone2. (The first peripheral weight) is greater.
  • wgt_L2 corresponding to zone1 is greater than 1
  • the value of wgt_L2 is modified to 1 to avoid the situation where the second center weight is greater than 1.
  • the calculation formula for determining the second weight based on the first weight is as follows (4):
  • wgt_S2 1-wgt_L2 (4).
  • determining the image after the dead pixel correction of the first image according to the weighted average pixels may include:
  • a pixel used for weighted average in the second target image is modified to a corresponding weighted average pixel, and the modified second target image is determined as an image of the first image after being corrected for a dead pixel.
  • the specific manner of determining the image of the first image after the dead pixel correction is based on the weighted average pixels is not limited to this.
  • the pixels on the third image having the same pixel positions as the weighted average pixels may also be used. Modified as a weighted average pixel. If the weighted average pixels are not all pixels of the first image, the remaining pixels are modified as corresponding pixels of the first image.
  • the third image is the same size as the first image and all pixels are An image of blank pixels.
  • the first bad point coordinate table records all the coordinates of the bad points corresponding to the exposure duration; the second bad point coordinate table records all the coordinates of the bad points corresponding to the exposure duration.
  • the second bad point coordinate table records all the coordinates of the bad points corresponding to the exposure duration; the first bad point coordinate table records the coordinates of the second bad point and the second dead point corresponding to the exposure time
  • the coordinates of the dead pixels are different from the coordinates of the dead pixels recorded in.
  • the bad pixel coordinates recorded in the second bad pixel coordinate table may be the bad pixel coordinates added on the basis of the first bad pixel coordinate table, which may reduce the required storage space.
  • an electronic device 100 includes a memory 101 and a processor 102 (such as one or more processors).
  • the specific type of the electronic device is not limited, and the electronic device may be an imaging device 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 an exposure parameter of the imaging device.
  • the memory is configured to store program code;
  • the processor is configured to call the program code, and when the program code is executed, is configured to perform the following operations:
  • the first exposure duration is the exposure duration of the first image
  • a target bad point coordinate table from a preset at least two bad point coordinate table according to the first exposure duration, wherein the preset at least two bad point coordinate tables include calibrations calibrated under different exposure parameters Bad point coordinate table
  • the preset at least two bad point coordinate tables include bad point coordinate tables calibrated under different exposure durations.
  • the target bad point coordinate table is a bad point coordinate table.
  • an exposure duration corresponding to the target bad point coordinate table is equal to the first exposure duration
  • the target bad point coordinate table is a bad point coordinate table in which the absolute value of the difference between the corresponding exposure time and the first exposure time is the smallest in the preset at least two bad point coordinate tables; or,
  • the target bad point coordinate table is a bad point coordinate table in the preset at least two bad point coordinate tables whose difference between the corresponding exposure duration and the first exposure duration is the smallest positive value; or,
  • the target bad point coordinate table is a bad point coordinate table in which the difference between the corresponding exposure duration and the first exposure duration in the preset at least two bad spot coordinate tables is the largest negative value.
  • the target bad point coordinate table includes two bad point coordinate tables.
  • the target bad point coordinate table includes a preset bad point coordinate table in which at least two of the preset bad point coordinate tables have a minimum positive difference between the corresponding exposure time and the first exposure time, And a bad point coordinate table in which the difference between the corresponding exposure duration and the first exposure duration is the largest negative value.
  • the target bad point coordinate table includes a first bad point coordinate table and a second bad point coordinate table;
  • the processor is specifically configured to: when the processor performs the dead point correction on the first image according to the target dead point coordinate table:
  • the processor when the processor performs the fusion processing on the first target image and the second target image, the processor is specifically configured to:
  • the first weight is a weight corresponding to the first dead point coordinate table
  • the second weight is a weight corresponding to the second dead point coordinate table
  • An image after the dead pixel correction of the first image is determined according to the weighted average pixels.
  • the processor performs, according to the first weight and the second weight, a target pixel in the first target image with a pixel at the same position as the target pixel in the second target image.
  • the weighted average is specifically used for:
  • the processor determines the first weight and the second weight
  • the processor is specifically configured to:
  • the exposure time corresponding to the first bad point coordinate table is greater than the exposure time corresponding to the second bad point coordinate table
  • the exposure duration T1 corresponds to the first weight W1
  • the exposure duration T2 corresponds to the first weight W2.
  • the T1 is greater than the T2, and the W1 is greater than the W2.
  • the first weight includes a first center weight and a first peripheral weight
  • the second weight includes a second center weight and a second peripheral weight
  • the processor When the processor performs weighted average on the target pixel in the first target image and the pixel in the second target image with the same position as the target pixel according to the first weight and the second weight Specifically used for:
  • Target pixels in a set center region in the first target image weighted by using the first center weight, and target pixels in the second target image weighted by using the second center weight Sum the pixels with the same target pixel position to obtain the pixels in the set center area after the weighted average;
  • Target pixels outside the set center region in the first target image weighted by using the first peripheral weight, and target pixels in the second target image weighted by using the second peripheral weight and The pixels with the same target pixel position are summed to obtain the pixels outside the set center area after the weighted average.
  • the processor determines the first weight and the second weight
  • the processor is specifically configured to:
  • the exposure time corresponding to the first bad point coordinate table is greater than the exposure time corresponding to the second bad point coordinate table; the first center weight corresponding to the first exposure time length is greater than the corresponding first peripheral weight.
  • the exposure duration T3 corresponds to the first center weight W3
  • the exposure duration T4 corresponds to the first center weight W4
  • the T3 is greater than the T4
  • the W3 is greater than or equal to the W4 ;and / or
  • the exposure duration T5 corresponds to the first peripheral weight W5
  • the exposure duration T6 corresponds to the first peripheral weight W6.
  • the T5 is greater than the T6, and the W5 is greater than the W6.
  • the target pixels include all pixels in the first target image, or pixels after the dead pixel correction in the first target image.
  • the processor determines the image of the first image after the dead pixel correction is performed according to the weighted average pixels
  • the processor is specifically configured to:
  • a pixel used for weighted average in the second target image is modified to a corresponding weighted average pixel, and the modified second target image is determined as an image of the first image after being corrected for a dead pixel.
  • the first dead point coordinate table records all the coordinates of the dead points corresponding to the exposure duration
  • the second bad point coordinate table records all the coordinates of the bad points corresponding to the exposure duration.
  • the second bad point coordinate table records all bad point coordinates that are calibrated under the corresponding exposure duration
  • the first bad point coordinate table records bad point coordinates that are different from the bad point coordinates recorded in the second bad point coordinate table and are down-scaled according to the exposure time.
  • the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and when the computer instructions are executed, the image described in the foregoing embodiment is implemented Dead pixel correction method.
  • the system, device, module, or unit described in the foregoing embodiments may be implemented by a computer chip or entity, or by a product having a certain function.
  • a typical implementation device is a computer, and the specific form of the computer may be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email sending and receiving device, and a game control Desk, tablet computer, wearable device, or a combination of any of these devices.
  • the embodiments of the present invention may be provided as a method, a system, or a computer program product. Therefore, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • these computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured article including the instruction device,
  • the instruction device implements the functions specified in a flowchart or a plurality of processes and / or a block or a block of the block diagram.
  • These computer program instructions can also be loaded into a computer or other programmable data processing device, so that a series of operating steps are performed on the computer or other programmable device to produce a computer-implemented process, and the instructions executed on the computer or other programmable device Provides steps for implementing the functions specified in one or more flowcharts and / or one or more blocks of the block diagrams.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)
  • Image Processing (AREA)

Abstract

一种图像坏点校正方法,包括:获取第一曝光时长,所述第一曝光时长为第一图像的曝光时长(S100);根据所述第一曝光时长从预设的至少两个坏点坐标表中确定目标坏点坐标表,其中,所述预设的至少两个坏点坐标表包括在不同的曝光参数下标定出的坏点坐标表(S200);根据所述目标坏点坐标表对所述第一图像进行坏点校正(S300)。所述方法可以防止校正明显过度或校正明显不足的问题。

Description

图像坏点校正方法及设备、存储介质 技术领域
本发明涉及图像处理技术领域,尤其是涉及一种图像坏点校正方法及设备、存储介质。
背景技术
成像装置(例如图像传感器)由于制作工艺的缺陷、或光信号转换出现错误等的原因,采集的图像上会存在坏点。图像坏点包括亮点和暗点。一般来说,像素点的亮度值是正比于入射光的,而亮点的亮度值明显大于入射光乘以相应比例,并且随着曝光时间的增加,该点的亮度会显著增加;而对于暗点来说,无论在什么入射光下,该点的像素值接近于0。坏点在图像上的位置是固定的,因此只需要标定出所有坏点的位置坐标,后续利用这些位置坐标即可对坏点进行校正。
相关图像坏点校正方式中,针对同一成像装置而言,无论采集图像时的曝光参数如何变化,对图像校正时,都只会采用同一曝光参数下标定出的一张坏点坐标表。
但是,不同曝光参数下图像上出现的坏点数量是不同的。上述方式中,由于对不同曝光参数的图像校正时,都会采用同一曝光参数下标定出的一张坏点坐标表,导致可能存在校正明显过度或校正明显不足的问题。
发明内容
本发明提供一种图像坏点校正方法及设备、存储介质,防止校正明显过度或校正明显不足的问题。
本发明实施例第一方面,提供一种图像坏点校正方法,包括:
获取第一曝光时长,所述第一曝光时长为第一图像的曝光时长;
根据所述第一曝光时长从预设的至少两个坏点坐标表中确定目标坏点坐标表,其中,所述预设的至少两个坏点坐标表包括在不同的曝光参数下标定出的坏点坐标表;
根据所述目标坏点坐标表对所述第一图像进行坏点校正。
本发明实施例第二方面,提供一种电子设备,其特征在于,包括:存储器和处理器;
所述存储器,用于存储程序代码;
所述处理器,用于调用所述程序代码,当程序代码被执行时,用于执行以下操作:
获取第一曝光时长,所述第一曝光时长为第一图像的曝光时长;
根据所述第一曝光时长从预设的至少两个坏点坐标表中确定目标坏点坐标表,其中,所述预设的至少两个坏点坐标表包括在不同的曝光参数下标定出的坏点坐标表;
根据所述目标坏点坐标表对所述第一图像进行坏点校正。
本发明实施例第三方面,提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机指令,所述计算机指令被执行时,实现本发明实施例第一方面所述的图像坏点校正方法。
基于上述技术方案,本发明实施例中,需要对第一图像进行坏点校正时,可获取该第一图像的曝光时长即第一曝光时长,根据该第一曝光时长为第一图像确定出目标坏点坐标表,由于该目标坏点坐标表是根据图像的曝光时长从预设的至少两个不同曝光参数下标定出的坏点坐标表中确定出的,因而在曝光时长不同的情况下,可根据曝光时长确定出合适对第一图像进行坏点校正的目标坏点坐标表,图像坏点校正中考虑了曝光时长的影响,可实现不同曝光时长下更合适的坏点校正,防止校正明显过度或校正明显不足的问题。
附图说明
为了更加清楚地说明本发明实施例中的技术方案,下面将对本发明实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明中记载的一些实施例,对于本领域普通技术人员来讲,还可以根据本发明实施例的这些附图获得其它的附图。
图1是本发明一实施例的图像坏点校正方法的流程示意图;
图2是本发明一实施例的根据目标坏点坐标表对第一图像进行坏点校正的流程示意图;
图3是本发明一实施例的根据目标坏点坐标表对第一图像进行坏点校正的示意图;
图4是本发明一实施例的曝光时长与第一权重的一种对应关系的示意图;
图5是本发明一实施例的图像分为设定中心区域内和外的示意图;
图6是本发明一实施例的曝光时长与第一权重的另一种对应关系的示意图;
图7是本发明一实施例的电子设备的结构框图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。另外,在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。
本发明使用的术语仅仅是出于描述特定实施例的目的,而非限制本发明。本发明和权利要求书所使用的单数形式的“一种”、“所述”和“该”也旨在包括多 数形式,除非上下文清楚地表示其它含义。应当理解的是,本文中使用的术语“和/或”是指包含一个或多个相关联的列出项目的任何或所有可能组合。
尽管在本发明可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语用来将同一类型的信息彼此区分开。例如,在不脱离本发明范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,此外,所使用的词语“如果”可以被解释成为“在……时”,或者,“当……时”,或者,“响应于确定”。
本发明实施例中提出一种图像坏点校正方法,该方法的执行主体可以为电子设备。电子设备具体类型不限,电子设备可以是成像设备但不限于成像设备。
例如,电子设备为成像设备的情况下,电子设备上集成有图像采集能力的成像装置例如图像传感器,电子设备执行上述图像坏点校正方法时对该成像装置曝光所得的图像进行校正;又如,电子设备为成像设备之外的情况下,可以是与成像设备电连接的设备,可获取成像设备上的图像而执行相应的图像坏点校正方法,具体不限。
相关的图像坏点校正方式中,对于一成像装置而言,会依据同一曝光参数下标定的坏点坐标表来对不同曝光参数下采集的图像进行校正。
但是,不同曝光参数下标定出的坏点数量是不同的,以曝光参数为曝光时长(又称曝光时间,即快门打开到关闭的时间间隔)为例,短曝光时长下图像出现的坏点数量明显小于长曝光时长下图像出现的坏点数量。
通常来说,会选择在长曝光时长条件下标定坏点坐标表,因为这样可以在图像上暴露出更多的坏点。然而,如果短曝光时长下采集的图像用长曝光时长下标定的坏点校正,会将很多短曝光时长条件下不是坏点的像素也当作坏点校正,造成这些非坏点像素的图像信息的损失,降低了图像解析度。
基于上述发现,本发明实施例提供了一种图像坏点校正方法,参看图1,该方法包括以下步骤:
S100:获取第一曝光时长,所述第一曝光时长为第一图像的曝光时长;
S200:根据所述第一曝光时长从预设的至少两个坏点坐标表中确定目标坏点坐标表,其中,所述预设的至少两个坏点坐标表包括在不同的曝光参数下标定出的坏点坐标表;
S300:根据所述目标坏点坐标表对所述第一图像进行坏点校正。
具体地,图像坏点校正方法的执行主体可以为电子设备,进一步地可以为电子设备的处理器,其中,所述处理器可以为一个或多个,处理器可以为通用处理器或者专用处理器。
电子设备可以是成像设备本身,或者和成像设备连接,下面以电子设备为成像设备展开描述。
电子设备除了处理器之外,还可以包括存储有处理器执行时所需的程序、坏点坐标表的存储器,用于采集图像的成像装置(图像传感器等),和/或,用于显示图像的显示器等不限。
本设备中预设有在不同的曝光参数下标定出的至少两个坏点坐标表,可以存储在本设备中的存储器中,在需要时由处理器调用坏点坐标表或者读取坏点坐标表中的表项即可。可以理解,各个坏点坐标表中记录的是相应曝光参数下标定出的坏点坐标,根据坏点坐标可以定位本设备采集的图像上的坏点像素。
本设备可以在不同曝光时长下采集得到图像。在执行步骤S100之前,可以先获取第一图像,后续针对第一图像执行坏点校正,其中,采集第一图像时的曝光时长为第一曝光时长。
第一图像可以是本设备采集的任意一帧图像。获取第一图像的方式可以是本设备实时采集,或者可以从已采集的图像中确定出第一图像,具体不限。
步骤S100中,获取第一曝光时长,所述第一曝光时长为第一图像的曝光时长。
获取第一曝光时长具体不限。例如,若第一图像是当前采集的图像,则可以采集时读取本设备内已配置的该第一曝光时长。又如,若第一图像是已 采集并存储在本设备中的图像,在需要针对第一图像进行坏点校正时,可以从本设备预存的曝光时长中确定出与第一图像对应的第一曝光时长,其中,在采集得到图像时可以将曝光时长与采集的图像对应地存储在本设备中。
在步骤S200中,根据所述第一曝光时长从预设的至少两个坏点坐标表中确定目标坏点坐标表,其中,所述预设的至少两个坏点坐标表包括在不同的曝光参数下标定出的坏点坐标表。
曝光参数可以包括曝光时长、和/或光圈大小F值等,对于同一成像装置来说,不同曝光参数下得到的坏点坐标的数量会有所不同。
根据第一曝光时长从这些不同曝光参数标定出的坏点坐标表中确定目标坏点坐标表,可以得到于第一曝光时长而言最合适的坏点坐标表。确定出的目标坏点坐标表的数量可以为一个以上,根据第一曝光时长而定。
例如可以是从所有坏点坐标表中获取对应的曝光时长与第一曝光时长最为接近的坏点坐标表,具体不限于此。
得到目标坏点坐标表后,执行步骤300,根据确定出的目标坏点坐标表对第一图像进行坏点校正。
具体坏点校正的方式不限,例如可以依据目标坏点坐标表中记录的坏点坐标定位第一图像中的坏点像素,再将坏点像素的像素值修改为与该坏点像素相邻的至少一个像素的像素值的运算值。该运算值可以是,将该坏点像素的几个相邻像素的像素值求平均所得值。
本发明实施例中,需要对第一图像进行坏点校正时,可获取该第一图像的曝光时长即第一曝光时长,根据该第一曝光时长为第一图像确定出目标坏点坐标表,由于该目标坏点坐标表是根据图像的曝光时长从预设的至少两个不同曝光参数下标定出的坏点坐标表中确定出的,因而在曝光时长不同的情况下,可根据曝光时长确定出合适对第一图像进行坏点校正的目标坏点坐标表,图像坏点校正中考虑了曝光时长的影响,可实现不同曝光时长下更合适的坏点校正,防止校正明显过度或校正明显不足的问题。
在一个实施例中,所述预设的至少两个坏点坐标表包括在不同的曝光时 长下标定出的坏点坐标表。
不同曝光时长可暴露出的坏点数量不同,且随着曝光时长的变化所暴露的坏点数量并非是线形变化的。可选的,将可暴露的坏点数量突增的曝光时长确定为需要标定出坏点坐标表的曝光时长。实际可以作出曝光时长与对应暴露的坏点数量之间的关系曲线,从关系曲线上确定出坏点数量突增的曝光时长,作为需要标定出坏点坐标表的曝光时长。使用在坏点数量突增的曝光时间下标定出的坏点坐标表,可使得校正效果更好。
例如,在1s时,暴露的坏点数量为3个;2s时,暴露的坏点数量为4个;3s时,暴露的坏点数量为8个;4s时,暴露的坏点数量为9个;5s时,暴露的坏点数量为14个;则将3s和5s作为两个需要标定出坏点坐标表的曝光时长。如此,当曝光时长为处于3s和5s之间的4s(或3s到4s之间)时,暴露出的坏点数量与曝光时长为3s时的数量较为接近,相比于数量差异较大的情况来说,依据曝光时长为3s对应的坏点坐标表进行坏点校正时,更多的坏点可被校正,校正效果更好。当然,此处仅是示例性的,只是为了说明上述方式确定的曝光时长对应的坏点坐标表可带来更好的校正效果,并不作为限制。
可以理解,需要标定出坏点坐标表的曝光时长具体不限,可以根据需要确定,对于不同曝光时长,可标定出坏点坐标以得到对应的坏点坐标表。
在一个实施例中,所述目标坏点坐标表为一个坏点坐标表。
可选的,所述目标坏点坐标表对应的曝光时长等于所述第一曝光时长。换言之,预设的坏点坐标表中存在与该第一曝光时长对应的坏点坐标表,确定出的目标坏点坐标表便可以为与该第一曝光时长对应的坏点坐标表。
可选的,所述目标坏点坐标表为所述预设的至少两个坏点坐标表中,对应的曝光时长与所述第一曝光时长的差值的绝对值最小的坏点坐标表。换言之,目标坏点坐标表对应的曝光时长与第一曝光时长的差值可为正值或负值,但是绝对值是所有坏点坐标表对应的曝光时长与第一曝光时长的差值的绝对值中最小的。
可选的,所述目标坏点坐标表为所述预设的至少两个坏点坐标表中,对 应的曝光时长与所述第一曝光时长的差值为最小的正值的坏点坐标表。换言之,目标坏点坐标表对应的曝光时长与第一曝光时长的差值是正值,且是各个坏点坐标表对应的曝光时长与第一曝光时长作差得到的正值中最小的。
可选的,所述目标坏点坐标表为所述预设的至少两个坏点坐标表中,对应的曝光时长与所述第一曝光时长的差值为最大的负值的坏点坐标表。换言之,目标坏点坐标表对应的曝光时长与第一曝光时长的差值是负值,且是各个坏点坐标表对应的曝光时长与第一曝光时长作差得到的负值中最大的。
坏点坐标表对应的曝光时长与第一曝光时长相同或者最接近,可以使得目标坏点坐标表中记录的坏点坐标与第一图像中的实际坏点坐标匹配度最高,从而校正效果最好。
可以理解,对应的曝光时长与所述第一曝光时长的差值,指的是对应的曝光时长减去第一曝光时长得到的差值。由于曝光时长存在大小关系,因而差值存在正值和负值。
在目标坏点坐标表为一个坏点坐标表的情况下,步骤S300中,根据目标坏点坐标表定位第一图像中的坏点像素后,可直接对这些坏点像素进行校正,实现第一图像坏点校正。
在一个实施例中,目标坏点坐标表包括两个坏点坐标表。
可选的,所述目标坏点坐标表包括所述预设的至少两个坏点坐标表中,对应的曝光时长与所述第一曝光时长的差值为最小的正值的坏点坐标表,以及对应的曝光时长与所述第一曝光时长的差值为最大的负值的坏点坐标表。
例如,预设的坏点坐标表对应的曝光时长包括:0.002s、1s、2s、5s,而第一曝光时长为1.5s,则目标坏点坐标表即为1s((1.5-1)s为正值且是所有正值中最小的)对应的坏点坐标表,以及2s((1.5-2)s为负值且是所有负值中最大的)对应的坏点坐标表。
在一个实施例中,所述目标坏点坐标表包括第一坏点坐标表和第二坏点坐标表;
参看图2,步骤S300中,所述根据所述目标坏点坐标表对所述第一图像 进行坏点校正,可以包括以下步骤:
S301:依据所述第一坏点坐标表对所述第一图像进行坏点校正,得到第一目标图像;
S302:依据所述第二坏点坐标表对所述第一图像进行坏点校正,得到第二目标图像;
S303:将所述第一目标图像和第二目标图像进行融合处理。
步骤S301中,可以包括以下步骤:
S3011:依据第一坏点坐标表中记录的坏点坐标,确定所述第一图像中的坏点像素;
S3012:将与第一图像中的坏点像素相邻的至少两个像素的像素特征执行运算,得到运算后的像素特征;
S3013:将坏点像素的像素特征修改为对应运算后的像素特征,得到第一目标图像。
步骤S302中,可以包括以下步骤:
S3021:依据第二坏点坐标表中记录的坏点坐标,确定所述第一图像中的坏点像素;
S3022:将与第一图像中的坏点像素相邻的至少两个像素的像素特征执行运算,得到运算后的像素特征;
S3023:将坏点像素的像素特征修改为对应运算后的像素特征,得到第二目标图像。
步骤S3012和步骤S3022中对像素的像素特征执行的运算可以是取均值运算,具体不限。
可以理解,步骤301和步骤S302中的第一图像是相同的两份第一图像,可以通过复制第一图像得到另一个第一图像,或者,两份第一图像都是复制原第一图像所得,具体不限。
在得到第一目标图像和第二目标图像后,执行步骤S303,将第一目标图像和第二目标图像进行融合处理,具体融合方式不限。
参看图3,图像501是第一曝光时长下采集的第一图像,图像502和图像503是复制该图像501所得的两个图像,分别对图像502和图像503进行坏点校正后得到第一目标图像504和第二目标图像505,将第一目标图像504和第二目标图像505执行融合处理,得到坏点校正后的图像506。
第一坏点坐标表例如是预设的至少两个坏点坐标表中,对应的曝光时长与所述第一曝光时长的差值为最小的正值的坏点坐标表;第二坏点坐标表例如是预设的至少两个坏点坐标表中,对应的曝光时长与所述第一曝光时长的差值为最大的负值的坏点坐标表。当然,两者互换亦可。
第一曝光时长介于第一坏点坐标表对应的曝光时长和第二坏点坐标表对应的曝光时长之间,依据第一坏点坐标表、第二坏点坐标表分别对第一图像执行图像坏点校正,将得到的第一目标图像和第二目标图像进行融合而得到坏点校正后的图像,如此,第一目标图像和第二目标图像中,其中一个用来保证实际坏点像素尽可能地被校正,另一个可削弱非坏点像素却被当作坏点像素进行校正的影响,相比现有技术,坏点校正后的图像提升了短曝光时长下的图像解析度,又可保证长曝光时长下的实际坏点校正效果。
在一个实施例中,步骤S303中,所述将第一目标图像和第二目标图像进行融合处理,包括以下步骤:
S3031:确定第一权重和第二权重,所述第一权重为第一坏点坐标表对应的权重,所述第二权重为所述第二坏点坐标表对应的权重;
S3032:根据所述第一权重和所述第二权重,对所述第一目标图像中的目标像素,与所述第二目标图像中与所述目标像素位置相同的像素进行加权平均;
S3033:依据加权平均后的像素确定所述第一图像经坏点校正后的图像。
步骤S3031中,可以先确定第一权重,再根据第一权重确定第二权重,反之亦可。优选的,第一权重和第二权重并非是固定的,可以根据第一曝光时长确定。
可以理解,步骤S3032中,根据第一权重和第二权重对两个像素进行加 权平均,指的是对两个像素的像素值进行加权平均。例如,第一权重为0.4,第二权重为0.6,第一目标图像中的目标像素的像素值为100,第二目标图像中与目标像素位置相同的像素的像素值为200,则加权平均后的值为100*0.4+200*0.6=160。
可选的,所述目标像素包括:第一目标图像中的全部像素,或者,第一目标图像中经坏点校正后的像素。
步骤S3033中,依据加权平均后的像素确定所述第一图像经坏点校正后的图像。
对第一目标图像和第二目标图像进行融合处理的过程,并非简单地将第一目标图像和第二目标图像上位置对应的像素进行求均值处理,而是进行加权平均,如此,可以根据第一曝光时长的具体情况,来确定校正是倾向于长曝光时长对应的坏点坐标表、还是倾向于短曝光时长对应的坏点坐标表。
在一个实施例中,步骤S3032中,根据所述第一权重和所述第二权重,对所述第一目标图像中的目标像素,与所述第二目标图像中与所述目标像素位置相同的像素进行加权平均,包括:
对利用所述第一权重加权后的、所述第一目标图像中的目标像素,与利用所述第二权重加权后的、所述第二目标图像中与所述目标像素位置相同的像素求和,得到加权平均后的像素。
该加权平均方式中,对于第一目标图像中所有目标像素来说,都利用同一个第一权重进行加权;对于第二目标图像中与各个目标像素对应的像素,都利用同一个第二权重进行加权。
在一个实施例中,针对上述加权平均的方式,步骤S3031中,所述确定第一权重和第二权重可以包括以下步骤:
依据所述第一曝光时长在已建立的曝光时长与第一权重的对应关系中确定所述第一权重;
依据所述第一权重确定所述第二权重。
已建立的曝光时长与第一权重的对应关系可以是计算公式、或者是关系 表等,相应的,确定第一权重的方式可以是将第一曝光时长代入计算公式计算得带、或者在关系表中查找与第一曝光时长对应的第一权重,具体不限于上述方式。
优选的,第一坏点坐标表对应的曝光时长大于第二坏点坐标表对应的曝光时长;
所述已建立的曝光时长与第一权重的对应关系中,曝光时长T1对应于第一权重W1,曝光时长T2对应于第一权重W2,所述T1大于所述T2,所述W1大于所述W2。
曝光时间与第一权重的对应关系中,越长的曝光时间长对应的第一权重越大,当然,曝光时长与第一权重的函数关系不一定是一条连续的直线或曲线,也可能是阶梯状的折线段。第一权重越大,即用在第一目标图像中权重值越大,相应的,用在第二目标图像中的权重值则越小。
基于上述的曝光时长与第一权重的对应关系,在第一曝光时长更靠近第一坏点坐标表对应的曝光时长时(暴露的坏点数量会更多),所确定的第一权重则更大(需要考虑更多的是实际坏点的校正效果),而第一曝光时长更靠近第二坏点坐标表对应的曝光时长时(暴露的坏点数量会更少),所确定的第二权重则更大(需要考虑更多的是图像解析度情况),使得校正效果更好。
参看图4,示出了第一权重与曝光时长之间的坐标关系,其中,long指第一坏点坐标表对应的曝光时长,short指第二坏点坐标表对应的曝光时长,以long为5s,short为0.01s为例,第一曝光时长shutter1下的第一权重的计算公式如下(1):
wgt_L1=(shutter1–0.01)/(5-0.01)   (1);
相应的,依据所述第一权重确定第二权重的计算公式如下(2):
wgt_S1=1-wgt_L1   (2)。
在预设的坏点坐标表为两个的情况下,在第一曝光时长为大于等于long而小于等于max(最大曝光时长)时,wgt_L1=1,wgt_S1=0,目标坏点坐标表为一个且为该long对应的第一坏点坐标表;在第一曝光时长为小于等于 short而大于min(最小曝光时长)时,wgt_L1=0,wgt_S1=1,目标坏点坐标表为一个且为该short对应的第二坏点坐标表。
在一个实施例中,所述第一权重包括第一中心权重和第一外围权重;所述第二权重包括第二中心权重和第二外围权重;
步骤S3032中,根据所述第一权重和所述第二权重,对所述第一目标图像中的目标像素,与所述第二目标图像中与所述目标像素位置相同的像素进行加权平均,包括:
对利用所述第一中心权重加权后的、所述第一目标图像中设定中心区域内的目标像素,与利用所述第二中心权重加权后的、所述第二目标图像中与所述目标像素位置相同的像素求和,得到加权平均后的设定中心区域内的像素;
对利用所述第一外围权重加权后的、所述第一目标图像中设定中心区域外的目标像素,与利用所述第二外围权重加权后的、所述第二目标图像中与所述目标像素位置相同的像素求和,得到加权平均后的设定中心区域外的像素。
参看图5,示出了第一目标图像中设定中心区域内和外的划分,zone1为设定中心区域,zone2为设定外围区域(即设定中心区域外)。设定中心区域具体的位置可以是:位于第一目标图像中心且与两条水平边长的距离均为V/4、与两条竖直边长的距离均为H/4的长方形区域,其中,H为第一目标图像的水平边长的长度,V为第一目标图像的竖直边长的长度。可以理解,图5的区域划分对于第二目标图像来说也适用。
对第一目标图像中zone1中的目标像素、及与第二目标图像中对应位置的像素进行加权时,利用的权重参数分别为第一中心权重、第二中心权重;而对第一目标图像中zone2中的目标像素与第二目标图像中对应位置的像素进行加权时,利用的权重参数分别为第一中外围权重、第二外围权重。
由于图像上中心区域与外围区域的受关注度不同,将设定中心区域内和外的权重参数设置为不同,可以在图像的中心区域与外围区域上体现不同的 校正效果,更符合实际需求。
在一个实施例中,针对上述加权平均的方式,步骤S3031中,所述确定第一权重和第二权重包括:
依据所述第一曝光时长在已建立的曝光时长与第一中心权重的第一对应关系中确定第一中心权重;
依据所述第一曝光时长在已建立的曝光时长与第一外围权重的第二对应关系中确定第一外围权重;
依据已确定的第一中心权重确定第二中心权重,依据已确定的第一外围权重确定第二外围权重;
其中,第一坏点坐标表对应的曝光时长大于第二坏点坐标表对应的曝光时长;所述第一曝光时长对应的第一中心权重大于对应的第一外围权重。
基于上述第一对应关系和第二对应关系,得到的第一曝光时长对应的第一中心权重大于对应的第一外围权重,使得第一目标图像中的目标像素与第二目标图像中位置对应的像素加权时,设定中心区域内的目标像素对应的第一中心权重会比设定中心区域外的目标像素对应的第一外围权重更大一些,尽可能地校正图像中心区域的实际坏点像素,而同时保证图像外围区域的解析度。
优选的,所述第一对应关系中,曝光时长T3对应于第一中心权重W3,曝光时长T4对应于第一中心权重W4,所述T3大于所述T4,所述W3大于或等于所述W4;和/或,
所述第二对应关系中,曝光时长T5对应于第一外围权重W5,曝光时长T6对应于第一外围权重W6,所述T5大于所述T6,所述W5大于所述W6。
曝光时间与第一中心权重的第一对应关系中,越长的曝光时间长对应的第一中心权重越大,当然,曝光时长与第一中心权重的函数关系不一定是一条连续的直线或曲线,也可能是阶梯状的折线段。第一中心权重越大,即用在第一目标图像中设定中心区域内的权重值越大,相应的,用在第二目标图像中设定中心区域内的权重值则越小。
曝光时间与第一外围权重的第二对应关系中,越长的曝光时间长对应的第一外围权重越大,当然,曝光时长与第一外围权重的函数关系不一定是一条连续的直线或曲线,也可能是阶梯状的折线段。第一外围权重越大,即用在第一目标图像中设定中心区域外的权重值越大,相应的,用在第二目标图像中设定中心区域外的权重值则越小。
基于上述的第一、第二对应关系,在第一曝光时长更靠近第一坏点坐标表对应的曝光时长时(暴露的坏点数量会更多),所确定的第一中心权重、及第一外围权重则更大(需要考虑更多的是实际坏点的校正效果),而第一曝光时长更靠近第二坏点坐标表对应的曝光时长时(暴露的坏点数量会更少),所确定的第二中心权重、第二外围权重则更大(需要考虑更多的是图像解析度情况),使得校正效果更好。
参看图5和图6,实线表示第一中心权重与曝光时长之间的第一对应关系,实线表示第一外围权重与曝光时长之间的第二对应关系,其中,long指第一坏点坐标表对应的曝光时长,short指第二坏点坐标表对应的曝光时长,第一曝光时长shutter2下的第一权重的计算公式如下(3):
Figure PCTCN2018103263-appb-000001
上式(3中),对于第一目标图像中zone1内的目标像素,计算wgt_L2的公式中,乘上了大于1的系数α,使得zone1对应的wgt_L2(第一中心权重)比zone2对应的wgt_L2(第一外围权重)更大。当然,当zone1对应的wgt_L2大于1时,则将wgt_L2的值修改为1,以免第二中心权重出现大于1的情况。
相应的,依据所述第一权重确定第二权重的计算公式如下(4):
wgt_S2=1-wgt_L2    (4)。
同理的,在预设的坏点坐标表为两个的情况下,在第一曝光时长为大于等于long而小于等于max(最大曝光时长)时,wgt_L2=1,wgt_S2=0,目标 坏点坐标表为一个且为该long对应的第一坏点坐标表;在第一曝光时长为小等于short而大于min(最小曝光时长)时,wgt_L2=0,wgt_S2=1,目标坏点坐标表为一个且为该short对应的第二坏点坐标表。
在一个实施例中,步骤S3033中,所述依据加权平均后的像素确定所述第一图像经坏点校正后的图像,可以包括:
将所述第一目标图像中用于加权平均的像素修改为对应的加权平均后的像素,将修改后的所述第一目标图像确定为所述第一图像经坏点校正后的图像;
或者,
将所述第二目标图像中用于加权平均的像素修改为对应的加权平均后的像素,将修改后的所述第二目标图像确定为所述第一图像经坏点校正后的图像。
可以理解,依据加权平均后的像素确定所述第一图像经坏点校正后的图像的具体方式也不限于此,例如还可以是,将第三图像上的与加权平均的像素位置相同的像素修改为加权平均的像素,若加权平均后的像素并非是第一图像的全部像素,则将其余像素修改为第一图像的对应像素,该第三图像是与第一图像大小相同且全部像素为空白像素的图像。
可选的,所述第一坏点坐标表记录有对应曝光时长下标定的全部坏点坐标;所述第二坏点坐标表记录有对应曝光时长下标定的全部坏点坐标。
可选的,所述第二坏点坐标表记录有对应曝光时长下标定的全部坏点坐标;所述第一坏点坐标表记录有对应曝光时长下标定的与所述第二坏点坐标表中记录的坏点坐标所不同的坏点坐标。换言之,第二坏点坐标表中记录的坏点坐标可以是在第一坏点坐标表的基础上增加的坏点坐标,可以减少所需的存储空间。
基于与上述图像坏点校正方法同样的构思,参看图7,一种电子设备100,包括:存储器101和处理器102(如一个或多个处理器)。电子设备具体类型不限,电子设备可以是成像设备但不限于成像设备。电子设备例如也可以是 与成像设备电连接的设备,可获取成像设备的图像及曝光参数。
在一个实施例中,所述存储器,用于存储程序代码;所述处理器,用于调用所述程序代码,当程序代码被执行时,用于执行以下操作:
获取第一曝光时长,所述第一曝光时长为第一图像的曝光时长;
根据所述第一曝光时长从预设的至少两个坏点坐标表中确定目标坏点坐标表,其中,所述预设的至少两个坏点坐标表包括在不同的曝光参数下标定出的坏点坐标表;
根据所述目标坏点坐标表对所述第一图像进行坏点校正。
优选的,所述预设的至少两个坏点坐标表包括在不同的曝光时长下标定出的坏点坐标表。
优选的,所述目标坏点坐标表为一个坏点坐标表。
优选的,所述目标坏点坐标表对应的曝光时长等于所述第一曝光时长;或者,
所述目标坏点坐标表为所述预设的至少两个坏点坐标表中,对应的曝光时长与所述第一曝光时长的差值的绝对值最小的坏点坐标表;或者,
所述目标坏点坐标表为所述预设的至少两个坏点坐标表中,对应的曝光时长与所述第一曝光时长的差值为最小的正值的坏点坐标表;或者,
所述目标坏点坐标表为所述预设的至少两个坏点坐标表中,对应的曝光时长与所述第一曝光时长的差值为最大的负值的坏点坐标表。
优选的,所述目标坏点坐标表包括两个坏点坐标表。
优选的,所述目标坏点坐标表包括所述预设的至少两个坏点坐标表中,对应的曝光时长与所述第一曝光时长的差值为最小的正值的坏点坐标表,以及对应的曝光时长与所述第一曝光时长的差值为最大的负值的坏点坐标表。
优选的,所述目标坏点坐标表包括第一坏点坐标表和第二坏点坐标表;
所述处理器根据所述目标坏点坐标表对所述第一图像进行坏点校正时具体用于:
依据所述第一坏点坐标表对所述第一图像进行坏点校正,得到第一目标 图像;
依据所述第二坏点坐标表对所述第一图像进行坏点校正,得到第二目标图像;
将所述第一目标图像和第二目标图像进行融合处理。
优选的,所述处理器将第一目标图像和第二目标图像进行融合处理时具体用于:
确定第一权重和第二权重,所述第一权重为第一坏点坐标表对应的权重,所述第二权重为所述第二坏点坐标表对应的权重;
根据所述第一权重和所述第二权重,对所述第一目标图像中的目标像素,与所述第二目标图像中与所述目标像素位置相同的像素进行加权平均;
依据加权平均后的像素确定所述第一图像经坏点校正后的图像。
优选的,所述处理器根据所述第一权重和所述第二权重,对所述第一目标图像中的目标像素,与所述第二目标图像中与所述目标像素位置相同的像素进行加权平均时具体用于:
对利用所述第一权重加权后的、所述第一目标图像中的目标像素,与利用所述第二权重加权后的、所述第二目标图像中与所述目标像素位置相同的像素求和,得到加权平均后的像素。
优选的,所述处理器确定第一权重和第二权重时具体用于:
依据所述第一曝光时长在已建立的曝光时长与第一权重的对应关系中确定所述第一权重;
依据所述第一权重确定所述第二权重。
优选的,第一坏点坐标表对应的曝光时长大于第二坏点坐标表对应的曝光时长;
所述已建立的曝光时长与第一权重的对应关系中,曝光时长T1对应于第一权重W1,曝光时长T2对应于第一权重W2,所述T1大于所述T2,所述W1大于所述W2。
优选的,所述第一权重包括第一中心权重和第一外围权重;所述第二权 重包括第二中心权重和第二外围权重;
所述处理器根据所述第一权重和所述第二权重,对所述第一目标图像中的目标像素,与所述第二目标图像中与所述目标像素位置相同的像素进行加权平均时具体用于:
对利用所述第一中心权重加权后的、所述第一目标图像中设定中心区域内的目标像素,与利用所述第二中心权重加权后的、所述第二目标图像中与所述目标像素位置相同的像素求和,得到加权平均后的设定中心区域内的像素;
对利用所述第一外围权重加权后的、所述第一目标图像中设定中心区域外的目标像素,与利用所述第二外围权重加权后的、所述第二目标图像中与所述目标像素位置相同的像素求和,得到加权平均后的设定中心区域外的像素。
优选的,所述处理器确定第一权重和第二权重时具体用于:
依据所述第一曝光时长在已建立的曝光时长与第一中心权重的第一对应关系中确定第一中心权重;
依据所述第一曝光时长在已建立的曝光时长与第一外围权重的第二对应关系中确定第一外围权重;
依据已确定的第一中心权重确定第二中心权重,依据已确定的第一外围权重确定第二外围权重;
其中,第一坏点坐标表对应的曝光时长大于第二坏点坐标表对应的曝光时长;所述第一曝光时长对应的第一中心权重大于对应的第一外围权重。
优选的,所述第一对应关系中,曝光时长T3对应于第一中心权重W3,曝光时长T4对应于第一中心权重W4,所述T3大于所述T4,所述W3大于或等于所述W4;和/或,
所述第二对应关系中,曝光时长T5对应于第一外围权重W5,曝光时长T6对应于第一外围权重W6,所述T5大于所述T6,所述W5大于所述W6。
优选的,所述目标像素包括:第一目标图像中的全部像素,或者,第一 目标图像中经坏点校正后的像素。
优选的,所述处理器依据加权平均后的像素确定所述第一图像经坏点校正后的图像时具体用于:
将所述第一目标图像中用于加权平均的像素修改为对应的加权平均后的像素,将修改后的所述第一目标图像确定为所述第一图像经坏点校正后的图像;
或者,
将所述第二目标图像中用于加权平均的像素修改为对应的加权平均后的像素,将修改后的所述第二目标图像确定为所述第一图像经坏点校正后的图像。
优选的,所述第一坏点坐标表记录有对应曝光时长下标定的全部坏点坐标;
所述第二坏点坐标表记录有对应曝光时长下标定的全部坏点坐标。
优选的,所述第二坏点坐标表记录有对应曝光时长下标定的全部坏点坐标;
所述第一坏点坐标表记录有对应曝光时长下标定的与所述第二坏点坐标表中记录的坏点坐标所不同的坏点坐标。
基于与上述方法同样的发明构思,本发明还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机指令,所述计算机指令被执行时,实现前述实施例所述的图像坏点校正方法。
上述实施例阐明的系统、装置、模块或单元,可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。
为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然, 在实施本发明时可以把各单元的功能在同一个或多个软件和/或硬件中实现。
本领域内的技术人员应明白,本发明实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可以由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其它可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其它可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
而且,这些计算机程序指令也可以存储在能引导计算机或其它可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或者多个流程和/或方框图一个方框或者多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其它可编程数据处理设备,使得在计算机或者其它可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其它可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
以上所述仅为本发明实施例而已,并不用于限制本发明。对于本领域技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原理之内所作的任何修改、等同替换、改进,均应包含在本发明的权利要求范围之内。

Claims (37)

  1. 一种图像坏点校正方法,其特征在于,包括:
    获取第一曝光时长,所述第一曝光时长为第一图像的曝光时长;
    根据所述第一曝光时长从预设的至少两个坏点坐标表中确定目标坏点坐标表,其中,所述预设的至少两个坏点坐标表包括在不同的曝光参数下标定出的坏点坐标表;
    根据所述目标坏点坐标表对所述第一图像进行坏点校正。
  2. 如权利要求1所述的图像坏点校正方法,其特征在于,所述预设的至少两个坏点坐标表包括在不同的曝光时长下标定出的坏点坐标表。
  3. 如权利要求1所述的图像坏点校正方法,其特征在于,所述目标坏点坐标表为一个坏点坐标表。
  4. 如权利要求3所述的图像坏点校正方法,其特征在于,所述目标坏点坐标表对应的曝光时长等于所述第一曝光时长;或者,
    所述目标坏点坐标表为所述预设的至少两个坏点坐标表中,对应的曝光时长与所述第一曝光时长的差值的绝对值最小的坏点坐标表;或者,
    所述目标坏点坐标表为所述预设的至少两个坏点坐标表中,对应的曝光时长与所述第一曝光时长的差值为最小的正值的坏点坐标表;或者,
    所述目标坏点坐标表为所述预设的至少两个坏点坐标表中,对应的曝光时长与所述第一曝光时长的差值为最大的负值的坏点坐标表。
  5. 如权利要求1所述的图像坏点校正方法,其特征在于,所述目标坏点坐标表包括两个坏点坐标表。
  6. 如权利要求5所述的图像坏点校正方法,其特征在于,所述目标坏点坐标表包括所述预设的至少两个坏点坐标表中,对应的曝光时长与所述第一曝光时长的差值为最小的正值的坏点坐标表,以及对应的曝光时长与所述第一曝光时长的差值为最大的负值的坏点坐标表。
  7. 如权利要求5或6所述的图像坏点校正方法,其特征在于,所述目标坏点坐标表包括第一坏点坐标表和第二坏点坐标表;
    所述根据所述目标坏点坐标表对所述第一图像进行坏点校正,包括:
    依据所述第一坏点坐标表对所述第一图像进行坏点校正,得到第一目标图像;
    依据所述第二坏点坐标表对所述第一图像进行坏点校正,得到第二目标图像;
    将所述第一目标图像和第二目标图像进行融合处理。
  8. 如权利要求7所述的图像坏点校正方法,其特征在于,所述将第一目标图像和第二目标图像进行融合处理,包括:
    确定第一权重和第二权重,所述第一权重为第一坏点坐标表对应的权重,所述第二权重为所述第二坏点坐标表对应的权重;
    根据所述第一权重和所述第二权重,对所述第一目标图像中的目标像素,与所述第二目标图像中与所述目标像素位置相同的像素进行加权平均;
    依据加权平均后的像素确定所述第一图像经坏点校正后的图像。
  9. 如权利要求8所述的图像坏点校正方法,其特征在于,根据所述第一权重和所述第二权重,对所述第一目标图像中的目标像素,与所述第二目标图像中与所述目标像素位置相同的像素进行加权平均,包括:
    对利用所述第一权重加权后的、所述第一目标图像中的目标像素,与利用所述第二权重加权后的、所述第二目标图像中与所述目标像素位置相同的像素求和,得到加权平均后的像素。
  10. 如权利要求9所述的图像坏点校正方法,其特征在于,所述确定第一权重和第二权重包括:
    依据所述第一曝光时长在已建立的曝光时长与第一权重的对应关系中确定所述第一权重;
    依据所述第一权重确定所述第二权重。
  11. 如权利要求10所述的图像坏点校正方法,其特征在于,第一坏点坐标表对应的曝光时长大于第二坏点坐标表对应的曝光时长;
    所述已建立的曝光时长与第一权重的对应关系中,曝光时长T1对应于第 一权重W1,曝光时长T2对应于第一权重W2,所述T1大于所述T2,所述W1大于所述W2。
  12. 如权利要求8所述的图像坏点校正方法,其特征在于,所述第一权重包括第一中心权重和第一外围权重;所述第二权重包括第二中心权重和第二外围权重;
    根据所述第一权重和所述第二权重,对所述第一目标图像中的目标像素,与所述第二目标图像中与所述目标像素位置相同的像素进行加权平均,包括:
    对利用所述第一中心权重加权后的、所述第一目标图像中设定中心区域内的目标像素,与利用所述第二中心权重加权后的、所述第二目标图像中与所述目标像素位置相同的像素求和,得到加权平均后的设定中心区域内的像素;
    对利用所述第一外围权重加权后的、所述第一目标图像中设定中心区域外的目标像素,与利用所述第二外围权重加权后的、所述第二目标图像中与所述目标像素位置相同的像素求和,得到加权平均后的设定中心区域外的像素。
  13. 如权利要求12所述的图像坏点校正方法,其特征在于,所述确定第一权重和第二权重包括:
    依据所述第一曝光时长在已建立的曝光时长与第一中心权重的第一对应关系中确定第一中心权重;
    依据所述第一曝光时长在已建立的曝光时长与第一外围权重的第二对应关系中确定第一外围权重;
    依据已确定的第一中心权重确定第二中心权重,依据已确定的第一外围权重确定第二外围权重;
    其中,第一坏点坐标表对应的曝光时长大于第二坏点坐标表对应的曝光时长;所述第一曝光时长对应的第一中心权重大于对应的第一外围权重。
  14. 如权利要求13所述的图像坏点校正方法,其特征在于,所述第一对应关系中,曝光时长T3对应于第一中心权重W3,曝光时长T4对应于第一 中心权重W4,所述T3大于所述T4,所述W3大于或等于所述W4;和/或,
    所述第二对应关系中,曝光时长T5对应于第一外围权重W5,曝光时长T6对应于第一外围权重W6,所述T5大于所述T6,所述W5大于所述W6。
  15. 如权利要求8所述的图像坏点校正方法,其特征在于,所述目标像素包括:第一目标图像中的全部像素,或者,第一目标图像中经坏点校正后的像素。
  16. 如权利要求8所述的图像坏点校正方法,其特征在于,所述依据加权平均后的像素确定所述第一图像经坏点校正后的图像,包括:
    将所述第一目标图像中用于加权平均的像素修改为对应的加权平均后的像素,将修改后的所述第一目标图像确定为所述第一图像经坏点校正后的图像;
    或者,
    将所述第二目标图像中用于加权平均的像素修改为对应的加权平均后的像素,将修改后的所述第二目标图像确定为所述第一图像经坏点校正后的图像。
  17. 如权利要求7所述的图像坏点校正方法,其特征在于,所述第一坏点坐标表记录有对应曝光时长下标定的全部坏点坐标;
    所述第二坏点坐标表记录有对应曝光时长下标定的全部坏点坐标。
  18. 如权利要求7所述的图像坏点校正方法,其特征在于,所述第二坏点坐标表记录有对应曝光时长下标定的全部坏点坐标;
    所述第一坏点坐标表记录有对应曝光时长下标定的与所述第二坏点坐标表中记录的坏点坐标所不同的坏点坐标。
  19. 一种电子设备,其特征在于,包括:存储器和处理器;
    所述存储器,用于存储程序代码;
    所述处理器,用于调用所述程序代码,当程序代码被执行时,用于执行以下操作:
    获取第一曝光时长,所述第一曝光时长为第一图像的曝光时长;
    根据所述第一曝光时长从预设的至少两个坏点坐标表中确定目标坏点坐标表,其中,所述预设的至少两个坏点坐标表包括在不同的曝光参数下标定出的坏点坐标表;
    根据所述目标坏点坐标表对所述第一图像进行坏点校正。
  20. 如权利要求19所述的电子设备,其特征在于,所述预设的至少两个坏点坐标表包括在不同的曝光时长下标定出的坏点坐标表。
  21. 如权利要求19所述的电子设备,其特征在于,所述目标坏点坐标表为一个坏点坐标表。
  22. 如权利要求21所述的电子设备,其特征在于,所述目标坏点坐标表对应的曝光时长等于所述第一曝光时长;或者,
    所述目标坏点坐标表为所述预设的至少两个坏点坐标表中,对应的曝光时长与所述第一曝光时长的差值的绝对值最小的坏点坐标表;或者,
    所述目标坏点坐标表为所述预设的至少两个坏点坐标表中,对应的曝光时长与所述第一曝光时长的差值为最小的正值的坏点坐标表;或者,
    所述目标坏点坐标表为所述预设的至少两个坏点坐标表中,对应的曝光时长与所述第一曝光时长的差值为最大的负值的坏点坐标表。
  23. 如权利要求19所述的电子设备,其特征在于,所述目标坏点坐标表包括两个坏点坐标表。
  24. 如权利要求23所述的电子设备,其特征在于,所述目标坏点坐标表包括所述预设的至少两个坏点坐标表中,对应的曝光时长与所述第一曝光时长的差值为最小的正值的坏点坐标表,以及对应的曝光时长与所述第一曝光时长的差值为最大的负值的坏点坐标表。
  25. 如权利要求23或24所述的电子设备,其特征在于,所述目标坏点坐标表包括第一坏点坐标表和第二坏点坐标表;
    所述处理器根据所述目标坏点坐标表对所述第一图像进行坏点校正时具体用于:
    依据所述第一坏点坐标表对所述第一图像进行坏点校正,得到第一目标 图像;
    依据所述第二坏点坐标表对所述第一图像进行坏点校正,得到第二目标图像;
    将所述第一目标图像和第二目标图像进行融合处理。
  26. 如权利要求25所述的电子设备,其特征在于,所述处理器将第一目标图像和第二目标图像进行融合处理时具体用于:
    确定第一权重和第二权重,所述第一权重为第一坏点坐标表对应的权重,所述第二权重为所述第二坏点坐标表对应的权重;
    根据所述第一权重和所述第二权重,对所述第一目标图像中的目标像素,与所述第二目标图像中与所述目标像素位置相同的像素进行加权平均;
    依据加权平均后的像素确定所述第一图像经坏点校正后的图像。
  27. 如权利要求26所述的电子设备,其特征在于,所述处理器根据所述第一权重和所述第二权重,对所述第一目标图像中的目标像素,与所述第二目标图像中与所述目标像素位置相同的像素进行加权平均时具体用于:
    对利用所述第一权重加权后的、所述第一目标图像中的目标像素,与利用所述第二权重加权后的、所述第二目标图像中与所述目标像素位置相同的像素求和,得到加权平均后的像素。
  28. 如权利要求27所述的电子设备,其特征在于,所述处理器确定第一权重和第二权重时具体用于:
    依据所述第一曝光时长在已建立的曝光时长与第一权重的对应关系中确定所述第一权重;
    依据所述第一权重确定所述第二权重。
  29. 如权利要求28所述的电子设备,其特征在于,第一坏点坐标表对应的曝光时长大于第二坏点坐标表对应的曝光时长;
    所述已建立的曝光时长与第一权重的对应关系中,曝光时长T1对应于第一权重W1,曝光时长T2对应于第一权重W2,所述T1大于所述T2,所述W1大于所述W2。
  30. 如权利要求26所述的电子设备,其特征在于,所述第一权重包括第一中心权重和第一外围权重;所述第二权重包括第二中心权重和第二外围权重;
    所述处理器根据所述第一权重和所述第二权重,对所述第一目标图像中的目标像素,与所述第二目标图像中与所述目标像素位置相同的像素进行加权平均时具体用于:
    对利用所述第一中心权重加权后的、所述第一目标图像中设定中心区域内的目标像素,与利用所述第二中心权重加权后的、所述第二目标图像中与所述目标像素位置相同的像素求和,得到加权平均后的设定中心区域内的像素;
    对利用所述第一外围权重加权后的、所述第一目标图像中设定中心区域外的目标像素,与利用所述第二外围权重加权后的、所述第二目标图像中与所述目标像素位置相同的像素求和,得到加权平均后的设定中心区域外的像素。
  31. 如权利要求30所述的电子设备,其特征在于,所述处理器确定第一权重和第二权重时具体用于:
    依据所述第一曝光时长在已建立的曝光时长与第一中心权重的第一对应关系中确定第一中心权重;
    依据所述第一曝光时长在已建立的曝光时长与第一外围权重的第二对应关系中确定第一外围权重;
    依据已确定的第一中心权重确定第二中心权重,依据已确定的第一外围权重确定第二外围权重;
    其中,第一坏点坐标表对应的曝光时长大于第二坏点坐标表对应的曝光时长;所述第一曝光时长对应的第一中心权重大于对应的第一外围权重。
  32. 如权利要求31所述的电子设备,其特征在于,所述第一对应关系中,曝光时长T3对应于第一中心权重W3,曝光时长T4对应于第一中心权重W4,所述T3大于所述T4,所述W3大于或等于所述W4;和/或,
    所述第二对应关系中,曝光时长T5对应于第一外围权重W5,曝光时长T6对应于第一外围权重W6,所述T5大于所述T6,所述W5大于所述W6。
  33. 如权利要求26所述的电子设备,其特征在于,所述目标像素包括:第一目标图像中的全部像素,或者,第一目标图像中经坏点校正后的像素。
  34. 如权利要求26所述的电子设备,其特征在于,所述处理器依据加权平均后的像素确定所述第一图像经坏点校正后的图像时具体用于:
    将所述第一目标图像中用于加权平均的像素修改为对应的加权平均后的像素,将修改后的所述第一目标图像确定为所述第一图像经坏点校正后的图像;
    或者,
    将所述第二目标图像中用于加权平均的像素修改为对应的加权平均后的像素,将修改后的所述第二目标图像确定为所述第一图像经坏点校正后的图像。
  35. 如权利要求25所述的电子设备,其特征在于,所述第一坏点坐标表记录有对应曝光时长下标定的全部坏点坐标;
    所述第二坏点坐标表记录有对应曝光时长下标定的全部坏点坐标。
  36. 如权利要求25所述的电子设备,其特征在于,所述第二坏点坐标表记录有对应曝光时长下标定的全部坏点坐标;
    所述第一坏点坐标表记录有对应曝光时长下标定的与所述第二坏点坐标表中记录的坏点坐标所不同的坏点坐标。
  37. 一种计算机可读存储介质,其特征在于,
    所述计算机可读存储介质上存储有计算机指令,所述计算机指令被执行时,实现权利要求1-18中任一项所述的图像坏点校正方法。
PCT/CN2018/103263 2018-08-30 2018-08-30 图像坏点校正方法及设备、存储介质 WO2020042083A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2018/103263 WO2020042083A1 (zh) 2018-08-30 2018-08-30 图像坏点校正方法及设备、存储介质
CN201880039797.2A CN110771131B (zh) 2018-08-30 2018-08-30 图像坏点校正方法及设备、存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/103263 WO2020042083A1 (zh) 2018-08-30 2018-08-30 图像坏点校正方法及设备、存储介质

Publications (1)

Publication Number Publication Date
WO2020042083A1 true WO2020042083A1 (zh) 2020-03-05

Family

ID=69328583

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/103263 WO2020042083A1 (zh) 2018-08-30 2018-08-30 图像坏点校正方法及设备、存储介质

Country Status (2)

Country Link
CN (1) CN110771131B (zh)
WO (1) WO2020042083A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112666178A (zh) * 2020-12-14 2021-04-16 杭州当虹科技股份有限公司 一种户外led大屏坏点在线监控方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004336400A (ja) * 2003-05-08 2004-11-25 Olympus Corp 画像処理装置、この画像処理装置を用いた電子カメラ、画像処理方法、及び画像処理プログラム
CN101304485A (zh) * 2008-05-26 2008-11-12 北京中星微电子有限公司 一种坏点补偿的方法及装置
US20150029368A1 (en) * 2013-07-29 2015-01-29 SK Hynix Inc. Dead pixel correction apparatus, image sensor having the same, and operation method of image sensor
CN106651787A (zh) * 2016-11-08 2017-05-10 深圳市安健科技股份有限公司 基于x射线的hdr图像合成方法及系统
CN107613229A (zh) * 2017-09-30 2018-01-19 杭州雄迈集成电路技术有限公司 一种图像传感器坏点检测校正装置及方法

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3784675B2 (ja) * 2001-08-01 2006-06-14 松下電器産業株式会社 撮像装置、撮像方法、およびプログラム
US6618185B2 (en) * 2001-11-28 2003-09-09 Micronic Laser Systems Ab Defective pixel compensation method
US20030179418A1 (en) * 2002-03-19 2003-09-25 Eastman Kodak Company Producing a defective pixel map from defective cluster pixels in an area array image sensor
US7372484B2 (en) * 2003-06-26 2008-05-13 Micron Technology, Inc. Method and apparatus for reducing effects of dark current and defective pixels in an imaging device
JP4508740B2 (ja) * 2004-06-22 2010-07-21 キヤノン株式会社 画像処理装置
US8063957B2 (en) * 2006-03-24 2011-11-22 Qualcomm Incorporated Method and apparatus for processing bad pixels
JP5656561B2 (ja) * 2010-10-28 2015-01-21 キヤノン株式会社 画像処理装置、その制御方法、および制御プログラム
JP5868039B2 (ja) * 2011-06-30 2016-02-24 キヤノン株式会社 撮像装置、画像合成方法、及びコンピュータプログラム
EP2800377A4 (en) * 2011-12-28 2015-07-15 Fujifilm Corp IMAGING DEVICE
EP3144882B1 (en) * 2015-09-21 2018-08-15 Agfa Healthcare Method for reducing image disturbances caused by reconstructed defective pixels in direct radiography
CN107465874B (zh) * 2017-09-07 2019-05-17 维沃移动通信有限公司 一种暗电流处理方法及移动终端

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004336400A (ja) * 2003-05-08 2004-11-25 Olympus Corp 画像処理装置、この画像処理装置を用いた電子カメラ、画像処理方法、及び画像処理プログラム
CN101304485A (zh) * 2008-05-26 2008-11-12 北京中星微电子有限公司 一种坏点补偿的方法及装置
US20150029368A1 (en) * 2013-07-29 2015-01-29 SK Hynix Inc. Dead pixel correction apparatus, image sensor having the same, and operation method of image sensor
CN106651787A (zh) * 2016-11-08 2017-05-10 深圳市安健科技股份有限公司 基于x射线的hdr图像合成方法及系统
CN107613229A (zh) * 2017-09-30 2018-01-19 杭州雄迈集成电路技术有限公司 一种图像传感器坏点检测校正装置及方法

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112666178A (zh) * 2020-12-14 2021-04-16 杭州当虹科技股份有限公司 一种户外led大屏坏点在线监控方法

Also Published As

Publication number Publication date
CN110771131B (zh) 2021-12-21
CN110771131A (zh) 2020-02-07

Similar Documents

Publication Publication Date Title
US10997696B2 (en) Image processing method, apparatus and device
AU2019326496B2 (en) Method for capturing images at night, apparatus, electronic device, and storage medium
WO2021047345A1 (zh) 图像降噪方法、装置、存储介质及电子设备
US10805508B2 (en) Image processing method, and device
EP4013033A1 (en) Method and apparatus for focusing on subject, and electronic device, and storage medium
WO2010100842A1 (ja) 撮像装置、運転者監視装置、顔部測距方法およびプログラム
US11538175B2 (en) Method and apparatus for detecting subject, electronic device, and computer readable storage medium
US20220270345A1 (en) Subject detection method and apparatus, electronic device, and computer-readable storage medium
JP2021505086A (ja) 画像処理方法および画像処理装置、コンピュータ可読記憶媒体ならびにコンピュータ機器
US20220174222A1 (en) Method for marking focused pixel, electronic device, storage medium, and chip
US20190325552A1 (en) Imaging apparatus, image processing apparatus, image processing method, and medium
US20220360707A1 (en) Photographing method, photographing device, storage medium and electronic device
US8941763B2 (en) Image capture device, method for generating composite image, and storage medium
CN110650288B (zh) 对焦控制方法和装置、电子设备、计算机可读存储介质
JP2015012482A (ja) 画像処理装置及び画像処理方法
CN113452901A (zh) 图像采集方法及装置、电子设备、计算机可读存储介质
US9538074B2 (en) Image processing apparatus, imaging apparatus, and image processing method
WO2020042083A1 (zh) 图像坏点校正方法及设备、存储介质
WO2021258300A1 (zh) 一种屏下拍摄控制方法、终端设备及存储介质
CN110971814B (zh) 一种拍摄调整方法、装置、电子设备及存储介质
JP5371135B2 (ja) 輝度補正装置、輝度補正システムおよび輝度補正方法
US9479716B2 (en) Image processing method, electronic device, electronic device readable storage medium and program applied in electronic device
WO2020124314A1 (zh) 图像处理方法、图像处理装置及图像采集装置、存储介质
WO2022174696A1 (zh) 曝光处理方法、装置、电子设备及计算机可读存储介质
US20230092593A1 (en) Detection device detecting gaze point of user, control method therefor, and storage medium storing control program therefor

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18931877

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18931877

Country of ref document: EP

Kind code of ref document: A1