WO2016019751A1 - Image processing device and method - Google Patents

Image processing device and method Download PDF

Info

Publication number
WO2016019751A1
WO2016019751A1 PCT/CN2015/080927 CN2015080927W WO2016019751A1 WO 2016019751 A1 WO2016019751 A1 WO 2016019751A1 CN 2015080927 W CN2015080927 W CN 2015080927W WO 2016019751 A1 WO2016019751 A1 WO 2016019751A1
Authority
WO
WIPO (PCT)
Prior art keywords
pixel point
value
green
pixel
sliding window
Prior art date
Application number
PCT/CN2015/080927
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 华为技术有限公司
Publication of WO2016019751A1 publication Critical patent/WO2016019751A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/10Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths
    • 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

Definitions

  • the present invention relates to the field of image processing technologies, and in particular, to an image processing apparatus and method.
  • Bayer (Bayer) array is one of the main technologies for color image capturing of photosensitive elements such as CCD (Charge-coupled Device) or CMOS (Complementary Metal Oxide Semiconductor) sensors.
  • CCD Charge-coupled Device
  • CMOS Complementary Metal Oxide Semiconductor
  • the Bayer array simulates the sensitivity of the human eye to color, using the principle that the human eye's discrimination sensitivity to G (Green) pixels is greater than that of R (Red, Red) or B (Blue, blue) pixels, using 1 red 2
  • the arrangement of green 1 blue converts grayscale information into color information.
  • Fig. 1 there is shown a schematic diagram of a 5 x 5 Bayer array 10 having 5 pixel points arranged in the lateral and longitudinal directions.
  • the Bayer array 10 includes a Gb channel 11 having alternating green pixel points G and blue pixel points B, and a Gr channel 12 having alternating green pixel points G and red pixel points R.
  • the Gb channel 11 and the Gr channel 12 are arranged in phase. It can be seen from FIG. 1 that the sensor using the Bayer array actually has only one color component per pixel, and then needs to perform interpolation calculation using an interpolation algorithm to finally obtain a color image.
  • the inventors have found that the above technique has at least the following problem: in the Bayer format image obtained by Bayer array filtering, crosstalk will occur between adjacent pixel points, and the crosstalk will result in the final acquisition. There is noise in the color image. In a typical form of expression, this crosstalk will result in a weak, checkerboard format noise in the resulting color image.
  • the present invention provides an image processing apparatus and method.
  • the technical solution is as follows:
  • an image processing apparatus comprising:
  • a sliding module for sliding in a Bayer format image to be processed by using a sliding window of M ⁇ N, where M and N respectively represent the length and width of the sliding window, and M and N are both greater than or equal to 3;
  • a reading module configured to read a pixel value of the central pixel point when a central pixel point in the sliding window is a green pixel point, where the central pixel point refers to a center of the sliding window pixel;
  • a calculation module configured to calculate, according to the sliding window, a symmetric value of a pixel value of the central pixel, where the symmetric value is used to reflect pixels of other green pixels except the central pixel in the sliding window value;
  • a determining module configured to determine an equalized output value of the central pixel point according to a pixel value of the central pixel point and the symmetric value
  • a generating module configured to generate a processed image according to the equalized output value of each green pixel point in the Bayer image to be processed.
  • the sliding module includes: a selecting unit and a detecting unit;
  • the selecting unit is configured to select a pixel point as a starting central pixel point in the Bayer format image to be processed, and center the M ⁇ N sliding window and the starting center pixel point coincide;
  • the detecting unit is configured to detect whether the central pixel point is a green pixel point
  • the reading module is further configured to read a pixel value of the central pixel point when the central pixel point is a green pixel point.
  • the sliding module further includes: a sliding unit
  • the sliding unit is configured to: if the central pixel point is not a green pixel point, slide the M ⁇ N sliding window, and select a next central pixel point;
  • the detecting unit is configured to perform the step of detecting whether the central pixel point is a green pixel point.
  • the computing module includes: a first acquiring unit, a second acquiring unit, and a symmetric computing unit;
  • the first acquiring unit is configured to acquire the green on the green red Gr channel in the sliding window
  • the second acquiring unit is configured to acquire a second sample mean value G2avg of the green pixel point on the green-blue Gb channel in the sliding window;
  • the symmetry calculation unit for calculating the center 0 point of the pixel values of G pixels according to the first sample mean G1avg, the second sample and the mean value G2avg central pixel a pixel value G 0 of the asymmetry value G 0 ':
  • G 0 ' G1avg+G2avg-G 0 .
  • the device further includes:
  • a difference detecting module configured to detect whether the absolute difference Gdiff is less than a predetermined threshold value THR, the predetermined threshold value THR>0;
  • the determining module is further configured to determine, according to the pixel value of the central pixel point and the symmetric value, an equalized output value of the central pixel point when the absolute difference Gdiff is less than the predetermined threshold value THR.
  • the determining module includes: a third acquiring unit, a fourth obtaining unit, and an output calculating unit;
  • the third acquiring unit is configured to acquire a first weight W 1 corresponding to the pixel value G 0 of the central pixel point;
  • the fourth obtaining unit is configured to acquire a second weight W 2 corresponding to the symmetric value G 0 ';
  • the output calculation unit is configured to calculate, according to the weighted average algorithm, according to the first weight W 1 , the second weight W 2 , the pixel value G 0 of the central pixel point, and the symmetric value G 0 ′
  • the balanced output value GIC of the central pixel point :
  • the third obtaining unit includes: a first difference calculating subunit, a first mean calculating subunit And the first weight determining subunit;
  • the first difference calculation sub-unit is configured to calculate, for the i-th integrated sample in the sliding window, an absolute difference Cgrad[i] corresponding to the i-th integrated sample; wherein the ith The integrated sample includes a first pixel point and a second pixel point of mutually spaced pixels in the sliding window, and the absolute difference Cgrad[i] corresponding to the i-th integrated sample refers to the first pixel point
  • the absolute difference between the pixel value and the pixel value of the second pixel, i is a positive integer
  • the first mean calculating subunit is configured to calculate a mean CDavg of absolute differences corresponding to each of the integrated samples in the sliding window:
  • the first weight determining subunit is configured to determine a scaling value of the mean CDavg as the first weight W 1 :
  • n is the number of integrated samples in the sliding window and n is a positive integer, w is a scaling factor, w>0.
  • the fourth acquiring unit includes: a second difference calculating subunit, and a second mean calculating subunit a mean value determining subunit, a first determining subunit, and a second determining subunit;
  • the second difference calculation subunit is configured to calculate an absolute difference Ggrad[j] corresponding to the jth green sample for the jth green sample in the sliding window; wherein the jth The green sample includes a first green pixel point and a second green pixel point which are mutually adjacent pixel points in the sliding window and are both green pixel points, and the absolute difference Ggrad corresponding to the jth green sample is j] is the absolute difference between the pixel value of the first green pixel and the pixel value of the second green pixel, and j is a positive integer;
  • the second mean calculating subunit is configured to calculate a mean value GDavg of absolute differences corresponding to each of the green samples in the sliding window:
  • the mean value determining subunit is configured to determine whether the mean GDavg is greater than the first weight W 1 ;
  • the first determining sub-unit configured to, when the mean value is greater than the first GDavg weight is 1 W, the first weight W is determined as a second weight W 2;
  • the second determining sub-unit configured to, when the average is less than the first GDavg weight is 1 W, the average GDavg determined as the second weight W 2;
  • n is the number of green samples in the sliding window and m is a positive integer.
  • the generating module includes: a replacing unit and a generating unit;
  • the replacing unit is configured to replace, according to each green pixel point in the Bayer format image to be processed, a balanced output value of the green pixel point by a pixel value of the green pixel point;
  • the generating unit is configured to generate the processed image according to each of the green pixels after the replacement is completed.
  • an image processing method comprising:
  • M and N respectively represent the length and width of the sliding window, and M and N are both greater than or equal to 3;
  • the processed image is generated according to the equalized output values of the respective green pixel points in the Bayer image to be processed.
  • the sliding of the M ⁇ N sliding window in the Bayer format image to be processed includes:
  • the step of reading the pixel value of the central pixel point is performed.
  • the method further includes:
  • central pixel point is not a green pixel point, sliding the M ⁇ N sliding window and selecting a next central pixel point;
  • the step of detecting whether the central pixel point is a green pixel point is performed again.
  • the calculating a symmetrical value of the pixel value of the central pixel according to the sliding window includes:
  • G 0 ' G1avg+G2avg-G 0 .
  • the determining, according to a pixel value of the central pixel point and the symmetric value, determining the central pixel point Before equalizing the output value it also includes:
  • the step of determining the equalized output value of the central pixel point according to the pixel value of the central pixel point and the symmetric value is performed.
  • the determining, according to the pixel value of the central pixel point and the symmetric value, the equalized output value of the central pixel point including:
  • the acquiring the first weight W 1 corresponding to the pixel value G 0 of the central pixel point includes :
  • n is the number of integrated samples in the sliding window and n is a positive integer, w is a scaling factor, w>0.
  • the acquiring the second weight W 2 corresponding to the symmetric value G 0 ′ includes:
  • the mean GDavg is smaller than the first weight W 1 , the mean GDavg is determined as the second weight W 2 ;
  • n is the number of green samples in the sliding window and m is a positive integer.
  • the equalized output value of each green pixel in the Bayer image generates a processed image, including:
  • the processed image is generated according to the respective green pixels after the replacement is completed.
  • the central pixel of the sliding window is a green pixel
  • the pixel value of the central pixel is read, and the symmetric value of the pixel value of the central pixel is calculated according to the sliding window, and then determined according to the pixel value of the central pixel and the symmetric value.
  • the equalized output value of the central pixel finally generates a processed image according to the equalized output value of each green pixel in the Bayer image to be processed; and solves the Bayer format image obtained by Bayer array filtering in the background art.
  • the crosstalk effect between adjacent pixels causes a problem of noise in the finally obtained color image; the calculated equalized output value corrects the pixel value of the green pixel in the Bayer image to be processed, thereby minimizing the reduction
  • the effect of crosstalk between adjacent pixels in the image improves the display of the image.
  • 1 is a schematic diagram of a 5 ⁇ 5 Bayer array involved in the background art
  • FIG. 2 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of an image processing apparatus according to another embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
  • FIG. 5 is a flowchart of a method for processing an image according to an embodiment of the present invention.
  • FIG. 6 is a flowchart of a method for processing an image according to another embodiment of the present invention.
  • 6B is a schematic diagram of a Bayer image to be processed related to an image processing method according to another embodiment of the present invention.
  • FIG. 6C is a schematic diagram of a sliding window according to an image processing method according to another embodiment of the present invention.
  • 6D is a schematic diagram of several possible integrated samples involved in an image processing method according to another embodiment of the present invention.
  • FIG. 6E is a schematic diagram of several possible green samples involved in an image processing method according to another embodiment of the present invention.
  • FIG. 2 is a structural block diagram of an image processing apparatus according to an embodiment of the present invention.
  • the image processing apparatus can be implemented as a photosensitive element such as a CCD or a CMOS sensor by software, hardware, or a combination of both. Part or all of an electronic device.
  • the image processing apparatus may include a slide module 210, a reading module 220, a calculation module 230, a determination module 240, and a generation module 250.
  • the sliding module 210 is configured to slide in the Bayer format image to be processed by using a sliding window of M ⁇ N, where M and N respectively represent the length and width of the sliding window, and M and N are both greater than or equal to 3.
  • the reading module 220 is configured to read a pixel value of the central pixel point when the central pixel point in the sliding window is a green pixel point, where the central pixel point refers to coincide with a center of the sliding window Pixels.
  • a calculation module 230 configured to calculate, according to the sliding window, a symmetric value of a pixel value of the central pixel point, where the symmetric value is used to reflect other green pixel points in the sliding window other than the central pixel point Pixel values.
  • the determining module 240 is configured to determine an equalized output value of the central pixel point according to the pixel value of the central pixel point and the symmetric value.
  • the generating module 250 is configured to generate a processed image according to the equalized output value of each green pixel point in the Bayer image to be processed.
  • the image processing apparatus reads the pixel value of the central pixel point when the central pixel point of the sliding window is a green pixel point, and calculates the symmetry of the pixel value of the central pixel point according to the sliding window.
  • FIG. 3 is a structural block diagram of an image processing apparatus according to another embodiment of the present invention.
  • the image processing apparatus can be implemented as a photosensitive element such as a CCD or a CMOS sensor by software, hardware, or a combination of both. Part or all of the electronic device.
  • the image processing apparatus may include a slide module 210, a reading module 220, a calculation module 230, a determination module 240, and a generation module 250.
  • the sliding module 210 is configured to slide in the Bayer format image to be processed by using a sliding window of M ⁇ N, where M and N respectively represent the length and width of the sliding window, and M and N are both greater than or equal to 3.
  • the sliding module 210 includes: a selecting unit 210a and a detecting unit 210b.
  • the selecting unit 210a is configured to select a pixel point as a starting central pixel point in the Bayer format image to be processed, and center the M ⁇ N sliding window and the starting center pixel Points coincide.
  • the detecting unit 210b is configured to detect whether the central pixel point is a green pixel point.
  • the sliding module 210 further includes: a sliding unit 210c.
  • the sliding unit 210c is configured to slide the M ⁇ N sliding window and select a next central pixel if the central pixel is not a green pixel.
  • the detecting unit 210b is configured to perform the step of detecting whether the central pixel point is a green pixel point.
  • the reading module 220 is configured to read a pixel value of the central pixel point when the central pixel point in the sliding window is a green pixel point, where the central pixel point refers to coincide with a center of the sliding window Pixels.
  • the reading module 220 is further configured to read a pixel value of the central pixel point when the central pixel point is a green pixel point.
  • a calculation module 230 configured to calculate, according to the sliding window, a symmetric value of a pixel value of the central pixel point, where the symmetric value is used to reflect other green pixel points in the sliding window other than the central pixel point Pixel values.
  • the calculation module 230 includes: a first acquisition unit 230a, a second acquisition unit 230b, and a symmetric calculation unit 230c.
  • the first acquiring unit 230a is configured to acquire a first sample mean G1avg of the green pixel point on the green-red Gr channel in the sliding window.
  • the second acquiring unit 230b is configured to acquire a second sample mean G2avg of the green pixel point on the green-blue Gb channel in the sliding window.
  • the symmetry calculating unit 230c, 0 is calculated for the central pixel a pixel value G according to the first sample mean G1avg, the second sample and the mean value of the center pixel G2avg point symmetric pixel value G 0 Value G 0 ':
  • G 0 ' G1avg+G2avg-G 0 .
  • the determining module 240 is configured to determine an equalized output value of the central pixel point according to the pixel value of the central pixel point and the symmetric value.
  • the determining module 240 includes: a third obtaining unit 240a, a fourth obtaining unit 240b, and an output calculating unit 240c.
  • the third obtaining unit 240a is configured to acquire a first weight W 1 corresponding to the pixel value G 0 of the central pixel point.
  • the third obtaining unit 240a includes: a first difference calculating subunit 240a1, a first mean calculating subunit 240a2, and a first weight determining subunit 240a3.
  • the first difference calculation sub-unit 240a1 is configured to calculate, for the i-th integrated sample in the sliding window, an absolute difference Cgrad[i] corresponding to the i-th comprehensive sample; wherein the ith The integrated sample includes a first pixel point and a second pixel point which are mutually spaced pixels in the sliding window, and the absolute difference Cgrad[i] corresponding to the i-th integrated sample refers to the first pixel
  • the absolute difference between the pixel value of the point and the pixel value of the second pixel, i is a positive integer.
  • the first mean calculating sub-unit 240a2 is configured to calculate a mean CDavg of absolute differences corresponding to each of the integrated samples in the sliding window:
  • the first weight determining subunit 240a3 is configured to determine a scaling value of the mean CDavg as the first weight W 1 :
  • n is the number of integrated samples in the sliding window and n is a positive integer, and w is a scaling system Number, w>0.
  • the fourth obtaining unit 240b is configured to acquire a second weight W 2 corresponding to the symmetric value G 0 '.
  • the fourth obtaining unit 240b includes: a second difference calculating subunit 240b1, a second mean calculating subunit 240b2, an average judging subunit 240b3, a first determining subunit 240b4, and a second determining subunit 240b5. .
  • the second difference calculation sub-unit 240b1 is configured to calculate an absolute difference Ggrad[j] corresponding to the j-th green sample for the j-th green sample in the sliding window; wherein the j-th The green sample includes a first green pixel point and a second green pixel point which are mutually adjacent pixel points in the sliding window and are both green pixel points, and the absolute difference Ggrad corresponding to the jth green sample [j] refers to the absolute difference between the pixel value of the first green pixel and the pixel value of the second green pixel, and j is a positive integer.
  • the second mean calculating sub-unit 240b2 is configured to calculate a mean value GDavg of absolute differences corresponding to each of the green samples in the sliding window:
  • the mean value determining sub-unit 240b3 is configured to determine whether the mean value GDavg is greater than the first weight W 1 .
  • the first determining sub-unit 240b4 is configured to determine the first weight W 1 as the second weight W 2 when the mean GDavg is greater than the first weight W 1 .
  • the second determining subunit 240b5 is configured to determine the mean GDavg as the second weight W 2 when the mean GDavg is less than the first weight W 1 .
  • n is the number of green samples in the sliding window and m is a positive integer.
  • the output calculation unit 240c is configured to pass the weighted average algorithm, and according to the first weight W 1 , the second weight W 2 , the pixel value G 0 of the central pixel point, and the symmetric value G 0 ' Calculating the equalized output value GIC of the central pixel:
  • the generating module 250 is configured to generate a processed image according to the equalized output value of each green pixel point in the Bayer image to be processed.
  • the generating module 250 includes: a replacing unit 250a and a generating unit 250b.
  • the replacing unit 250a is configured to replace the equalized output value of the green pixel point with the pixel value of the green pixel point for each green pixel point in the Bayer format image to be processed.
  • the generating unit 250b is configured to generate the processed image according to each of the green pixel points after the replacement is completed.
  • the device further includes: a difference calculation module 232 and a difference detection module 234.
  • the difference detecting module 234 is configured to detect whether the absolute difference Gdiff is less than a predetermined threshold value THR, and the predetermined threshold value THR>0.
  • the determining module 240 is further configured to determine, according to the pixel value of the central pixel point and the symmetric value, an equalized output value of the central pixel point when the absolute difference Gdiff is less than the predetermined threshold value THR .
  • the image processing apparatus reads the pixel value of the central pixel point when the central pixel point of the sliding window is a green pixel point, and calculates the symmetry of the pixel value of the central pixel point according to the sliding window.
  • the image processing apparatus provided in this embodiment further adjusts the pixel value of the central pixel point and the symmetry value by adaptive weights, and finally obtains the equalized output value GIC of the central pixel point, which can be maximally eliminated by the adjacent pixel points.
  • the effect of green channel imbalance caused by crosstalk avoids the generation of lattice noise while preserving the normal details in the image.
  • the image processing apparatus provided by the above embodiment is only illustrated by the division of each functional module. In actual applications, the function allocation may be completed by different functional modules as needed. The internal structure of the device is divided into different functional modules to perform all or part of the functions described above.
  • the image processing device provided by the above embodiment is the same as the method embodiment of the image processing method, and the specific implementation process is described in detail in the method embodiment, and details are not described herein again.
  • FIG. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
  • the electronic device includes a processor 420 and a memory 440 connected to the processor 420 .
  • One or more programs are stored in the memory 440, and the processor 420 can implement corresponding operations according to one or more programs stored in the memory 440. specific:
  • the processor 420 is configured to perform sliding in a Bayer format image to be processed by using a sliding window of M ⁇ N, where M and N respectively represent the length and width of the sliding window, and M and N are greater than or equal to 3;
  • the processor 420 is further configured to read a pixel value of the central pixel point when a central pixel point in the sliding window is a green pixel point, where the central pixel point refers to a center of the sliding window Coincident pixels;
  • the processor 420 is further configured to calculate, according to the sliding window, a symmetric value of a pixel value of the central pixel, where the symmetric value is used to reflect other greens in the sliding window except the central pixel The pixel value of the pixel;
  • the processor 420 is further configured to determine an equalized output value of the central pixel point according to a pixel value of the central pixel point and the symmetric value;
  • the processor 420 is further configured to generate a processed image according to the equalized output value of each green pixel in the Bayer image to be processed.
  • the electronic device reads the pixel value of the central pixel point when the central pixel point of the sliding window is a green pixel point, and calculates the symmetric value of the pixel value of the central pixel point according to the sliding window. And then determining the equalized output value of the central pixel point according to the pixel value of the central pixel point and the symmetric value, and finally generating the processed image according to the equalized output value of each green pixel point in the Bayer image to be processed; solving the problem in the background art
  • the Bayer format image obtained by Bayer array filtering has the problem of noise in the finally obtained color image due to the crosstalk between adjacent pixel points; the calculated equalized output value is corrected in the Bayer image to be processed.
  • the pixel value of the green pixel minimizes the crosstalk effect between adjacent pixels in the image and improves the display effect of the image.
  • the processor 420 is further configured to select a pixel point as a starting central pixel point in the Bayer format image to be processed, and center the M ⁇ N sliding window and the center of the start Pixel points coincide;
  • the processor 420 is further configured to detect whether the central pixel point is a green pixel point
  • the processor 420 is further configured to read a pixel value of the central pixel point when the central pixel point is a green pixel point.
  • the processor 420 is further configured to: if the central pixel point is not a green pixel point, slide the M ⁇ N sliding window, and select a next central pixel point;
  • the processor 420 is further configured to perform the step of detecting whether the central pixel point is a green pixel point.
  • the processor 420 is further configured to acquire a first sample mean G1avg of the green pixel point on the green-red Gr channel in the sliding window;
  • the processor 420 is further configured to acquire a second sample mean G2avg of the green pixel point on the green-blue Gb channel in the sliding window;
  • G 0 ' G1avg+G2avg-G 0 .
  • the processor 420 is further configured to detect whether the absolute difference Gdiff is less than a predetermined threshold value THR, the predetermined threshold value THR>0;
  • the processor 420 is further configured to determine, according to the pixel value of the central pixel point and the symmetric value, an equalized output value of the central pixel point when the absolute difference Gdiff is less than the predetermined threshold value THR .
  • the processor 420 is further configured to acquire a first weight W 1 corresponding to a pixel value G 0 of the central pixel point;
  • the processor 420 is further configured to acquire a second weight W 2 corresponding to the symmetric value G 0 ';
  • the processor 420 is further configured to pass a weighted averaging algorithm, and according to the first weight W 1 , the second weight W 2 , the pixel value G 0 of the central pixel point, and the symmetric value G 0 ' Calculating the equalized output value GIC of the central pixel:
  • the processor 420 is further configured to calculate an absolute difference Cgrad[i] corresponding to the i-th integrated sample for the i-th integrated sample in the sliding window; wherein the i-th integrated sample includes The first pixel point and the second pixel point of the sliding pixel are mutually spaced pixels, and the absolute difference Cgrad[i] corresponding to the i-th integrated sample refers to the pixel value of the first pixel An absolute difference from a pixel value of the second pixel, i being a positive integer;
  • the processor 420 is further configured to calculate a mean CDavg of absolute differences corresponding to each of the integrated samples in the sliding window:
  • the processor 420 is further configured to determine the scaling value of the mean CDavg as the first weight W 1 :
  • n is the number of integrated samples in the sliding window and n is a positive integer, w is a scaling factor, w>0.
  • the processor 420 is further configured to calculate, according to the jth green sample in the sliding window, an absolute difference Ggrad[j] corresponding to the jth green sample; wherein the jth green sample includes The first green pixel point and the second green pixel point in the sliding window which are adjacent to each other in the oblique direction and are both green pixel points, and the absolute difference Ggrad[j] corresponding to the jth green sample is Refers to the absolute difference between the pixel value of the first green pixel and the pixel value of the second green pixel, where j is a positive integer;
  • the processor 420 is further configured to calculate a mean value GDavg of absolute differences corresponding to each of the green samples in the sliding window:
  • the processor 420 is further configured to determine whether the average value GDavg is greater than the first weight W 1 ;
  • the processor 420 is further configured to determine the first weight W 1 as the second weight W 2 when the mean GDavg is greater than the first weight W 1 ;
  • the processor 420 is further configured to determine the mean GDavg as the second weight W 2 when the mean GDavg is less than the first weight W 1 ;
  • n is the number of green samples in the sliding window and m is a positive integer.
  • the processor 420 is further configured to: replace, for each green pixel point in the Bayer format image to be processed, a balanced output value of the green pixel point with a pixel value of the green pixel point;
  • the processor 420 is further configured to generate the processed image according to each of the green pixel points after the replacement is completed.
  • the electronic device provided by the embodiment further adjusts the pixel value and the symmetry value of the central pixel point by adaptive weights, and finally obtains the balanced output value GIC of the central pixel point, which can be maximally eliminated by the adjacent pixel points.
  • the effect of the green channel imbalance caused by crosstalk avoids the generation of lattice noise while preserving the normal details in the image.
  • FIG. 5 is a flowchart of a method for processing an image according to an embodiment of the present invention.
  • the embodiment is applied to an electronic device having a photosensitive element such as a CCD or a CMOS sensor. Description.
  • the image processing method can include the following steps:
  • Step 502 Sliding in the Bayer format image to be processed by using a sliding window of M ⁇ N, where M and N respectively represent the length and width of the sliding window, and M and N are both greater than or equal to 3.
  • Step 504 When the central pixel in the sliding window is a green pixel, the pixel value of the central pixel is read, and the central pixel refers to a pixel that coincides with the center of the sliding window.
  • Step 506 Calculate a symmetrical value of a pixel value of the central pixel point according to the sliding window, where the symmetrical value is used to reflect a pixel value of the green pixel point other than the central pixel point in the sliding window.
  • Step 508 Determine an equalized output value of the central pixel point according to the pixel value of the central pixel point and the symmetric value.
  • Step 510 Generate a processed image according to the equalized output values of the respective green pixel points in the Bayer image to be processed.
  • the image processing method reads the pixel value of the central pixel point when the central pixel point of the sliding window is a green pixel point, and calculates the symmetry of the pixel value of the central pixel point according to the sliding window.
  • the equalized output value of the central pixel point determines the equalized output value of the central pixel point according to the pixel value of the central pixel point and the symmetry value, and finally according to the balanced output of each green pixel point in the Bayer image to be processed
  • the image is processed to generate a processed image; the problem of crosstalk between adjacent pixel points in the Bayer format image obtained by Bayer array filtering in the prior art is solved, and the noise in the finally obtained color image is solved;
  • the calculated equalized output value corrects the pixel value of the green pixel in the Bayer image to be processed, which minimizes the crosstalk effect between adjacent pixels in the image and improves the display effect of the image.
  • FIG. 6A is a flowchart of a method for processing an image according to another embodiment of the present invention.
  • the image processing method is applied to an electronic device having photosensitive elements such as CCD and CMOS sensors. for example.
  • the image processing method can include the following steps:
  • Step 601 Sliding in the Bayer format image to be processed by using an M ⁇ N sliding window.
  • a Gb channel having an interactive green pixel point G and a blue pixel point B, and a Gr channel having an interactive green pixel point G and a red pixel point R, and the Gb channel and the Gr channel are arranged in phase .
  • the size of the sliding window is M ⁇ N, and M and N respectively represent the length and width of the sliding window, and M and N are both greater than or equal to 3.
  • the size of the sliding window can be determined according to factors such as processing accuracy, device processing power, and image size.
  • the size of the Bayer format image 61 to be processed is a ⁇ b, and the size of the sliding window 62 is 5 ⁇ 5.
  • this step may include the following sub-steps:
  • a pixel point is selected as the starting central pixel point in the Bayer format image to be processed, and the center of the M ⁇ N sliding window coincides with the starting center pixel point.
  • the center pixel refers to a pixel point that coincides with the center of the sliding window.
  • the image processing method in order to eliminate the lattice noise caused by the green channel imbalance caused by the crosstalk between adjacent pixel points, only the green pixel points in the Bayer format image to be processed are needed.
  • the pixel value is corrected.
  • the processed pixel In the sliding window, the processed pixel is the central pixel that coincides with the center of the sliding window, so it is necessary to detect whether the central pixel is a green pixel.
  • the M ⁇ N sliding window is slid and the next central pixel point is selected; the second sub-step described above is performed again.
  • Sliding window can be based on pre- The sliding rule is set to slide, for example, according to the row and column of the image, from left to right, top to bottom, and pixel by pixel.
  • Step 602 When the central pixel in the sliding window is a green pixel, the pixel value of the central pixel is read.
  • the pixel values of the respective pixel points in the 5 ⁇ 5 sliding window 62 are as shown in Fig. 6C.
  • the green pixel point G pixel value of the first row and the first column is D 00
  • the pixel value of the blue pixel point B of the first row and the second column is D 01
  • the red pixel point R of the second row and the first column is The pixel value is D 10
  • the pixel value of the reading center pixel is D 22 .
  • Step 603 calculating a symmetrical value of the pixel value of the central pixel point according to the sliding window.
  • the symmetry value is used to reflect the pixel value of the green pixel other than the center pixel in the sliding window.
  • this step may include the following sub-steps:
  • the first sample mean G1avg of the green pixel on the Gr channel in the sliding window is obtained.
  • the first sample mean G1avg is equal to the sum of the pixel values of the green pixel points on the Gr channel in the sliding window divided by the number of green pixel points on the Gr channel in the sliding window.
  • the second sample mean G2avg of the green pixel on the Gb channel in the sliding window is obtained.
  • the second sample mean G2avg is equal to the sum of the pixel values of the green pixel points on the Gb channel in the sliding window divided by the number of green pixel points on the Gb channel in the sliding window.
  • the symmetric value G 0 ' of the pixel value G 0 of the central pixel point is calculated according to the first sample mean G1avg, the second sample mean G2avg, and the pixel value G 0 of the central pixel point:
  • G 0 ' G1avg+G2avg-G 0 .
  • Step 604 calculating an absolute difference Gdiff of the first sample mean G1avg and the second sample mean G2avg.
  • the absolute difference Gdiff
  • Step 605 Detect whether the absolute difference Gdiff is less than a predetermined threshold value THR.
  • Gdiff is used as a conditional judgment.
  • the difference between the pixel value of the green pixel on the Gr channel and the pixel value of the green pixel on the Gb channel is the green channel caused by the crosstalk between adjacent pixels. The balance is caused by the original details in the image.
  • the difference between the pixel value of the green pixel on the Gr channel and the pixel value of the green pixel on the Gb channel is considered to be the green channel imbalance caused by the crosstalk between adjacent pixels.
  • the pixel value of the central pixel needs to be corrected to eliminate the influence of the green channel imbalance, and the following step 606 is performed.
  • Step 606 if the absolute difference Gdiff is less than the predetermined threshold value THR, the equalized output value of the central pixel point is determined according to the pixel value of the central pixel point and the symmetric value.
  • this step may include the following sub-steps:
  • the first weight W 1 corresponding to the pixel value G 0 of the central pixel is obtained.
  • the i-th composite sample includes a first pixel point and a second pixel point of mutually spaced pixel points in the sliding window, and the absolute difference Cgrad[i] corresponding to the i-th integrated sample refers to the pixel of the first pixel point.
  • the absolute difference between the value and the pixel value of the second pixel, i is a positive integer.
  • the two pixels included are two green pixels that are mutually spaced pixels, or two red pixels that are spaced apart from each other, or two blues that are spaced apart from each other.
  • the two pixel points may be spaced apart from each other in the horizontal direction, or may be spaced apart from each other in the longitudinal direction, or may be spaced apart from each other in the oblique direction.
  • the jth green sample includes a first green pixel point and a second green pixel point which are mutually adjacent pixel points in the sliding window and are green pixel points, and the absolute difference corresponding to the jth green sample Ggrad[j] refers to the absolute difference between the pixel value of the first green pixel and the pixel value of the second green pixel, and j is a positive integer.
  • m is the number of green samples in the sliding window and m is a positive integer.
  • the first weight W 1 is determined as the second weight W 2 .
  • the mean GDavg is less than the first weight W 1 , the mean GDavg is determined as the second weight W 2 .
  • the equalized output value GIC of the central pixel point is calculated by the weighted averaging algorithm and according to the first weight W 1 , the second weight W 2 , the pixel value G 0 of the central pixel point, and the symmetric value G 0 ':
  • the pixel value and the symmetry value of the central pixel point are adjusted by the adaptive weight, and finally the balanced output value GIC of the central pixel point is obtained, which can be maximally eliminated.
  • the generation of lattice noise is avoided while retaining the normal details in the image.
  • Step 607 Generate a processed image according to the equalized output values of the respective green pixel points in the Bayer image to be processed.
  • this step may include the following sub-steps:
  • the equalized output value of the green pixel is replaced by the pixel value of the green pixel.
  • the processed image is generated according to each green pixel after the replacement is completed.
  • the calculated balanced output value is substituted for the green pixel.
  • the pixel value of the point is used to implement the correction of the green pixel point, so that after the interpolation calculation by the interpolation algorithm, a color image with clear display and good detail preservation is finally obtained.
  • the image processing method reads the pixel value of the central pixel point when the central pixel point of the sliding window is a green pixel point, and calculates the symmetry of the pixel value of the central pixel point according to the sliding window.
  • the image processing method provided by the embodiment further adjusts the pixel value and the symmetry value of the central pixel point by adaptive weights, and finally obtains the balanced output value GIC of the central pixel point, which can be maximally eliminated by the adjacent pixel points.
  • the effect of green channel imbalance caused by crosstalk avoids the generation of lattice noise while preserving the normal details in the image.
  • a person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium.
  • the storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Color Television Image Signal Generators (AREA)
  • Image Processing (AREA)

