CN110290370B - Image processing method and device - Google Patents

Image processing method and device Download PDF

Info

Publication number
CN110290370B
CN110290370B CN201910604870.2A CN201910604870A CN110290370B CN 110290370 B CN110290370 B CN 110290370B CN 201910604870 A CN201910604870 A CN 201910604870A CN 110290370 B CN110290370 B CN 110290370B
Authority
CN
China
Prior art keywords
channel value
value
pixel point
channel
pixel
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201910604870.2A
Other languages
Chinese (zh)
Other versions
CN110290370A (en
Inventor
詹进
朱媛媛
丁美玉
刘学彦
潘昱
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Fullhan Microelectronics Co ltd
Original Assignee
Shanghai Fullhan Microelectronics Co ltd
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 Shanghai Fullhan Microelectronics Co ltd filed Critical Shanghai Fullhan Microelectronics Co ltd
Priority to CN201910604870.2A priority Critical patent/CN110290370B/en
Publication of CN110290370A publication Critical patent/CN110290370A/en
Priority to PCT/CN2020/075915 priority patent/WO2021004066A1/en
Application granted granted Critical
Publication of CN110290370B publication Critical patent/CN110290370B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

Abstract

The invention provides an image processing method and device, wherein the method comprises the following steps: receiving image data in an RCCB format; interpolating the image data in the RCCB format to calculate an R channel value, a C channel value and a B channel value of each pixel point in the image data in the RCCB format; calculating a brightness attenuation factor corresponding to each pixel point according to the R channel value, the C channel value and the B channel value of each pixel point; calculating a G channel value of each pixel point based on the R channel value, the C channel value, the B channel value and the brightness attenuation factor of each pixel point; and calculating the Y channel value, the U channel value and the V channel value of each pixel point according to the R channel value, the C channel value, the B channel value and the G channel value of each pixel point, and outputting image data in a YUV format. The image processing method provided by the invention can avoid color cast in a highlight area and ensure the quality of final imaging.

Description

Image processing method and device
Technical Field
The present invention relates to the field of image processing, and in particular, to an image processing method and apparatus.
Background
In the field of image processing, in order to prevent infrared light from causing infrared color cast and affecting the final imaging quality of an image signal, the infrared light in the image signal needs to be filtered. Generally, based on the combination of simplicity of operation and the final imaging resolution, an image sensor in RCCB format equipped with an infrared filter is used to process an image signal to filter infrared light to avoid causing an infrared color cast phenomenon. Moreover, the image sensor in the RCCB format outputs image data in the RCCB format, and the image data in the RCCB format is usually converted into image data in the YUV format with a small data size for the convenience of subsequent storage and transmission of the image data.
In the related art, the method for converting image data in RCCB format into image data in YUV format includes: the method comprises the steps of firstly calculating a corresponding G channel value according to an R channel value, a B channel value and a C channel value in image data in an RCCB format so as to obtain image data in an RGB format, and then converting the image data in the RGB format into image data in a YUV format according to a corresponding formula.
However, the method of converting the image data in the RCCB format into the image data in the YUV format in the related art is adopted, so that the color cast phenomenon is easily caused during the subsequent imaging of the image data based on the YUV format, and the final imaging quality is affected.
Disclosure of Invention
The invention aims to provide an image processing method and an image processing device, which not only provide a set of integral RCCB processing flow, but also solve the problem that the image processing method of the related art is easy to cause color cast in a highlight area.
In order to solve the above technical problem, the present invention provides an image processing method, including:
receiving image data in an RCCB format;
interpolating the image data in the RCCB format to calculate an R channel value, a C channel value and a B channel value of each pixel point in the image data in the RCCB format to obtain a full-breadth RCB image;
calculating a brightness attenuation factor corresponding to each pixel point according to the R channel value, the C channel value and the B channel value of each pixel point, wherein the brightness attenuation factor is more than 0 and less than 1;
calculating a G channel value of each pixel point based on the R channel value, the C channel value, the B channel value and the brightness attenuation factor of each pixel point, wherein the G channel value is mm multiplied by the C channel value and the brightness attenuation factor x (nn multiplied by the R channel value and the kk multiplied by the B channel value), mm is a positive number, and nn and kk are negative numbers;
and calculating the Y channel value, the U channel value and the V channel value of each pixel point according to the R channel value, the C channel value, the B channel value and the G channel value of each pixel point, and outputting image data in a YUV format.
Optionally, before performing interpolation processing on the image data in the RCCB format, the method further includes: and respectively carrying out black level correction processing and white balance processing on the image data in the RCCB format.
Optionally, the method for calculating the brightness attenuation factor of each pixel according to the R channel value, the C channel value, and the B channel value of each pixel includes:
respectively distributing a first weight value, a second weight value and a third weight value to the R channel value, the C channel value and the B channel value of each pixel point, and calculating a brightness information value of each pixel point according to the R channel value, the C channel value and the B channel value of each pixel point, the first weight value, the second weight value and the third weight value, wherein the brightness information value is used for expressing the brightness of the pixel points; and the sum of the first weight value, the second weight value and the third weight value is equal to 1;
and providing a corresponding relation between the brightness information value and the brightness attenuation factor, and determining the brightness attenuation factor of each pixel point according to the corresponding relation based on the brightness information value of each pixel point.
Optionally, the method for calculating the brightness information value of each pixel according to the R channel value, the C channel value, and the B channel value of each pixel, the first weight value, the second weight value, and the third weight value includes:
the luminance information value is equal to the first weight value × R channel value + the second weight value × C channel value + the third weight value × B channel value.
Optionally, the first weight value is 1/4; the second weight value is 1/2; the third weight value is 1/4.
Optionally, the method for calculating the G channel value of each pixel according to the R channel value, the C channel value, the B channel value, and the brightness attenuation factor of each pixel includes:
calculating a G channel value of each pixel point for the R channel value, the C channel value and the B channel value of each pixel point, the corresponding first weight value, second weight value, third weight value and brightness attenuation factor; wherein, the G channel value is mm multiplied by C channel value + brightness attenuation factor x (nn multiplied by R channel value + kk multiplied by B channel value), mm is positive number, and nn and kk are negative numbers.
Optionally, the method for calculating the Y channel value, the U channel value, and the V channel value of each pixel point according to the R channel value, the C channel value, the B channel value, and the G channel value of each pixel point includes:
calculating a Y channel value of each pixel point based on the C channel value of each pixel point, wherein the Y channel value of each pixel point is equal to the C channel value of each pixel point;
calculating a U channel value of each pixel point based on the B channel value and the G channel value of each pixel point, wherein the U channel value of each pixel point is equal to the difference value of the B channel value of each pixel point and the G channel value of each pixel point;
and calculating the V channel value of each pixel point based on the R channel value and the G channel value of each pixel point, wherein the V channel value of each pixel point is equal to the difference value of the R channel value of each pixel point and the G channel value of each pixel point.
Optionally, before receiving the image data in the RCCB format, the method further includes:
acquiring an analog signal, wherein the analog signal is subjected to infrared filtering processing;
and converting the analog signal into image data in an RCCB format and outputting the image data.
Optionally, the YUV format includes a YUV444 format.
Further, to solve the above technical problem, the present invention also provides an image processing apparatus, comprising:
the receiving module is used for receiving the image data in the RCCB format;
the interpolation module is used for carrying out interpolation processing on the RCCB format image data so as to calculate the R channel value, the C channel value and the B channel value of each pixel point in the RCCB format image data to obtain a full-width RCB image;
the brightness attenuation factor calculation module is used for calculating the brightness attenuation factor corresponding to each pixel point according to the R channel value, the C channel value and the B channel value of each pixel point, wherein the brightness attenuation factor is more than 0 and less than 1;
the G value calculating module is used for calculating the G channel value of each pixel point based on the R channel value, the C channel value, the B channel value and the brightness attenuation factor of each pixel point, wherein the G channel value is mm multiplied by the C channel value and the brightness attenuation factor is multiplied by x (nn multiplied by the R channel value and kk multiplied by the B channel value), mm is a positive number, and nn and kk are negative numbers;
and the output module is used for calculating the Y channel value, the U channel value and the V channel value of each pixel point according to the R channel value, the C channel value, the B channel value and the G channel value of each pixel point and outputting image data in a YUV format.
Optionally, the apparatus further comprises: the black level correction module is used for carrying out black level correction processing on the image data in the RCCB format;
and the white balance module is used for carrying out white balance processing on the image data in the RCCB format.
Optionally, the brightness attenuation factor calculating module includes:
the first calculation unit is used for respectively distributing a first weight value, a second weight value and a third weight value to the R channel value, the C channel value and the B channel value of each pixel point, and calculating a brightness information value of each pixel point according to the R channel value, the C channel value and the B channel value of each pixel point, the first weight value, the second weight value and the third weight value, wherein the brightness information value is used for expressing the brightness of the pixel points; and the sum of the first weight value, the second weight value and the third weight value is equal to 1;
and the second calculation unit is used for providing the corresponding relation between the brightness information value and the brightness attenuation factor, and determining the brightness attenuation factor of each pixel point according to the corresponding relation based on the brightness information value of each pixel point.
Optionally, the output module includes:
the third calculation unit is used for calculating the Y channel value of each pixel point based on the C channel value of each pixel point, wherein the Y channel value of each pixel point is equal to the C channel value of each pixel point;
a fourth calculation unit, configured to calculate a U channel value of each pixel based on the B channel value and the G channel value of each pixel, where the U channel value of each pixel is equal to a difference between the B channel value of each pixel and the G channel value of each pixel;
a fifth calculating unit, configured to calculate a V channel value of each pixel based on the R channel value and the G channel value of each pixel, where the V channel value of each pixel is equal to a difference between the R channel value of each pixel and the G channel value of each pixel;
and the output unit is used for outputting the image data in the YUV format based on the Y channel value, the U channel value and the V channel value of the pixel point.
Optionally, the apparatus further comprises:
the image sensor is provided with an infrared filter and used for acquiring an analog signal so as to convert the analog signal into image data and output the image data, wherein the analog signal is an analog signal subjected to infrared filtering processing.
Optionally, the image sensor is an image sensor in an RCCB format, and the image sensor in the RCCB format outputs image data in the RCCB format.
In summary, the image processing method and apparatus provided by the present invention introduce a brightness attenuation factor when calculating the G channel value of each pixel. Specifically, the G channel value is mm × C channel value + luminance attenuation factor x (nn × R channel value + kk × B channel value), where mm is a positive number, nn and kk are both negative numbers, and 0 < luminance attenuation factor < 1. Therefore, when calculating the G channel value of the pixel in the highlight area, even if the R channel value and the B channel value of the pixel in the highlight area are large, the G channel value calculated finally cannot be too small because the R channel value and the B channel value are multiplied by the luminance attenuation factor with the value between (0, 1), respectively. Furthermore, the color cast phenomenon of a high light area can not occur during subsequent imaging, the color reduction capability of the image is ensured, and the final imaging quality is ensured.
Drawings
Fig. 1 is a flowchart illustrating an image processing method according to an embodiment of the invention;
FIG. 2 is a schematic diagram of a lattice of image data in RCCB format with a sampling period of 4 × 4 according to an embodiment of the present invention;
FIG. 3(a, B) is a diagram illustrating an example of interpolating C-channel values, B-channel values and R-channel values in the RCCB format according to an embodiment of the present invention;
FIG. 3(c, d) is a schematic diagram of an alternative embodiment of interpolating the B channel value and the R channel value in the RCCB format;
fig. 4 is a schematic diagram illustrating a correspondence relationship between a luminance information value of a pixel and a luminance 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 luminance decay 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.
Detailed Description
As described in the background art, in the related art, a G channel value of each pixel point needs to be calculated according to an R channel value, a B channel value, and a C channel value of each pixel point in image data in an RCCB format. The specific calculation method comprises the following steps: the G channel value is mm multiplied by the C channel value + nn multiplied by the R channel value + kk multiplied by the B channel value, mm is a positive number, and nn and kk are negative numbers. Based on this, if when calculating the G channel value of the pixel point located in the highlight area, because the R channel value and the B channel value of the pixel point located in the highlight area are large, the G channel value calculated finally is small, and when performing subsequent imaging, the color cast phenomenon may occur in the highlight area, which affects the imaging quality.
Based on this, the invention provides an image processing method and an image processing device, which are used for solving the problem of color cast in a highlight area in the background technology.
The following describes the image processing method and apparatus of the present invention in further detail with reference to the accompanying drawings and specific embodiments. The advantages and features of the present invention will become more apparent from the following description. It is to be noted that the drawings are in a very simplified form and are not to precise scale, which is merely for the purpose of facilitating and distinctly claiming the embodiments of the present invention.
Fig. 1 is a flowchart illustrating an image processing method according to an embodiment of the present invention. As shown in fig. 1, the method may include:
step 10a, receiving image data in RCCB format.
And 20a, performing interpolation processing on the image data in the RCCB format to calculate an R channel value, a C channel value and a B channel value of each pixel point in the image data in the RCCB format to obtain a full-width RCB image.
And step 30a, calculating a brightness attenuation factor corresponding to each pixel point according to the R channel value, the C channel value and the B channel value of each pixel point, wherein the brightness attenuation factor is more than 0 and less than 1.
And step 40a, calculating the G channel value of each pixel point based on the R channel value, the C channel value, the B channel value and the brightness attenuation factor of each pixel point. Wherein, the G channel value is mm multiplied by C channel value + brightness attenuation factor x (nn multiplied by R channel value + kk multiplied by B channel value), mm is positive number, and nn and kk are negative numbers.
And 50a, calculating a Y channel value, a U channel value and a V channel value of each pixel point according to the R channel value, the C channel value, the B channel value and the G channel value of each pixel point, and outputting image data in a YUV format.
From the above, the image processing method provided by the present invention introduces a brightness attenuation factor when calculating the G channel value of each pixel. Specifically, the G channel value is mm × C channel value + luminance attenuation factor x (nn × R channel value + kk × B channel value), where mm is a positive number, nn and kk are both negative numbers, and 0 < luminance attenuation factor < 1. Therefore, when calculating the G channel value of the pixel in the highlight area, even if the R channel value and the B channel value of the pixel in the highlight area are large, the G channel value calculated finally cannot be too small because the R channel value and the B channel value are multiplied by the luminance attenuation factor with the value between (0, 1), respectively. Furthermore, the color cast phenomenon of a high light area can not occur during subsequent imaging, the color reduction capability of the image is ensured, and the final imaging quality is ensured.
The image processing method described above will be described in further detail below.
Wherein, before performing step 10a, the method further comprises:
an analog signal is acquired using an image sensor. The image sensor may be an image sensor in an RCCB format configured with an infrared filter, and the analog signal is specifically an analog signal after infrared filtering processing.
Then, the image sensor is used for converting the analog signal into image data in an RCCB format and outputting the image data so as to carry out the subsequent image signal processing step. Fig. 2 is a schematic diagram of a dot matrix of image data in an 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 a luminance pixel, and the quantization efficiency and the resolution of the C channel are both high.
Further, after step 10a is executed and before step 20a is executed, in order to prevent the black level in the image data from causing color cast and affecting the final imaging quality, the black level correction processing is usually performed on the RCCB format image data to subtract the black level value in the RCCB format image data, so as to prevent the black level value from causing color cast and ensure the final imaging quality. Meanwhile, the white balance processing is carried out on the image data in the RCCB format so as to further ensure the quality of final imaging.
Then, the above step 20a is executed to perform interpolation processing on the image data in RCCB format, so as to calculate the R channel value, C channel value, and B channel value of each pixel in the image data in RCCB format.
In this embodiment, the R channel value, the C channel value, and the B channel value of a certain pixel are calculated mainly according to the channel values of the pixels around the certain pixel.
Specifically, for image data in the RCCB format, when interpolating a full-format C channel, if a center pixel is R (refer to fig. 3a) or a center pixel is B (refer to fig. 3B), the corresponding C channel value may be:
Figure BDA0002120372500000081
if the center pixel point is C (refer to fig. 3C and 3d), the corresponding C channel value may be:
Figure BDA0002120372500000082
when interpolating the R channel of the full breadth, if the central pixel point is R (refer to fig. 3a), the corresponding R channel value may be:
Figure BDA0002120372500000083
if the center pixel is B (refer to fig. 3B), the corresponding R channel value may be:
Figure BDA0002120372500000084
if the center pixel is C and the horizontal direction of the center pixel is R (refer to fig. 3C), or if the center pixel is C and the horizontal direction of the center pixel is B (refer to fig. 3d), the corresponding R channel value may be:
Figure BDA0002120372500000085
when interpolating the full width B channel, if the central pixel is R (refer to fig. 3a), the corresponding B channel value may be:
Figure BDA0002120372500000086
if the center pixel point is B (refer to fig. 3B), the corresponding B channel value may be:
Figure BDA0002120372500000087
if the center pixel is C and the horizontal direction of the center pixel is R (refer to fig. 3C), or the center pixel is C and the horizontal direction of the center pixel is B (refer to fig. 3d), the corresponding B channel value may be:
Figure BDA0002120372500000088
therefore, through interpolation processing, the R channel value, the C channel value and the B channel value of each pixel point of the image data in the RCCB format can be calculated.
Then, the step 30a may be executed to calculate the brightness attenuation factor of each pixel according to the R channel value, the C channel value, and the B channel value of each pixel calculated in the step 20 a.
The step of specifically calculating the brightness attenuation factor of each pixel point in step 30a may include:
firstly, respectively allocating a first weight value, a second weight value and a third weight value to the R channel value, the C channel value and the B channel value of each pixel point, wherein the sum of the first weight value, the second weight value and the third weight value is equal to 1. And calculating the brightness information value of each pixel point according to the R channel value, the C channel value and the B channel value of each pixel, the first weight value, the second weight value and the third weight value, wherein the brightness information value can be used for expressing the brightness of the pixel points.
The method for calculating the brightness information value of each pixel point according to the R channel value, the C channel value, and the B channel value of each pixel, the first weight value, the second weight value, and the third weight value may be: the luminance information value is equal to the first weight value × R channel value + the second weight value × C channel value + the third weight value × B channel value.
It should be noted that, in this embodiment, the C channel value of each pixel point is generally larger than the sum of the B channel value and the R channel value of the pixel point. On the basis of the above-mentioned calculation formula of the luminance information value, it can be determined that: the brightness information value of each pixel point is in positive correlation with the second weight value corresponding to the C channel value of the pixel point, and the first weight value corresponding to the R channel value of the pixel point is in negative correlation with the third weight value corresponding to the B channel value of the pixel point. That is, if the second weight value corresponding to the C channel value of the pixel point is larger, correspondingly, the first weight value corresponding to the R channel value of the pixel point and the third weight value corresponding to the B channel value of the pixel point are smaller, and the calculated luminance information value of the pixel point is larger; if the first weight value corresponding to the R channel value of the pixel point is larger or the third weight value corresponding to the B channel value of the pixel point is larger, correspondingly, the second weight value corresponding to the C channel value of the pixel point is smaller, and the calculated luminance information value of the pixel point is smaller.
Then, in this embodiment, the finally calculated luminance information value of the pixel point may be adjusted by adjusting the first weight value and the third weight value, or adjusting the second weight value.
And secondly, providing a corresponding relation between the brightness information value and the brightness attenuation factor, and determining the brightness attenuation factor of each pixel point according to the corresponding relation based on the brightness information value of each pixel point.
Fig. 4 is a schematic diagram illustrating a correspondence relationship between a luminance information value of a pixel and a luminance decay factor according to an embodiment of the present invention. As shown in fig. 4, when the luminance information value of a pixel is lower than a first threshold (e.g. 180), the luminance attenuation factor of the pixel is smaller, for example, may be 0; when the luminance information value of a pixel is higher than a second threshold (e.g. 240), the luminance attenuation factor of the pixel is larger, and may be 1, for example; when the brightness information value of the pixel point is between the first threshold and the second threshold, the brightness attenuation factor of the pixel point is between (0, 1).
Therefore, the luminance information values of the pixels are different, and the corresponding luminance attenuation factors are also different. Based on this, when the brightness information value of the pixel point is adjusted by adjusting the first weight value and the third weight value or adjusting the second weight value, the brightness attenuation factor of the pixel point can be correspondingly adjusted.
Further, after the brightness attenuation factors of the pixels are calculated, the above step 40a is executed, that is, the G channel value of each pixel is calculated based on the R channel value, the C channel value, and the B channel value of each pixel calculated in the step 20a and the brightness attenuation factors of each pixel calculated in the step 30 a.
The calculation formula of the G channel value of the pixel point is specifically as follows: the G channel value is mm × C channel value + luminance attenuation factor x (nn × R channel value + kk × B channel value), mm is a positive number, and nn and kk are both negative numbers.
On this basis, if the luminance attenuation factor of a certain pixel in the highlight area calculated in the second step is 1, the R channel value and the B channel value of the pixel in the highlight area are large, so that the finally calculated G channel value of the pixel is too small, and a color cast phenomenon may be caused during subsequent imaging. If the brightness attenuation factor of a certain pixel point calculated in the second step is 0, the finally calculated G channel value of the pixel point is too large, for example, equal to the C channel value, and the color cast phenomenon is also caused in the subsequent imaging.
Therefore, in order to prevent the color cast phenomenon from occurring in the subsequent imaging due to the excessively large or small G channel value of the finally calculated pixel point, in this embodiment, the brightness attenuation factors of all the pixel points should be between (0, 1).
Specifically, the luminance information value of the pixel point can be adjusted by adjusting a first weight value corresponding to the R channel value of the pixel point, a second weight value corresponding to the C channel value of the pixel point, and a third weight value corresponding to the B channel value of the pixel point, so that the luminance information value of the pixel point is between the first threshold value and the second threshold value, and further the luminance attenuation factor of the pixel point is between (0, 1).
In this embodiment, when the second weight value is between (2/5, 3/5) and the first weight value and the third weight value are between (1/5, 3/10), the luminance information value of the pixel is between the first threshold and the second threshold, and correspondingly, the luminance attenuation factor of the pixel is between (0, 1).
Thus, the first weight value and the third weight value are enabled to be between (1/5, 3/10) (for example, the first weight value and the third weight value can be 1/4), and the second weight value is enabled to be between (2/5, 3/5) (for example, the second weight value can be 1/2), so that the calculated brightness attenuation factor of each pixel point can be ensured to be between (0, 1), the finally calculated G channel value of the pixel point cannot be too large or too small, the color cast phenomenon in subsequent imaging is prevented, the demosaicing and color correction effects are achieved, and the final imaging quality is ensured.
Then, after the G channel value of each pixel is calculated, the step 50a may be executed, that is, the Y channel value, the U channel value, and the V channel value of each pixel are calculated according to the R channel value, the C channel value, and the B channel value of each pixel calculated in the step 20a and the G channel value of each pixel calculated in the step 40a, and image data in the YUV format is output.
The method for calculating the Y channel value of each pixel point may be as follows: and determining the C channel value of each pixel point as the Y channel value of each pixel point. Moreover, since the quantization efficiency and the resolution of the C channel value are both high, when the C channel value is used as the luminance (that is, the Y channel value), the luminance information value of the pixel point under the low-light condition can be ensured, and further the luminance information of the image under the low-light condition can be ensured.
The method for calculating the U channel value of each pixel point may be as follows: and determining the difference value between the B channel value of each pixel point and the G channel value of each pixel point as the U channel value of each pixel point.
The method for calculating the V channel value of each pixel point may be as follows: and determining the difference value between the R channel value of each pixel point and the G channel value of each pixel point as the V channel value of each pixel point.
And finally, based on the Y channel value, the U channel value and the V channel value of each pixel point in the RCCB-format image data, outputting the YUV-format image data so as to facilitate subsequent storage, transmission and imaging of the image data. In this embodiment, image data in YUV444 format is specifically output.
In summary, the image processing method provided by the present invention introduces a luminance attenuation factor when calculating the G channel value of each pixel. Specifically, the G channel value is mm × C channel value + luminance attenuation factor x (nn × R channel value + kk × B channel value), where mm is a positive number, nn and kk are both negative numbers, and 0 < luminance attenuation factor < 1. Therefore, when calculating the G channel value of the pixel in the highlight area, even if the R channel value and the B channel value of the pixel in the highlight area are large, the G channel value calculated finally cannot be too small because the R channel value and the B channel value are multiplied by the luminance attenuation factor with the value between (0, 1), respectively. Furthermore, the color cast phenomenon of a high light area can not occur during subsequent imaging, the color reduction capability of the image is ensured, and the final imaging quality is ensured.
In addition, the present invention further provides an image processing apparatus, fig. 5 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present invention, and as shown in fig. 5, the apparatus may include:
a receiving module 10, configured to receive image data in RCCB format.
And the interpolation module 20 is configured to perform interpolation processing on the image data in the RCCB format to calculate an R channel value, a C channel value, and a B channel value of each pixel in the image data in the RCCB format, so as to obtain a full-width RCB image.
And the brightness attenuation factor calculation module 30 is configured to calculate a brightness attenuation factor corresponding to each pixel point according to the R channel value, the C channel value, and the B channel value of each pixel point, where the brightness attenuation factor is greater than 0 and less than 1.
And the G value calculating module 40 is configured to calculate a G channel value of each pixel based on the R channel value, the C channel value, the B channel value, and the luminance attenuation factor of each pixel, where the G channel value is mm × C channel value + luminance attenuation factor × (nn × R channel value + kk × B channel value), mm is a positive number, and nn and kk are negative numbers.
And the output module 50 is configured to calculate a Y channel value, a U channel value, and a V channel value of each pixel according to the R channel value, the C channel value, the B channel value, and the G channel value of each pixel, and output image data in a YUV format.
Optionally, fig. 6 is a schematic structural diagram of another image processing apparatus according to an embodiment of the present invention, and as shown in fig. 6, the apparatus further includes:
and a black level correction module 60, configured to perform black level correction processing on the image data in the RCCB format.
And a white balance module 70, configured to perform white balance processing on the RCCB format image data.
Optionally, fig. 7 is a schematic structural diagram of a luminance decay factor calculating module according to an embodiment of the present invention, and as shown in fig. 7, the luminance decay factor calculating module 30 includes:
the first calculating unit 31 is configured to assign a first weight value, a second weight value, and a third weight value to the R channel value, the C channel value, and the B channel value of each pixel respectively, and calculate a luminance information value of each pixel according to the R channel value, the C channel value, and the B channel value of each pixel, the first weight value, the second weight value, and the third weight value, where the luminance information value is used to represent luminance 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 calculating unit 32 is configured to provide a correspondence between the luminance information value and the luminance decay factor, and determine the luminance decay factor of each pixel point according to the correspondence based on the luminance information value of each pixel point.
Optionally, fig. 8 is a schematic structural diagram of an output module according to an embodiment of the present invention, and as shown in fig. 8, the output module 50 may include:
the third calculating unit 51 is configured to calculate a Y channel value of each pixel point based on the C channel value of each pixel point, where the Y channel value of each pixel point is equal to the C channel value of each pixel point.
The fourth calculating unit 52 is configured to calculate a U channel value of each pixel based on the B channel value and the G channel value of each pixel, where the U channel value of each pixel is equal to a difference between the B channel value of each pixel and the G channel value of each pixel.
A fifth calculating unit 53, configured to calculate a V channel value of each pixel based on the R channel value and the G channel value of each pixel, where the V channel value of each pixel is equal to a difference between the R channel value of each pixel and the G channel value of each pixel.
An output unit 54 for outputting image data in YUV format based on the Y-channel value, U-channel value, and V-channel value of each pixel.
Optionally, the apparatus may further include: the image sensor is provided with an infrared filter and used for acquiring an analog signal so as to convert the analog signal into image data and output the image data, wherein the analog signal is an analog signal subjected to infrared filtering processing.
Optionally, the image sensor may be an image sensor in an RCCB format, and the image sensor in the RCCB format outputs image data in the RCCB format.
In summary, the image processing apparatus provided by the present invention includes a luminance attenuation factor calculating module for calculating a luminance attenuation factor, and a G value calculating module for calculating a G channel value, and the luminance attenuation factor is introduced when calculating the G channel value of each pixel. Specifically, the G channel value is mm × C channel value + luminance attenuation factor x (nn × R channel value + kk × B channel value), where mm is a positive number, nn and kk are both negative numbers, and 0 < luminance attenuation factor < 1. Therefore, when calculating the G channel value of the pixel in the highlight area, even if the R channel value and the B channel value of the pixel in the highlight area are large, the G channel value calculated finally cannot be too small because the R channel value and the B channel value are multiplied by the luminance attenuation factor with the value between (0, 1), respectively. Furthermore, the color cast phenomenon of a high light area can not occur during subsequent imaging, the color reduction capability of the image is ensured, and the final imaging quality is ensured.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system disclosed by the embodiment, the description is relatively simple because the system corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description.
The above description is only for the purpose of describing the preferred embodiments of the present invention, and is not intended to limit the scope of the present invention, and any variations and modifications made by those skilled in the art based on the above disclosure are within the scope of the appended claims.

Claims (14)

1. An image processing method, characterized in that the method comprises:
receiving image data in an RCCB format;
interpolating the image data in the RCCB format to calculate an R channel value, a C channel value and a B channel value of each pixel point in the image data in the RCCB format to obtain a full-breadth RCB image;
calculating a brightness attenuation factor corresponding to each pixel point according to the R channel value, the C channel value and the B channel value of each pixel point in the image data in the RCCB format, wherein the brightness attenuation factor is more than 0 and less than 1;
calculating a G channel value of each pixel point based on the R channel value, the C channel value, the B channel value and the brightness attenuation factor of each pixel point, wherein the G channel value is mm multiplied by the C channel value and the brightness attenuation factor x (nn multiplied by the R channel value and the kk multiplied by the B channel value), mm is a positive number, and nn and kk are negative numbers;
and calculating the Y channel value, the U channel value and the V channel value of each pixel point according to the R channel value, the C channel value, the B channel value and the G channel value of each pixel point, and outputting image data in a YUV format.
2. The image processing method of claim 1, wherein before the interpolation processing of the image data in the RCCB format, the method further comprises: and respectively carrying out black level correction processing and white balance processing on the image data in the RCCB format.
3. The image processing method according to claim 1, wherein the method of calculating the luminance reduction factor of each pixel point based on the R channel value, the C channel value, and the B channel value of each pixel point comprises:
respectively distributing a first weight value, a second weight value and a third weight value to the R channel value, the C channel value and the B channel value of each pixel point, and calculating a brightness information value of each pixel point according to the R channel value, the C channel value and the B channel value of each pixel point, the first weight value, the second weight value and the third weight value, wherein the brightness information value is used for expressing the brightness of the pixel points; and the sum of the first weight value, the second weight value and the third weight value is equal to 1;
and providing a corresponding relation between the brightness information value and the brightness attenuation factor, and determining the brightness attenuation factor of each pixel point according to the corresponding relation based on the brightness information value of each pixel point.
4. The image processing method according to claim 3, wherein the method of calculating the luminance information value of each pixel point according to the R channel value, the C channel value, and the B channel value of each pixel point, and the first weight value, the second weight value, and the third weight value includes:
the luminance information value is equal to the first weight value × R channel value + the second weight value × C channel value + the third weight value × B channel value.
5. The image processing method according to claim 4, wherein the first weight value is 1/4; the second weight value is 1/2; the third weight value is 1/4.
6. The image processing method of claim 1, wherein the method of calculating the Y-channel value, the U-channel value, and the V-channel value of each pixel point according to the R-channel value, the C-channel value, the B-channel value, and the G-channel value of each pixel point comprises:
calculating a Y channel value of each pixel point based on the C channel value of each pixel point, wherein the Y channel value of each pixel point is equal to the C channel value of each pixel point;
calculating a U channel value of each pixel point based on the B channel value and the G channel value of each pixel point, wherein the U channel value of each pixel point is equal to the difference value of the B channel value of each pixel point and the G channel value of each pixel point;
and calculating the V channel value of each pixel point based on the R channel value and the G channel value of each pixel point, wherein the V channel value of each pixel point is equal to the difference value of the R channel value of each pixel point and the G channel value of each pixel point.
7. The image processing method according to claim 1, wherein before receiving the image data in RCCB format, the method further comprises:
acquiring an analog signal, wherein the analog signal is subjected to infrared filtering processing;
and converting the analog signal into image data in an RCCB format and outputting the image data.
8. The image processing method of claim 1, wherein the format of YUV comprises YUV444 format.
9. An image processing apparatus, characterized in that the apparatus comprises:
the receiving module is used for receiving the image data in the RCCB format;
the interpolation module is used for carrying out interpolation processing on the RCCB format image data so as to calculate the R channel value, the C channel value and the B channel value of each pixel point in the RCCB format image data to obtain a full-width RCB image;
the brightness attenuation factor calculation module is used for calculating the brightness attenuation factor corresponding to each pixel point according to the R channel value, the C channel value and the B channel value of each pixel point in the image data in the RCCB format, wherein the brightness attenuation factor is more than 0 and less than 1;
the G value calculating module is used for calculating the G channel value of each pixel point based on the R channel value, the C channel value, the B channel value and the brightness attenuation factor of each pixel point, wherein the G channel value is mm multiplied by the C channel value and the brightness attenuation factor is multiplied by x (nn multiplied by the R channel value and kk multiplied by the B channel value), mm is a positive number, and nn and kk are negative numbers;
and the output module is used for calculating the Y channel value, the U channel value and the V channel value of each pixel point according to the R channel value, the C channel value, the B channel value and the G channel value of each pixel point and outputting image data in a YUV format.
10. The image processing apparatus according to claim 9, wherein said apparatus further comprises: the black level correction module is used for carrying out black level correction processing on the image data in the RCCB format;
and the white balance module is used for carrying out white balance processing on the image data in the RCCB format.
11. The image processing apparatus of claim 9, wherein the brightness decay factor calculation module comprises:
the first calculation unit is used for respectively distributing a first weight value, a second weight value and a third weight value to the R channel value, the C channel value and the B channel value of each pixel point, and calculating a brightness information value of each pixel point according to the R channel value, the C channel value and the B channel value of each pixel point, the first weight value, the second weight value and the third weight value, wherein the brightness information value is used for expressing the brightness of the pixel points; and the sum of the first weight value, the second weight value and the third weight value is equal to 1;
and the second calculation unit is used for providing the corresponding relation between the brightness information value and the brightness attenuation factor, and determining the brightness attenuation factor of each pixel point according to the corresponding relation based on the brightness information value of each pixel point.
12. The image processing apparatus of claim 11, wherein the output module comprises:
the third calculation unit is used for calculating the Y channel value of each pixel point based on the C channel value of each pixel point, wherein the Y channel value of each pixel point is equal to the C channel value of each pixel point;
a fourth calculation unit, configured to calculate a U channel value of each pixel based on the B channel value and the G channel value of each pixel, where the U channel value of each pixel is equal to a difference between the B channel value of each pixel and the G channel value of each pixel;
a fifth calculating unit, configured to calculate a V channel value of each pixel based on the R channel value and the G channel value of each pixel, where the V channel value of each pixel is equal to a difference between the R channel value of each pixel and the G channel value of each pixel;
and the output unit is used for outputting the image data in the YUV format based on the Y channel value, the U channel value and the V channel value of the pixel point.
13. The image processing apparatus according to claim 9, wherein said apparatus further comprises:
the image sensor is provided with an infrared filter and used for acquiring an analog signal so as to convert the analog signal into image data and output the image data, wherein the analog signal is an analog signal subjected to infrared filtering processing.
14. The image processing apparatus of claim 13, wherein the image sensor is an RCCB-formatted image sensor that outputs RCCB-formatted image data.
CN201910604870.2A 2019-07-05 2019-07-05 Image processing method and device Active CN110290370B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910604870.2A CN110290370B (en) 2019-07-05 2019-07-05 Image processing method and device
PCT/CN2020/075915 WO2021004066A1 (en) 2019-07-05 2020-02-20 Image processing method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910604870.2A CN110290370B (en) 2019-07-05 2019-07-05 Image processing method and device

Publications (2)

Publication Number Publication Date
CN110290370A CN110290370A (en) 2019-09-27
CN110290370B true CN110290370B (en) 2020-09-18

Family

ID=68020818

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910604870.2A Active CN110290370B (en) 2019-07-05 2019-07-05 Image processing method and device

Country Status (2)

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

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110290370B (en) * 2019-07-05 2020-09-18 上海富瀚微电子股份有限公司 Image processing method and device
CN113242413B (en) * 2021-07-12 2021-09-21 深圳市艾为智能有限公司 Interpolation calculation method and system for anti-sawtooth RCCB filter array
CN113947553B (en) * 2021-12-20 2022-03-18 山东信通电子股份有限公司 Image brightness enhancement method and device
WO2023115560A1 (en) * 2021-12-24 2023-06-29 深圳市大疆创新科技有限公司 Image processing method and apparatus, and storage medium

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7964835B2 (en) * 2005-08-25 2011-06-21 Protarius Filo Ag, L.L.C. Digital cameras with direct luminance and chrominance detection
JP5832855B2 (en) * 2011-11-01 2015-12-16 クラリオン株式会社 Image processing apparatus, imaging apparatus, and image processing program
CN102752604B (en) * 2012-06-18 2015-04-29 深圳创维-Rgb电子有限公司 Image display method and intelligent device
JP5755814B2 (en) * 2012-08-27 2015-07-29 富士フイルム株式会社 Image processing apparatus, method, program, and imaging apparatus
CN104539919B (en) * 2014-12-31 2017-01-25 上海富瀚微电子股份有限公司 Demosaicing method and device of image sensor
CN104639923B (en) * 2015-02-04 2017-08-04 华为技术有限公司 A kind of method handled view data, device and terminal
US9911174B2 (en) * 2015-08-26 2018-03-06 Apple Inc. Multi-rate processing for image data in an image processing pipeline
CN107967668B (en) * 2016-10-20 2022-02-08 上海富瀚微电子股份有限公司 Image processing method and device
US11172172B2 (en) * 2016-12-30 2021-11-09 Texas Instruments Incorporated Efficient and flexible color processor
CN111988587B (en) * 2017-02-10 2023-02-07 杭州海康威视数字技术股份有限公司 Image fusion apparatus and image fusion method
CN108737747B (en) * 2017-04-18 2021-06-11 上海富瀚微电子股份有限公司 Demosaicing method and device
CN107622477A (en) * 2017-08-08 2018-01-23 成都精工华耀机械制造有限公司 A kind of RGBW images joint demosaicing and deblurring method
CN108171657B (en) * 2018-01-26 2021-03-26 上海富瀚微电子股份有限公司 Image interpolation method and device
CN110290370B (en) * 2019-07-05 2020-09-18 上海富瀚微电子股份有限公司 Image processing method and device

Also Published As

Publication number Publication date
CN110290370A (en) 2019-09-27
WO2021004066A1 (en) 2021-01-14

Similar Documents

Publication Publication Date Title
CN110290370B (en) Image processing method and device
US6842536B2 (en) Image processing apparatus, image processing method and computer program product for correcting image obtained by shooting subject
US10255888B2 (en) Merging multiple exposures to generate a high dynamic range image
JP4803178B2 (en) Image processing apparatus, computer program product, and image processing method
EP2101295B1 (en) Image processing method, image processing device, and image capturing device
DE112011101066B4 (en) IMAGE PROCESSING DEVICE AND CONTROL METHOD FOR AN IMAGE PROCESSING DEVICE
EP2523160A1 (en) Image processing device, image processing method, and program
JP2011010108A (en) Imaging control apparatus, imaging apparatus, and imaging control method
CN104869380A (en) Image processing apparatus and image processing method
EP1931134A1 (en) Imaging device
JP2006013558A (en) Image processing apparatus and image processing program
US20100277625A1 (en) Image processing apparatus, imaging apparatus, method of correction coefficient calculation, and storage medium storing image processing program
CN101686321B (en) Method and system for reducing noise in image data
US9131199B2 (en) Imaging apparatus capable of generating an appropriate color image
CN101227621A (en) Method of performing interpolation for CFA in CMOS sensor and circuit thereof
CN101627408B (en) Image signal processing apparatus and image signal processing method
CN101854469B (en) Image processing apparatus, and image processing method
US20080068472A1 (en) Digital camera and method
CN113781321B (en) Information compensation method, device and equipment for image highlight region and storage medium
CN115052137A (en) Video signal processing method and device
CN113658043A (en) Image processing method, image processing device, electronic equipment and readable storage medium
KR20130000665A (en) Method and apparatus for detecting and compensating back light frame
US8896731B2 (en) Image processing apparatus, image processing method, and camera module
JPH11146410A (en) Video camera
JP5494249B2 (en) Image processing apparatus, imaging apparatus, and image processing program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Image processing methods and devices

Granted publication date: 20200918

Pledgee: Industrial and Commercial Bank of China Limited Shanghai Caohejing Development Zone sub branch

Pledgor: SHANGHAI FULLHAN MICROELECTRONICS Co.,Ltd.

Registration number: Y2024310000194