The conversion method of a kind of Baeyer formatted data and equivalent isostructure brightness color difference components data
Technical field
The present invention relates to a kind of colorful digital video tape recorder.
Background technology
The data of transducer output Baeyer (BAYER) form that colorful digital video camera adopts conventionally, by processing links thereafter, the data transaction of Baeyer form is become to RGB data, and in certain link, again RGB data transaction is become brightness-color difference components data (hereinafter referred to as YC
bc
rdata) because YC
bc
rdata have some unique conveniences in the processing of many images processing and video compression.RGB data and YC
bc
rthe conversion of data has formula to follow, and conventionally adopts the computing formula of luminance component value [0,255], color difference components value [128,127] in computer vision is used.
At some occasions, C
b, C
rcomponent is also referred to as U, V component.Without loss of generality, herein with C
b, C
runified representation.
RGB data and YC
bc
rthe conversion of data is normally carried out after the link that is converted to 24 RGB data by Baeyer formatted data, and after the computing of this link, data volume increases to original three times.Although some image processing, Video compression need to use YC
bc
rdata, but still need to adopt RGB data in links such as for example demonstrations, be therefore also necessary YC
bc
rdata are transformed into RGB data again.
Such multiple conversions operation has brought the increase of data volume, the sharp increase of computing expense, causes that manufacturing cost increases thereby cause resource overhead to increase; Thereby and power consumption increases the deterioration that causes product facility stability factor.
Summary of the invention
The object of this patent is to optimize the data structure of colorful digital video tape recorder, makes video tape recorder in keeping carrying out computing with Baeyer formatted data amount, can use data mode more easily.
If RGB data and YC
bc
rthe conversion of data is carried out before the link that is converted to 24 RGB data by Baeyer formatted data, can, in the case of the data volume of maintenance and Baeyer formatted data is constant, make subsequent treatment link can adopt YC
bc
rcomponent data carries out computing.
Baeyer formatted data has four components, G
rrBG
b, its arrangement mode as shown in Figure 1, therefore YC
bc
requal data volume and same structure for data acquisition, should be Y
rc
rc
by
b, as shown in Figure 2.
Due to Baeyer formatted data and Y
rc
rc
by
bdata have four components, therefore common RGB data and YC
bc
rthe conversion formula of data is not suitable for Baeyer formatted data and Y
rc
rc
by
bthe conversion of data.This method, according to the data structure characteristic of Baeyer formatted data, under the prerequisite of maintenance brightness color difference components characteristic, is derived by Baeyer formatted data to Y
rc
rc
by
bthe conversion computing formula of data:
Y
r=0.587G
r+0.299R+0.114B
C
r=-0.2093G
r+0.500R-0.0814B-0.2093G
b
C
b=-0.1656G
r-0.1688R+0.500B-0.1656G
b
Y
b=0.299R+0.114B+0.587G
b
And by Y
rc
rc
by
bdata are to the conversion computing formula of Baeyer formatted data:
G
r=1.3518Y
r-0.7142C
r-0.3443C
b-0.3518Y
b
R=0.500Y
r+1.4021C
r+0.500Y
b
B=0.500Y
r+1.7720C
b+0.500Y
b
Y
b=1.3518Y
r-0.7142C
r-0.3443C
b-0.3518Y
b
If with matrix representation, as shown in Figure 3.
Work as G
r, R, B, G
binterval while being [0,255], Y
r, Y
binterval be [0,255], C
r, C
binterval be [128,127]; Work as G
r, R, B, G
binterval while being [0,4095], Y
r, Y
binterval be [0,4095], C
r, C
binterval be [2048,2047].
Realize the technical scheme of above-mentioned purpose:
Baeyer formatted data, to a conversion method for equivalent isostructure brightness color difference components data, comprises input Baeyer formatted data, conversion core and output brightness color difference components data.Described input Baeyer formatted data is one group of data of arranging as shown in Figure 1, after being exported, after data receiver circuit receives, provides by transducer; Described conversion core is matrix as described in Figure 4; The brightness color difference components data of described output are arrangement mode data as shown in Figure 2.The Baeyer formatted data of input is arranged by vector form as shown in Figure 3 and conversion core is carried out with it to dot-product operation by capable, obtains brightness color difference components data as shown in Figure 2, and its quantity is identical with Baeyer formatted data with structure.
A kind of brightness color difference components data, to the isostructural Baeyer formatted data of equivalent conversion method, comprise input brightness color difference components data, reverse conversion core and output Baeyer formatted data.Described input brightness color difference components data are arrangement mode data as shown in Figure 2, and the module of being changed by need provides; Described reverse conversion core is matrix as described in Figure 5; Described output Baeyer formatted data is array data as shown in Figure 1.The brightness color difference components data of input as shown in Figure 3 vector form are arranged and reverse conversion core are carried out with it to dot-product operation by row, obtain Baeyer formatted data as shown in Figure 1.
Adopt technique scheme, the technique effect that the present invention is useful is:
(1) colorful digital video tape recorder carries out Digital Image Processing computing with minimum data volume, makes that colorful digital video tape recorder is simple in structure, power-dissipation-reduced, cost;
(2) Y
rc
rc
by
by in data
r, Y
bcomponent is the luminance component of view data, and the computational methods that video data compression computing and other Digital Image Processing computing can use brightness one chromatism data to separate under the prerequisite that keeps Baeyer format data structure and data volume are processed color digital image;
(3) when needed can be by Y after treatment as calculated
rc
rc
by
bdata transaction becomes Baeyer formatted data.
Embodiment
Conversion method and the execution mode of Baeyer formatted data and equivalent isostructure brightness color difference components data, as shown in Figure 6, comprise conversion core coefficient module 1, multiplication module 2, adder Module 3, control module 4.Baeyer formatted data is input to multiplication module 1, under the control of control module 4, conversion core coefficient module 2 is transported to coefficient multiplication module 1 successively, and successively itself and input data are carried out to computing by multiplication module 1, operation result is transported to successively adder Module 3 and carries out therein accumulating operation under the control of control module 4, and operation result is output as Y
rc
rc
by
bdata.
A kind of Y
rc
rc
by
bdata, to Baeyer formatted data conversion method and execution mode, as shown in Figure 7, comprise reverse conversion core coefficient module 1, multiplication module 2, adder Module 3, control module 4.Y
rc
rc
by
bdata are input to multiplication module 1, under the control of control module 4, reverse conversion core coefficient module 2 is transported to coefficient multiplication module 1 successively, and successively itself and input data are carried out to computing by multiplication module 1, operation result is transported to successively adder Module 3 and carries out therein accumulating operation under the control of control module 4, and operation result is output as Baeyer formatted data.
Brief description of the drawings
Fig. 1 is Baeyer formatted data G
rrBG
barrangement mode.
Fig. 2 is Y
rc
rc
by
bthe arrangement mode of data.
Fig. 3 is Baeyer formatted data and Y
rc
rc
by
bdata are the computing formula of conversion mutually.
Fig. 4 is that Baeyer formatted data is to Y
rc
rc
by
bthe conversion core of data.
Fig. 5 is Y
rc
rc
by
bdata are to the conversion core of Baeyer formatted data.
Fig. 6 is that Baeyer formatted data is to Y
rc
rc
by
bthe enforcement block diagram of data transaction.
Fig. 7 is Y
rc
rc
by
bblock diagram is implemented in data to the conversion of Baeyer formatted data.