WO2021207879A1 - Image processing method and apparatus, electronic device and storage medium - Google Patents

Image processing method and apparatus, electronic device and storage medium Download PDF

Info

Publication number
WO2021207879A1
WO2021207879A1 PCT/CN2020/084498 CN2020084498W WO2021207879A1 WO 2021207879 A1 WO2021207879 A1 WO 2021207879A1 CN 2020084498 W CN2020084498 W CN 2020084498W WO 2021207879 A1 WO2021207879 A1 WO 2021207879A1
Authority
WO
WIPO (PCT)
Prior art keywords
pixel
image
dead
pixels
information
Prior art date
Application number
PCT/CN2020/084498
Other languages
French (fr)
Chinese (zh)
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/CN2020/084498 priority Critical patent/WO2021207879A1/en
Priority to CN202080004421.5A priority patent/CN112544074B/en
Publication of WO2021207879A1 publication Critical patent/WO2021207879A1/en

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/68Noise processing, e.g. detecting, correcting, reducing or removing noise applied to defects
    • 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
    • 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

Definitions

  • the present disclosure relates to the field of image processing technology, and in particular to an image processing method, device, electronic equipment, and storage medium.
  • An aspect of the present disclosure provides an image processing method, including: obtaining an image to be processed, the image to be processed is generated according to image information collected by an image sensor; determining contaminated pixels in the image to be processed, Contaminated pixels include pixels whose pixel values are affected by at least one bad image in the image to be processed in the process of generating the image to be processed according to the image information; based on the information of the contaminated pixel, the image sensor The dead pixel information of is updated from the first dead pixel information to the second dead pixel information; and based on the second dead pixel information, the image to be processed is processed so as to correct the pixel value of the image dead pixel.
  • the updating the dead pixel information of the image sensor from the first dead pixel information to the second dead pixel information includes: determining, according to the first dead pixel information, that at least the image to be processed is at least Location information of a dead pixel in an image; determining the location information of a contaminated pixel in the image to be processed according to the location information of the at least one dead pixel in an image; determining the credibility of the pixel value of the contaminated pixel; and The position information of the contaminated pixel and the reliability update the first dead pixel information to generate the second dead pixel information.
  • the determining the position information of the contaminated pixel in the image to be processed includes: setting a pollution parameter of the image sensor, and the pollution parameter indicates that the to-be-processed image is generated according to the image information.
  • the range of pixels that can be affected by a dead pixel in the image In the process of processing the image, the range of pixels that can be affected by a dead pixel in the image; and determining the location information of the contaminated pixel based on the pollution parameter and the location information of the at least one dead pixel in the image.
  • the determining the credibility of the pixel value of the contaminated pixel includes: determining the corresponding relationship between the distance and the credibility, and the distance is the amount of the contaminated pixel that affects the contaminated pixel.
  • the Euclidean distance between the image dead pixels of the pixels based on the location information of the contaminated pixel and the location information of the image dead pixels, determine the distance between the contaminated pixel and the image dead pixel that affects the contaminated pixel And based on the correspondence and the Euclidean distance, determine the credibility of the pixel value of the contaminated pixel.
  • the processing the image to be processed based on the second dead pixel information so as to correct the pixel value of the image dead pixel includes: based on the location information of the at least one image dead pixel Determine a plurality of reference pixels, so as to use the respective pixel values of the plurality of reference pixels to correct the at least one bad image; determine whether there is a contaminated pixel in the plurality of reference pixels; in determining the plurality of reference pixels If there is a contaminated pixel, query the second bad pixel information to determine the credibility of the pixel value of the contaminated pixel; and based on the respective pixel values of the multiple reference pixels and the multiple reference pixels Calculate the credibility of the pixel value of the contaminated pixel, and correct the pixel value of the bad pixel of the image.
  • correcting the pixel values of the defective image pixels includes: Determine the pixel to be eliminated, the pixel to be eliminated is a pixel whose pixel value of the contaminated pixel among the plurality of reference pixels is less than a preset threshold; and based on the plurality of reference pixels other than the eliminated pixel The pixel values of other reference pixels are used to correct the pixel values of the dead pixels of the image.
  • the correcting the pixel value of the defective image pixel based on the pixel value of the reference pixel other than the culling pixel among the plurality of reference pixels includes: performing an image interpolation algorithm on the pixel value of the pixel.
  • the pixel values of the reference pixels other than the excluded pixels are interpolated to generate the pixel values of the dead pixels of the image.
  • obtaining an image to be processed includes: obtaining image information collected by a four Bayer image sensor; and an image obtained by demosaicing the image information.
  • obtaining image data includes: obtaining image information collected by an image sensor, the image information including pixel values of a plurality of pixels; and combining the pixel values of the plurality of pixels to obtain the to-be-processed image.
  • the updating the dead pixel information of the image sensor from the first dead pixel information to the second dead pixel information further includes: determining a dynamic dead pixel, wherein the dynamic dead pixel is in the When the ambient light collected by the image sensor is the first reflected light, the difference between the pixel value and the pixel value of the pixel in the preset area is less than the preset value, and the ambient light collected by the image sensor is the second reflected light In the case of the pixel value and the pixel value of the pixel in the preset area, the difference between the pixel value is greater than the preset value, wherein the ambient light is the light reflected by the object collected by the image sensor; and the dynamic damage Dot and the location information of the dynamic dead pixel are added to the first dead pixel information, so that when the pixel value of the dynamic dead pixel is not within the specific range, the image dead pixel includes the dynamic bad pixel point.
  • an image processing device including: an acquisition module for acquiring an image to be processed, the image to be processed is generated according to image information collected by an image sensor; and a determining module for determining the Contaminated pixels in the image to be processed, where the contaminated pixels include pixels whose pixel values are affected by at least one bad image in the image to be processed during the process of generating the image to be processed according to the image information; an update module, Based on the information of the contaminated pixel, the dead pixel information of the image sensor is updated from the first dead pixel information to the second dead pixel information; and the correction module is used for correcting based on the second dead pixel information The image to be processed is processed so as to correct the pixel value of the dead pixel of the image.
  • the update module includes: a first determining submodule, configured to determine location information of at least one image defect in the image to be processed according to the first defect information; and a second determining submodule, It is used to determine the location information of the contaminated pixel in the image to be processed according to the location information of the at least one dead pixel of the image; the credibility determination sub-module is used to determine the credibility of the pixel value of the contaminated pixel And a generating sub-module for updating the first dead pixel information based on the location information of the contaminated pixel and the credibility to generate the second dead pixel information.
  • the second determining sub-module includes: a first determining unit configured to determine a pollution parameter of the image sensor, the pollution parameter indicating that the to-be-processed is generated according to the image information During the image process, the range of pixels that can be affected by a dead pixel in the image; and a second determining unit configured to determine the location information of the contaminated pixel based on the pollution parameter and the location information of the at least one dead pixel in the image.
  • the credibility determination sub-module includes: a third determining unit, configured to determine the corresponding relationship between the distance and the credibility, and the distance is between the contaminated pixel and the amount that affects the contaminated pixel.
  • the Euclidean distance between the bad pixels of the image the fourth determining unit is used to determine, based on the position information of the contaminated pixel and the position information of the bad image of the image, that the contaminated pixel is to the extent that affects the contaminated pixel.
  • the Euclidean distance between the dead pixels of the image and a fifth determining unit for determining the reliability of the pixel value of the contaminated pixel based on the correspondence and the Euclidean distance.
  • the correction module includes: a third determination sub-module, configured to determine a plurality of reference pixels based on the location information of the at least one image dead pixel, so as to use the respective pixel values of the plurality of reference pixels to compare the at least A dead pixel of an image is corrected; the fourth determining sub-module is used to determine whether there are contaminated pixels in the multiple reference pixels; the query sub-module is used to determine whether there are contaminated pixels in the multiple reference pixels Next, query the second dead pixel information to determine the credibility of the pixel value of the contaminated pixel; and a correction sub-module, which is configured to be based on the respective pixel values of the multiple reference pixels and the multiple reference pixels Calculate the credibility of the pixel value of the contaminated pixel, and correct the pixel value of the bad pixel of the image.
  • a third determination sub-module configured to determine a plurality of reference pixels based on the location information of the at least one image dead pixel, so as to use the respective pixel values of the plurality of
  • the correction sub-module includes: a sixth determining unit, configured to determine a pixel to be rejected, and the pixel to be rejected is a contaminated pixel in the plurality of reference pixels.
  • the reliability of the pixel value of the contaminated pixel is less than a preset Threshold pixels; and a seventh determining unit, configured to correct the pixel values of the dead pixels of the image based on the pixel values of the reference pixels other than the excluded pixels among the plurality of reference pixels.
  • the seventh determining unit includes: an interpolation sub-unit, configured to interpolate the pixel values of the reference pixels other than the excluded pixels by using an image interpolation algorithm to generate pixels of the image dead pixels value.
  • the acquisition module includes: a first acquisition sub-module for acquiring image information collected by the Four Bayer image sensor; and a first processing sub-module for demosaicing the image information. image.
  • the acquisition module includes: a second acquisition sub-module for acquiring image information collected by an image sensor, the image information including pixel values of a plurality of pixels; and a second processing sub-module for The pixel values of the multiple pixels are combined to obtain the image to be processed.
  • the update module further includes: a fifth determining sub-module for determining dynamic dead pixels, where the dynamic dead pixels are when the ambient light collected by the image sensor is the first reflected light , The difference between the pixel value and the pixel value of the pixel in the preset area is less than the preset value, and when the ambient light collected by the image sensor is the second reflected light, the pixel value is different from the pixel value of the pixel in the preset area The difference between the values is greater than the preset value of pixels, where the ambient light is the light reflected by the object collected by the image sensor; Point location information is added to the first dead pixel information, so that when the pixel value of the dynamic dead pixel is not within the specific range, the image dead pixel includes the dynamic dead pixel.
  • Another aspect of the present disclosure provides an electronic device including: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are used by the one or more When executed by two processors, the one or more processors are caused to execute the foregoing method.
  • Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the above-mentioned method when executed.
  • Another aspect of the present disclosure provides a computer program, which includes computer-executable instructions, which are used to implement the method as described above when executed.
  • FIG. 1A to 1C schematically show application scenarios of an image processing method according to an embodiment of the present disclosure
  • Fig. 2 schematically shows a flowchart of an image processing method according to an embodiment of the present disclosure
  • FIG. 3 schematically shows a flowchart of a method for updating dead pixel information of an image sensor from first dead pixel information to second dead pixel information according to an embodiment of the present disclosure
  • FIG. 4A schematically shows a flowchart of an example method for determining the credibility of the pixel value of a contaminated pixel according to an embodiment of the present disclosure
  • FIG. 4B schematically shows the correspondence between distance and credibility according to an embodiment of the present disclosure
  • Fig. 5A schematically shows a flowchart of a method for processing an image to be processed according to an embodiment of the present disclosure
  • FIG. 5B schematically shows a schematic diagram of an image with dead pixels and multiple reference pixels according to an embodiment of the present disclosure
  • FIG. 5C schematically shows a schematic diagram of the result of the credibility of the pixel value determined based on the dead pixels of the image according to an embodiment of the present disclosure
  • FIG. 6 schematically shows a flowchart of an exemplary method for updating dead pixel information of an image sensor from first dead pixel information to second dead pixel information according to another embodiment of the present disclosure
  • Fig. 7A schematically shows a flowchart of an image processing method according to another embodiment of the present disclosure
  • FIG. 7B schematically shows a flowchart of an exemplary method for updating first dead pixel information of an image sensor to second dead pixel information according to an embodiment of the present disclosure
  • FIG. 7C schematically shows a flowchart of an example method for image dead pixel correction according to an embodiment of the present disclosure
  • Fig. 8 schematically shows a schematic diagram of an image processing apparatus according to an embodiment of the present disclosure.
  • Fig. 9 schematically shows a block diagram of an electronic device according to an embodiment of the present disclosure.
  • At least one of the “systems” shall include, but is not limited to, systems having A alone, B alone, C alone, A and B, A and C, B and C, and/or systems having A, B, C, etc. ).
  • At least one of the “systems” shall include, but is not limited to, systems having A alone, B alone, C alone, A and B, A and C, B and C, and/or systems having A, B, C, etc. ).
  • the embodiment of the present disclosure provides an image processing method.
  • the image processing method may include: obtaining a to-be-processed image, the to-be-processed image is generated according to image information collected by an image sensor, and determining the contaminated pixels in the to-be-processed image. Based on the information of the contaminated pixels, the dead pixel information of the image sensor is updated from the first dead pixel information to the second dead pixel information. Based on the second dead pixel information, the image to be processed is processed to correct the pixel value of the image dead pixel.
  • the contaminated pixel includes a pixel whose pixel value is affected by at least one bad image in the image to be processed in the process of generating the image to be processed according to the image information.
  • FIGS. 1A to 1C schematically show application scenarios of an image processing method according to an embodiment of the present disclosure. It should be noted that FIGS. 1A to 1C are only examples of application scenarios in which the embodiments of the present disclosure can be applied to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot Used in other devices, systems, environments or scenarios.
  • the application scenario includes a camera 100.
  • the camera 100 may be configured with, for example, a four-Bayer image sensor, and the four-Bayer image sensor refers to an image sensor using a four-Bayer array.
  • Fig. 1B schematically shows a schematic diagram of a four Bayer array and a standard Bayer array.
  • the four-Bayer array can be a filter array with four adjacent basic pixel units of the same color
  • the standard Bayer array can be a filter array with four adjacent basic pixel units sequentially G (Green, Green)
  • the filter array of R (Red), B (Blue, blue), G, or the standard Bayer array can be a filter array with four adjacent basic pixel units being B, G, G, R in turn, or a standard
  • the Bayer array can be a filter array with four adjacent basic pixel units sequentially G, B, R, G, or a standard Bayer array can be a filter array with four adjacent basic pixel units sequentially R, G, G, B Filter array.
  • the four Bayer image sensor has two image output modes. The first is to directly perform demosic processing (Demosic) on the Four Bayer images collected by the Four Bayer array to obtain the output image. The second is to demosaic the four Bayer images collected by the four Bayer array to obtain a standard Bayer image based on the standard Bayer array, and then perform demosaic processing on the standard Bayer image to obtain an output image.
  • Demosaicing processing refers to processing a four Bayer image based on a four Bayer array into a standard Bayer image based on a standard Bayer array
  • demosaicing processing refers to processing a standard Bayer image into an RGB image.
  • Image dead pixels refer to pixels with inaccurate pixel values in the image collected by the image sensor. Image dead pixels may be caused by defects in the process of the image acquisition unit of the image sensor, or errors in the process of converting optical signals into electrical signals.
  • FIG. 1C schematically shows a schematic diagram of a standard Bayer image obtained by demosaicing a four-Bayer image.
  • the four Bayer image includes image dead pixels 111.
  • the actual output color of the dead pixels in the four Bayer image should be red.
  • the output color of the image dead pixel 111 is not red, for example, the output is black.
  • the pixels 114, 115, and 116 in the four Bayer image are blue, green, and green, respectively, while in the standard Bayer image, the pixels 114, 115, and 116 should be red.
  • the four-Bayer image needs to be demosaiced, so that the pixel 114, the pixel 115, and the pixel 116 are all converted into red pixel values after the demosaicing process.
  • demosaicing can be realized by an interpolation algorithm.
  • the following is an example of determining the pixel value of the pixel 114 in the standard Bayer image to illustrate an implementation of the demosaicing process.
  • the red pixel adjacent to the pixel 114 (for example, the pixel in the ellipse and dotted line in FIG. 1C) can be used as the reference pixel of the pixel 114, and the pixel value of the reference pixel can be interpolated by an interpolation algorithm to obtain the pixel 114 in the standard The pixel value in the Bayer image.
  • the pixel values of other pixels in the standard Bayer image can also be determined by interpolation.
  • the pixel value of the pixel 114 in the standard Bayer image is affected by the image damage.
  • the influence of the point 111, that is, the pixel 114 is a contaminated pixel.
  • the pixels 115 and 116 are also contaminated pixels contaminated by the image dead pixels 111. Therefore, in the process of demosaicing the Four Bayer image to obtain the standard Bayer image, a dead pixel in the Four Bayer image will affect the pixel values of multiple pixels in the standard Bayer image.
  • the image processing method of the present disclosure can be used, for example, to correct the standard Bayer image converted from the four Bayer image in FIG. 1C, thereby correcting the defective pixels in the standard Bayer image, and ultimately improving the image quality of the RGB image output by the camera 100.
  • Fig. 2 schematically shows a flowchart of an image processing method according to an embodiment of the present disclosure.
  • the method may include operations S201 to S204.
  • an image to be processed is obtained, and the image to be processed is generated according to the image information collected by the image sensor.
  • the image sensor may be, for example, a four-Bayer image sensor.
  • the original image collected by the four Bayer image sensor may be subjected to the demosaic processing described above to obtain the image to be processed.
  • obtaining a to-be-processed image may be a to-be-processed image obtained by combining pixel values of multiple pixels collected by an image sensor.
  • the binning operation may be performed on multiple pixels collected by the image sensor, and the binning operation may be adding the pixel values of adjacent pixels of the same color as the pixel value of the new pixel in the image after the binning operation.
  • the image sensor has a binning mode. When the binning mode of the image sensor is turned on, the image sensor performs a binning operation on the collected image information to obtain the image to be processed, where the image information may include the pixel values of multiple pixels .
  • a contaminated pixel in the image to be processed is determined, and the contaminated pixel includes a pixel whose pixel value is affected by at least one defective image in the image to be processed during the process of generating the image to be processed according to the image information.
  • the image information may be a four-Bayer image collected by an image sensor.
  • the pixels 114, 115, 116, etc. in the image to be processed are affected by the defective image 111.
  • the to-be-processed image obtained by demosaicing the four Bayer image includes at least one image dead pixel 111, a plurality of contaminated pixels 114, 115, 116, etc., where, as shown in FIG. 1C, the image dead pixel 111 is in four
  • the position in the Bayer image is consistent with the position of the image dead pixel 111 in the standard Bayer image.
  • the dead pixel information of the image sensor is updated from the first dead pixel information to the second dead pixel information.
  • the first dead pixel information may be, for example, a dead pixel table provided by a manufacturer of the image sensor.
  • the dead pixel table may include, for example, the identifier of the dead pixel and the coordinates of each dead pixel.
  • the second dead pixel information can be generated based on the dead pixel table and the contaminated pixels.
  • the second dead pixel information may also be a table, for example.
  • the table may include, for example, two types of information, the first type may be the identification of the dead pixel and the coordinates of each dead pixel, and the second type may be the identification of the contaminated pixel and the coordinates of the contaminated pixel and other information.
  • the dead pixels and the contaminated pixels are respectively marked with two different types of identification, so as to distinguish whether the pixel is a dead pixel or a contaminated pixel.
  • the image to be processed is processed based on the second dead pixel information, so as to correct the pixel value of the image dead pixel.
  • the influence of the pixel value of the contaminated pixel on the pixel value of the image defect can be reduced according to the second defect information.
  • the pixel value of the contaminated pixel may be multiplied by a weight less than 1 and greater than 0 and then applied to the correction algorithm.
  • the present disclosure it is possible to determine the contaminated pixels in the image to be processed, and update the dead pixel information of the image sensor according to the contaminated pixels.
  • the influence of contaminated pixels on the image defect correction process can be reduced, the effect of image defect correction can be improved, and the image quality after correction can be improved. Image Quality.
  • Fig. 3 schematically shows a flowchart of a method for updating the dead pixel information of an image sensor from the first dead pixel information to the second dead pixel information according to an embodiment of the present disclosure.
  • the method may include operation S213 to operation S243.
  • position information of at least one image dead pixel in the image to be processed is determined.
  • the first dead pixel information may be, for example, a dead pixel table of the image sensor, and the location information may be, for example, the coordinates of the image dead pixel.
  • the dead pixel table of the image sensor can be queried to determine the coordinates of the image dead pixel.
  • the position information of the contaminated pixel in the image to be processed is determined according to the position information of the at least one dead pixel of the image.
  • the pollution parameter of the image sensor can be determined first.
  • the pollution parameter indicates the range of pixels that can be affected by a dead pixel in an image during the process of generating the image to be processed based on the image information, and the location information of the contaminated pixel is determined based on the pollution parameter and the location information of at least one dead pixel in the image.
  • the pollution parameter may be provided by the manufacturer of the image sensor.
  • the pollution parameter may indicate, for example, that the pixels within a circular area where the Euclidean distance to the defective image pixel is P (P>0) is a pixel range that can be affected by the defective image pixel.
  • P the Euclidean distance to the defective image pixel
  • the credibility of the pixel value of the contaminated pixel represents the degree to which the contaminated pixel is affected by the image defect. The more the contaminated pixel is affected by the image defect, the lower the credibility of the pixel value of the contaminated pixel. Conversely, the less the contaminated pixel is affected by the image defect, the higher the credibility of the contaminated pixel's pixel value.
  • the credibility of the pixel value of the contaminated pixel may be related to the distance between the contaminated pixel and the dead pixel of the image, for example.
  • the credibility of the pixel value of the contaminated pixel can be calculated based on the distance between the contaminated pixel and the dead pixel of the image.
  • the reliability of the pixel value of the contaminated pixel may be pre-defined by the manufacturer of the image sensor, and written into the parameter information of the image sensor, for example.
  • the parameter information of the image sensor can be directly read to obtain the credibility of the pixel value of the contaminated pixel.
  • the first dead pixel information is updated based on the location information and reliability of the contaminated pixel to generate second dead pixel information.
  • the second dead pixel information may include, but is not limited to, the position of the dead pixel of the image, the position of the contaminated pixel, and the credibility of the pixel value of the contaminated pixel, for example.
  • the location of the image dead pixel can be determined according to the first dead pixel information.
  • the contaminated pixels and the credibility of the contaminated pixels can be added to the first dead pixel information, thereby generating the second dead pixel information.
  • the credibility of the pixel value of the contaminated pixel can also be determined, so that the image defect can be corrected according to the credibility of the contaminated pixel, which further improves The accuracy of image dead pixel correction.
  • Fig. 4A schematically shows a flowchart of an example method for determining the credibility of the pixel value of a contaminated pixel according to an embodiment of the present disclosure.
  • the method may include operations S2331 to S2333.
  • the corresponding relationship between the distance and the credibility is determined, and the distance is the Euclidean distance between the contaminated pixel and the defective image that affects the contaminated pixel.
  • the corresponding relationship between the distance and the credibility can be represented by a confidence function, for example, and the confidence function can be a log function, an exponential function, or the like, for example.
  • Fig. 4B schematically shows the correspondence between distance and credibility according to an embodiment of the present disclosure.
  • the Euclidean distance can be calculated based on the coordinates of the contaminated pixels and the coordinates of the dead pixels of the image.
  • the Euclidean distance can be brought into the confidence function described above to determine the credibility of the pixel value of the contaminated pixel.
  • Fig. 5A schematically shows a flow chart of a method for processing an image to be processed based on second dead pixel information according to an embodiment of the present disclosure.
  • the method may include operations S214 to S244.
  • a plurality of reference pixels are determined based on the location information of the at least one image dead pixel, so as to correct the at least one image dead pixel by using respective pixel values of the plurality of reference pixels.
  • the plurality of reference pixels may be, for example, a plurality of pixels whose distance to the dead pixel of the image is less than Q.
  • the multiple reference pixels can be used to correct the dead pixels of the image.
  • FIG. 5B schematically shows a schematic diagram of a dead pixel and a plurality of reference pixels in an image according to an embodiment of the present disclosure.
  • the scene includes image dead pixels 510, and the reference pixels determined according to the location of the image dead pixels 510 for correcting the image dead pixels 510 may be, for example, European styles to the image dead pixels 510. Multiple pixels whose distance is less than Q.
  • the position of the contaminated pixel can be obtained by querying the second bad pixel information described above, and the position of the contaminated pixel is compared with the position of the reference pixel.
  • the contaminated pixel is within the region of the reference pixel determined in operation S214 above, it is determined that the contaminated pixel exists in the plurality of reference pixels.
  • FIG. 5B is taken as an example to illustrate operation S224.
  • the pixels in the area of the black solid line frame 520 in FIG. 5B are contaminated pixels contaminated by the image dead pixels 510.
  • the pixels in the area of the black dashed line frame 530 are reference pixels of the dead pixels 510 of the image.
  • the area of the black dashed line frame 530 includes the area inside the black solid line frame 520, and therefore, there are polluted pixels in the reference pixels corresponding to the dead pixels 510 of the image.
  • the pixel to be rejected is a pixel whose pixel value of the contaminated pixel among the multiple reference pixels has a credibility less than a preset threshold; and the pixel to be rejected is based on the multiple reference pixels.
  • the pixel value of other reference pixels is used to correct the pixel value of the image's bad pixels.
  • the preset threshold may be determined by those skilled in the art based on experience and actual conditions of the image sensor.
  • FIG. 5C schematically shows a schematic diagram of the result of the credibility of the pixel value determined based on the image dead pixel 510 according to an embodiment of the present disclosure.
  • the pixel marked with the "X” mark is the pixel to be excluded.
  • the credibility of the pixels marked with "C” is greater than the preset threshold.
  • the pixels marked with an “O” mark are pixels that are not contaminated by the dead pixels 510 of the image.
  • the pixel value of the remaining pixels (that is, the pixels marked with the "C” mark and the pixels marked with the “O” mark) after removing the pixels marked with the "X” mark in the reference pixels can be used to correct the image dead pixels 510.
  • the corresponding relationship between the range to which the credibility belongs and the pixel value weight (0 ⁇ pixel value weight ⁇ 1) can be determined, so that the weight of the pixel value can be determined according to the range to which the credibility belongs and then The pixel value of the contaminated pixel is multiplied by the weight and then applied to the correction algorithm.
  • the pixel value obtained by multiplying the pixel marked with "C" by 0.7 can be applied to the correction algorithm for correcting the image defect 510.
  • correcting the pixel values of the dead pixels of the image includes: using an image interpolation algorithm to refer to other reference pixels other than the excluded pixels.
  • the pixel value of the pixel is interpolated to generate the pixel value of the image dead pixel.
  • the average value of the pixel values of the reference pixels other than the excluded pixels among the plurality of reference pixels may be used as the pixel value of the defective image of the image.
  • Fig. 6 schematically shows a flowchart of a method for updating dead pixel information of an image sensor from first dead pixel information to second dead pixel information according to another embodiment of the present disclosure.
  • the method may further include operation 253 and operation S263 on the basis of operations S213 to S243 described in FIG. 3.
  • dynamic dead pixels are determined, where the dynamic dead pixels are when the ambient light collected by the image sensor is the first reflected light, the difference between the pixel value and the pixel value of the pixel in the preset area is less than A preset value, and when the ambient light collected by the image sensor is the second reflected light, the difference between the pixel value and the pixel value of the pixel in the preset area is greater than the pixel with the preset value, wherein the The ambient light is the light reflected by the object collected by the image sensor.
  • the preset area may be a neighborhood of a pixel.
  • the ambient light collected by the image sensor is the first reflected light
  • the difference between the pixel value of a certain pixel and the pixel value of the pixel in the neighborhood of the pixel is less than the preset value
  • the environment collected by the image sensor When the light is the second reflected light, and the difference between the pixel value of the pixel and the pixel value of the pixel in the neighborhood of the pixel is greater than the preset value, the pixel is a dynamic dead pixel.
  • a dynamic dead pixel is a pixel whose output pixel value is normal within a certain pixel value range, but the pixel whose output pixel value is abnormal if it is not within this pixel value range.
  • the preset value may be a value determined by a person skilled in the art based on experience.
  • the preset value may be any value between 0 and 255, for example.
  • those skilled in the art can detect the image sensor to determine the dynamic dead pixels before using the image sensor, and write the detected dynamic dead pixel information into the software program of the image sensor, thereby When the image sensor executes the image processing method, the dynamic dead pixels can be read from the software program.
  • the dynamic dead pixels and the location information of the dynamic dead pixels are added to the first dead pixel information, so that when the pixel values of the dynamic dead pixels are not within a specific range, the image dead pixels include dynamic dead pixels.
  • the location information of the dynamic dead pixel may be, for example, the coordinates of the dynamic dead pixel.
  • the coordinates of the dynamic dead pixels and the pixel range where the dynamic dead pixels behave abnormally can be added to the first dead pixel information.
  • the average value of the pixel values of the pixels in the neighborhood of the dynamic dead pixel is greater than the first value, it is determined that the output of the pixel value of the dynamic dead pixel is abnormal, and then at least one image dead pixel in operation S202 includes the dynamic dead pixel .
  • the average value of the pixel values of the pixels in the neighborhood of the dynamic dead pixel is less than the second value, it is determined that the output of the pixel value of the dynamic dead pixel is abnormal, and then at least one image dead pixel in operation S202 includes the dynamic dead pixel. Dead pixels.
  • Fig. 7A schematically shows a flowchart of an image processing method according to another embodiment of the present disclosure.
  • the image processing method may include operations S701 to S705.
  • operation S702 it is determined whether the remote function is turned on by the image sensor. If the Remote function is enabled, perform operation S703, and if the remote function is not enabled, perform operation S704.
  • the first dead pixel information of the image sensor is updated to the second dead pixel information.
  • an output image is generated based on the corrected image.
  • the image to be processed may be a standard Bayer image, and an RGB image is generated according to the corrected standard Bayer image.
  • FIG. 7B schematically shows a flowchart of a method for updating the first dead pixel information of the image sensor to the second dead pixel information in operation S703 according to an embodiment of the present disclosure.
  • the method may include operations S713 to S733.
  • the contaminated pixels are determined according to the dead pixels of the image.
  • the contaminated pixel and the credibility of the contaminated pixel are added to the first dead pixel information to generate second dead pixel information.
  • Fig. 7C schematically shows a flowchart of a method for correcting image dead pixels in operation S704 according to an embodiment of the present disclosure.
  • the method may include operations S714 to S754.
  • the pixel values of the reference pixels of the dead pixels of the image are acquired.
  • the reference pixels of the dead pixels of the image may be, for example, multiple pixels whose distance to the dead pixels of the image is less than Q.
  • operation S724 it is determined whether there is a contaminated pixel among the reference pixels. If there is a contaminated pixel, perform operation S734. If there is no contaminated pixel, perform operation S764.
  • the credibility of the contaminated pixel is compared with a preset threshold to determine whether the credibility of the contaminated pixel is less than the preset threshold. If the credibility of the contaminated pixel is less than the preset threshold, perform operation S754, and if the credibility of the contaminated pixel is greater than or equal to the preset threshold, perform operation S764.
  • the pixel values of the multiple reference pixels are used for interpolation calculation to correct the pixel values of the dead pixels of the image.
  • the multiple reference pixels do not include contaminated pixels whose credibility is less than a preset threshold.
  • FIG. 8 schematically shows a schematic diagram of an image processing apparatus 800 according to an embodiment of the present disclosure.
  • the image processing apparatus 800 may include an acquisition module 810, a determination module 820, an update module 830, and a correction module 840.
  • the acquisition module 810 executes the operation S201 described above with reference to FIG. 2 to acquire an image to be processed, which is generated according to image information collected by an image sensor.
  • the determining module 820 executes the operation S202 described above with reference to FIG. 2 for determining the contaminated pixels in the image to be processed, and the contaminated pixels are included in the process of generating the image to be processed according to the image information. , A pixel whose pixel value is affected by at least one bad pixel in the image to be processed.
  • the update module 830 executes the operation S203 described above with reference to FIG. 2 for updating the dead pixel information of the image sensor from the first dead pixel information to the second dead pixel information based on the information of the contaminated pixel.
  • the correction module 840 executes the operation S204 described above with reference to FIG. 2 for processing the image to be processed based on the second dead pixel information, so as to correct the pixel value of the image dead pixel.
  • the update module includes: a first determining submodule, configured to determine location information of at least one image defect in the image to be processed according to the first defect information; and a second determining submodule, It is used to determine the location information of the contaminated pixel in the image to be processed according to the location information of the at least one dead pixel of the image; the credibility determination sub-module is used to determine the credibility of the pixel value of the contaminated pixel And a generating sub-module for updating the first dead pixel information based on the location information of the contaminated pixel and the credibility to generate the second dead pixel information.
  • the second determining sub-module includes: a first determining unit configured to determine a pollution parameter of the image sensor, the pollution parameter indicating that the image to be processed is generated according to the image information In the process, a pixel range that can be affected by a bad image pixel; and a second determining unit configured to determine the location information of the contaminated pixel based on the pollution parameter and the location information of the at least one image bad pixel.
  • the credibility determination sub-module includes: a third determining unit, configured to determine the corresponding relationship between the distance and the credibility, and the distance is between the contaminated pixel and the amount that affects the contaminated pixel.
  • the Euclidean distance between the dead pixels of the image the fourth determining unit is used to determine the contaminated pixel to the value that affects the contaminated pixel based on the location information of the contaminated pixel and the location information of the image dead pixel.
  • the Euclidean distance between the dead pixels of the image and a fifth determining unit for determining the reliability of the pixel value of the contaminated pixel based on the correspondence and the Euclidean distance.
  • the correction module includes: a third determination sub-module, configured to determine a plurality of reference pixels based on the location information of the at least one image dead pixel, so as to use the respective pixel values of the plurality of reference pixels to compare the at least A dead pixel of an image is corrected; the fourth determining sub-module is used to determine whether there are contaminated pixels in the multiple reference pixels; the query sub-module is used to determine whether there are contaminated pixels in the multiple reference pixels Next, query the second dead pixel information to determine the credibility of the pixel value of the contaminated pixel; and a correction sub-module, which is configured to be based on the respective pixel values of the multiple reference pixels and the multiple reference pixels Calculate the credibility of the pixel value of the contaminated pixel, and correct the pixel value of the bad pixel of the image.
  • a third determination sub-module configured to determine a plurality of reference pixels based on the location information of the at least one image dead pixel, so as to use the respective pixel values of the plurality of
  • the correction sub-module includes: a sixth determining unit, configured to determine a pixel to be rejected, and the pixel to be rejected is a contaminated pixel in the plurality of reference pixels.
  • the reliability of the pixel value of the contaminated pixel is less than a preset Threshold pixels; and a seventh determining unit, configured to correct the pixel values of the dead pixels of the image based on the pixel values of the reference pixels other than the excluded pixels among the plurality of reference pixels.
  • the seventh determining unit includes: an interpolation sub-unit, configured to interpolate the pixel values of the reference pixels other than the excluded pixels by using an image interpolation algorithm to generate pixels of the image dead pixels value.
  • the acquisition module includes: a first acquisition sub-module for acquiring image information collected by the Four Bayer image sensor; and a first processing sub-module for demosaicing the image information. image.
  • the acquisition module includes: a second acquisition sub-module for acquiring image information collected by an image sensor, the image information including pixel values of a plurality of pixels; and a second processing sub-module for The pixel values of the multiple pixels are combined to obtain the image to be processed.
  • the update module further includes: a fifth determining sub-module, configured to determine dynamic dead pixels, wherein, in the first condition, the pixel value of the dynamic dead pixel is the same as the pixel value of the pixel in the preset area. The difference between the values is less than the preset value, and under the second condition, the difference between the pixel value of the dynamic dead pixel and the pixel value of the pixel in the preset area is greater than the preset value; and the dead pixel adding sub Module for adding the dynamic dead pixels and the location information of the dynamic dead pixels to the first dead pixel information, so that when the pixel values of the dynamic dead pixels are not within the specific range, the The dead pixels of the image include the dynamic dead pixels.
  • a fifth determining sub-module configured to determine dynamic dead pixels, wherein, in the first condition, the pixel value of the dynamic dead pixel is the same as the pixel value of the pixel in the preset area. The difference between the values is less than the preset value, and under the second condition, the difference between the
  • any number of the modules, sub-modules, units, and sub-units, or at least part of the functions of any number of them may be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be split into multiple modules for implementation.
  • any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), System-on-chip, system-on-substrate, system-on-package, application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware in any other reasonable way that integrates or encapsulates the circuit, or by software, hardware, and firmware. Any one of these implementations or an appropriate combination of any of them can be implemented.
  • one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be at least partially implemented as a computer program module, and when the computer program module is executed, the corresponding function may be performed.
  • any number of the acquisition module 810, the determination module 820, the update module 830, and the correction module 840 can be combined into one module for implementation, or any one of them can be split into multiple modules. Or, at least part of the functions of one or more of these modules may be combined with at least part of the functions of other modules and implemented in one module.
  • at least one of the acquisition module 810, the determination module 820, the update module 830, and the correction module 840 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA) and a programmable logic array.
  • FPGA field programmable gate array
  • PLM system on chip
  • ASIC application-specific integrated circuit
  • Fig. 9 schematically shows a block diagram of an electronic device according to an embodiment of the present disclosure.
  • the electronic device shown in FIG. 9 is only an example, and should not bring any limitation to the function and scope of use of the embodiments of the present disclosure.
  • an electronic device 900 includes a processor 901, which can be loaded into a random access memory (RAM) 903 according to a program stored in a read only memory (ROM) 902 or from a storage part 908 The program executes various appropriate actions and processing.
  • the processor 901 may include, for example, a general-purpose microprocessor (for example, a CPU), an instruction set processor and/or a related chipset and/or a special purpose microprocessor (for example, an application specific integrated circuit (ASIC)), and so on.
  • the processor 901 may also include on-board memory for caching purposes.
  • the processor 901 may include a single processing unit or multiple processing units for executing different actions of a method flow according to an embodiment of the present disclosure.
  • the processor 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904.
  • the processor 901 executes various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 902 and/or RAM 903. It should be noted that the program may also be stored in one or more memories other than ROM 902 and RAM 903.
  • the processor 901 may also execute various operations of the method flow according to the embodiments of the present disclosure by executing programs stored in the one or more memories.
  • the electronic device 900 may further include an input/output (I/O) interface 905, and the input/output (I/O) interface 905 is also connected to the bus 904.
  • the electronic device 900 may also include one or more of the following components connected to the I/O interface 905: an input part 906 including a keyboard, a mouse, etc.; including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and An output section 907 of a speaker and the like; a storage section 908 including a hard disk and the like; and a communication section 909 including a network interface card such as a LAN card, a modem, and the like.
  • the communication section 909 performs communication processing via a network such as the Internet.
  • the drive 910 is also connected to the I/O interface 905 as needed.
  • a removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that the computer program read therefrom is installed into the storage portion 908 as needed.
  • the method flow according to the embodiment of the present disclosure may be implemented as a computer software program.
  • an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains program code for executing the method shown in the flowchart.
  • the computer program may be downloaded and installed from the network through the communication part 909, and/or installed from the removable medium 911.
  • the computer program is executed by the processor 901
  • the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed.
  • the systems, devices, devices, modules, units, etc. described above may be implemented by computer program modules.
  • the present disclosure also provides a computer-readable storage medium.
  • the computer-readable storage medium may be included in the device/device/system described in the above embodiment; or it may exist alone without being assembled into the device/ In the device/system.
  • the aforementioned computer-readable storage medium carries one or more programs, and when the aforementioned one or more programs are executed, the method according to the embodiments of the present disclosure is implemented.
  • the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but not limited to: portable computer disk, hard disk, random access memory (RAM), read-only memory (ROM) , Erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device.
  • a computer-readable storage medium may include one or more memories other than ROM 902 and/or RAM 903 and/or ROM 902 and RAM 903 described above.
  • each block in the flowchart or block diagram may represent a module, program segment, or part of the code, and the above-mentioned module, program segment, or part of the code contains one or more for realizing the specified logic function.
  • Executable instructions may also occur in a different order from the order marked in the drawings. For example, two blocks shown one after another can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by It is realized by a combination of dedicated hardware and computer instructions.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)
  • Transforming Light Signals Into Electric Signals (AREA)

Abstract

Provided is an image processing method. The method comprises: acquiring an image to be processed, wherein said image is generated according to image information collected by an image sensor; determining contaminated pixels in said image, wherein the contaminated pixels comprise pixels, the pixel values of which are affected by at least one dead image pixel in said image in the process of generating said image according to the image information; updating dead pixel information of the image sensor from first dead pixel information to second dead pixel information on the basis of information of the contaminated pixels; and on the basis of the second dead pixel information, processing said image so as to correct the pixel value of the dead image pixel. Also provided are an image processing apparatus, an electronic device and a storage medium.

Description

图像处理方法、装置、电子设备和存储介质Image processing method, device, electronic equipment and storage medium 技术领域Technical field
本公开涉及图像处理技术领域,具体涉及一种图像处理方法、装置、电子设备和存储介质。The present disclosure relates to the field of image processing technology, and in particular to an image processing method, device, electronic equipment, and storage medium.
背景技术Background technique
随着科学技术的进步以及用户对图像清晰度的要求的升高,图像传感器技术不断发展。无论图像传感器的硬件还是图像处理算法都得到了极大的改进。With the advancement of science and technology and the increasing requirements of users for image clarity, image sensor technology continues to develop. Both the hardware of the image sensor and the image processing algorithm have been greatly improved.
然而,随着图像传感器技术的发展,传统的坏点校正方法已经不能适用于对图像传感器采集到的图像进行校正。However, with the development of image sensor technology, the traditional dead pixel correction method is no longer suitable for correcting the image collected by the image sensor.
发明内容Summary of the invention
本公开的一个方面提供了一种图像处理方法,包括:获得待处理图像,所述待处理图像是根据图像传感器采集的图像信息生成的;确定所述待处理图像中的被污染像素,所述被污染像素包括在根据所述图像信息生成所述待处理图像的过程中,像素值受到待处理图像中至少一个图像坏点影响的像素;基于所述被污染像素的信息,将所述图像传感器的坏点信息由第一坏点信息更新为第二坏点信息;以及基于所述第二坏点信息,对所述待处理图像进行处理,以便校正所述图像坏点的像素值。An aspect of the present disclosure provides an image processing method, including: obtaining an image to be processed, the image to be processed is generated according to image information collected by an image sensor; determining contaminated pixels in the image to be processed, Contaminated pixels include pixels whose pixel values are affected by at least one bad image in the image to be processed in the process of generating the image to be processed according to the image information; based on the information of the contaminated pixel, the image sensor The dead pixel information of is updated from the first dead pixel information to the second dead pixel information; and based on the second dead pixel information, the image to be processed is processed so as to correct the pixel value of the image dead pixel.
根据本公开的实施例,所述将所述图像传感器的坏点信息由第一坏点信息更新为第二坏点信息包括:根据所述第一坏点信息,确定所述待处理图像中至少一个图像坏点的位置信息;根据所述至少一个图像坏点的位置信息,确定所述待处理图像中被污染像素的位置信息;确定所述被污染像素的像素值的可信度;以及基于所述被污染像素的位置信息和所述可信度更新所述第一坏点信息,以生成所述第二坏点信息。According to an embodiment of the present disclosure, the updating the dead pixel information of the image sensor from the first dead pixel information to the second dead pixel information includes: determining, according to the first dead pixel information, that at least the image to be processed is at least Location information of a dead pixel in an image; determining the location information of a contaminated pixel in the image to be processed according to the location information of the at least one dead pixel in an image; determining the credibility of the pixel value of the contaminated pixel; and The position information of the contaminated pixel and the reliability update the first dead pixel information to generate the second dead pixel information.
根据本公开的实施例,所述确定所述待处理图像中被污染像素的位置信息包括:定所述图像传感器的污染参数,所述污染参数指示了在根据所述图像信息而生成所述待处理图像的过程中,一个图像坏点能够影响到的像素范围;以及基于所述污染参数和所述至少一个图像坏点的位置信息,确定被污染像素的位置信息。According to an embodiment of the present disclosure, the determining the position information of the contaminated pixel in the image to be processed includes: setting a pollution parameter of the image sensor, and the pollution parameter indicates that the to-be-processed image is generated according to the image information. In the process of processing the image, the range of pixels that can be affected by a dead pixel in the image; and determining the location information of the contaminated pixel based on the pollution parameter and the location information of the at least one dead pixel in the image.
根据本公开的实施例,所述确定所述被污染像素的像素值的可信度包括:确定距离与所述可信度之间的对应关系,所述距离为被污染像素到影响该被污染像素的图像坏点之间的欧式距离;基于所述被污染像素的位置信息和所述图像坏点的位置信息,确定所述被污染像素到该影响该被污染像素点的图像坏点之间的欧式距离;以及基于所述对应关系和所述欧式距离,确定所述被污染像素的像素值的可信度。According to an embodiment of the present disclosure, the determining the credibility of the pixel value of the contaminated pixel includes: determining the corresponding relationship between the distance and the credibility, and the distance is the amount of the contaminated pixel that affects the contaminated pixel. The Euclidean distance between the image dead pixels of the pixels; based on the location information of the contaminated pixel and the location information of the image dead pixels, determine the distance between the contaminated pixel and the image dead pixel that affects the contaminated pixel And based on the correspondence and the Euclidean distance, determine the credibility of the pixel value of the contaminated pixel.
根据本公开的实施例,所述基于所述第二坏点信息,对所述待处理图像进行处理,以便校正所述图像坏点的像素值包括:基于所述至少一个图像坏点的位置信息确定多个参考像素,以便利用多个参考像素各自的像素值对所述至少一个图像坏点进行校正;确定所述多个参考像素中是否存在被污染像素;在确定所述多个参考像素中存在被污染像素的情况下,查询所述第二坏点信息以确定所述被污染像素的像素值的可信度;以及基于所述多个参考像素各自的像素值和所述多个参考像素中被污染像素的像素值的可信度,校正所述图像坏点的像素值。According to an embodiment of the present disclosure, the processing the image to be processed based on the second dead pixel information so as to correct the pixel value of the image dead pixel includes: based on the location information of the at least one image dead pixel Determine a plurality of reference pixels, so as to use the respective pixel values of the plurality of reference pixels to correct the at least one bad image; determine whether there is a contaminated pixel in the plurality of reference pixels; in determining the plurality of reference pixels If there is a contaminated pixel, query the second bad pixel information to determine the credibility of the pixel value of the contaminated pixel; and based on the respective pixel values of the multiple reference pixels and the multiple reference pixels Calculate the credibility of the pixel value of the contaminated pixel, and correct the pixel value of the bad pixel of the image.
根据本公开的实施例,所述基于所述多个参考像素各自的像素值和所述多个参考像素中被污染像素的像素值的可信度,校正所述图像坏点的像素值包括:确定要剔除像素,所述要剔除像素为所述多个参考像素中被污染像素的像素值的可信度小于预设阈值的像素;以及基于多个参考像素中除所述剔除像素之外的其他参考像素的像素值,校正所述图像坏点的像素值。According to an embodiment of the present disclosure, based on the reliability of the respective pixel values of the plurality of reference pixels and the pixel values of the contaminated pixels in the plurality of reference pixels, correcting the pixel values of the defective image pixels includes: Determine the pixel to be eliminated, the pixel to be eliminated is a pixel whose pixel value of the contaminated pixel among the plurality of reference pixels is less than a preset threshold; and based on the plurality of reference pixels other than the eliminated pixel The pixel values of other reference pixels are used to correct the pixel values of the dead pixels of the image.
根据本公开的实施例,所述基于多个参考像素中除所述剔除像素之外的其他参考像素的像素值,校正所述图像坏点的像素值包括:通过图像插值算法对所述除所述剔除像素之外的其他参考像素的像素值进行插值生成所述图像坏点的像素值。According to an embodiment of the present disclosure, the correcting the pixel value of the defective image pixel based on the pixel value of the reference pixel other than the culling pixel among the plurality of reference pixels includes: performing an image interpolation algorithm on the pixel value of the pixel. The pixel values of the reference pixels other than the excluded pixels are interpolated to generate the pixel values of the dead pixels of the image.
根据本公开的实施例,获得待处理图像包括:获得四拜耳图像传感器采集的图像信息;以及对所述图像信息进行解马赛克处理而获得的图像。According to an embodiment of the present disclosure, obtaining an image to be processed includes: obtaining image information collected by a four Bayer image sensor; and an image obtained by demosaicing the image information.
根据本公开的实施例,获得图像数据包括:获得图像传感器采集的图像信息,所述图像信息包括多个像素的像素值;以及对所述多个像素的像素值进行合并而获得所述待处理图像。According to an embodiment of the present disclosure, obtaining image data includes: obtaining image information collected by an image sensor, the image information including pixel values of a plurality of pixels; and combining the pixel values of the plurality of pixels to obtain the to-be-processed image.
根据本公开的实施例,所述将所述图像传感器的坏点信息由第一坏点 信息更新为第二坏点信息还包括:确定动态坏点,其中,所述动态坏点为在所述图像传感器采集的环境光为第一反射光的情况下,像素值与预设区域中像素的像素值之间的差异小于预设值,并且在所述图像传感器采集的环境光为第二反射光的情况下,像素值与预设区域中像素的像素值之间的差异大于预设值的像素,其中,所述环境光为所述图像传感器采集的对象反射的光;以及将所述动态坏点和所述动态坏点的位置信息加入所述第一坏点信息,以使在所述动态坏点的像素值不在所述特定范围内的情况下,所述图像坏点包括所述动态坏点。According to an embodiment of the present disclosure, the updating the dead pixel information of the image sensor from the first dead pixel information to the second dead pixel information further includes: determining a dynamic dead pixel, wherein the dynamic dead pixel is in the When the ambient light collected by the image sensor is the first reflected light, the difference between the pixel value and the pixel value of the pixel in the preset area is less than the preset value, and the ambient light collected by the image sensor is the second reflected light In the case of the pixel value and the pixel value of the pixel in the preset area, the difference between the pixel value is greater than the preset value, wherein the ambient light is the light reflected by the object collected by the image sensor; and the dynamic damage Dot and the location information of the dynamic dead pixel are added to the first dead pixel information, so that when the pixel value of the dynamic dead pixel is not within the specific range, the image dead pixel includes the dynamic bad pixel point.
本公开的另一方面提供了一种图像处理装置,包括:获取模块,用于获得待处理图像,所述待处理图像是根据图像传感器采集的图像信息生成的;确定模块,用于确定所述待处理图像中的被污染像素,所述被污染像素包括在根据所述图像信息生成所述待处理图像的过程中,像素值受到待处理图像中至少一个图像坏点影响的像素;更新模块,用于基于所述被污染像素的信息,将所述图像传感器的坏点信息由第一坏点信息更新为第二坏点信息;以及校正模块,用于基于所述第二坏点信息,对所述待处理图像进行处理,以便校正所述图像坏点的像素值。Another aspect of the present disclosure provides an image processing device, including: an acquisition module for acquiring an image to be processed, the image to be processed is generated according to image information collected by an image sensor; and a determining module for determining the Contaminated pixels in the image to be processed, where the contaminated pixels include pixels whose pixel values are affected by at least one bad image in the image to be processed during the process of generating the image to be processed according to the image information; an update module, Based on the information of the contaminated pixel, the dead pixel information of the image sensor is updated from the first dead pixel information to the second dead pixel information; and the correction module is used for correcting based on the second dead pixel information The image to be processed is processed so as to correct the pixel value of the dead pixel of the image.
根据本公开的实施例,更新模块包括:第一确定子模块,用于根据所述第一坏点信息,确定所述待处理图像中至少一个图像坏点的位置信息;第二确定子模块,用于根据所述至少一个图像坏点的位置信息,确定所述待处理图像中被污染像素的位置信息;确定可信度子模块,用于确定所述被污染像素的像素值的可信度;以及生成子模块,用于基于所述被污染像素的位置信息和所述可信度更新所述第一坏点信息,以生成所述第二坏点信息。According to an embodiment of the present disclosure, the update module includes: a first determining submodule, configured to determine location information of at least one image defect in the image to be processed according to the first defect information; and a second determining submodule, It is used to determine the location information of the contaminated pixel in the image to be processed according to the location information of the at least one dead pixel of the image; the credibility determination sub-module is used to determine the credibility of the pixel value of the contaminated pixel And a generating sub-module for updating the first dead pixel information based on the location information of the contaminated pixel and the credibility to generate the second dead pixel information.
根据本公开的实施例,所述第二确定子模块包括:第一确定单元,用于确定所述图像传感器的污染参数,所述污染参数指示了在根据所述图像信息而生成所述待处理图像的过程中,一个图像坏点能够影响到的像素范围;以及第二确定单元,用于基于所述污染参数和所述至少一个图像坏点的位置信息,确定被污染像素的位置信息。According to an embodiment of the present disclosure, the second determining sub-module includes: a first determining unit configured to determine a pollution parameter of the image sensor, the pollution parameter indicating that the to-be-processed is generated according to the image information During the image process, the range of pixels that can be affected by a dead pixel in the image; and a second determining unit configured to determine the location information of the contaminated pixel based on the pollution parameter and the location information of the at least one dead pixel in the image.
根据本公开的实施例,确定可信度子模块包括:第三确定单元,用于确定距离与所述可信度之间的对应关系,所述距离为被污染像素到影响该 被污染像素的图像坏点之间的欧式距离;第四确定单元,用于基于所述被污染像素的位置信息和所述图像坏点的位置信息,确定所述被污染像素到该影响该被污染像素点的图像坏点之间的欧式距离;以及第五确定单元,用于基于所述对应关系和所述欧式距离,确定所述被污染像素的像素值的可信度。According to an embodiment of the present disclosure, the credibility determination sub-module includes: a third determining unit, configured to determine the corresponding relationship between the distance and the credibility, and the distance is between the contaminated pixel and the amount that affects the contaminated pixel. The Euclidean distance between the bad pixels of the image; the fourth determining unit is used to determine, based on the position information of the contaminated pixel and the position information of the bad image of the image, that the contaminated pixel is to the extent that affects the contaminated pixel The Euclidean distance between the dead pixels of the image; and a fifth determining unit for determining the reliability of the pixel value of the contaminated pixel based on the correspondence and the Euclidean distance.
根据本公开的实施例,校正模块包括:第三确定子模块,用于基于所述至少一个图像坏点的位置信息确定多个参考像素,以便利用多个参考像素各自的像素值对所述至少一个图像坏点进行校正;第四确定子模块,用于确定所述多个参考像素中是否存在被污染像素;查询子模块,用于在确定所述多个参考像素中存在被污染像素的情况下,查询所述第二坏点信息以确定所述被污染像素的像素值的可信度;以及校正子模块,用于基于所述多个参考像素各自的像素值和所述多个参考像素中被污染像素的像素值的可信度,校正所述图像坏点的像素值。According to an embodiment of the present disclosure, the correction module includes: a third determination sub-module, configured to determine a plurality of reference pixels based on the location information of the at least one image dead pixel, so as to use the respective pixel values of the plurality of reference pixels to compare the at least A dead pixel of an image is corrected; the fourth determining sub-module is used to determine whether there are contaminated pixels in the multiple reference pixels; the query sub-module is used to determine whether there are contaminated pixels in the multiple reference pixels Next, query the second dead pixel information to determine the credibility of the pixel value of the contaminated pixel; and a correction sub-module, which is configured to be based on the respective pixel values of the multiple reference pixels and the multiple reference pixels Calculate the credibility of the pixel value of the contaminated pixel, and correct the pixel value of the bad pixel of the image.
根据本公开的实施例,校正子模块包括:第六确定单元,用于确定要剔除像素,所述要剔除像素为所述多个参考像素中被污染像素的像素值的可信度小于预设阈值的像素;以及第七确定单元,用于基于多个参考像素中除所述剔除像素之外的其他参考像素的像素值,校正所述图像坏点的像素值。According to an embodiment of the present disclosure, the correction sub-module includes: a sixth determining unit, configured to determine a pixel to be rejected, and the pixel to be rejected is a contaminated pixel in the plurality of reference pixels. The reliability of the pixel value of the contaminated pixel is less than a preset Threshold pixels; and a seventh determining unit, configured to correct the pixel values of the dead pixels of the image based on the pixel values of the reference pixels other than the excluded pixels among the plurality of reference pixels.
根据本公开的实施例,第七确定单元包括:插值子单元,用于通过图像插值算法对所述除所述剔除像素之外的其他参考像素的像素值进行插值生成所述图像坏点的像素值。According to an embodiment of the present disclosure, the seventh determining unit includes: an interpolation sub-unit, configured to interpolate the pixel values of the reference pixels other than the excluded pixels by using an image interpolation algorithm to generate pixels of the image dead pixels value.
根据本公开的实施例,获取模块包括:第一获得子模块,用于获得四拜耳图像传感器采集的图像信息;以及第一处理子模块,用于对所述图像信息进行解马赛克处理而获得的图像。According to an embodiment of the present disclosure, the acquisition module includes: a first acquisition sub-module for acquiring image information collected by the Four Bayer image sensor; and a first processing sub-module for demosaicing the image information. image.
根据本公开的实施例,获取模块包括:第二获得子模块,用于获得图像传感器采集的图像信息,所述图像信息包括多个像素的像素值;以及第二处理子模块,用于对所述多个像素的像素值进行合并而获得所述待处理图像。According to an embodiment of the present disclosure, the acquisition module includes: a second acquisition sub-module for acquiring image information collected by an image sensor, the image information including pixel values of a plurality of pixels; and a second processing sub-module for The pixel values of the multiple pixels are combined to obtain the image to be processed.
根据本公开的实施例,更新模块还包括:第五确定子模块,用于确定动态坏点,其中,所述动态坏点为在所述图像传感器采集的环境光为第一 反射光的情况下,像素值与预设区域中像素的像素值之间的差异小于预设值,并且在所述图像传感器采集的环境光为第二反射光的情况下,像素值与预设区域中像素的像素值之间的差异大于预设值的像素,其中,所述环境光为所述图像传感器采集的对象反射的光;以及坏点添加子模块,用于将所述动态坏点和所述动态坏点的位置信息加入所述第一坏点信息,以使在所述动态坏点的像素值不在所述特定范围内的情况下,所述图像坏点包括所述动态坏点。According to an embodiment of the present disclosure, the update module further includes: a fifth determining sub-module for determining dynamic dead pixels, where the dynamic dead pixels are when the ambient light collected by the image sensor is the first reflected light , The difference between the pixel value and the pixel value of the pixel in the preset area is less than the preset value, and when the ambient light collected by the image sensor is the second reflected light, the pixel value is different from the pixel value of the pixel in the preset area The difference between the values is greater than the preset value of pixels, where the ambient light is the light reflected by the object collected by the image sensor; Point location information is added to the first dead pixel information, so that when the pixel value of the dynamic dead pixel is not within the specific range, the image dead pixel includes the dynamic dead pixel.
本公开的另一方面提供了一种电子设备,包括:一个或多个处理器;存储装置,用于存储一个或多个程序,其中,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器执行上述方法。Another aspect of the present disclosure provides an electronic device including: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are used by the one or more When executed by two processors, the one or more processors are caused to execute the foregoing method.
本公开的另一方面提供了一种计算机可读存储介质,存储有计算机可执行指令,所述指令在被执行时用于实现如上所述的方法。Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the above-mentioned method when executed.
本公开的另一方面提供了一种计算机程序,所述计算机程序包括计算机可执行指令,所述指令在被执行时用于实现如上所述的方法。Another aspect of the present disclosure provides a computer program, which includes computer-executable instructions, which are used to implement the method as described above when executed.
附图说明Description of the drawings
图1A~图1C示意性示出了根据本公开实施例的图像处理方法的应用场景;1A to 1C schematically show application scenarios of an image processing method according to an embodiment of the present disclosure;
图2示意性示出了根据本公开实施例的图像处理方法的流程图;Fig. 2 schematically shows a flowchart of an image processing method according to an embodiment of the present disclosure;
图3示意性示出了根据本公开实施例的将图像传感器的坏点信息由第一坏点信息更新为第二坏点信息的方法流程图;FIG. 3 schematically shows a flowchart of a method for updating dead pixel information of an image sensor from first dead pixel information to second dead pixel information according to an embodiment of the present disclosure;
图4A示意性示出了根据本公开实施例确定被污染像素的像素值的可信度的示例方法流程图;4A schematically shows a flowchart of an example method for determining the credibility of the pixel value of a contaminated pixel according to an embodiment of the present disclosure;
图4B示意性示出了根据本公开实施例的距离与可信度之间的对应关系;FIG. 4B schematically shows the correspondence between distance and credibility according to an embodiment of the present disclosure;
图5A示意性示出了根据本公开实施例的对待处理图像进行处理的方法流程图;Fig. 5A schematically shows a flowchart of a method for processing an image to be processed according to an embodiment of the present disclosure;
图5B示意性示出了根据本公开实施例的图像坏点与多个参考像素的示意图;FIG. 5B schematically shows a schematic diagram of an image with dead pixels and multiple reference pixels according to an embodiment of the present disclosure;
图5C示意性示出了根据本公开实施例的基于图像坏点所确定的像素 值的可信度的结果示意图;FIG. 5C schematically shows a schematic diagram of the result of the credibility of the pixel value determined based on the dead pixels of the image according to an embodiment of the present disclosure;
图6示意性示出了根据本公开另一实施例的将图像传感器的坏点信息由第一坏点信息更新为第二坏点信息的示例方法流程图;FIG. 6 schematically shows a flowchart of an exemplary method for updating dead pixel information of an image sensor from first dead pixel information to second dead pixel information according to another embodiment of the present disclosure;
图7A示意性示出了根据本公开另一实施例的图像处理方法的流程图;Fig. 7A schematically shows a flowchart of an image processing method according to another embodiment of the present disclosure;
图7B示意性示出了根据本公开实施例的将图像传感器的第一坏点信息更新为第二坏点信息的示例方法流程图;FIG. 7B schematically shows a flowchart of an exemplary method for updating first dead pixel information of an image sensor to second dead pixel information according to an embodiment of the present disclosure;
图7C示意性示出了根据本公开实施例的图像坏点校正的示例方法流程图;FIG. 7C schematically shows a flowchart of an example method for image dead pixel correction according to an embodiment of the present disclosure;
图8示意性示出了根据本公开实施例的图像处理装置的示意图;以及Fig. 8 schematically shows a schematic diagram of an image processing apparatus according to an embodiment of the present disclosure; and
图9示意性示出了根据本公开实施例的电子设备方框图。Fig. 9 schematically shows a block diagram of an electronic device according to an embodiment of the present disclosure.
具体实施方式Detailed ways
以下,将参照附图来描述本公开的实施例。但是应该理解,这些描述只是示例性的,而并非要限制本公开的范围。在下面的详细描述中,为便于解释,阐述了许多具体的细节以提供对本公开实施例的全面理解。然而,明显地,一个或多个实施例在没有这些具体细节的情况下也可以被实施。此外,在以下说明中,省略了对公知结构和技术的描述,以避免不必要地混淆本公开的概念。Hereinafter, embodiments of the present disclosure will be described with reference to the drawings. However, it should be understood that these descriptions are only exemplary, and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is obvious that one or more embodiments can also be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily obscuring the concept of the present disclosure.
在此使用的术语仅仅是为了描述具体实施例,而并非意在限制本公开。在此使用的术语“包括”、“包含”等表明了所述特征、步骤、操作和/或部件的存在,但是并不排除存在或添加一个或多个其他特征、步骤、操作或部件。The terms used here are only for describing specific embodiments, and are not intended to limit the present disclosure. The terms "including", "including", etc. used herein indicate the existence of the described features, steps, operations and/or components, but do not exclude the presence or addition of one or more other features, steps, operations or components.
在此使用的所有术语(包括技术和科学术语)具有本领域技术人员通常所理解的含义,除非另外定义。应注意,这里使用的术语应解释为具有与本说明书的上下文相一致的含义,而不应以理想化或过于刻板的方式来解释。All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used here should be interpreted as having meanings consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.
在使用类似于“A、B和C等中至少一个”这样的表述的情况下,一般来说应该按照本领域技术人员通常理解该表述的含义来予以解释(例如,“具有A、B和C中至少一个的系统”应包括但不限于单独具有A、单独具有B、单独具有C、具有A和B、具有A和C、具有B和C、和/或具有 A、B、C的系统等)。在使用类似于“A、B或C等中至少一个”这样的表述的情况下,一般来说应该按照本领域技术人员通常理解该表述的含义来予以解释(例如,“具有A、B或C中至少一个的系统”应包括但不限于单独具有A、单独具有B、单独具有C、具有A和B、具有A和C、具有B和C、和/或具有A、B、C的系统等)。In the case of using an expression similar to "at least one of A, B and C, etc.", generally speaking, it should be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "having A, B and C" At least one of the "systems" shall include, but is not limited to, systems having A alone, B alone, C alone, A and B, A and C, B and C, and/or systems having A, B, C, etc. ). In the case of using an expression similar to "at least one of A, B or C, etc.", generally speaking, it should be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "having A, B or C" At least one of the "systems" shall include, but is not limited to, systems having A alone, B alone, C alone, A and B, A and C, B and C, and/or systems having A, B, C, etc. ).
本公开的实施例提供了一种图像处理方法。该图像处理方法可以包括:获得待处理图像,该待处理图像是根据图像传感器采集的图像信息生成的,确定该待处理图像中的被污染像素。基于被污染像素的信息,将图像传感器的坏点信息由第一坏点信息更新为第二坏点信息。基于第二坏点信息,对待处理图像进行处理,以便校正图像坏点的像素值。其中,被污染像素包括在根据图像信息生成待处理图像的过程中,像素值受到待处理图像中至少一个图像坏点影响的像素。The embodiment of the present disclosure provides an image processing method. The image processing method may include: obtaining a to-be-processed image, the to-be-processed image is generated according to image information collected by an image sensor, and determining the contaminated pixels in the to-be-processed image. Based on the information of the contaminated pixels, the dead pixel information of the image sensor is updated from the first dead pixel information to the second dead pixel information. Based on the second dead pixel information, the image to be processed is processed to correct the pixel value of the image dead pixel. Wherein, the contaminated pixel includes a pixel whose pixel value is affected by at least one bad image in the image to be processed in the process of generating the image to be processed according to the image information.
图1A~图1C示意性示出了根据本公开实施例的图像处理方法的应用场景。需要注意的是,图1A~图1C所示仅为可以应用本公开实施例的应用场景的示例,以帮助本领域技术人员理解本公开的技术内容,但并不意味着本公开实施例不可以用于其他设备、系统、环境或场景。Figures 1A to 1C schematically show application scenarios of an image processing method according to an embodiment of the present disclosure. It should be noted that FIGS. 1A to 1C are only examples of application scenarios in which the embodiments of the present disclosure can be applied to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot Used in other devices, systems, environments or scenarios.
如图1A所示,该应用场景中包括相机100。相机100例如可以配置有四拜耳图像传感器,四拜耳图像传感器是指采用四拜耳阵列的图像传感器。As shown in FIG. 1A, the application scenario includes a camera 100. The camera 100 may be configured with, for example, a four-Bayer image sensor, and the four-Bayer image sensor refers to an image sensor using a four-Bayer array.
图1B示意性示出了四拜耳阵列和标准拜耳阵列的示意图。Fig. 1B schematically shows a schematic diagram of a four Bayer array and a standard Bayer array.
如图1B所示,四拜耳阵列可以是四个相邻的基本像素单元为相同颜色的滤光阵列,而标准拜耳阵列可以是四个相邻的基本像素单元依次为G(Green,绿)、R(Red,红)、B(Blue,蓝)、G的滤光阵列,或者标准拜耳阵列可以是四个相邻的基本像素单元依次为B、G、G、R的滤光阵列、或者标准拜耳阵列可以是四个相邻的基本像素单元依次为G、B、R、G的滤光阵列、或者标准拜耳阵列可以是四个相邻的基本像素单元依次为R、G、G、B的滤光阵列。As shown in FIG. 1B, the four-Bayer array can be a filter array with four adjacent basic pixel units of the same color, while the standard Bayer array can be a filter array with four adjacent basic pixel units sequentially G (Green, Green), The filter array of R (Red), B (Blue, blue), G, or the standard Bayer array can be a filter array with four adjacent basic pixel units being B, G, G, R in turn, or a standard The Bayer array can be a filter array with four adjacent basic pixel units sequentially G, B, R, G, or a standard Bayer array can be a filter array with four adjacent basic pixel units sequentially R, G, G, B Filter array.
根据本公开的实施例,四拜耳图像传感器具有两种图像输出模式。第一种在于直接对四拜耳阵列采集到的四拜耳图像做去马赛克处理(Demosic)而得到输出图像。第二种在于对四拜耳阵列采集到的四拜耳图像做解马赛克处理(Remosic)而得到基于标准拜耳阵列的标准拜耳图像,然后对标准 拜耳图像做去马赛克处理而得到输出图像。解马赛克处理是指将基于四拜耳阵列的四拜耳图像处理为基于标准拜耳阵列的标准拜耳图像,去马赛克处理是指将标准拜耳图像处理为RGB图像。According to an embodiment of the present disclosure, the four Bayer image sensor has two image output modes. The first is to directly perform demosic processing (Demosic) on the Four Bayer images collected by the Four Bayer array to obtain the output image. The second is to demosaic the four Bayer images collected by the four Bayer array to obtain a standard Bayer image based on the standard Bayer array, and then perform demosaic processing on the standard Bayer image to obtain an output image. Demosaicing processing refers to processing a four Bayer image based on a four Bayer array into a standard Bayer image based on a standard Bayer array, and demosaicing processing refers to processing a standard Bayer image into an RGB image.
然而,针对上述第二种图像输出模式,在对四拜耳图像做解马赛克处理而得到标准拜耳图像的过程中,四拜耳图像中的一个图像坏点会影响标准拜耳图像中多个像素的像素值。图像坏点是指图像传感器采集到的图像中像素值不准确的像素。图像坏点可以是由于图像传感器的图像采集单元存在工艺上的缺陷,或者光信号转化为电信号的过程中出现错误而造成的。However, for the second image output mode mentioned above, in the process of demosaicing the Four Bayer image to obtain the standard Bayer image, a dead pixel in the Four Bayer image will affect the pixel values of multiple pixels in the standard Bayer image. . Image dead pixels refer to pixels with inaccurate pixel values in the image collected by the image sensor. Image dead pixels may be caused by defects in the process of the image acquisition unit of the image sensor, or errors in the process of converting optical signals into electrical signals.
图1C示意性示出了对四拜耳图像做解马赛克处理而得到标准拜耳图像的示意图。FIG. 1C schematically shows a schematic diagram of a standard Bayer image obtained by demosaicing a four-Bayer image.
如图1C所示,例如四拜耳图像包括图像坏点111。如上文参考图1B所示,在四拜耳图像中该图像坏点实际输出的颜色应该为红色。然而,由于图像传感器中与该图像坏点111对应的图像采集单元被损坏,而导致该图像坏点111输出的颜色不是红色,例如输出为黑色。As shown in FIG. 1C, for example, the four Bayer image includes image dead pixels 111. As shown above with reference to FIG. 1B, the actual output color of the dead pixels in the four Bayer image should be red. However, because the image acquisition unit corresponding to the image dead pixel 111 in the image sensor is damaged, the output color of the image dead pixel 111 is not red, for example, the output is black.
参考图1B可知,四拜耳图像中像素114、像素115和像素116分别是蓝色、绿色和绿色,而标准拜耳图像中,像素114、像素115和像素116像素应该是红色。为了将四拜耳图像转换为标准拜耳图像,需要对四拜耳图像进行解马赛克处理,以便经过解马赛克处理,像素114、像素115和像素116均被转换为红色像素值。Referring to FIG. 1B, it can be seen that the pixels 114, 115, and 116 in the four Bayer image are blue, green, and green, respectively, while in the standard Bayer image, the pixels 114, 115, and 116 should be red. In order to convert the four-Bayer image into a standard Bayer image, the four-Bayer image needs to be demosaiced, so that the pixel 114, the pixel 115, and the pixel 116 are all converted into red pixel values after the demosaicing process.
根据本公开的实施例,例如可以通过插值算法实现解马赛克。下文以确定像素114在标准拜耳图像中的像素值为例来说明一种解马赛克处理的实施方式。例如可以将与像素114相邻的红色像素(例如,可以包括图1C中椭圆虚线中的像素)作为像素114的参考像素,利用插值算法对参考像素的像素值做插值处理而得到像素114在标准拜耳图像中的像素值。类似地,也可以通过插值的方法来确定其他像素在标准拜耳图像中的像素值。According to the embodiments of the present disclosure, for example, demosaicing can be realized by an interpolation algorithm. The following is an example of determining the pixel value of the pixel 114 in the standard Bayer image to illustrate an implementation of the demosaicing process. For example, the red pixel adjacent to the pixel 114 (for example, the pixel in the ellipse and dotted line in FIG. 1C) can be used as the reference pixel of the pixel 114, and the pixel value of the reference pixel can be interpolated by an interpolation algorithm to obtain the pixel 114 in the standard The pixel value in the Bayer image. Similarly, the pixel values of other pixels in the standard Bayer image can also be determined by interpolation.
如图1C所示,在确定像素114在标准拜耳图像中的像素值的过程中,由于像素114的参考像素中包括图像坏点111,因此,像素114在标准拜耳图像中的像素值受到图像坏点111的影响,即,像素114为被污染像素。类似地,像素115、像素116也是被图像坏点111污染的被污染像素。因此,在对四拜耳图像做解马赛克处理而得到标准拜耳图像的过程中,四拜耳图 像中的一个坏点会影响到标准拜耳图像中多个像素的像素值。As shown in FIG. 1C, in the process of determining the pixel value of the pixel 114 in the standard Bayer image, since the reference pixel of the pixel 114 includes the image dead pixel 111, the pixel value of the pixel 114 in the standard Bayer image is affected by the image damage. The influence of the point 111, that is, the pixel 114 is a contaminated pixel. Similarly, the pixels 115 and 116 are also contaminated pixels contaminated by the image dead pixels 111. Therefore, in the process of demosaicing the Four Bayer image to obtain the standard Bayer image, a dead pixel in the Four Bayer image will affect the pixel values of multiple pixels in the standard Bayer image.
本公开的图像处理方法例如可以用于校正图1C中由四拜耳图像转换而来的标准拜耳图像,从而校正该标准拜耳图像中的坏点,最终提高相机100输出的RGB图像的图像质量。The image processing method of the present disclosure can be used, for example, to correct the standard Bayer image converted from the four Bayer image in FIG. 1C, thereby correcting the defective pixels in the standard Bayer image, and ultimately improving the image quality of the RGB image output by the camera 100.
图2示意性示出了根据本公开实施例的图像处理方法的流程图。Fig. 2 schematically shows a flowchart of an image processing method according to an embodiment of the present disclosure.
如图2所示,该方法可以包括操作S201~S204。As shown in FIG. 2, the method may include operations S201 to S204.
在操作S201,获得待处理图像,待处理图像是根据图像传感器采集的图像信息生成的。In operation S201, an image to be processed is obtained, and the image to be processed is generated according to the image information collected by the image sensor.
根据本公开的实施例,图像传感器例如可以是四拜耳图像传感器。例如可以对四拜耳图像传感器采集到的原始图像进行上文描述的解马赛克处理而获得待处理图像。According to an embodiment of the present disclosure, the image sensor may be, for example, a four-Bayer image sensor. For example, the original image collected by the four Bayer image sensor may be subjected to the demosaic processing described above to obtain the image to be processed.
根据本公开的另一实施例,获得待处理图像可以是对图像传感器采集到的多个像素的像素值进行合并而得到的待处理图像。例如可以是对图像传感器采集到的多个像素进行binning操作,binning操作可以是将颜色相同的相邻像素的像素值相加作为binning操作后的图像中新像素的像素值。具体地,例如图像传感器具有binning模式,当图像传感器的binning模式开启的情况下,图像传感器对采集到的图像信息进行binning操作而获得待处理图像,其中,图像信息可以包括多个像素的像素值。According to another embodiment of the present disclosure, obtaining a to-be-processed image may be a to-be-processed image obtained by combining pixel values of multiple pixels collected by an image sensor. For example, the binning operation may be performed on multiple pixels collected by the image sensor, and the binning operation may be adding the pixel values of adjacent pixels of the same color as the pixel value of the new pixel in the image after the binning operation. Specifically, for example, the image sensor has a binning mode. When the binning mode of the image sensor is turned on, the image sensor performs a binning operation on the collected image information to obtain the image to be processed, where the image information may include the pixel values of multiple pixels .
在操作S202,确定待处理图像中的被污染像素,被污染像素包括在根据图像信息生成待处理图像的过程中,像素值受到待处理图像中至少一个图像坏点影响的像素。In operation S202, a contaminated pixel in the image to be processed is determined, and the contaminated pixel includes a pixel whose pixel value is affected by at least one defective image in the image to be processed during the process of generating the image to be processed according to the image information.
例如在上文参考图1C描述的情景中,图像信息可以是图像传感器采集到的四拜耳图像。在对四拜耳图像进行解马赛克处理而得到待处理图像的过程中,待处理图像中的像素114、像素115和像素116等受到图像坏点111的影响。在对四拜耳图像进行解马赛克处理所得到的待处理图像中包括至少一个图像坏点111、多个被污染像素114、115、116等,其中,如图1C所示,图像坏点111在四拜耳图像中的位置与图像坏点111在标准拜耳图像中的位置一致。For example, in the scenario described above with reference to FIG. 1C, the image information may be a four-Bayer image collected by an image sensor. In the process of demosaicing the Four Bayer image to obtain the image to be processed, the pixels 114, 115, 116, etc. in the image to be processed are affected by the defective image 111. The to-be-processed image obtained by demosaicing the four Bayer image includes at least one image dead pixel 111, a plurality of contaminated pixels 114, 115, 116, etc., where, as shown in FIG. 1C, the image dead pixel 111 is in four The position in the Bayer image is consistent with the position of the image dead pixel 111 in the standard Bayer image.
在操作S203,基于被污染像素的信息,将图像传感器的坏点信息由第一坏点信息更新为第二坏点信息。In operation S203, based on the information of the contaminated pixel, the dead pixel information of the image sensor is updated from the first dead pixel information to the second dead pixel information.
根据本公开的实施例,第一坏点信息例如可以是图像传感器的制造厂商所提供的坏点表。在坏点表中例如可以包括坏点的标识以及每个坏点的坐标等。According to an embodiment of the present disclosure, the first dead pixel information may be, for example, a dead pixel table provided by a manufacturer of the image sensor. The dead pixel table may include, for example, the identifier of the dead pixel and the coordinates of each dead pixel.
根据本公开的实施例,例如可以根据坏点表和被污染像素生成第二坏点信息。第二坏点信息例如也可以是一个表。该表中例如可以包括两类信息,第一类可以坏点的标识和每个坏点的坐标,第二类可以是被污染像素的标识和被污染像素的坐标等信息。其中,坏点和被污染像素分别采用两类不同的标识进行标记,以便于区分该像素是坏点还是被污染像素。According to the embodiment of the present disclosure, for example, the second dead pixel information can be generated based on the dead pixel table and the contaminated pixels. The second dead pixel information may also be a table, for example. The table may include, for example, two types of information, the first type may be the identification of the dead pixel and the coordinates of each dead pixel, and the second type may be the identification of the contaminated pixel and the coordinates of the contaminated pixel and other information. Among them, the dead pixels and the contaminated pixels are respectively marked with two different types of identification, so as to distinguish whether the pixel is a dead pixel or a contaminated pixel.
在操作S204,基于第二坏点信息,对待处理图像进行处理,以便校正图像坏点的像素值。In operation S204, the image to be processed is processed based on the second dead pixel information, so as to correct the pixel value of the image dead pixel.
例如在利用校正算法校正待处理图像中的图像坏点时,可以根据第二坏点信息降低被污染像素的像素值对图像坏点的像素值的影响。具体地,例如可以是将被污染像素的像素值乘以一个小于1并且大于0的权重后再应用到校正算法中。For example, when a correction algorithm is used to correct the image defect in the image to be processed, the influence of the pixel value of the contaminated pixel on the pixel value of the image defect can be reduced according to the second defect information. Specifically, for example, the pixel value of the contaminated pixel may be multiplied by a weight less than 1 and greater than 0 and then applied to the correction algorithm.
根据本公开的实施例,能够确定出待处理图像中的被污染像素,并且根据被污染像素更新图像传感器的坏点信息。由此,能够在根据坏点信息对待处理图像中的图像坏点进行校正的过程中,降低被污染像素对图像坏点校正过程的影响,提高图像坏点校正的效果,进而提高校正后图像的图像质量。According to the embodiments of the present disclosure, it is possible to determine the contaminated pixels in the image to be processed, and update the dead pixel information of the image sensor according to the contaminated pixels. Thus, in the process of correcting image defects in the image to be processed according to the information of the defect pixels, the influence of contaminated pixels on the image defect correction process can be reduced, the effect of image defect correction can be improved, and the image quality after correction can be improved. Image Quality.
图3示意性示出了根据本公开实施例的将图像传感器的坏点信息由第一坏点信息更新为第二坏点信息的方法流程图。Fig. 3 schematically shows a flowchart of a method for updating the dead pixel information of an image sensor from the first dead pixel information to the second dead pixel information according to an embodiment of the present disclosure.
如图3所示,该方法可以包括操作S213~操作S243。As shown in FIG. 3, the method may include operation S213 to operation S243.
在操作S213,根据第一坏点信息,确定待处理图像中至少一个图像坏点的位置信息。In operation S213, according to the first dead pixel information, position information of at least one image dead pixel in the image to be processed is determined.
第一坏点信息例如可以是图像传感器的坏点表,位置信息例如可以是图像坏点的坐标。例如可以查询图像传感器自身的坏点表来确定图像坏点的坐标。The first dead pixel information may be, for example, a dead pixel table of the image sensor, and the location information may be, for example, the coordinates of the image dead pixel. For example, the dead pixel table of the image sensor can be queried to determine the coordinates of the image dead pixel.
在操作S223,根据至少一个图像坏点的位置信息,确定待处理图像中被污染像素的位置信息。In operation S223, the position information of the contaminated pixel in the image to be processed is determined according to the position information of the at least one dead pixel of the image.
根据本公开的实施例,例如可以先确定图像传感器的污染参数。污染 参数指示了在根据图像信息而生成待处理图像的过程中,一个图像坏点能够影响到的像素范围,以及基于污染参数和至少一个图像坏点的位置信息,确定被污染像素的位置信息。According to the embodiment of the present disclosure, for example, the pollution parameter of the image sensor can be determined first. The pollution parameter indicates the range of pixels that can be affected by a dead pixel in an image during the process of generating the image to be processed based on the image information, and the location information of the contaminated pixel is determined based on the pollution parameter and the location information of at least one dead pixel in the image.
根据本公开的实施例,污染参数可由图像传感器的制造厂商提供。具体地,污染参数例如可以指示了到图像坏点的欧式距离为P(P>0)的圆形区域之内的像素为一个图像坏点能够影响到的像素范围。在确定了一个图像坏点能够影响到的像素范围的情况下,可以确定在距离该图像坏点的欧式距离小于P的像素为该图像坏点污染的被污染像素。According to an embodiment of the present disclosure, the pollution parameter may be provided by the manufacturer of the image sensor. Specifically, the pollution parameter may indicate, for example, that the pixels within a circular area where the Euclidean distance to the defective image pixel is P (P>0) is a pixel range that can be affected by the defective image pixel. In the case of determining the pixel range that can be affected by a dead pixel of an image, it can be determined that the pixel whose Euclidean distance from the dead pixel of the image is less than P is the contaminated pixel contaminated by the dead pixel of the image.
在操作S233,确定被污染像素的像素值的可信度。In operation S233, the reliability of the pixel value of the contaminated pixel is determined.
根据本公开的实施例,被污染像素的像素值的可信度表征了该被污染像素受到图像坏点的影响程度。被污染像素受到图像坏点的影响越大,则被污染像素的像素值的可信度越低。相反地,被污染像素受到图像坏点的影响越小,则被污染像素的像素值的可信度越高。According to the embodiments of the present disclosure, the credibility of the pixel value of the contaminated pixel represents the degree to which the contaminated pixel is affected by the image defect. The more the contaminated pixel is affected by the image defect, the lower the credibility of the pixel value of the contaminated pixel. Conversely, the less the contaminated pixel is affected by the image defect, the higher the credibility of the contaminated pixel's pixel value.
根据本公开的实施例,被污染像素的像素值的可信度例如可以与被污染像素到图像坏点之间的距离相关。在该实施例中,可以根据被污染像素到图像坏点之间的距离来计算被污染像素的像素值的可信度。According to an embodiment of the present disclosure, the credibility of the pixel value of the contaminated pixel may be related to the distance between the contaminated pixel and the dead pixel of the image, for example. In this embodiment, the credibility of the pixel value of the contaminated pixel can be calculated based on the distance between the contaminated pixel and the dead pixel of the image.
根据本公开的另外一实施例,被污染像素的像素值的可信度例如可以是生产图像传感器的的厂商预先规定,并且写入图像传感器的参数信息中的。在该实施例中,例如可以直接读取图像传感器的参数信息来获取被污染像素的像素值的可信度。According to another embodiment of the present disclosure, the reliability of the pixel value of the contaminated pixel may be pre-defined by the manufacturer of the image sensor, and written into the parameter information of the image sensor, for example. In this embodiment, for example, the parameter information of the image sensor can be directly read to obtain the credibility of the pixel value of the contaminated pixel.
在操作S243,基于被污染像素的位置信息和可信度更新第一坏点信息,以生成第二坏点信息。In operation S243, the first dead pixel information is updated based on the location information and reliability of the contaminated pixel to generate second dead pixel information.
根据本公开的实施例,第二坏点信息例如可以包括但不限于图像坏点位置、被污染像素的位置以及被污染像素的像素值的可信度。其中,可以根据第一坏点信息确定图像坏点位置。According to an embodiment of the present disclosure, the second dead pixel information may include, but is not limited to, the position of the dead pixel of the image, the position of the contaminated pixel, and the credibility of the pixel value of the contaminated pixel, for example. Wherein, the location of the image dead pixel can be determined according to the first dead pixel information.
根据本公开的实施例,例如可以将被污染像素和被污染像素的可信度添加到第一坏点信息中,从而生成第二坏点信息。According to the embodiments of the present disclosure, for example, the contaminated pixels and the credibility of the contaminated pixels can be added to the first dead pixel information, thereby generating the second dead pixel information.
根据本公开的实施例,在确定被污染像素的基础上,还能够确定被污染像素的像素值的可信度,从而根据被污染像素的可信度对图像坏点进行校正,进一步地提高了对图像坏点校正的准确度。According to the embodiments of the present disclosure, on the basis of determining the contaminated pixel, the credibility of the pixel value of the contaminated pixel can also be determined, so that the image defect can be corrected according to the credibility of the contaminated pixel, which further improves The accuracy of image dead pixel correction.
图4A示意性示出了根据本公开实施例的确定被污染像素的像素值的可信度的示例方法流程图。Fig. 4A schematically shows a flowchart of an example method for determining the credibility of the pixel value of a contaminated pixel according to an embodiment of the present disclosure.
如图4A所示,该方法可以包括操作S2331~S2333。As shown in FIG. 4A, the method may include operations S2331 to S2333.
在操作S2331,确定距离与可信度之间的对应关系,距离为被污染像素到影响该被污染像素的图像坏点之间的欧式距离。In operation S2331, the corresponding relationship between the distance and the credibility is determined, and the distance is the Euclidean distance between the contaminated pixel and the defective image that affects the contaminated pixel.
根据本公开的实施例,距离与可信度之间的对应关系例如可以通过置信度函数表示,该置信度函数例如可以是log函数、指数函数等。According to an embodiment of the present disclosure, the corresponding relationship between the distance and the credibility can be represented by a confidence function, for example, and the confidence function can be a log function, an exponential function, or the like, for example.
图4B示意性示出了根据本公开实施例的距离与可信度之间的对应关系。Fig. 4B schematically shows the correspondence between distance and credibility according to an embodiment of the present disclosure.
如图4B所示,当距离小于P时,可信度与距离成正相关。当距离大于P时,可信度不发生变化,与距离为P时的可信度相同。该距离为被污染像素到影响该被污染像素的图像坏点之间的欧式距离。As shown in Figure 4B, when the distance is less than P, the credibility is positively correlated with the distance. When the distance is greater than P, the credibility does not change, which is the same as the credibility when the distance is P. This distance is the Euclidean distance between the contaminated pixel and the image dead pixel that affects the contaminated pixel.
在操作S2332,基于被污染像素的位置信息和图像坏点的位置信息,确定被污染像素到该影响该被污染像素点的图像坏点之间的欧式距离。In operation S2332, based on the location information of the contaminated pixel and the location information of the defective image, the Euclidean distance between the contaminated pixel and the defective image that affects the contaminated pixel is determined.
例如可以根据被污染像素的坐标和图像坏点的坐标来计算欧式距离。For example, the Euclidean distance can be calculated based on the coordinates of the contaminated pixels and the coordinates of the dead pixels of the image.
在操作S2333,基于对应关系和欧式距离,确定被污染像素的像素值的可信度。In operation S2333, based on the correspondence and the Euclidean distance, the reliability of the pixel value of the contaminated pixel is determined.
例如可以将欧式距离带入上文描述的置信度函数中,从而确定该被污染像素的像素值的可信度。For example, the Euclidean distance can be brought into the confidence function described above to determine the credibility of the pixel value of the contaminated pixel.
图5A示意性示出了根据本公开实施例的基于第二坏点信息,对待处理图像进行处理的方法流程图。Fig. 5A schematically shows a flow chart of a method for processing an image to be processed based on second dead pixel information according to an embodiment of the present disclosure.
如图5A所示,该方法可以包括操作S214~S244。As shown in FIG. 5A, the method may include operations S214 to S244.
在操作S214,基于至少一个图像坏点的位置信息确定多个参考像素,以便利用多个参考像素各自的像素值对至少一个图像坏点进行校正。In operation S214, a plurality of reference pixels are determined based on the location information of the at least one image dead pixel, so as to correct the at least one image dead pixel by using respective pixel values of the plurality of reference pixels.
根据本公开的实施例,多个参考像素例如可以是到图像坏点的距离小于Q的多个像素。该多个参考像素可以用于对图像坏点进行校正。According to an embodiment of the present disclosure, the plurality of reference pixels may be, for example, a plurality of pixels whose distance to the dead pixel of the image is less than Q. The multiple reference pixels can be used to correct the dead pixels of the image.
图5B示意性示出了根据本公开实施例的图像坏点与多个参考像素的示意图。FIG. 5B schematically shows a schematic diagram of a dead pixel and a plurality of reference pixels in an image according to an embodiment of the present disclosure.
如图5B所示,在该情景中包括图像坏点510,根据该图像坏点510的位置所确定的用于对该图像坏点510进行校正的参考像素例如可以是到图 像坏点510的欧式距离小于Q的多个像素。As shown in FIG. 5B, the scene includes image dead pixels 510, and the reference pixels determined according to the location of the image dead pixels 510 for correcting the image dead pixels 510 may be, for example, European styles to the image dead pixels 510. Multiple pixels whose distance is less than Q.
在操作S224,确定多个参考像素中是否存在被污染像素。In operation S224, it is determined whether there is a contaminated pixel among the plurality of reference pixels.
根据本公开的实施例,例如可以通过查询上文描述的第二坏点信息来获得被污染像素的位置,将被污染像素的位置与参考像素的位置进行比对。当被污染像素在上文操作S214所确定的参考像素的区域内的情况下,确定该多个参考像素中存在被污染像素。According to the embodiment of the present disclosure, for example, the position of the contaminated pixel can be obtained by querying the second bad pixel information described above, and the position of the contaminated pixel is compared with the position of the reference pixel. When the contaminated pixel is within the region of the reference pixel determined in operation S214 above, it is determined that the contaminated pixel exists in the plurality of reference pixels.
以图5B为例示例性说明操作S224。例如根据第二坏点信息可以确定在图5B的黑色实线框520区域内的像素为被图像坏点510污染的被污染像素。而在操作S214确定黑色虚线框530区域内的像素为图像坏点510的参考像素。显然,黑色虚线框530区域包含黑色实线框520内的区域,因此,图像坏点510对应的参考像素中存在被污染像素。FIG. 5B is taken as an example to illustrate operation S224. For example, according to the second dead pixel information, it can be determined that the pixels in the area of the black solid line frame 520 in FIG. 5B are contaminated pixels contaminated by the image dead pixels 510. In operation S214, it is determined that the pixels in the area of the black dashed line frame 530 are reference pixels of the dead pixels 510 of the image. Obviously, the area of the black dashed line frame 530 includes the area inside the black solid line frame 520, and therefore, there are polluted pixels in the reference pixels corresponding to the dead pixels 510 of the image.
在操作S234,在确定多个参考像素中存在被污染像素的情况下,查询第二坏点信息以确定被污染像素的像素值的可信度。In operation S234, in a case where it is determined that there is a polluted pixel in the plurality of reference pixels, the second defective pixel information is queried to determine the credibility of the pixel value of the polluted pixel.
在操作S244,基于多个参考像素各自的像素值和多个参考像素中被污染像素的像素值的可信度,校正图像坏点的像素值。In operation S244, based on the respective pixel values of the plurality of reference pixels and the credibility of the pixel values of the contaminated pixels in the plurality of reference pixels, the pixel values of the bad pixels of the image are corrected.
根据本公开的实施例,例如可以确定要剔除像素,要剔除像素为多个参考像素中被污染像素的像素值的可信度小于预设阈值的像素;以及基于多个参考像素中除剔除像素之外的其他参考像素的像素值,校正图像坏点的像素值。According to the embodiments of the present disclosure, for example, it can be determined that the pixel to be rejected is a pixel whose pixel value of the contaminated pixel among the multiple reference pixels has a credibility less than a preset threshold; and the pixel to be rejected is based on the multiple reference pixels. The pixel value of other reference pixels is used to correct the pixel value of the image's bad pixels.
根据本公开的实施例,预设阈值可以是本领域技术人员根据经验以及图像传感器的实际情况而确定的。According to an embodiment of the present disclosure, the preset threshold may be determined by those skilled in the art based on experience and actual conditions of the image sensor.
图5C示意性示出了根据本公开实施例的基于图像坏点510所确定的像素值的可信度的结果示意图。FIG. 5C schematically shows a schematic diagram of the result of the credibility of the pixel value determined based on the image dead pixel 510 according to an embodiment of the present disclosure.
如图5C所示,被标注有“X”标识的像素的可信度小于预设阈值,则被标注有“X”标识的像素为要剔除像素。被标注有“C”标识的像素的可信度大于预设阈值。被标注有“O”标识的像素为未被图像坏点510污染的像素。As shown in FIG. 5C, if the credibility of the pixel marked with the "X" mark is less than the preset threshold, the pixel marked with the "X" mark is the pixel to be excluded. The credibility of the pixels marked with "C" is greater than the preset threshold. The pixels marked with an “O” mark are pixels that are not contaminated by the dead pixels 510 of the image.
将参考像素中被标注有“X”标识的像素剔除后剩余的像素(即被标注有“C”标识的像素和被标注有“O”标识的像素)的像素值可以用于校正图像坏点510。The pixel value of the remaining pixels (that is, the pixels marked with the "C" mark and the pixels marked with the "O" mark) after removing the pixels marked with the "X" mark in the reference pixels can be used to correct the image dead pixels 510.
根据本公开的实施例,例如可以确定可信度所属的范围与像素值权重(0<像素值权重<1)之间的对应关系,从而可以根据可信度所属的范围确定像素值的权重然后将被污染像素的像素值乘以该权重后再应用到校正算法中。例如在图B所示的情景中,可以将被标注有“C”标识的像素乘以0.7之后得到的像素值应用到校正图像坏点510的校正算法中。According to the embodiments of the present disclosure, for example, the corresponding relationship between the range to which the credibility belongs and the pixel value weight (0<pixel value weight<1) can be determined, so that the weight of the pixel value can be determined according to the range to which the credibility belongs and then The pixel value of the contaminated pixel is multiplied by the weight and then applied to the correction algorithm. For example, in the scenario shown in FIG. B, the pixel value obtained by multiplying the pixel marked with "C" by 0.7 can be applied to the correction algorithm for correcting the image defect 510.
根据本公开的实施例,基于多个参考像素中除剔除像素之外的其他参考像素的像素值,校正图像坏点的像素值包括:通过图像插值算法对除所述剔除像素之外的其他参考像素的像素值进行插值生成图像坏点的像素值。具体地,例如可以将多个参考像素中除剔除像素之外的其他参考像素的像素值的平均值作为图像坏点的像素值。According to an embodiment of the present disclosure, based on the pixel values of the reference pixels other than the excluded pixels among the plurality of reference pixels, correcting the pixel values of the dead pixels of the image includes: using an image interpolation algorithm to refer to other reference pixels other than the excluded pixels The pixel value of the pixel is interpolated to generate the pixel value of the image dead pixel. Specifically, for example, the average value of the pixel values of the reference pixels other than the excluded pixels among the plurality of reference pixels may be used as the pixel value of the defective image of the image.
图6示意性示出了根据本公开另一实施例的将图像传感器的坏点信息由第一坏点信息更新为第二坏点信息的方法流程图。Fig. 6 schematically shows a flowchart of a method for updating dead pixel information of an image sensor from first dead pixel information to second dead pixel information according to another embodiment of the present disclosure.
如图6所示,该方法在前述图3描述的操作S213~S243的基础上还可以包括操作253和操作S263。As shown in FIG. 6, the method may further include operation 253 and operation S263 on the basis of operations S213 to S243 described in FIG. 3.
在操作S253,确定动态坏点,其中,所述动态坏点为在所述图像传感器采集的环境光为第一反射光的情况下像素值与预设区域中像素的像素值之间的差异小于预设值,并且在所述图像传感器采集的环境光为第二反射光的情况下下,像素值与预设区域中像素的像素值之间的差异大于预设值的像素,其中,所述环境光为所述图像传感器采集的对象反射的光。In operation S253, dynamic dead pixels are determined, where the dynamic dead pixels are when the ambient light collected by the image sensor is the first reflected light, the difference between the pixel value and the pixel value of the pixel in the preset area is less than A preset value, and when the ambient light collected by the image sensor is the second reflected light, the difference between the pixel value and the pixel value of the pixel in the preset area is greater than the pixel with the preset value, wherein the The ambient light is the light reflected by the object collected by the image sensor.
根据本公开的实施例,预设区域可以是像素的邻域。当图像传感器采集的环境光为第一反射光的情况下,若某个像素的像素值与该像素的邻域中像素的像素值之间的差异小于预设值,并且在图像传感器采集的环境光为第二反射光的情况下,该像素的像素值与该像素的邻域中像素的像素值之间的差异大于预设值,则该像素为动态坏点。换言之,动态坏点即为在一定像素值范围内,该像素输出的像素值正常,而不在这一像素值范围内,该像素输出的像素值不正常的像素。According to an embodiment of the present disclosure, the preset area may be a neighborhood of a pixel. When the ambient light collected by the image sensor is the first reflected light, if the difference between the pixel value of a certain pixel and the pixel value of the pixel in the neighborhood of the pixel is less than the preset value, and the environment collected by the image sensor When the light is the second reflected light, and the difference between the pixel value of the pixel and the pixel value of the pixel in the neighborhood of the pixel is greater than the preset value, the pixel is a dynamic dead pixel. In other words, a dynamic dead pixel is a pixel whose output pixel value is normal within a certain pixel value range, but the pixel whose output pixel value is abnormal if it is not within this pixel value range.
根据本公开的实施例,所述预设值可以是本领域技术人员根据经验而确定的值。预设值例如可以是0到255之间的任何值。According to an embodiment of the present disclosure, the preset value may be a value determined by a person skilled in the art based on experience. The preset value may be any value between 0 and 255, for example.
根据本公开的实施例,本领域技术人员在使用该图像传感器之前可以对该图像传感器进行检测来确定出动态坏点,并将检测出的动态坏点信息 写入图像传感器的软件程序中,从而在图像传感器执行该图像处理方法的情况下,可以从软件程序中读取到动态坏点。According to the embodiments of the present disclosure, those skilled in the art can detect the image sensor to determine the dynamic dead pixels before using the image sensor, and write the detected dynamic dead pixel information into the software program of the image sensor, thereby When the image sensor executes the image processing method, the dynamic dead pixels can be read from the software program.
在操作S263,将动态坏点和动态坏点的位置信息加入第一坏点信息,以使在动态坏点的像素值不在特定范围内的情况下,图像坏点包括动态坏点。In operation S263, the dynamic dead pixels and the location information of the dynamic dead pixels are added to the first dead pixel information, so that when the pixel values of the dynamic dead pixels are not within a specific range, the image dead pixels include dynamic dead pixels.
根据本公开的实施例,动态坏点的位置信息例如可以是动态坏点的坐标。例如可以将动态坏点的坐标和动态坏点表现异常的像素范围添加到第一坏点信息中。According to an embodiment of the present disclosure, the location information of the dynamic dead pixel may be, for example, the coordinates of the dynamic dead pixel. For example, the coordinates of the dynamic dead pixels and the pixel range where the dynamic dead pixels behave abnormally can be added to the first dead pixel information.
例如可以是当动态坏点邻域的像素的像素值的平均值大于第一值时,确定该动态坏点的像素值输出异常,则在操作S202中的至少一个图像坏点包括该动态坏点。或者,例如可以是当动态坏点邻域的像素的像素值的平均值小于第二值时,确定该动态坏点的像素值输出异常,则在操作S202中的至少一个图像坏点包括该动态坏点。For example, when the average value of the pixel values of the pixels in the neighborhood of the dynamic dead pixel is greater than the first value, it is determined that the output of the pixel value of the dynamic dead pixel is abnormal, and then at least one image dead pixel in operation S202 includes the dynamic dead pixel . Or, for example, when the average value of the pixel values of the pixels in the neighborhood of the dynamic dead pixel is less than the second value, it is determined that the output of the pixel value of the dynamic dead pixel is abnormal, and then at least one image dead pixel in operation S202 includes the dynamic dead pixel. Dead pixels.
图7A示意性示出了根据本公开另一实施例的图像处理方法的流程图。Fig. 7A schematically shows a flowchart of an image processing method according to another embodiment of the present disclosure.
如图7A所示,该图像处理方法可以包括操作S701~操作S705。As shown in FIG. 7A, the image processing method may include operations S701 to S705.
在操作S701,获取待处理图像。In operation S701, an image to be processed is acquired.
在操作S702,确定图像传感器是否开启了Remosic功能。若开启了Remosic功能,则执行操作S703,若未开启Remosic功能,则执行操作S704。In operation S702, it is determined whether the remote function is turned on by the image sensor. If the Remote function is enabled, perform operation S703, and if the remote function is not enabled, perform operation S704.
在操作S703,将图像传感器的第一坏点信息更新为第二坏点信息。In operation S703, the first dead pixel information of the image sensor is updated to the second dead pixel information.
在操作S704,进行图像坏点校正。In operation S704, image dead pixel correction is performed.
在操作S705,根据校正后的图像,生成输出图像。例如待处理图像可以是标准拜耳图像,根据校正后的标准拜耳图像生成RGB图像。In operation S705, an output image is generated based on the corrected image. For example, the image to be processed may be a standard Bayer image, and an RGB image is generated according to the corrected standard Bayer image.
图7B示意性示出了根据本公开实施例的操作S703将图像传感器的第一坏点信息更新为第二坏点信息的方法流程图。FIG. 7B schematically shows a flowchart of a method for updating the first dead pixel information of the image sensor to the second dead pixel information in operation S703 according to an embodiment of the present disclosure.
如图7B所示,该方法可以包括操作S713~S733。As shown in FIG. 7B, the method may include operations S713 to S733.
在操作S713,根据图像坏点,确定被污染像素。In operation S713, the contaminated pixels are determined according to the dead pixels of the image.
在操作S723,确定被污染像素的可信度。In operation S723, the credibility of the contaminated pixel is determined.
在操作S733,将被污染像素和被污染像素的可信度添加到第一坏点信息中以生成第二坏点信息。In operation S733, the contaminated pixel and the credibility of the contaminated pixel are added to the first dead pixel information to generate second dead pixel information.
图7C示意性示出了根据本公开实施例的操作S704图像坏点校正的方 法流程图。Fig. 7C schematically shows a flowchart of a method for correcting image dead pixels in operation S704 according to an embodiment of the present disclosure.
如图7C所示,该方法可以包括操作S714~操作S754。As shown in FIG. 7C, the method may include operations S714 to S754.
在操作S714,获取图像坏点的参考像素的像素值。图像坏点的参考像素例如可以是到图像坏点的距离小于Q的多个像素。In operation S714, the pixel values of the reference pixels of the dead pixels of the image are acquired. The reference pixels of the dead pixels of the image may be, for example, multiple pixels whose distance to the dead pixels of the image is less than Q.
在操作S724,判断参考像素中是否存在被污染像素。若存在被污染像素,则执行操作S734。若不存在被污染像素,则执行操作S764。In operation S724, it is determined whether there is a contaminated pixel among the reference pixels. If there is a contaminated pixel, perform operation S734. If there is no contaminated pixel, perform operation S764.
在操作S734,将被污染像素的可信度与预设阈值进行比较,以判断被污染像素的可信度是否小于预设阈值。若被污染像素的可信度小于预设阈值,则执行操作S754,若被污染像素的可信度大于等于预设阈值,则执行操作S764。In operation S734, the credibility of the contaminated pixel is compared with a preset threshold to determine whether the credibility of the contaminated pixel is less than the preset threshold. If the credibility of the contaminated pixel is less than the preset threshold, perform operation S754, and if the credibility of the contaminated pixel is greater than or equal to the preset threshold, perform operation S764.
在操作S744,将可信度小于预设阈值的被污染像素剔除。In operation S744, the contaminated pixels whose credibility is less than the preset threshold are eliminated.
在操作S754,利用多个参考像素的像素值进行插值计算,以校正图像坏点的像素值。其中,多个参考像素中不包括可信度小于预设阈值的被污染像素。In operation S754, the pixel values of the multiple reference pixels are used for interpolation calculation to correct the pixel values of the dead pixels of the image. Among them, the multiple reference pixels do not include contaminated pixels whose credibility is less than a preset threshold.
图8示意性示出了根据本公开实施例的图像处理装置800的示意图。FIG. 8 schematically shows a schematic diagram of an image processing apparatus 800 according to an embodiment of the present disclosure.
如图8所示,该图像处理装置800可以包括获取模块810、确定模块820、更新模块830和校正模块840。As shown in FIG. 8, the image processing apparatus 800 may include an acquisition module 810, a determination module 820, an update module 830, and a correction module 840.
获取模块810,例如执行上文参考图2描述的操作S201,用于获得待处理图像,所述待处理图像是根据图像传感器采集的图像信息生成的。The acquisition module 810, for example, executes the operation S201 described above with reference to FIG. 2 to acquire an image to be processed, which is generated according to image information collected by an image sensor.
确定模块820,例如执行上文参考图2描述的操作S202,用于确定所述待处理图像中的被污染像素,所述被污染像素包括在根据所述图像信息生成所述待处理图像的过程中,像素值受到待处理图像中至少一个图像坏点影响的像素。The determining module 820, for example, executes the operation S202 described above with reference to FIG. 2 for determining the contaminated pixels in the image to be processed, and the contaminated pixels are included in the process of generating the image to be processed according to the image information. , A pixel whose pixel value is affected by at least one bad pixel in the image to be processed.
更新模块830,例如执行上文参考图2描述的操作S203,用于基于所述被污染像素的信息,将所述图像传感器的坏点信息由第一坏点信息更新为第二坏点信息。The update module 830, for example, executes the operation S203 described above with reference to FIG. 2 for updating the dead pixel information of the image sensor from the first dead pixel information to the second dead pixel information based on the information of the contaminated pixel.
校正模块840,例如执行上文参考图2描述的操作S204,用于基于所述第二坏点信息,对所述待处理图像进行处理,以便校正所述图像坏点的像素值。The correction module 840, for example, executes the operation S204 described above with reference to FIG. 2 for processing the image to be processed based on the second dead pixel information, so as to correct the pixel value of the image dead pixel.
根据本公开的实施例,更新模块包括:第一确定子模块,用于根据所 述第一坏点信息,确定所述待处理图像中至少一个图像坏点的位置信息;第二确定子模块,用于根据所述至少一个图像坏点的位置信息,确定所述待处理图像中被污染像素的位置信息;确定可信度子模块,用于确定所述被污染像素的像素值的可信度;以及生成子模块,用于基于所述被污染像素的位置信息和所述可信度更新所述第一坏点信息,以生成所述第二坏点信息。According to an embodiment of the present disclosure, the update module includes: a first determining submodule, configured to determine location information of at least one image defect in the image to be processed according to the first defect information; and a second determining submodule, It is used to determine the location information of the contaminated pixel in the image to be processed according to the location information of the at least one dead pixel of the image; the credibility determination sub-module is used to determine the credibility of the pixel value of the contaminated pixel And a generating sub-module for updating the first dead pixel information based on the location information of the contaminated pixel and the credibility to generate the second dead pixel information.
根据本公开的实施例,第二确定子模块包括:第一确定单元,用于确定所述图像传感器的污染参数,所述污染参数指示了在根据所述图像信息而生成所述待处理图像的过程中,一个图像坏点能够影响到的像素范围;以及第二确定单元,用于基于所述污染参数和所述至少一个图像坏点的位置信息,确定被污染像素的位置信息。According to an embodiment of the present disclosure, the second determining sub-module includes: a first determining unit configured to determine a pollution parameter of the image sensor, the pollution parameter indicating that the image to be processed is generated according to the image information In the process, a pixel range that can be affected by a bad image pixel; and a second determining unit configured to determine the location information of the contaminated pixel based on the pollution parameter and the location information of the at least one image bad pixel.
根据本公开的实施例,确定可信度子模块包括:第三确定单元,用于确定距离与所述可信度之间的对应关系,所述距离为被污染像素到影响该被污染像素的图像坏点之间的欧式距离;第四确定单元,用于基于所述被污染像素的位置信息和所述图像坏点的位置信息,确定所述被污染像素到该影响该被污染像素点的图像坏点之间的欧式距离;以及第五确定单元,用于基于所述对应关系和所述欧式距离,确定所述被污染像素的像素值的可信度。According to an embodiment of the present disclosure, the credibility determination sub-module includes: a third determining unit, configured to determine the corresponding relationship between the distance and the credibility, and the distance is between the contaminated pixel and the amount that affects the contaminated pixel. The Euclidean distance between the dead pixels of the image; the fourth determining unit is used to determine the contaminated pixel to the value that affects the contaminated pixel based on the location information of the contaminated pixel and the location information of the image dead pixel. The Euclidean distance between the dead pixels of the image; and a fifth determining unit for determining the reliability of the pixel value of the contaminated pixel based on the correspondence and the Euclidean distance.
根据本公开的实施例,校正模块包括:第三确定子模块,用于基于所述至少一个图像坏点的位置信息确定多个参考像素,以便利用多个参考像素各自的像素值对所述至少一个图像坏点进行校正;第四确定子模块,用于确定所述多个参考像素中是否存在被污染像素;查询子模块,用于在确定所述多个参考像素中存在被污染像素的情况下,查询所述第二坏点信息以确定所述被污染像素的像素值的可信度;以及校正子模块,用于基于所述多个参考像素各自的像素值和所述多个参考像素中被污染像素的像素值的可信度,校正所述图像坏点的像素值。According to an embodiment of the present disclosure, the correction module includes: a third determination sub-module, configured to determine a plurality of reference pixels based on the location information of the at least one image dead pixel, so as to use the respective pixel values of the plurality of reference pixels to compare the at least A dead pixel of an image is corrected; the fourth determining sub-module is used to determine whether there are contaminated pixels in the multiple reference pixels; the query sub-module is used to determine whether there are contaminated pixels in the multiple reference pixels Next, query the second dead pixel information to determine the credibility of the pixel value of the contaminated pixel; and a correction sub-module, which is configured to be based on the respective pixel values of the multiple reference pixels and the multiple reference pixels Calculate the credibility of the pixel value of the contaminated pixel, and correct the pixel value of the bad pixel of the image.
根据本公开的实施例,校正子模块包括:第六确定单元,用于确定要剔除像素,所述要剔除像素为所述多个参考像素中被污染像素的像素值的可信度小于预设阈值的像素;以及第七确定单元,用于基于多个参考像素中除所述剔除像素之外的其他参考像素的像素值,校正所述图像坏点的像 素值。According to an embodiment of the present disclosure, the correction sub-module includes: a sixth determining unit, configured to determine a pixel to be rejected, and the pixel to be rejected is a contaminated pixel in the plurality of reference pixels. The reliability of the pixel value of the contaminated pixel is less than a preset Threshold pixels; and a seventh determining unit, configured to correct the pixel values of the dead pixels of the image based on the pixel values of the reference pixels other than the excluded pixels among the plurality of reference pixels.
根据本公开的实施例,第七确定单元包括:插值子单元,用于通过图像插值算法对所述除所述剔除像素之外的其他参考像素的像素值进行插值生成所述图像坏点的像素值。According to an embodiment of the present disclosure, the seventh determining unit includes: an interpolation sub-unit, configured to interpolate the pixel values of the reference pixels other than the excluded pixels by using an image interpolation algorithm to generate pixels of the image dead pixels value.
根据本公开的实施例,获取模块包括:第一获得子模块,用于获得四拜耳图像传感器采集的图像信息;以及第一处理子模块,用于对所述图像信息进行解马赛克处理而获得的图像。According to an embodiment of the present disclosure, the acquisition module includes: a first acquisition sub-module for acquiring image information collected by the Four Bayer image sensor; and a first processing sub-module for demosaicing the image information. image.
根据本公开的实施例,获取模块包括:第二获得子模块,用于获得图像传感器采集的图像信息,所述图像信息包括多个像素的像素值;以及第二处理子模块,用于对所述多个像素的像素值进行合并而获得所述待处理图像。According to an embodiment of the present disclosure, the acquisition module includes: a second acquisition sub-module for acquiring image information collected by an image sensor, the image information including pixel values of a plurality of pixels; and a second processing sub-module for The pixel values of the multiple pixels are combined to obtain the image to be processed.
根据本公开的实施例,更新模块还包括:第五确定子模块,用于确定动态坏点,其中,在第一条件情况下,所述动态坏点的像素值与预设区域中像素的像素值之间的差异小于预设值,而在第二条件下,所述动态坏点的像素值与所述预设区域中像素的像素值之间的差异大于预设值;以及坏点添加子模块,用于将所述动态坏点和所述动态坏点的位置信息加入所述第一坏点信息,以使在所述动态坏点的像素值不在所述特定范围内的情况下,所述图像坏点包括所述动态坏点。According to an embodiment of the present disclosure, the update module further includes: a fifth determining sub-module, configured to determine dynamic dead pixels, wherein, in the first condition, the pixel value of the dynamic dead pixel is the same as the pixel value of the pixel in the preset area. The difference between the values is less than the preset value, and under the second condition, the difference between the pixel value of the dynamic dead pixel and the pixel value of the pixel in the preset area is greater than the preset value; and the dead pixel adding sub Module for adding the dynamic dead pixels and the location information of the dynamic dead pixels to the first dead pixel information, so that when the pixel values of the dynamic dead pixels are not within the specific range, the The dead pixels of the image include the dynamic dead pixels.
根据本公开的实施例的模块、子模块、单元、子单元中的任意多个、或其中任意多个的至少部分功能可以在一个模块中实现。根据本公开实施例的模块、子模块、单元、子单元中的任意一个或多个可以被拆分成多个模块来实现。根据本公开实施例的模块、子模块、单元、子单元中的任意一个或多个可以至少被部分地实现为硬件电路,例如现场可编程门阵列(FPGA)、可编程逻辑阵列(PLA)、片上系统、基板上的系统、封装上的系统、专用集成电路(ASIC),或可以通过对电路进行集成或封装的任何其他的合理方式的硬件或固件来实现,或以软件、硬件以及固件三种实现方式中任意一种或以其中任意几种的适当组合来实现。或者,根据本公开实施例的模块、子模块、单元、子单元中的一个或多个可以至少被部分地实现为计算机程序模块,当该计算机程序模块被运行时,可以执行相应的功能。According to the embodiments of the present disclosure, any number of the modules, sub-modules, units, and sub-units, or at least part of the functions of any number of them, may be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be split into multiple modules for implementation. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), System-on-chip, system-on-substrate, system-on-package, application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware in any other reasonable way that integrates or encapsulates the circuit, or by software, hardware, and firmware. Any one of these implementations or an appropriate combination of any of them can be implemented. Alternatively, one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be at least partially implemented as a computer program module, and when the computer program module is executed, the corresponding function may be performed.
例如,获取模块810、确定模块820、更新模块830和校正模块840中的任意多个可以合并在一个模块中实现,或者其中的任意一个模块可以被拆分成多个模块。或者,这些模块中的一个或多个模块的至少部分功能可以与其他模块的至少部分功能相结合,并在一个模块中实现。根据本公开的实施例,获取模块810、确定模块820、更新模块830和校正模块840中的至少一个可以至少被部分地实现为硬件电路,例如现场可编程门阵列(FPGA)、可编程逻辑阵列(PLA)、片上系统、基板上的系统、封装上的系统、专用集成电路(ASIC),或可以通过对电路进行集成或封装的任何其他的合理方式等硬件或固件来实现,或以软件、硬件以及固件三种实现方式中任意一种或以其中任意几种的适当组合来实现。或者,获取模块810、确定模块820、更新模块830和校正模块840中的至少一个可以至少被部分地实现为计算机程序模块,当该计算机程序模块被运行时,可以执行相应的功能。For example, any number of the acquisition module 810, the determination module 820, the update module 830, and the correction module 840 can be combined into one module for implementation, or any one of them can be split into multiple modules. Or, at least part of the functions of one or more of these modules may be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the acquisition module 810, the determination module 820, the update module 830, and the correction module 840 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA) and a programmable logic array. (PLA), system on chip, system on substrate, system on package, application-specific integrated circuit (ASIC), or any other reasonable way to integrate or package the circuit, or other hardware or firmware, or by software, It can be implemented in any one of the three implementation modes of hardware and firmware or in an appropriate combination of any of them. Alternatively, at least one of the acquisition module 810, the determination module 820, the update module 830, and the correction module 840 may be at least partially implemented as a computer program module, and when the computer program module is executed, a corresponding function may be performed.
图9示意性示出了根据本公开实施例的电子设备方框图。图9示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。Fig. 9 schematically shows a block diagram of an electronic device according to an embodiment of the present disclosure. The electronic device shown in FIG. 9 is only an example, and should not bring any limitation to the function and scope of use of the embodiments of the present disclosure.
如图9所示,根据本公开实施例的电子设备900包括处理器901,其可以根据存储在只读存储器(ROM)902中的程序或者从存储部分908加载到随机访问存储器(RAM)903中的程序而执行各种适当的动作和处理。处理器901例如可以包括通用微处理器(例如CPU)、指令集处理器和/或相关芯片组和/或专用微处理器(例如,专用集成电路(ASIC)),等等。处理器901还可以包括用于缓存用途的板载存储器。处理器901可以包括用于执行根据本公开实施例的方法流程的不同动作的单一处理单元或者是多个处理单元。As shown in FIG. 9, an electronic device 900 according to an embodiment of the present disclosure includes a processor 901, which can be loaded into a random access memory (RAM) 903 according to a program stored in a read only memory (ROM) 902 or from a storage part 908 The program executes various appropriate actions and processing. The processor 901 may include, for example, a general-purpose microprocessor (for example, a CPU), an instruction set processor and/or a related chipset and/or a special purpose microprocessor (for example, an application specific integrated circuit (ASIC)), and so on. The processor 901 may also include on-board memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for executing different actions of a method flow according to an embodiment of the present disclosure.
在RAM 903中,存储有电子设备900操作所需的各种程序和数据。处理器901、ROM 902以及RAM 903通过总线904彼此相连。处理器901通过执行ROM 902和/或RAM 903中的程序来执行根据本公开实施例的方法流程的各种操作。需要注意,所述程序也可以存储在除ROM 902和RAM 903以外的一个或多个存储器中。处理器901也可以通过执行存储在所述一个或多个存储器中的程序来执行根据本公开实施例的方法流程的各种操作。In the RAM 903, various programs and data required for the operation of the electronic device 900 are stored. The processor 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904. The processor 901 executes various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 902 and/or RAM 903. It should be noted that the program may also be stored in one or more memories other than ROM 902 and RAM 903. The processor 901 may also execute various operations of the method flow according to the embodiments of the present disclosure by executing programs stored in the one or more memories.
根据本公开的实施例,电子设备900还可以包括输入/输出(I/O)接口905,输入/输出(I/O)接口905也连接至总线904。电子设备900还可以包括连接至I/O接口905的以下部件中的一项或多项:包括键盘、鼠标等的输入部分906;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分907;包括硬盘等的存储部分908;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分909。通信部分909经由诸如因特网的网络执行通信处理。驱动器910也根据需要连接至I/O接口905。可拆卸介质911,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器910上,以便于从其上读出的计算机程序根据需要被安装入存储部分908。According to an embodiment of the present disclosure, the electronic device 900 may further include an input/output (I/O) interface 905, and the input/output (I/O) interface 905 is also connected to the bus 904. The electronic device 900 may also include one or more of the following components connected to the I/O interface 905: an input part 906 including a keyboard, a mouse, etc.; including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and An output section 907 of a speaker and the like; a storage section 908 including a hard disk and the like; and a communication section 909 including a network interface card such as a LAN card, a modem, and the like. The communication section 909 performs communication processing via a network such as the Internet. The drive 910 is also connected to the I/O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that the computer program read therefrom is installed into the storage portion 908 as needed.
根据本公开的实施例,根据本公开实施例的方法流程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读存储介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分909从网络上被下载和安装,和/或从可拆卸介质911被安装。在该计算机程序被处理器901执行时,执行本公开实施例的系统中限定的上述功能。根据本公开的实施例,上文描述的系统、设备、装置、模块、单元等可以通过计算机程序模块来实现。According to the embodiment of the present disclosure, the method flow according to the embodiment of the present disclosure may be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from the network through the communication part 909, and/or installed from the removable medium 911. When the computer program is executed by the processor 901, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to the embodiments of the present disclosure, the systems, devices, devices, modules, units, etc. described above may be implemented by computer program modules.
本公开还提供了一种计算机可读存储介质,该计算机可读存储介质可以是上述实施例中描述的设备/装置/系统中所包含的;也可以是单独存在,而未装配入该设备/装置/系统中。上述计算机可读存储介质承载有一个或者多个程序,当上述一个或者多个程序被执行时,实现根据本公开实施例的方法。The present disclosure also provides a computer-readable storage medium. The computer-readable storage medium may be included in the device/device/system described in the above embodiment; or it may exist alone without being assembled into the device/ In the device/system. The aforementioned computer-readable storage medium carries one or more programs, and when the aforementioned one or more programs are executed, the method according to the embodiments of the present disclosure is implemented.
根据本公开的实施例,计算机可读存储介质可以是非易失性的计算机可读存储介质,例如可以包括但不限于:便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。例如,根据本公开的实施例,计算 机可读存储介质可以包括上文描述的ROM 902和/或RAM 903和/或ROM 902和RAM 903以外的一个或多个存储器。According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but not limited to: portable computer disk, hard disk, random access memory (RAM), read-only memory (ROM) , Erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include one or more memories other than ROM 902 and/or RAM 903 and/or ROM 902 and RAM 903 described above.
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions, and operations of the system, method, and computer program product according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, program segment, or part of the code, and the above-mentioned module, program segment, or part of the code contains one or more for realizing the specified logic function. Executable instructions. It should also be noted that, in some alternative implementations, the functions marked in the block may also occur in a different order from the order marked in the drawings. For example, two blocks shown one after another can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by It is realized by a combination of dedicated hardware and computer instructions.
本领域技术人员可以理解,本公开的各个实施例和/或权利要求中记载的特征可以进行多种组合或和/或结合,即使这样的组合或结合没有明确记载于本公开中。特别地,在不脱离本公开精神和教导的情况下,本公开的各个实施例和/或权利要求中记载的特征可以进行多种组合和/或结合。所有这些组合和/或结合均落入本公开的范围。Those skilled in the art can understand that the various embodiments of the present disclosure and/or the features described in the claims can be combined or and/or combined in various ways, even if such combinations or combinations are not explicitly described in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the various embodiments of the present disclosure and/or the features described in the claims can be combined and/or combined in various ways. All these combinations and/or combinations fall within the scope of the present disclosure.
以上对本公开的实施例进行了描述。但是,这些实施例仅仅是为了说明的目的,而并非为了限制本公开的范围。尽管在以上分别描述了各实施例,但是这并不意味着各个实施例中的措施不能有利地结合使用。本公开的范围由所附权利要求及其等同物限定。不脱离本公开的范围,本领域技术人员可以做出多种替代和修改,这些替代和修改都应落在本公开的范围之内。The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only, and are not intended to limit the scope of the present disclosure. Although the respective embodiments are described above separately, this does not mean that the measures in the respective embodiments cannot be advantageously used in combination. The scope of the present disclosure is defined by the appended claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art can make various substitutions and modifications, and these substitutions and modifications should fall within the scope of the present disclosure.