Abstract

Disclosed are an image processing device and method, which belongs to the technical field of image processing. The device comprises: a sliding module for sliding in a Bayer-format image to be processed by using an M × N sliding window;a read module for reading a pixel value of a centre pixel point when the centre pixel point in the sliding window is a green pixel point; a calculation module for calculating a symmetric value of the pixel value of the centre pixel point according to the sliding window; a determination module for determining a balance output value of the centre pixel point according to the pixel value and the symmetric value of the centre pixel point;and a generation module for generating a processed image according to the balance output value of each green pixel point in the Bayer image to be processed. The problem existing in the background art that noises exist in an image due to crosstalk between adjacent pixel points in a Bayer-format image obtained through Bayer array filtering is solved; and the influence of the crosstalk between the adjacent pixel points in the image is reduced, and the image display effect is improved.

Description

图像处理装置和方法Image processing device and method
本申请要求于2014年8月7日提交中国专利局、申请号为201410385447.5、发明名称为“图像处理装置和方法”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 2014-1038544, filed on Aug. 7, 2014, the entire disclosure of which is hereby incorporated by reference.
技术领域Technical field
本发明涉及图像处理技术领域,特别涉及一种图像处理装置和方法。The present invention relates to the field of image processing technologies, and in particular, to an image processing apparatus and method.
背景技术Background technique
Bayer(拜耳)阵列是实现CCD(Charge-coupled Device,电荷耦合器件)或CMOS(Complementary Metal Oxide Semiconductor,互补金属氧化物半导体)传感器这类感光元件进行彩色图像拍摄的主要技术之一。Bayer (Bayer) array is one of the main technologies for color image capturing of photosensitive elements such as CCD (Charge-coupled Device) or CMOS (Complementary Metal Oxide Semiconductor) sensors.
Bayer阵列模拟人眼对色彩的敏感程度,利用人眼对G(Green,绿色)像素点的辨别灵敏度大于R(Red,红色)或B(Blue,蓝色)像素点的原理,采用1红2绿1蓝的排列方式将灰度信息转换成彩色信息。如图1,其示出了一种5×5的Bayer阵列10的示意图,该Bayer阵列10的横向和纵向均排列有5个像素点。具体的,该Bayer阵列10包括具有交互绿色像素点G和蓝色像素点B的Gb通道11,以及具有交互绿色像素点G和红色像素点R的Gr通道12。其中,Gb通道11和Gr通道12相间排列。由图1可知,采用Bayer阵列的传感器实际每个像素点仅存在一种颜色分量,后续需要利用插值算法进行插值计算,最终获得一张彩色图像。The Bayer array simulates the sensitivity of the human eye to color, using the principle that the human eye's discrimination sensitivity to G (Green) pixels is greater than that of R (Red, Red) or B (Blue, blue) pixels, using 1 red 2 The arrangement of green 1 blue converts grayscale information into color information. As shown in Fig. 1, there is shown a schematic diagram of a 5 x 5 Bayer array 10 having 5 pixel points arranged in the lateral and longitudinal directions. Specifically, the Bayer array 10 includes a Gb channel 11 having alternating green pixel points G and blue pixel points B, and a Gr channel 12 having alternating green pixel points G and red pixel points R. Among them, the Gb channel 11 and the Gr channel 12 are arranged in phase. It can be seen from FIG. 1 that the sensor using the Bayer array actually has only one color component per pixel, and then needs to perform interpolation calculation using an interpolation algorithm to finally obtain a color image.
在实现本发明的过程中,发明人发现上述技术至少存在以下问题:经过Bayer阵列滤波得到的Bayer格式的图像中,相邻像素点之间将会发生串扰,这种串扰将会导致最终获得的彩色图像中存在噪声。在一种典型的表现形式下,这种串扰将会导致最终获得的彩色图像中存在微弱的、棋盘格式的噪声。In the process of implementing the present invention, the inventors have found that the above technique has at least the following problem: in the Bayer format image obtained by Bayer array filtering, crosstalk will occur between adjacent pixel points, and the crosstalk will result in the final acquisition. There is noise in the color image. In a typical form of expression, this crosstalk will result in a weak, checkerboard format noise in the resulting color image.
发明内容Summary of the invention
为了解决上述技术中存在的经过Bayer阵列滤波得到的Bayer格式的图像中因相邻像素点之间的串扰影响,而导致最终获得的彩色图像中存在噪声的问 题,本发明实施例提供了一种图像处理装置和方法。所述技术方案如下:In order to solve the crosstalk effect between adjacent pixel points in the Bayer format image obtained by Bayer array filtering in the above technology, there is noise in the finally obtained color image. The present invention provides an image processing apparatus and method. The technical solution is as follows:
第一方面,提供了一种图像处理装置,所述装置包括:In a first aspect, an image processing apparatus is provided, the apparatus comprising:
滑动模块,用于采用M×N的滑动窗口在待处理的拜耳Bayer格式图像中进行滑动,M、N分别表示所述滑动窗口的长和宽,且M、N均大于等于3;a sliding module for sliding in a Bayer format image to be processed by using a sliding window of M×N, where M and N respectively represent the length and width of the sliding window, and M and N are both greater than or equal to 3;
读取模块,用于当所述滑动窗口中的中心像素点为绿色像素点时,读取所述中心像素点的像素值,所述中心像素点是指与所述滑动窗口的中心相重合的像素点;a reading module, configured to read a pixel value of the central pixel point when a central pixel point in the sliding window is a green pixel point, where the central pixel point refers to a center of the sliding window pixel;
计算模块,用于根据所述滑动窗口计算所述中心像素点的像素值的对称值,所述对称值用于反映所述滑动窗口中除所述中心像素点之外的其它绿色像素点的像素值;a calculation module, configured to calculate, according to the sliding window, a symmetric value of a pixel value of the central pixel, where the symmetric value is used to reflect pixels of other green pixels except the central pixel in the sliding window value;
确定模块,用于根据所述中心像素点的像素值以及所述对称值确定所述中心像素点的均衡输出值;a determining module, configured to determine an equalized output value of the central pixel point according to a pixel value of the central pixel point and the symmetric value;
生成模块,用于根据所述待处理的Bayer图像中的各个绿色像素点的均衡输出值生成处理后的图像。And a generating module, configured to generate a processed image according to the equalized output value of each green pixel point in the Bayer image to be processed.
在第一方面的第一种可能的实施方式中,所述滑动模块,包括:选取单元和检测单元;In a first possible implementation manner of the first aspect, the sliding module includes: a selecting unit and a detecting unit;
所述选取单元,用于在所述待处理的Bayer格式图像中选取一个像素点为起始的中心像素点,并将所述M×N的滑动窗口的中心与所述起始的中心像素点重合;The selecting unit is configured to select a pixel point as a starting central pixel point in the Bayer format image to be processed, and center the M×N sliding window and the starting center pixel point coincide;
所述检测单元,用于检测所述中心像素点是否为绿色像素点;The detecting unit is configured to detect whether the central pixel point is a green pixel point;
所述读取模块,还用于当所述中心像素点是绿色像素点时,读取所述中心像素点的像素值。The reading module is further configured to read a pixel value of the central pixel point when the central pixel point is a green pixel point.
结合第一方面的第一种可能的实施方式,在第一方面的第二种可能的实施方式中,所述滑动模块,还包括:滑动单元;With reference to the first possible implementation of the first aspect, in a second possible implementation manner of the first aspect, the sliding module further includes: a sliding unit;
所述滑动单元,用于若所述中心像素点不是绿色像素点,则将所述M×N的滑动窗口进行滑动,并选取下一个中心像素点;The sliding unit is configured to: if the central pixel point is not a green pixel point, slide the M×N sliding window, and select a next central pixel point;
所述检测单元,用于再次执行所述检测所述中心像素点是否为绿色像素点的步骤。The detecting unit is configured to perform the step of detecting whether the central pixel point is a green pixel point.
结合第一方面,在第一方面的第三种可能的实施方式中,所述计算模块,包括:第一获取单元、第二获取单元和对称计算单元;With reference to the first aspect, in a third possible implementation manner of the first aspect, the computing module includes: a first acquiring unit, a second acquiring unit, and a symmetric computing unit;
所述第一获取单元,用于获取所述滑动窗口内的绿红Gr通道上的所述绿 色像素点的第一样本均值G1avg;The first acquiring unit is configured to acquire the green on the green red Gr channel in the sliding window The first sample mean G1avg of the color pixel;
所述第二获取单元,用于获取所述滑动窗口内的绿蓝Gb通道上的所述绿色像素点的第二样本均值G2avg;The second acquiring unit is configured to acquire a second sample mean value G2avg of the green pixel point on the green-blue Gb channel in the sliding window;
所述对称计算单元,用于根据所述第一样本均值G1avg、所述第二样本均值G2avg以及所述中心像素点的像素值G0计算所述中心像素点的像素值G0的对称值G0′:The symmetry calculation unit for calculating the center 0 point of the pixel values of G pixels according to the first sample mean G1avg, the second sample and the mean value G2avg central pixel a pixel value G 0 of the asymmetry value G 0 ':
G0′=G1avg+G2avg-G0G 0 '=G1avg+G2avg-G 0 .
结合第一方面的第三种可能的实施方式,在第一方面的第四种可能的实施方式中,所述装置,还包括:In conjunction with the third possible implementation of the first aspect, in a fourth possible implementation of the first aspect, the device further includes:
差值计算模块,用于计算所述第一样本均值G1avg和所述第二样本均值G2avg的绝对差值Gdiff:Gdiff=|G1avg-G2avg|;a difference calculation module, configured to calculate an absolute difference Gdiff of the first sample mean G1avg and the second sample mean G2avg: Gdiff=|G1avg-G2avg|;
差值检测模块,用于检测所述绝对差值Gdiff是否小于预定门限值THR,所述预定门限值THR>0;a difference detecting module, configured to detect whether the absolute difference Gdiff is less than a predetermined threshold value THR, the predetermined threshold value THR>0;
所述确定模块,还用于当所述绝对差值Gdiff小于所述预定门限值THR时,根据所述中心像素点的像素值以及所述对称值确定所述中心像素点的均衡输出值。The determining module is further configured to determine, according to the pixel value of the central pixel point and the symmetric value, an equalized output value of the central pixel point when the absolute difference Gdiff is less than the predetermined threshold value THR.
结合第一方面、第一方面的第一种可能的实施方式、第一方面的第二种可能的实施方式、第一方面的第三种可能的实施方式或者第一方面的第四种可能的实施方式,在第一方面的第五种可能的实施方式中,所述确定模块,包括:第三获取单元、第四获取单元和输出计算单元;Combining the first aspect, the first possible implementation of the first aspect, the second possible implementation of the first aspect, the third possible implementation of the first aspect, or the fourth possible aspect of the first aspect In an embodiment, in a fifth possible implementation manner of the first aspect, the determining module includes: a third acquiring unit, a fourth obtaining unit, and an output calculating unit;
所述第三获取单元,用于获取所述中心像素点的像素值G0所对应的第一权重W1The third acquiring unit is configured to acquire a first weight W 1 corresponding to the pixel value G 0 of the central pixel point;
所述第四获取单元,用于获取所述对称值G0′所对应的第二权重W2The fourth obtaining unit is configured to acquire a second weight W 2 corresponding to the symmetric value G 0 ';
所述输出计算单元,用于通过加权平均算法,并根据所述第一权重W1、所述第二权重W2、所述中心像素点的像素值G0以及所述对称值G0′计算所述中心像素点的均衡输出值GIC:The output calculation unit is configured to calculate, according to the weighted average algorithm, according to the first weight W 1 , the second weight W 2 , the pixel value G 0 of the central pixel point, and the symmetric value G 0 ′ The balanced output value GIC of the central pixel point:
Figure PCTCN2015080927-appb-000001
Figure PCTCN2015080927-appb-000001
结合第一方面的第五种可能的实施方式,在第一方面的第六种可能的实施方式中,所述第三获取单元,包括:第一差值计算子单元、第一均值计算子单元和第一权重确定子单元; With reference to the fifth possible implementation manner of the first aspect, in a sixth possible implementation manner of the first aspect, the third obtaining unit includes: a first difference calculating subunit, a first mean calculating subunit And the first weight determining subunit;
所述第一差值计算子单元,用于对于所述滑动窗口中的第i个综合样本,计算所述第i个综合样本对应的绝对差值Cgrad[i];其中,所述第i个综合样本包括所述滑动窗口中互为间隔像素点的第一像素点和第二像素点,所述第i个综合样本对应的所述绝对差值Cgrad[i]是指所述第一像素点的像素值与所述第二像素点的像素值的绝对差值,i为正整数;The first difference calculation sub-unit is configured to calculate, for the i-th integrated sample in the sliding window, an absolute difference Cgrad[i] corresponding to the i-th integrated sample; wherein the ith The integrated sample includes a first pixel point and a second pixel point of mutually spaced pixels in the sliding window, and the absolute difference Cgrad[i] corresponding to the i-th integrated sample refers to the first pixel point The absolute difference between the pixel value and the pixel value of the second pixel, i is a positive integer;
所述第一均值计算子单元,用于计算所述滑动窗口中各个所述综合样本对应的绝对差值的均值CDavg:The first mean calculating subunit is configured to calculate a mean CDavg of absolute differences corresponding to each of the integrated samples in the sliding window:
Figure PCTCN2015080927-appb-000002
Figure PCTCN2015080927-appb-000002
所述第一权重确定子单元,用于将所述均值CDavg的缩放值确定为所述第一权重W1The first weight determining subunit is configured to determine a scaling value of the mean CDavg as the first weight W 1 :
W1=w×CDavg;W 1 = w × CDavg;
其中,n为所述滑动窗口中的综合样本的数量且n为正整数,w为缩放系数,w>0。Where n is the number of integrated samples in the sliding window and n is a positive integer, w is a scaling factor, w>0.
结合第一方面的第六种可能的实施方式,在第一方面的第七种可能的实施方式中,所述第四获取单元,包括:第二差值计算子单元、第二均值计算子单元、均值判断子单元、第一确定子单元和第二确定子单元;With reference to the sixth possible implementation manner of the first aspect, in a seventh possible implementation manner of the first aspect, the fourth acquiring unit includes: a second difference calculating subunit, and a second mean calculating subunit a mean value determining subunit, a first determining subunit, and a second determining subunit;
所述第二差值计算子单元,用于对于所述滑动窗口中的第j个绿色样本,计算所述第j个绿色样本对应的绝对差值Ggrad[j];其中,所述第j个绿色样本包括所述滑动窗口中互为斜方向相邻像素点、且均为绿色像素点的第一绿色像素点和第二绿色像素点,所述第j个绿色样本对应的绝对差值Ggrad[j]是指所述第一绿色像素点的像素值与所述第二绿色像素点的像素值的绝对差值,j为正整数;The second difference calculation subunit is configured to calculate an absolute difference Ggrad[j] corresponding to the jth green sample for the jth green sample in the sliding window; wherein the jth The green sample includes a first green pixel point and a second green pixel point which are mutually adjacent pixel points in the sliding window and are both green pixel points, and the absolute difference Ggrad corresponding to the jth green sample is j] is the absolute difference between the pixel value of the first green pixel and the pixel value of the second green pixel, and j is a positive integer;
所述第二均值计算子单元,用于计算所述滑动窗口中各个所述绿色样本所对应的绝对差值的均值GDavg:The second mean calculating subunit is configured to calculate a mean value GDavg of absolute differences corresponding to each of the green samples in the sliding window:
Figure PCTCN2015080927-appb-000003
Figure PCTCN2015080927-appb-000003
所述均值判断子单元,用于判断所述均值GDavg是否大于所述第一权重W1The mean value determining subunit is configured to determine whether the mean GDavg is greater than the first weight W 1 ;
所述第一确定子单元,用于当所述均值GDavg大于所述第一权重W1时,将所述第一权重W1确定为所述第二权重W2The first determining sub-unit, configured to, when the mean value is greater than the first GDavg weight is 1 W, the first weight W is determined as a second weight W 2;
所述第二确定子单元,用于当所述均值GDavg小于所述第一权重W1时,将所述均值GDavg确定为所述第二权重W2The second determining sub-unit, configured to, when the average is less than the first GDavg weight is 1 W, the average GDavg determined as the second weight W 2;
其中,m为所述滑动窗口中的绿色样本的数量且m为正整数。Where m is the number of green samples in the sliding window and m is a positive integer.
结合第一方面、第一方面的第一种可能的实施方式、第一方面的第二种可能的实施方式、第一方面的第三种可能的实施方式或者第一方面的第四种可能的实施方式,在第一方面的第八种可能的实施方式中,所述生成模块,包括:替换单元和生成单元;Combining the first aspect, the first possible implementation of the first aspect, the second possible implementation of the first aspect, the third possible implementation of the first aspect, or the fourth possible aspect of the first aspect In an eighth implementation manner of the first aspect, the generating module includes: a replacing unit and a generating unit;
所述替换单元,用于对于所述待处理的Bayer格式图像中的每一个绿色像素点,将所述绿色像素点的均衡输出值替换所述绿色像素点的像素值;The replacing unit is configured to replace, according to each green pixel point in the Bayer format image to be processed, a balanced output value of the green pixel point by a pixel value of the green pixel point;
所述生成单元,用于根据完成替换后的所述各个绿色像素点生成所述处理后的图像。The generating unit is configured to generate the processed image according to each of the green pixels after the replacement is completed.
第二方面,提供了一种图像处理方法,所述方法包括:In a second aspect, an image processing method is provided, the method comprising:
采用M×N的滑动窗口在待处理的拜耳Bayer格式图像中进行滑动,M、N分别表示所述滑动窗口的长和宽,且M、N均大于等于3;Using a sliding window of M×N to slide in the Bayer format image to be processed, M and N respectively represent the length and width of the sliding window, and M and N are both greater than or equal to 3;
当所述滑动窗口中的中心像素点为绿色像素点时,读取所述中心像素点的像素值,所述中心像素点是指与所述滑动窗口的中心相重合的像素点;Reading a pixel value of the central pixel point when a central pixel point in the sliding window is a green pixel point, where the central pixel point refers to a pixel point that coincides with a center of the sliding window;
根据所述滑动窗口计算所述中心像素点的像素值的对称值,所述对称值用于反映所述滑动窗口中除所述中心像素点之外的其它绿色像素点的像素值;Calculating a symmetric value of a pixel value of the central pixel point according to the sliding window, where the symmetric value is used to reflect a pixel value of other green pixel points in the sliding window except the central pixel point;
根据所述中心像素点的像素值以及所述对称值确定所述中心像素点的均衡输出值;Determining an equalized output value of the central pixel point according to a pixel value of the central pixel point and the symmetric value;
根据所述待处理的Bayer图像中的各个绿色像素点的均衡输出值生成处理后的图像。The processed image is generated according to the equalized output values of the respective green pixel points in the Bayer image to be processed.
在第二方面的第一种可能的实施方式中,所述采用M×N的滑动窗口在待处理的拜耳Bayer格式图像中进行滑动,包括:In a first possible implementation manner of the second aspect, the sliding of the M×N sliding window in the Bayer format image to be processed includes:
在所述待处理的Bayer格式图像中选取一个像素点为起始的中心像素点,并将所述M×N的滑动窗口的中心与所述起始的中心像素点重合;Selecting, in the Bayer format image to be processed, a pixel point as a starting central pixel point, and aligning a center of the M×N sliding window with the starting center pixel point;
检测所述中心像素点是否为绿色像素点;Detecting whether the central pixel point is a green pixel point;
若所述中心像素点是绿色像素点,则执行所述读取所述中心像素点的像素值的步骤。If the central pixel point is a green pixel point, the step of reading the pixel value of the central pixel point is performed.
结合第二方面的第一种可能的实施方式,在第二方面的第二种可能的实施方式中,所述检测所述中心像素点是否为绿色像素点之后,还包括: With reference to the first possible implementation manner of the second aspect, in the second possible implementation manner of the second aspect, after the detecting the central pixel point is a green pixel point, the method further includes:
若所述中心像素点不是绿色像素点,则将所述M×N的滑动窗口进行滑动,并选取下一个中心像素点;If the central pixel point is not a green pixel point, sliding the M×N sliding window and selecting a next central pixel point;
再次执行所述检测所述中心像素点是否为绿色像素点的步骤。The step of detecting whether the central pixel point is a green pixel point is performed again.
结合第二方面,在第二方面的第三种可能的实施方式中,所述根据所述滑动窗口计算所述中心像素点的像素值的对称值,包括:With reference to the second aspect, in a third possible implementation manner of the second aspect, the calculating a symmetrical value of the pixel value of the central pixel according to the sliding window includes:
获取所述滑动窗口内的绿红Gr通道上的所述绿色像素点的第一样本均值G1avg;Obtaining a first sample mean G1avg of the green pixel point on the green-red Gr channel in the sliding window;
获取所述滑动窗口内的绿蓝Gb通道上的所述绿色像素点的第二样本均值G2avg;Obtaining a second sample mean value G2avg of the green pixel point on the green-blue Gb channel in the sliding window;
根据所述第一样本均值G1avg、所述第二样本均值G2avg以及所述中心像素点的像素值G0计算所述中心像素点的像素值G0的对称值G0′:The mean of the first sample G1avg, the second sample and the mean value of the center pixel G2avg pixel value G 0 of the calculated pixel values of the center pixel value G 0 of symmetry G 0 ':
G0′=G1avg+G2avg-G0G 0 '=G1avg+G2avg-G 0 .
结合第二方面的第三种可能的实施方式,在第二方面的第四种可能的实施方式中,所述根据所述中心像素点的像素值以及所述对称值确定所述中心像素点的均衡输出值之前,还包括:With reference to the third possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, the determining, according to a pixel value of the central pixel point and the symmetric value, determining the central pixel point Before equalizing the output value, it also includes:
计算所述第一样本均值G1avg和所述第二样本均值G2avg的绝对差值Gdiff:Gdiff=|G1avg-G2avg|;Calculating an absolute difference Gdiff of the first sample mean G1avg and the second sample mean G2avg: Gdiff=|G1avg-G2avg|;
检测所述绝对差值Gdiff是否小于预定门限值THR,所述预定门限值THR>0;Detecting whether the absolute difference Gdiff is less than a predetermined threshold value THR, the predetermined threshold value THR>0;
若所述绝对差值Gdiff小于所述预定门限值THR,则执行所述根据所述中心像素点的像素值以及所述对称值确定所述中心像素点的均衡输出值的步骤。If the absolute difference Gdiff is smaller than the predetermined threshold value THR, the step of determining the equalized output value of the central pixel point according to the pixel value of the central pixel point and the symmetric value is performed.
结合第二方面、第二方面的第一种可能的实施方式、第二方面的第二种可能的实施方式、第二方面的第三种可能的实施方式或者第二方面的第四种可能的实施方式,在第二方面的第五种可能的实施方式中,所述根据所述中心像素点的像素值以及所述对称值确定所述中心像素点的均衡输出值,包括:Combining the second aspect, the first possible implementation of the second aspect, the second possible implementation of the second aspect, the third possible implementation of the second aspect, or the fourth possible aspect of the second aspect The embodiment, in a fifth possible implementation manner of the second aspect, the determining, according to the pixel value of the central pixel point and the symmetric value, the equalized output value of the central pixel point, including:
获取所述中心像素点的像素值G0所对应的第一权重W1Obtaining a first weight W 1 corresponding to the pixel value G 0 of the central pixel point;
获取所述对称值G0′所对应的第二权重W2Obtaining a second weight W 2 corresponding to the symmetric value G 0 ';
通过加权平均算法,并根据所述第一权重W1、所述第二权重W2、所述中心像素点的像素值G0以及所述对称值G0′计算所述中心像素点的均衡输出值GIC:Calculating the equalized output of the central pixel point by a weighted averaging algorithm and according to the first weight W 1 , the second weight W 2 , the pixel value G 0 of the central pixel point, and the symmetric value G 0 ' Value GIC:
Figure PCTCN2015080927-appb-000004
Figure PCTCN2015080927-appb-000004
结合第二方面的第五种可能的实施方式,在第二方面的第六种可能的实施方式中,所述获取所述中心像素点的像素值G0所对应的第一权重W1,包括:With reference to the fifth possible implementation manner of the second aspect, in a sixth possible implementation manner of the second aspect, the acquiring the first weight W 1 corresponding to the pixel value G 0 of the central pixel point includes :
对于所述滑动窗口中的第i个综合样本,计算所述第i个综合样本对应的绝对差值Cgrad[i];其中,所述第i个综合样本包括所述滑动窗口中互为间隔像素点的第一像素点和第二像素点,所述第i个综合样本对应的所述绝对差值Cgrad[i]是指所述第一像素点的像素值与所述第二像素点的像素值的绝对差值,i为正整数;Calculating an absolute difference Cgrad[i] corresponding to the i-th integrated sample for the i-th integrated sample in the sliding window; wherein the i-th integrated sample includes mutually spaced pixels in the sliding window a first pixel point and a second pixel point of the point, the absolute difference value Cgrad[i] corresponding to the ith integrated sample refers to a pixel value of the first pixel point and a pixel of the second pixel point The absolute difference of values, i is a positive integer;
计算所述滑动窗口中各个所述综合样本对应的绝对差值的均值CDavg:Calculating a mean CDavg of absolute differences corresponding to each of the integrated samples in the sliding window:
Figure PCTCN2015080927-appb-000005
Figure PCTCN2015080927-appb-000005
将所述均值CDavg的缩放值确定为所述第一权重W1Determining the scaled value of the mean CDavg as the first weight W 1 :
W1=w×CDavg;W 1 = w × CDavg;
其中,n为所述滑动窗口中的综合样本的数量且n为正整数,w为缩放系数,w>0。Where n is the number of integrated samples in the sliding window and n is a positive integer, w is a scaling factor, w>0.
结合第二方面的第六种可能的实施方式,在第二方面的第七种可能的实施方式中,所述获取所述对称值G0′所对应的第二权重W2,包括:With reference to the sixth possible implementation manner of the second aspect, in the seventh possible implementation manner of the second aspect, the acquiring the second weight W 2 corresponding to the symmetric value G 0 ′ includes:
对于所述滑动窗口中的第j个绿色样本,计算所述第j个绿色样本对应的绝对差值Ggrad[j];其中,所述第j个绿色样本包括所述滑动窗口中互为斜方向相邻像素点、且均为绿色像素点的第一绿色像素点和第二绿色像素点,所述第j个绿色样本对应的绝对差值Ggrad[j]是指所述第一绿色像素点的像素值与所述第二绿色像素点的像素值的绝对差值,j为正整数;Calculating an absolute difference Ggrad[j] corresponding to the jth green sample for the jth green sample in the sliding window; wherein the jth green sample comprises an oblique direction in the sliding window a first green pixel point and a second green pixel point of the adjacent pixel points and both of the green pixel points, and the absolute difference Ggrad[j] corresponding to the jth green sample refers to the first green pixel point An absolute difference between a pixel value and a pixel value of the second green pixel, j is a positive integer;
计算所述滑动窗口中各个所述绿色样本所对应的绝对差值的均值GDavg:Calculating a mean value GDavg of absolute differences corresponding to each of the green samples in the sliding window:
Figure PCTCN2015080927-appb-000006
Figure PCTCN2015080927-appb-000006
判断所述均值GDavg是否大于所述第一权重W1Determining whether the mean GDavg is greater than the first weight W 1 ;
若所述均值GDavg大于所述第一权重W1,则将所述第一权重W1确定为所述第二权重W2If the mean GDavg is greater than the first weight W 1 , determining the first weight W 1 as the second weight W 2 ;
若所述均值GDavg小于所述第一权重W1,则将所述均值GDavg确定为所述第二权重W2If the mean GDavg is smaller than the first weight W 1 , the mean GDavg is determined as the second weight W 2 ;
其中,m为所述滑动窗口中的绿色样本的数量且m为正整数。Where m is the number of green samples in the sliding window and m is a positive integer.
结合第二方面、第二方面的第一种可能的实施方式、第二方面的第二种可 能的实施方式、第二方面的第三种可能的实施方式或者第二方面的第四种可能的实施方式,在第二方面的第八种可能的实施方式中,所述根据所述待处理的Bayer图像中的各个绿色像素点的均衡输出值生成处理后的图像,包括:Combining the second aspect, the first possible implementation manner of the second aspect, and the second a possible implementation, a third possible implementation of the second aspect, or a fourth possible implementation of the second aspect, in an eighth possible implementation of the second aspect, The equalized output value of each green pixel in the Bayer image generates a processed image, including:
对于所述待处理的Bayer格式图像中的每一个绿色像素点,将所述绿色像素点的均衡输出值替换所述绿色像素点的像素值;For each green pixel in the Bayer format image to be processed, replacing the equalized output value of the green pixel point with the pixel value of the green pixel point;
根据完成替换后的所述各个绿色像素点生成所述处理后的图像。The processed image is generated according to the respective green pixels after the replacement is completed.
本发明实施例提供的技术方案带来的有益效果是:The beneficial effects brought by the technical solutions provided by the embodiments of the present invention are:
通过在滑动窗口的中心像素点为绿色像素点时,读取中心像素点的像素值,并根据滑动窗口计算中心像素点的像素值的对称值,然后根据中心像素点的像素值以及对称值确定中心像素点的均衡输出值,最终根据待处理的Bayer图像中的各个绿色像素点的均衡输出值生成处理后的图像;解决了背景技术中存在的经过Bayer阵列滤波得到的Bayer格式的图像中因相邻像素点之间的串扰影响,而导致最终获得的彩色图像中存在噪声的问题;通过计算得到的均衡输出值修正待处理的Bayer图像中的绿色像素点的像素值,最大化地减轻了图像中相邻像素点之间的串扰影响,提高了图像的显示效果。When the central pixel of the sliding window is a green pixel, the pixel value of the central pixel is read, and the symmetric value of the pixel value of the central pixel is calculated according to the sliding window, and then determined according to the pixel value of the central pixel and the symmetric value. The equalized output value of the central pixel finally generates a processed image according to the equalized output value of each green pixel in the Bayer image to be processed; and solves the Bayer format image obtained by Bayer array filtering in the background art. The crosstalk effect between adjacent pixels causes a problem of noise in the finally obtained color image; the calculated equalized output value corrects the pixel value of the green pixel in the Bayer image to be processed, thereby minimizing the reduction The effect of crosstalk between adjacent pixels in the image improves the display of the image.
附图说明DRAWINGS
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present invention. Other drawings may also be obtained from those of ordinary skill in the art in light of the inventive work.
图1是背景技术中涉及的一种5×5的Bayer阵列的示意图;1 is a schematic diagram of a 5×5 Bayer array involved in the background art;
图2是本发明一个实施例提供的图像处理装置结构示意图;2 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present invention;
图3是本发明另一实施例提供的图像处理装置结构示意图;3 is a schematic structural diagram of an image processing apparatus according to another embodiment of the present invention;
图4是本发明一个实施例提供的电子设备的结构示意图;4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
图5是本发明一个实施例提供的图像处理方法的方法流程图;FIG. 5 is a flowchart of a method for processing an image according to an embodiment of the present invention; FIG.
图6A是本发明另一实施例提供的图像处理方法的方法流程图;FIG. 6 is a flowchart of a method for processing an image according to another embodiment of the present invention; FIG.
图6B是本发明另一实施例提供的图像处理方法涉及的待处理的Bayer图像的示意图;6B is a schematic diagram of a Bayer image to be processed related to an image processing method according to another embodiment of the present invention;
图6C是本发明另一实施例提供的图像处理方法涉及的滑动窗口的示意图; FIG. 6C is a schematic diagram of a sliding window according to an image processing method according to another embodiment of the present invention; FIG.
图6D是本发明另一实施例提供的图像处理方法涉及的几种可能的综合样本的示意图;6D is a schematic diagram of several possible integrated samples involved in an image processing method according to another embodiment of the present invention;
图6E是本发明另一实施例提供的图像处理方法涉及的几种可能的绿色样本的示意图。FIG. 6E is a schematic diagram of several possible green samples involved in an image processing method according to another embodiment of the present invention.
具体实施方式detailed description
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。The embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
请参考图2,其示出了本发明一个实施例提供的图像处理装置的结构方框图,该图像处理装置可以通过软件、硬件或者两者的结合实现成为具有诸如CCD、CMOS传感器这类感光元件的电子设备的部分或者全部。该图像处理装置可以包括:滑动模块210、读取模块220、计算模块230、确定模块240和生成模块250。Please refer to FIG. 2, which is a structural block diagram of an image processing apparatus according to an embodiment of the present invention. The image processing apparatus can be implemented as a photosensitive element such as a CCD or a CMOS sensor by software, hardware, or a combination of both. Part or all of an electronic device. The image processing apparatus may include a slide module 210, a reading module 220, a calculation module 230, a determination module 240, and a generation module 250.
滑动模块210,用于采用M×N的滑动窗口在待处理的拜耳Bayer格式图像中进行滑动,M、N分别表示所述滑动窗口的长和宽,且M、N均大于等于3。The sliding module 210 is configured to slide in the Bayer format image to be processed by using a sliding window of M×N, where M and N respectively represent the length and width of the sliding window, and M and N are both greater than or equal to 3.
读取模块220,用于当所述滑动窗口中的中心像素点为绿色像素点时,读取所述中心像素点的像素值,所述中心像素点是指与所述滑动窗口的中心相重合的像素点。The reading module 220 is configured to read a pixel value of the central pixel point when the central pixel point in the sliding window is a green pixel point, where the central pixel point refers to coincide with a center of the sliding window Pixels.
计算模块230,用于根据所述滑动窗口计算所述中心像素点的像素值的对称值,所述对称值用于反映所述滑动窗口中除所述中心像素点之外的其它绿色像素点的像素值。a calculation module 230, configured to calculate, according to the sliding window, a symmetric value of a pixel value of the central pixel point, where the symmetric value is used to reflect other green pixel points in the sliding window other than the central pixel point Pixel values.
确定模块240,用于根据所述中心像素点的像素值以及所述对称值确定所述中心像素点的均衡输出值。The determining module 240 is configured to determine an equalized output value of the central pixel point according to the pixel value of the central pixel point and the symmetric value.
生成模块250,用于根据所述待处理的Bayer图像中的各个绿色像素点的均衡输出值生成处理后的图像。The generating module 250 is configured to generate a processed image according to the equalized output value of each green pixel point in the Bayer image to be processed.
综上所述,本实施例提供的图像处理装置,通过在滑动窗口的中心像素点为绿色像素点时,读取中心像素点的像素值,并根据滑动窗口计算中心像素点的像素值的对称值,然后根据中心像素点的像素值以及对称值确定中心像素点的均衡输出值,最终根据待处理的Bayer图像中的各个绿色像素点的均衡输出值生成处理后的图像;解决了背景技术中存在的经过Bayer阵列滤波得到的 Bayer格式的图像中因相邻像素点之间的串扰影响,而导致最终获得的彩色图像中存在噪声的问题;通过计算得到的均衡输出值修正待处理的Bayer图像中的绿色像素点的像素值,最大化地减轻了图像中相邻像素点之间的串扰影响,提高了图像的显示效果。In summary, the image processing apparatus provided in this embodiment reads the pixel value of the central pixel point when the central pixel point of the sliding window is a green pixel point, and calculates the symmetry of the pixel value of the central pixel point according to the sliding window. Value, then determining the equalized output value of the central pixel point according to the pixel value of the central pixel point and the symmetric value, and finally generating the processed image according to the equalized output value of each green pixel point in the Bayer image to be processed; Existing by Bayer array filtering In the Bayer format image, due to the crosstalk between adjacent pixel points, there is a problem of noise in the finally obtained color image; the calculated equalized output value corrects the pixel value of the green pixel in the Bayer image to be processed. , which minimizes the influence of crosstalk between adjacent pixels in the image and improves the display effect of the image.
请参考图3,其示出了本发明另一实施例提供的图像处理装置的结构方框图,该图像处理装置可以通过软件、硬件或者两者的结合实现成为具有诸如CCD、CMOS传感器这类感光元件的电子设备的部分或者全部。该图像处理装置可以包括:滑动模块210、读取模块220、计算模块230、确定模块240和生成模块250。Please refer to FIG. 3, which is a structural block diagram of an image processing apparatus according to another embodiment of the present invention. The image processing apparatus can be implemented as a photosensitive element such as a CCD or a CMOS sensor by software, hardware, or a combination of both. Part or all of the electronic device. The image processing apparatus may include a slide module 210, a reading module 220, a calculation module 230, a determination module 240, and a generation module 250.
滑动模块210,用于采用M×N的滑动窗口在待处理的拜耳Bayer格式图像中进行滑动,M、N分别表示所述滑动窗口的长和宽,且M、N均大于等于3。The sliding module 210 is configured to slide in the Bayer format image to be processed by using a sliding window of M×N, where M and N respectively represent the length and width of the sliding window, and M and N are both greater than or equal to 3.
具体来讲,所述滑动模块210,包括:选取单元210a和检测单元210b。Specifically, the sliding module 210 includes: a selecting unit 210a and a detecting unit 210b.
所述选取单元210a,用于在所述待处理的Bayer格式图像中选取一个像素点为起始的中心像素点,并将所述M×N的滑动窗口的中心与所述起始的中心像素点重合。The selecting unit 210a is configured to select a pixel point as a starting central pixel point in the Bayer format image to be processed, and center the M×N sliding window and the starting center pixel Points coincide.
所述检测单元210b,用于检测所述中心像素点是否为绿色像素点。The detecting unit 210b is configured to detect whether the central pixel point is a green pixel point.
可选的,所述滑动模块210,还包括:滑动单元210c。Optionally, the sliding module 210 further includes: a sliding unit 210c.
所述滑动单元210c,用于若所述中心像素点不是绿色像素点,则将所述M×N的滑动窗口进行滑动,并选取下一个中心像素点。The sliding unit 210c is configured to slide the M×N sliding window and select a next central pixel if the central pixel is not a green pixel.
所述检测单元210b,用于再次执行所述检测所述中心像素点是否为绿色像素点的步骤。The detecting unit 210b is configured to perform the step of detecting whether the central pixel point is a green pixel point.
读取模块220,用于当所述滑动窗口中的中心像素点为绿色像素点时,读取所述中心像素点的像素值,所述中心像素点是指与所述滑动窗口的中心相重合的像素点。The reading module 220 is configured to read a pixel value of the central pixel point when the central pixel point in the sliding window is a green pixel point, where the central pixel point refers to coincide with a center of the sliding window Pixels.
所述读取模块220,还用于当所述中心像素点是绿色像素点时,读取所述中心像素点的像素值。The reading module 220 is further configured to read a pixel value of the central pixel point when the central pixel point is a green pixel point.
计算模块230,用于根据所述滑动窗口计算所述中心像素点的像素值的对称值,所述对称值用于反映所述滑动窗口中除所述中心像素点之外的其它绿色像素点的像素值。 a calculation module 230, configured to calculate, according to the sliding window, a symmetric value of a pixel value of the central pixel point, where the symmetric value is used to reflect other green pixel points in the sliding window other than the central pixel point Pixel values.
所述计算模块230,包括:第一获取单元230a、第二获取单元230b和对称计算单元230c。The calculation module 230 includes: a first acquisition unit 230a, a second acquisition unit 230b, and a symmetric calculation unit 230c.
所述第一获取单元230a,用于获取所述滑动窗口内的绿红Gr通道上的所述绿色像素点的第一样本均值G1avg。The first acquiring unit 230a is configured to acquire a first sample mean G1avg of the green pixel point on the green-red Gr channel in the sliding window.
所述第二获取单元230b,用于获取所述滑动窗口内的绿蓝Gb通道上的所述绿色像素点的第二样本均值G2avg。The second acquiring unit 230b is configured to acquire a second sample mean G2avg of the green pixel point on the green-blue Gb channel in the sliding window.
所述对称计算单元230c,用于根据所述第一样本均值G1avg、所述第二样本均值G2avg以及所述中心像素点的像素值G0计算所述中心像素点的像素值G0的对称值G0′:The symmetry calculating unit 230c, 0 is calculated for the central pixel a pixel value G according to the first sample mean G1avg, the second sample and the mean value of the center pixel G2avg point symmetric pixel value G 0 Value G 0 ':
G0′=G1avg+G2avg-G0G 0 '=G1avg+G2avg-G 0 .
确定模块240,用于根据所述中心像素点的像素值以及所述对称值确定所述中心像素点的均衡输出值。The determining module 240 is configured to determine an equalized output value of the central pixel point according to the pixel value of the central pixel point and the symmetric value.
所述确定模块240,包括:第三获取单元240a、第四获取单元240b和输出计算单元240c。The determining module 240 includes: a third obtaining unit 240a, a fourth obtaining unit 240b, and an output calculating unit 240c.
所述第三获取单元240a,用于获取所述中心像素点的像素值G0所对应的第一权重W1The third obtaining unit 240a is configured to acquire a first weight W 1 corresponding to the pixel value G 0 of the central pixel point.
具体来讲,所述第三获取单元240a,包括:第一差值计算子单元240a1、第一均值计算子单元240a2和第一权重确定子单元240a3。Specifically, the third obtaining unit 240a includes: a first difference calculating subunit 240a1, a first mean calculating subunit 240a2, and a first weight determining subunit 240a3.
所述第一差值计算子单元240a1,用于对于所述滑动窗口中的第i个综合样本,计算所述第i个综合样本对应的绝对差值Cgrad[i];其中,所述第i个综合样本包括所述滑动窗口中互为间隔像素点的第一像素点和第二像素点,所述第i个综合样本对应的所述绝对差值Cgrad[i]是指所述第一像素点的像素值与所述第二像素点的像素值的绝对差值,i为正整数。The first difference calculation sub-unit 240a1 is configured to calculate, for the i-th integrated sample in the sliding window, an absolute difference Cgrad[i] corresponding to the i-th comprehensive sample; wherein the ith The integrated sample includes a first pixel point and a second pixel point which are mutually spaced pixels in the sliding window, and the absolute difference Cgrad[i] corresponding to the i-th integrated sample refers to the first pixel The absolute difference between the pixel value of the point and the pixel value of the second pixel, i is a positive integer.
所述第一均值计算子单元240a2,用于计算所述滑动窗口中各个所述综合样本对应的绝对差值的均值CDavg:The first mean calculating sub-unit 240a2 is configured to calculate a mean CDavg of absolute differences corresponding to each of the integrated samples in the sliding window:
Figure PCTCN2015080927-appb-000007
Figure PCTCN2015080927-appb-000007
所述第一权重确定子单元240a3,用于将所述均值CDavg的缩放值确定为所述第一权重W1The first weight determining subunit 240a3 is configured to determine a scaling value of the mean CDavg as the first weight W 1 :
W1=w×CDavg。W 1 = w × CDavg.
其中,n为所述滑动窗口中的综合样本的数量且n为正整数,w为缩放系 数,w>0。Where n is the number of integrated samples in the sliding window and n is a positive integer, and w is a scaling system Number, w>0.
所述第四获取单元240b,用于获取所述对称值G0′所对应的第二权重W2The fourth obtaining unit 240b is configured to acquire a second weight W 2 corresponding to the symmetric value G 0 '.
具体来讲,所述第四获取单元240b,包括:第二差值计算子单元240b1、第二均值计算子单元240b2、均值判断子单元240b3、第一确定子单元240b4和第二确定子单元240b5。Specifically, the fourth obtaining unit 240b includes: a second difference calculating subunit 240b1, a second mean calculating subunit 240b2, an average judging subunit 240b3, a first determining subunit 240b4, and a second determining subunit 240b5. .
所述第二差值计算子单元240b1,用于对于所述滑动窗口中的第j个绿色样本,计算所述第j个绿色样本对应的绝对差值Ggrad[j];其中,所述第j个绿色样本包括所述滑动窗口中互为斜方向相邻像素点、且均为绿色像素点的第一绿色像素点和第二绿色像素点,所述第j个绿色样本对应的绝对差值Ggrad[j]是指所述第一绿色像素点的像素值与所述第二绿色像素点的像素值的绝对差值,j为正整数。The second difference calculation sub-unit 240b1 is configured to calculate an absolute difference Ggrad[j] corresponding to the j-th green sample for the j-th green sample in the sliding window; wherein the j-th The green sample includes a first green pixel point and a second green pixel point which are mutually adjacent pixel points in the sliding window and are both green pixel points, and the absolute difference Ggrad corresponding to the jth green sample [j] refers to the absolute difference between the pixel value of the first green pixel and the pixel value of the second green pixel, and j is a positive integer.
所述第二均值计算子单元240b2,用于计算所述滑动窗口中各个所述绿色样本所对应的绝对差值的均值GDavg:The second mean calculating sub-unit 240b2 is configured to calculate a mean value GDavg of absolute differences corresponding to each of the green samples in the sliding window:
Figure PCTCN2015080927-appb-000008
Figure PCTCN2015080927-appb-000008
所述均值判断子单元240b3,用于判断所述均值GDavg是否大于所述第一权重W1The mean value determining sub-unit 240b3 is configured to determine whether the mean value GDavg is greater than the first weight W 1 .
所述第一确定子单元240b4,用于当所述均值GDavg大于所述第一权重W1时,将所述第一权重W1确定为所述第二权重W2The first determining sub-unit 240b4 is configured to determine the first weight W 1 as the second weight W 2 when the mean GDavg is greater than the first weight W 1 .
所述第二确定子单元240b5,用于当所述均值GDavg小于所述第一权重W1时,将所述均值GDavg确定为所述第二权重W2The second determining subunit 240b5 is configured to determine the mean GDavg as the second weight W 2 when the mean GDavg is less than the first weight W 1 .
其中,m为所述滑动窗口中的绿色样本的数量且m为正整数。Where m is the number of green samples in the sliding window and m is a positive integer.
所述输出计算单元240c,用于通过加权平均算法,并根据所述第一权重W1、所述第二权重W2、所述中心像素点的像素值G0以及所述对称值G0′计算所述中心像素点的均衡输出值GIC:The output calculation unit 240c is configured to pass the weighted average algorithm, and according to the first weight W 1 , the second weight W 2 , the pixel value G 0 of the central pixel point, and the symmetric value G 0 ' Calculating the equalized output value GIC of the central pixel:
Figure PCTCN2015080927-appb-000009
Figure PCTCN2015080927-appb-000009
生成模块250,用于根据所述待处理的Bayer图像中的各个绿色像素点的均衡输出值生成处理后的图像。The generating module 250 is configured to generate a processed image according to the equalized output value of each green pixel point in the Bayer image to be processed.
所述生成模块250,包括:替换单元250a和生成单元250b。The generating module 250 includes: a replacing unit 250a and a generating unit 250b.
所述替换单元250a,用于对于所述待处理的Bayer格式图像中的每一个绿色像素点,将所述绿色像素点的均衡输出值替换所述绿色像素点的像素值。 The replacing unit 250a is configured to replace the equalized output value of the green pixel point with the pixel value of the green pixel point for each green pixel point in the Bayer format image to be processed.
所述生成单元250b,用于根据完成替换后的所述各个绿色像素点生成所述处理后的图像。The generating unit 250b is configured to generate the processed image according to each of the green pixel points after the replacement is completed.
可选的,所述装置,还包括:差值计算模块232和差值检测模块234。Optionally, the device further includes: a difference calculation module 232 and a difference detection module 234.
差值计算模块232,用于计算所述第一样本均值G1avg和所述第二样本均值G2avg的绝对差值Gdiff:Gdiff=|G1avg-G2avg|。The difference calculation module 232 is configured to calculate an absolute difference Gdiff of the first sample mean G1avg and the second sample mean G2avg: Gdiff=|G1avg-G2avg|.
差值检测模块234,用于检测所述绝对差值Gdiff是否小于预定门限值THR,所述预定门限值THR>0。The difference detecting module 234 is configured to detect whether the absolute difference Gdiff is less than a predetermined threshold value THR, and the predetermined threshold value THR>0.
所述确定模块240,还用于当所述绝对差值Gdiff小于所述预定门限值THR时,根据所述中心像素点的像素值以及所述对称值确定所述中心像素点的均衡输出值。The determining module 240 is further configured to determine, according to the pixel value of the central pixel point and the symmetric value, an equalized output value of the central pixel point when the absolute difference Gdiff is less than the predetermined threshold value THR .
综上所述,本实施例提供的图像处理装置,通过在滑动窗口的中心像素点为绿色像素点时,读取中心像素点的像素值,并根据滑动窗口计算中心像素点的像素值的对称值,然后根据中心像素点的像素值以及对称值确定中心像素点的均衡输出值,最终根据待处理的Bayer图像中的各个绿色像素点的均衡输出值生成处理后的图像;解决了背景技术中存在的经过Bayer阵列滤波得到的Bayer格式的图像中因相邻像素点之间的串扰影响,而导致最终获得的彩色图像中存在噪声的问题;通过计算得到的均衡输出值修正待处理的Bayer图像中的绿色像素点的像素值,最大化地减轻了图像中相邻像素点之间的串扰影响,提高了图像的显示效果。In summary, the image processing apparatus provided in this embodiment reads the pixel value of the central pixel point when the central pixel point of the sliding window is a green pixel point, and calculates the symmetry of the pixel value of the central pixel point according to the sliding window. Value, then determining the equalized output value of the central pixel point according to the pixel value of the central pixel point and the symmetric value, and finally generating the processed image according to the equalized output value of each green pixel point in the Bayer image to be processed; The existing Bayer format image obtained by Bayer array filtering has the problem of noise in the finally obtained color image due to the crosstalk between adjacent pixel points; the Bayer image to be processed is corrected by the calculated equalized output value The pixel value of the green pixel in the image minimizes the crosstalk effect between adjacent pixels in the image, and improves the display effect of the image.
本实施例提供的图像处理装置,还通过自适应的权重调节中心像素点的像素值以及对称值,最终得到中心像素点的均衡输出值GIC,可以最大化地消除由相邻像素点之间的串扰而导致的绿色通道不平衡所带来的影响,避免格状噪声的产生,同时又保留了图像中正常的细节。The image processing apparatus provided in this embodiment further adjusts the pixel value of the central pixel point and the symmetry value by adaptive weights, and finally obtains the equalized output value GIC of the central pixel point, which can be maximally eliminated by the adjacent pixel points. The effect of green channel imbalance caused by crosstalk avoids the generation of lattice noise while preserving the normal details in the image.
需要说明的是:上述实施例提供的图像处理装置在处理图像时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的图像处理装置与图像处理方法的方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。 It should be noted that, when processing an image, the image processing apparatus provided by the above embodiment is only illustrated by the division of each functional module. In actual applications, the function allocation may be completed by different functional modules as needed. The internal structure of the device is divided into different functional modules to perform all or part of the functions described above. In addition, the image processing device provided by the above embodiment is the same as the method embodiment of the image processing method, and the specific implementation process is described in detail in the method embodiment, and details are not described herein again.
请参考图4,其示出了本发明一个实施例提供的电子设备的结构示意图,该电子设备包括:处理器420,以及与处理器420相连的存储器440。存储器440中存储有一个或者一个以上的程序,处理器420可以根据存储器440中存储的一个或者一个以上的程序实现相应的操作。具体的:Please refer to FIG. 4 , which is a schematic structural diagram of an electronic device according to an embodiment of the present invention. The electronic device includes a processor 420 and a memory 440 connected to the processor 420 . One or more programs are stored in the memory 440, and the processor 420 can implement corresponding operations according to one or more programs stored in the memory 440. specific:
所述处理器420,用于采用M×N的滑动窗口在待处理的拜耳Bayer格式图像中进行滑动,M、N分别表示所述滑动窗口的长和宽,且M、N均大于等于3;The processor 420 is configured to perform sliding in a Bayer format image to be processed by using a sliding window of M×N, where M and N respectively represent the length and width of the sliding window, and M and N are greater than or equal to 3;
所述处理器420,还用于当所述滑动窗口中的中心像素点为绿色像素点时,读取所述中心像素点的像素值,所述中心像素点是指与所述滑动窗口的中心相重合的像素点;The processor 420 is further configured to read a pixel value of the central pixel point when a central pixel point in the sliding window is a green pixel point, where the central pixel point refers to a center of the sliding window Coincident pixels;
所述处理器420,还用于根据所述滑动窗口计算所述中心像素点的像素值的对称值,所述对称值用于反映所述滑动窗口中除所述中心像素点之外的其它绿色像素点的像素值;The processor 420 is further configured to calculate, according to the sliding window, a symmetric value of a pixel value of the central pixel, where the symmetric value is used to reflect other greens in the sliding window except the central pixel The pixel value of the pixel;
所述处理器420,还用于根据所述中心像素点的像素值以及所述对称值确定所述中心像素点的均衡输出值;The processor 420 is further configured to determine an equalized output value of the central pixel point according to a pixel value of the central pixel point and the symmetric value;
所述处理器420,还用于根据所述待处理的Bayer图像中的各个绿色像素点的均衡输出值生成处理后的图像。The processor 420 is further configured to generate a processed image according to the equalized output value of each green pixel in the Bayer image to be processed.
综上所述,本实施例提供的电子设备,通过在滑动窗口的中心像素点为绿色像素点时,读取中心像素点的像素值,并根据滑动窗口计算中心像素点的像素值的对称值,然后根据中心像素点的像素值以及对称值确定中心像素点的均衡输出值,最终根据待处理的Bayer图像中的各个绿色像素点的均衡输出值生成处理后的图像;解决了背景技术中存在的经过Bayer阵列滤波得到的Bayer格式的图像中因相邻像素点之间的串扰影响,而导致最终获得的彩色图像中存在噪声的问题;通过计算得到的均衡输出值修正待处理的Bayer图像中的绿色像素点的像素值,最大化地减轻了图像中相邻像素点之间的串扰影响,提高了图像的显示效果。In summary, the electronic device provided in this embodiment reads the pixel value of the central pixel point when the central pixel point of the sliding window is a green pixel point, and calculates the symmetric value of the pixel value of the central pixel point according to the sliding window. And then determining the equalized output value of the central pixel point according to the pixel value of the central pixel point and the symmetric value, and finally generating the processed image according to the equalized output value of each green pixel point in the Bayer image to be processed; solving the problem in the background art The Bayer format image obtained by Bayer array filtering has the problem of noise in the finally obtained color image due to the crosstalk between adjacent pixel points; the calculated equalized output value is corrected in the Bayer image to be processed. The pixel value of the green pixel minimizes the crosstalk effect between adjacent pixels in the image and improves the display effect of the image.
在图4所示实施例的第一种可能的实现方式中,In a first possible implementation of the embodiment shown in FIG. 4,
所述处理器420,还用于在所述待处理的Bayer格式图像中选取一个像素点为起始的中心像素点,并将所述M×N的滑动窗口的中心与所述起始的中心像素点重合;The processor 420 is further configured to select a pixel point as a starting central pixel point in the Bayer format image to be processed, and center the M×N sliding window and the center of the start Pixel points coincide;
所述处理器420,还用于检测所述中心像素点是否为绿色像素点; The processor 420 is further configured to detect whether the central pixel point is a green pixel point;
所述处理器420,还用于当所述中心像素点是绿色像素点时,读取所述中心像素点的像素值。The processor 420 is further configured to read a pixel value of the central pixel point when the central pixel point is a green pixel point.
在图4所示实施例的第二种可能的实现方式中,In a second possible implementation manner of the embodiment shown in FIG. 4,
所述处理器420,还用于若所述中心像素点不是绿色像素点,则将所述M×N的滑动窗口进行滑动,并选取下一个中心像素点;The processor 420 is further configured to: if the central pixel point is not a green pixel point, slide the M×N sliding window, and select a next central pixel point;
所述处理器420,还用于再次执行所述检测所述中心像素点是否为绿色像素点的步骤。The processor 420 is further configured to perform the step of detecting whether the central pixel point is a green pixel point.
在图4所示实施例的第三种可能的实现方式中,In a third possible implementation of the embodiment shown in FIG. 4,
所述处理器420,还用于获取所述滑动窗口内的绿红Gr通道上的所述绿色像素点的第一样本均值G1avg;The processor 420 is further configured to acquire a first sample mean G1avg of the green pixel point on the green-red Gr channel in the sliding window;
所述处理器420,还用于获取所述滑动窗口内的绿蓝Gb通道上的所述绿色像素点的第二样本均值G2avg;The processor 420 is further configured to acquire a second sample mean G2avg of the green pixel point on the green-blue Gb channel in the sliding window;
所述处理器420,还用于根据所述第一样本均值G1avg、所述第二样本均值G2avg以及所述中心像素点的像素值G0计算所述中心像素点的像素值G0的对称值G0′:Calculating a pixel value G 0 of the center point of the pixel processor 420, further according to the first sample mean G1avg, the second sample and the mean value of the center pixel G2avg pixel value G of a symmetrical 0 Value G 0 ':
G0′=G1avg+G2avg-G0G 0 '=G1avg+G2avg-G 0 .
在图4所示实施例的第四种可能的实现方式中,In a fourth possible implementation of the embodiment shown in FIG. 4,
所述处理器420,还用于计算所述第一样本均值G1avg和所述第二样本均值G2avg的绝对差值Gdiff:Gdiff=|G1avg-G2avg|;The processor 420 is further configured to calculate an absolute difference Gdiff of the first sample mean G1avg and the second sample mean G2avg: Gdiff=|G1avg-G2avg|;
所述处理器420,还用于检测所述绝对差值Gdiff是否小于预定门限值THR,所述预定门限值THR>0;The processor 420 is further configured to detect whether the absolute difference Gdiff is less than a predetermined threshold value THR, the predetermined threshold value THR>0;
所述处理器420,还用于当所述绝对差值Gdiff小于所述预定门限值THR时,根据所述中心像素点的像素值以及所述对称值确定所述中心像素点的均衡输出值。The processor 420 is further configured to determine, according to the pixel value of the central pixel point and the symmetric value, an equalized output value of the central pixel point when the absolute difference Gdiff is less than the predetermined threshold value THR .
在图4所示实施例的第五种可能的实现方式中,In a fifth possible implementation manner of the embodiment shown in FIG. 4,
所述处理器420,还用于获取所述中心像素点的像素值G0所对应的第一权重W1The processor 420 is further configured to acquire a first weight W 1 corresponding to a pixel value G 0 of the central pixel point;
所述处理器420,还用于获取所述对称值G0′所对应的第二权重W2The processor 420 is further configured to acquire a second weight W 2 corresponding to the symmetric value G 0 ';
所述处理器420,还用于通过加权平均算法,并根据所述第一权重W1、所述第二权重W2、所述中心像素点的像素值G0以及所述对称值G0′计算所述中心像素点的均衡输出值GIC: The processor 420 is further configured to pass a weighted averaging algorithm, and according to the first weight W 1 , the second weight W 2 , the pixel value G 0 of the central pixel point, and the symmetric value G 0 ' Calculating the equalized output value GIC of the central pixel:
Figure PCTCN2015080927-appb-000010
Figure PCTCN2015080927-appb-000010
在图4所示实施例的第六种可能的实现方式中,In a sixth possible implementation of the embodiment shown in FIG. 4,
所述处理器420,还用于对于所述滑动窗口中的第i个综合样本,计算所述第i个综合样本对应的绝对差值Cgrad[i];其中,所述第i个综合样本包括所述滑动窗口中互为间隔像素点的第一像素点和第二像素点,所述第i个综合样本对应的所述绝对差值Cgrad[i]是指所述第一像素点的像素值与所述第二像素点的像素值的绝对差值,i为正整数;The processor 420 is further configured to calculate an absolute difference Cgrad[i] corresponding to the i-th integrated sample for the i-th integrated sample in the sliding window; wherein the i-th integrated sample includes The first pixel point and the second pixel point of the sliding pixel are mutually spaced pixels, and the absolute difference Cgrad[i] corresponding to the i-th integrated sample refers to the pixel value of the first pixel An absolute difference from a pixel value of the second pixel, i being a positive integer;
所述处理器420,还用于计算所述滑动窗口中各个所述综合样本对应的绝对差值的均值CDavg:The processor 420 is further configured to calculate a mean CDavg of absolute differences corresponding to each of the integrated samples in the sliding window:
Figure PCTCN2015080927-appb-000011
Figure PCTCN2015080927-appb-000011
所述处理器420,还用于将所述均值CDavg的缩放值确定为所述第一权重W1The processor 420 is further configured to determine the scaling value of the mean CDavg as the first weight W 1 :
W1=w×CDavg;W 1 = w × CDavg;
其中,n为所述滑动窗口中的综合样本的数量且n为正整数,w为缩放系数,w>0。Where n is the number of integrated samples in the sliding window and n is a positive integer, w is a scaling factor, w>0.
在图4所示实施例的第七种可能的实现方式中,In a seventh possible implementation of the embodiment shown in FIG. 4,
所述处理器420,还用于对于所述滑动窗口中的第j个绿色样本,计算所述第j个绿色样本对应的绝对差值Ggrad[j];其中,所述第j个绿色样本包括所述滑动窗口中互为斜方向相邻像素点、且均为绿色像素点的第一绿色像素点和第二绿色像素点,所述第j个绿色样本对应的绝对差值Ggrad[j]是指所述第一绿色像素点的像素值与所述第二绿色像素点的像素值的绝对差值,j为正整数;The processor 420 is further configured to calculate, according to the jth green sample in the sliding window, an absolute difference Ggrad[j] corresponding to the jth green sample; wherein the jth green sample includes The first green pixel point and the second green pixel point in the sliding window which are adjacent to each other in the oblique direction and are both green pixel points, and the absolute difference Ggrad[j] corresponding to the jth green sample is Refers to the absolute difference between the pixel value of the first green pixel and the pixel value of the second green pixel, where j is a positive integer;
所述处理器420,还用于计算所述滑动窗口中各个所述绿色样本所对应的绝对差值的均值GDavg:The processor 420 is further configured to calculate a mean value GDavg of absolute differences corresponding to each of the green samples in the sliding window:
Figure PCTCN2015080927-appb-000012
Figure PCTCN2015080927-appb-000012
所述处理器420,还用于判断所述均值GDavg是否大于所述第一权重W1The processor 420 is further configured to determine whether the average value GDavg is greater than the first weight W 1 ;
所述处理器420,还用于当所述均值GDavg大于所述第一权重W1时,将所述第一权重W1确定为所述第二权重W2The processor 420 is further configured to determine the first weight W 1 as the second weight W 2 when the mean GDavg is greater than the first weight W 1 ;
所述处理器420,还用于当所述均值GDavg小于所述第一权重W1时,将所述均值GDavg确定为所述第二权重W2The processor 420 is further configured to determine the mean GDavg as the second weight W 2 when the mean GDavg is less than the first weight W 1 ;
其中,m为所述滑动窗口中的绿色样本的数量且m为正整数。Where m is the number of green samples in the sliding window and m is a positive integer.
在图4所示实施例的第八种可能的实现方式中,In an eighth possible implementation manner of the embodiment shown in FIG. 4,
所述处理器420,还用于对于所述待处理的Bayer格式图像中的每一个绿色像素点,将所述绿色像素点的均衡输出值替换所述绿色像素点的像素值;The processor 420 is further configured to: replace, for each green pixel point in the Bayer format image to be processed, a balanced output value of the green pixel point with a pixel value of the green pixel point;
所述处理器420,还用于根据完成替换后的所述各个绿色像素点生成所述处理后的图像。The processor 420 is further configured to generate the processed image according to each of the green pixel points after the replacement is completed.
另外,本实施例提供的电子设备,还通过自适应的权重调节中心像素点的像素值以及对称值,最终得到中心像素点的均衡输出值GIC,可以最大化地消除由相邻像素点之间的串扰而导致的绿色通道不平衡所带来的影响,避免格状噪声的产生,同时又保留了图像中正常的细节。In addition, the electronic device provided by the embodiment further adjusts the pixel value and the symmetry value of the central pixel point by adaptive weights, and finally obtains the balanced output value GIC of the central pixel point, which can be maximally eliminated by the adjacent pixel points. The effect of the green channel imbalance caused by crosstalk avoids the generation of lattice noise while preserving the normal details in the image.
上述为本发明装置实施例,可以用于执行本发明方法实施例。对于本发明装置实施例中未披露的细节,请参照下述本发明方法实施例。The above is an embodiment of the device of the present invention, which can be used to implement the method embodiment of the present invention. For details not disclosed in the embodiment of the apparatus of the present invention, please refer to the following method embodiments of the present invention.
请参考图5,其示出了本发明一个实施例提供的图像处理方法的方法流程图,本实施例以该图像处理方法应用于具有诸如CCD、CMOS传感器这类感光元件的电子设备中来举例说明。该图像处理方法可以包括如下几个步骤:Please refer to FIG. 5, which is a flowchart of a method for processing an image according to an embodiment of the present invention. The embodiment is applied to an electronic device having a photosensitive element such as a CCD or a CMOS sensor. Description. The image processing method can include the following steps:
步骤502,采用M×N的滑动窗口在待处理的Bayer格式图像中进行滑动,M、N分别表示滑动窗口的长和宽,且M、N均大于等于3。Step 502: Sliding in the Bayer format image to be processed by using a sliding window of M×N, where M and N respectively represent the length and width of the sliding window, and M and N are both greater than or equal to 3.
步骤504,当滑动窗口中的中心像素点为绿色像素点时,读取中心像素点的像素值,该中心像素点是指与滑动窗口的中心相重合的像素点。Step 504: When the central pixel in the sliding window is a green pixel, the pixel value of the central pixel is read, and the central pixel refers to a pixel that coincides with the center of the sliding window.
步骤506,根据滑动窗口计算中心像素点的像素值的对称值,该对称值用于反映滑动窗口中除中心像素点之外的其它绿色像素点的像素值。Step 506: Calculate a symmetrical value of a pixel value of the central pixel point according to the sliding window, where the symmetrical value is used to reflect a pixel value of the green pixel point other than the central pixel point in the sliding window.
步骤508,根据中心像素点的像素值以及对称值确定中心像素点的均衡输出值。Step 508: Determine an equalized output value of the central pixel point according to the pixel value of the central pixel point and the symmetric value.
步骤510,根据待处理的Bayer图像中的各个绿色像素点的均衡输出值生成处理后的图像。Step 510: Generate a processed image according to the equalized output values of the respective green pixel points in the Bayer image to be processed.
综上所述,本实施例提供的图像处理方法,通过在滑动窗口的中心像素点为绿色像素点时,读取中心像素点的像素值,并根据滑动窗口计算中心像素点的像素值的对称值,然后根据中心像素点的像素值以及对称值确定中心像素点的均衡输出值,最终根据待处理的Bayer图像中的各个绿色像素点的均衡输出 值生成处理后的图像;解决了背景技术中存在的经过Bayer阵列滤波得到的Bayer格式的图像中因相邻像素点之间的串扰影响,而导致最终获得的彩色图像中存在噪声的问题;通过计算得到的均衡输出值修正待处理的Bayer图像中的绿色像素点的像素值,最大化地减轻了图像中相邻像素点之间的串扰影响,提高了图像的显示效果。In summary, the image processing method provided in this embodiment reads the pixel value of the central pixel point when the central pixel point of the sliding window is a green pixel point, and calculates the symmetry of the pixel value of the central pixel point according to the sliding window. Value, then determine the equalized output value of the central pixel point according to the pixel value of the central pixel point and the symmetry value, and finally according to the balanced output of each green pixel point in the Bayer image to be processed The image is processed to generate a processed image; the problem of crosstalk between adjacent pixel points in the Bayer format image obtained by Bayer array filtering in the prior art is solved, and the noise in the finally obtained color image is solved; The calculated equalized output value corrects the pixel value of the green pixel in the Bayer image to be processed, which minimizes the crosstalk effect between adjacent pixels in the image and improves the display effect of the image.
请参考图6A,其示出了本发明另一实施例提供的图像处理方法的方法流程图,本实施例以该图像处理方法应用于具有诸如CCD、CMOS传感器这类感光元件的电子设备中来举例说明。该图像处理方法可以包括如下几个步骤:Please refer to FIG. 6A, which is a flowchart of a method for processing an image according to another embodiment of the present invention. The image processing method is applied to an electronic device having photosensitive elements such as CCD and CMOS sensors. for example. The image processing method can include the following steps:
步骤601,采用M×N的滑动窗口在待处理的Bayer格式图像中进行滑动。Step 601: Sliding in the Bayer format image to be processed by using an M×N sliding window.
在待处理的Bayer格式图像中,包括具有交互绿色像素点G和蓝色像素点B的Gb通道,以及具有交互绿色像素点G和红色像素点R的Gr通道,且Gb通道和Gr通道相间排列。In the Bayer format image to be processed, a Gb channel having an interactive green pixel point G and a blue pixel point B, and a Gr channel having an interactive green pixel point G and a red pixel point R, and the Gb channel and the Gr channel are arranged in phase .
滑动窗口的大小为M×N,M、N分别表示滑动窗口的长和宽,且M、N均大于等于3。滑动窗口的大小可以根据对处理精度的要求、设备的计算处理能力以及图像大小等因素进行确定。The size of the sliding window is M×N, and M and N respectively represent the length and width of the sliding window, and M and N are both greater than or equal to 3. The size of the sliding window can be determined according to factors such as processing accuracy, device processing power, and image size.
如图6B所示,在本实施例中,假设待处理的Bayer格式图像61的大小为a×b,且滑动窗口62的大小为5×5。As shown in FIG. 6B, in the present embodiment, it is assumed that the size of the Bayer format image 61 to be processed is a × b, and the size of the sliding window 62 is 5 × 5.
具体来讲,本步骤可以包括如下几个子步骤:Specifically, this step may include the following sub-steps:
第一,在待处理的Bayer格式图像中选取一个像素点为起始的中心像素点,并将M×N的滑动窗口的中心与该起始的中心像素点重合。First, a pixel point is selected as the starting central pixel point in the Bayer format image to be processed, and the center of the M×N sliding window coincides with the starting center pixel point.
中心像素点是指与滑动窗口的中心相重合的像素点。The center pixel refers to a pixel point that coincides with the center of the sliding window.
第二,检测中心像素点是否为绿色像素点。Second, it is detected whether the center pixel is a green pixel.
在本实施例提供的图像处理方法中,为了消除相邻像素点之间的串扰而导致的绿色通道不平衡所带来的格状噪声,只需要对待处理的Bayer格式图像中的绿色像素点的像素值进行修正。在滑动窗口中,被处理的像素点即为与滑动窗口的中心相重合的中心像素点,因此需要检测该中心像素点是否为绿色像素点。In the image processing method provided in this embodiment, in order to eliminate the lattice noise caused by the green channel imbalance caused by the crosstalk between adjacent pixel points, only the green pixel points in the Bayer format image to be processed are needed. The pixel value is corrected. In the sliding window, the processed pixel is the central pixel that coincides with the center of the sliding window, so it is necessary to detect whether the central pixel is a green pixel.
第三,若中心像素点是绿色像素点,则执行下述步骤602。Third, if the central pixel is a green pixel, the following step 602 is performed.
另外,若中心像素点不是绿色像素点,则将M×N的滑动窗口进行滑动,并选取下一个中心像素点;再次执行上述第二个子步骤。滑动窗口可以依据预 先设定的滑动规则进行滑动,比如按照图像的行和列,由左至右、由上而下、逐像素地进行滑动。In addition, if the central pixel point is not a green pixel point, the M×N sliding window is slid and the next central pixel point is selected; the second sub-step described above is performed again. Sliding window can be based on pre- The sliding rule is set to slide, for example, according to the row and column of the image, from left to right, top to bottom, and pixel by pixel.
步骤602,当滑动窗口中的中心像素点为绿色像素点时,读取中心像素点的像素值。Step 602: When the central pixel in the sliding window is a green pixel, the pixel value of the central pixel is read.
在本实施例中,假设5×5的滑动窗口62中各个像素点的像素值如图6C所示。比如,第1行第1列的绿色像素点G像素值为D00,第1行第2列的蓝色像素点B的像素值为D01,第2行第1列的红色像素点R的像素值为D10,以此类推。因此,读取中心像素点的像素值为D22In the present embodiment, it is assumed that the pixel values of the respective pixel points in the 5 × 5 sliding window 62 are as shown in Fig. 6C. For example, the green pixel point G pixel value of the first row and the first column is D 00 , the pixel value of the blue pixel point B of the first row and the second column is D 01 , and the red pixel point R of the second row and the first column is The pixel value is D 10 , and so on. Therefore, the pixel value of the reading center pixel is D 22 .
步骤603,根据滑动窗口计算中心像素点的像素值的对称值。 Step 603, calculating a symmetrical value of the pixel value of the central pixel point according to the sliding window.
对称值用于反映滑动窗口中除中心像素点之外的其它绿色像素点的像素值。在一种可能的算法中,本步骤可以包括如下几个子步骤:The symmetry value is used to reflect the pixel value of the green pixel other than the center pixel in the sliding window. In one possible algorithm, this step may include the following sub-steps:
第一,获取滑动窗口内的Gr通道上的绿色像素点的第一样本均值G1avg。First, the first sample mean G1avg of the green pixel on the Gr channel in the sliding window is obtained.
其中,第一样本均值G1avg等于滑动窗口内的Gr通道上的绿色像素点的像素值之和除以滑动窗口内的Gr通道上的绿色像素点的数量。Wherein, the first sample mean G1avg is equal to the sum of the pixel values of the green pixel points on the Gr channel in the sliding window divided by the number of green pixel points on the Gr channel in the sliding window.
结合参考图6C,在本实施例示出的5×5的滑动窗口62中,
Figure PCTCN2015080927-appb-000013
Referring to FIG. 6C, in the 5×5 sliding window 62 shown in this embodiment,
Figure PCTCN2015080927-appb-000013
第二,获取滑动窗口内的Gb通道上的绿色像素点的第二样本均值G2avg。Second, the second sample mean G2avg of the green pixel on the Gb channel in the sliding window is obtained.
其中,第二样本均值G2avg等于滑动窗口内的Gb通道上的绿色像素点的像素值之和除以滑动窗口内的Gb通道上的绿色像素点的数量。Wherein, the second sample mean G2avg is equal to the sum of the pixel values of the green pixel points on the Gb channel in the sliding window divided by the number of green pixel points on the Gb channel in the sliding window.
结合参考图6C,在本实施例示出的5×5的滑动窗口62中,
Figure PCTCN2015080927-appb-000014
Referring to FIG. 6C, in the 5×5 sliding window 62 shown in this embodiment,
Figure PCTCN2015080927-appb-000014
第三,根据第一样本均值G1avg、第二样本均值G2avg以及中心像素点的像素值G0计算中心像素点的像素值G0的对称值G0′:Third, the symmetric value G 0 ' of the pixel value G 0 of the central pixel point is calculated according to the first sample mean G1avg, the second sample mean G2avg, and the pixel value G 0 of the central pixel point:
G0′=G1avg+G2avg-G0G 0 '=G1avg+G2avg-G 0 .
结合参考图6C,在本实施例示出的5×5的滑动窗口62中,
Figure PCTCN2015080927-appb-000015
Referring to FIG. 6C, in the 5×5 sliding window 62 shown in this embodiment,
Figure PCTCN2015080927-appb-000015
步骤604,计算第一样本均值G1avg和第二样本均值G2avg的绝对差值Gdiff。 Step 604, calculating an absolute difference Gdiff of the first sample mean G1avg and the second sample mean G2avg.
第一样本均值G1avg和第二样本均值G2avg的绝对差值Gdiff=|G1avg-G2avg|。 The absolute difference Gdiff=|G1avg-G2avg| of the first sample mean G1avg and the second sample mean G2avg.
步骤605,检测绝对差值Gdiff是否小于预定门限值THR。Step 605: Detect whether the absolute difference Gdiff is less than a predetermined threshold value THR.
其中,预定门限值THR>0。Gdiff作为条件判断量,用于区分Gr通道上的绿色像素点的像素值与Gb通道上的绿色像素点的像素值之间的差异是由相邻像素点之间的串扰而导致的绿色通道不平衡所导致的,还是由图像中本来的细节所导致的。Wherein, the predetermined threshold value THR>0. Gdiff is used as a conditional judgment. The difference between the pixel value of the green pixel on the Gr channel and the pixel value of the green pixel on the Gb channel is the green channel caused by the crosstalk between adjacent pixels. The balance is caused by the original details in the image.
当Gdiff>THR时,认为Gr通道上的绿色像素点的像素值与Gb通道上的绿色像素点的像素值之间的差异是由图像中本来的细节所导致的,则不需要修正中心像素点的像素值,将M×N的滑动窗口进行滑动,选取下一个中心像素点,并再次执行上述检测中心像素点是否为绿色像素点的步骤。When Gdiff>THR, it is considered that the difference between the pixel value of the green pixel on the Gr channel and the pixel value of the green pixel on the Gb channel is caused by the original details in the image, and it is not necessary to correct the center pixel. The pixel value is swiped by the M×N sliding window, the next central pixel is selected, and the above-described step of detecting whether the central pixel is a green pixel is performed again.
当Gdiff<THR时,认为Gr通道上的绿色像素点的像素值与Gb通道上的绿色像素点的像素值之间的差异是由相邻像素点之间的串扰而导致的绿色通道不平衡所导致的,则需要修正中心像素点的像素值,以消除绿色通道不平衡所带来的影响,执行下述步骤606。When Gdiff<THR, the difference between the pixel value of the green pixel on the Gr channel and the pixel value of the green pixel on the Gb channel is considered to be the green channel imbalance caused by the crosstalk between adjacent pixels. As a result, the pixel value of the central pixel needs to be corrected to eliminate the influence of the green channel imbalance, and the following step 606 is performed.
步骤606,若绝对差值Gdiff小于预定门限值THR,则根据中心像素点的像素值以及对称值确定中心像素点的均衡输出值。 Step 606, if the absolute difference Gdiff is less than the predetermined threshold value THR, the equalized output value of the central pixel point is determined according to the pixel value of the central pixel point and the symmetric value.
具体来讲,本步骤可以包括如下几个子步骤:Specifically, this step may include the following sub-steps:
第一,获取中心像素点的像素值G0所对应的第一权重W1First, the first weight W 1 corresponding to the pixel value G 0 of the central pixel is obtained.
1、对于滑动窗口中的第i个综合样本,计算该第i个综合样本对应的绝对差值Cgrad[i]。1. Calculate the absolute difference Cgrad[i] corresponding to the i-th composite sample for the i-th composite sample in the sliding window.
其中,第i个综合样本包括滑动窗口中互为间隔像素点的第一像素点和第二像素点,该第i个综合样本对应的绝对差值Cgrad[i]是指第一像素点的像素值与第二像素点的像素值的绝对差值,i为正整数。The i-th composite sample includes a first pixel point and a second pixel point of mutually spaced pixel points in the sliding window, and the absolute difference Cgrad[i] corresponding to the i-th integrated sample refers to the pixel of the first pixel point. The absolute difference between the value and the pixel value of the second pixel, i is a positive integer.
对于每一个综合样本,其包含的两个像素点为互为间隔像素点的两个绿色像素点、或者互为间隔像素点的两个红色像素点、或者互为间隔像素点的两个蓝色像素点。其中,上述两个像素点可以在横向互为间隔像素点,也可以在纵向互为间隔像素点,还可以在斜方向上互为间隔像素点。For each composite sample, the two pixels included are two green pixels that are mutually spaced pixels, or two red pixels that are spaced apart from each other, or two blues that are spaced apart from each other. pixel. The two pixel points may be spaced apart from each other in the horizontal direction, or may be spaced apart from each other in the longitudinal direction, or may be spaced apart from each other in the oblique direction.
如图6D所示,其示出了几种可能的综合样本的情况。As shown in Figure 6D, it shows the case of several possible integrated samples.
2、计算滑动窗口中各个综合样本对应的绝对差值的均值CDavg:2. Calculate the mean CDavg of the absolute difference corresponding to each comprehensive sample in the sliding window:
Figure PCTCN2015080927-appb-000016
Figure PCTCN2015080927-appb-000016
其中,n为滑动窗口中的综合样本的数量且n为正整数。在图6C所示的5 ×5的滑动窗口62中,综合样本的数量n=48,包括横向15个、纵向15个以及斜方向上18个。Where n is the number of integrated samples in the sliding window and n is a positive integer. 5 shown in Figure 6C In the sliding window 62 of ×5, the number of integrated samples is n=48, including 15 in the horizontal direction, 15 in the longitudinal direction, and 18 in the oblique direction.
3、将均值CDavg的缩放值确定为第一权重W13. Determine the scaling value of the mean CDavg as the first weight W 1 :
W1=w×CDavg。W 1 = w × CDavg.
其中,w为缩放系数,w>0。Where w is the scaling factor and w>0.
第二,获取对称值G0′所对应的第二权重W2Second, the second weight W 2 corresponding to the symmetric value G 0 ' is obtained.
1、对于滑动窗口中的第j个绿色样本,计算该第j个绿色样本对应的绝对差值Ggrad[j]。1. Calculate the absolute difference Ggrad[j] corresponding to the jth green sample for the jth green sample in the sliding window.
其中,第j个绿色样本包括滑动窗口中互为斜方向相邻像素点、且均为绿色像素点的第一绿色像素点和第二绿色像素点,该第j个绿色样本对应的绝对差值Ggrad[j]是指第一绿色像素点的像素值与第二绿色像素点的像素值的绝对差值,j为正整数。The jth green sample includes a first green pixel point and a second green pixel point which are mutually adjacent pixel points in the sliding window and are green pixel points, and the absolute difference corresponding to the jth green sample Ggrad[j] refers to the absolute difference between the pixel value of the first green pixel and the pixel value of the second green pixel, and j is a positive integer.
如图6E所示,其示出了几种可能的绿色样本的情况。As shown in Figure 6E, it shows the case of several possible green samples.
2、计算滑动窗口中各个绿色样本所对应的绝对差值的均值GDavg:2. Calculate the mean GDavg of the absolute difference corresponding to each green sample in the sliding window:
Figure PCTCN2015080927-appb-000017
Figure PCTCN2015080927-appb-000017
其中,m为滑动窗口中的绿色样本的数量且m为正整数。在图6C所示的5×5的滑动窗口62中,绿色样本的数量m=16。Where m is the number of green samples in the sliding window and m is a positive integer. In the 5 x 5 sliding window 62 shown in Fig. 6C, the number of green samples is m = 16.
3、判断均值GDavg是否大于第一权重W13. Determine whether the mean GDavg is greater than the first weight W 1 .
4、若均值GDavg大于第一权重W1,则将第一权重W1确定为第二权重W24. If the mean GDavg is greater than the first weight W 1 , the first weight W 1 is determined as the second weight W 2 .
当GDavg>W1时,
Figure PCTCN2015080927-appb-000018
When GDavg>W 1 ,
Figure PCTCN2015080927-appb-000018
5、若均值GDavg小于第一权重W1,则将均值GDavg确定为第二权重W25. If the mean GDavg is less than the first weight W 1 , the mean GDavg is determined as the second weight W 2 .
当GDavg<W1时,
Figure PCTCN2015080927-appb-000019
When GDavg<W 1 ,
Figure PCTCN2015080927-appb-000019
第三,通过加权平均算法,并根据第一权重W1、第二权重W2、中心像素点的像素值G0以及对称值G0′计算中心像素点的均衡输出值GIC:Third, the equalized output value GIC of the central pixel point is calculated by the weighted averaging algorithm and according to the first weight W 1 , the second weight W 2 , the pixel value G 0 of the central pixel point, and the symmetric value G 0 ':
Figure PCTCN2015080927-appb-000020
Figure PCTCN2015080927-appb-000020
在本实施例提供的图像处理方法中,通过自适应的权重调节中心像素点的像素值以及对称值,最终得到中心像素点的均衡输出值GIC,可以最大化地消 除由相邻像素点之间的串扰而导致的绿色通道不平衡所带来的影响,避免格状噪声的产生,同时又保留了图像中正常的细节。In the image processing method provided by the embodiment, the pixel value and the symmetry value of the central pixel point are adjusted by the adaptive weight, and finally the balanced output value GIC of the central pixel point is obtained, which can be maximally eliminated. In addition to the effects of green channel imbalance caused by crosstalk between adjacent pixel points, the generation of lattice noise is avoided while retaining the normal details in the image.
步骤607,根据待处理的Bayer图像中的各个绿色像素点的均衡输出值生成处理后的图像。Step 607: Generate a processed image according to the equalized output values of the respective green pixel points in the Bayer image to be processed.
具体来讲,本步骤可以包括如下几个子步骤:Specifically, this step may include the following sub-steps:
第一,对于待处理的Bayer格式图像中的每一个绿色像素点,将该绿色像素点的均衡输出值替换该绿色像素点的像素值。First, for each green pixel in the Bayer format image to be processed, the equalized output value of the green pixel is replaced by the pixel value of the green pixel.
第二,根据完成替换后的各个绿色像素点生成处理后的图像。Second, the processed image is generated according to each green pixel after the replacement is completed.
在确定出Gr通道上的绿色像素点的像素值与Gb通道上的绿色像素点的像素值之间的差异是由绿色通道不平衡所导致的情况下,采用计算出的均衡输出值替换绿色像素点的像素值,以实现对该绿色像素点的修正,使得后续通过插值算法进行插值计算后,最终获得显示清晰、细节保留良好的彩色图像。In the case where it is determined that the difference between the pixel value of the green pixel on the Gr channel and the pixel value of the green pixel on the Gb channel is caused by the green channel imbalance, the calculated balanced output value is substituted for the green pixel. The pixel value of the point is used to implement the correction of the green pixel point, so that after the interpolation calculation by the interpolation algorithm, a color image with clear display and good detail preservation is finally obtained.
综上所述,本实施例提供的图像处理方法,通过在滑动窗口的中心像素点为绿色像素点时,读取中心像素点的像素值,并根据滑动窗口计算中心像素点的像素值的对称值,然后根据中心像素点的像素值以及对称值确定中心像素点的均衡输出值,最终根据待处理的Bayer图像中的各个绿色像素点的均衡输出值生成处理后的图像;解决了背景技术中存在的经过Bayer阵列滤波得到的Bayer格式的图像中因相邻像素点之间的串扰影响,而导致最终获得的彩色图像中存在噪声的问题;通过计算得到的均衡输出值修正待处理的Bayer图像中的绿色像素点的像素值,最大化地减轻了图像中相邻像素点之间的串扰影响,提高了图像的显示效果。In summary, the image processing method provided in this embodiment reads the pixel value of the central pixel point when the central pixel point of the sliding window is a green pixel point, and calculates the symmetry of the pixel value of the central pixel point according to the sliding window. Value, then determining the equalized output value of the central pixel point according to the pixel value of the central pixel point and the symmetric value, and finally generating the processed image according to the equalized output value of each green pixel point in the Bayer image to be processed; The existing Bayer format image obtained by Bayer array filtering has the problem of noise in the finally obtained color image due to the crosstalk between adjacent pixel points; the Bayer image to be processed is corrected by the calculated equalized output value The pixel value of the green pixel in the image minimizes the crosstalk effect between adjacent pixels in the image, and improves the display effect of the image.
本实施例提供的图像处理方法,还通过自适应的权重调节中心像素点的像素值以及对称值,最终得到中心像素点的均衡输出值GIC,可以最大化地消除由相邻像素点之间的串扰而导致的绿色通道不平衡所带来的影响,避免格状噪声的产生,同时又保留了图像中正常的细节。The image processing method provided by the embodiment further adjusts the pixel value and the symmetry value of the central pixel point by adaptive weights, and finally obtains the balanced output value GIC of the central pixel point, which can be maximally eliminated by the adjacent pixel points. The effect of green channel imbalance caused by crosstalk avoids the generation of lattice noise while preserving the normal details in the image.
应当理解的是,在本文中使用的,除非上下文清楚地支持例外情况,单数形式“一个”(“a”、“an”、“the”)旨在也包括复数形式。还应当理解的是,在本文中使用的“和/或”是指包括一个或者一个以上相关联地列出的项目的任意和所有可能组合。 It is to be understood that the singular forms "a", "the", "the" It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the embodiments of the present invention are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。A person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium. The storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。 The above are only the preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalents, improvements, etc., which are within the spirit and scope of the present invention, should be included in the protection of the present invention. Within the scope.

