WO2021004066A1 - 图像处理方法及装置 - Google Patents

图像处理方法及装置 Download PDF

Info

Publication number
WO2021004066A1
WO2021004066A1 PCT/CN2020/075915 CN2020075915W WO2021004066A1 WO 2021004066 A1 WO2021004066 A1 WO 2021004066A1 CN 2020075915 W CN2020075915 W CN 2020075915W WO 2021004066 A1 WO2021004066 A1 WO 2021004066A1
Authority
WO
WIPO (PCT)
Prior art keywords
channel value
pixel
value
channel
format
Prior art date
Application number
PCT/CN2020/075915
Other languages
English (en)
French (fr)
Inventor
詹进
朱媛媛
潘昱
丁美玉
刘学彦
Original Assignee
上海富瀚微电子股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 上海富瀚微电子股份有限公司 filed Critical 上海富瀚微电子股份有限公司
Publication of WO2021004066A1 publication Critical patent/WO2021004066A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/84Camera processing pipelines; Components thereof for processing colour signals
    • H04N23/88Camera processing pipelines; Components thereof for processing colour signals for colour balance, e.g. white-balance circuits or colour temperature control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/268Signal distribution or switching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals

Definitions

  • the present invention relates to the field of image processing, in particular to an image processing method and device.
  • an RCCB format image sensor equipped with an infrared filter is used to process image signals to filter out infrared light to avoid infrared color cast.
  • the image sensor in the RCCB format will output the image data in the RCCB format, and in order to facilitate subsequent storage and transmission of the image data, the image data in the RCCB format is usually converted into the image data in the YUV format with a smaller amount of data.
  • the method of converting image data in RCCB format to image data in YUV format is: first calculate the corresponding G channel value according to the R channel value, B channel value and C channel value in the image data in RCCB format, thereby The image data in the RGB format is obtained, and then the image data in the RGB format is converted into the image data in the YUV format according to the corresponding formula.
  • the purpose of the present invention is to provide an image processing method and device, which not only proposes a set of overall RCCB processing flow, but also solves the problem that related art image processing methods are likely to cause color cast in highlight areas.
  • an image processing method which includes:
  • the brightness attenuation factor corresponding to each pixel point is calculated, where 0 ⁇ luminance attenuation factor ⁇ 1;
  • G channel value mm ⁇ C channel value + brightness attenuation factor ⁇ ( nn ⁇ R channel value+kk ⁇ B channel value), mm is a positive number, nn and kk are both negative;
  • the Y channel value, U channel value and V channel value of each pixel are calculated, and the image data in YUV format is output.
  • the method before performing interpolation processing on the image data in the RCCB format, the method further includes: performing black level correction processing and white balance processing on the image data in the RCCB format, respectively.
  • the method of calculating the brightness attenuation factor of each pixel according to the R channel value, C channel value, and B channel value of each pixel includes:
  • the first weight value, the second weight value and the third weight value to the R channel value, C channel value and B channel value of each pixel respectively, and according to the R channel value, C channel value and B channel value of each pixel Value, and the first weight value, the second weight value, and the third weight value to calculate the brightness information value of each pixel, the brightness information value is used to represent the brightness of the pixel; and, the first weight value, The sum of the second weight value and the third weight value is equal to 1;
  • the corresponding relationship between the brightness information value and the brightness attenuation factor is provided, and the brightness attenuation factor of each pixel is determined according to the corresponding relationship based on the brightness information value of each pixel.
  • the method of calculating the brightness information value of each pixel based on the R channel value, C channel value, and B channel value of each pixel, as well as the first weight value, the second weight value, and the third weight value Methods include:
  • Luminance information value first weight value ⁇ R channel value+second weight value ⁇ C channel value+third weight value ⁇ B channel value.
  • the method of calculating the G channel value of each pixel according to the R channel value, C channel value, B channel value and brightness attenuation factor of each pixel includes:
  • G channel value mm ⁇ C channel value+luminance attenuation factor ⁇ (nn ⁇ R channel value+kk ⁇ B channel value)
  • mm is a positive number
  • nn and kk are both negative numbers.
  • the method of calculating the Y channel value, U channel value, and V channel value of each pixel includes:
  • the V channel value of each pixel is calculated based on the R channel value and G channel value of each pixel, where the V channel value of each pixel is equal to the R channel value of each pixel and the G channel value of each pixel Difference.
  • the method before receiving the image data in the RCCB format, the method further includes:
  • the analog signal being an analog signal processed by infrared filtering
  • the analog signal is converted into image data in the RCCB format and output.
  • the YUV format includes YUV444 format.
  • the present invention also provides an image processing device, the device includes:
  • Receiving module for receiving image data in RCCB format
  • the interpolation module is used to perform interpolation processing on the image data in the RCCB format to calculate the R channel value, the C channel value and the B channel value of each pixel in the RCCB format image data to obtain the full-frame image data RCB image;
  • the brightness attenuation factor calculation module is used to calculate the brightness attenuation factor corresponding to each pixel according to the R channel value, C channel value and B channel value of each pixel, where 0 ⁇ luminance attenuation factor ⁇ 1;
  • the output module is used to calculate the Y channel value, U channel value and V channel value of each pixel according to the R channel value, C channel value, B channel value and G channel value of each pixel, and output the YUV format Image data.
  • the device further includes: a black level correction module, configured to perform black level correction processing on image data in RCCB format;
  • the white balance module is used to perform white balance processing on image data in RCCB format.
  • the brightness attenuation factor calculation module includes:
  • the first calculation unit is used to assign the first weight value, the second weight value and the third weight value to the R channel value, C channel value and B channel value of each pixel respectively, and according to the R channel value of each pixel , C channel value and B channel value, as well as the first weight value, the second weight value, and the third weight value to calculate the brightness information value of each pixel, the brightness information value is used to represent the brightness of the pixel; and, The sum of the first weight value, the second weight value and the third weight value is equal to 1;
  • the second calculation unit is configured to provide the corresponding relationship between the brightness information value and the brightness attenuation factor, and determine the brightness attenuation factor of each pixel according to the corresponding relationship based on the brightness information value of each pixel.
  • the output module includes:
  • the third calculation unit is configured to calculate the Y channel value of each pixel based on the C channel value of each pixel, where the Y channel value of each pixel is equal to the C channel value of each pixel;
  • the fourth calculation unit is used to calculate the U channel value of each pixel based on the B channel value and G channel value of each pixel, where the U channel value of each pixel is equal to the B channel value of each pixel and each pixel The difference of the G channel value of the pixel;
  • the fifth calculation unit is used to calculate the V channel value of each pixel based on the R channel value and G channel value of each pixel, where the V channel value of each pixel is equal to the R channel value of each pixel and each pixel The difference of the G channel value of the pixel;
  • the output unit is used for outputting image data in YUV format based on the Y channel value, U channel value and V channel value of the pixel.
  • the device further includes:
  • An image sensor equipped with an infrared filter is used to obtain an analog signal to convert the analog signal into image data and output it.
  • the analog signal is an analog signal processed by infrared filtering.
  • the image sensor is an RCCB format image sensor, and the RCCB format image sensor outputs image data in RCCB format.
  • the image processing method and device provided by the present invention will introduce a brightness attenuation factor when calculating the G channel value of each pixel.
  • G channel value mm ⁇ C channel value + brightness attenuation factor ⁇ (nn ⁇ R channel value + kk ⁇ B channel value), where mm is a positive number, nn and kk are both negative numbers, and 0 ⁇ brightness Attenuation factor ⁇ 1. Therefore, when calculating the G channel value of a pixel located in the highlight area, even if the R channel value and B channel value of the pixel located in the highlight area are relatively large, the R channel value and B channel value will be multiplied by the value respectively.
  • the brightness attenuation factor between (0,1) will make the final calculated G channel value not too small. Furthermore, in the subsequent imaging, the phenomenon of color cast in the highlight area will not occur, which ensures the color reproduction ability of the image and ensures the final imaging quality.
  • FIG. 1 is a schematic flowchart of an image processing method according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a dot matrix of image data in RCCB format with a sampling period of 4 ⁇ 4 according to an embodiment of the present invention
  • Figure 3 (a, b) is a schematic diagram of an interpolated C channel value, B channel value, and R channel value in a RCCB format in an embodiment of the present invention
  • Figure 3 is a schematic diagram of another interpolated B channel value and R channel value in the RCCB format in an embodiment of the present invention
  • FIG. 4 is a schematic diagram of the corresponding relationship between the brightness information value of a pixel and the brightness attenuation factor according to an embodiment of the present invention
  • FIG. 5 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of another image processing apparatus according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a brightness attenuation factor calculation module according to an embodiment of the present invention.
  • Fig. 8 is a schematic structural diagram of an output module according to an embodiment of the present invention.
  • the present invention provides an image processing method and device to solve the problem of color cast in highlight areas in the background art.
  • FIG. 1 is a schematic flowchart of an image processing method according to an embodiment of the present invention. As shown in Figure 1, the method may include:
  • Step 10a Receive image data in RCCB format.
  • Step 20a Perform interpolation processing on the image data in the RCCB format to calculate the R channel value, the C channel value and the B channel value of each pixel in the RCCB format image data to obtain a full-frame RCB image.
  • Step 30a Calculate the brightness attenuation factor corresponding to each pixel according to the R channel value, C channel value and B channel value of each pixel, where 0 ⁇ brightness attenuation factor ⁇ 1.
  • Step 40a Calculate the G channel value of each pixel based on the R channel value, C channel value, B channel value and brightness attenuation factor of each pixel.
  • G channel value mm ⁇ C channel value + brightness attenuation factor ⁇ (nn ⁇ R channel value + kk ⁇ B channel value)
  • mm is a positive number
  • nn and kk are both negative numbers.
  • Step 50a Calculate the Y channel value, U channel value and V channel value of each pixel according to the R channel value, C channel value, B channel value and G channel value of each pixel, and output the image in YUV format data.
  • the image processing method provided by the present invention introduces a brightness attenuation factor when calculating the G channel value of each pixel.
  • G channel value mm ⁇ C channel value + brightness attenuation factor ⁇ (nn ⁇ R channel value + kk ⁇ B channel value), where mm is a positive number, nn and kk are both negative numbers, and 0 ⁇ brightness Attenuation factor ⁇ 1.
  • the method further includes:
  • an image sensor is used to obtain analog signals.
  • the image sensor may be an RCCB format image sensor equipped with an infrared filter, and the analog signal is specifically an analog signal after infrared filter processing.
  • FIG. 2 is a schematic diagram of a dot matrix of image data in RCCB format with a sampling period of 4 ⁇ 4 according to an embodiment of the present invention, and R and B shown in FIG. 2 are red and blue pixels, respectively, and C is Brightness pixels, and the quantization efficiency and resolution of the C channel are high.
  • the image data in the RCCB format is usually black-powered first.
  • the leveling correction process is used to subtract the black level value in the image data in the RCCB format, so as to prevent the black level value from causing color cast and ensure the quality of the final image.
  • white balance processing will be performed on the image data in the RCCB format to further ensure the final image quality.
  • step 20a is executed to perform interpolation processing on the image data in the RCCB format to calculate the R channel value, the C channel value and the B channel value of each pixel in the RCCB format image data.
  • the R channel value, the C channel value, and the B channel value of a certain pixel are mainly calculated based on the channel values of the surrounding pixels.
  • the corresponding C channel when interpolating the full-frame C channel, if the central pixel is R (refer to Figure 3a), or the central pixel is B (refer to Figure 3b), the corresponding C channel The value can be: If the center pixel is C (refer to Figures 3c and 3d), the corresponding C channel value can be:
  • the corresponding R channel value can be: If the center pixel is B (refer to Figure 3b), the corresponding R channel value can be: If the central pixel is C and the horizontal direction of the central pixel is R (refer to Figure 3c), or the central pixel is C and the horizontal direction of the central pixel is B (refer to Figure 3d), the corresponding R channel value Can be:
  • the corresponding B channel value can be: If the center pixel is B (refer to Figure 3b), the corresponding B channel value can be: If the central pixel is C and the horizontal direction of the central pixel is R (refer to Figure 3c), or the central pixel is C and the horizontal direction of the central pixel is B (refer to Figure 3d), the corresponding B channel value Can be:
  • the R channel value, C channel value, and B channel value of each pixel of the image data in the RCCB format can be calculated.
  • step 30a can be performed, and the brightness attenuation factor of each pixel can be calculated according to the R channel value, C channel value, and B channel value of each pixel calculated in step 20a.
  • step of specifically calculating the brightness attenuation factor of each pixel in step 30a may include:
  • the first step is to first assign a first weight value, a second weight value, and a third weight value to the R channel value, C channel value, and B channel value of each pixel, where the first weight value, the second weight value The sum of the value and the third weight value is equal to 1. Then calculate the brightness information value of each pixel according to the R channel value, C channel value, and B channel value of each pixel, as well as the first weight value, the second weight value, and the third weight value.
  • the brightness information value can be Used to indicate the brightness of a pixel.
  • the C channel value of each pixel is generally larger and greater than the sum of the B channel value and the R channel value of the pixel.
  • the brightness information value of each pixel and the second weight value corresponding to the C channel value of the pixel should be positively correlated with the value of the pixel.
  • the first weight value corresponding to the R channel value and the third weight value corresponding to the B channel value of the pixel should be negatively correlated.
  • the second weight value corresponding to the C channel value of the pixel is greater, correspondingly, the first weight value corresponding to the R channel value of the pixel and the third weight corresponding to the B channel value of the pixel are The smaller the value, the greater the calculated brightness information value of the pixel; if the first weight value corresponding to the R channel value of the pixel or the third weight value corresponding to the B channel value of the pixel is larger, the corresponding , The smaller the second weight value corresponding to the C channel value of the pixel, the smaller the calculated brightness information value of the pixel.
  • the finally calculated brightness information value of the pixel can be adjusted.
  • the second step is to provide the corresponding relationship between the brightness information value and the brightness attenuation factor, and determine the brightness attenuation factor of each pixel based on the corresponding relationship based on the brightness information value of each pixel.
  • FIG. 4 is a schematic diagram of the corresponding relationship between the brightness information value of a pixel and the brightness attenuation factor according to an embodiment of the present invention.
  • the first threshold for example, 180
  • the brightness attenuation factor of the pixel is small, for example, it can be 0
  • the threshold value for example, 240
  • the brightness attenuation factor of the pixel is larger, for example, it can be 1.
  • the brightness attenuation factor of the pixel is between Between (0,1).
  • the brightness information value of the pixel is different, and the corresponding brightness attenuation factor is also different. Based on this, when adjusting the brightness information value of a pixel by adjusting the size of the first weight value and the third weight value, or adjusting the size of the second weight value, the brightness attenuation factor of the pixel can be adjusted accordingly.
  • step 40a will be executed, that is, based on the R channel value, C channel value and B channel value of each pixel calculated in step 20a, and in step 30a Calculate the brightness attenuation factor of each pixel in the calculation, and calculate the G channel value of each pixel.
  • G channel value mm ⁇ C channel value + brightness attenuation factor ⁇ (nn ⁇ R channel value + kk ⁇ B channel value), mm is a positive number, nn and kk are both Is negative.
  • the R and B channel values of the pixels in the highlight area will be larger, which will make the final calculation If the G channel value of this pixel is too small, it will cause color cast in subsequent imaging.
  • the brightness attenuation factor of a certain pixel calculated in the second step is 0, the final calculated G channel value of the pixel will be too large, for example, equal to the C channel value, then the same will be applied in subsequent imaging Will cause color cast.
  • the brightness attenuation factor of all pixels should be between (0, 1 )between.
  • the pixel can be adjusted by adjusting the first weight value corresponding to the R channel value of the pixel, the second weight value corresponding to the C channel value of the pixel, and the third weight value corresponding to the B channel value of the pixel.
  • the brightness information value of the pixel is such that the brightness information value of the pixel is between the first threshold and the second threshold, so that the brightness attenuation factor of the pixel is between (0, 1).
  • the first weight value and the third weight value are between (1/5, 3/10), respectively From time to time, the brightness information value of the pixel will be between the first threshold and the second threshold, and correspondingly, the brightness attenuation factor of the pixel will be between (0, 1).
  • the first weight value and the third weight value between (1/5, 3/10) (for example, the first weight value and the third weight value may be 1/4), and the second weight value Between (2/5, 3/5) (for example, the second weight value can be 1/2), to ensure that the calculated brightness attenuation factor of each pixel is between (0, 1) , So that the G channel value of the final calculated pixel will not be too large or too small, preventing color cast in subsequent imaging, and achieving the effects of demosaicing and color correction, ensuring the final imaging quality.
  • step 50a After calculating the G channel value of each pixel, the above step 50a can be performed, that is, according to the R channel value, C channel value, B channel value of each pixel calculated in step 20a and the calculation in step 40a
  • the G channel value of each pixel is calculated, the Y channel value, U channel value and V channel value of each pixel are calculated, and the image data in the YUV format is output.
  • the method for calculating the Y channel value of each pixel point may be: determining the C channel value of each pixel point as the Y channel value of each pixel point. Moreover, since the quantization efficiency and resolution of the C channel value are high, when it is used as the brightness (that is, the Y channel value), the brightness information value of the pixel under low light conditions can be ensured, thereby ensuring low light conditions The brightness information of the image.
  • the method for calculating the U channel value of each pixel may be: determining the difference between the B channel value of each pixel and the G channel value of each pixel as the U channel value of each pixel.
  • the method for calculating the V channel value of each pixel may be: determining the difference between the R channel value of each pixel and the G channel value of each pixel as the V channel value of each pixel.
  • the image data in the YUV format can be output to facilitate subsequent storage, transmission and imaging of the image data.
  • the image data in the YUV444 format is specifically output.
  • the image processing method provided by the present invention introduces a brightness attenuation factor when calculating the G channel value of each pixel.
  • G channel value mm ⁇ C channel value + brightness attenuation factor ⁇ (nn ⁇ R channel value + kk ⁇ B channel value), where mm is a positive number, nn and kk are both negative numbers, and 0 ⁇ brightness Attenuation factor ⁇ 1.
  • FIG. 5 is a schematic structural diagram of an image processing device according to an embodiment of the present invention. As shown in FIG. 5, the device may include:
  • the receiving module 10 is used to receive image data in RCCB format.
  • the interpolation module 20 is configured to perform interpolation processing on the image data in the RCCB format to calculate the R channel value, the C channel value and the B channel value of each pixel in the RCCB format image data to obtain a full-frame RCB image.
  • the brightness attenuation factor calculation module 30 is configured to calculate the brightness attenuation factor corresponding to each pixel according to the R channel value, C channel value and B channel value of each pixel, where 0 ⁇ brightness attenuation factor ⁇ 1.
  • the output module 50 is used to calculate the Y channel value, U channel value and V channel value of each pixel according to the R channel value, C channel value, B channel value and G channel value of each pixel point, and output YUV Format image data.
  • FIG. 6 is a schematic structural diagram of another image processing apparatus according to an embodiment of the present invention. As shown in FIG. 6, the apparatus further includes:
  • the black level correction module 60 is used to perform black level correction processing on image data in the RCCB format.
  • the white balance module 70 is used to perform white balance processing on image data in the RCCB format.
  • FIG. 7 is a schematic structural diagram of a brightness attenuation factor calculation module according to an embodiment of the present invention.
  • the brightness attenuation factor calculation module 30 includes:
  • the first calculation unit 31 is configured to assign a first weight value, a second weight value, and a third weight value to the R channel value, C channel value, and B channel value of each pixel, and according to the R channel value of each pixel Value, C channel value, and B channel value, as well as the first weight value, the second weight value, and the third weight value to calculate the brightness information value of each pixel.
  • the brightness information value is used to represent the brightness of the pixel. . Wherein, the sum of the first weight value, the second weight value and the third weight value is equal to one.
  • the second calculation unit 32 is configured to provide the corresponding relationship between the brightness information value and the brightness attenuation factor, and determine the brightness attenuation factor of each pixel according to the corresponding relationship based on the brightness information value of each pixel.
  • FIG. 8 is a schematic structural diagram of an output module according to an embodiment of the present invention.
  • the output module 50 may include:
  • the third calculation unit 51 is configured to calculate the Y channel value of each pixel based on the C channel value of each pixel, where the Y channel value of each pixel is equal to the C channel value of each pixel.
  • the fourth calculation unit 52 is configured to calculate the U channel value of each pixel based on the B channel value and G channel value of each pixel, where the U channel value of each pixel is equal to the B channel value of each pixel and The difference of the G channel value of each pixel.
  • the fifth calculation unit 53 is configured to calculate the V channel value of each pixel based on the R channel value and G channel value of each pixel, where the V channel value of each pixel is equal to the R channel value of each pixel and The difference of the G channel value of each pixel.
  • the output unit 54 is configured to output image data in YUV format based on the Y channel value, U channel value, and V channel value of each pixel.
  • the device may further include: an image sensor configured with an infrared filter for acquiring an analog signal to convert the analog signal into image data and output, the analog signal is processed by infrared filter After the analog signal.
  • an image sensor configured with an infrared filter for acquiring an analog signal to convert the analog signal into image data and output, the analog signal is processed by infrared filter After the analog signal.
  • the image sensor may be an RCCB format image sensor, and the RCCB format image sensor outputs image data in RCCB format.
  • the image processing device includes a brightness attenuation factor calculation module for calculating the brightness attenuation factor, and a G value calculation module for calculating the G channel value, and the G value of each pixel is calculated
  • a brightness attenuation factor will be introduced.
  • G channel value mm ⁇ C channel value + brightness attenuation factor ⁇ (nn ⁇ R channel value + kk ⁇ B channel value), where mm is a positive number, nn and kk are both negative numbers, and 0 ⁇ brightness Attenuation factor ⁇ 1.
  • the R channel value and B channel value of the pixel located in the highlight area will be multiplied by the value respectively
  • the brightness attenuation factor between (0,1) will make the final calculated G channel value not too small. Further, in the subsequent imaging, the phenomenon of color cast in the highlight area will not occur, which ensures the color reproduction ability of the image and ensures the final imaging quality.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)
  • Image Processing (AREA)
  • Processing Of Color Television Signals (AREA)

