CN103414903A - Compressing method and device for Bayer format images - Google Patents

Compressing method and device for Bayer format images Download PDF

Info

Publication number
CN103414903A
CN103414903A CN2013103823646A CN201310382364A CN103414903A CN 103414903 A CN103414903 A CN 103414903A CN 2013103823646 A CN2013103823646 A CN 2013103823646A CN 201310382364 A CN201310382364 A CN 201310382364A CN 103414903 A CN103414903 A CN 103414903A
Authority
CN
China
Prior art keywords
matrix
dimensional
frequency coefficients
bayer format
carried out
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.)
Pending
Application number
CN2013103823646A
Other languages
Chinese (zh)
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.)
Tsinghua University
Original Assignee
Tsinghua University
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 Tsinghua University filed Critical Tsinghua University
Priority to CN2013103823646A priority Critical patent/CN103414903A/en
Publication of CN103414903A publication Critical patent/CN103414903A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention relates to a compressing method for Bayer format images. The compressing method comprises the step 1, classifying pixels of the collected Bayer format images according to R-G1-G2-B space and arranging the pixel into a three-dimensional array again; the step 2, carrying out three-dimensional orthogonal transformation on the rearranged three-dimensional array to obtain a frequency coefficient array; the step 3, carrying out quantization treatment on the frequency coefficient array, and then rearranging and encoding the quantified frequency coefficient array to obtain frame data. The image compressing method utilizes the characteristics of the color space of the Bayer format images to provide high image compression ratio on the premise of low algorithm complexity and high restore image quality. Thus, the compressing method can provide powerful technical support for acquiring and processing medical images.

Description

