CN1405735A - Colour-picture damage-free compression method based on perceptron - Google Patents
Colour-picture damage-free compression method based on perceptron Download PDFInfo
- Publication number
- CN1405735A CN1405735A CN 02146768 CN02146768A CN1405735A CN 1405735 A CN1405735 A CN 1405735A CN 02146768 CN02146768 CN 02146768 CN 02146768 A CN02146768 A CN 02146768A CN 1405735 A CN1405735 A CN 1405735A
- Authority
- CN
- China
- Prior art keywords
- value
- prediction residual
- image
- perceptron
- prediction
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 67
- 238000007906 compression Methods 0.000 title claims abstract description 57
- 230000006835 compression Effects 0.000 title claims abstract description 57
- 238000012545 processing Methods 0.000 claims abstract description 25
- 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 23
- 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
- 230000008676 import 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
- 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
- 230000000694 effects 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
- 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 invention relates to the image processing area including following steps. (1) With being read from the USB port by the computer, the target images to be processed are stored in the memory. (2) The images to be compressed are carried out the lossless color sphace transformation. (3) The current pixels are predicted by using the two dimensions weighted predication model. The predicted residual is calculated. (4) Whether the mapped predicted residual is less than the preset error limit or not is determined. The self-adopting adjustment is needed if the residual exceeds the threshold. (5) The RICE entroy coding is accepted. (6) The compressed result of the image is output and saved. The invented method possesses the advantages of lower complexity, higher compression ratio and high executing speed.
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.
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.
7. the prediction residual value after the mapping is carried out the RICE coding.
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 comprises the steps: that also (1) computing machine is kept at the internal memory after interfaces such as USB 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.1. for whole algorithm is described, suppose that image adopts the pre-service of RGB color space and process color notation conversion space.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.Pixel x in the image (length and width are respectively H and B)
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, j+1) weighted value of (i represents row-coordinate, and j represents the row coordinate) is predicted currency, 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, thus the predicted value of current pixel obtained
2. 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.3. 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 becomes the distribution range of prediction residual value [0 ,+255] (the prediction residual value is represented with X) here.The whole flow process of mapping is seen Fig. 7.
A) calculate prediction residual value X according to forecast model;
B) when prediction residual value X less than-128 the time, with its add 256 or when prediction residual value X greater than
127 o'clock, it is deducted obtain a new prediction residual value X1 after 256;
C) if new prediction residual value X1 less than zero with it according to X2=-X1 * 2-1, otherwise it is pressed
Prediction residual value X2 after obtaining shining upon according to X2=2 * X1;
D) the prediction residual value X2 after the output mapping;
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), whether judge prediction residual less than the given limits of error 8, if less than this threshold value then directly carry out entropy coding according to the prediction residual result after the above mapping; If the prediction residual value exceeds this threshold value, just need to revise the prediction weighting coefficient, promptly realize the subroutine of adjusting based on the self-adaptation of perceptron; (5) feature when the subroutine of carrying out 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
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, at training period, these samples are repeated to deliver to the input layer of perceptron, connect weights and make the output of perceptron reach desirable output by adjusting, its training process is as follows: 1. initialization, give each w
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; 2. connect the correction of weights, import a sample X=(x
1, x
2... x
n) and its desired output d; (a) the 3. actual output of computational grid y (t) by formula; (b) error between computational grid actual output y (t) and the desired output d:
D (t)=d-y (t) 4. (c) revises connection weight w between each input and output
p:
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; 3. 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; (6) adopt existing RICE entropy coding algorithm that the prediction residual after shining upon is encoded; (7) 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 is shone upon:
1. 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.
2. the 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;
3. the 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.(4) carry out adjusting subroutine based on the self-adaptation of perceptron.(5) prediction residual after the mapping is carried out existing RICE entropy coding.
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.
(6) 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;
(7) 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 (each pixel component 8bits) coloured images 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 (=8bit/ the ratio of compression) represented with the figure place of each pixel.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
Table 2: the comparison of compression time
Image | Wide * height | Compression result (bits/pixel) | ||||
Huffman | LZW | FELICS | JPEG-LS | The present invention | ||
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 |
Image | Wide * height | Compression time (s) | |||
Huffman | ?LZW | ?JPEG-LS | The present invention | ||
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 passes through prior USB, the infrared interface that waits reads in image, in computer processor, image is handled, result images after the processing outputs to buffer, can directly store or carry out remote transmission, the invention is characterized in that it comprises the steps: that also (1) computing machine is kept at the internal memory after interfaces such as USB read in pending target image by the network storage equipment in this locality; (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, to this prediction residual value mapping, it is characterized by: 1. order is imported three components behind the color notation conversion space, sequential scanning and deposit data, the pixel x in the image (length and width are respectively H and B) successively from the top down from left to right promptly, through three color components after the conversion
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, j+1) the prediction weighting coefficient of (i represents row-coordinate, and j represents the row coordinate) is predicted currency;
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
2. 2., obtain prediction residual value Δ by prediction residual value formula:
3. 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), a) calculate prediction residual value X here according to forecast model; B) 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; C) if 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; D) the prediction residual value X2 after the output mapping; (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; (5) when the feature of carrying out adjusting subroutine based on the self-adaptation of perceptron 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, at training period, these samples are repeated to deliver to the input layer of perceptron, connect weights and make the output of perceptron reach desirable output by adjusting, its training process is as follows: 1. initialization, give each w
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; 2. connect the correction of weights, import a sample X=(x
1, x
2... x
n) and its desired output d; (a) the 3. actual output of computational grid y (t) by formula; (b) error between computational grid actual output y (t) and the desired output d:
D (t)=d-y (t) 4. (c) revises connection weight w between each input and output
p:
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; 3. 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; (6) adopt existing RICE entropy coding algorithm that the prediction residual after shining upon is encoded; (7) 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 true CN1405735A (en) | 2003-03-26 |
CN1190755C 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) |
Cited By (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100421465C (en) * | 2005-05-10 | 2008-09-24 | 扬智科技股份有限公司 | Method of compression and recompression image data for image acquiring apparatus |
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 |
CN101800897A (en) * | 2002-04-26 | 2010-08-11 | 索尼株式会社 | Coding device and method |
CN1993976B (en) * | 2004-07-29 | 2010-09-29 | 奥西-技术有限公司 | Lossless compression of color image data using entropy encoding |
CN1838175B (en) * | 2005-03-21 | 2010-12-01 | 微软公司 | Robust interactive color editing |
CN101438597B (en) * | 2006-05-17 | 2011-05-11 | 富士通株式会社 | Image data compression device, compression method, and image data decompression device, decompression method |
CN101258526B (en) * | 2005-08-19 | 2011-05-11 | 艾利森电话股份有限公司 | Texture compression based on two hues with modified brightness |
CN1981535B (en) * | 2004-05-04 | 2012-05-30 | 高通股份有限公司 | Method and apparatus for weighted prediction in predictive frames |
CN101790023B (en) * | 2009-01-22 | 2012-08-08 | 夏普株式会社 | Image compressing method, image compressing apparatus and image forming apparatus |
US8243340B2 (en) | 2006-02-23 | 2012-08-14 | Microsoft Corporation | Pre-processing of image data for enhanced compression |
CN105141960A (en) * | 2015-06-17 | 2015-12-09 | 西安空间无线电技术研究所 | Method for information transmission based on JPEG2000 compressed code stream |
CN106254879A (en) * | 2016-08-31 | 2016-12-21 | 广州精点计算机科技有限公司 | A kind of Image Lossy Compression method applying own coding neutral net |
CN107979378A (en) * | 2017-12-14 | 2018-05-01 | 深圳Tcl新技术有限公司 | Inertial data compression method, server and computer-readable recording medium |
CN108347709A (en) * | 2017-01-21 | 2018-07-31 | 中山大学 | A kind of system adaptive recognition method and system of super low-power consumption traceability system |
CN110460849A (en) * | 2013-05-30 | 2019-11-15 | 苹果公司 | For the method for decoding video data, medium and system |
CN112565793A (en) * | 2020-11-26 | 2021-03-26 | 华侨大学 | Image lossless compression method based on prediction difference value classification entropy coding |
US11184613B2 (en) | 2013-05-30 | 2021-11-23 | Apple Inc. | Adaptive color space transform coding |
US11323716B2 (en) * | 2018-04-27 | 2022-05-03 | Interdigital Vc Holdings, Inc. | Method and apparatus for video encoding and decoding based on neural network implementation of CABAC |
-
2002
- 2002-11-08 CN CNB021467684A patent/CN1190755C/en not_active Expired - Fee Related
Cited By (33)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101800897A (en) * | 2002-04-26 | 2010-08-11 | 索尼株式会社 | Coding device and method |
CN1981535B (en) * | 2004-05-04 | 2012-05-30 | 高通股份有限公司 | Method and apparatus for weighted prediction in predictive frames |
CN1993976B (en) * | 2004-07-29 | 2010-09-29 | 奥西-技术有限公司 | Lossless compression of color image data using entropy encoding |
CN1838175B (en) * | 2005-03-21 | 2010-12-01 | 微软公司 | Robust interactive color editing |
CN100421465C (en) * | 2005-05-10 | 2008-09-24 | 扬智科技股份有限公司 | Method of compression and recompression image data for image acquiring apparatus |
CN101258526B (en) * | 2005-08-19 | 2011-05-11 | 艾利森电话股份有限公司 | 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 |
US8837006B2 (en) | 2006-02-23 | 2014-09-16 | Microsoft Corporation | Pre-processing of image data for enhanced compression |
CN101416220B (en) * | 2006-02-23 | 2016-01-06 | 微软技术许可有限责任公司 | For strengthening the pre-processing image data of compression |
CN101438597B (en) * | 2006-05-17 | 2011-05-11 | 富士通株式会社 | Image data compression device, compression method, and image data decompression device, decompression method |
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 |
CN101790023B (en) * | 2009-01-22 | 2012-08-08 | 夏普株式会社 | Image compressing method, image compressing apparatus and image forming apparatus |
US11184613B2 (en) | 2013-05-30 | 2021-11-23 | Apple Inc. | Adaptive color space transform coding |
CN110460850B (en) * | 2013-05-30 | 2022-03-01 | 苹果公司 | Method for video coding |
US11758135B2 (en) | 2013-05-30 | 2023-09-12 | Apple Inc. | Adaptive color space transform coding |
US11368688B2 (en) | 2013-05-30 | 2022-06-21 | Apple Inc. | Adaptive color space transform coding |
US11368689B2 (en) | 2013-05-30 | 2022-06-21 | Apple Inc. | Adaptive color space transform coding |
CN110460849A (en) * | 2013-05-30 | 2019-11-15 | 苹果公司 | For the method for decoding video data, medium and system |
CN110460847A (en) * | 2013-05-30 | 2019-11-15 | 苹果公司 | For the method for decoding video data, medium and system |
CN110460850A (en) * | 2013-05-30 | 2019-11-15 | 苹果公司 | For the method for decoding video data, medium and system |
CN110460849B (en) * | 2013-05-30 | 2022-03-01 | 苹果公司 | System for video encoding |
CN110460847B (en) * | 2013-05-30 | 2022-03-01 | 苹果公司 | Apparatus for encoding and computer readable medium |
CN105141960B (en) * | 2015-06-17 | 2018-03-09 | 西安空间无线电技术研究所 | A kind of method that information transfer is carried out based on JPEG2000 compressed bit streams |
CN105141960A (en) * | 2015-06-17 | 2015-12-09 | 西安空间无线电技术研究所 | Method for information transmission based on JPEG2000 compressed code stream |
CN106254879B (en) * | 2016-08-31 | 2019-11-08 | 广东精点数据科技股份有限公司 | A kind of application encodes the Image Lossy Compression method of neural network certainly |
CN106254879A (en) * | 2016-08-31 | 2016-12-21 | 广州精点计算机科技有限公司 | A kind of Image Lossy Compression method applying own coding neutral net |
CN108347709B (en) * | 2017-01-21 | 2020-07-24 | 中山大学 | Self-adaptive data transmission method and system of ultra-low power consumption traceability system |
CN108347709A (en) * | 2017-01-21 | 2018-07-31 | 中山大学 | A kind of system adaptive recognition method and system of super low-power consumption traceability system |
CN107979378A (en) * | 2017-12-14 | 2018-05-01 | 深圳Tcl新技术有限公司 | Inertial data compression method, server and computer-readable recording medium |
US11323716B2 (en) * | 2018-04-27 | 2022-05-03 | Interdigital Vc Holdings, Inc. | Method and apparatus for video encoding and decoding based on neural network implementation of CABAC |
CN112565793A (en) * | 2020-11-26 | 2021-03-26 | 华侨大学 | Image lossless compression method based on prediction difference value classification entropy coding |
CN112565793B (en) * | 2020-11-26 | 2022-11-01 | 华侨大学 | Image lossless compression method based on prediction difference value classification entropy coding |
Also Published As
Publication number | Publication date |
---|---|
CN1190755C (en) | 2005-02-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN1190755C (en) | Colour-picture damage-free compression method based on perceptron | |
CN101420614B (en) | Image compression method and device integrating hybrid coding and wordbook coding | |
CN1303820C (en) | Quality based image compression | |
CN113163203B (en) | Deep learning feature compression and decompression method, system and terminal | |
CN1155221C (en) | Method and system for encoding and decoding method and system | |
CN1951120A (en) | Video coding system providing separate coding chains for dynamically selected small-size or full-size playback | |
CN1447285A (en) | System and method for progressively changing and coding digital data | |
CN112734867A (en) | Multispectral image compression method and system based on space spectrum feature separation and extraction | |
CN111641826B (en) | Method, device and system for encoding and decoding data | |
JPH08275165A (en) | Method and apparatus for coding video signal | |
KR20040067119A (en) | Apparatus and method for selecting the length of variable length coding bit stream using neural network | |
Matsuda et al. | Lossless coding of still images using minimum-rate predictors | |
CN112565777A (en) | Deep learning model-based video data transmission method, system, medium and device | |
CN1628466A (en) | Context-sensitive encoding and decoding of a video data stream | |
KR102245682B1 (en) | Apparatus for compressing image, learning apparatus and method thereof | |
Ranjbar Alvar et al. | Joint image compression and denoising via latent-space scalability | |
CN116029345A (en) | Intermediate layer characteristic compression transmission method, compressed data decoding method and device | |
JPH099265A (en) | Device and method for encoding image | |
CN118318441A (en) | Feature map encoding and decoding method and device | |
JPH09200762A (en) | Method and device for encoding video signal | |
Cai et al. | Lossless image compression with tree coding of magnitude levels | |
Oliver et al. | A new fast lower-tree wavelet image encoder | |
Wu | Low complexity high-order context modeling of embedded wavelet bit streams | |
Jin et al. | Multiscale progressive image compression network guided by learnable just noticeable distortion | |
CN115880379A (en) | Semantic scalable image coding method, system, device and storage medium |
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 |