Abstract

本发明提供了一种图像处理方法及装置,所述方法包括:接收RCCB格式的图像数据;对所述RCCB格式的图像数据进行内插处理,以计算出所述RCCB格式图像数据中每个像素点的R通道值、C通道值和B通道值;根据每个像素点的R通道值、C通道值和B通道值,计算出每个像素点对应的亮度衰减因子;基于每个像素点的R通道值、C通道值、B通道值以及亮度衰减因子,计算出每个像素点的G通道值;根据每个像素点的R通道值、C通道值、B通道值以及G通道值,计算出每个像素点的Y通道值、U通道值以及V通道值,并输出YUV格式的图像数据。本发明提供的图像处理方法可以避免高光区域发生偏色,确保了最终成像的质量。

Description

图像处理方法及装置 技术领域
本发明涉及图像处理领域,特别涉及一种图像处理方法及装置。
背景技术
在图像处理领域中,为了防止红外光引起红外偏色,而影响图像信号的最终成像质量,需要对图像信号中红外光进行滤除。通常情况下,基于操作简洁和最终成像分辨率的综合考量,会采用配置有红外滤光片的RCCB格式的图像传感器处理图像信号,来滤除红外光以避免引起红外偏色现象。并且,RCCB格式的图像传感器会输出RCCB格式的图像数据,而为了方便后续对图像数据的存储和传输,通常会将RCCB格式的图像数据转换为数据量较小的YUV格式的图像数据。
相关技术中,将RCCB格式的图像数据转换为YUV格式的图像数据的方法为:先根据RCCB格式的图像数据中的R通道值、B通道值和C通道值计算出对应的G通道值,从而得到RGB格式的图像数据,之后,再根据对应公式将RGB格式的图像数据转换为YUV格式的图像数据。
但是,采用相关技术中的“将RCCB格式的图像数据转换为YUV格式的图像数据”的方法,易使得后续基于YUV格式的图像数据成像时发生偏色现象,从而影响最终的成像质量。
发明内容
本发明的目的在于提供一种图像处理方法及装置,不仅提出一套整体的RCCB处理流程,还解决相关技术的图像处理方法易导致高光区域偏色的问题。
为解决上述技术问题,本发明提供一种图像处理方法,所述方法包括:
接收RCCB格式的图像数据;
对所述RCCB格式的图像数据进行内插处理,以计算出所述RCCB格式图像数据中每个像素点的R通道值、C通道值和B通道值,得到全幅面的RCB图像;
根据每个像素点的R通道值、C通道值和B通道值,计算出每个像素点对应的亮度衰减因子,其中,0<亮度衰减因子<1;
基于每个像素点的R通道值、C通道值、B通道值以及亮度衰减因子,计算出每个像素点的G通道值,其中,G通道值=mm×C通道值+亮度衰减因子×(nn×R通道值+kk×B通道值),mm为正数,nn和kk均为负数;
根据每个像素点的R通道值、C通道值、B通道值以及G通道值,计算出每个像素点的Y通道值、U通道值以及V通道值,并输出YUV格式的图像数据。
可选的,对所述RCCB格式的图像数据进行内插处理之前,所述方法还包括:对所述RCCB格式的图像数据分别进行黑电平校正处理以及白平衡处理。
可选的,所述根据每个像素点的R通道值、C通道值和B通道值,计算出每个像素点的亮度衰减因子的方法包括:
分别为各个像素点的R通道值、C通道值和B通道值分配第一权重值、第二权重值以及第三权重值,并根据每个像素点的R通道值、C通道值和B通道值,以及第一权重值、第二权重值、第三权重值计算出每个像素点的亮度信息值,所述亮度信息值用于表示像素点的亮度;以及,所述第一权重值,第二权重值以及第三权重值之和等于1;
提供亮度信息值与亮度衰减因子的对应关系,并基于每个像素点的亮度信息值,根据所述对应关系确定出每个像素点的亮度衰减因子。
可选的,所述根据每个像素点的R通道值、C通道值和B通道值,以及第一权重值、第二权重值、第三权重值计算出每个像素点的亮度信息值的方法包括:
亮度信息值=第一权重值×R通道值+第二权重值×C通道值+第三权重值×B通道值。
可选的,第一权重值=1/4;第二权重值=1/2;第三权重值=1/4。
可选的,所述根据每个像素点的R通道值、C通道值、B通道值和亮度衰减因子计算出每个像素点的G通道值的方法包括:
分别为各个像素点的R通道值、C通道值、B通道值和对应的第一权重值、第二权重值、第三权重值,以及亮度衰减因子,计算出每个像素点的G通道值;其中,G通道值=mm×C通道值+亮度衰减因子×(nn×R通道值+kk×B通道值),mm为正数,nn和kk均为负数。
可选的,根据每个像素点的R通道值、C通道值、B通道值以及G通道值,计算出每个像素点的Y通道值、U通道值以及V通道值的方法包括:
基于每个像素点的C通道值计算出每个像素点的Y通道值,其中,各个像素点的Y通道值等于各个像素点的C通道值;
基于每个像素点的B通道值和G通道值计算出每个像素点的U通道值,其中,各个像素点的U通道值等于各个像素点的B通道值与各个像素点的G通道值的差值;
基于每个像素点的R通道值和G通道值计算出每个像素点的V通道值,其中,各个像素点的V通道值等于各个像素点的R通道值与各个像素点的G通道值的差值。
可选的,接收RCCB格式的图像数据之前,所述方法还包括:
获取模拟信号,所述模拟信号为经过红外滤光处理后的模拟信号;
将所述模拟信号转换为RCCB格式的图像数据并输出。
可选的,所述YUV的格式包括YUV444格式。
进一步地,为解决上述技术问题,本发明还提供一种图像处理装置,所述装置包括:
接收模块,用于接收RCCB格式的图像数据;
内插模块,用于对所述RCCB格式的图像数据进行内插处理,以计算出所述RCCB格式图像数据中每个像素点的R通道值、C通道值和B通道值,得到全幅面的RCB图像;
亮度衰减因子计算模块,用于根据每个像素点的R通道值、C通道值和B通道值,计算出每个像素点对应的亮度衰减因子,其中,0<亮度衰减 因子<1;
G值计算模块,用于基于每个像素点的R通道值、C通道值、B通道值以及亮度衰减因子,计算出每个像素点的G通道值,其中,G通道值=mm×C通道值+亮度衰减因子×(nn×R通道值+kk×B通道值),mm为正数,nn和kk均为负数;
输出模块,用于根据每个像素点的R通道值、C通道值、B通道值以及G通道值,计算出每个像素点的Y通道值、U通道值以及V通道值,并输出YUV格式的图像数据。
可选的,所述装置还包括:黑电平校正模块,用于对RCCB格式的图像数据进行黑电平校正处理;
白平衡模块,用于对RCCB格式的图像数据进行白平衡处理。
可选的,所述亮度衰减因子计算模块包括:
第一计算单元,用于分别为各个像素点的R通道值、C通道值和B通道值分配第一权重值、第二权重值以及第三权重值,并根据每个像素点的R通道值、C通道值和B通道值,以及第一权重值、第二权重值、第三权重值计算出每个像素点的亮度信息值,所述亮度信息值用于表示像素点的亮度;以及,所述第一权重值,第二权重值以及第三权重值之和等于1;
第二计算单元,用于提供亮度信息值与亮度衰减因子的对应关系,并基于每个像素点的亮度信息值,根据所述对应关系确定出每个像素点的亮度衰减因子。
可选的,所述输出模块包括:
第三计算单元,用于基于每个像素点的C通道值计算出每个像素点的Y通道值,其中,各个像素点的Y通道值等于各个像素点的C通道值;
第四计算单元,用于基于每个像素点的B通道值和G通道值计算出每个像素点的U通道值,其中,各个像素点的U通道值等于各个像素点的B通道值与各个像素点的G通道值的差值;
第五计算单元,用于基于每个像素点的R通道值和G通道值计算出每个像素点的V通道值,其中,各个像素点的V通道值等于各个像素点的R通道值与各个像素点的G通道值的差值;
输出单元,用于基于像素点的Y通道值、U通道值以及V通道值输出YUV格式的图像数据。
可选的,所述装置还包括:
配置有红外滤光片的图像传感器,用于获取模拟信号,以将所述模拟信号转换为图像数据并输出,所述模拟信号为经过红外滤光处理后的模拟信号。
可选的,所述图像传感器为RCCB格式的图像传感器,所述RCCB格式的图像传感器输出RCCB格式的图像数据。
综上所述,本发明提供的图像处理方法及装置,在计算每个像素点的G通道值时,会引入亮度衰减因子。具体的,G通道值=mm×C通道值+亮度衰减因子×(nn×R通道值+kk×B通道值),其中,mm为正数,nn和kk均为负数,并且,0<亮度衰减因子<1。因此,在计算位于高光区域的像素点的G通道值时,即使该位于高光区域的像素点的R通道值和B通道值较大,但由于该R通道值和B通道值会分别乘以数值介于(0,1)之间的亮度衰减因子,从而会使得最终计算出的G通道值不会过小。进一步地,在后续成像时,不会出现高光区域偏色的现象,保证了图像的色彩还原能力,确保了最终的成像质量。
附图说明
图1为本发明一实施例的一种图像处理方法的流程示意图;
图2为本发明一实施例的一种采样周期为4×4的RCCB格式的图像数据的点阵示意图;
图3(a,b)为本发明一实施例的中RCCB格式的一种内插C通道值、B通道值以及R通道值的示意图;
图3(c,d)为本发明一实施例的中RCCB格式的另一种内插B通道值以及R通道值的示意图;
图4为本发明一实施例的一种像素点的亮度信息值与亮度衰减因子的对应关系示意图;
图5为本发明一实施例的一种图像处理装置的结构示意图;
图6为本发明一实施例的另一种图像处理装置的结构示意图;
图7为本发明一实施例的一种亮度衰减因子计算模块的结构示意图;
图8为本发明一实施例的一种输出模块的结构示意图。
具体实施方式
承如背景技术所述,相关技术中需要根据RCCB格式的图像数据中每个像素点的R通道值、B通道值和C通道值来计算每个像素点的G通道值。其中,具体计算方法为:G通道值=mm×C通道值+nn×R通道值+kk×B通道值,mm为正数,nn和kk均为负数。基于此,若计算位于高光区域的像素点的G通道值时,由于位于高光区域的像素点的R通道值和B通道值较大,会使得最终计算出的G通道值较小,则当后续成像时,可能会导致高光区域出现偏色现象,影响成像质量。
基于此,本发明提供了一种图像处理方法及装置,以解决背景技术中存在的高光区域偏色的问题。
以下结合附图和具体实施例对本发明提出的图像处理方法及装置作进一步详细说明。根据下面说明书,本发明的优点和特征将更清楚。需说明的是,附图均采用非常简化的形式且均使用非精准的比例,仅用以方便、明晰地辅助说明本发明实施例的目的。
图1为本发明一实施例的一种图像处理方法的流程示意图。如图1所示,所述方法可以包括:
步骤10a,接收RCCB格式的图像数据。
步骤20a,对所述RCCB格式的图像数据进行内插处理,以计算出所述RCCB格式图像数据中每个像素点的R通道值、C通道值和B通道值,得到全幅面的RCB图像。
步骤30a,根据每个像素点的R通道值、C通道值和B通道值,计算出每个像素点对应的亮度衰减因子,其中,0<亮度衰减因子<1。
步骤40a,基于每个像素点的R通道值、C通道值、B通道值以及亮度衰减因子,计算出每个像素点的G通道值。其中,G通道值=mm×C通道 值+亮度衰减因子×(nn×R通道值+kk×B通道值),mm为正数,nn和kk均为负数。
步骤50a,根据每个像素点的R通道值、C通道值、B通道值以及G通道值,计算出每个像素点的Y通道值、U通道值以及V通道值,并输出YUV格式的图像数据。
由上述内容可知,本发明提供的图像处理方法,在计算每个像素点的G通道值时,会引入亮度衰减因子。具体的,G通道值=mm×C通道值+亮度衰减因子×(nn×R通道值+kk×B通道值),其中,mm为正数,nn和kk均为负数,并且,0<亮度衰减因子<1。因此,当计算位于高光区域的像素点的G通道值时,即使该位于高光区域的像素点的R通道值和B通道值较大,但由于该R通道值和B通道值会分别乘以数值介于(0,1)之间的亮度衰减因子,从而会使得最终计算出的G通道值不会过小。进一步地,在后续成像时,不会出现高光区域偏色的现象,保证了图像的色彩还原能力,确保了最终的成像质量。
以下,对上述的图像处理方法做进一步详细介绍。
其中,在执行步骤10a之前,所述方法还包括:
利用一图像传感器获取模拟信号。其中,所述图像传感器可以为配置有红外滤光片的RCCB格式的图像传感器,以及,所述模拟信号具体为经过红外滤光处理后的模拟信号。
之后,再利用该图像传感器将模拟信号转换为RCCB格式的图像数据并输出,以进行后续的图像信号处理步骤。其中,图2为本发明一实施例的一种采样周期为4×4的RCCB格式的图像数据的点阵示意图,以及图2中所示的R和B分别为红、蓝像元,C为亮度像元,并且,C通道的量化效率和分辨率均较高。
进一步地,在执行步骤10a之后,以及执行步骤20a之前,为了防止图像数据中黑电平引起色彩偏色,而影响到最终的成像质量,通常会先对所述RCCB格式的图像数据进行黑电平校正处理,以减去所述RCCB格式的图像数据中的黑电平值,从而可以防止黑电平值引起色彩偏色,保证了最终成像的质量。同时,还会对所述RCCB格式的图像数据进行白平衡处 理,以进一步保证最终成像的质量。
之后,会执行上述步骤20a,对所述RCCB格式的图像数据进行内插处理,以计算出RCCB格式的图像数据中每个像素点的R通道值、C通道值和B通道值。
其中,在本实施例中,主要是根据某一像素点周围像素点的通道值,来计算该某一像素点的R通道值、C通道值和B通道值。
具体的,对于RCCB格式的图像数据,在内插计算全幅面的C通道时,若中心像素点为R(参考图3a),或者,中心像素点为B(参考图3b),对应的C通道值可以为:
Figure PCTCN2020075915-appb-000001
若中心像素点为C(参考图3c和3d),对应的C通道值可以为:
Figure PCTCN2020075915-appb-000002
在内插计算全幅面的R通道时,若中心像素点为R(参考图3a),对应的R通道值可以为:
Figure PCTCN2020075915-appb-000003
若中心像素点为B(参考图3b),对应的R通道值可以为:
Figure PCTCN2020075915-appb-000004
若中心像素点为C,并且该中心像素点水平方向为R(参考图3c),或者,中心像素点为C,并且该中心像素点水平方向为B(参考图3d),对应的R通道值可以为:
Figure PCTCN2020075915-appb-000005
在内插计算全幅面的B通道时,若中心像素点为R(参考图3a),对应的B通道值可以为:
Figure PCTCN2020075915-appb-000006
若中心像素点为B(参考图3b),对应的B通道值可以为:
Figure PCTCN2020075915-appb-000007
若中心像素点为C,并且该中心像素点水平方向为R(参考图3c),或者,中心像素点为C,并且该中心像素点水平方向为B(参考图3d),对应的B通道值可以为:
Figure PCTCN2020075915-appb-000008
由此,通过内插处理,即可计算出所述RCCB格式的图像数据的每个像素点的R通道值、C通道值和B通道值。
之后,可以执行上述步骤30a,根据步骤20a计算出的每个像素点的R通道值、C通道值和B通道值,计算出每个像素点的亮度衰减因子。
其中,在步骤30a中具体计算每个像素点的亮度衰减因子的步骤可以包括:
第一步、先分别为各个像素点的R通道值、C通道值和B通道值分配第一权重值、第二权重值以及第三权重值,其中,所述第一权重值,第二权重值以及第三权重值之和等于1。再根据每个像素的R通道值、C通道 值和B通道值,以及第一权重值、第二权重值、第三权重值计算出每个像素点的亮度信息值,所述亮度信息值可以用于表示像素点的亮度。
其中,根据每个像素的R通道值、C通道值和B通道值,以及第一权重值、第二权重值、第三权重值计算出每个像素点的亮度信息值的方法可以为:亮度信息值=第一权重值×R通道值+第二权重值×C通道值+第三权重值×B通道值。
以及,需要说明的是,本实施例中,每个像素点的C通道值一般较大,且大于该像素点的B通道值和R通道值之和。在此基础上,基于上述亮度信息值的计算公式,可以确定出:每个像素点的亮度信息值与该像素点的C通道值所对应的第二权重值应呈正相关,与该像素点的R通道值所对应的第一权重值和该像素点的B通道值所对应的第三权重值应呈负相关。也即是,若像素点的C通道值所对应的第二权重值越大,相应的,像素点的R通道值所对应的第一权重值和像素点的B通道值所对应的第三权重值越小,则计算出的像素点的亮度信息值越大;若像素点的R通道值所对应的第一权重值或像素点的B通道值所对应的第三权重值越大,相应的,像素点C通道值所对应的第二权重值越小,则计算出的像素点的亮度信息值越小。
则,在本实施例中,通过调整第一权重值和第三权重值的大小,或者调整第二权重值的大小,即可调整最终计算出的像素点的亮度信息值。
第二步、提供亮度信息值与亮度衰减因子的对应关系,并基于每个像素点的亮度信息值,根据所述对应关系确定出每个像素点的亮度衰减因子。
其中,图4为本发明一实施例的一种像素点的亮度信息值与亮度衰减因子的对应关系示意图。如图4所示,当像素点的亮度信息值低于第一阈值(例如180)时,该像素点的亮度衰减因子较小,例如可以为0;当像素点的亮度信息值高于第二阈值(例如240)时,该像素点的亮度衰减因子较大,例如可以为1;当像素点的亮度信息值介于第一阈值和第二阈值之间时,该像素点的亮度衰减因子介于(0,1)之间。
由此可知,像素点的亮度信息值不同,其对应的亮度衰减因子也不相同。基于此,通过调整第一权重值和第三权重值的大小,或者调整第二权 重值的大小,来调整像素点的亮度信息值时,可以对应调整像素点的亮度衰减因子。
进一步地,在计算出像素点的亮度衰减因子后,会执行上述步骤40a,即,基于在步骤20a中计算出的各个像素点的R通道值、C通道值和B通道值,以及在步骤30a中计算中的各个像素点的亮度衰减因子,计算出各个像素点的G通道值。
其中,像素点G通道值的计算公式具体为:G通道值=mm×C通道值+亮度衰减因子×(nn×R通道值+kk×B通道值),mm为正数,nn和kk均为负数。
在此基础上,假若上述第二步中计算出高光区域的某一像素点的亮度衰减因子为1时,则由于高光区域内像素点的R通道值和B通道值较大,会使得最终算出的该像素点的G通道值过小,在后续成像时会引起偏色现象。而若上述第二步中计算出的某一像素点的亮度衰减因子为0,则会使得最终计算出的该像素点的G通道值过大,例如等于C通道值,则在后续成像时同样会引起偏色现象。
因此,为了防止最终计算出的像素点的G通道值过大或者过小,而在后续成像时出现偏色现象,本实施例中,应使得所有像素点的亮度衰减因子介于(0,1)之间。
具体的,可以通过调整像素点的R通道值所对应的第一权重值、像素点的C通道值所对应的第二权重值和像素点的B通道值所对应的第三权重值来调整像素点的亮度信息值,以使得像素点的亮度信息值介于第一阈值和第二阈值之间,进而使得像素点的亮度衰减因子介于(0,1)之间。
而在本实施例中,当所述第二权重值介于(2/5,3/5)之间,第一权重值和第三权重值分别介于(1/5,3/10)之间时,像素点的亮度信息值会介于第一阈值和第二阈值之间,相应的,像素点的亮度衰减因子会介于(0,1)之间。
如此,通过使得第一权重值和第三权重值介于(1/5,3/10)之间(例如第一权重值和第三权重值可以为1/4),以及使得第二权重值介于(2/5,3/5)之间(例如第二权重值可以为1/2),即可确保计算出的每个像素点 的亮度衰减因子均介于(0,1)之间,从而使得最终计算出的像素点的G通道值不会过大或者过小,防止后续成像时出现偏色现象,还达到了去马赛克和颜色校正的效果,确保了最终的成像质量。
之后,在计算出各个像素点的G通道值后,可以执行上述步骤50a,即,根据步骤20a中计算出的每个像素点的R通道值、C通道值、B通道值以及步骤40a中计算出的每个像素点的G通道值,计算出每个像素点的Y通道值、U通道值以及V通道值,并输出YUV格式的图像数据。
其中,计算每个像素点的Y通道值的方法可以为:将各个像素点的C通道值确定为各个像素点的Y通道值。并且,由于C通道值的量化效率和分辨率均较高,则将其作为亮度(也即Y通道值)时,可以确保低照情况下像素点的亮度信息值,进而可以确保低照情况下图像的亮度信息。
计算每个像素点的U通道值的方法可以为:将各个像素点的B通道值与各个像素点的G通道值的差值确定为各个像素点的U通道值。
计算每个像素点的V通道值的方法可以为:将各个像素点的R通道值与各个像素点的G通道值的差值确定为各个像素点的V通道值。
最后,基于所述RCCB格式的图像数据中每个像素点的Y通道值、U通道值以及V通道值,即可输出YUV格式的图像数据,以方便后续的图像数据的存储、传输以及成像。其中,需要说明的是,本实施例中,具体输出的是YUV444格式的图像数据。
综上所述,本发明提供的图像处理方法,在计算每个像素点的G通道值时,会引入亮度衰减因子。具体的,G通道值=mm×C通道值+亮度衰减因子×(nn×R通道值+kk×B通道值),其中,mm为正数,nn和kk均为负数,并且,0<亮度衰减因子<1。因此,当计算位于高光区域的像素点的G通道值时,即使该位于高光区域的像素点的R通道值和B通道值较大,但由于该R通道值和B通道值会分别乘以数值介于(0,1)之间的亮度衰减因子,从而会使得最终计算出的G通道值不会过小。进一步地,在后续成像时,不会出现高光区域偏色的现象,保证了图像的色彩还原能力,确保了最终的成像质量。
此外,本发明还提供了一种图像处理装置,图5为本发明一实施例的一种图像处理装置的结构示意图,如图5所示,所述装置可以包括:
接收模块10,用于接收RCCB格式的图像数据。
内插模块20,用于对所述RCCB格式的图像数据进行内插处理,以计算出所述RCCB格式图像数据中每个像素点的R通道值、C通道值和B通道值,得到全幅面的RCB图像。
亮度衰减因子计算模块30,用于根据每个像素点的R通道值、C通道值和B通道值,计算出每个像素点对应的亮度衰减因子,其中,0<亮度衰减因子<1。
G值计算模块40,用于基于每个像素点的R通道值、C通道值、B通道值以及亮度衰减因子,计算出每个像素点的G通道值,其中,G通道值=mm×C通道值+亮度衰减因子×(nn×R通道值+kk×B通道值),mm为正数,nn和kk均为负数。
输出模块50,用于根据每个像素点的R通道值、C通道值、B通道值以及G通道值,计算出每个像素点的Y通道值、U通道值以及V通道值,并输出YUV格式的图像数据。
可选的,图6为本发明一实施例的另一种图像处理装置的结构示意图,如图6所示,所述装置还包括:
黑电平校正模块60,用于对RCCB格式的图像数据进行黑电平校正处理。
白平衡模块70,用于对RCCB格式的图像数据进行白平衡处理。
可选的,图7为本发明一实施例的一种亮度衰减因子计算模块的结构示意图,如图7所示,所述亮度衰减因子计算模块30包括:
第一计算单元31,用于分别为各个像素点的R通道值、C通道值和B通道值分配第一权重值、第二权重值以及第三权重值,并根据每个像素点的R通道值、C通道值和B通道值,以及第一权重值、第二权重值、第三权重值计算出每个像素点的亮度信息值,所述亮度信息值用于表示所述像素点的亮度。其中,所述第一权重值,第二权重值以及第三权重值之和等于一。
第二计算单元32,用于提供亮度信息值与亮度衰减因子的对应关系,并基于每个像素点的亮度信息值,根据所述对应关系确定出每个像素点的亮度衰减因子。
可选的,图8为本发明一实施例的一种输出模块的结构示意图,如图8所示,所述输出模块50可以包括:
第三计算单元51,用于基于每个像素点的C通道值计算出每个像素点的Y通道值,其中,各个像素点的Y通道值等于各个像素点的C通道值。
第四计算单元52,用于基于每个像素点的B通道值和G通道值计算出每个像素点的U通道值,其中,各个像素点的U通道值等于各个像素点的B通道值与各个像素点的G通道值的差值。
第五计算单元53,用于基于每个像素点的R通道值和G通道值计算出每个像素点的V通道值,其中,各个像素点的V通道值等于各个像素点的R通道值与各个像素点的G通道值的差值。
输出单元54,用于基于每个像素的Y通道值、U通道值以及V通道值,输出YUV格式的图像数据。
可选的,所述装置还可以包括:配置有红外滤光片的图像传感器,用于获取模拟信号,以将所述模拟信号转换为图像数据并输出,所述模拟信号为经过红外滤光处理后的模拟信号。
可选的,所述图像传感器可以为RCCB格式的图像传感器,所述RCCB格式的图像传感器输出RCCB格式的图像数据。
综上所述,本发明提供的图像处理装置,包括用于计算亮度衰减因子的亮度衰减因子计算模块,以及用于计算G通道值的G值计算模块,并且,在计算每个像素点的G通道值时,会引入亮度衰减因子。具体的,G通道值=mm×C通道值+亮度衰减因子×(nn×R通道值+kk×B通道值),其中,mm为正数,nn和kk均为负数,并且,0<亮度衰减因子<1。因此,当计算位于高光区域的像素点的G通道值时,即使该位于高光区域的像素点的R通道值和B通道值较大,但由于该R通道值和B通道值会分别乘以数值介于(0,1)之间的亮度衰减因子,从而会使得最终计算出的G通道值不会过小。进一步地,在后续成像时,不会出现高光区域偏色的现象, 保证了图像的色彩还原能力,确保了最终的成像质量。
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的系统而言,由于与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。
上述描述仅是对本发明较佳实施例的描述,并非对本发明范围的任何限定,本发明领域的普通技术人员根据上述揭示内容做的任何变更、修饰,均属于权利要求书的保护范围。