Claims (18)

  1. 一种图像处理装置,其特征在于,所述装置包括:An image processing apparatus, characterized in that the apparatus comprises:
    滑动模块,用于采用M×N的滑动窗口在待处理的拜耳Bayer格式图像中进行滑动,M、N分别表示所述滑动窗口的长和宽,且M、N均大于等于3;a sliding module for sliding in a Bayer format image to be processed by using a sliding window of M×N, where M and N respectively represent the length and width of the sliding window, and M and N are both greater than or equal to 3;
    读取模块,用于当所述滑动窗口中的中心像素点为绿色像素点时,读取所述中心像素点的像素值,所述中心像素点是指与所述滑动窗口的中心相重合的像素点;a reading module, configured to read a pixel value of the central pixel point when a central pixel point in the sliding window is a green pixel point, where the central pixel point refers to a center of the sliding window pixel;
    计算模块,用于根据所述滑动窗口计算所述中心像素点的像素值的对称值,所述对称值用于反映所述滑动窗口中除所述中心像素点之外的其它绿色像素点的像素值;a calculation module, configured to calculate, according to the sliding window, a symmetric value of a pixel value of the central pixel, where the symmetric value is used to reflect pixels of other green pixels except the central pixel in the sliding window value;
    确定模块,用于根据所述中心像素点的像素值以及所述对称值确定所述中心像素点的均衡输出值;a determining module, configured to determine an equalized output value of the central pixel point according to a pixel value of the central pixel point and the symmetric value;
    生成模块,用于根据所述待处理的Bayer图像中的各个绿色像素点的均衡输出值生成处理后的图像。And a generating module, configured to generate a processed image according to the equalized output value of each green pixel point in the Bayer image to be processed.
  2. 根据权利要求1所述的装置,其特征在于,所述滑动模块,包括:选取单元和检测单元;The apparatus according to claim 1, wherein the sliding module comprises: a selecting unit and a detecting unit;
    所述选取单元,用于在所述待处理的Bayer格式图像中选取一个像素点为起始的中心像素点,并将所述M×N的滑动窗口的中心与所述起始的中心像素点重合;The selecting unit is configured to select a pixel point as a starting central pixel point in the Bayer format image to be processed, and center the M×N sliding window and the starting center pixel point coincide;
    所述检测单元,用于检测所述中心像素点是否为绿色像素点;The detecting unit is configured to detect whether the central pixel point is a green pixel point;
    所述读取模块,还用于当所述中心像素点是绿色像素点时,读取所述中心像素点的像素值。The reading module is further configured to read a pixel value of the central pixel point when the central pixel point is a green pixel point.
  3. 根据权利要求2所述的装置,其特征在于,所述滑动模块,还包括:滑动单元;The device according to claim 2, wherein the sliding module further comprises: a sliding unit;
    所述滑动单元,用于若所述中心像素点不是绿色像素点,则将所述M×N的滑动窗口进行滑动,并选取下一个中心像素点;The sliding unit is configured to: if the central pixel point is not a green pixel point, slide the M×N sliding window, and select a next central pixel point;
    所述检测单元,用于再次执行所述检测所述中心像素点是否为绿色像素点的步骤。 The detecting unit is configured to perform the step of detecting whether the central pixel point is a green pixel point.
  4. 根据权利要求1所述的装置,其特征在于,所述计算模块,包括:第一获取单元、第二获取单元和对称计算单元;The device according to claim 1, wherein the calculation module comprises: a first acquisition unit, a second acquisition unit, and a symmetric calculation unit;
    所述第一获取单元,用于获取所述滑动窗口内的绿红Gr通道上的所述绿色像素点的第一样本均值G1avg;The first acquiring unit is configured to acquire a first sample mean G1avg of the green pixel point on the green-red Gr channel in the sliding window;
    所述第二获取单元,用于获取所述滑动窗口内的绿蓝Gb通道上的所述绿色像素点的第二样本均值G2avg;The second acquiring unit is configured to acquire a second sample mean value G2avg of the green pixel point on the green-blue Gb channel in the sliding window;
    所述对称计算单元,用于根据所述第一样本均值G1avg、所述第二样本均值G2avg以及所述中心像素点的像素值G0计算所述中心像素点的像素值G0的对称值G0′:The symmetry calculation unit for calculating the center 0 point of the pixel values of G pixels according to the first sample mean G1avg, the second sample and the mean value G2avg central pixel a pixel value G 0 of the asymmetry value G 0 ':
    G0′=G1avg+G2avg-G0G 0 '=G1avg+G2avg-G 0 .
  5. 根据权利要求4所述的装置,其特征在于,所述装置,还包括:The device according to claim 4, wherein the device further comprises:
    差值计算模块,用于计算所述第一样本均值G1avg和所述第二样本均值G2avg的绝对差值Gdiff:Gdiff=|G1avg-G2avg|;a difference calculation module, configured to calculate an absolute difference Gdiff of the first sample mean G1avg and the second sample mean G2avg: Gdiff=|G1avg-G2avg|;
    差值检测模块,用于检测所述绝对差值Gdiff是否小于预定门限值THR,所述预定门限值THR>0;a difference detecting module, configured to detect whether the absolute difference Gdiff is less than a predetermined threshold value THR, the predetermined threshold value THR>0;
    所述确定模块,还用于当所述绝对差值Gdiff小于所述预定门限值THR时,根据所述中心像素点的像素值以及所述对称值确定所述中心像素点的均衡输出值。The determining module is further configured to determine, according to the pixel value of the central pixel point and the symmetric value, an equalized output value of the central pixel point when the absolute difference Gdiff is less than the predetermined threshold value THR.
  6. 根据权利要求1至5任一所述的装置,其特征在于,所述确定模块,包括:第三获取单元、第四获取单元和输出计算单元;The device according to any one of claims 1 to 5, wherein the determining module comprises: a third obtaining unit, a fourth obtaining unit, and an output calculating unit;
    所述第三获取单元,用于获取所述中心像素点的像素值G0所对应的第一权重W1The third acquiring unit is configured to acquire a first weight W 1 corresponding to the pixel value G 0 of the central pixel point;
    所述第四获取单元,用于获取所述对称值G0′所对应的第二权重W2The fourth obtaining unit is configured to acquire a second weight W 2 corresponding to the symmetric value G 0 ';
    所述输出计算单元,用于通过加权平均算法,并根据所述第一权重W1、所述第二权重W2、所述中心像素点的像素值G0以及所述对称值G0′计算所述中心像素点的均衡输出值GIC:The output calculation unit is configured to calculate, according to the weighted average algorithm, according to the first weight W 1 , the second weight W 2 , the pixel value G 0 of the central pixel point, and the symmetric value G 0 ′ The balanced output value GIC of the central pixel point:
    Figure PCTCN2015080927-appb-100001
    Figure PCTCN2015080927-appb-100001
  7. 根据权利要求6所述的装置,其特征在于,所述第三获取单元,包括:第一差值计算子单元、第一均值计算子单元和第一权重确定子单元;The apparatus according to claim 6, wherein the third obtaining unit comprises: a first difference calculating subunit, a first mean calculating subunit, and a first weight determining subunit;
    所述第一差值计算子单元,用于对于所述滑动窗口中的第i个综合样本,计算所述第i个综合样本对应的绝对差值Cgrad[i];其中,所述第i个综合样本包括所述滑动窗口中互为间隔像素点的第一像素点和第二像素点,所述第i个综合样本对应的所述绝对差值Cgrad[i]是指所述第一像素点的像素值与所述第二像素点的像素值的绝对差值,i为正整数;The first difference calculation sub-unit is configured to calculate, for the i-th integrated sample in the sliding window, an absolute difference Cgrad[i] corresponding to the i-th integrated sample; wherein the ith The integrated sample includes a first pixel point and a second pixel point of mutually spaced pixels in the sliding window, and the absolute difference Cgrad[i] corresponding to the i-th integrated sample refers to the first pixel point The absolute difference between the pixel value and the pixel value of the second pixel, i is a positive integer;
    所述第一均值计算子单元,用于计算所述滑动窗口中各个所述综合样本对应的绝对差值的均值CDavg:The first mean calculating subunit is configured to calculate a mean CDavg of absolute differences corresponding to each of the integrated samples in the sliding window:
    Figure PCTCN2015080927-appb-100002
    Figure PCTCN2015080927-appb-100002
    所述第一权重确定子单元,用于将所述均值CDavg的缩放值确定为所述第一权重W1The first weight determining subunit is configured to determine a scaling value of the mean CDavg as the first weight W 1 :
    W1=w×CDavg;W 1 = w × CDavg;
    其中,n为所述滑动窗口中的综合样本的数量且n为正整数,w为缩放系数,w>0。Where n is the number of integrated samples in the sliding window and n is a positive integer, w is a scaling factor, w>0.
  8. 根据权利要求7所述的装置,其特征在于,所述第四获取单元,包括:第二差值计算子单元、第二均值计算子单元、均值判断子单元、第一确定子单元和第二确定子单元;The apparatus according to claim 7, wherein the fourth obtaining unit comprises: a second difference calculating subunit, a second mean calculating subunit, an average judging subunit, a first determining subunit, and a second Determining a subunit;
    所述第二差值计算子单元,用于对于所述滑动窗口中的第j个绿色样本,计算所述第j个绿色样本对应的绝对差值Ggrad[j];其中,所述第j个绿色样本包括所述滑动窗口中互为斜方向相邻像素点、且均为绿色像素点的第一绿色像素点和第二绿色像素点,所述第j个绿色样本对应的绝对差值Ggrad[j]是指所述第一绿色像素点的像素值与所述第二绿色像素点的像素值的绝对差值,j为正整数;The second difference calculation subunit is configured to calculate an absolute difference Ggrad[j] corresponding to the jth green sample for the jth green sample in the sliding window; wherein the jth The green sample includes a first green pixel point and a second green pixel point which are mutually adjacent pixel points in the sliding window and are both green pixel points, and the absolute difference Ggrad corresponding to the jth green sample is j] is the absolute difference between the pixel value of the first green pixel and the pixel value of the second green pixel, and j is a positive integer;
    所述第二均值计算子单元,用于计算所述滑动窗口中各个所述绿色样本所对应的绝对差值的均值GDavg:The second mean calculating subunit is configured to calculate a mean value GDavg of absolute differences corresponding to each of the green samples in the sliding window:
    Figure PCTCN2015080927-appb-100003
    Figure PCTCN2015080927-appb-100003
    所述均值判断子单元,用于判断所述均值GDavg是否大于所述第一权重W1The mean value determining subunit is configured to determine whether the mean GDavg is greater than the first weight W 1 ;
    所述第一确定子单元,用于当所述均值GDavg大于所述第一权重W1时,将所 述第一权重W1确定为所述第二权重W2The first determining sub-unit, configured to, when the mean value is greater than the first GDavg weight is 1 W, the said first weight W is determined as a second weight W 2;
    所述第二确定子单元,用于当所述均值GDavg小于所述第一权重W1时,将所述均值GDavg确定为所述第二权重W2The second determining sub-unit, configured to, when the average is less than the first GDavg weight is 1 W, the average GDavg determined as the second weight W 2;
    其中,m为所述滑动窗口中的绿色样本的数量且m为正整数。Where m is the number of green samples in the sliding window and m is a positive integer.
  9. 根据权利要求1至5任一所述的装置,其特征在于,所述生成模块,包括:替换单元和生成单元;The device according to any one of claims 1 to 5, wherein the generating module comprises: a replacing unit and a generating unit;
    所述替换单元,用于对于所述待处理的Bayer格式图像中的每一个绿色像素点,将所述绿色像素点的均衡输出值替换所述绿色像素点的像素值;The replacing unit is configured to replace, according to each green pixel point in the Bayer format image to be processed, a balanced output value of the green pixel point by a pixel value of the green pixel point;
    所述生成单元,用于根据完成替换后的所述各个绿色像素点生成所述处理后的图像。The generating unit is configured to generate the processed image according to each of the green pixels after the replacement is completed.
  10. 一种图像处理方法,其特征在于,所述方法包括:An image processing method, the method comprising:
    采用M×N的滑动窗口在待处理的拜耳Bayer格式图像中进行滑动,M、N分别表示所述滑动窗口的长和宽,且M、N均大于等于3;Using a sliding window of M×N to slide in the Bayer format image to be processed, M and N respectively represent the length and width of the sliding window, and M and N are both greater than or equal to 3;
    当所述滑动窗口中的中心像素点为绿色像素点时,读取所述中心像素点的像素值,所述中心像素点是指与所述滑动窗口的中心相重合的像素点;Reading a pixel value of the central pixel point when a central pixel point in the sliding window is a green pixel point, where the central pixel point refers to a pixel point that coincides with a center of the sliding window;
    根据所述滑动窗口计算所述中心像素点的像素值的对称值,所述对称值用于反映所述滑动窗口中除所述中心像素点之外的其它绿色像素点的像素值;Calculating a symmetric value of a pixel value of the central pixel point according to the sliding window, where the symmetric value is used to reflect a pixel value of other green pixel points in the sliding window except the central pixel point;
    根据所述中心像素点的像素值以及所述对称值确定所述中心像素点的均衡输出值;Determining an equalized output value of the central pixel point according to a pixel value of the central pixel point and the symmetric value;
    根据所述待处理的Bayer图像中的各个绿色像素点的均衡输出值生成处理后的图像。The processed image is generated according to the equalized output values of the respective green pixel points in the Bayer image to be processed.
  11. 根据权利要求10所述的方法,其特征在于,所述采用M×N的滑动窗口在待处理的拜耳Bayer格式图像中进行滑动,包括:The method according to claim 10, wherein the sliding using the M×N sliding window in the Bayer format image to be processed comprises:
    在所述待处理的Bayer格式图像中选取一个像素点为起始的中心像素点,并将所述M×N的滑动窗口的中心与所述起始的中心像素点重合;Selecting, in the Bayer format image to be processed, a pixel point as a starting central pixel point, and aligning a center of the M×N sliding window with the starting center pixel point;
    检测所述中心像素点是否为绿色像素点;Detecting whether the central pixel point is a green pixel point;
    若所述中心像素点是绿色像素点,则执行所述读取所述中心像素点的像素值的步骤。 If the central pixel point is a green pixel point, the step of reading the pixel value of the central pixel point is performed.
  12. 根据权利要求11所述的方法,其特征在于,所述检测所述中心像素点是否为绿色像素点之后,还包括:The method according to claim 11, wherein after detecting whether the central pixel point is a green pixel point, the method further comprises:
    若所述中心像素点不是绿色像素点,则将所述M×N的滑动窗口进行滑动,并选取下一个中心像素点;If the central pixel point is not a green pixel point, sliding the M×N sliding window and selecting a next central pixel point;
    再次执行所述检测所述中心像素点是否为绿色像素点的步骤。The step of detecting whether the central pixel point is a green pixel point is performed again.
  13. 根据权利要求10所述的方法,其特征在于,所述根据所述滑动窗口计算所述中心像素点的像素值的对称值,包括:The method according to claim 10, wherein the calculating a symmetrical value of a pixel value of the central pixel point according to the sliding window comprises:
    获取所述滑动窗口内的绿红Gr通道上的所述绿色像素点的第一样本均值G1avg;Obtaining a first sample mean G1avg of the green pixel point on the green-red Gr channel in the sliding window;
    获取所述滑动窗口内的绿蓝Gb通道上的所述绿色像素点的第二样本均值G2avg;Obtaining a second sample mean value G2avg of the green pixel point on the green-blue Gb channel in the sliding window;
    根据所述第一样本均值G1avg、所述第二样本均值G2avg以及所述中心像素点的像素值G0计算所述中心像素点的像素值G0的对称值G0′:The mean of the first sample G1avg, the second sample and the mean value of the center pixel G2avg pixel value G 0 of the calculated pixel values of the center pixel value G 0 of symmetry G 0 ':
    G0′=G1avg+G2avg-G0G 0 '=G1avg+G2avg-G 0 .
  14. 根据权利要求13所述的方法,其特征在于,所述根据所述中心像素点的像素值以及所述对称值确定所述中心像素点的均衡输出值之前,还包括:The method according to claim 13, wherein the determining, before determining the equalized output value of the central pixel point according to the pixel value of the central pixel point and the symmetric value, further comprising:
    计算所述第一样本均值G1avg和所述第二样本均值G2avg的绝对差值Gdiff:Gdiff=|G1avg-G2avg|;Calculating an absolute difference Gdiff of the first sample mean G1avg and the second sample mean G2avg: Gdiff=|G1avg-G2avg|;
    检测所述绝对差值Gdiff是否小于预定门限值THR,所述预定门限值THR>0;Detecting whether the absolute difference Gdiff is less than a predetermined threshold value THR, the predetermined threshold value THR>0;
    若所述绝对差值Gdiff小于所述预定门限值THR,则执行所述根据所述中心像素点的像素值以及所述对称值确定所述中心像素点的均衡输出值的步骤。If the absolute difference Gdiff is smaller than the predetermined threshold value THR, the step of determining the equalized output value of the central pixel point according to the pixel value of the central pixel point and the symmetric value is performed.
  15. 根据权利要求10至14任一所述的方法,其特征在于,所述根据所述中心像素点的像素值以及所述对称值确定所述中心像素点的均衡输出值,包括:The method according to any one of claims 10 to 14, wherein the determining the equalized output value of the central pixel point according to the pixel value of the central pixel point and the symmetric value comprises:
    获取所述中心像素点的像素值G0所对应的第一权重W1Obtaining a first weight W 1 corresponding to the pixel value G 0 of the central pixel point;
    获取所述对称值G0′所对应的第二权重W2Obtaining a second weight W 2 corresponding to the symmetric value G 0 ';
    通过加权平均算法,并根据所述第一权重W1、所述第二权重W2、所述中心 像素点的像素值G0以及所述对称值G0′计算所述中心像素点的均衡输出值GIC:Calculating the equalized output of the central pixel point by a weighted averaging algorithm and according to the first weight W 1 , the second weight W 2 , the pixel value G 0 of the central pixel point, and the symmetric value G 0 ' Value GIC:
    Figure PCTCN2015080927-appb-100004
    Figure PCTCN2015080927-appb-100004
  16. 根据权利要求15所述的方法,其特征在于,所述获取所述中心像素点的像素值G0所对应的第一权重W1,包括:The method according to claim 15, wherein the acquiring the first weight W 1 corresponding to the pixel value G 0 of the central pixel point comprises:
    对于所述滑动窗口中的第i个综合样本,计算所述第i个综合样本对应的绝对差值Cgrad[i];其中,所述第i个综合样本包括所述滑动窗口中互为间隔像素点的第一像素点和第二像素点,所述第i个综合样本对应的所述绝对差值Cgrad[i]是指所述第一像素点的像素值与所述第二像素点的像素值的绝对差值,i为正整数;Calculating an absolute difference Cgrad[i] corresponding to the i-th integrated sample for the i-th integrated sample in the sliding window; wherein the i-th integrated sample includes mutually spaced pixels in the sliding window a first pixel point and a second pixel point of the point, the absolute difference value Cgrad[i] corresponding to the ith integrated sample refers to a pixel value of the first pixel point and a pixel of the second pixel point The absolute difference of values, i is a positive integer;
    计算所述滑动窗口中各个所述综合样本对应的绝对差值的均值CDavg:Calculating a mean CDavg of absolute differences corresponding to each of the integrated samples in the sliding window:
    Figure PCTCN2015080927-appb-100005
    Figure PCTCN2015080927-appb-100005
    将所述均值CDavg的缩放值确定为所述第一权重W1Determining the scaled value of the mean CDavg as the first weight W 1 :
    W1=w×CDavg;W 1 = w × CDavg;
    其中,n为所述滑动窗口中的综合样本的数量且n为正整数,w为缩放系数,w>0。Where n is the number of integrated samples in the sliding window and n is a positive integer, w is a scaling factor, w>0.
  17. 根据权利要求16所述的方法,其特征在于,所述获取所述对称值G0′所对应的第二权重W2,包括:The method according to claim 16, wherein the acquiring the second weight W 2 corresponding to the symmetric value G 0 ' comprises:
    对于所述滑动窗口中的第j个绿色样本,计算所述第j个绿色样本对应的绝对差值Ggrad[j];其中,所述第j个绿色样本包括所述滑动窗口中互为斜方向相邻像素点、且均为绿色像素点的第一绿色像素点和第二绿色像素点,所述第j个绿色样本对应的绝对差值Ggrad[j]是指所述第一绿色像素点的像素值与所述第二绿色像素点的像素值的绝对差值,j为正整数;Calculating an absolute difference Ggrad[j] corresponding to the jth green sample for the jth green sample in the sliding window; wherein the jth green sample comprises an oblique direction in the sliding window a first green pixel point and a second green pixel point of the adjacent pixel points and both of the green pixel points, and the absolute difference Ggrad[j] corresponding to the jth green sample refers to the first green pixel point An absolute difference between a pixel value and a pixel value of the second green pixel, j is a positive integer;
    计算所述滑动窗口中各个所述绿色样本所对应的绝对差值的均值GDavg:Calculating a mean value GDavg of absolute differences corresponding to each of the green samples in the sliding window:
    Figure PCTCN2015080927-appb-100006
    Figure PCTCN2015080927-appb-100006
    判断所述均值GDavg是否大于所述第一权重W1Determining whether the mean GDavg is greater than the first weight W 1 ;
    若所述均值GDavg大于所述第一权重W1,则将所述第一权重W1确定为所述第二权重W2If the mean GDavg is greater than the first weight W 1 , determining the first weight W 1 as the second weight W 2 ;
    若所述均值GDavg小于所述第一权重W1,则将所述均值GDavg确定为所述第二权重W2If the mean GDavg is smaller than the first weight W 1 , the mean GDavg is determined as the second weight W 2 ;
    其中,m为所述滑动窗口中的绿色样本的数量且m为正整数。Where m is the number of green samples in the sliding window and m is a positive integer.
  18. 根据权利要求10至14任一所述的方法,其特征在于,所述根据所述待处理的Bayer图像中的各个绿色像素点的均衡输出值生成处理后的图像,包括:The method according to any one of claims 10 to 14, wherein the generating the processed image according to the equalized output value of each green pixel in the Bayer image to be processed comprises:
    对于所述待处理的Bayer格式图像中的每一个绿色像素点,将所述绿色像素点的均衡输出值替换所述绿色像素点的像素值;For each green pixel in the Bayer format image to be processed, replacing the equalized output value of the green pixel point with the pixel value of the green pixel point;
    根据完成替换后的所述各个绿色像素点生成所述处理后的图像。 The processed image is generated according to the respective green pixels after the replacement is completed.
