CN105160628A - Method and device for acquiring RGB data - Google Patents

Method and device for acquiring RGB data Download PDF

Info

Publication number
CN105160628A
CN105160628A CN201510562752.1A CN201510562752A CN105160628A CN 105160628 A CN105160628 A CN 105160628A CN 201510562752 A CN201510562752 A CN 201510562752A CN 105160628 A CN105160628 A CN 105160628A
Authority
CN
China
Prior art keywords
passage
pixel
channel
image
degree
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.)
Granted
Application number
CN201510562752.1A
Other languages
Chinese (zh)
Other versions
CN105160628B (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.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201510562752.1A priority Critical patent/CN105160628B/en
Publication of CN105160628A publication Critical patent/CN105160628A/en
Priority to PCT/CN2016/098318 priority patent/WO2017041714A1/en
Application granted granted Critical
Publication of CN105160628B publication Critical patent/CN105160628B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/10Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4015Image demosaicing, e.g. colour filter arrays [CFA] or Bayer patterns
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/646Circuits for processing colour signals for image enhancement, e.g. vertical detail restoration, cross-colour elimination, contour correction, chrominance trapping filters

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Color Television Image Signal Generators (AREA)

Abstract

The invention discloses a method and device for acquiring RGB data, including acquiring a first horizontal interpolation result and a first vertical interpolation result of a pixel corresponding to the R channel/B channel in an image; acquiring the horizontal gradient and the vertical gradient of the pixel corresponding to the R channel/B channel in the image; determining that the absolute value of the difference of the horizontal gradient and the vertical gradient is greater than 0 and less than a first preset threshold, and reconstructing the pixel value of the G channel of the pixel corresponding to the R channel/B channel in the image based on the weight average of the first horizontal interpolation result and the first vertical interpolation result; reconstructing the pixel values of the R channel and the B channel of the pixel corresponding to the G channel in the image; and reconstructing the pixel value of the B channel of the pixel corresponding to the R channel in the image and the pixel value of the R channel of the pixel corresponding to the B channel in the image based on the reconstructed pixel value of the G channel of the pixel corresponding to the R channel and the B channel in the image. The method and device for acquiring RGB data reduce pseudo colour and moire and improve the visual quality of images.

Description

A kind of method and apparatus obtaining RGB data
Technical field
The present invention relates to image processing techniques, espespecially a kind of method and apparatus obtaining RGB (RGB, RedGreenBlue) data.
Background technology
Existing most of imageing sensor is as complementary metal oxide semiconductor (CMOS) (CMOS, ComplementaryMetalOxideSemiconductor), in the process obtaining image, each pixel only has one in RGB tri-channel datas, therefore, need to carry out demosaicing to image, namely utilize the method for interpolation to obtain the data lacked, thus obtain complete RGB data.
The method of existing acquisition RGB data roughly comprises:
First, the pixel value of the G passage of pixel corresponding to R passage and channel B in image is rebuild; Particularly, be described with the pixel value of the G passage rebuilding the pixel that in image, R passage is corresponding, the process of rebuilding the pixel value of the G passage of the pixel that channel B is corresponding in image is similar.According to formula Δ V i1, j1=| G i1-1, j1-G i1+1, j1|+| 2R i1, j1-R i1-2, j1-R i1+2, j1| calculate the horizontal gradient of the pixel that the i-th 1 row jth 1 arrange, according to formula Δ H i1, j1=| G i1, j1-1-G i1, j1+1|+| 2R i1, j1-R i1, j1-2-R i1, j1+2| calculate the VG (vertical gradient) of the pixel that the i-th 1 row jth 1 arrange; As △ H i1, j1< △ V i1,during j1, according to formula g i 1 , j 1 = G i 1 , j 1 - 1 + G i 1 , j 1 + 1 2 + 2 R i 1 , j 1 - R i 1 , j 1 - 2 - R i 1 , j 1 + 2 4 Rebuild the pixel value of the G passage of the pixel that the i-th 1 row jth 1 arrange; As △ H i1, j1> △ V i1, j1time, according to formula g i 1 , j 1 = G i 1 - 1 , j 1 + G i 1 + 1 , j 1 2 + 2 R i 1 , j 1 - R i 1 - 2 , j 1 - R i 1 + 2 , j 1 4 Rebuild the pixel value of the G passage of the pixel that the i-th 1 row jth 1 arrange; As △ H i1, j1=△ V i1, j1time, according to formula g i 1 , j 1 = G i 1 - 1 , j 1 + G i 1 + 1 , j 1 + G i 1 , j 1 - 1 + G i 1 , j 1 + 1 4 + 4 R i 1 , j 1 - R i 1 - 2 , j 1 - R i 1 + 2 , j 1 - R i 1 , j 1 - 2 - R i 1 , j 1 + 2 8 Rebuild the pixel value of the G passage of the pixel that the i-th 1 row jth 1 arrange.
Wherein, △ H i1, j1be the VG (vertical gradient) of the pixel that the i-th 1 row jth 1 arrange, △ V i1, j1be the horizontal gradient of the pixel that the i-th 1 row jth 1 arrange, G i1, j1-1be the pixel value of the G passage of the pixel that the i-th 1 row (j1-1) arrange, G i1, j1+1be the pixel value of the G passage of the pixel that the i-th 1 row (j1+1) arrange, R i1, j1be the pixel value of the R passage of the pixel that the i-th 1 row jth 1 arrange, R i1, j1-2be the pixel value of the R passage of the pixel that the i-th 1 row (j1-2) arrange, R i1, j1+2be the pixel value of the R passage of the pixel that the i-th 1 row (j1+2) arrange, G i1-1, j1be the pixel value of the G passage of the pixel of (i1-1) row jth 1 row, G i1+1, j1be the pixel value of the G passage of the pixel of (i1+1) row jth 1 row, R i1-2, j1be the pixel value of the R passage of the pixel of (i1-2) row jth 1 row, R i1+2, j1be the pixel value of the G passage of the pixel of (i1+2) row jth 1 row, g i1, j1the pixel value of the G passage of the pixel arranged for the i-th 1 row jth 1 of rebuilding.
Secondly, the R passage of pixel that in image, G passage is corresponding and the pixel value of channel B is rebuild.Particularly, according to formula r i 2 , j 2 = R i 2 - 1 , j 2 + R i 2 + 1 , j 2 2 + 2 G i 2 , j 2 - g i 2 - 1 , j 2 - g i 2 + 1 , j 2 2 Rebuild the pixel value of the R passage of the pixel that the i-th 2 row jth 2 arrange; According to formula b i 2 , j 2 = B i 2 , j 2 - 1 + B i 2 , j 2 + 1 2 + 2 G i 2 , j 2 - g i 2 , j 2 - 1 - g i 2 , j 2 + 1 2 Rebuild the pixel value of the channel B of the pixel that the i-th 2 row jth 2 arrange.
Wherein, r i2, j2the pixel value of the R passage of the pixel arranged for the i-th 2 row jth 2 of rebuilding, R i2-1, j2be the pixel value of the R passage of the pixel of (i2-1) row jth 2 row, R i2+1, j2be the pixel value of the R passage of the pixel of (i2+1) row jth 2 row, G i2, j2be the pixel value of the G passage of the pixel that the i-th 2 row jth 2 arrange, g i2-1, j2for the pixel value of the G passage of the pixel of (i2-1) row jth 2 row of reconstruction, g i2+1, j2for the pixel value of the G passage of the pixel of (i2+1) row jth 2 row of reconstruction, b i2, j2the pixel value of the channel B of the pixel arranged for the i-th 2 row jth 2 of rebuilding, B i2, j2-1be the pixel value of the channel B of the pixel that the i-th 2 row (j2-1) arrange, B i2, j2+1be the pixel value of the channel B of the pixel that the i-th 2 row (j2+1) arrange, g i2, j2-1the pixel value of the G passage of the pixel arranged for the i-th 2 row (j2-1) rebuild, g i2, j2+1the pixel value of the G passage of the pixel arranged for the i-th 2 row (j2+1) rebuild.
Finally, rebuild the pixel value of the channel B of the pixel that R passage is corresponding in image, and the pixel value of the R passage of the pixel that in image, channel B is corresponding; Particularly, be described for the pixel value of the channel B of rebuilding the pixel that R passage is corresponding in image, the process of rebuilding the pixel value of the R passage of the pixel that channel B is corresponding in image is similar.According to formula D 45(i3, j3)=| B i3-1, j3+1-B i3+1, j3-1|+| 2g i3, j3-g i3-1, j3+1-g i3+1, j3-1| calculate 45 degree of gradients of the pixel that the i-th 3 row jth 3 arrange, according to formula D 135(i3, j3)=| B i3-1, j3-1-B i3+1, j3+1|+| 2g i3, j3-g i3-1, j3-1-g i3+1, j3+1| calculate 135 degree of gradients of the pixel that the i-th 3 row jth 3 arrange; Work as D 45(i3, j3) <D 135time (i3, j3), according to formula b i 3 , j 3 = B i 3 - 1 , j 3 + 1 + B i 3 + 1 , j 3 - 1 2 + 2 g i 3 , j 3 - g i 3 - 1 , j 3 + 1 - g i 3 + 1 , j 3 - 1 4 Rebuild the pixel value of the channel B of the pixel that the i-th 3 row jth 3 arrange; Work as D 45(i3, j3) >D 135time (i3, j3), according to formula b i 3 , j 3 = B i 3 - 1 , j 3 - 1 + B i 3 + 1 , j 3 + 1 2 + 2 g i 3 , j 3 - g i 3 - 1 , j 3 - 1 - g i 3 + 1 , j 3 + 1 4 Rebuild the pixel value of the channel B of the pixel that the i-th 3 row jth 3 arrange; Work as D 45(i3, j3)=D 135time (i3, j3), according to formula b i 3 , j 3 = B i 3 - 1 , j 3 - 1 + B i 3 + 1 , j 3 - 1 + B i 3 - 1 , j 3 - 1 + B i 3 + 1 , j 3 + 1 2 + 4 g i 3 , j 3 - g i 3 - 1 , j 3 - 1 - g i 3 + 1 , j 3 - 1 - g i 3 - 1 , j 3 - 1 - g i 3 + 1 , j 3 + 1 4 Rebuild the pixel value of the channel B of the pixel that the i-th 3 row jth 3 arrange.
Wherein, D 45(i3, j3) is 45 degree of gradients of the pixel that the i-th 3 row jth 3 arrange, D 135(i3, j3) is 145 degree of gradients of the pixel that the i-th 3 row jth 3 arrange, B i3-1, j3+1be the pixel value of the channel B of the pixel that (i3-1) row (j3+1) arranges, B i3+1, j3-1be the pixel value of the channel B of the pixel that (i3+1) row (j3-1) arranges, g i3, j3the pixel value of the G passage of the pixel arranged for the i-th 3 row jth 3 of rebuilding, g i3-1, j3+1for the pixel value of the G passage of pixel that (i3-1) row (j3+1) rebuild arranges, g i3+1, j3-1for the pixel value of the G passage of pixel that (i3+1) row (j3-1) rebuild arranges, B i3-1, j3 -1be the pixel value of the channel B of the pixel that (i3-1) row (j3-1) arranges, B i3+1, j3+1be the pixel value of the channel B of the pixel that (i3+1) row (j3+1) arranges, g i3-1, j3-1for the pixel value of the G passage of pixel that (i3-1) row (j3-1) rebuild arranges, g i3+1, j3+1for the pixel value of the G passage of pixel that (i3+1) row (j3+1) rebuild arranges.
In the method for existing acquisition RGB data, because inappropriate neighbor interpolation on average causes occurring pseudo-colours and moire fringes, and this pseudo-colours and moire fringes can have a strong impact on the visual quality of image.
Summary of the invention
In order to solve the problem, the present invention proposes a kind of method and apparatus obtaining RGB data, pseudo-colours and moire fringes can be reduced, thus improve the visual quality of image.
In order to achieve the above object, the present invention proposes a kind of method obtaining RGB data, comprising:
Obtain the first Horizontal interpolation result and the first vertical interpolation result of the pixel that R passage/channel B is corresponding in image; Obtain horizontal gradient and the VG (vertical gradient) of the pixel that R passage/channel B is corresponding in image;
Judge that the absolute value of the difference between the horizontal gradient of acquisition and VG (vertical gradient) is greater than 0 and is less than the first predetermined threshold value, rebuild the pixel value of the G passage of the pixel that R passage/channel B is corresponding in image according to the first Horizontal interpolation result of acquisition and the weighted mean of the first differential vertical result;
Rebuild the R passage of pixel and the pixel value of channel B that in image, G passage is corresponding;
The pixel value of the channel B of the pixel that R passage is corresponding in image is rebuild according to the pixel value of the G passage of the reconstruction of R passage in image and pixel corresponding to channel B, and the pixel value of the R passage of the pixel that in image, channel B is corresponding.
Further, when judging that the absolute value of the difference between described horizontal gradient and described VG (vertical gradient) equals 0, the method also comprises:
The pixel value of the G passage of the pixel that R passage/channel B is corresponding in described image is rebuild according to the mean value of described first Horizontal interpolation result and described first differential vertical result.
Further, the pixel value that the described mean value according to the first Horizontal interpolation result and the first differential vertical result rebuilds the G passage of the pixel that R passage/channel B is corresponding in image comprises:
According to formula rebuild the pixel value of the G passage of the pixel that R passage/channel B is corresponding in described image;
Wherein, g i1, j1for the pixel value of the G passage of the reconstruction of pixel corresponding to R passage/channel B in described image, g1 i1, j1for described first Horizontal interpolation result, g2 i1, j1for described first vertical interpolation result.
Further, when judging that the absolute value of the difference between described horizontal gradient and described VG (vertical gradient) is greater than described first predetermined threshold value, and when described horizontal gradient is less than described VG (vertical gradient), the method also comprises:
The pixel value of the G passage of the pixel that R passage/channel B is corresponding in described image is rebuild according to described first Horizontal interpolation result.
Further, when judging that the absolute value of the difference between described horizontal gradient and described VG (vertical gradient) is greater than described first predetermined threshold value, and when described horizontal gradient is greater than described VG (vertical gradient), the method also comprises:
The pixel value of the G passage of the pixel that R passage/channel B is corresponding in described image is rebuild according to described first vertical interpolation result.
Further, in described acquisition image, the first Horizontal interpolation result of the pixel that R passage/channel B is corresponding and the first vertical interpolation result comprise:
According to formula g 1 i 1 , j 1 = G i 1 - 1 , j 1 + G i 1 + 1 , j 1 2 + 2 A i 1 , j 1 - A i 1 - 2 , j 1 - A i 1 + 2 , j 1 4 Calculate the first Horizontal interpolation result of the pixel that in described image, R passage/channel B is corresponding;
According to formula g 2 i 1 , j 1 = G i 1 , j 1 - 1 + G i 1 , j 1 + 1 2 + 2 A i 1 , j 1 - A i 1 , j 1 - 2 - A i 1 , j 1 + 2 4 Calculate the first vertical interpolation result of the pixel that in described image, R passage/channel B is corresponding;
Wherein, g1 i1, j1for described first Horizontal interpolation result, g2 i1, j1for described first vertical interpolation result, G i1, j1-1the pixel value of the G passage of the pixel arranged for the i-th 1 row (j1-1) in described image, G i1, j1+1the pixel value of the G passage of the pixel arranged for the i-th 1 row (j1+1) in described image, A i1, j1the pixel value of the R passage/channel B of the pixel arranged for the i-th 1 row jth 1 in described image, A i1, j1-2the pixel value of the R passage/channel B of the pixel arranged for the i-th 1 row (j1-2) in described image, A i1, j1+2the pixel value of the R passage/channel B of the pixel arranged for the i-th 1 row (j1+2) in described image; G i1-1, j1for the pixel value of the G passage of the pixel of (i1-1) row jth 1 row in described image, G i1+1, j1for the pixel value of the G passage of the pixel of (i1+1) row jth 1 row in described image, A i1-2, j1for the pixel value of the R passage/channel B of the pixel of (i1-2) row jth 1 row in described image, A i1+2, j1for the pixel value of the R passage/channel B of the pixel of (i1+2) row jth 1 row in described image.
Further, in described acquisition image, the horizontal gradient of the pixel that R passage/channel B is corresponding and VG (vertical gradient) comprise:
According to formula Δ H1 i1, j1+ | G i1-1, j1-G i1+1, j1|+| 2A i1, j1-G i1-1, j1-G i1+1, j1| calculate the horizontal gradient of the pixel that R passage/channel B is corresponding in described image;
According to formula Δ H2 i1, j1=| G i1, j1-1-G i1, j1+1|+| 2A i1, j1-G i1, j1-1-G i1, j1+1| calculate the VG (vertical gradient) of the pixel that R passage/channel B is corresponding in described image;
Wherein, △ H1 i1, j1for described horizontal gradient, △ H2 i1, j1for described VG (vertical gradient).
Further, the pixel value that the weighted mean of described the first Horizontal interpolation result according to obtaining and the first differential vertical result rebuilds the G passage of the pixel that R passage/channel B is corresponding in image comprises:
According to formula rebuild the pixel value of the G passage of the reconstruction of the pixel that R passage/channel B is corresponding in described image;
Wherein, g i1, j1for the pixel value of the G passage of the reconstruction of pixel corresponding to R passage/channel B in described image.
Further, in described reconstruction image, the pixel value of the R passage/channel B of the pixel that G passage is corresponding comprises:
Obtain the second Horizontal interpolation result or the second vertical interpolation result of the pixel that in described image, G passage is corresponding, rebuild the pixel value of the R passage/channel B of the pixel that G passage is corresponding in described image according to described second Horizontal interpolation result or described second vertical interpolation result.
Further, in described acquisition image, the second Horizontal interpolation result of the pixel that G passage is corresponding or the second vertical interpolation result comprise:
According to formula a 1 i 2 , j 2 = A i 2 - 1 , j 2 + A i 2 + 1 , j 2 2 + 2 G i 2 , j 2 - G i 2 - 2 , j 2 - G i 2 + 2 , j 2 4 Calculate the second Horizontal interpolation result of the pixel that in described image, G passage is corresponding;
Or according to formula a 2 i 2 , j 2 = A i 2 , j 2 - 1 + A i 2 , j 2 + 1 2 + 2 G i 2 , j 2 - G i 2 , j 2 - 2 - G i 2 , j 2 + 2 4 Calculate the second vertical interpolation result of the pixel that in described image, G passage is corresponding;
Wherein, a1 i2, j2for described second Horizontal interpolation result, a2 i2, j2for described second vertical interpolation result, A i2-1, j2for the pixel value of the R passage/channel B of the pixel of (i2-1) row jth 2 row in described image, A i2+1, j2for the pixel value of the R passage/channel B of the pixel of (i2+1) row jth 2 row in described image, G i2, j2the pixel value of the G passage of the pixel arranged for the i-th 2 row jth 2 in described image, G i2-2, j2for the pixel value of the G passage of the pixel of (i2-2) row jth 2 row in described image, G i2+2, j2for the pixel value of the G passage of the pixel of (i2+2) row jth 2 row in described image, A i2, j2-1the pixel value of the R passage/channel B of the pixel arranged for the i-th 2 row (j2-1) in described image, A i2, j2+1the pixel value of the R passage/channel B of the pixel arranged for the i-th 2 row (j2+1) in described image, G i2, j2-2the pixel value of the G passage of the pixel arranged for the i-th 2 row (j2-2) in described image, G i2, j2+2the pixel value of the G passage of the pixel arranged for the i-th 2 row (j2+2) in described image.
Further, the pixel value that the pixel value of the G passage of the described reconstruction according to R passage in image and pixel corresponding to channel B rebuilds the channel B/R passage of the pixel that R passage/channel B is corresponding in image comprises:
45 degree of interpolation results of the pixel that R passage/channel B is corresponding and 135 degree of interpolation results in image according to the calculated for pixel values of the G passage of the reconstruction of R passage in described image and pixel corresponding to channel B, and calculate 45 degree of gradients and 135 degree of gradients of the pixel that channel B in described image/R passage is corresponding;
Judge that the absolute value of the difference between described 45 degree of gradients and described 135 degree of gradients is greater than 0 and is less than the second predetermined threshold value, rebuild the pixel value of the channel B/R passage of the pixel that R passage/channel B is corresponding in described image according to the weighted mean of described 45 degree of interpolation results and described 135 degree of interpolation results.
Further, when judging that the absolute value of the difference between described 45 degree of gradients and described 135 degree of gradients equals 0, in the pixel value reconstruction image of the pixel value of the described pixel corresponding according to G passage in image and the G passage of reconstruction, the pixel value of the channel B/R passage of the pixel that R passage/channel B is corresponding also comprises:
The pixel value of the channel B/R passage of the pixel that R passage/channel B is corresponding in described image is rebuild according to the mean value of described 45 degree of interpolation results and described 135 degree of interpolation results.
Further, the pixel value that the described mean value according to 45 degree of interpolation results and 135 degree of interpolation results rebuilds the channel B/R passage of the pixel that R passage/channel B is corresponding in image comprises:
According to formula rebuild the pixel value of the channel B/R passage of the pixel that R passage/channel B is corresponding in described image;
Wherein, a i3, j3for the pixel value of the channel B/R passage of the reconstruction of pixel corresponding to R passage/channel B in described image, a1 i3, j3for described 45 degree of interpolation results, a2 i3, j3for described 135 degree of interpolation results.
Further, when judging that the absolute value of the difference between described 45 degree of gradients and described 135 degree of gradients is greater than described second predetermined threshold value, and described 45 degree of gradients are when being less than described 135 degree of gradients, the pixel value that the pixel value of the pixel value of the described pixel corresponding according to G passage in image and the G passage of reconstruction rebuilds the channel B/R passage of the pixel that R passage/channel B is corresponding in image also comprises:
The pixel value of the channel B/R passage of the pixel that R passage/channel B is corresponding in described image is rebuild according to described 45 degree of interpolation results.
Further, when judging that the absolute value of the difference between described 45 degree of gradients and described 135 degree of gradients is greater than described second predetermined threshold value, and described 45 degree of gradients are when being greater than described 135 degree of gradients, the pixel value that the pixel value of the pixel value of the described pixel corresponding according to G passage in image and the G passage of reconstruction rebuilds the channel B/R passage of the pixel that R passage/channel B is corresponding in image also comprises:
The pixel value of the channel B/R passage of the pixel that R passage/channel B is corresponding in described image is rebuild according to described 135 degree of interpolation results.
Further, in the calculated for pixel values image of the G passage of the described reconstruction according to R passage in image and pixel corresponding to channel B, 45 degree of interpolation results of the pixel that R passage/channel B is corresponding and 135 degree of interpolation results comprise:
According to formula a 1 i 3 , j 3 = A i 3 - 1 , j 3 + 1 + A i 3 + 1 , j 3 - 1 2 + 2 g i 3 , j 3 - g i 3 - 1 , j 3 + 1 - g i 3 + 1 , j 3 - 1 4 Calculate 45 degree of interpolation results of the pixel that in described image, R passage/channel B is corresponding;
According to formula a 2 i 3 , j 3 = A i 3 - 1 , j 3 - 1 + A i 3 + 1 , j 3 + 1 2 + 2 g i 3 , j 3 - g i 3 - 1 , j 3 - 1 - g i 3 + 1 , j 3 + 1 4 Calculate 135 degree of interpolation results of the pixel that in described image, R passage/channel B is corresponding;
Wherein, a1 i3, j3for described 45 degree of interpolation results, a2 i3, j3for described 135 degree of interpolation results, A i3 -1, j3+1the pixel value of the R passage/channel B of the pixel arranged for (i3-1) row (j3+1) in described image, A i3+1, j3-1the pixel value of the R passage/channel B of the pixel arranged for (i3+1) row (j3-1) in described image, g i3, j3the pixel value of the G passage of the reconstruction of the pixel arranged for the i-th 3 row jth 3 in described image, g i3-1, j3+1the pixel value of the G passage of the reconstruction of the pixel arranged for (i3-1) row (j3+1) in described image, g i3+1, j3-1the pixel value of the G passage of the reconstruction of the pixel arranged for (i3+1) row (j3-1) in described image, A i3-1, j3-1the pixel value of the R passage/channel B of the pixel arranged for (i3-1) row (j3-1) in described image, A i3+1, j3+1the pixel value of the R passage/channel B of the pixel arranged for (i3+1) row (j3+1) in described image, g i3-1, j3-1the pixel value of the G passage of the reconstruction of the pixel arranged for (i3-1) row (j3-1) in described image, g i3+1, j3+1the pixel value of the G passage of the reconstruction of the pixel arranged for (i3+1) row (j3+1) in described image.
Further, 45 degree of gradients and 135 degree of gradients of the pixel that channel B in described computed image/R passage is corresponding comprise:
According to formula D 45(i3, j3)=| A i3-1, j3+1-A i3+1, j3-1|+| 2C i3, j3-A i3-1, j3+1-A i3+1, j3-1| calculate 45 degree of gradients of the pixel that channel B in described image/R passage is corresponding;
According to formula D 135(i3, j3)=| A i3-1, j3-1-A i3+1, j3+1|+| 2C i3, j3-A i3-1, j3-1-A i3+1, j3+1| calculate 135 degree of gradients of the pixel that channel B in described image/R passage is corresponding;
Wherein, D 45(i3, j3) is described 45 degree of gradients, D 135(i3, j3) is described 135 degree of gradients, C i3, j3the pixel value of the channel B/R passage of the pixel arranged for the i-th 3 row jth 3 in described image.
Further, the pixel value that the described weighted mean according to 45 degree of interpolation results and 135 degree of interpolation results rebuilds the channel B/R passage of the pixel that R passage/channel B is corresponding in image comprises:
According to formula rebuild the pixel value of the channel B/R passage of the pixel that R passage/channel B is corresponding in described image;
Wherein, a i3, j3for the pixel value of the channel B/R passage of the reconstruction of pixel corresponding to R passage/channel B in described image.
The invention allows for a kind of device obtaining RGB data, at least comprise:
Acquisition module, for obtaining the first Horizontal interpolation result and the first vertical interpolation result of the pixel that in image, R passage/channel B is corresponding; Obtain horizontal gradient and the VG (vertical gradient) of the pixel that R passage/channel B is corresponding in image;
First rebuilds module, for judging that the absolute value of the difference between the horizontal gradient of acquisition and VG (vertical gradient) is greater than 0 and is less than the first predetermined threshold value, rebuild the pixel value of the G passage of the pixel that R passage/channel B is corresponding in image according to the first Horizontal interpolation result of acquisition and the weighted mean of the first differential vertical result;
Second rebuilds module, for the pixel value of the R passage and channel B of rebuilding the pixel that in image, G passage is corresponding; The pixel value of the channel B of the pixel that R passage is corresponding in image is rebuild according to the pixel value of the G passage of the reconstruction of R passage in image and pixel corresponding to channel B, and the pixel value of the R passage of the pixel that in image, channel B is corresponding.
Further, described first rebuild module also for:
When judging that the absolute value of the difference between described horizontal gradient and described VG (vertical gradient) equals 0, rebuild the pixel value of the G passage of the pixel that R passage/channel B is corresponding in described image according to the mean value of described first Horizontal interpolation result and described first differential vertical result.
Further, described first rebuild module also for:
When judging that the absolute value of the difference between described horizontal gradient and described VG (vertical gradient) is greater than described first predetermined threshold value, and described horizontal gradient is when being less than described VG (vertical gradient), rebuild the pixel value of the G passage of the pixel that R passage/channel B is corresponding in described image according to described first Horizontal interpolation result.
Further, described first rebuild module also for:
When judging that the absolute value of the difference between described horizontal gradient and described VG (vertical gradient) is greater than described first predetermined threshold value, and described horizontal gradient is when being greater than described VG (vertical gradient), rebuild the pixel value of the G passage of the pixel that R passage/channel B is corresponding in described image according to described first vertical interpolation result.
Further, described second rebuild module specifically for:
Obtain the second Horizontal interpolation result or the second vertical interpolation result of the pixel that in described image, G passage is corresponding, rebuild the pixel value of the R passage/channel B of the pixel that G passage is corresponding in described image according to described second Horizontal interpolation result or described second vertical interpolation result;
The pixel value of the channel B of the pixel that R passage is corresponding in image is rebuild according to the pixel value of the G passage of the reconstruction of R passage in image and pixel corresponding to channel B, and the pixel value of the R passage of the pixel that in image, channel B is corresponding.
Further, described second rebuild module specifically for:
Rebuild the R passage of pixel and the pixel value of channel B that in image, G passage is corresponding;
45 degree of interpolation results of the pixel that R passage/channel B is corresponding and 135 degree of interpolation results in image according to the calculated for pixel values of the G passage of the reconstruction of R passage in described image and pixel corresponding to channel B, and calculate 45 degree of gradients and 135 degree of gradients of the pixel that channel B in described image/R passage is corresponding;
Judge that the absolute value of the difference between described 45 degree of gradients and described 135 degree of gradients is greater than 0 and is less than the second predetermined threshold value, rebuild the pixel value of the channel B/R passage of the pixel that R passage/channel B is corresponding in described image according to the weighted mean of described 45 degree of interpolation results and described 135 degree of interpolation results.
Further, described second rebuild module also for:
When judging that the absolute value of the difference between described 45 degree of gradients and described 135 degree of gradients equals 0, rebuild the pixel value of the channel B/R passage of the pixel that R passage/channel B is corresponding in described image according to the mean value of described 45 degree of interpolation results and described 135 degree of interpolation results.
Further, described second rebuild module also for:
When judging that the absolute value of the difference between described 45 degree of gradients and described 135 degree of gradients is greater than described second predetermined threshold value, and described 45 degree of gradients are when being less than described 135 degree of gradients, rebuild the pixel value of the channel B/R passage of the pixel that R passage/channel B is corresponding in described image according to described 45 degree of interpolation results.
Further, described second rebuild module also for:
When judging that the absolute value of the difference between described 45 degree of gradients and described 135 degree of gradients is greater than described second predetermined threshold value, and described 45 degree of gradients are when being greater than described 135 degree of gradients, rebuild the pixel value of the channel B/R passage of the pixel that R passage/channel B is corresponding in described image according to described 135 degree of interpolation results.
Compared with prior art, technical scheme of the present invention comprises: the first Horizontal interpolation result and the first vertical interpolation result that obtain the pixel that R passage/channel B is corresponding in image; Obtain horizontal gradient and the VG (vertical gradient) of the pixel that R passage/channel B is corresponding in image; Judge that the absolute value of the difference between the horizontal gradient of acquisition and VG (vertical gradient) is greater than 0 and is less than the first predetermined threshold value, rebuild the pixel value of the G passage of the pixel that R passage/channel B is corresponding in image according to the first Horizontal interpolation result of acquisition and the weighted mean of the first differential vertical result; Rebuild the R passage of pixel and the pixel value of channel B that in image, G passage is corresponding; The pixel value of the channel B of the pixel that R passage is corresponding in image is rebuild according to the pixel value of the G passage of the reconstruction of R passage in image and pixel corresponding to channel B, and the pixel value of the R passage of the pixel that in image, channel B is corresponding.Pass through the solution of the present invention, when the absolute value of the difference between the horizontal gradient obtained and VG (vertical gradient) is greater than 0 and is less than the first predetermined threshold value, the pixel value of the G passage of R passage in image or pixel corresponding to channel B is rebuild according to the weighted mean of the first Horizontal interpolation result obtained and the first differential vertical result, decrease pseudo-colours and moire fringes, thus improve the visual quality of image.
Accompanying drawing explanation
Be described the accompanying drawing in the embodiment of the present invention below, the accompanying drawing in embodiment is for a further understanding of the present invention, is used from explanation the present invention, does not form limiting the scope of the invention with instructions one.
Fig. 1 is the hardware configuration schematic diagram of the mobile terminal realizing each embodiment of the present invention;
Fig. 2 is the wireless communication system schematic diagram of mobile terminal as shown in Figure 1;
Fig. 3 is the process flow diagram that the present invention obtains the method for RGB data;
Fig. 4 is the schematic diagram of image of the present invention;
Fig. 5 is the structure composition schematic diagram that the present invention obtains the device of RGB data.
The realization of the object of the invention, functional characteristics and advantage will in conjunction with the embodiments, are described further with reference to accompanying drawing.
Embodiment
For the ease of the understanding of those skilled in the art, below in conjunction with accompanying drawing, the invention will be further described, can not be used for limiting the scope of the invention.It should be noted that, when not conflicting, the various modes in the embodiment in the application and embodiment can combine mutually.
Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
The mobile terminal realizing each embodiment of the present invention is described referring now to accompanying drawing.In follow-up description, use the suffix of such as " module ", " parts " or " unit " for representing element only in order to be conducive to explanation of the present invention, itself is specific meaning not.Therefore, " module " and " parts " can mixedly use.
Mobile terminal can be implemented in a variety of manners.Such as, the terminal described in the present invention can comprise the such as mobile terminal of mobile phone, smart phone, notebook computer, digit broadcasting receiver, PDA (personal digital assistant), PAD (panel computer), PMP (portable media player), guider etc. and the fixed terminal of such as digital TV, desk-top computer etc.Below, suppose that terminal is mobile terminal.But it will be appreciated by those skilled in the art that except the element except being used in particular for mobile object, structure according to the embodiment of the present invention also can be applied to the terminal of fixed type.
Fig. 1 is the hardware configuration signal of the mobile terminal realizing each embodiment of the present invention.
Mobile terminal 100 can comprise wireless communication unit 110, A/V (audio/video) input block 120, user input unit 130, sensing cell 140, output unit 150, storer 160, interface unit 170, controller 180 and power supply unit 190 etc.Fig. 1 shows the mobile terminal with various assembly, it should be understood that, does not require to implement all assemblies illustrated.Can alternatively implement more or less assembly.Will be discussed in more detail below the element of mobile terminal.
Wireless communication unit 110 generally includes one or more assembly, and it allows the wireless communication between mobile terminal 100 and wireless communication system or network.Such as, wireless communication unit can comprise at least one in broadcast reception module 111, mobile communication module 112, wireless Internet module 113, short range communication module 114 and positional information module 115.
Broadcast reception module 111 via broadcast channel from external broadcasting management server receiving broadcast signal and/or broadcast related information.Broadcast channel can comprise satellite channel and/or terrestrial channel.Broadcast management server can be generate and send the server of broadcast singal and/or broadcast related information or the broadcast singal generated before receiving and/or broadcast related information and send it to the server of terminal.Broadcast singal can comprise TV broadcast singal, radio signals, data broadcasting signal etc.And broadcast singal may further include the broadcast singal combined with TV or radio signals.Broadcast related information also can provide via mobile communications network, and in this case, broadcast related information can be received by mobile communication module 112.Broadcast singal can exist in a variety of manners, such as, it can exist with the form of the electronic service guidebooks (ESG) of the electronic program guides of DMB (DMB) (EPG), digital video broadcast-handheld (DVB-H) etc.Broadcast reception module 111 can by using the broadcast of various types of broadcast system Received signal strength.Especially, broadcast reception module 111 can by using such as multimedia broadcasting-ground (DMB-T), DMB-satellite (DMB-S), digital video broadcasting-hand-held (DVB-H), forward link media (MediaFLO ) Radio Data System, received terrestrial digital broadcasting integrated service (ISDB-T) etc. digit broadcasting system receive digital broadcasting.Broadcast reception module 111 can be constructed to be applicable to providing the various broadcast system of broadcast singal and above-mentioned digit broadcasting system.The broadcast singal received via broadcast reception module 111 and/or broadcast related information can be stored in storer 160 (or storage medium of other type).
Radio signal is sent at least one in base station (such as, access point, Node B etc.), exterior terminal and server and/or receives radio signals from it by mobile communication module 112.Various types of data that such radio signal can comprise voice call signal, video calling signal or send according to text and/or Multimedia Message and/or receive.
Wireless Internet module 113 supports the Wi-Fi (Wireless Internet Access) of mobile terminal.This module can be inner or be externally couple to terminal.Wi-Fi (Wireless Internet Access) technology involved by this module can comprise WLAN (WLAN) (Wi-Fi), Wibro (WiMAX), Wimax (worldwide interoperability for microwave access), HSDPA (high-speed downlink packet access) etc.
Short range communication module 114 is the modules for supporting junction service.Some examples of short-range communication technology comprise bluetooth tM, radio-frequency (RF) identification (RFID), Infrared Data Association (IrDA), ultra broadband (UWB), purple honeybee tMetc..
Positional information module 115 is the modules of positional information for checking or obtain mobile terminal.The typical case of positional information module is GPS (GPS).According to current technology, GPS module 115 calculates from the range information of three or more satellite and correct time information and for the Information application triangulation calculated, thus calculates three-dimensional current location information according to longitude, latitude and pin-point accuracy.Current, the method for calculating position and temporal information uses three satellites and by using the error of the position that goes out of an other satellite correction calculation and temporal information.In addition, GPS module 115 can carry out computing velocity information by Continuous plus current location information in real time.
A/V input block 120 is for audio reception or vision signal.A/V input block 120 can comprise camera 121 and microphone 1220, and the view data of camera 121 to the static images obtained by image capture apparatus in Video Capture pattern or image capture mode or video processes.Picture frame after process may be displayed on display unit 151.Picture frame after camera 121 processes can be stored in storer 160 (or other storage medium) or via wireless communication unit 110 and send, and can provide two or more cameras 1210 according to the structure of mobile terminal.Such acoustic processing can via microphones sound (voice data) in telephone calling model, logging mode, speech recognition mode etc. operational mode, and can be voice data by microphone 122.Audio frequency (voice) data after process can be converted to the formatted output that can be sent to mobile communication base station via mobile communication module 112 when telephone calling model.Microphone 122 can be implemented various types of noise and eliminate (or suppress) algorithm and receiving and sending to eliminate (or suppression) noise or interference that produce in the process of sound signal.
User input unit 130 can generate key input data to control the various operations of mobile terminal according to the order of user's input.User input unit 130 allows user to input various types of information, and keyboard, the young sheet of pot, touch pad (such as, detecting the touch-sensitive assembly of the change of the resistance, pressure, electric capacity etc. that cause owing to being touched), roller, rocking bar etc. can be comprised.Especially, when touch pad is superimposed upon on display unit 151 as a layer, touch-screen can be formed.
Sensing cell 140 detects the current state of mobile terminal 100, (such as, mobile terminal 100 open or close state), the position of mobile terminal 100, user for mobile terminal 100 contact (namely, touch input) presence or absence, the orientation of mobile terminal 100, the acceleration or deceleration of mobile terminal 100 move and direction etc., and generate order or the signal of the operation for controlling mobile terminal 100.Such as, when mobile terminal 100 is embodied as sliding-type mobile phone, sensing cell 140 can sense this sliding-type phone and open or close.In addition, whether whether sensing cell 140 can detect power supply unit 190 provides electric power or interface unit 170 to couple with external device (ED).Sensing cell 140 can comprise proximity transducer 1410 and will be described this in conjunction with touch-screen below.
Interface unit 170 is used as at least one external device (ED) and is connected the interface that can pass through with mobile terminal 100.Such as, external device (ED) can comprise wired or wireless head-band earphone port, external power source (or battery charger) port, wired or wireless FPDP, memory card port, for connecting the port, audio frequency I/O (I/O) port, video i/o port, ear port etc. of the device with identification module.Identification module can be that storage uses the various information of mobile terminal 100 for authentication of users and can comprise subscriber identification module (UIM), client identification module (SIM), Universal Subscriber identification module (USIM) etc.In addition, the device (hereinafter referred to " recognition device ") with identification module can take the form of smart card, and therefore, recognition device can be connected with mobile terminal 100 via port or other coupling arrangement.Interface unit 170 may be used for receive from external device (ED) input (such as, data message, electric power etc.) and the input received be transferred to the one or more element in mobile terminal 100 or may be used for transmitting data between mobile terminal and external device (ED).
In addition, when mobile terminal 100 is connected with external base, interface unit 170 can be used as to allow by it electric power to be provided to the path of mobile terminal 100 from base or can be used as the path that allows to be transferred to mobile terminal by it from the various command signals of base input.The various command signal inputted from base or electric power can be used as and identify whether mobile terminal is arranged on the signal base exactly.Output unit 150 is constructed to provide output signal (such as, sound signal, vision signal, alarm signal, vibration signal etc.) with vision, audio frequency and/or tactile manner.Output unit 150 can comprise display unit 151, dio Output Modules 152, alarm unit 153 etc.
Display unit 151 may be displayed on the information of process in mobile terminal 100.Such as, when mobile terminal 100 is in telephone calling model, display unit 151 can show with call or other communicate (such as, text messaging, multimedia file are downloaded etc.) be correlated with user interface (UI) or graphic user interface (GUI).When mobile terminal 100 is in video calling pattern or image capture mode, display unit 151 can the image of display capture and/or the image of reception, UI or GUI that video or image and correlation function are shown etc.
Meanwhile, when display unit 151 and touch pad as a layer superposed on one another to form touch-screen time, display unit 151 can be used as input media and output unit.Display unit 151 can comprise at least one in liquid crystal display (LCD), thin film transistor (TFT) LCD (TFT-LCD), Organic Light Emitting Diode (OLED) display, flexible display, three-dimensional (3D) display etc.Some in these displays can be constructed to transparence and watch from outside to allow user, and this can be called transparent display, and typical transparent display can be such as TOLED (transparent organic light emitting diode) display etc.According to the specific embodiment wanted, mobile terminal 100 can comprise two or more display units (or other display device), such as, mobile terminal can comprise outernal display unit (not shown) and inner display unit (not shown).Touch-screen can be used for detecting touch input pressure and touch input position and touch and inputs area.
When dio Output Modules 152 can be under the isotypes such as call signal receiving mode, call mode, logging mode, speech recognition mode, broadcast reception mode at mobile terminal, voice data convert audio signals that is that wireless communication unit 110 is received or that store in storer 160 and exporting as sound.And dio Output Modules 152 can provide the audio frequency relevant to the specific function that mobile terminal 100 performs to export (such as, call signal receives sound, message sink sound etc.).Dio Output Modules 152 can comprise loudspeaker, hummer etc.
Alarm unit 153 can provide and export that event informed to mobile terminal 100.Typical event can comprise calling reception, message sink, key signals input, touch input etc.Except audio or video exports, alarm unit 153 can provide in a different manner and export with the generation of notification event.Such as, alarm unit 153 can provide output with the form of vibration, when receive calling, message or some other enter communication (incomingcommunication) time, alarm unit 153 can provide sense of touch to export (that is, vibrating) to notify to user.By providing such sense of touch to export, even if when the mobile phone of user is in the pocket of user, user also can identify the generation of various event.Alarm unit 153 also can provide the output of the generation of notification event via display unit 151 or dio Output Modules 152.
Storer 160 software program that can store process and the control operation performed by controller 180 etc., or temporarily can store oneself through exporting the data (such as, telephone directory, message, still image, video etc.) that maybe will export.And, storer 160 can store about when touch be applied to touch-screen time the vibration of various modes that exports and the data of sound signal.
Storer 160 can comprise the storage medium of at least one type, described storage medium comprises flash memory, hard disk, multimedia card, card-type storer (such as, SD or DX storer etc.), random access storage device (RAM), static random-access memory (SRAM), ROM (read-only memory) (ROM), Electrically Erasable Read Only Memory (EEPROM), programmable read only memory (PROM), magnetic storage, disk, CD etc.And mobile terminal 100 can be connected the memory function of execute store 160 network storage device with by network cooperates.
Controller 180 controls the overall operation of mobile terminal usually.Such as, controller 180 performs the control relevant to voice call, data communication, video calling etc. and process.In addition, controller 180 can comprise the multi-media module 1810 for reproducing (or playback) multi-medium data, and multi-media module 1810 can be configured in controller 180, or can be configured to be separated with controller 180.Controller 180 can pattern recognition process, is identified as character or image so that input is drawn in the handwriting input performed on the touchscreen or picture.
Power supply unit 190 receives external power or internal power and provides each element of operation and the suitable electric power needed for assembly under the control of controller 180.
Various embodiment described herein can to use such as computer software, the computer-readable medium of hardware or its any combination implements.For hardware implementation, embodiment described herein can by using application-specific IC (ASIC), digital signal processor (DSP), digital signal processing device (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), processor, controller, microcontroller, microprocessor, being designed at least one performed in the electronic unit of function described herein and implementing, in some cases, such embodiment can be implemented in controller 180.For implement software, the embodiment of such as process or function can be implemented with allowing the independent software module performing at least one function or operation.Software code can be implemented by the software application (or program) write with any suitable programming language, and software code can be stored in storer 160 and to be performed by controller 180.
So far, oneself is through the mobile terminal according to its functional description.Below, for the sake of brevity, by the slide type mobile terminal that describes in various types of mobile terminals of such as folded form, board-type, oscillating-type, slide type mobile terminal etc. exemplarily.Therefore, the present invention can be applied to the mobile terminal of any type, and is not limited to slide type mobile terminal.
Mobile terminal 100 as shown in Figure 1 can be constructed to utilize and send the such as wired and wireless communication system of data via frame or grouping and satellite-based communication system operates.
Describe wherein according to the communication system that mobile terminal of the present invention can operate referring now to Fig. 2.
Such communication system can use different air interfaces and/or Physical layer.Such as, the air interface used by communication system comprises such as frequency division multiple access (FDMA), time division multiple access (TDMA) (TDMA), CDMA (CDMA) and universal mobile telecommunications system (UMTS) (especially, Long Term Evolution (LTE)), global system for mobile communications (GSM) etc.As non-limiting example, description below relates to cdma communication system, but such instruction is equally applicable to the system of other type.
With reference to figure 2, cdma wireless communication system can comprise multiple mobile terminal 100, multiple base station (BS) 270, base station controller (BSC) 275 and mobile switching centre (MSC) 280.MSC280 is constructed to form interface with Public Switched Telephony Network (PSTN) 290.MSC280 is also constructed to form interface with the BSC275 that can be couple to base station 270 via back haul link.Back haul link can construct according to any one in some interfaces that oneself knows, described interface comprises such as E1/T1, ATM, IP, PPP, frame relay, HDSL, ADSL or xDSL.Will be appreciated that system as shown in Figure 2 can comprise multiple
BSC2750。
Each BS270 can serve one or more subregion (or region), by multidirectional antenna or point to specific direction each subregion of antenna cover radially away from BS270.Or each subregion can by two or more antenna covers for diversity reception.Each BS270 can be constructed to support multiple parallel compensate, and each parallel compensate has specific frequency spectrum (such as, 1.25MHz, 5MHz etc.).
Subregion can be called as CDMA Channel with intersecting of parallel compensate.BS270 also can be called as base station transceiver subsystem (BTS) or other equivalent terms.Under these circumstances, term " base station " may be used for broadly representing single BSC275 and at least one BS270.Base station also can be called as " cellular station ".Or each subregion of particular B S270 can be called as multiple cellular station.
As shown in Figure 2, broadcast singal is sent to the mobile terminal 100 at operate within systems by broadcsting transmitter (BT) 295.Broadcast reception module 111 as shown in Figure 1 is arranged on mobile terminal 100 and sentences the broadcast singal receiving and sent by BT295.In fig. 2, several GPS (GPS) satellite 300 is shown.Satellite 300 helps at least one in the multiple mobile terminal 100 in location.
In fig. 2, depict multiple satellite 300, but understand, the satellite of any number can be utilized to obtain useful locating information.GPS module 115 as shown in Figure 1 is constructed to coordinate to obtain the locating information wanted with satellite 300 usually.Substitute GPS tracking technique or outside GPS tracking technique, can use can other technology of position of tracking mobile terminal.In addition, at least one gps satellite 300 optionally or extraly can process satellite dmb transmission.
As a typical operation of wireless communication system, BS270 receives the reverse link signal from various mobile terminal 100.Mobile terminal 100 participates in call usually, information receiving and transmitting communicates with other type.Each reverse link signal that certain base station 270 receives is processed by particular B S270.The data obtained are forwarded to relevant BSC275.BSC provides call Resourse Distribute and comprises the mobile management function of coordination of the soft switching process between BS270.The data received also are routed to MSC280 by BSC275, and it is provided for the extra route service forming interface with PSTN290.Similarly, PSTN290 with
MSC280 forms interface, and MSC and BSC275 forms interface, and BSC275 correspondingly control BS270 so that forward link signals is sent to mobile terminal 100.
Based on above-mentioned mobile terminal hardware configuration and communication system, each embodiment of the inventive method is proposed.
As shown in Figure 3, first embodiment of the invention proposes a kind of method obtaining RGB data, comprising:
Step 300, the first Horizontal interpolation result obtaining the pixel that R passage/channel B is corresponding in image and the first vertical interpolation result; Obtain horizontal gradient and the VG (vertical gradient) of the pixel that R passage/channel B is corresponding in image.
Herein, "/" represents interchangeable, and the pixel value that is rebuilding the G passage of the pixel that R passage is corresponding in image is the same with the process of the pixel value of the G passage rebuilding the pixel that channel B is corresponding in image.
In this step, image refers to the undressed original image acquired.Fig. 4 is the schematic diagram of image.As shown in Figure 4, the form of the odd-numbered line in image is RGRG ..., the form of even number line is GBGB ...Fig. 4 is only a kind of schematic diagram of image, can not represent the present invention the form of treatable image, as long as the image of bayer form all can adopt method of the present invention to carry out interpolation.
In this step, the first Horizontal interpolation result and the first vertical interpolation result that obtain the pixel that R passage/channel B is corresponding in image comprise:
According to formula g 1 i 1 , j 1 = G i 1 - 1 , j 1 + G i 1 + 1 , j 1 2 + 2 A i 1 , j 1 - A i 1 - 2 , j 1 - A i 1 + 2 , j 1 4 First Horizontal interpolation result of the pixel that in computed image, R passage/channel B is corresponding;
According to formula g 2 i 1 , j 1 = G i 1 , j 1 - 1 + G i 1 , j 1 + 1 2 + 2 A i 1 , j 1 - A i 1 , j 1 - 2 - A i 1 , j 1 + 2 4 First vertical interpolation result of the pixel that in computed image, R passage/channel B is corresponding;
Wherein, g1 i1, j1be the first Horizontal interpolation result, g2 i1, j1be the first vertical interpolation result, G i1, j1-1the pixel value of the G passage of the pixel arranged for the i-th 1 row (j1-1) in image, G i1, j1+1the pixel value of the G passage of the pixel arranged for the i-th 1 row (j1+1) in image, A i1, j1the pixel value of the R passage/channel B of the pixel arranged for the i-th 1 row jth 1 in image, A i1, j1-2the pixel value of the R passage/channel B of the pixel arranged for the i-th 1 row (j1-2) in image, A i1, j1+2the pixel value of the R passage/channel B of the pixel arranged for the i-th 1 row (j1+2) in image; G i1-1, j1for the pixel value of the G passage of the pixel of (i1-1) row jth 1 row in image, G i1+1, j1for the pixel value of the G passage of the pixel of (i1+1) row jth 1 row in image, A i1-2, j1for the pixel value of the R passage/channel B of the pixel of (i1-2) row jth 1 row in image, A i1+2, j1for the pixel value of the R passage/channel B of the pixel of (i1+2) row jth 1 row in image.
In this step, the horizontal gradient and the VG (vertical gradient) that obtain the pixel that R passage/channel B is corresponding in image comprise:
According to formula Δ H1 i1, j1=| G i1-1, j1-G i1+1, j1|+| 2A i1, j1-G i1-1, j1-G i1+1, j1| the horizontal gradient of the pixel that R passage/channel B is corresponding in computed image;
According to formula Δ H2 i1, j1=| G i1, j1-1-G i1, j1+1|+| 2A i1, j1-G i1, j1-1-G i1, j1+1| the VG (vertical gradient) of the pixel that R passage/channel B is corresponding in computed image;
Wherein, △ H1 i1, j1for horizontal gradient, △ H2 i1, j1for VG (vertical gradient).
Step 301, judge that the absolute value of difference between the horizontal gradient that obtains and VG (vertical gradient) is greater than 0 and is less than the first predetermined threshold value, rebuild the pixel value of the G passage of the pixel that R passage/channel B is corresponding in image according to the weighted mean of the first Horizontal interpolation result obtained and the first differential vertical result.
In this step, the pixel value rebuilding the G passage of the pixel that R passage/channel B is corresponding in image according to the first Horizontal interpolation result of acquisition and the weighted mean of the first differential vertical result comprises:
According to formula rebuild the pixel value of the G passage of the reconstruction of the pixel that R passage/channel B is corresponding in image;
Wherein, g i1, j1for the pixel value of the G passage of the reconstruction of pixel corresponding to R passage/channel B in image.
In this step, when judging that the absolute value of the difference between horizontal gradient and VG (vertical gradient) equals 0, rebuild the pixel value of the G passage of the pixel that R passage/channel B is corresponding in image according to the mean value of the first Horizontal interpolation result and the first differential vertical result.
Wherein, the pixel value rebuilding the G passage of the pixel that R passage/channel B is corresponding in image according to the mean value of the first Horizontal interpolation result and the first differential vertical result comprises:
According to formula rebuild the pixel value of the G passage of the pixel that R passage/channel B is corresponding in image.
In this step, when judging that the absolute value of the difference between horizontal gradient and VG (vertical gradient) is greater than the first predetermined threshold value, and horizontal gradient is when being less than VG (vertical gradient), rebuild the pixel value of the G passage of the pixel that R passage/channel B is corresponding in image according to the first Horizontal interpolation result.That is, using the pixel value of direct for the first Horizontal interpolation result G passage as rebuilding.
In this step, when judging that the absolute value of the difference between horizontal gradient and VG (vertical gradient) is greater than the first predetermined threshold value, and horizontal gradient is when being greater than VG (vertical gradient), rebuild the pixel value of the G passage of the pixel that R passage/channel B is corresponding in image according to the first vertical interpolation result.That is, using the pixel value of direct for the first vertical interpolation result G passage as rebuilding.
In this step, in being more or less the same at horizontal gradient and VG (vertical gradient), such as horizontal gradient is 10, and VG (vertical gradient) is 13, if now can accurately judge that these two gradients are absolutely accurates, just can the interpolation result in the little direction (i.e. edge direction) of gradient as final interpolation result, such interpolation result is the most accurately.Present problem is exactly, due to noise (principal element, noise exists constantly) etc. the impact of other factors, if still with the edge direction interpolation result calculated as net result, the accurate of interpolation result can not be ensured, just there will be a large amount of moire fringes in such result picture, have a strong impact on visual quality of images (actual result is also like this); When both direction gradient differs smaller time, since can not judge which direction is as final result direction (namely can not judge that current edge is actual edge), is just weighted the interpolation result of both direction on average (generation that can reduce moire fringes through experiment greatly); And when two gradient differences are larger time, such as: horizontal gradient is 10, VG (vertical gradient) is 130, even if noisy like this impact, can think and now can find edge direction very accurately accurately, the interpolation result of this edge direction can be used as net result, if and be now still weighted on average with the interpolation result of both direction, make image quality decrease (be also like this through experimental result) on the contrary, therefore when gradient differs greatly, adopt gradient little (i.e. edge direction) direction result as final interpolation result.
The R passage of pixel that in step 302, reconstruction image, G passage is corresponding and the pixel value of channel B.
This step can perform before or after any one step, and the execution sequence not by other steps affects.
In this step, the pixel value rebuilding the R passage/channel B of the pixel that G passage is corresponding in image comprises:
Obtain the second Horizontal interpolation result or the second vertical interpolation result of the pixel that G passage is corresponding in image, rebuild the pixel value of the R passage/channel B of the pixel that G passage is corresponding in image according to the second Horizontal interpolation result or the second vertical interpolation result.
Wherein, the second Horizontal interpolation result or the second vertical interpolation result that obtain the pixel that G passage is corresponding in image comprise:
According to formula a 1 i 2 , j 2 = A i 2 - 1 , j 2 + A i 2 + 1 , j 2 2 + 2 G i 2 , j 2 - G i 2 - 2 , j 2 - G i 2 + 2 , j 2 4 Second Horizontal interpolation result of the pixel that in computed image, G passage is corresponding;
Or according to formula a 2 i 2 , j 2 = A i 2 , j 2 - 1 + A i 2 , j 2 + 1 2 + 2 G i 2 , j 2 - G i 2 , j 2 - 2 - G i 2 , j 2 + 2 4 Second vertical interpolation result of the pixel that in computed image, G passage is corresponding;
Wherein, a1 i2, j2be the second Horizontal interpolation result, a2 i2, j2be the second vertical interpolation result, A i2-1, j2for the pixel value of the R passage/channel B of the pixel of (i2-1) row jth 2 row in image, A i2+1, j2for the pixel value of the R passage/channel B of the pixel of (i2+1) row jth 2 row in image, G i2, j2the pixel value of the G passage of the pixel arranged for the i-th 2 row jth 2 in image, G i2-2, j2for the pixel value of the G passage of the pixel of (i2-2) row jth 2 row in image, G i2+2, j2for the pixel value of the G passage of the pixel of (i2+2) row jth 2 row in image, A i2, j2-1the pixel value of the R passage/channel B of the pixel arranged for the i-th 2 row (j2-1) in image, A i2, j2+1the pixel value of the R passage/channel B of the pixel arranged for the i-th 2 row (j2+1) in image, G i2, j2-2the pixel value of the G passage of the pixel arranged for the i-th 2 row (j2-2) in image, G i2, j2+2the pixel value of the G passage of the pixel arranged for the i-th 2 row (j2+2) in image.
Step 303, rebuild the pixel value of the channel B of the pixel that R passage is corresponding in image and the pixel value of the R passage of the pixel that in image, channel B is corresponding according to the pixel value of the G passage of the reconstruction of R passage in image and pixel corresponding to channel B.
In this step, the pixel value rebuilding the channel B/R passage of the pixel that R passage/channel B is corresponding in image according to the pixel value of the G passage of the reconstruction of R passage in image and pixel corresponding to channel B comprises:
According to 45 degree of interpolation results and 135 degree of interpolation results of pixel corresponding to R passage/channel B in the calculated for pixel values image of the G passage of the reconstruction of R passage in image and pixel corresponding to channel B, and 45 degree of gradients of the pixel that channel B in computed image/R passage is corresponding and 135 degree of gradients; Judge that the absolute value of the difference between 45 degree of gradients and 135 degree of gradients is greater than 0 and is less than the second predetermined threshold value, rebuild the pixel value of the channel B/R passage of the pixel that R passage/channel B is corresponding in image according to the weighted mean of 45 degree of interpolation results and 135 degree of interpolation results.
Wherein, comprise according to 45 degree of interpolation results of pixel corresponding to R passage/channel B in the calculated for pixel values image of the G passage of the reconstruction of R passage in image and pixel corresponding to channel B and 135 degree of interpolation results:
According to formula a 1 i 3 , j 3 = A i 3 - 1 , j 3 + 1 + A i 3 + 1 , j 3 - 1 2 + 2 g i 3 , j 3 - g i 3 - 1 , j 3 + 1 - g i 3 + 1 , j 3 - 1 4 45 degree of interpolation results of the pixel that in computed image, R passage/channel B is corresponding; According to formula a 2 i 3 , j 3 = A i 3 - 1 , j 3 - 1 + A i 3 + 1 , j 3 + 1 2 + 2 g i 3 , j 3 - g i 3 - 1 , j 3 - 1 - g i 3 + 1 , j 3 + 1 4 135 degree of interpolation results of the pixel that in computed image, R passage/channel B is corresponding;
Wherein, a1 i3, j3be 45 degree of interpolation results, a2 i3, j3be 135 degree of interpolation results, A i3-1, j3+1the pixel value of the R passage/channel B of the pixel arranged for (i3-1) row (j3+1) in image, A i3+1, j3-1the pixel value of the R passage/channel B of the pixel arranged for (i3+1) row (j3-1) in image, g i3, j3the pixel value of the G passage of the reconstruction of the pixel arranged for the i-th 3 row jth 3 in image, g i3-1, j3+1the pixel value of the G passage of the reconstruction of the pixel arranged for (i3-1) row (j3+1) in image, g i3+1, j3-1the pixel value of the G passage of the reconstruction of the pixel arranged for (i3+1) row (j3-1) in image, A i3-1, j3-1the pixel value of the R passage/channel B of the pixel arranged for (i3-1) row (j3-1) in image, A i3+1, j3+1the pixel value of the R passage/channel B of the pixel arranged for (i3+1) row (j3+1) in image, g i3-1, j3-1the pixel value of the G passage of the reconstruction of the pixel arranged for (i3-1) row (j3-1) in image, g i3+1, j3+1the pixel value of the G passage of the reconstruction of the pixel arranged for (i3+1) row (j3+1) in image.
Wherein, 45 degree of gradients and 135 degree of gradients of the pixel that channel B in computed image/R passage is corresponding comprise:
According to formula D 45(i3, j3)=| A i3-1, j3+1-A i3+1, j3-1|+| 2C i3, j3-A i3-1, j3+1-A i3+1, j3-1| 45 degree of gradients of the pixel that channel B in computed image/R passage is corresponding; According to formula D 135(i3, j3)=| A i3-1, j3-1-A i3+1, j3+1|+| 2C i3, j3-A i3-1, j3-1-A i3+1, j3+1| 135 degree of gradients of the pixel that channel B in computed image/R passage is corresponding;
Wherein, D 45(i3, j3) is 45 degree of gradients, D 135(i3, j3) is 135 degree of gradients, C i3, j3the pixel value of the channel B/R passage of the pixel arranged for the i-th 3 row jth 3 in image.
Wherein, the pixel value rebuilding the channel B/R passage of the pixel that R passage/channel B is corresponding in image according to the weighted mean of 45 degree of interpolation results and 135 degree of interpolation results comprises:
According to formula rebuild the pixel value of the channel B/R passage of the pixel that R passage/channel B is corresponding in image;
Wherein, a i3, j3for the pixel value of the channel B/R passage of the reconstruction of pixel corresponding to R passage/channel B in image.
Wherein, when judging that the absolute value of the difference between 45 degree of gradients and 135 degree of gradients equals 0, rebuild the pixel value of the channel B/R passage of the pixel that R passage/channel B is corresponding in image according to the mean value of 45 degree of interpolation results and 135 degree of interpolation results.
Wherein, the pixel value rebuilding the channel B/R passage of the pixel that R passage/channel B is corresponding in image according to the mean value of 45 degree of interpolation results and 135 degree of interpolation results comprises:
According to formula rebuild the pixel value of the channel B/R passage of the pixel that R passage/channel B is corresponding in image; Wherein, a i3, j3for the pixel value of the channel B/R passage of the reconstruction of pixel corresponding to R passage/channel B in image, a1 i3, j3be 45 degree of interpolation results, a2 i3, j3be 135 degree of interpolation results.
When judging that the absolute value of the difference between 45 degree of gradients and 135 degree of gradients is greater than the second predetermined threshold value, and when 45 degree of gradients are less than 135 degree of gradients, rebuild the pixel value of the channel B/R passage of the pixel that R passage/channel B is corresponding in image according to 45 degree of interpolation results.
When judging that the absolute value of the difference between 45 degree of gradients and 135 degree of gradients is greater than the second predetermined threshold value, and when 45 degree of gradients are greater than 135 degree of gradients, rebuild the pixel value of the channel B/R passage of the pixel that R passage/channel B is corresponding in image according to 135 degree of interpolation results.
In step 302, "/" represents interchangeable, that is rebuild the pixel value of the channel B of the pixel that R passage is corresponding in image, and the process of the pixel value of the R passage of the pixel that in image, channel B is corresponding is similar.
In this step, in being more or less the same in 45 degree of gradients and 135 degree of gradients, such as 45 degree of gradients are 10, and 135 degree of gradients are 13, if now can accurately judge that these two gradients are absolutely accurates, just can the interpolation result in the little direction (i.e. edge direction) of gradient as final interpolation result, such interpolation result is the most accurately.Present problem is exactly, due to noise (principal element, noise exists constantly) etc. the impact of other factors, if still with the edge direction interpolation result calculated as net result, the accurate of interpolation result can not be ensured, just there will be a large amount of moire fringes in such result picture, have a strong impact on visual quality of images (actual result is also like this); When both direction gradient differs smaller time, since can not judge which direction is as final result direction (namely can not judge that current edge is actual edge), is just weighted the interpolation result of both direction on average (generation that can reduce moire fringes through experiment greatly); And when two gradient differences are larger time, such as: 45 degree of gradients are 10,135 degree of gradients are 130, even if noisy like this impact, can think and now can find edge direction very accurately accurately, the interpolation result of this edge direction can be used as net result, if and be now still weighted on average with the interpolation result of both direction, make image quality decrease (be also like this through experimental result) on the contrary, therefore when gradient differs greatly, adopt gradient little (i.e. edge direction) direction result as final interpolation result.
Pass through the solution of the present invention, when the absolute value of the difference between the horizontal gradient obtained and VG (vertical gradient) is greater than 0 and is less than the first predetermined threshold value, the pixel value of the G passage of R passage in image or pixel corresponding to channel B is rebuild according to the weighted mean of the first Horizontal interpolation result obtained and the first differential vertical result, decrease pseudo-colours and moire fringes, thus improve the visual quality of image.
With reference to Fig. 5, second embodiment of the invention also proposed a kind of device obtaining RGB data, at least comprises:
Acquisition module, for obtaining the first Horizontal interpolation result and the first vertical interpolation result of the pixel that in image, R passage/channel B is corresponding; Obtain horizontal gradient and the VG (vertical gradient) of the pixel that R passage/channel B is corresponding in image;
First rebuilds module, for judging that the absolute value of the difference between the horizontal gradient of acquisition and VG (vertical gradient) is greater than 0 and is less than the first predetermined threshold value, rebuild the pixel value of the G passage of the pixel that R passage/channel B is corresponding in image according to the first Horizontal interpolation result of acquisition and the weighted mean of the first differential vertical result;
Second rebuilds module, for the pixel value of the R passage and channel B of rebuilding the pixel that in image, G passage is corresponding; The pixel value of the channel B of the pixel that R passage is corresponding in image is rebuild according to the pixel value of the G passage of the reconstruction of R passage in image and pixel corresponding to channel B, and the pixel value of the R passage of the pixel that in image, channel B is corresponding.
In device of the present invention, first rebuild module also for:
When judging that the absolute value of the difference between horizontal gradient and VG (vertical gradient) equals 0, rebuild the pixel value of the G passage of the pixel that R passage/channel B is corresponding in image according to the mean value of the first Horizontal interpolation result and the first differential vertical result.
In device of the present invention, first rebuild module also for:
When judging that the absolute value of the difference between horizontal gradient and VG (vertical gradient) is greater than the first predetermined threshold value, and when horizontal gradient is less than VG (vertical gradient), rebuild the pixel value of the G passage of the pixel that R passage/channel B is corresponding in image according to the first Horizontal interpolation result.
In device of the present invention, first rebuild module also for:
When judging that the absolute value of the difference between horizontal gradient and VG (vertical gradient) is greater than the first predetermined threshold value, and when horizontal gradient is greater than VG (vertical gradient), rebuild the pixel value of the G passage of the pixel that R passage/channel B is corresponding in image according to the first vertical interpolation result.
In device of the present invention, second rebuild module specifically for:
Obtain the second Horizontal interpolation result or the second vertical interpolation result of the pixel that G passage is corresponding in image, rebuild the pixel value of the R passage/channel B of the pixel that G passage is corresponding in image according to the second Horizontal interpolation result or the second vertical interpolation result;
The pixel value of the channel B of the pixel that R passage is corresponding in image is rebuild according to the pixel value of the G passage of the reconstruction of R passage in image and pixel corresponding to channel B, and the pixel value of the R passage of the pixel that in image, channel B is corresponding.
In device of the present invention, second rebuild module specifically for:
Rebuild the R passage of pixel and the pixel value of channel B that in image, G passage is corresponding;
According to 45 degree of interpolation results and 135 degree of interpolation results of pixel corresponding to R passage/channel B in the calculated for pixel values image of the G passage of the reconstruction of R passage in image and pixel corresponding to channel B, and 45 degree of gradients of the pixel that channel B in computed image/R passage is corresponding and 135 degree of gradients;
Judge that the absolute value of the difference between 45 degree of gradients and 135 degree of gradients is greater than 0 and is less than the second predetermined threshold value, rebuild the pixel value of the channel B/R passage of the pixel that R passage/channel B is corresponding in image according to the weighted mean of 45 degree of interpolation results and 135 degree of interpolation results.
In device of the present invention, second rebuild module also for:
When judging that the absolute value of the difference between 45 degree of gradients and 135 degree of gradients equals 0, rebuild the pixel value of the channel B/R passage of the pixel that R passage/channel B is corresponding in image according to the mean value of 45 degree of interpolation results and 135 degree of interpolation results.
In device of the present invention, second rebuild module also for:
When judging that the absolute value of the difference between 45 degree of gradients and 135 degree of gradients is greater than the second predetermined threshold value, and when 45 degree of gradients are less than 135 degree of gradients, rebuild the pixel value of the channel B/R passage of the pixel that R passage/channel B is corresponding in image according to 45 degree of interpolation results.
In device of the present invention, second rebuild module also for:
When judging that the absolute value of the difference between 45 degree of gradients and 135 degree of gradients is greater than the second predetermined threshold value, and when 45 degree of gradients are greater than 135 degree of gradients, rebuild the pixel value of the channel B/R passage of the pixel that R passage/channel B is corresponding in image according to 135 degree of interpolation results.
Wherein, acquisition module, the first reconstruction module and second are rebuild module and all can be arranged in the controller of Fig. 1.
It should be noted that, in this article, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or device and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or device.When not more restrictions, the key element limited by statement " comprising ... ", and be not precluded within process, method, article or the device comprising this key element and also there is other identical element.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be well understood to the mode that above-described embodiment method can add required general hardware platform by software and realize, hardware can certainly be passed through, but in a lot of situation, the former is better embodiment.Based on such understanding, technical scheme of the present invention can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product is stored in a storage medium (as ROM/RAM, magnetic disc, CD), comprising some instructions in order to make a station terminal equipment (can be mobile phone, computing machine, server, air conditioner, or the network equipment etc.) perform method described in each embodiment of the present invention.
These are only the preferred embodiments of the present invention; not thereby the scope of the claims of the present invention is limited; every utilize instructions of the present invention and accompanying drawing content to do equivalent structure or equivalent flow process conversion; or be directly or indirectly used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.

Claims (14)

1. obtain a method for RGB RGB data, it is characterized in that, comprising:
Obtain the first Horizontal interpolation result and the first vertical interpolation result of the pixel that R passage/channel B is corresponding in image; Obtain horizontal gradient and the VG (vertical gradient) of the pixel that R passage/channel B is corresponding in image;
Judge that the absolute value of the difference between the horizontal gradient of acquisition and VG (vertical gradient) is greater than 0 and is less than the first predetermined threshold value, rebuild the pixel value of the G passage of the pixel that R passage/channel B is corresponding in image according to the first Horizontal interpolation result of acquisition and the weighted mean of the first differential vertical result;
Rebuild the R passage of pixel and the pixel value of channel B that in image, G passage is corresponding;
The pixel value of the channel B of the pixel that R passage is corresponding in image is rebuild according to the pixel value of the G passage of the reconstruction of R passage in image and pixel corresponding to channel B, and the pixel value of the R passage of the pixel that in image, channel B is corresponding.
2. method according to claim 1, is characterized in that, when judging that the absolute value of the difference between described horizontal gradient and described VG (vertical gradient) equals 0, the method also comprises:
The pixel value of the G passage of the pixel that R passage/channel B is corresponding in described image is rebuild according to the mean value of described first Horizontal interpolation result and described first differential vertical result.
3. method according to claim 1, is characterized in that,
When judging that the absolute value of the difference between described horizontal gradient and described VG (vertical gradient) is greater than described first predetermined threshold value, and described horizontal gradient is when being less than described VG (vertical gradient), rebuild the pixel value of the G passage of the pixel that R passage/channel B is corresponding in described image according to described first Horizontal interpolation result;
When judging that the absolute value of the difference between described horizontal gradient and described VG (vertical gradient) is greater than described first predetermined threshold value, and described horizontal gradient is when being greater than described VG (vertical gradient), rebuild the pixel value of the G passage of the pixel that R passage/channel B is corresponding in described image according to described first vertical interpolation result.
4. the method according to claim 1 or 2 or 3, is characterized in that, the pixel value of the R passage/channel B of the pixel that in described reconstruction image, G passage is corresponding comprises:
Obtain the second Horizontal interpolation result or the second vertical interpolation result of the pixel that in described image, G passage is corresponding, rebuild the pixel value of the R passage/channel B of the pixel that G passage is corresponding in described image according to described second Horizontal interpolation result or described second vertical interpolation result.
5. method according to claim 1, is characterized in that, the pixel value that the pixel value of the G passage of the described reconstruction according to R passage in image and pixel corresponding to channel B rebuilds the channel B/R passage of the pixel that R passage/channel B is corresponding in image comprises:
45 degree of interpolation results of the pixel that R passage/channel B is corresponding and 135 degree of interpolation results in image according to the calculated for pixel values of the G passage of the reconstruction of R passage in described image and pixel corresponding to channel B, and calculate 45 degree of gradients and 135 degree of gradients of the pixel that channel B in described image/R passage is corresponding;
Judge that the absolute value of the difference between described 45 degree of gradients and described 135 degree of gradients is greater than 0 and is less than the second predetermined threshold value, rebuild the pixel value of the channel B/R passage of the pixel that R passage/channel B is corresponding in described image according to the weighted mean of described 45 degree of interpolation results and described 135 degree of interpolation results.
6. method according to claim 5, it is characterized in that, when judging that the absolute value of the difference between described 45 degree of gradients and described 135 degree of gradients equals 0, in the pixel value reconstruction image of the pixel value of the described pixel corresponding according to G passage in image and the G passage of reconstruction, the pixel value of the channel B/R passage of the pixel that R passage/channel B is corresponding also comprises:
The pixel value of the channel B/R passage of the pixel that R passage/channel B is corresponding in described image is rebuild according to the mean value of described 45 degree of interpolation results and described 135 degree of interpolation results.
7. method according to claim 5, is characterized in that, in the pixel value reconstruction image of the pixel value of the described pixel corresponding according to G passage in image and the G passage of reconstruction, the pixel value of the channel B/R passage of the pixel that R passage/channel B is corresponding also comprises:
When judging that the absolute value of the difference between described 45 degree of gradients and described 135 degree of gradients is greater than described second predetermined threshold value, and described 45 degree of gradients are when being less than described 135 degree of gradients, rebuild the pixel value of the channel B/R passage of the pixel that R passage/channel B is corresponding in described image according to described 45 degree of interpolation results;
When judging that the absolute value of the difference between described 45 degree of gradients and described 135 degree of gradients is greater than described second predetermined threshold value, and described 45 degree of gradients are when being greater than described 135 degree of gradients, rebuild the pixel value of the channel B/R passage of the pixel that R passage/channel B is corresponding in described image according to described 135 degree of interpolation results.
8. obtain a device for RGB RGB data, it is characterized in that, at least comprise:
Acquisition module, for obtaining the first Horizontal interpolation result and the first vertical interpolation result of the pixel that in image, R passage/channel B is corresponding; Obtain horizontal gradient and the VG (vertical gradient) of the pixel that R passage/channel B is corresponding in image;
First rebuilds module, for judging that the absolute value of the difference between the horizontal gradient of acquisition and VG (vertical gradient) is greater than 0 and is less than the first predetermined threshold value, rebuild the pixel value of the G passage of the pixel that R passage/channel B is corresponding in image according to the first Horizontal interpolation result of acquisition and the weighted mean of the first differential vertical result;
Second rebuilds module, for the pixel value of the R passage and channel B of rebuilding the pixel that in image, G passage is corresponding; The pixel value of the channel B of the pixel that R passage is corresponding in image is rebuild according to the pixel value of the G passage of the reconstruction of R passage in image and pixel corresponding to channel B, and the pixel value of the R passage of the pixel that in image, channel B is corresponding.
9. device according to claim 8, is characterized in that, described first rebuild module also for:
When judging that the absolute value of the difference between described horizontal gradient and described VG (vertical gradient) equals 0, rebuild the pixel value of the G passage of the pixel that R passage/channel B is corresponding in described image according to the mean value of described first Horizontal interpolation result and described first differential vertical result.
10. device according to claim 8, is characterized in that, described first rebuild module also for:
When judging that the absolute value of the difference between described horizontal gradient and described VG (vertical gradient) is greater than described first predetermined threshold value, and described horizontal gradient is when being less than described VG (vertical gradient), rebuild the pixel value of the G passage of the pixel that R passage/channel B is corresponding in described image according to described first Horizontal interpolation result;
When judging that the absolute value of the difference between described horizontal gradient and described VG (vertical gradient) is greater than described first predetermined threshold value, and described horizontal gradient is when being greater than described VG (vertical gradient), rebuild the pixel value of the G passage of the pixel that R passage/channel B is corresponding in described image according to described first vertical interpolation result.
Device described in 11. according to Claim 8 or 9 or 10, is characterized in that, described second rebuild module specifically for:
Obtain the second Horizontal interpolation result or the second vertical interpolation result of the pixel that in described image, G passage is corresponding, rebuild the pixel value of the R passage/channel B of the pixel that G passage is corresponding in described image according to described second Horizontal interpolation result or described second vertical interpolation result;
The pixel value of the channel B of the pixel that R passage is corresponding in image is rebuild according to the pixel value of the G passage of the reconstruction of R passage in image and pixel corresponding to channel B, and the pixel value of the R passage of the pixel that in image, channel B is corresponding.
12. devices according to claim 8, is characterized in that, described second rebuild module specifically for:
Rebuild the R passage of pixel and the pixel value of channel B that in image, G passage is corresponding;
45 degree of interpolation results of the pixel that R passage/channel B is corresponding and 135 degree of interpolation results in image according to the calculated for pixel values of the G passage of the reconstruction of R passage in described image and pixel corresponding to channel B, and calculate 45 degree of gradients and 135 degree of gradients of the pixel that channel B in described image/R passage is corresponding;
Judge that the absolute value of the difference between described 45 degree of gradients and described 135 degree of gradients is greater than 0 and is less than the second predetermined threshold value, rebuild the pixel value of the channel B/R passage of the pixel that R passage/channel B is corresponding in described image according to the weighted mean of described 45 degree of interpolation results and described 135 degree of interpolation results.
13. devices according to claim 12, is characterized in that, described second rebuild module also for:
When judging that the absolute value of the difference between described 45 degree of gradients and described 135 degree of gradients equals 0, rebuild the pixel value of the channel B/R passage of the pixel that R passage/channel B is corresponding in described image according to the mean value of described 45 degree of interpolation results and described 135 degree of interpolation results.
14. devices according to claim 12, is characterized in that, described second rebuild module also for:
When judging that the absolute value of the difference between described 45 degree of gradients and described 135 degree of gradients is greater than described second predetermined threshold value, and described 45 degree of gradients are when being less than described 135 degree of gradients, rebuild the pixel value of the channel B/R passage of the pixel that R passage/channel B is corresponding in described image according to described 45 degree of interpolation results;
When judging that the absolute value of the difference between described 45 degree of gradients and described 135 degree of gradients is greater than described second predetermined threshold value, and described 45 degree of gradients are when being greater than described 135 degree of gradients, rebuild the pixel value of the channel B/R passage of the pixel that R passage/channel B is corresponding in described image according to described 135 degree of interpolation results.
CN201510562752.1A 2015-09-07 2015-09-07 A kind of method and apparatus obtaining RGB data Active CN105160628B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510562752.1A CN105160628B (en) 2015-09-07 2015-09-07 A kind of method and apparatus obtaining RGB data
PCT/CN2016/098318 WO2017041714A1 (en) 2015-09-07 2016-09-07 Method and device for acquiring rgb data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510562752.1A CN105160628B (en) 2015-09-07 2015-09-07 A kind of method and apparatus obtaining RGB data

Publications (2)

Publication Number Publication Date
CN105160628A true CN105160628A (en) 2015-12-16
CN105160628B CN105160628B (en) 2018-09-14

Family

ID=54801471

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510562752.1A Active CN105160628B (en) 2015-09-07 2015-09-07 A kind of method and apparatus obtaining RGB data

Country Status (2)

Country Link
CN (1) CN105160628B (en)
WO (1) WO2017041714A1 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105578160A (en) * 2015-12-23 2016-05-11 天津天地伟业数码科技有限公司 Fine definition demosaicking interpolation method based on FPGA platform
WO2017041714A1 (en) * 2015-09-07 2017-03-16 努比亚技术有限公司 Method and device for acquiring rgb data
CN108615227A (en) * 2018-05-08 2018-10-02 浙江大华技术股份有限公司 A kind of suppressing method and equipment of image moire fringes
CN112218062A (en) * 2020-10-12 2021-01-12 Oppo广东移动通信有限公司 Image scaling device, electronic device, image scaling method and image processing chip
CN112712467A (en) * 2021-01-11 2021-04-27 郑州科技学院 Image processing method based on computer vision and color filter array
CN113242413A (en) * 2021-07-12 2021-08-10 深圳市艾为智能有限公司 Interpolation calculation method and system for anti-sawtooth RCCB filter array
CN113259635A (en) * 2021-06-15 2021-08-13 珠海亿智电子科技有限公司 Demosaicing method, demosaicing device, demosaicing equipment and storage medium
CN114004769A (en) * 2021-12-30 2022-02-01 江苏游隼微电子有限公司 Discrete weight-based Bayer denoising color interpolation method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102316247A (en) * 2010-06-29 2012-01-11 奥林巴斯株式会社 Image processing apparatus
CN102630019A (en) * 2012-03-27 2012-08-08 上海算芯微电子有限公司 Demosaicking method and device
CN103561255A (en) * 2013-10-24 2014-02-05 洪丹 Nakedness-yet stereoscopic display method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7825965B2 (en) * 2007-09-07 2010-11-02 Seiko Epson Corporation Method and apparatus for interpolating missing colors in a color filter array
US8571312B2 (en) * 2009-01-16 2013-10-29 Samsung Electronics Co., Ltd. Image interpolation method and apparatus using pattern characteristics of color filter array
CN104240182A (en) * 2013-06-06 2014-12-24 富士通株式会社 Image processing device, image processing method and electronic equipment
CN104732561B (en) * 2013-12-18 2017-08-25 展讯通信(上海)有限公司 The interpolation method and device of a kind of image
CN105160628B (en) * 2015-09-07 2018-09-14 努比亚技术有限公司 A kind of method and apparatus obtaining RGB data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102316247A (en) * 2010-06-29 2012-01-11 奥林巴斯株式会社 Image processing apparatus
CN102630019A (en) * 2012-03-27 2012-08-08 上海算芯微电子有限公司 Demosaicking method and device
CN103561255A (en) * 2013-10-24 2014-02-05 洪丹 Nakedness-yet stereoscopic display method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CHENGYOU WANG: "Bayer Patterned Image Compression Based on Wavelet Transform and All Phase Interpolation", 《PROCEEDINGS OF 2012 IEEE 11TH INTERNATIONAL CONFERENCE ON SIGNAL PROCESSING》 *
贺钦 等: "数字图像传感器颜色插值算法研究", 《小型微型计算机系统》 *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017041714A1 (en) * 2015-09-07 2017-03-16 努比亚技术有限公司 Method and device for acquiring rgb data
CN105578160A (en) * 2015-12-23 2016-05-11 天津天地伟业数码科技有限公司 Fine definition demosaicking interpolation method based on FPGA platform
CN108615227A (en) * 2018-05-08 2018-10-02 浙江大华技术股份有限公司 A kind of suppressing method and equipment of image moire fringes
CN108615227B (en) * 2018-05-08 2021-02-26 浙江大华技术股份有限公司 Image moire inhibition method and device
CN112218062B (en) * 2020-10-12 2022-04-22 Oppo广东移动通信有限公司 Image scaling device, electronic device, image scaling method and image processing chip
CN112218062A (en) * 2020-10-12 2021-01-12 Oppo广东移动通信有限公司 Image scaling device, electronic device, image scaling method and image processing chip
CN112712467A (en) * 2021-01-11 2021-04-27 郑州科技学院 Image processing method based on computer vision and color filter array
CN112712467B (en) * 2021-01-11 2022-11-11 郑州科技学院 Image processing method based on computer vision and color filter array
CN113259635A (en) * 2021-06-15 2021-08-13 珠海亿智电子科技有限公司 Demosaicing method, demosaicing device, demosaicing equipment and storage medium
CN113242413A (en) * 2021-07-12 2021-08-10 深圳市艾为智能有限公司 Interpolation calculation method and system for anti-sawtooth RCCB filter array
CN113242413B (en) * 2021-07-12 2021-09-21 深圳市艾为智能有限公司 Interpolation calculation method and system for anti-sawtooth RCCB filter array
CN114004769B (en) * 2021-12-30 2022-03-15 江苏游隼微电子有限公司 Discrete weight-based Bayer denoising color interpolation method
CN114004769A (en) * 2021-12-30 2022-02-01 江苏游隼微电子有限公司 Discrete weight-based Bayer denoising color interpolation method

Also Published As

Publication number Publication date
CN105160628B (en) 2018-09-14
WO2017041714A1 (en) 2017-03-16

Similar Documents

Publication Publication Date Title
CN105160628A (en) Method and device for acquiring RGB data
CN104915141A (en) Method and device for previewing object information
CN104731453A (en) Method and device for adjusting colors of terminal icon texts
CN104750420A (en) Screen capturing method and device
CN105183308A (en) Picture display method and apparatus
CN104735255A (en) Split screen display method and system
CN105187521A (en) Service processing device and method
CN104915140A (en) Processing method based on virtual key touch operation data and processing device based on virtual key touch operation data
CN105045502A (en) Image processing method and image processing device
CN104657482A (en) Method for displaying application interface and terminal
CN104731512A (en) Method, device and terminal for sharing pictures
CN104731480A (en) Image display method and device based on touch screen
CN105094612A (en) Object selecting method and device
CN104898940A (en) Picture processing method and device
CN105100416A (en) Event reminding method and wearable device
CN104881218A (en) Mobile terminal screen scrolling method and mobile terminal screen scrolling device
CN104993180A (en) Terminal charging method and device
CN104917891A (en) Mobile terminal and page-turning control method thereof
CN105302864A (en) Picture loading apparatus and method according to screen resolution
CN104915127A (en) Touch key setting method and device, and mobile terminal
CN104951229A (en) Screen capturing method and device
CN105138871A (en) Unlocking method and apparatus for mobile terminal and mobile terminal
CN105261054A (en) Device and method for compositing audio GIF image
CN105573916A (en) Fault detection method and mobile terminal
CN105335055A (en) Self-response type realization method and system of menu as well as terminal equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant