CN1190755C - Colour-picture damage-free compression method based on perceptron - Google Patents
Colour-picture damage-free compression method based on perceptron Download PDFInfo
- Publication number
- CN1190755C CN1190755C CNB021467684A CN02146768A CN1190755C CN 1190755 C CN1190755 C CN 1190755C CN B021467684 A CNB021467684 A CN B021467684A CN 02146768 A CN02146768 A CN 02146768A CN 1190755 C CN1190755 C CN 1190755C
- Authority
- CN
- China
- Prior art keywords
- value
- prediction residual
- image
- perceptron
- residual value
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 70
- 238000007906 compression Methods 0.000 title claims abstract description 62
- 230000006835 compression Effects 0.000 title claims abstract description 62
- 238000012545 processing Methods 0.000 claims abstract description 26
- 235000007164 Oryza sativa Nutrition 0.000 claims abstract description 8
- 235000009566 rice Nutrition 0.000 claims abstract description 8
- 240000007594 Oryza sativa Species 0.000 claims abstract 2
- 238000013507 mapping Methods 0.000 claims description 26
- 238000006243 chemical reaction Methods 0.000 claims description 21
- 238000013528 artificial neural network Methods 0.000 claims description 12
- 230000005540 biological transmission Effects 0.000 claims description 7
- 238000012544 monitoring process Methods 0.000 claims description 7
- 238000012549 training Methods 0.000 claims description 7
- 230000006870 function Effects 0.000 claims description 6
- 239000000872 buffer Substances 0.000 claims description 4
- 230000005284 excitation Effects 0.000 claims description 4
- 230000003287 optical effect Effects 0.000 claims description 3
- 230000011664 signaling Effects 0.000 claims description 3
- 238000012937 correction Methods 0.000 claims description 2
- 238000004321 preservation Methods 0.000 claims description 2
- 230000000694 effects Effects 0.000 abstract description 6
- 230000001066 destructive effect Effects 0.000 abstract 2
- 230000009466 transformation Effects 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 10
- 238000005516 engineering process Methods 0.000 description 8
- 241000209094 Oryza Species 0.000 description 6
- 230000003044 adaptive effect Effects 0.000 description 5
- 239000004744 fabric Substances 0.000 description 5
- 235000002566 Capsicum Nutrition 0.000 description 3
- 241000758706 Piperaceae Species 0.000 description 3
- 238000013461 design Methods 0.000 description 3
- 230000006978 adaptation Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 2
- 238000005311 autocorrelation function Methods 0.000 description 2
- 238000005314 correlation function Methods 0.000 description 2
- 238000000151 deposition Methods 0.000 description 2
- 238000002474 experimental method Methods 0.000 description 2
- 230000008676 import Effects 0.000 description 2
- 210000002569 neuron Anatomy 0.000 description 2
- 230000008520 organization Effects 0.000 description 2
- 241000122235 Junco hyemalis Species 0.000 description 1
- 239000012141 concentrate Substances 0.000 description 1
- 238000013144 data compression Methods 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000013139 quantization Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Images
Landscapes
- Compression, Expansion, Code Conversion, And Decoders (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The present invention relates to a color-image non-destructive compression method based on a perceptron, which relates to the technical field of image processing. The present invention is characterized in that the present invention has the following processing steps: (1) target images to be processed are stored in an internal storage after read in by a computer from interfaces, such as a USB (Universal Serial Bus), etc.; (2) the existing non-destructive color space transformation is carried out for images to be compressed; (3) a two-dimensional weighted predictive model is adopted to predict current pixels to work out a predicting residual value; (4) according to the mapped predicting residual value, the predicating residual value is judged whether smaller than given limit of errors, and if the predicating residual value exceeds a threshold value, self-adaptive adjustment is needed; (5) the existing RICE entropy coding is adopted; (6) image compressed results are output and stored. Compared with a traditional compression method, the method provided by the present invention has the advantages of lower complexity, higher compression ratio and higher executing speed, and compression time is obviously less than that of the traditional compression method at the same time of maintaining higher compression effect.
Description
Technical field
The present invention relates to image processing field, design and realized a kind of coloured image lossless compression method based on the neural network perceptron.
Background technology
Along with the widespread use of multimedia technology in recent years, in the storage and transmission application of some important images information, the Lossless Image Compression Algorithm technology is being brought into play important and irreplaceable effect, and it can alleviate to a great extent to medium capacity and requirements for transmission.Particularly in the application system that repeated multiple times is stored, in order to keep the image initial quality, the general requirement must be adopted lossless compressiong.
Owing to have redundant information between the image pixel, utilize the correlativity between the view data, by recompile, remove the redundant information in the view data, just can reach the purpose of compression of images.Can be regarded as the scanning of multicomponent monochromatic data image sequence or interpolation scanning as for coloured image arranges and forms.Among Fig. 1 (b) and (c) be respectively the cross correlation function of pixel between the autocorrelation function of each planes of color interior pixel in the standard picture (a) and each planes of color.Comparison diagram (b) and figure (c) can see that the correlativity in the same monochromatic plane between the neighbor will be higher than the correlativity between the pixel of relevant position in the different monochromatic planes.For figure (a), the correlativity between G plane and the B planar pixel will be higher than the correlativity between R and G or R and the B.This specific character according to coloured image can design the coloured image compression scheme.
Be directed to the Lossless Compression of rest image; The former CCITT by name of the ITU-T of international organization (InternationalTelecommunications Union--International Telecommunications Union) (InternationalTelephone and Telegraph Consultative Committee---international Telephone and Telegraph Consultative Committee) and ISO (International Standards Organization)/IEC (International Electrotechnical Commission) united the international standard of having formulated Lossless Compression in 1992, the earlier version that will be recommended as lossless compression-encoding algorithm Joint Photographic Experts Group based on fallout predictor and the Huffman coding of DPCM (Differential Pulse Code Modulation---linear predictive coding). But the DPCM that these are traditional or it is carried out simply improved fixed mode fallout predictor can not obtain complete incoherent predicted data.Make compression algorithm lower, particularly compression time is longer, far can not satisfy the needs of current application.
The lossless compression scheme of view data generally comprises modeling (modeling) and coding (coding) two parts.The appearance of arithmetic coding method can separate these two parts from conceptive, the code word data after the model mapping is distributed from probability.And the researchist can concentrate one's energy to study and design various forecast models efficiently, thereby makes lossless compress all be greatly improved than early stage Joint Photographic Experts Group algorithm on ratio of compression and compression efficiency.The amenable new standard of JBIG/JPEG (JPEG (joint photographic experts group)) committee member: JPEG-LS adopts a kind of harmless/nearly Lossless Image Compression algorithm of LOCO-I (LOw COmplexity LOssless COmpressionfor Images) algorithm as its core content.This algorithm adopts two-dimensional prediction, and predicted value is carried out adaptively correcting by introducing context (Context), the residual signals that obtains is carried out the Golomb coding, when fallout predictor is found consecutive identical pixel is arranged, just switch to the Run-Length Coding pattern from normal mode.This algorithm can reach more than 2.5 times for the general pattern ratio of compression, and compression efficiency is higher and be subjected to extensive concern.But the context model in the JPEG-LS algorithm (contextmodeling) has increased the complexity of algorithm.
The present invention introduces the perceptron technology in the existing neural network, by the parameter that the self study and the adaptive ability fair copy of perceptron are invented the two-dimentional weighted prediction model that proposes, has simplified the algorithm complex of forecast model part.In the entropy coding part, consider that the method for entropy coding commonly used at present mainly contains Huffman, arithmetic coding, LZW etc.Imitate fruit of good coding though these entropy codings have, its execution speed is slower.The present invention has adopted existing RICE entropy coding algorithm.This entropy coding algorithm is carrying out in the scanning process data, just can calculate in real time and encodes according to sampled value, need not to seek help from the code table of prior storage, has improved entropy coding and has got speed.In cataloged procedure, it also has adaptation function, to adapt to the variation of code length.Its complexity is low, and coding rate is fast, and higher code efficiency is arranged.
Summary of the invention
The present invention has designed and Implemented whole coloured image lossless compression method by having proposed a kind of two-dimentional weighted prediction model (abbreviation forecast model).This method has overcome in the past in the Lossless Image Compression Algorithm algorithm that execution speed is slow, shortcoming such as algorithm complex height and compression efficiency are low.When having taken into account lower algorithm complex, reached Lossless Image Compression Algorithm effect fast and efficiently, ratio of compression is higher.Analysis according to correlativity between the color component of coloured image and between pixel at first utilizes existing harmless color notation conversion space that color space is handled, and eliminates the correlativity between color component.In the two-dimentional weighted prediction model that the present invention proposes, introduced the perceptron technology in the existing neural network.Utilize the self study and the adaptive characteristic that itself have, carry out the self-adaptation adjustment of two-dimentional weighted prediction model.Make this algorithm in operational process, have very little prediction residual.Further, the prediction residual value is shone upon, reduced the dynamic range of prediction residual value according to prediction residual mapping algorithm proposed by the invention.Guaranteed that algorithm has under the prerequisite of higher compression ratios, has higher execution efficient.After obtaining prediction residual, need carry out entropy coding, this writing coding method has adopted RICE algorithm of the prior art.This entropy coding algorithm complex is low, and coding rate is fast, and higher code efficiency is arranged.In the implementation of whole compression algorithm, guarantee not introduce quantization error, and in decode procedure, recover original data fully, thereby realize the lossless compress of image.
Technical thought of the present invention is characterized as:
1. at the correlativity between planes of color, adopt the method for existing harmless color notation conversion space, target image is carried out the correlativity that the image pre-service removes color space, thereby can effectively improve ratio of compression.
The hypothesis view data be according to from left to right, order from the top down, import three successively through the color component data behind the spatial alternation.Owing to have very strong correlativity between the same component neighbor, according to the weighted value of four neighbors in current pixel upper left side, can pass through prediction algorithm proposed by the invention, obtain the predicted value of current pixel.
3. if this predicted value and current actual value are very approaching, then the difference between them is called prediction residual.Ask for the prediction residual value,, scrambler is encoded with very short code word to it if the value of being somebody's turn to do is enough little.
4. in the actual algorithm, obtain the prediction residual value and directly do not encode, but passed through a mapping process proposed by the invention earlier.By the data map algorithm, reduced the dynamic range of prediction residual value, the distribution range of predicted residual signal that is used in coding is more concentrated, thereby can obtain littler entropy and obtain better coding effect.
5. according to the prediction residual value result after the above mapping, judge that whether prediction residual is less than the given limits of error 8, if the prediction residual value after the mapping exceeds this threshold value, just need to revise the prediction weighting coefficient, promptly realize adjusting subroutine based on the self-adaptation of perceptron, if the prediction residual after the mapping does not surpass this threshold value, then the prediction residual value after the mapping is carried out the RICE coding.
6. in prediction and cataloged procedure, the parameter that has adopted a kind of technology of perceptron to proofread and correct two-dimentional weighted prediction model adaptively.Self study and adaptive ability by perceptron monitor the prediction residual value, if its value surpasses preset threshold, then carry out the self-adaptation adjustment, make in the whole cataloged procedure, the prediction residual value remains in the very little scope, thereby reaches the purpose of compression.
Technical scheme of the present invention is referring to Fig. 3, Fig. 4.This coloured image lossless compression method based on perceptron, be to finish by Digital Video or other digitized instrument to gather pending target image, and the optical signalling of target image is converted to the digital signal image is input to operations such as computing machine is handled, transmission.Computer Processing mainly is by the prior USB interface software, on the basis of the perceptron technology in existing coloured image lossless compress and neural network image is compressed processing.Result images after the processing outputs to buffer, can directly store in this locality or carries out operations such as remote transmission by the network storage equipment.The invention is characterized in that it also comprises the steps:
1) computing machine is kept at the internal memory after USB interface is read in pending target image;
2) treat compressed image and carry out pre-service, promptly it is carried out existing harmless color notation conversion space;
3) adopt a kind of two-dimentional weighted prediction model that current pixel is predicted, ask for the prediction residual value,, it is characterized by this prediction residual value mapping:
The process flow diagram of this part processing is seen regional A among Fig. 6.
A), suppose that image adopts the pre-service of RGB color space and process color notation conversion space for whole algorithm is described.Order is imported three components behind the color notation conversion space, from left to right promptly, sequential scanning and deposit data through three color components after the conversion successively from the top down.Image length and width are respectively H and B, its pixel x
k(i j) represents.Here i=0,1 ..., B-1 represents the row at pixel place in certain planes of color, j=0, and 1 ..., H-1 represents row, k=R, G, B, the planes of color at pixel place after the expression conversion.
By current pixel x
k(i, j) four the pixel x in upper left side
k(i, j-1), x
k(i-1, j-1), x
k(i-1, j), x
k(i-1, weighted value j+1) is predicted currency, and wherein i represents row-coordinate, and j represents the row coordinate, and their distributing position is seen Fig. 5, x among the figure
1, X
2, x
3, x
4For representing x
k(i, j-1), x
k(i-1, j-1), x
k(i-1, j), x
k(X is a current pixel for i-1, j+1) four pixels.Judge whether predicted pixel is marginal point, when predicted pixel is in first row, last row or first row, then carry out special processing, promptly substitute with default value for the value that does not have pixel outside the image border; To current pixel x
k(i, predicted value j)
Formula is:
W wherein
p(p=1,2,3,4) are the prediction weighting coefficient, and setting its initial value is w
p=0.25, from
And obtain the predicted value of current pixel
B) 2., obtain prediction residual value Δ by prediction residual value formula:
If in whole cataloged procedure, can both guarantee that prediction is very accurate, just can obtain enough little prediction residual value all the time, thereby help follow-up entropy coding.The process flow diagram of this part processing procedure is seen zone C among Fig. 6.
C) after obtaining prediction residual it being carried out the prediction residual mapping method is: suppose that each include monochrome pixels is to quantize through 8bit, then the distribution range of prediction residual value should be [255 ,+255].Mapping algorithm below carrying out, the distribution range of prediction residual value is become, and [0 ,+255] prediction residual value is represented with X.The whole flow process of mapping is seen Fig. 7.
I. calculate prediction residual value X according to forecast model;
Ii. when prediction residual value X less than-128 the time, with its add 256 or when prediction residual value X greater than 127 the time, it is deducted obtains a new prediction residual value X1 after 256;
If iii. new prediction residual value X1 less than zero with it according to X2=-X1 * 2-1, otherwise the prediction residual value X2 after it is obtained shining upon according to X2=2 * X1;
Iv. the prediction residual value X2 after output is shone upon;
By the data map algorithm, reduced the dynamic range of prediction residual value, the distribution range of predicted residual signal that is used in coding is more concentrated, thereby can obtain littler entropy and obtain better coding effect;
4) according to the prediction residual result after the above mapping, judge that whether prediction residual is less than the given limits of error 8, if the prediction residual value exceeds this threshold value, just need to revise the prediction weighting coefficient, promptly realize subroutine based on the self-adaptation adjustment of perceptron, if the prediction residual after the mapping does not surpass this threshold value, then carry out step 5);
The feature of the subroutine of adjusting based on the self-adaptation of perceptron is as follows:
Forecast model iff adopting said fixing can not guarantee that predicted value is not offset in whole cataloged procedure, thereby the prediction residual that is used in coding is drifted about.In algorithm proposed by the invention, adopted the double-deck perceptron in the neural network to come real time monitoring and adjusted the drift of prediction residual value adaptively.
The amending method of the training process of perceptron and prediction weighting coefficient is as follows:
The network structure of double-deck perceptron as shown in Figure 2, it is made up of input layer and output layer.Each processing unit interconnection of each processing unit of input layer and output layer, all with weights, these weights can be adjusted by learning rules in each connects.Its learning process is the process that changes the strength of joint between the neuron.
Output valve can be represented by following formula:
Wherein, f (.) is an excitation function, w
1, w
2W
nFor from input processing unit p (p=1,2 ..., n) to the connection weights of exporting processing unit, w
0Be threshold value, x
1, x
2X
nBe the input of processing unit p, y is an output valve;
The training of perceptron adopts the set of being made up of one group of sample to carry out, and at training period, these samples is repeated to deliver to the input layer of perceptron, connects weights and makes the output of perceptron reach desirable to export by adjusting, and its training process is as follows:
A) each w is given in initialization
pInitialize is composed and is given w
p(t) with (1 ,+1) interval random value; Here w
p(t) the connection weights in p the input of the expression t moment, 1≤p≤n, w
0(t) be t threshold value constantly;
B) a sample X=(x is imported in the correction of connection weights
1, x
2X
n) and its desired output d;
I. the 3. actual output of computational grid y (t) by formula;
Ii. the error between the actual output of computational grid y (t) and the desired output d:
d(t)=d-y(t) ④
Iii. revise the connection weights wp between each input and output:
w
p(t+1)=w
p(t)+Δw
p(t) ⑤
Δw
p(t)=α×x
p×d(t) (p=1,2,3,4) ⑥
Wherein, α is gain, and common 0≤α≤1 is used to control erection rate; Δ w
p(t) connect weight w constantly for t
pModified value, x
pP pixel value for current input;
C) 2., to each sample repeating step until error less than the given limits of error;
Neural network after study finishes memorizes the form of learning sample pattern with connection weight, when neural network is imported a certain pattern, 3. neural network will calculate output valve y with formula, and therefore whole learning and memory process is exactly the error adjustment parameter w according to reality output and between wishing to export
p, relatively formula 1. with formula 3. as can be seen, excitation function: f (x)=x here, the formula x in 3.
pBe p pixel value of current input, w
pBe the prediction weighting coefficient, y is a predicted value; Perceptron real time monitoring prediction residual value if this value has exceeded pre-set threshold in cataloged procedure, then produces one and feeds back signal to perceptron, by relearning and adjust w
p, producing one group of new prediction weighting coefficient, in the real image cataloged procedure, formula is:
Δw
p=α/128×x
p×Δ (p=1,2,3,4) ⑦
Wherein, Δ w
pFor t connects weight w constantly
pModified value, α=0.001 is an empirical value, Δ is the prediction residual value of a last pixel; Like this, fallout predictor uses corrected prediction weighting coefficient, obtains predicted value more accurately;
Because perceptron has learning and memory, self-adaptation adjustment to connect the ability of weights, this model obviously may be used to the prediction weighting coefficient in the self-adaptation adjustment image compression algorithm, obtains than the higher ratio of compression of fixing prediction weighting coefficient.Adjust the prediction weighting coefficient adaptively by the difference between reality output and the hope output, just the learning process of perceptron.
Perceptron real time monitoring prediction residual value if this value has exceeded pre-set threshold in cataloged procedure, then produces one and feeds back signal to perceptron, by relearning and adjust w
p, produce one group of new prediction weighting coefficient.Adopt formula 5., 6. to revise the prediction weighting coefficient, the process flow diagram of this part processing procedure is seen area B among Fig. 6.
Can see that in Adaptive adjusting algorithm what the perceptron model adopted is a kind of pattern of limit study edge work, need not to train in advance.To image scanning once, prediction and coding are finished simultaneously.Has very high execution efficient;
5) adopt RICE entropy coding algorithm that the prediction residual after shining upon is encoded;
6) code stream of output and preservation compression of images.
When carrying out pre-service, promptly image is carried out existing harmless color notation conversion space, its principle is as follows:
For the image of many components (colour), by certain harmless color notation conversion space, can remove the correlativity between color component to a certain extent, color notation conversion space method that JPEG-LS, JPEG2000 and other colour image compression methods are all well-designed.Spatial alternation among the present invention is 1. to carry out according to formula.Wherein, A1, A2, A3 are respectively three color components before the conversion, three color component value that obtain after A1 ', A2 ', the A3 ' conversion.
The method complexity that the present invention carried is lower than the conventional compression method, and the image after the processing has higher ratio of compression, and in the higher compression effectiveness of maintenance, its compression time obviously is less than the latter, has higher execution speed.In the entropy coding part, adopted RICE entropy coding algorithm, this entropy coding algorithm is carrying out in the scanning process data, can calculate in real time and encodes according to sampled value, need not to seek help from the code table of prior storage, has improved entropy coding and has got speed.In cataloged procedure, it also has adaptation function, to adapt to the variation of different code length.Its complexity is low, and coding rate is fast, and higher code efficiency is arranged.
Description of drawings:
Fig. 1 is the correlation of color images analysis chart:
(a) standard picture; (b) autocorrelation function of same component plane interior pixel; (c) cross correlation function of different component interplanar pixels;
Fig. 2 is double-deck perceptron structural drawing;
Fig. 3 is based on the fast colourful Lossless Image Compression Algorithm system chart of perceptron;
1, digital camera, 2, USB interface, 3, computer processor, 4, output buffers, 5, the lossless compression-encoding of image, 6, the destination file of compression, 7, hard disk, 8, the network storage equipment, 9, decoding, 10, display;
Fig. 4 is a method flow diagram of the present invention;
Fig. 5 is the location drawing of four pixels and current pixel in the fallout predictor;
Fig. 6 adjusts process flow diagram to the prediction module of current pixel and self-adaptation;
Fig. 7 is the mapping block process flow diagram of prediction residual value;
Fig. 8 is decoding process figure;
Fig. 9 is the original image of embodiment, and each component of RGB;
Figure 10 is that a figure is an A1 ' component through pretreated three color components, and b figure is an A2 ' component, and c figure is an A3 ' component;
Figure 11 is the image compression algorithm subroutine flow chart;
Figure 12 is a program flow diagram of the present invention.
Embodiment
Digital Video and USB interface all are commercially available among Fig. 3, mainly finish the various images that collection need be compressed, and the optical signalling of pending image is converted to the digital signal image is input to computing machine, are convenient to operations such as Computer Processing, transmission.Computer Processing mainly is to read in the image that collects by the prior USB interface software, and the image file after the processing outputs to the buffer of computing machine, is convenient in this locality storage (depositing hard disk in); Carry out transmission, storage, the processing of data by the network storage equipment; Perhaps directly decode, wherein Xie Ma process flow diagram is seen Fig. 8, shows then.The lossless compression-encoding of image is realized by software.Below in conjunction with the whole process of instantiation detailed description compression of images, referring to Figure 12.The technical thought feature that whole process steps is seen before and stated invention, implementation process can be referring to Figure 12 and Figure 11:
At first target image is advanced to gather by digital camera, Digital Video with in garage, the sub-district management process car into and out of the time capture a two field picture respectively, pass in the hard disc of computer by USB interface then, so just finished the gatherer process of embodiment monitoring image.
After in concrete the enforcement image being transferred to computing machine, in computing machine, finish following program:
The first step: Fig. 9 is the original image of embodiment, i.e. user's image that will compress (24 looks very color, the jpg form) and each component of RGB thereof, and the image size is (142 * 107).This image be can't harm color notation conversion space, obtain removing the result images after the correlativity between color component (this part is independent of master routine).A1, A2, three component results after treatment of A3 correspond to respectively shown in a figure among Figure 10, b figure, the c figure;
Second step: the result images of opening previous step.
The 3rd step: create a compressed file, be used for depositing the data after the compression.
The 4th step: extract image information through the image of harmless color notation conversion space.
The 5th step: carries out image compression algorithm subroutine, concrete steps are seen the image compression algorithm flow chart of Figure 11:
1) reads in data line, judge whether to be frontier point,, promptly substitute with default value for the value that does not have pixel outside the image border if frontier point then carries out special processing to it; If not frontier point, then to the fallout predictor assignment, the initial value of the prediction weighting coefficient array of fallout predictor is: W[1]=0.375; W[2]=0.375; W[3]=0.125; W[4]=0.125.
2) adopt a kind of two-dimentional weighted prediction model that current pixel is predicted, ask for the prediction residual value, this prediction residual value mapping;
A) utilize and have these characteristics of very strong correlativity between the same component neighbor, according to four neighbors in current pixel upper left side (suppose view data be according to from left to right, from the top down order, import the color component data after three processes can't harm color notation conversion space successively), can pass through certain prediction algorithm, obtain the predicted value of current pixel.
B) difference of calculating predicted value and actual value is called prediction residual.When this was worth enough hour, scrambler is encoded to it with very short code word;
C) prediction residual that obtains being carried out the residual error mapping handles.By the data map algorithm, reduced the dynamic range of prediction residual value, the distribution range of predicted residual signal that is used in coding is more concentrated, thereby can obtain littler entropy and obtain better coding effect.
3) according to the prediction residual value result after the above mapping, judge that whether prediction residual is less than the given limits of error 8, if the prediction residual value after the mapping exceeds this threshold value, just need to revise the prediction weighting coefficient, promptly call based on the self-adaptation of perceptron and adjust subroutine, if the prediction residual after the mapping does not surpass this threshold value, then carry out step 4).
In this process, the existing perceptron technology of the utilization of adopting the present invention to propose is proofreaied and correct the method for two-dimentional weighted prediction model parameter adaptively.Self study and adaptive ability by perceptron monitor the prediction residual value, if its value surpasses preset threshold, then carry out the self-adaptation adjustment and shine upon, make in the whole cataloged procedure, the prediction residual value remains in the very little scope, thereby reaches the purpose of compression.The whole process flow diagram of the parameter of self-adaptation adjustment two dimension weighted prediction model is seen Fig. 6.Getting neuron number n at this is 1, and input number of nodes m is 4, and gain alpha is 0.00001.
4) prediction residual after the mapping is carried out existing RICE entropy coding.
5) judge whether end of line, preserve current line if this row has finished; Otherwise, judge whether to be frontier point once more, repeat above-mentioned steps;
6) judge whether the row tail, if, then finish this subroutine to the row tail; Otherwise repeat (1) to (7) step;
", " CompressedCounter=coding after byte number ", " See compressed data in file compress.dat "
The 7th step: close file that the user will compress and file after compression.
The 8th step: the file after obtaining compressing, be stored in the local hard disk, thereby finished the monitoring record in garage is stored.
In order to check the performance of algorithm proposed by the invention, with Huffman algorithm, lzw algorithm, FELICS algorithm traditional in the document, particularly new lossless compress standard JPEG-LS compares.The image that is used to test all is 24 coloured images (each pixel component 8bits) of rgb space.Comprise two width of cloth landscape image, a width of cloth aerial image, a width of cloth computing machine composograph.In order to make the result have more illustrative, also selected for use two width of cloth standard coloured image peppers and lena to be used for the contrast experiment.The result of Huffman algorithm, lzw algorithm and JPEG-LS algorithm obtains by the executive routine that operation is downloaded from webpage, the result of FELICS algorithm is from document Barequet R, Feder M.SICLIC:A simpleinter-color lossless image coder.In Proc.of data compression conference, Editedby J.A.Storer, Snowbird Utah, USA, March, 1999, obtain among the pp.500-510..Whole experiment be the Pentium of 300MHz II, in save as on the PC of 64M and finish with the C language.
Table 1 has provided the contrast compression result, and it is to represent with the figure place of each pixel, (=8bit/ ratio of compression).Can see that from table 1 its compression result of the method that the present invention carried obviously is better than lzw algorithm and traditional Huffman algorithm, might as well than the result of FELICS algorithm.Though the compression result of JPEG-LS is better than the result of algorithm of the present invention, the result of the two is quite approaching, and particularly for two width of cloth landscape image (level and smooth natural image), result of the present invention only differs from about 3% than JPEG-LS algorithm.
From the compression time shown in the table 2, algorithm execution speed of the present invention is obviously faster than traditional Huffman and lzw algorithm, than the also fast 13-17% of the high efficiency JPEG-LS algorithm of low-complexity.Compare from the structure of algorithm, this algorithm and JPEG-LS are suitable with coded portion in prediction, but increased context model (context modeling) in the JPEG-LS algorithm, its complexity employed perceptron forecast model in the present invention, though it has improved ratio of compression, execution speed is affected.
Table 1: the comparison of compression result
Image | Wide * height | Compression result (bits/pixel) | ||||
Huffman | LZW | FELICS | JPEG-LS | The | ||
Landscape | ||||||
1 | 2048*1536 | 2.92 | 5.01 | * | 2.13 | 2.20 |
Landscape 2 | 2056*2400 | 2.27 | 4.20 | * | 1.83 | 1.89 |
Aviation | 2200*1196 | 2.65 | 3.92 | * | 1.90 | 2.22 |
Computing machine is synthetic | 1636*1070 | 2.47 | 3.08 | * | 2.21 | 2.55 |
Peppers | 512*512 | 4.67 | 5.84 | 5.14 | 3.88 | 4.28 |
Lena | 512*512 | 5.12 | 6.78 | 4.84 | 4.52 | 4.76 |
Table 2: the comparison of compression time
Image | Wide * height | Compression time (s) | |||
Huffman | LZW | JPEG-LS | The | ||
Landscape | |||||
1 | 2048*1536 | 6.88 | 9.87 | 6.21 | 5.10 |
Landscape 2 | 2056*2400 | 9.35 | 13.32 | 8.68 | 7.27 |
Aviation | 2200*1196 | 6.83 | 7.90 | 6.62 | 5.55 |
Computing machine is synthetic | 1636*1070 | 5.24 | 8.68 | 4.46 | 3.89 |
Peppers | 512*512 | 2.18 | 3.12 | 0.60 | 0.51 |
Lena | 512*512 | 2.87 | 3.89 | 1.05 | 0.90 |
Claims (2)
1, a kind of coloured image lossless compression method based on perceptron, be to finish by Digital Video or other digitizers to gather pending target image, and the optical signalling of target image is converted to the digital signal image, computing machine reads in image by prior USB, interface such as infrared, in computer processor, image is handled, result images after the processing outputs to buffer, can directly store or carry out remote transmission, it is characterized in that it also comprises the steps: by the network storage equipment in this locality
1) computing machine is kept at the internal memory after USB interface is read in pending target image;
2) treat compressed image and carry out pre-service, promptly it is carried out existing harmless color notation conversion space;
3) adopt a kind of two-dimentional weighted prediction model that current pixel is predicted, ask for the prediction residual value,, it is characterized by this prediction residual value mapping:
A) order is imported three components behind the color notation conversion space, and from left to right promptly, sequential scanning and deposit data through three color components after the conversion successively from the top down, image length and width are respectively H and B, its pixel x
k(i j) represents;
By current pixel x
k(i, j) four the pixel x in upper left side
k(i, j-1), x
k(i-1, j-1), x
k(i-1, j), x
k(i-1, prediction weighting coefficient j+1) is predicted currency, and wherein i represents row-coordinate, and j represents the row coordinate;
Judge whether predicted pixel is marginal point, when predicted pixel is in first row, last row or first row, then carry out special processing, promptly substitute with default value for the value that does not have pixel outside the image border; To current pixel x
k(i, predicted value j)
Computing formula be:
W wherein
p(p=1,2,3,4) are the prediction weighting coefficient, and setting its initial value is w
p=0.25, thus the predicted value of current pixel obtained
B) 2., obtain prediction residual value Δ by prediction residual value formula:
C) after obtaining prediction residual be: suppose that each include monochrome pixels is to quantize through 8bit to its method of carrying out the prediction residual mapping, then the distribution range of prediction residual value should be [255, + 255], mapping algorithm below carrying out, make its distribution range become [0, + 255] the prediction residual value is represented with X
I. calculate prediction residual value X according to forecast model;
Ii. when prediction residual value X less than-128 the time, with its add 256 or when prediction residual value X greater than 127 the time, it is deducted obtains a new prediction residual value X1 after 256;
If iii. new prediction residual value X1 less than zero with it according to X2=-X1 * 2-1, otherwise the prediction residual value X2 after it is obtained shining upon according to X2=2 * X1;
Iv. the prediction residual value X2 after output is shone upon;
4) according to the prediction residual value result after the above mapping, judge that whether prediction residual is less than the given limits of error 8, if the prediction residual value after the mapping exceeds this threshold value, just need to revise the prediction weighting coefficient, promptly realize adjusting subroutine based on the self-adaptation of perceptron, if the prediction residual after the mapping does not surpass this threshold value, then carry out step 5);
The feature of adjusting subroutine based on the self-adaptation of perceptron is as follows:
Use double-deck perceptron in the neural network of the prior art to come real time monitoring and adjust the drift of prediction residual adaptively, output valve can be represented by following formula:
Wherein, f (.) is an excitation function, w
1, w
2... w
nFor from input processing unit p (p=1,2 ..., n) to output processing unit the connection weights, w
0Be threshold value, x
1, x
2... x
nBe the input of processing unit p, y is an output valve;
The training of perceptron adopts the set of being made up of one group of sample to carry out, and at training period, these samples is repeated to deliver to the input layer of perceptron, connects weights and makes the output of perceptron reach desirable to export by adjusting, and its training process is as follows:
A) each wp initialize is given in initialization, composes and gives wp (t) with (1 ,+1) interval random value; Here wp (t) expression t is p the connection weights of importing constantly, and 1≤p≤n, w0 (t) are t threshold value constantly;
B) a sample X=(x is imported in the correction of connection weights
1, x
2... x
n) and its desired output d;
I. the 3. actual output of computational grid y (t) by formula;
Ii. the error between the actual output of computational grid y (t) and the desired output d:
d(t)=d-y(t) ④
Iii. revise the connection weights wp between each input and output:
w
p(t+1)=w
p(t)+Δw
p(t) ⑤
Δw
p(t)=α×x
p×d(t) (p=1,2,3,4) ⑥
Wherein, α is gain, and common 0≤α≤1 is used to control erection rate; Δ w
p(t) connect weight w constantly for t
pModified value, x
pP pixel value for current input;
C) 2., to each sample repeating step until error less than the given limits of error;
Neural network after study finishes memorizes the form of learning sample pattern with connection weight, when neural network is imported a certain pattern, 3. neural network will calculate output valve y with formula, and therefore whole learning and memory process is exactly the error adjustment parameter w according to reality output and between wishing to export
p, relatively formula 1. with formula 3. as can be seen, excitation function: f (x)=x here, the formula x in 3.
pBe p pixel value of current input, w
pBe the prediction weighting coefficient, y is a predicted value; Perceptron real time monitoring prediction residual value if this value has exceeded pre-set threshold in cataloged procedure, then produces one and feeds back signal to perceptron, by relearning and adjust w
p, producing one group of new prediction weighting coefficient, in the real image cataloged procedure, formula is:
Δw
p=α/128×x
p×Δ (p=1,2,3,4) ⑦
Wherein, Δ w
pFor t connects weight w constantly
pModified value, α=0.001 is an empirical value, Δ is the prediction residual value of a last pixel; Like this, fallout predictor uses corrected prediction weighting coefficient, obtains predicted value more accurately;
5) adopt RICE entropy coding algorithm that the prediction residual after shining upon is encoded;
6) code stream of output and preservation compression of images.
2, the coloured image lossless compression method based on perceptron according to claim 1 is characterized in that treating the harmless color notation conversion space formula that compressed image carries out being adopted in the pre-service and is:
Wherein, A1, A2, A3 are respectively three color components before the conversion, three color component value that obtain after A1 ', A2 ', the A3 ' conversion.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB021467684A CN1190755C (en) | 2002-11-08 | 2002-11-08 | Colour-picture damage-free compression method based on perceptron |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB021467684A CN1190755C (en) | 2002-11-08 | 2002-11-08 | Colour-picture damage-free compression method based on perceptron |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1405735A CN1405735A (en) | 2003-03-26 |
CN1190755C true CN1190755C (en) | 2005-02-23 |
Family
ID=4751160
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB021467684A Expired - Fee Related CN1190755C (en) | 2002-11-08 | 2002-11-08 | Colour-picture damage-free compression method based on perceptron |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN1190755C (en) |
Families Citing this family (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003319391A (en) * | 2002-04-26 | 2003-11-07 | Sony Corp | Encoding apparatus and method, decoding apparatus and method, recording medium, and program |
US8731054B2 (en) * | 2004-05-04 | 2014-05-20 | Qualcomm Incorporated | Method and apparatus for weighted prediction in predictive frames |
WO2006010644A1 (en) * | 2004-07-29 | 2006-02-02 | Oce-Technologies B.V. | Lossless compression of color image data using entropy encoding |
US7499060B2 (en) * | 2005-03-21 | 2009-03-03 | Microsoft Corporation | Robust interactive color editing |
CN100421465C (en) * | 2005-05-10 | 2008-09-24 | 扬智科技股份有限公司 | Method of compression and recompression image data for image acquiring apparatus |
EP1924970B1 (en) * | 2005-08-19 | 2009-03-11 | TELEFONAKTIEBOLAGET LM ERICSSON (publ) | Texture compression based on two hues with modified brightness |
US8243340B2 (en) | 2006-02-23 | 2012-08-14 | Microsoft Corporation | Pre-processing of image data for enhanced compression |
WO2007132538A1 (en) * | 2006-05-17 | 2007-11-22 | Fujitsu Limited | Image data compression device, compression method, program, and image data decompression device, decompression method, and program |
CN100566417C (en) * | 2006-07-10 | 2009-12-02 | 逐点半导体(上海)有限公司 | Method for compressing image |
CN101276471B (en) * | 2008-05-12 | 2010-06-02 | 北京中星微电子有限公司 | Method and device for compression of ADPCM image |
JP4698743B2 (en) * | 2009-01-22 | 2011-06-08 | シャープ株式会社 | Image compression method, image compression apparatus, image forming apparatus, computer program, and recording medium |
US9225988B2 (en) | 2013-05-30 | 2015-12-29 | Apple Inc. | Adaptive color space transform coding |
US9225991B2 (en) * | 2013-05-30 | 2015-12-29 | Apple Inc. | Adaptive color space transform coding |
CN105141960B (en) * | 2015-06-17 | 2018-03-09 | 西安空间无线电技术研究所 | A kind of method that information transfer is carried out based on JPEG2000 compressed bit streams |
CN106254879B (en) * | 2016-08-31 | 2019-11-08 | 广东精点数据科技股份有限公司 | A kind of application encodes the Image Lossy Compression method of neural network certainly |
CN108347709B (en) * | 2017-01-21 | 2020-07-24 | 中山大学 | Self-adaptive data transmission method and system of ultra-low power consumption traceability system |
CN107979378B (en) * | 2017-12-14 | 2022-09-02 | 深圳Tcl新技术有限公司 | Inertial data compression method, server and computer readable storage medium |
EP3562162A1 (en) * | 2018-04-27 | 2019-10-30 | InterDigital VC Holdings, Inc. | Method and apparatus for video encoding and decoding based on neural network implementation of cabac |
CN112565793B (en) * | 2020-11-26 | 2022-11-01 | 华侨大学 | Image lossless compression method based on prediction difference value classification entropy coding |
-
2002
- 2002-11-08 CN CNB021467684A patent/CN1190755C/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN1405735A (en) | 2003-03-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1190755C (en) | Colour-picture damage-free compression method based on perceptron | |
CN1303820C (en) | Quality based image compression | |
CN1215439C (en) | Apparatus and method for performing scalable hierarchical motion estimation | |
CN100348049C (en) | System and method for progressively changing and coding digital data | |
CN1145363C (en) | Static picture and cartoon cooding quantization matrix | |
CN101061515A (en) | Coding scheme for a data stream representing a temporally varying graphics model | |
CN1155221C (en) | Method and system for encoding and decoding method and system | |
JP4768728B2 (en) | Method and apparatus for encoding a block of values | |
CN1951120A (en) | Video coding system providing separate coding chains for dynamically selected small-size or full-size playback | |
CN1632479A (en) | Lossless compression method for high spectrum image based on three-dimensional prediction | |
Matsuda et al. | Lossless coding of still images using minimum-rate predictors | |
CN1777038A (en) | Two-dimensional vector data compression method | |
CN1802667A (en) | Overcomplete basis transform-based motion residual frame coding method and apparatus for video compression | |
CN112565777A (en) | Deep learning model-based video data transmission method, system, medium and device | |
CN1186943C (en) | Apparatus and method of coding/decoding and storage medium storing coded signal | |
CN1822666A (en) | Image processing in portable video communication devices | |
CN103222269B (en) | Binarisation of last position for higher throughput | |
CN1163054C (en) | Image processor | |
CN1473434A (en) | Image encoding apparatus and image encoding method | |
CN1867967A (en) | Rate-distortion control scheme in audio encoding | |
CN1195449A (en) | Image encoder, image decoder and image transmitting system | |
JPH099265A (en) | Device and method for encoding image | |
CN1538248A (en) | Image coding/ decoding device of laser printing system and method | |
JPH11331852A (en) | Reversible coding method and reversible coder | |
CN1878313A (en) | Image compression chip based on image block dynamic division vector quantization algorithm |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
C17 | Cessation of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20050223 Termination date: 20091208 |