Modelling of algorithm of compression of the image real time
On initial data the size of a shot is defined and deposits neobhoyodimaja memory for buffers of data. Modelling of process of compression passes
In 4 stages - formation of a file of codes of pixels of the initial image, compression by a method of "truncation" of a code, compression by method Haffmana, filling up reyozultirujushchego a data array.
Drawing 3.1 - the Execution algorithm of procedure of compression in programm
Models
During modelling coding of an initial shot occurs for three iterations:
1) By means of consecutive cyclic search osuyoshchestvljaetsja popikselnoe reading of an initial shot in the buffer, i.e. is created «a colour matrix» the images, presented in the form of the two-dimensional file which size matches to a shot size on length and width pixels.
2) By means of consecutive cyclic search each value of a code of pixel from «a colour matrix» passes machining on algoyoritmu, represented on drawing 1, and 12 bit value of the "truncated" code is located in the temporary buffer, which actual size in 2 times less initial «a colour matrix».
3) On the given step by means of consecutive cyclic peyorebora each value of a code of pixel from the time buffer passes obrayobotku on the algorithm represented in drawing 2, that is is coded on meyotodu Haffmana. The sequence of bats gained on this iteration, javljayoetsja also is located with result of a full cycle of coding of a shot in the buffer reyozultata compression.
Flowgraph of algorithm of procedure of compression it is resulted in drawing 3.2.
Drawing 3.2 - the Flowgraph of algorithm of modelling of procedure of compression
For an estimation of efficiency of programm implementation of the offered method during modelling knaped time expenses, neobhodiyomye for compression of shots with the different permission are gained. The obtained data predstavyoleny in table 3.1.
Table 3.1. Time responses of restoration of a shot the cascade of devices
The shot permission | 480р (854х480) | 720р (1280х720) | 1080р (1920х1080) |
Compression time, with. | |||
Programm model | 0,312 | 0,688 | 1,578 |
By results of performance of programm modelling minimalyonoe processing time of one shot with the permission 854х480 pixels (480р) has made the standard 312мс, that almost in 8 times more a necessary time szhayotija at frequency of 25 shots in a second. Dependence of a time of compression on a shot size is represented in drawing 3.3. Results of modelling are presented in drawing 3.4. Program listings are resulted in the Application 1.
Drawing 3.3 - Dependence of a time of compression on a shot size
Drawing 3.4 - Results of the first stage of modelling
3.2
More on topic Modelling of algorithm of compression of the image real time:
- the Generalized algorithm of compression of the image of RGB-model real time
- the Functional organisation of the device of compression of the image in reyozhime a real time
- the Structural organisation of the device of compression of the image real time
- Principles of a hardware representation of procedure of compression of the image real time
- the Generalized algorithm of restoration of the image of RGB-model real time
- the Method of compression and restoration of images of RGB-model real time
- the Functional organisation of the device of restoration of the image real time
- the Structural organisation of the device of restoration of the image real time
- Mathematical model of compression and restoration of images of RGB-model real time
- Algorithms of functioning of mainframes of the device of compression of the image
- the Estimation of apparatus complexity of the device of compression of the image