Claims (22)

  1. 一种图像处理方法,包括:An image processing method, including:
    获得待处理图像,所述待处理图像是根据图像传感器采集的图像信息生成的;Obtaining a to-be-processed image, the to-be-processed image being generated based on image information collected by an image sensor;
    确定所述待处理图像中的被污染像素,所述被污染像素包括在根据所述图像信息生成所述待处理图像的过程中,像素值受到待处理图像中至少一个图像坏点影响的像素;Determining a contaminated pixel in the image to be processed, where the contaminated pixel includes a pixel whose pixel value is affected by at least one bad image in the image to be processed in the process of generating the image to be processed according to the image information;
    基于所述被污染像素的信息,将所述图像传感器的坏点信息由第一坏点信息更新为第二坏点信息;以及Based on the information of the contaminated pixels, updating the dead pixel information of the image sensor from the first dead pixel information to the second dead pixel information; and
    基于所述第二坏点信息,对所述待处理图像进行处理,以便校正所述图像坏点的像素值。Based on the second bad pixel information, processing the image to be processed so as to correct the pixel value of the image bad pixel.
  2. 根据权利要求1所述的方法,其中,所述将所述图像传感器的坏点信息由第一坏点信息更新为第二坏点信息包括:The method according to claim 1, wherein said updating the dead pixel information of the image sensor from the first dead pixel information to the second dead pixel information comprises:
    根据所述第一坏点信息,确定所述待处理图像中至少一个图像坏点的位置信息;Determine the location information of at least one image dead pixel in the image to be processed according to the first dead pixel information;
    根据所述至少一个图像坏点的位置信息,确定所述待处理图像中被污染像素的位置信息;Determine the location information of the contaminated pixels in the image to be processed according to the location information of the at least one image dead pixel;
    确定所述被污染像素的像素值的可信度;以及Determining the credibility of the pixel value of the contaminated pixel; and
    基于所述被污染像素的位置信息和所述可信度更新所述第一坏点信息,以生成所述第二坏点信息。The first dead pixel information is updated based on the location information of the contaminated pixel and the credibility to generate the second dead pixel information.
  3. 根据权利要求2所述的方法,其中,所述确定所述待处理图像中被污染像素的位置信息包括:The method according to claim 2, wherein said determining the location information of the contaminated pixels in the image to be processed comprises:
    确定所述图像传感器的污染参数,所述污染参数指示了在根据所述图像信息而生成所述待处理图像的过程中,一个图像坏点能够影响到的像素范围;以及Determining a pollution parameter of the image sensor, the pollution parameter indicating a pixel range that can be affected by a bad image pixel in the process of generating the image to be processed according to the image information; and
    基于所述污染参数和所述至少一个图像坏点的位置信息,确定被污染像素的位置信息。Based on the pollution parameter and the location information of the at least one image dead pixel, the location information of the polluted pixel is determined.
  4. 根据权利要求2所述的方法,其中,所述确定所述被污染像素的像素值的可信度包括:The method according to claim 2, wherein said determining the credibility of the pixel value of the contaminated pixel comprises:
    确定距离与所述可信度之间的对应关系,所述距离为被污染像素到影 响该被污染像素的图像坏点之间的欧式距离;Determine the correspondence between the distance and the credibility, where the distance is the Euclidean distance between the contaminated pixel and the dead pixel of the image that affects the contaminated pixel;
    基于所述被污染像素的位置信息和所述图像坏点的位置信息,确定所述被污染像素到该影响该被污染像素点的图像坏点之间的欧式距离;以及Determine the Euclidean distance from the contaminated pixel to the image defect that affects the contaminated pixel based on the location information of the contaminated pixel and the location information of the image dead pixel; and
    基于所述对应关系和所述欧式距离,确定所述被污染像素的像素值的可信度。Based on the correspondence and the Euclidean distance, the reliability of the pixel value of the contaminated pixel is determined.
  5. 根据权利要求2所述的方法,其中,所述基于所述第二坏点信息,对所述待处理图像进行处理,以便校正所述图像坏点的像素值包括:The method according to claim 2, wherein the processing the image to be processed based on the second dead pixel information so as to correct the pixel value of the image dead pixel comprises:
    基于所述至少一个图像坏点的位置信息确定多个参考像素,以便利用多个参考像素各自的像素值对所述至少一个图像坏点进行校正;Determining a plurality of reference pixels based on the location information of the at least one image dead pixel, so as to correct the at least one image dead pixel by using respective pixel values of the plurality of reference pixels;
    确定所述多个参考像素中是否存在被污染像素;Determining whether there are polluted pixels in the plurality of reference pixels;
    在确定所述多个参考像素中存在被污染像素的情况下,查询所述第二坏点信息以确定所述被污染像素的像素值的可信度;以及In the case where it is determined that there is a polluted pixel in the plurality of reference pixels, query the second bad pixel information to determine the credibility of the pixel value of the polluted pixel; and
    基于所述多个参考像素各自的像素值和所述多个参考像素中被污染像素的像素值的可信度,校正所述图像坏点的像素值。Based on the respective pixel values of the plurality of reference pixels and the reliability of the pixel values of the contaminated pixels in the plurality of reference pixels, the pixel values of the bad pixels of the image are corrected.
  6. 根据权利要求5所述的方法,其中,所述基于所述多个参考像素各自的像素值和所述多个参考像素中被污染像素的像素值的可信度,校正所述图像坏点的像素值包括:5. The method according to claim 5, wherein, based on the respective pixel values of the plurality of reference pixels and the credibility of the pixel values of the contaminated pixels in the plurality of reference pixels, correcting the defect of the image Pixel values include:
    确定要剔除像素,所述要剔除像素为所述多个参考像素中被污染像素的像素值的可信度小于预设阈值的像素;以及Determining a pixel to be eliminated, where the pixel to be eliminated is a pixel in which the credibility of the pixel value of the contaminated pixel among the plurality of reference pixels is less than a preset threshold; and
    基于多个参考像素中除所述剔除像素之外的其他参考像素的像素值,校正所述图像坏点的像素值。Based on the pixel values of the reference pixels other than the eliminated pixels among the plurality of reference pixels, the pixel values of the dead pixels of the image are corrected.
  7. 根据权利要求6所述的方法,其中,所述基于多个参考像素中除所述剔除像素之外的其他参考像素的像素值,校正所述图像坏点的像素值包括:7. The method according to claim 6, wherein the correcting the pixel value of the dead pixel of the image based on the pixel value of the reference pixels other than the excluded pixel among the plurality of reference pixels comprises:
    通过图像插值算法对所述除所述剔除像素之外的其他参考像素的像素值进行插值生成所述图像坏点的像素值。Interpolating the pixel values of the reference pixels other than the excluded pixels through an image interpolation algorithm to generate the pixel values of the image dead pixels.
  8. 根据权利要求1所述的方法,其中,所述获得待处理图像包括:The method according to claim 1, wherein said obtaining the image to be processed comprises:
    获得四拜耳图像传感器采集的图像信息;以及Obtain the image information collected by the Four Bayer image sensor; and
    对所述图像信息进行解马赛克处理而获得的图像。An image obtained by demosaicing the image information.
  9. 根据权利要求1所述的方法,其中,所述获得待处理图像包括:The method according to claim 1, wherein said obtaining the image to be processed comprises:
    获得图像传感器采集的图像信息,所述图像信息包括多个像素的像素值;以及Obtaining image information collected by the image sensor, the image information including pixel values of a plurality of pixels; and
    对所述多个像素的像素值进行合并而获得所述待处理图像。The pixel values of the multiple pixels are combined to obtain the image to be processed.
  10. 根据权利要求2所述的方法,其中,所述将所述图像传感器的坏点信息由第一坏点信息更新为第二坏点信息还包括:The method according to claim 2, wherein said updating the dead pixel information of the image sensor from the first dead pixel information to the second dead pixel information further comprises:
    确定动态坏点,其中,所述动态坏点为在所述图像传感器采集的环境光为第一反射光的情况下,像素值与预设区域中像素的像素值之间的差异小于预设值,并且在所述图像传感器采集的环境光为第二反射光的情况下,像素值与预设区域中像素的像素值之间的差异大于预设值的像素,其中,所述环境光为所述图像传感器采集的对象反射的光;以及Determining dynamic dead pixels, wherein the dynamic dead pixels are that when the ambient light collected by the image sensor is the first reflected light, the difference between the pixel value and the pixel value of the pixel in the preset area is less than the preset value , And when the ambient light collected by the image sensor is the second reflected light, the difference between the pixel value and the pixel value of the pixel in the preset area is greater than the preset value of the pixel, wherein the ambient light is all The light reflected by the object collected by the image sensor; and
    将所述动态坏点和所述动态坏点的位置信息加入所述第一坏点信息,以使在所述动态坏点的像素值不在所述特定范围内的情况下,所述图像坏点包括所述动态坏点。The dynamic dead pixel and the location information of the dynamic dead pixel are added to the first dead pixel information, so that when the pixel value of the dynamic dead pixel is not within the specific range, the image dead pixel Including the dynamic dead pixels.
  11. 一种图像处理装置,包括:An image processing device, including:
    获取模块,用于获得待处理图像,所述待处理图像是根据图像传感器采集的图像信息生成的;An acquisition module for acquiring an image to be processed, the image to be processed is generated based on image information collected by an image sensor;
    确定模块,用于确定所述待处理图像中的被污染像素,所述被污染像素包括在根据所述图像信息生成所述待处理图像的过程中,像素值受到待处理图像中至少一个图像坏点影响的像素;The determining module is used to determine the contaminated pixel in the image to be processed, and the contaminated pixel is included in the process of generating the image to be processed according to the image information, and the pixel value is damaged by at least one image in the image to be processed. Pixels affected by a point;
    更新模块,用于基于所述被污染像素的信息,将所述图像传感器的坏点信息由第一坏点信息更新为第二坏点信息;以及An update module for updating the dead pixel information of the image sensor from the first dead pixel information to the second dead pixel information based on the information of the contaminated pixel; and
    校正模块,用于基于所述第二坏点信息,对所述待处理图像进行处理,以便校正所述图像坏点的像素值。The correction module is configured to process the image to be processed based on the second bad pixel information, so as to correct the pixel value of the image bad pixel.
  12. 根据权利要求11所述的装置,其中,所述更新模块包括:The device according to claim 11, wherein the update module comprises:
    第一确定子模块,用于根据所述第一坏点信息,确定所述待处理图像中至少一个图像坏点的位置信息;The first determining submodule is configured to determine the location information of at least one image of the to-be-processed image according to the first dead pixel information;
    第二确定子模块,用于根据所述至少一个图像坏点的位置信息,确定所述待处理图像中被污染像素的位置信息;The second determining sub-module is configured to determine the location information of the contaminated pixels in the image to be processed according to the location information of the at least one dead pixel of the image;
    确定可信度子模块,用于确定所述被污染像素的像素值的可信度;以及The credibility determination sub-module is used to determine the credibility of the pixel value of the contaminated pixel; and
    生成子模块,用于基于所述被污染像素的位置信息和所述可信度更新所述第一坏点信息,以生成所述第二坏点信息。A generating submodule is used to update the first dead pixel information based on the location information of the contaminated pixel and the credibility to generate the second dead pixel information.
  13. 根据权利要求12所述的装置,其中,所述第二确定子模块包括:The device according to claim 12, wherein the second determining submodule comprises:
    第一确定单元,用于确定所述图像传感器的污染参数,所述污染参数指示了在根据所述图像信息而生成所述待处理图像的过程中,一个图像坏点能够影响到的像素范围;以及The first determining unit is configured to determine a pollution parameter of the image sensor, where the pollution parameter indicates a pixel range that can be affected by a bad image pixel in the process of generating the image to be processed according to the image information; as well as
    第二确定单元,用于基于所述污染参数和所述至少一个图像坏点的位置信息,确定被污染像素的位置信息。The second determining unit is configured to determine the position information of the contaminated pixel based on the pollution parameter and the position information of the at least one image dead pixel.
  14. 根据权利要求12所述的装置,其中,所述确定可信度子模块包括:The apparatus according to claim 12, wherein said credibility determination sub-module comprises:
    第三确定单元,用于确定距离与所述可信度之间的对应关系,所述距离为被污染像素到影响该被污染像素的图像坏点之间的欧式距离;The third determining unit is configured to determine the corresponding relationship between the distance and the credibility, where the distance is the Euclidean distance between the contaminated pixel and the defective image that affects the contaminated pixel;
    第四确定单元,用于基于所述被污染像素的位置信息和所述图像坏点的位置信息,确定所述被污染像素到该影响该被污染像素点的图像坏点之间的欧式距离;以及A fourth determining unit, configured to determine the Euclidean distance between the contaminated pixel and the image defect that affects the contaminated pixel based on the location information of the contaminated pixel and the location information of the image dead pixel; as well as
    第五确定单元,用于基于所述对应关系和所述欧式距离,确定所述被污染像素的像素值的可信度。The fifth determining unit is configured to determine the credibility of the pixel value of the contaminated pixel based on the correspondence and the Euclidean distance.
  15. 根据权利要求12所述的装置,其中,所述校正模块包括:The device according to claim 12, wherein the correction module comprises:
    第三确定子模块,用于基于所述至少一个图像坏点的位置信息确定多个参考像素,以便利用多个参考像素各自的像素值对所述至少一个图像坏点进行校正;The third determining sub-module is configured to determine a plurality of reference pixels based on the location information of the at least one image dead pixel, so as to correct the at least one image dead pixel by using respective pixel values of the plurality of reference pixels;
    第四确定子模块,用于确定所述多个参考像素中是否存在被污染像素;A fourth determining sub-module, configured to determine whether there is a polluted pixel among the multiple reference pixels;
    查询子模块,用于在确定所述多个参考像素中存在被污染像素的情况下,查询所述第二坏点信息以确定所述被污染像素的像素值的可信度;以及The query sub-module is configured to query the second dead pixel information to determine the credibility of the pixel value of the polluted pixel when it is determined that there is a polluted pixel in the multiple reference pixels; and
    校正子模块,用于基于所述多个参考像素各自的像素值和所述多个参考像素中被污染像素的像素值的可信度,校正所述图像坏点的像素值。The correction sub-module is configured to correct the pixel value of the bad image of the image based on the respective pixel values of the multiple reference pixels and the credibility of the pixel values of the contaminated pixels in the multiple reference pixels.
  16. 根据权利要求15所述的装置,其中,所述校正子模块包括:The device according to claim 15, wherein the correction sub-module comprises:
    第六确定单元,用于确定要剔除像素,所述要剔除像素为所述多个参考像素中被污染像素的像素值的可信度小于预设阈值的像素;以及A sixth determining unit, configured to determine a pixel to be removed, where the pixel to be removed is a pixel in which the credibility of the pixel value of the contaminated pixel among the plurality of reference pixels is less than a preset threshold; and
    第七确定单元,用于基于多个参考像素中除所述剔除像素之外的其他 参考像素的像素值,校正所述图像坏点的像素值。The seventh determining unit is configured to correct the pixel value of the dead pixel of the image based on the pixel values of the reference pixels other than the eliminated pixels among the plurality of reference pixels.
  17. 根据权利要求16所述的装置,其中,所述第七确定单元包括:The apparatus according to claim 16, wherein the seventh determining unit comprises:
    插值子单元,用于通过图像插值算法对所述除所述剔除像素之外的其他参考像素的像素值进行插值生成所述图像坏点的像素值。The interpolation subunit is used for interpolating the pixel values of the reference pixels other than the excluded pixels through an image interpolation algorithm to generate the pixel values of the image dead pixels.
  18. 根据权利要求11所述的装置,其中,所述获取模块包括:The apparatus according to claim 11, wherein the acquisition module comprises:
    第一获得子模块,用于获得四拜耳图像传感器采集的图像信息;以及The first obtaining sub-module is used to obtain the image information collected by the four Bayer image sensor; and
    第一处理子模块,用于对所述图像信息进行解马赛克处理而获得的图像。The first processing sub-module is used for the image obtained by demosaicing the image information.
  19. 根据权利要求11所述的装置,其中,所述获取模块包括:The apparatus according to claim 11, wherein the acquisition module comprises:
    第二获得子模块,用于获得图像传感器采集的图像信息,所述图像信息包括多个像素的像素值;以及The second obtaining sub-module is used to obtain image information collected by the image sensor, the image information including pixel values of a plurality of pixels; and
    第二处理子模块,用于对所述多个像素的像素值进行合并而获得所述待处理图像。The second processing sub-module is configured to combine the pixel values of the multiple pixels to obtain the image to be processed.
  20. 根据权利要求12所述的装置,其中,所述更新模块还包括:The device according to claim 12, wherein the update module further comprises:
    第五确定子模块,用于确定动态坏点,其中,所述动态坏点为在所述图像传感器采集的环境光为第一反射光的情况下,像素值与预设区域中像素的像素值之间的差异小于预设值,并且在所述图像传感器采集的环境光为第二反射光的情况下,像素值与预设区域中像素的像素值之间的差异大于预设值的像素,其中,所述环境光为所述图像传感器采集的对象反射的光;以及The fifth determining sub-module is configured to determine dynamic dead pixels, where the dynamic dead pixels are the pixel value and the pixel value of the pixel in the preset area when the ambient light collected by the image sensor is the first reflected light The difference between is smaller than the preset value, and in the case where the ambient light collected by the image sensor is the second reflected light, the difference between the pixel value and the pixel value of the pixel in the preset area is greater than the preset value, Wherein, the ambient light is light reflected by an object collected by the image sensor; and
    坏点添加子模块,用于将所述动态坏点和所述动态坏点的位置信息加入所述第一坏点信息,以使在所述动态坏点的像素值不在所述特定范围内的情况下,所述图像坏点包括所述动态坏点。The dead pixel adding sub-module is used to add the dynamic dead pixel and the location information of the dynamic dead pixel to the first dead pixel information, so that the pixel value of the dynamic dead pixel is not within the specific range In this case, the dead pixels of the image include the dynamic dead pixels.
  21. 一种电子设备,包括:An electronic device including:
    一个或多个处理器;One or more processors;
    存储装置,用于存储一个或多个程序,Storage device for storing one or more programs,
    其中,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器执行如权利要求1~10任意一项所述的方法。Wherein, when the one or more programs are executed by the one or more processors, the one or more processors are caused to execute the method according to any one of claims 1-10.
  22. 一种计算机可读存储介质,其上存储有可执行指令,该指令被处理器执行时使处理器执行如权利要求1~10任意一项所述的方法。A computer-readable storage medium having executable instructions stored thereon, and when the instructions are executed by a processor, the processor executes the method according to any one of claims 1-10.