The compression method of Bayer format-pattern and device
Technical field
The present invention relates to the medical image processing technical field, particularly a kind of compression method of Bayer format-pattern and device.
Background technology
Wireless endoscope system is in body cavity of organism, gathering the important system of image, its appearance brings great convenience not only for GI inspection, also eliminate simultaneously the patient's who is checked misery, and can check the small intestine position that conventional endoscope can't check.
In wireless endoscope system, Image Compression can improve the performance of system effectively, for example, improves the frame per second of IMAQ and reduces power consumption of system in body etc.The existing technology that is applied to Static Picture Compression mainly comprises following two classes: one, harmless/accurate Lossless Image Compression, and such Still Image Compression Methods can provide higher reduction picture quality, but its compression ratio is lower; Two, based on the Image Lossy Compression method of piecemeal conversion, quantification and entropy coding, such Still Image Compression Methods can provide higher image compression rate.Although improved to a certain extent image compression rate, meanwhile, the system computational complexity is high, goes back original image and likely introduces blocking effect, is subject to going back the restriction that the subjective quality of original image requires, and compression ratio is high not enough.
In general endoscopic system, be all that compression method according to natural image compresses, but do not utilize well the characteristics that have correlation in body cavity of organism between tri-Color Channels of image RGB.Color of image comparison of coherence in body cavity of organism is strong, in color space, distributes more concentrated, between each color component, has stronger correlation.There is more redundancy in the general natural image of this this image ratio of explanation, is improved the possibility of compression ratio.
In sum, a kind of subjective quality that can either guarantee to go back original image, can take full advantage of again the endoscopic images characteristics provides the Still Image Compression Methods of higher image compression rate urgently to provide.
Summary of the invention
The technical problem that (one) will solve
The object of the present invention is to provide a kind of compression method and device of Bayer format-pattern, utilize the characteristics of Bayer format-pattern at color space, under the prerequisite of low algorithm complex and high reduction picture quality, can provide higher image compression rate.
(2) technical scheme
The invention provides a kind of compression method of Bayer format-pattern, comprising: S1. classifies and is rearranged into three-dimensional matrice according to the R-G1-G2-B space the described Bayer format-pattern pixel collected; S2. the described three-dimensional matrice rearranged is carried out to the three-dimensional orthogonal conversion and obtain matrix of frequency coefficients; S3. described matrix of frequency coefficients is carried out to quantification treatment, then the matrix of frequency coefficients after layout quantification treatment again it is carried out to the entropy coding, the component frame data.
Preferably, described step S1 comprises: S101. classifies to the described Bayer format-pattern pixel collected according to color space, is divided into R, G1, G2, tetra-parts of B; S102. the pixel of each part of take is a figure layer, folded at the enterprising windrow of direction perpendicular to the figure layer, forms three-dimensional matrice.
Preferably, described step S2 comprises: S201. is to rearranging the described three-dimensional matrice piecemeal obtained, the square of L * L * H of take carries out the three-dimensional orthogonal conversion and obtains described matrix of frequency coefficients as unit, wherein L is figure layer plane number of lines of pixels or columns, and H is the number of pixels of vertical view layer plane.
Preferably, L=H=4, or L=8, H=4, described orthogonal transform is one or more in discrete cosine transform and integer transform.
Preferably, for, the expression formula of the described three-dimensional orthogonal conversion of L=H=4 situation is:
F ( u , v , w ) = Σ k = 1 4 Σ j = 1 4 Σ i = 1 4 I ( i , j , k ) × M x ( u , i ) × M y ( v , j ) × M z ( w , k )
Wherein, M x, M y, M zMean transformation matrix.
Preferably, for described square, be 4 * 4 * 4 situations, the transformation matrix of described integer transform is:
M x = M y = 1 1 1 1 2 1 - 1 - 2 1 - 1 - 1 1 1 - 2 2 - 1
M z = 1 1 1 1 1 0 0 - 1 1 - 1 - 1 1 0 - 1 1 0 .
Preferably, described step S3 comprises: S301. carries out quantification treatment according to default quantization table matrix to described matrix of frequency coefficients, and establishing matrix of frequency coefficients is F, and quantized result is F Q, the quantization table matrix is Q, and " ⊙ " represents that the element of matrix correspondence position is divided by, and the expression formula of quantification is: F Q=F ⊙ Q; S302. by the three-dimensional matrix of frequency coefficients layout after quantification treatment, be one-dimensional vector; S303. contrast the entropy coding schedule described one-dimensional vector is carried out to the entropy coding; S304. by the matrix of frequency coefficients component frame data after the entropy coding.
Preferably, described quantization table matrix is:
Q ( 1 ) = 64 64 128 128 64 256 256 512 128 256 512 512 128 512 512 512
Q ( 2 ) = 64 64 128 256 64 256 512 512 128 512 512 512 256 512 512 512
Q ( 3 ) = 64 128 256 256 128 512 512 512 256 512 512 512 256 512 512 512
Q ( 4 ) = 64 256 256 256 256 512 512 512 256 512 512 512 256 512 512 512
Wherein, Q (i) means the i layer of Q, i=1,2,3,4.
Preferably, three-dimensional each component of matrix of frequency coefficients matrix is lower according to frequency component, the principle that sorting position is more forward, layout is one-dimensional vector; For stating square, be 4 * 4 * 4 situations, establish F Q(i, j, k) represents F QI capable, j row, k layer element, its preferred sortord is:
[F Q(1,1,1),F Q(1,1,2),F Q(1,1,3),F Q(1,2,1),F Q(2,1,1,),F Q(1,2,2),F Q(2,1,2)F Q(1,3,1),F Q(2,2,1),F Q(3,1,1),F Q(1,1,4),F Q(1,2,3),F Q(2,1,3),F Q(1,3,2),F Q(2,2,2),F Q(3,1,2),F Q(1,4,1),F Q(2,3,1),F Q(3,2,1),F Q(4,1,1),F Q(1,2,4),F Q(2,1,4),F Q(1,3,3),F Q(2,2,3),F Q(3,1,3),F Q(1,4,2),F Q(2,3,2),F Q(3,2,2),F Q(4,1,2),F Q(2,4,1),F Q(3,3,1),F Q(4,2,1),F Q(1,3,4),F Q(2,2,4),F Q(3,1,4),F Q(1,4,3),F Q(2,3,3),F Q(3,2,3),F Q(4,1,3)F Q(2,4,2),F Q(3,3,2),F Q(4,2,2),F Q(3,4,1),F Q(4,3,1),F Q(1,4,4),F Q(2,3,4),F Q(3,2,4),F Q(4,1,4),F Q(2,4,3),F Q(3,3,3),F Q(4,2,3),F Q(3,4,2),F Q(4,3,2),F Q(4,4,1),F Q(2,4,4),F Q(3,3,4),F Q(4,2,4),F Q(3,4,3),F Q(4,3,4),F Q(4,4,2),F Q(3,4,4),F Q(4,3,4),F Q(4,4,3),F Q(4,4,4)]。
The present invention also provides a kind of compression set of Bayer format-pattern, comprising: first module, and for the described Bayer format-pattern pixel to collecting, classify and be rearranged into three-dimensional matrice; Second unit, carry out the three-dimensional orthogonal conversion for the described three-dimensional matrice to rearranging and obtain matrix of frequency coefficients; Unit the 3rd, for described matrix of frequency coefficients is carried out to quantification treatment, the matrix of frequency coefficients after layout quantification treatment again it is carried out to the entropy coding, the component frame data then.
(3) beneficial effect
At first the compression method of a kind of Bayer format-pattern of the present invention carries out the classification of color space to view data and is rearranged into 3 dimension matrixes, next obtains resetting the matrix of frequency coefficients of 3 orthogonal dimension conversion of matrix, then, again the matrix of frequency coefficients after layout quantification treatment is also carried out the entropy coding to it, frame data the reconstructed image of finally decoding and being comprised of the matrix of frequency coefficients after the entropy coding.Method for compressing image of the present invention, utilized the characteristics of Bayer format-pattern at color space, under the prerequisite of low algorithm complex and high reduction picture quality, can provide very high image compression rate; Therefore, the present invention provides strong technical support for acquisition and the processing of medical image.
The accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, below will introduce simply apparently required use accompanying drawing in embodiment or description of the Prior Art, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 be the bayer image carry out the classification of color space and be rearranged into 3 the dimension matrixes the process schematic diagram;
Fig. 2 is the schematic flow sheet of the compression method of a kind of Bayer format-pattern of the present invention.
Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the present invention clearer, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is carried out to clear, complete description, obviously, described embodiment is a part of embodiment of the present invention, rather than whole embodiment.Based on the embodiment in the present invention, those of ordinary skills, not making under the creative work prerequisite the every other embodiment obtained, belong to the scope of protection of the invention.
As shown in Figure 2, the compression method of a kind of Bayer format-pattern provided by the invention mainly comprises the following steps:
S1. the described Bayer format-pattern pixel collected is classified and is rearranged into three-dimensional matrice according to the R-G1-G2-B space; This step mainly comprises:
S101. according to color space, the described Bayer format-pattern pixel collected is classified, be divided into R, G1, G2, tetra-parts of B; In the present embodiment with R-G1-G2-B (Red, Green1, Green2, the Blue of bayer image, RGB) four color spaces are for illustrating according to classifying: the data of obtaining initial pictures, original data is the view data meaned with the R-G-B color mode, each pixel comprises a numerical value in 2 * 2 repetitive, mean in red (R), green (G) of this pixel, blue (B) three primary colors wherein a kind of value, wherein G has two, distributes and is called G1, G2 to show differentiation.Generally, the R of image, G1, G2, B value by 8 or more the unsigned number of multidigit mean; Then take R-G1-G2-B tetra-color spaces as according to the pixel of whole original image is classified;
S102. the pixel of each part of take is a figure layer, folded at the enterprising windrow of direction perpendicular to the figure layer, forms three-dimensional matrice, as shown in Figure 1.
S2. the described three-dimensional matrice rearranged is carried out to the three-dimensional orthogonal conversion and obtain matrix of frequency coefficients; This step mainly comprises:
S201. to rearranging the described three-dimensional matrice piecemeal obtained, the square of L * L * H of take carries out the three-dimensional orthogonal conversion and obtains described matrix of frequency coefficients as unit, wherein L is figure layer plane number of lines of pixels or columns, H is the number of pixels of vertical view layer plane, for example thinks that 4 * 4 * 4 pixels or 8 * 8 * 4 pixels are a unit; 4 * 4 * 4 pixels of take in the present embodiment describe as a unit as example, when the length of original image is wide or high while not being 4 integral multiple, should first it be supplied to meet the conversion requirement, and the value of the pixel of supplying can be got the value of neighboring edge pixel; Wherein, described orthogonal transform is one or more in discrete cosine transform and integer transform; The integer transform of take in the present embodiment describes as example; Be specially: establishing above-mentioned 4 * 4 * 4 pixel cells is I, I(i, j, k) mean that the i in I is capable, j row, the element of k layer; Transformation results is F, F(i, j, k) mean that the i in F is capable, j row, the element of k layer.Variation as the formula (1), transform matrix M wherein x, M y, M zShown in (2), (3):
F ( u , v , w ) = Σ k = 1 4 Σ j = 1 4 Σ i = 1 4 I ( i , j , k ) × M x ( u , i ) × M y ( v , j ) × M z ( w , k ) - - - ( 1 )
Adopt the words of matrix operation can be divided into two steps, D means intermediate data, is similarly three-dimensional matrice; M TTransposed matrix for M.
At first every one deck of along continuous straight runs in I is done to two-dimensional orthogonal transformation, I (::, k) mean the k layer in I, k=1,2,3,4
D(:,:,k)=M xI(:,:,k)M y T
Then along the longitudinal axis, be the D cutting 4 parts, along the y direction one dimension orthogonal transform that tries again.The direction of cutting can be along the yz plane or the xz plane cutting, and D is divided into to D (i: :) or D (:, j :) four parts, i=1 wherein, 2,3,4 or j=1,2,3,4
F (i: :)=M zD (i: :) or F (:, j :)=M zD (:, j :)
Preferred transformation matrix in the present embodiment:
M x = M y = 1 1 1 1 2 1 - 1 - 2 1 - 1 - 1 1 1 - 2 2 - 1 - - - ( 2 )
M z = 1 1 1 1 1 0 0 - 1 1 - 1 - 1 1 0 - 1 1 0 - - - ( 3 )
S3. described matrix of frequency coefficients is carried out to quantification treatment, then the matrix of frequency coefficients after layout quantification treatment again it is carried out to the entropy coding, the component frame data; This step mainly comprises:
S301. according to default quantization table matrix, described matrix of frequency coefficients F is carried out to quantification treatment, establishing quantized result is F Q, can be expressed as formula (4), " ⊙ " represents that the element of matrix correspondence position is divided by, and wherein the quantization table matrix is Q, and Q is similarly a three-dimensional matrice, and the preferred Q of the present embodiment is as the formula (5);
F Q=F⊙Q (4)
Q (i) means the i layer of Q
Q ( 1 ) = 64 64 128 128 64 256 256 512 128 256 512 512 128 512 512 512
Q ( 2 ) = 64 64 128 256 64 256 512 512 128 512 512 512 256 512 512 512
Q ( 3 ) = 64 128 256 256 128 512 512 512 256 512 512 512 256 512 512 512
Q ( 4 ) = 64 256 256 256 256 512 512 512 256 512 512 512 256 512 512 512 - - - ( 5 )
S302. to the matrix of frequency coefficients F after quantizing QCarry out layout again, become the one-dimensional vector form by matrix form; Its transformation rule is as follows, establishes F Q(i, j, k) represents F QI capable, j row, k layer element; The one-dimensional vector of formation is as the formula (6):
[F Q(1,1,1),F Q(1,1,2),F Q(1,1,3),F Q(1,2,1),F Q(2,1,1,),F Q(1,2,2),F Q(2,1,2)F Q(1,3,1),F Q(2,2,1),F Q(3,1,1),F Q(1,1,4),F Q(1,2,3),F Q(2,1,3),F Q(1,3,2),F Q(2,2,2),F Q(3,1,2),F Q(1,4,1),F Q(2,3,1),F Q(3,2,1),F Q(4,1,1),F Q(1,2,4),F Q(2,1,4),F Q(1,3,3),F Q(2,2,3),F Q(3,1,3),F Q(1,4,2),F Q(2,3,2),F Q(3,2,2),F Q(4,1,2),F Q(2,4,1),F Q(3,3,1),F Q(4,2,1),F Q(1,3,4),F Q(2,2,4),F Q(3,1,4),F Q(1,4,3),F Q(2,3,3),F Q(3,2,3),F Q(4,1,3)F Q(2,4,2),F Q(3,3,2),F Q(4,2,2),F Q(3,4,1),F Q(4,3,1),F Q(1,4,4),F Q(2,3,4),F Q(3,2,4),F Q(4,1,4),F Q(2,4,3),F Q(3,3,3),F Q(4,2,3),F Q(3,4,2),F Q(4,3,2),F Q(4,4,1),F Q(2,4,4),F Q(3,3,4),F Q(4,2,4),F Q(3,4,3),F Q(4,3,4),F Q(4,4,2),F Q(3,4,4),F Q(4,3,4),F Q(4,4,3),F Q(4,4,4)](6)
S303. contrast corresponding entropy coding schedule each element in described one-dimensional vector is carried out to the entropy coding.The fritter of 4*4*4 has 64 elements after becoming one-dimensional vector.
Wherein first three element adopts the DC coding in the huffman coding, and the coefficient between different piecemeals is first done the difference preliminary treatment and obtained predicated error.Take first element is example, supposes that image is divided into the fritter into n, forms a line first coefficient of each fritter to obtain
F 1=[F 1(1),F 1(2),F 1(3),……F 1(n)]
After doing the difference preliminary treatment, obtain predicated error D 1:
Then to predicated error D 1(n) in, each coefficient carries out entropy coding (principle of coding is the same with the jpeg image coding).Each coefficient can be expressed as the form of [representing the code word of binary code length, the binary code of this coefficient].A front part has meaned that this coefficient needs binary code how long stores, and concrete code word can be shown to obtain by inquiry DCTAB.The preferred code word of the present embodiment is in Table 1.
The coefficient of encoding Binary code length Code word
0 0 00
-1,1 1 010
-3,-2,2,3 2 011
-7,...,-4,4,...,7 3 100
-15,...,-8,8,...,15 4 101
-31,...,-16,16,...,31 5 110
-63,...,-32,32,...,63 6 1110
-127,...,-64,64,...,127 7 11110
-255,...,-128,128,...,255 8 111110
-511,...,-256,256,...,511 9 1111110
-1023,...,-512,512,...,1023 10 11111110
-2047,...,-1024,1024,...,2047 11 111111110
Table 1DCTAB
Rear 61 elements adopt the AC coding (principle of coding is the same with the jpeg image coding) in the huffman coding.In each fritter, each nonzero coefficient is expressed as the form of [representing the code word of stroke/binary code length, the binary code of this coefficient].Stroke refers to 0 number of nonzero coefficient front.A front part has meaned that this coefficient front has how many 0 and this coefficient needs binary code how long stores, and concrete code word can be shown to obtain by inquiry ACTAB.Whenever stroke be more than or equal at 16 o'clock to insert a ZRL(, be 16/0) mean that 16 companies are zero; After last the nonzero coefficient end-of-encode of each fritter, insert end of block character EOB(0/0).The preferred code word of the present embodiment is in Table 2.
Stroke binary code length Code word
0\0 11
0\1 00
0\2 010
0\3 1010
0\4 011010
0\5 01101100
0\6 0111111001
0\7 01111110000010
0\8 0111111000001100000011011011
0\9 0111111000001100000011011010
0\10 0111111000001100000011011001
1\1 100
1\2 10111
1\3 01101111
1\4 0111111101
1\5 0111111000110
1\6 0111111000001111
1\7 0111111000001100000011011000
1\8 0111111000001100000011010111
1\9 0111111000001100000011010110
1\10 0111111000001100000011010101
2\1 01100
2\2 011011010
2\3 011111110011
2\4 01111110000011011
2\5 0111111000001100000011010100
2\6 0111111000001100000011010011
2\7 0111111000001100000011010010
2\8 0111111000001100000011010001
2\9 0111111000001100000011010000
2\10 0111111000001100000011001111
3\1 10110
3\2 0110110111
3\3 011111100000010
3\4 011111100000110000000
3\5 0111111000001100000011001110
3\6 0111111000001100000011001101
3\7 0111111000001100000011001100
3\8 0111111000001100000011001011
3\9 0111111000001100000011001010
3\10 0111111000001100000011001001
4\1 011110
4\2 01111111000
4\3 0111111000001110
4\4 0111111000001100000011001000
4\5 0111111000001100000011000111
4\6 0111111000001100000011000110
4\7 0111111000001100000011000101
4\8 0111111000001100000011000100
4\9 0111111000001100000011000011
4\10 0111111000001100000011000010
5\1 011101
5\2 011111110010
5\3 0111111000001100011
5\4 0111111000001100000011000001
5\5 0111111000001100000011000000
5\6 0111111000001100000010111111
5\7 0111111000001100000010111110
5\8 0111111000001100000010111101
5\9 0111111000001100000010111100
5\10 0111111000001100000010111011
6\1 0111000
6\2 011111100010
6\3 011111100000110101
6\4 0111111000001100000010111010
6\5 0111111000001100000010111001
6\6 0111111000001100000010111000
6\7 0111111000001100000010110111
6\8 0111111000001100000010110110
6\9 0111111000001100000010110101
6\10 0111111000001100000010110100
7\1 0111110
7\2 01111110000000
7\3 01111110000011000101
7\4 0111111000001100000010110011
7\5 0111111000001100000010110010
7\6 0111111000001100000010110001
7\7 0111111000001100000010110000
7\8 0111111000001100000010101111
7\9 0111111000001100000010101110
7\10 0111111000001100000010101101
8\1 01101110
8\2 0111111000111
8\3 0111111000001100000010101100
8\4 0111111000001100000010101011
8\5 0111111000001100000010101010
8\6 0111111000001100000010101001
8\7 0111111000001100000010101000
8\8 0111111000001100000010100111
8\9 0111111000001100000010100110
8\10 0111111000001100000010100101
9\1 01110011
9\2 011111100000011
9\3 01111110000011000100
9\4 0111111000001100000010100100
9\5 0111111000001100000010100011
9\6 0111111000001100000010100010
9\7 0111111000001100000010100001
9\8 0111111000001100000010100000
9\9 0111111000001100000010011111
9\10 0111111000001100000010011110
10\1 011100101
10\2 011111100000110011
10\3 0111111000001100000010011101
10\4 0111111000001100000010011100
10\5 0111111000001100000010011011
10\6 0111111000001100000010011010
10\7 0111111000001100000010011001
10\8 0111111000001100000010011000
10\9 0111111000001100000010010111
10\10 0111111000001100000010010110
11\1 011111111
11\2 011111100000110010
11\3 0111111000001100000010010101
11\4 0111111000001100000010010100
11\5 0111111000001100000010010011
11\6 0111111000001100000010010010
11\7 0111111000001100000010010001
11\8 0111111000001100000010010000
11\9 0111111000001100000010001111
11\10 0111111000001100000010001110
12\1 011100100
12\2 011111100000110100
12\3 0111111000001100000010001101
12\4 0111111000001100000010001100
12\5 0111111000001100000010001011
12\6 0111111000001100000010001010
12\7 0111111000001100000010001001
12\8 0111111000001100000010001000
12\9 0111111000001100000010000111
12\10 0111111000001100000010000110
13\1 0111111011
13\2 01111110000011000011
13\3 0111111000001100000010000101
13\4 0111111000001100000010000100
13\5 0111111000001100000010000011
13\6 0111111000001100000010000010
13\7 0111111000001100000010000001
13\8 0111111000001100000010000000
13\9 011111100000110000001111111
13\10 011111100000110000001111110
14\1 0110110110
14\2 01111110000011000010
14\3 011111100000110000001111101
14\4 011111100000110000001111100
14\5 011111100000110000001111011
14\6 011111100000110000001111010
14\7 011111100000110000001111001
14\8 011111100000110000001111000
14\9 011111100000110000001110111
14\10 011111100000110000001110110
15\1 011111100001
15\2 01111110000011000001
15\3 011111100000110000001110101
15\4 011111100000110000001110100
15\5 011111100000110000001110011
15\6 011111100000110000001110010
15\7 011111100000110000001110001
15\8 011111100000110000001110000
15\9 011111100000110000001101111
15\10 011111100000110000001101110
16\0 0111111010
Table 2ACTAB
S304. by the matrix of frequency coefficients component frame data after the entropy coding, whole compression process finishes.
Apply method for compressing image of the present invention Bayer format-pattern (being the Wireless capsule endoscope image in the present embodiment) is processed, can obtain 94% image compression ratio
Figure BDA0000373684010000141
The reconstructed image objective quality can reach 41.6dB, and does not have blocking effect in reconstructed image; And other are applied to the compression method of Bayer format-pattern so far, in same picture quality situation, compression ratio is only 89%, and compression method of the present invention is by utilizing the correlation in color of image space, make compression ratio that obvious must the raising be arranged, the data after compression reduce more than 40%.Therefore, method for compressing image of the present invention, under the prerequisite of low algorithm complex and high reduction picture quality, can provide very high image compression rate.
The present invention also provides a kind of compression set of Bayer format-pattern, comprising: first module, and for the described Bayer format-pattern pixel to collecting, classify and be rearranged into three-dimensional matrice; Second unit, carry out the three-dimensional orthogonal conversion for the described three-dimensional matrice to rearranging and obtain matrix of frequency coefficients; Unit the 3rd, for described matrix of frequency coefficients is carried out to quantification treatment, the matrix of frequency coefficients after layout quantification treatment again it is carried out to the entropy coding, the component frame data then.
One of ordinary skill in the art will appreciate that: all or part of step that realizes above-described embodiment can complete by the hardware that program command is correlated with, aforesaid program can be stored in a computer read/write memory medium, this program, when carrying out, is carried out the step that comprises above-described embodiment; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CDs.
With it should be noted that: above embodiment, only be used to technical scheme of the present invention is described, is not intended to limit; Although with reference to previous embodiment, the present invention is had been described in detail, those of ordinary skills are to be understood that: it still can be modified to the technical scheme that aforementioned each embodiment puts down in writing, or part technical characterictic wherein is equal to replacement; And these modifications or replacement, and the essence of appropriate technical solution breaks away from the spirit and scope of various embodiments of the present invention technical scheme frequently.