Claims (14)

  1. 一种图像处理方法,其特征在于,所述方法包括:
    接收RCCB格式的图像数据;
    对所述RCCB格式的图像数据进行内插处理,以计算出所述RCCB格式图像数据中每个像素点的R通道值、C通道值和B通道值,得到全幅面的RCB图像;
    根据每个像素点的R通道值、C通道值和B通道值,计算出每个像素点对应的亮度衰减因子,其中,0<亮度衰减因子<1;
    基于每个像素点的R通道值、C通道值、B通道值以及亮度衰减因子,计算出每个像素点的G通道值,其中,G通道值=mm×C通道值+亮度衰减因子×(nn×R通道值+kk×B通道值),mm为正数,nn和kk均为负数;
    根据每个像素点的R通道值、C通道值、B通道值以及G通道值,计算出每个像素点的Y通道值、U通道值以及V通道值,并输出YUV格式的图像数据。
  2. 如权利要求1所述的图像处理方法,其特征在于,对所述RCCB格式的图像数据进行内插处理之前,所述方法还包括:对所述RCCB格式的图像数据分别进行黑电平校正处理以及白平衡处理。
  3. 如权利要求1所述的图像处理方法,其特征在于,所述根据每个像素点的R通道值、C通道值和B通道值,计算出每个像素点的亮度衰减因子的方法包括:
    分别为各个像素点的R通道值、C通道值和B通道值分配第一权重值、第二权重值以及第三权重值,并根据每个像素点的R通道值、C通道值和B通道值,以及第一权重值、第二权重值、第三权重值计算出每个像素点的亮度信息值,所述亮度信息值用于表示像素点的亮度;以及,所述第一权重值,第二权重值以及第三权重值之和等于1;
    提供亮度信息值与亮度衰减因子的对应关系,并基于每个像素点的亮度信息值,根据所述对应关系确定出每个像素点的亮度衰减因子。
  4. 如权利要求3所述的图像处理方法,其特征在于,所述根据每个像 素点的R通道值、C通道值和B通道值,以及第一权重值、第二权重值、第三权重值计算出每个像素点的亮度信息值的方法包括:
    亮度信息值=第一权重值×R通道值+第二权重值×C通道值+第三权重值×B通道值。
  5. 如权利要求4所述的图像处理方法,其特征在于,第一权重值=1/4;第二权重值=1/2;第三权重值=1/4。
  6. 如权利要求1所述的图像处理方法,其特征在于,根据每个像素点的R通道值、C通道值、B通道值以及G通道值,计算出每个像素点的Y通道值、U通道值以及V通道值的方法包括:
    基于每个像素点的C通道值计算出每个像素点的Y通道值,其中,各个像素点的Y通道值等于各个像素点的C通道值;
    基于每个像素点的B通道值和G通道值计算出每个像素点的U通道值,其中,各个像素点的U通道值等于各个像素点的B通道值与各个像素点的G通道值的差值;
    基于每个像素点的R通道值和G通道值计算出每个像素点的V通道值,其中,各个像素点的V通道值等于各个像素点的R通道值与各个像素点的G通道值的差值。
  7. 如权利要求1所述的图像处理方法,其特征在于,接收RCCB格式的图像数据之前,所述方法还包括:
    获取模拟信号,所述模拟信号为经过红外滤光处理后的模拟信号;
    将所述模拟信号转换为RCCB格式的图像数据并输出。
  8. 如权利要求1所述的图像处理方法,其特征在于,所述YUV的格式包括YUV444格式。
  9. 一种图像处理装置,其特征在于,所述装置包括:
    接收模块,用于接收RCCB格式的图像数据;
    内插模块,用于对所述RCCB格式的图像数据进行内插处理,以计算出所述RCCB格式图像数据中每个像素点的R通道值、C通道值和B通道值,得到全幅面的RCB图像;
    亮度衰减因子计算模块,用于根据每个像素点的R通道值、C通道值 和B通道值,计算出每个像素点对应的亮度衰减因子,其中,0<亮度衰减因子<1;
    G值计算模块,用于基于每个像素点的R通道值、C通道值、B通道值以及亮度衰减因子,计算出每个像素点的G通道值,其中,G通道值=mm×C通道值+亮度衰减因子×(nn×R通道值+kk×B通道值),mm为正数,nn和kk均为负数;
    输出模块,用于根据每个像素点的R通道值、C通道值、B通道值以及G通道值,计算出每个像素点的Y通道值、U通道值以及V通道值,并输出YUV格式的图像数据。
  10. 如权利要求9所述的图像处理装置,其特征在于,所述装置还包括:黑电平校正模块,用于对RCCB格式的图像数据进行黑电平校正处理;
    白平衡模块,用于对RCCB格式的图像数据进行白平衡处理。
  11. 如权利要求9所述的图像处理装置,其特征在于,所述亮度衰减因子计算模块包括:
    第一计算单元,用于分别为各个像素点的R通道值、C通道值和B通道值分配第一权重值、第二权重值以及第三权重值,并根据每个像素点的R通道值、C通道值和B通道值,以及第一权重值、第二权重值、第三权重值计算出每个像素点的亮度信息值,所述亮度信息值用于表示像素点的亮度;以及,所述第一权重值,第二权重值以及第三权重值之和等于1;
    第二计算单元,用于提供亮度信息值与亮度衰减因子的对应关系,并基于每个像素点的亮度信息值,根据所述对应关系确定出每个像素点的亮度衰减因子。
  12. 如权利要求11所述的图像处理装置,其特征在于,所述输出模块包括:
    第三计算单元,用于基于每个像素点的C通道值计算出每个像素点的Y通道值,其中,各个像素点的Y通道值等于各个像素点的C通道值;
    第四计算单元,用于基于每个像素点的B通道值和G通道值计算出每个像素点的U通道值,其中,各个像素点的U通道值等于各个像素点的B通道值与各个像素点的G通道值的差值;
    第五计算单元,用于基于每个像素点的R通道值和G通道值计算出每个像素点的V通道值,其中,各个像素点的V通道值等于各个像素点的R通道值与各个像素点的G通道值的差值;
    输出单元,用于基于像素点的Y通道值、U通道值以及V通道值输出YUV格式的图像数据。
  13. 如权利要求9所述的图像处理装置,其特征在于,所述装置还包括:
    配置有红外滤光片的图像传感器,用于获取模拟信号,以将所述模拟信号转换为图像数据并输出,所述模拟信号为经过红外滤光处理后的模拟信号。
  14. 如权利要求9所述的图像处理装置,其特征在于,所述图像传感器为RCCB格式的图像传感器,所述RCCB格式的图像传感器输出RCCB格式的图像数据。