PCT/CN2015/080927 2014-08-07 2015-06-05 Image processing device and method WO2016019751A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410385447.5A CN104202583B (en) 2014-08-07 2014-08-07 Image processing device and method
CN201410385447.5 2014-08-07

Publications (1)

Publication Number Publication Date
WO2016019751A1 true WO2016019751A1 (en) 2016-02-11

Family

ID=52087803

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/080927 WO2016019751A1 (en) 2014-08-07 2015-06-05 Image processing device and method

Country Status (2)

Country Link
CN (1) CN104202583B (en)
WO (1) WO2016019751A1 (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104202583B (en) * 2014-08-07 2017-01-11 华为技术有限公司 Image processing device and method
EP3167429B1 (en) 2015-05-15 2019-12-25 SZ DJI Technology Co., Ltd. System and method for supporting image denoising based on neighborhood block dimensionality reduction
CN110619612B (en) * 2015-12-25 2022-03-22 展讯通信(上海)有限公司 Method and device for eliminating image noise
CN107392856B (en) * 2016-05-16 2020-10-27 合肥君正科技有限公司 Image filtering method and device
CN107818545B (en) * 2016-09-12 2020-07-14 北京大学 Image processing method and device
CN109816597B (en) * 2017-11-22 2020-11-20 展讯通信(上海)有限公司 Method and device for removing GrGb noise of image
CN108234970B (en) * 2018-01-04 2021-05-21 努比亚技术有限公司 Image processing method, terminal and computer readable storage medium
CN110248169B (en) * 2018-03-07 2021-11-19 舜宇光学(浙江)研究院有限公司 Image correction method and image correction system for green channel imbalance of Bayer domain
CN109556347B (en) * 2018-11-29 2020-12-04 台州新凯科技服务有限公司 Article filling alarm system
CN112689141B (en) * 2020-12-22 2022-07-01 上海富瀚微电子股份有限公司 Method and device for balancing image green channel

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060146151A1 (en) * 2004-12-30 2006-07-06 Magnachip Semiconductor, Ltd. Apparatus for generating focus data in image sensor and method for generating the same
CN1893618A (en) * 2005-04-27 2007-01-10 三星电子株式会社 Method and apparatus for processing bayer-pattern color digital image signal
CN101257636A (en) * 2008-03-01 2008-09-03 炬力集成电路设计有限公司 Method and device of image processing for improving Bayer image quality
CN101917629A (en) * 2010-08-10 2010-12-15 浙江大学 Green component and color difference space-based Bayer format color interpolation method
CN104202583A (en) * 2014-08-07 2014-12-10 华为技术有限公司 Image processing device and method
US8938120B2 (en) * 2011-09-23 2015-01-20 SK Hynix Inc. Image sensing device and image data processing method using the same

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002052082A1 (en) * 2000-12-27 2002-07-04 Textilma Ag Device for monitored delivery of warp threads to a weaving loom or a warp knitting loom
US8306348B2 (en) * 2007-04-24 2012-11-06 DigitalOptics Corporation Europe Limited Techniques for adjusting the effect of applying kernels to signals to achieve desired effect on signal
CN101272503B (en) * 2008-04-30 2011-04-06 北京中星微电子有限公司 Gridding noise elimination method and device for remaining image definition
CN102938843B (en) * 2012-11-22 2014-12-03 华为技术有限公司 Image processing method, image processing device and imaging device
CN103313066B (en) * 2013-05-08 2015-07-08 华为技术有限公司 Interpolation method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060146151A1 (en) * 2004-12-30 2006-07-06 Magnachip Semiconductor, Ltd. Apparatus for generating focus data in image sensor and method for generating the same
CN1893618A (en) * 2005-04-27 2007-01-10 三星电子株式会社 Method and apparatus for processing bayer-pattern color digital image signal
CN101257636A (en) * 2008-03-01 2008-09-03 炬力集成电路设计有限公司 Method and device of image processing for improving Bayer image quality
CN101917629A (en) * 2010-08-10 2010-12-15 浙江大学 Green component and color difference space-based Bayer format color interpolation method
US8938120B2 (en) * 2011-09-23 2015-01-20 SK Hynix Inc. Image sensing device and image data processing method using the same
CN104202583A (en) * 2014-08-07 2014-12-10 华为技术有限公司 Image processing device and method

Also Published As

Publication number Publication date
CN104202583A (en) 2014-12-10
CN104202583B (en) 2017-01-11

Similar Documents

Publication Publication Date Title
WO2016019751A1 (en) Image processing device and method
TWI414179B (en) Shooting parameter adjustment method for face detection and image capturing device for face detection
US8175378B2 (en) Method and system for noise management for spatial processing in digital image/video capture systems
JP6903816B2 (en) Image processing method and equipment
JP5904213B2 (en) Image processing apparatus, image processing method, and program
RU2527198C2 (en) Image processing device and image processing device control method
US20140078347A1 (en) Systems and Methods for Reducing Noise in Video Streams
JP2014241584A (en) Image processing method and image processing system
US8786729B2 (en) White balance method and apparatus thereof
US20100039539A1 (en) Image processing apparatus and image processing method
US9124832B2 (en) Dynamic, local edge preserving defect pixel correction for image sensors
US20150086132A1 (en) Image Processing Apparatus and Image Processing Method
US20170053379A1 (en) Demosaicing methods and apparatuses using the same
US20140211048A1 (en) Dynamic, local edge preserving defect pixel correction for image sensors with spatially arranged exposures
TW201503692A (en) Motion adaptive imaging control method, motion adaptive imaging system and computer program product
KR100986203B1 (en) Imaging apparatus and defective pixel correction method used therefor
KR101056978B1 (en) Defective Pixel Processing Devices and Defective Pixel Processing Methods
JP6690092B2 (en) Heat source detection device, heat source detection method, and heat source detection program
JP2016503624A (en) Image processing method and apparatus, and imaging device
CN108337450A (en) Image processing apparatus, image processing method and recording medium
EP3745348B1 (en) Image processing for removing fog or haze in images
CN110728705A (en) Image processing method, image processing device, storage medium and electronic equipment
US10109037B1 (en) Systems and methods for Bayer image scaling based on edge detection
JP5706705B2 (en) Image processing apparatus, control method therefor, and imaging apparatus
JP4462017B2 (en) Defect detection and correction apparatus, imaging apparatus, and defect detection and correction method

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

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

Country of ref document: EP

Kind code of ref document: A1