PCT/CN2020/084498 2020-04-13 2020-04-13 Image processing method and apparatus, electronic device and storage medium WO2021207879A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2020/084498 WO2021207879A1 (en) 2020-04-13 2020-04-13 Image processing method and apparatus, electronic device and storage medium
CN202080004421.5A CN112544074B (en) 2020-04-13 2020-04-13 Image processing method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/084498 WO2021207879A1 (en) 2020-04-13 2020-04-13 Image processing method and apparatus, electronic device and storage medium

Publications (1)

Publication Number Publication Date
WO2021207879A1 true WO2021207879A1 (en) 2021-10-21

Family

ID=75017368

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/084498 WO2021207879A1 (en) 2020-04-13 2020-04-13 Image processing method and apparatus, electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN112544074B (en)
WO (1) WO2021207879A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113989150A (en) * 2021-10-28 2022-01-28 西安微电子技术研究所 SV-DPI-based image dead pixel correction FPGA verification system and verification method
CN114677574A (en) * 2022-05-26 2022-06-28 杭州宏景智驾科技有限公司 Method and system for diagnosing image fault for automatic driving

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6806902B1 (en) * 1999-06-08 2004-10-19 Chrontel, Inc. System and method for correcting bad pixel data in a digital camera
US9219870B1 (en) * 2014-07-31 2015-12-22 Apple Inc. Sensor data rescaler for image signal processing
CN106210712A (en) * 2016-08-11 2016-12-07 上海大学 A kind of dead pixel points of images detection and processing method
CN108765306A (en) * 2018-04-17 2018-11-06 浙江华睿科技有限公司 A kind of dead pixel points of images antidote, device, electronic equipment and medium
CN110675404A (en) * 2019-09-03 2020-01-10 RealMe重庆移动通信有限公司 Image processing method, image processing apparatus, storage medium, and terminal device
CN110807731A (en) * 2018-07-20 2020-02-18 宁波舜宇光电信息有限公司 Method, apparatus, system and storage medium for compensating image dead pixel

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100425055C (en) * 2005-07-12 2008-10-08 凌阳科技股份有限公司 Method and system for correcting color-image bad point
CN101212703B (en) * 2006-12-29 2010-05-19 华晶科技股份有限公司 Real-time bad image pixel detection method
CN106385549B (en) * 2016-09-05 2019-04-26 凌云光技术集团有限责任公司 Dead pixel points of images antidote and relevant apparatus
CN109272526B (en) * 2017-07-17 2021-11-02 北京京东尚科信息技术有限公司 Image processing method and system and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6806902B1 (en) * 1999-06-08 2004-10-19 Chrontel, Inc. System and method for correcting bad pixel data in a digital camera
US9219870B1 (en) * 2014-07-31 2015-12-22 Apple Inc. Sensor data rescaler for image signal processing
CN106210712A (en) * 2016-08-11 2016-12-07 上海大学 A kind of dead pixel points of images detection and processing method
CN108765306A (en) * 2018-04-17 2018-11-06 浙江华睿科技有限公司 A kind of dead pixel points of images antidote, device, electronic equipment and medium
CN110807731A (en) * 2018-07-20 2020-02-18 宁波舜宇光电信息有限公司 Method, apparatus, system and storage medium for compensating image dead pixel
CN110675404A (en) * 2019-09-03 2020-01-10 RealMe重庆移动通信有限公司 Image processing method, image processing apparatus, storage medium, and terminal device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113989150A (en) * 2021-10-28 2022-01-28 西安微电子技术研究所 SV-DPI-based image dead pixel correction FPGA verification system and verification method
CN114677574A (en) * 2022-05-26 2022-06-28 杭州宏景智驾科技有限公司 Method and system for diagnosing image fault for automatic driving