PCT/CN2020/075915 2019-07-05 2020-02-20 图像处理方法及装置 WO2021004066A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910604870.2A CN110290370B (zh) 2019-07-05 2019-07-05 图像处理方法及装置
CN201910604870.2 2019-07-05

Publications (1)

Publication Number Publication Date
WO2021004066A1 true WO2021004066A1 (zh) 2021-01-14

Family

ID=68020818

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/075915 WO2021004066A1 (zh) 2019-07-05 2020-02-20 图像处理方法及装置

Country Status (2)

Country Link
CN (1) CN110290370B (zh)
WO (1) WO2021004066A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110290370B (zh) * 2019-07-05 2020-09-18 上海富瀚微电子股份有限公司 图像处理方法及装置
CN113242413B (zh) * 2021-07-12 2021-09-21 深圳市艾为智能有限公司 抗锯齿的rccb滤镜阵列插值计算方法及系统
CN113947553B (zh) * 2021-12-20 2022-03-18 山东信通电子股份有限公司 一种图像亮度增强方法及设备
WO2023115560A1 (zh) * 2021-12-24 2023-06-29 深圳市大疆创新科技有限公司 图像处理方法、装置及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102752604A (zh) * 2012-06-18 2012-10-24 深圳创维-Rgb电子有限公司 一种图像显示方法及智能设备
US20140125837A1 (en) * 2005-08-25 2014-05-08 Protarius Filo Ag, L.L.C. Digital cameras with direct luminance and chrominance detection
CN108171657A (zh) * 2018-01-26 2018-06-15 上海富瀚微电子股份有限公司 图像插值方法及装置
CN108737747A (zh) * 2017-04-18 2018-11-02 上海富瀚微电子股份有限公司 一种去马赛克方法及装置
CN110290370A (zh) * 2019-07-05 2019-09-27 上海富瀚微电子股份有限公司 图像处理方法及装置

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5832855B2 (ja) * 2011-11-01 2015-12-16 クラリオン株式会社 画像処理装置、撮像装置および画像処理プログラム
DE112013004198T5 (de) * 2012-08-27 2015-05-07 Fujifilm Corporation Bildverarbeitungsvorrichtung, Verfahren, Programm, Aufzeichnungsmedium und Bildaufnahmevorrichtung
CN104539919B (zh) * 2014-12-31 2017-01-25 上海富瀚微电子股份有限公司 图像传感器的去马赛克方法及装置
CN104639923B (zh) * 2015-02-04 2017-08-04 华为技术有限公司 一种对图像数据进行处理的方法、装置和终端
US9911174B2 (en) * 2015-08-26 2018-03-06 Apple Inc. Multi-rate processing for image data in an image processing pipeline
CN107967668B (zh) * 2016-10-20 2022-02-08 上海富瀚微电子股份有限公司 一种图像处理方法及装置
US11172172B2 (en) * 2016-12-30 2021-11-09 Texas Instruments Incorporated Efficient and flexible color processor
CN108419062B (zh) * 2017-02-10 2020-10-02 杭州海康威视数字技术股份有限公司 图像融合设备和图像融合方法
CN107622477A (zh) * 2017-08-08 2018-01-23 成都精工华耀机械制造有限公司 一种rgbw图像联合去马赛克和去模糊方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140125837A1 (en) * 2005-08-25 2014-05-08 Protarius Filo Ag, L.L.C. Digital cameras with direct luminance and chrominance detection
CN102752604A (zh) * 2012-06-18 2012-10-24 深圳创维-Rgb电子有限公司 一种图像显示方法及智能设备
CN108737747A (zh) * 2017-04-18 2018-11-02 上海富瀚微电子股份有限公司 一种去马赛克方法及装置
CN108171657A (zh) * 2018-01-26 2018-06-15 上海富瀚微电子股份有限公司 图像插值方法及装置
CN110290370A (zh) * 2019-07-05 2019-09-27 上海富瀚微电子股份有限公司 图像处理方法及装置