Claims (10)

1. the compression method of a Bayer format-pattern, is characterized in that, comprising:
S1. the described Bayer format-pattern pixel collected is classified and is rearranged into three-dimensional matrice according to the R-G1-G2-B space;
S2. the described three-dimensional matrice rearranged is carried out to the three-dimensional orthogonal conversion and obtain matrix of frequency coefficients;
S3. described matrix of frequency coefficients is carried out to quantification treatment, then the matrix of frequency coefficients after layout quantification treatment again it is carried out to the entropy coding, the component frame data.
2. the method for claim 1, is characterized in that, described step S1 comprises:
S101. according to color space, the described Bayer format-pattern pixel collected is classified, be divided into R, G1, G2, tetra-parts of B;
S102. the pixel of each part of take is a figure layer, folded at the enterprising windrow of direction perpendicular to the figure layer, forms three-dimensional matrice.
3. method as claimed in claim 1 or 2, is characterized in that, described step S2 comprises:
S201. to rearranging the described three-dimensional matrice piecemeal obtained, the square of L * L * H of take carries out the three-dimensional orthogonal conversion and obtains described matrix of frequency coefficients as unit, and wherein L is figure layer plane number of lines of pixels or columns, and H is the number of pixels of vertical view layer plane.
4. method as claimed in claim 3, is characterized in that, L=H=4, or L=8, H=4, and described orthogonal transform is one or more in discrete cosine transform and integer transform.
5. method as claimed in claim 4, is characterized in that, for, the expression formula of the described three-dimensional orthogonal conversion of L=H=4 situation is:
F ( u , v , w ) = Σ k = 1 4 Σ j = 1 4 Σ i = 1 4 I ( i , j , k ) × M x ( u , i ) × M y ( v , j ) × M z ( w , k )
Wherein, M x, M y, M zMean transformation matrix.
6. method as claimed in claim 4, is characterized in that, is 4 * 4 * 4 situations for described square, and the transformation matrix of described integer transform is:
M x = M y = 1 1 1 1 2 1 - 1 - 2 1 - 1 - 1 1 1 - 2 2 - 1
M z = 1 1 1 1 1 0 0 - 1 1 - 1 - 1 1 0 - 1 1 0 .
7. method as claimed in claim 1 or 2, is characterized in that, described step S3 comprises:
S301. according to default quantization table matrix, described matrix of frequency coefficients is carried out to quantification treatment, establishing matrix of frequency coefficients is F, and quantized result is F Q, the quantization table matrix is Q, and " ⊙ " represents that the element of matrix correspondence position is divided by, and the expression formula of quantification is: F Q=F ⊙ Q;
S302. by the three-dimensional matrix of frequency coefficients layout after quantification treatment, be one-dimensional vector;
S303. contrast the entropy coding schedule described one-dimensional vector is carried out to the entropy coding;
S304. by the matrix of frequency coefficients component frame data after the entropy coding.
8. method as claimed in claim 7, is characterized in that, described quantization table matrix is:
Q ( 1 ) = 64 64 128 128 64 256 256 512 128 256 512 512 128 512 512 512
Q ( 2 ) = 64 64 128 256 64 256 512 512 128 512 512 512 256 512 512 512
Q ( 3 ) = 64 128 256 256 128 512 512 512 256 512 512 512 256 512 512 512
Q ( 4 ) = 64 256 256 256 256 512 512 512 256 512 512 512 256 512 512 512
Wherein, Q (i) means the i layer of Q, i=1,2,3,4.
9. method as claimed in claim 7, is characterized in that, three-dimensional each component of matrix of frequency coefficients matrix is lower according to frequency component, the principle that sorting position is more forward, and layout is one-dimensional vector; For stating square, be 4 * 4 * 4 situations, establish F Q(i, j, k) represents F QI capable, j row, k layer element, its preferred sortord is:
[F Q(1,1,1),F Q(1,1,2),F Q(1,1,3),F Q(1,2,1),F Q(2,1,1,),F Q(1,2,2),F Q(2,1,2)F Q(1,3,1),F Q(2,2,1),F Q(3,1,1),F Q(1,1,4),F Q(1,2,3),F Q(2,1,3),F Q(1,3,2),F Q(2,2,2),F Q(3,1,2),F Q(1,4,1),F Q(2,3,1),F Q(3,2,1),F Q(4,1,1),F Q(1,2,4),F Q(2,1,4),F Q(1,3,3),F Q(2,2,3),F Q(3,1,3),F Q(1,4,2),F Q(2,3,2),F Q(3,2,2),F Q(4,1,2),F Q(2,4,1),F Q(3,3,1),F Q(4,2,1),F Q(1,3,4),F Q(2,2,4),F Q(3,1,4),F Q(1,4,3),F Q(2,3,3),F Q(3,2,3),F Q(4,1,3)F Q(2,4,2),F Q(3,3,2),F Q(4,2,2),F Q(3,4,1),F Q(4,3,1),F Q(1,4,4),F Q(2,3,4),F Q(3,2,4),F Q(4,1,4),F Q(2,4,3),F Q(3,3,3),F Q(4,2,3),F Q(3,4,2),F Q(4,3,2),F Q(4,4,1),F Q(2,4,4),F Q(3,3,4),F Q(4,2,4),F Q(3,4,3),F Q(4,3,4),F Q(4,4,2),F Q(3,4,4),F Q(4,3,4),F Q(4,4,3),F Q(4,4,4)]。
10. the compression set of a Bayer format-pattern, is characterized in that, comprising:
First module, classify and be rearranged into three-dimensional matrice for the described Bayer format-pattern pixel to collecting;
Second unit, carry out the three-dimensional orthogonal conversion for the described three-dimensional matrice to rearranging and obtain matrix of frequency coefficients;
Unit the 3rd, for described matrix of frequency coefficients is carried out to quantification treatment, the matrix of frequency coefficients after layout quantification treatment again it is carried out to the entropy coding, the component frame data then.
CN2013103823646A 2013-08-28 2013-08-28 Compressing method and device for Bayer format images Pending CN103414903A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2013103823646A CN103414903A (en) 2013-08-28 2013-08-28 Compressing method and device for Bayer format images

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2013103823646A CN103414903A (en) 2013-08-28 2013-08-28 Compressing method and device for Bayer format images