Also Published As

Publication number Publication date
CN112544074B (en) 2023-05-05
CN112544074A (en) 2021-03-23

Similar Documents

Publication Publication Date Title
US20100215260A1 (en) Image processing apparatus, image processing method, and program
AU2017229995B2 (en) Perspective correction for curved display screens
US9338439B2 (en) Systems, methods, and computer program products for runtime adjustment of image warping parameters in a multi-camera system
TWI395958B (en) Defective pixel detection and correction devices, systems, and methods for detecting and correcting defective pixel
JP5904213B2 (en) Image processing apparatus, image processing method, and program
KR101354669B1 (en) Method and apparatus for detecting dead pixel in image sensor, method and apparatus for capturing image from image sensor
WO2018195797A1 (en) Visual detection method, detection device, and robot
WO2021207879A1 (en) Image processing method and apparatus, electronic device and storage medium
JP5141245B2 (en) Image processing apparatus, correction information generation method, and imaging apparatus
WO2022143283A1 (en) Camera calibration method and apparatus, and computer device and storage medium
JP2002010274A (en) Device for processing colored images
JP2004112736A (en) Semiconductor integrated circuit, defective pixel correction method, and image processor
CN107909569B (en) Screen-patterned detection method, screen-patterned detection device and electronic equipment
WO2019029573A1 (en) Image blurring method, computer-readable storage medium and computer device
US8803998B2 (en) Image optimization system and method for optimizing images
WO2020135097A1 (en) Method and apparatus for channel switch detection of display terminal
JP5309940B2 (en) Image processing apparatus and imaging apparatus
JP2006229626A (en) Defective pixel detecting method
US8417019B2 (en) Image correction system and method
US11270412B2 (en) Image signal processor, method, and system for environmental mapping
JP2019165401A (en) Image processing device and image processing method
US10701328B2 (en) Image processing device, image processing method, and image processing program
JP2021122106A (en) Imaging apparatus, learning apparatus, imaging apparatus control method, learning method, learned model, and program
TWI445398B (en) Image correction device and image correction method
JP5968145B2 (en) Image processing apparatus and control method thereof

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: 20931472

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: 20931472

Country of ref document: EP

Kind code of ref document: A1