Also Published As

Publication number Publication date
CN110290370A (zh) 2019-09-27
CN110290370B (zh) 2020-09-18

Similar Documents

Publication Publication Date Title
WO2021004066A1 (zh) 图像处理方法及装置
JP5315158B2 (ja) 画像処理装置及び画像処理方法
JP4837503B2 (ja) 画像処理システム、画像処理プログラム
US7362895B2 (en) Image processing apparatus, image-taking system and image processing method
JP6603493B2 (ja) 撮像装置、画像処理装置、撮像装置が実行する撮像方法、画像処理装置が実行する画像処理方法、及びプログラム
JP2007189544A (ja) 撮像装置
JP5847471B2 (ja) 画像処理装置、撮像装置、画像処理方法および画像処理プログラム
DE112011101066T5 (de) Bildverarbeitungsgerät und steuerungsverfahren für ein bildverarbeitungsgerät
JPWO2006134923A1 (ja) 画像処理装置、コンピュータプログラム製品および画像処理方法
CN104869380A (zh) 图像处理设备和图像处理方法
JP2003304549A (ja) カメラ及び画像信号処理システム
JP5541205B2 (ja) 画像処理装置、撮像装置、画像処理プログラムおよび画像処理方法
JP5589660B2 (ja) 画像処理装置、撮像装置及び画像処理プログラム
JP2008141658A (ja) 電子カメラおよび画像処理装置
US8009935B2 (en) Pixel interpolation circuit, pixel interpolation method, and recording medium
JP7423033B2 (ja) 画像信号処理方法
JP3863808B2 (ja) 輪郭強調回路
JP4596069B2 (ja) ノイズ除去フィルタ処理回路、画像処理回路、撮像装置及びノイズ除去プログラム
WO2013125198A1 (ja) 画像処理装置、撮像装置および画像処理プログラム
JP2007180893A (ja) 画像処理装置および撮像装置
JP2015008391A (ja) 画像処理装置、画像処理方法および画像処理プログラム
JP5178421B2 (ja) 画像処理装置、画像処理方法及び撮像装置
TWI394430B (zh) Image color distortion correction method
JP4973428B2 (ja) 画像処理装置、電子カメラ、および画像処理プログラム
JP2014158165A (ja) 画像処理装置、画像処理方法およびプログラム

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

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 20837082

Country of ref document: EP

Kind code of ref document: A1