Publications (1)

Publication Number Publication Date
CN103414903A true CN103414903A (en) 2013-11-27

Family

ID=49607885

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2013103823646A Pending CN103414903A (en) 2013-08-28 2013-08-28 Compressing method and device for Bayer format images

Country Status (1)

Country Link
CN (1) CN103414903A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105306941A (en) * 2015-11-12 2016-02-03 贺新 Video coding method
CN105657385A (en) * 2015-12-31 2016-06-08 上海集成电路研发中心有限公司 Compression method for original image data
CN107534447A (en) * 2015-03-30 2018-01-02 微软技术许可有限责任公司 Data compression
CN110868603A (en) * 2019-11-04 2020-03-06 电子科技大学 Bayer image compression method
CN110971913A (en) * 2019-11-04 2020-04-07 电子科技大学 Bayer image compression method based on filling Y channel
CN111654705A (en) * 2020-06-05 2020-09-11 电子科技大学 Mosaic image compression method based on novel color space conversion
CN114189689A (en) * 2021-11-25 2022-03-15 广州思德医疗科技有限公司 Image compression processing method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1399473A (en) * 2001-07-19 2003-02-26 陈贺新 Compression method and device for digital color image signal
CN1674665A (en) * 2004-03-26 2005-09-28 奥林巴斯株式会社 Image compressing method and image compression apparatus
CN101656889A (en) * 2009-06-22 2010-02-24 南京大学 High definition video real time compressing as well as coding and decoding method
CN101977330A (en) * 2010-11-12 2011-02-16 北京空间机电研究所 Bayer image compression method based on YUV conversion
CN102984520A (en) * 2012-12-04 2013-03-20 江南大学 Video compression method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1399473A (en) * 2001-07-19 2003-02-26 陈贺新 Compression method and device for digital color image signal
CN1674665A (en) * 2004-03-26 2005-09-28 奥林巴斯株式会社 Image compressing method and image compression apparatus
CN101656889A (en) * 2009-06-22 2010-02-24 南京大学 High definition video real time compressing as well as coding and decoding method
CN101977330A (en) * 2010-11-12 2011-02-16 北京空间机电研究所 Bayer image compression method based on YUV conversion
CN102984520A (en) * 2012-12-04 2013-03-20 江南大学 Video compression method and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
桑爱军 等: "三维矩阵彩色图像WDCT压缩编码", 《电子学报》 *
赵岩 等: "基于三维帧内预测的彩色图像编码", 《吉林大学学报(信息科学版)》 *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107534447B (en) * 2015-03-30 2020-09-11 微软技术许可有限责任公司 Data compression
CN107534447A (en) * 2015-03-30 2018-01-02 微软技术许可有限责任公司 Data compression
CN105306941B (en) * 2015-11-12 2019-05-24 成都图影视讯科技有限公司 A kind of method for video coding
CN105306941A (en) * 2015-11-12 2016-02-03 贺新 Video coding method
CN105657385A (en) * 2015-12-31 2016-06-08 上海集成电路研发中心有限公司 Compression method for original image data
CN110971913B (en) * 2019-11-04 2021-09-24 电子科技大学 Bayer image compression method based on filling Y channel
CN110971913A (en) * 2019-11-04 2020-04-07 电子科技大学 Bayer image compression method based on filling Y channel
CN110868603B (en) * 2019-11-04 2021-08-06 电子科技大学 Bayer image compression method
CN110868603A (en) * 2019-11-04 2020-03-06 电子科技大学 Bayer image compression method
CN111654705A (en) * 2020-06-05 2020-09-11 电子科技大学 Mosaic image compression method based on novel color space conversion
CN111654705B (en) * 2020-06-05 2022-11-11 电子科技大学 Mosaic image compression method based on color space conversion
CN114189689A (en) * 2021-11-25 2022-03-15 广州思德医疗科技有限公司 Image compression processing method and device, electronic equipment and storage medium
CN114189689B (en) * 2021-11-25 2024-02-02 广州思德医疗科技有限公司 Image compression processing method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN103414903A (en) Compressing method and device for Bayer format images
CN100518295C (en) DCT compression using Golomb-Rice coding
KR20190087263A (en) A method and apparatus of image processing using line unit operation
CN104427349A (en) Bayer image compression method
US20230276023A1 (en) Image processing method and device using a line-wise operation
WO2013079035A1 (en) Image transform zero coefficient selection and zero-skip transmission for arbitrary shape transform coding
CN113079378B (en) Image processing method and device and electronic equipment
JP4293912B2 (en) Data compression of color images using wavelet transform
TW200300242A (en) Method and apparatus for low memory rendering
US6996595B2 (en) Apparatus and method for consolidating output data from a plurality of processors
CN111091515B (en) Image restoration method and device, and computer-readable storage medium
CN104683818A (en) Image compression method based on biorthogonal invariant set multi-wavelets
US20100172419A1 (en) Systems and methods for compression, transmission and decompression of video codecs
Deshlahra Analysis of Image Compression Methods Based On Transform and Fractal Coding
Salih et al. Image compression for quality 3D reconstruction
Bhade et al. Comparative study of DWT, DCT, BTC and SVD techniques for image compression
Yan et al. Compressive sampling for array cameras
CN113141506A (en) Deep learning-based image compression neural network model, and method and device thereof
Rani et al. Comparative analysis of image compression using dct and dwt transforms
DE102011002325A1 (en) Video sequence compression device for e.g. video coder of digital camera, has processing element connected with horizontal and vertical cache memory units for receiving data and performing compression process of video sequence
Mastriani Rule of three for superresolution of still images with applications to compression and denoising
CN107124614B (en) Image data compression method with ultrahigh compression ratio
CN111031312B (en) Image compression method for realizing attention mechanism based on network
Rodrigues et al. Image Compression for Quality 3D Reconstruction
CN111246205B (en) Image compression method based on directional double-quaternion filter bank

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20131127