CN106331716B - Video-frequency compression method and device - Google Patents
Video-frequency compression method and device Download PDFInfo
- Publication number
- CN106331716B CN106331716B CN201610796104.7A CN201610796104A CN106331716B CN 106331716 B CN106331716 B CN 106331716B CN 201610796104 A CN201610796104 A CN 201610796104A CN 106331716 B CN106331716 B CN 106331716B
- Authority
- CN
- China
- Prior art keywords
- color
- value
- index
- frame
- index table
- 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.)
- Active
Links
- 230000006835 compression Effects 0.000 title claims abstract description 59
- 238000007906 compression Methods 0.000 title claims abstract description 59
- 238000000034 method Methods 0.000 title claims abstract description 34
- 230000005540 biological transmission Effects 0.000 abstract description 9
- 230000006870 function Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000008520 organization Effects 0.000 description 3
- VYPSYNLAJGMNEJ-UHFFFAOYSA-N Silicium dioxide Chemical compound O=[Si]=O VYPSYNLAJGMNEJ-UHFFFAOYSA-N 0.000 description 2
- 230000008901 benefit Effects 0.000 description 2
- 238000004040 coloring Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000008878 coupling Effects 0.000 description 2
- 238000007429 general method Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 230000006837 decompression Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/186—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/42—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
Abstract
This application discloses a kind of video-frequency compression method and devices.Wherein, this method comprises: obtaining the frame in video;The color histogram of getting frame, and the quantity of the color of statistical color histogram;According to the color index table of the quantity getting frame of color, wherein color index table includes color value and corresponding index value;Color index figure is obtained according to the color index table of frame, wherein color index figure includes the corresponding index value of color value of each location of pixels of frame;Compressed encoding is carried out to color index table and color index figure, obtains the compressed bit stream of video.By the way that present application addresses the video compression algorithms used in the prior art to be unable to satisfy transmission bandwidth demand.
Description
Technical field
This application involves field of image processings, in particular to a kind of video-frequency compression method and device.
Background technique
It is a kind of complicated video sequence based on the video image that screen is shown, traditional video image is not with the prior art
Be its each frame image be all combination picture, the video image that screen is shown is mainly used in different computer screens
Between share picture.
For the convenience used, usually need to carry out data transmission using wireless network between these shared devices, due to
The bandwidth of wireless network is lower, it is desirable to which realization transmits screen video between different shared devices, it is necessary to big times is carried out to it
The Real-Time Sharing between equipment just can be achieved in several compressions.
Analysis is it is found that each frame for the video image that screen is shown is a hybrid computer image, using common
Compression for Natural Images is unable to satisfy the demand of transmission bandwidth, and can not be to greatest extent using general color index template
Ground utilizes the characteristic of screen video image, and preferable compression performance is not achieved, also cannot achieve screen to the lesser environment of bandwidth
Real-Time Sharing.
It follows that the compression of big multiple can seriously affect the subjective display quality of video, i.e., big compression multiple and subjectivity
Restoring preferable compress technique is the key that screen video image compression.
Aiming at the problem that video compression algorithm used in the prior art is unable to satisfy transmission bandwidth demand, not yet mention at present
Effective solution scheme out.
Summary of the invention
The embodiment of the present application provides a kind of video-frequency compression method and device, at least to solve the view used in the prior art
Frequency compression algorithm is unable to satisfy the problem of transmission bandwidth demand.
According to the one aspect of the embodiment of the present application, a kind of video-frequency compression method is provided, this method comprises: obtaining video
In a frame;The color histogram of getting frame, and the quantity of the color of statistical color histogram;According to the quantity getting frame of color
Color index table, wherein color index table includes color value and corresponding index value;Face is obtained according to the color index table of frame
Color index map, wherein color index figure includes the corresponding index value of color value of each location of pixels of frame;To color index table
Compressed encoding is carried out with color index figure, obtains the compressed bit stream of video.
Further, compressed encoding is carried out to color index table and color index figure, obtains the compressed bit stream of video, wrapped
It includes: when the color value of current location compresses in color index table, using the corresponding rope of the color value of previous position
Draw value as predicted value, the difference that index value corresponding with the color value of current location subtracts each other carries out lossless compression;To color rope
Draw figure and compressed encoding is directly carried out using image compression algorithm.
Further, the quantity of the color of statistical color histogram, comprising: occur color histogram according to each color
Probability arranged from big to small;Statistical probability is in the number N of the color within the scope of predetermined probability.
Further, according to the color index table of the quantity getting frame of color, comprising: read the color value of N number of color;It will
The color value of each color is compared with the color value in the color index table of standard respectively;The color index table of acquisition standard
In the smallest color value of difference with the color value of corresponding color, obtain the color value of each color;According to each color value and
Corresponding index value obtains the color index table of frame.
Further, color index figure is obtained according to the color index table of frame, comprising: the color index table of getting frame, with
And the color value of each location of pixels of frame;The color value of each location of pixels and the color value in color index table are compared
It is right;The smallest color value of difference in color index table with the color value of respective pixel position is obtained, each location of pixels is obtained
Color value;The color index figure of frame is obtained according to the corresponding index value of the color value of each location of pixels.
According to the another aspect of the embodiment of the present application, a kind of video compress device is additionally provided, which includes: acquisition mould
Block, for obtaining the color histogram of a frame and frame in video, and the quantity of the color of statistical color histogram;Index
Table obtains module, for the color index table and color index figure according to the quantity getting frame of color, wherein color index table packet
Include color value and corresponding index value;Index map obtains module, for obtaining color index figure according to the color index table of frame,
In, color index figure includes the corresponding index value of color value of each location of pixels of frame;Compression module, for color index
Table and color index figure carry out compressed encoding, obtain the compressed bit stream of video.
Further, above-mentioned compression module may include: the first sub- compression module, for current in color index table
When the color value of position is compressed, using the corresponding index value of the color value of previous position as predicted value, with present bit
The difference that the corresponding index value of the color value set subtracts each other carries out lossless compression;Second sub- compression module, for color index figure
Compressed encoding is directly carried out using image compression algorithm.
Further, above-mentioned acquisition module may include: sub- sorting module, be used for color histogram according to each color
Probability of occurrence is arranged from big to small;Sub- statistical module is in the color component within the scope of predetermined probability for statistical probability
Number N.
Further, it may include: sub- read module that above-mentioned index map, which obtains module, for reading the color of N number of color
Value;First sub- comparison module, for carrying out the color value of each color with the color value in the color index table of standard respectively
It compares;First sub-acquisition module, it is the smallest with the difference of the color value of corresponding color in the color index table for obtaining standard
Color value obtains the corresponding color value of each color;First subprocessing module, for according to each color value and corresponding index
Value, obtains the color index table of frame.
Further, it may include: the second sub-acquisition module that above-mentioned index map, which obtains module, the color rope for getting frame
Draw the color value of each location of pixels of table and frame;Second sub- comparison module, for by the color value of each location of pixels with
Color value in color index table is compared;Third sub-acquisition module, for obtain in color index table with respective pixel position
The smallest color value of the difference for the color value set, obtains the color value of each location of pixels;Second subprocessing module is used for basis
The corresponding index value of the color value of each location of pixels obtains the color index figure of frame.
In the embodiment of the present application, the frame image in video image is first obtained, and obtains the color histogram of the frame, so
The quantity for counting the color component of the color histogram of present frame afterwards, finally generates present frame according to the characteristic of color histogram
Color index table, and the color index figure of present frame is obtained by color index table, herein it should be noted that since the present invention adopts
With the screen video compress technique based on color index, the embodiment of the present application solves the view used in the prior art as a result,
Frequency compression algorithm is unable to satisfy the technical issues of transmission bandwidth demand.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present application, constitutes part of this application, this Shen
Illustrative embodiments and their description please are not constituted an undue limitation on the present application for explaining the application.In the accompanying drawings:
Fig. 1 is the architecture diagram of screen video codec according to an embodiment of the present invention;
Fig. 2 is the flow chart according to a kind of video-frequency compression method of the embodiment of the present application;
Fig. 3 is the screen video image compression work flow chart according to an embodiment of the present invention based on color index;
Fig. 4 is the color scheme for the screen video image that color component number N according to an embodiment of the present invention is 7;
Fig. 5 is the schematic diagram of the index map of the screen video image of embodiment based on shown in Fig. 4;And
Fig. 6 is the schematic diagram according to a kind of video compress device of the embodiment of the present application.
Specific embodiment
In order to make those skilled in the art more fully understand application scheme, below in conjunction in the embodiment of the present application
Attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is only
The embodiment of the application a part, instead of all the embodiments.Based on the embodiment in the application, ordinary skill people
Member's every other embodiment obtained without making creative work, all should belong to the model of the application protection
It encloses.
It should be noted that the description and claims of this application and term " first " in above-mentioned attached drawing, "
Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way
Data be interchangeable under appropriate circumstances, so as to embodiments herein described herein can in addition to illustrating herein or
Sequence other than those of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that cover
Cover it is non-exclusive include, for example, the process, method, system, product or equipment for containing a series of steps or units are not necessarily limited to
Step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, product
Or other step or units that equipment is intrinsic.
According to the embodiment of the present application, a kind of embodiment of method for compressing image is provided, it should be noted that in attached drawing
The step of process illustrates can execute in a computer system such as a set of computer executable instructions, although also,
Logical order is shown in flow chart, but in some cases, it can be to be different from shown by sequence execution herein or retouch
The step of stating.
Fig. 1 is the architecture diagram of screen video codec according to an embodiment of the present invention.
The present invention provides one kind can apply the compression of images in the system of portable equipment and display apparatus composition
The method of decompression, based on embodiment shown in FIG. 1 it is found that being compressed in portable equipment to video image, that is, after encoding
Obtained image is sent to display apparatus, and display apparatus carries out inversely processing to obtained image, i.e. decoding process obtains original
Image plays out.
In a kind of alternative embodiment, above-mentioned portable equipment can include at least following processing module: statistical color histogram
Module, color index table generation module, color index figure generation module, color index table coding module, color index graph code
Module and code stream organization module;Display apparatus can include at least: code stream splits module, color index table decoder module, face
Color index map decoder module and frame display module.
Wherein, above-mentioned statistical color histogram module at least implements function such as: obtaining the frame in screen video
After color histogram, it can count certain before occupying after being arranged color histogram from big to small according to probability
The number N of percentage (such as 95%) color component.
Color index table generation module at least implements function such as: reading the color value of N number of color component, and by each face
The color value of colouring component is compared with the color value in the color index table of standard respectively, wherein in the color index of standard
In the case that color value is less than or equal to first threshold with the difference of corresponding color component in table, the corresponding face of color component is obtained
Color value, finally according to each color value and corresponding number, the color index table of getting frame.
Color index figure generation module at least implements function such as: the color index table of getting frame and each picture of frame
The color component of plain position the color component of each location of pixels can be compared with the color value in color index table,
Wherein, the difference of the color value in color index table and the color component of respective pixel position is less than or equal to the feelings of second threshold
Under condition, the color value of each location of pixels is obtained, the color index figure of frame is finally obtained according to the color value of each location of pixels.
Color index table coding module at least implements function such as: the color component of current location in color index table
When value is encoded, predicted value can be obtained according to the index value of standard color concordance list, the color component value with current location
The difference subtracted each other carries out the coding of lossless compression formula.
Color index graph code module at least implements function such as: can be straight using image compression algorithm to color index figure
Tap into row compressed encoding.
Code stream organization module at least implements function such as: according to different credit ratings by bit stream to receiving end.
Wherein, the code stream in aforementioned display device equipment splits module, color index table decoder module, color index and illustrates code
Function performed by module and frame display module be respectively above-mentioned statistical color histogram module, color index table generation module,
Color index figure generation module, color index table coding module, color index graph code module and code stream organization module inverse mistake
Journey, it is therefore intended that realize that the code stream received is decoded by display apparatus, obtain the raw video image that can be shown.
It follows that the embodiment of the present application can provide a kind of video compress side under above-mentioned running environment shown in FIG. 1
Method.Fig. 2 be according to a kind of flow chart of video-frequency compression method of the embodiment of the present application, as shown in Fig. 2, this method may include as
Lower step:
Step S202 obtains the frame in video.
Step S204, the color histogram of getting frame, and the quantity of the color of statistical color histogram.
Step S206, according to the color index table of the quantity getting frame of color component, wherein color index table includes color
Value and corresponding index value.
Step S208 obtains color index figure according to the color index table of frame, wherein color index figure includes each of frame
The corresponding index value of the color value of location of pixels.
Step S210 carries out compressed encoding to color index table and color index figure, obtains the compressed bit stream of video.
Embodiment provided by the application above-mentioned steps provides a kind of video compression scheme, first obtains in video image
One frame image, and obtain the color histogram of the frame image, that is, find percentage occupied by each color component, last basis
The characteristic of color histogram generates the color index table of present frame, and obtains the color index figure of present frame by color index table,
Further, the compressed bit stream that compressed encoding finally obtains screen video is carried out respectively to color index table and color index figure.
Herein it should be noted that being compressed since the present invention is directed to screen video image, due to needing big compression ratio to need to lead again
It sees and shows high-quality characteristic, therefore, a kind of screen video pressure based on color index provided using above scheme of the present invention
Contracting technology, it is ensured that entire screen video compressibility reaches preferable compression performance, and then it is full that compressed file may be implemented
Sufficient transmission bandwidth demand.
It is above-mentioned that compressed encoding is carried out to color index table and/or color index figure in a kind of preferred embodiment, obtain video
The scheme of compressed bit stream may include following optional embodiment:
When the color component value of current location is compressed in color index table, using the color point of previous position
Magnitude carries out lossless compression as predicted value, with the difference that the color component value of current location is subtracted each other.
Compressed encoding is directly carried out using image compression algorithm to color index figure.
In a kind of alternative embodiment, the quantity of the color component of statistical color histogram may include that step is implemented as follows:
Firstly, color histogram is arranged from big to small according to probability.
Then, statistical probability is in the number N of the color component within the scope of predetermined probability.Can with, can be with statistical color
The probability of histogram occupies the number N of preceding 95% color component.
In a kind of alternative embodiment, the color index table of the quantity getting frame of the above-mentioned color component according to color histogram
Scheme may include following examples step: read the color value of N number of color component;By the color value of each color component point
It is not compared with the color value in the color index table of standard;Color value and corresponding color in the color index table of standard
In the case that the difference of component is less than or equal to first threshold, the corresponding color value of color component is obtained;According to each color value and
Corresponding number, the color index table of getting frame.
Specifically, for each frame image in the video that is shown in screen, for example, if accounting for preceding 95% color histogram
In the case that the color component number N of figure is 7, according to preset rules, as (N=7) < 8, then 8 components can be generated
Color index table.The larger color value of preceding 8 probability in histogram is taken, with the color value in 256 color color index tables of standard
It compares, takes 8 value concordance lists of most similar 8 color values generation present frame in 256 color color index tables of standard.
Preferably, the color index figure of the quantity getting frame of the above-mentioned color component according at least one color histogram
Scheme may include that step is implemented as follows: the color component of each location of pixels of the color index table and frame of getting frame;It will
The color component of each location of pixels is compared with the color value in color index table;Color value in color index table with
In the case that the difference of the color component of respective pixel position is less than or equal to second threshold, the color of each location of pixels is obtained
Value;The color index figure of frame is obtained according to the color value of each location of pixels.
Specifically, above preferred embodiment may be implemented each location of pixels color component of present frame and present frame
Color index table is compared, and takes color value of the color value as current pixel point corresponding to most similar color.To index
Figure can be used general method for compressing image and carry out compressed encoding.
It follows that in a frame image of video every kind of face can be found by counting the color histogram of present frame
Percentage occupied by colouring component, then generates the concordance list of present frame according to the characteristic of color histogram, and is obtained by concordance list
To the index map of present frame, the compressed bit stream that compressed encoding finally obtains screen video is carried out respectively to concordance list and index map,
And then realize a kind of compression method that can satisfy network demand.
Fig. 3 is the screen video image compression work flow chart according to an embodiment of the present invention based on color index;Fig. 4 is
The color scheme for the view that color component number N according to an embodiment of the present invention is 7;Fig. 5 is embodiment based on shown in Fig. 4
The result schematic diagram of compressed encoding is carried out using general method for compressing image.
The present invention is described in detail for specific embodiment provided by 3 to 5 with reference to the accompanying drawing.
Step S301 obtains the frame in screen video, and calculates its color histogram.As shown in figure 3, available table
A frame image on face in video being played on, if size is 32 × 32.
Step S303 arranges color histogram according to each color probability of occurrence from big to small.
Step S305 counts the number N of color in the probability for occupy preceding 95%.
Specifically, as shown in figure 3, the number of the color component for the color histogram that statistics obtains, the color of Zhan Qian 95%
Component number N can be 7.
Step S307 generates the color index table of 8 components when N≤8.The larger color value of preceding 8 probability in histogram is taken,
It compares, is taken most similar 8 in 256 color color index tables of standard with the color value in 256 color color index tables of standard
A color value generates 8 value concordance list of present frame.
Specifically, as shown in figure 3, the color index table of 8 components can be generated when in the example of (N=7) < 8, it can
Color value in the color value for taking the larger color component of preceding 8 probability in color histogram, with 256 color color index tables of standard
It compares, most similar 8 color values in standard concordance list is taken to generate 8 value concordance list of present frame.
Step S309 generates the color index table of 16 components when 8 < N≤16.Take the larger face of preceding 16 probability in histogram
Color value in color value, with 256 color color index tables of standard compares, and takes most similar 16 colors in standard concordance list
Value generates 16 value concordance list of present frame.
Step S311 generates the color index table of 32 components when 16 < N≤32.Take preceding 32 probability in histogram larger
Color value in color value, with 256 color color index tables of standard compares, and takes most similar 32 face in standard concordance list
Color value generates 32 value concordance list of present frame.
Step S313 generates the color index table of 64 components when 32 < N≤64.Take preceding 64 probability in histogram larger
Color value in color value, with 256 color color index tables of standard compares, and takes most similar 64 face in standard concordance list
Color value generates 64 value concordance list of present frame.
Step S315 generates the color index table of 128 components when 64 < N≤128.Take in histogram preceding 128 probability compared with
Color value in big color value, with 256 color color index tables of standard compares, and takes most similar 128 in standard concordance list
A color value generates 128 value concordance list of present frame.
Step S317 takes concordance list of the 256 color color index tables of standard as present frame as 128 > N.
Step S319 encodes the concordance list of present frame.The number of index value in code index table is only needed, and each
The one-dimensional sequence of index value composition of a color component in 256 color concordance list of standard.Due to color in newly-generated concordance list
The arrangement order of component is consistent with the original arrangement number of color component of 256 color concordance list of standard, to new concordance list
When (this one-dimensional sequence) carries out compressed encoding, can be using prediction by the way of, i.e. the value of the previous position of use as predicted value,
Lossless compression is carried out with the difference that the value of current location is subtracted each other.
Each location of pixels color component of present frame is compared step S321 with the color index table of present frame,
Take index value of the index value as current pixel point corresponding to most similar color.Index map can be used general image pressure
Contracting method carries out compressed encoding.
Specifically, can be compressed to the screen video image shown in Fig. 4 with color index table and index map, obtain
To the schematic diagram of the index map of screen video image as shown in Figure 5.
Step S323 is organized together according to different types of compressed bit stream and is transferred to receiving end.
Specifically, decoding end is decoded and shows to different types of code stream.
From the foregoing, it will be observed that embodiment provided by the invention contains following advantage: good compatibility: algorithm is that software realization can be supported
The equipment such as polymorphic type mobile terminal, including mobile phone, pad;Wide adaptability: the encoder of screen video image, all needs are to screen
The system that curtain video image is compressed can all be applied;Experience: user can designing quality grade according to their needs number.
Transmission display effect is good, and user experience is good.
It is compressed according to each piece of corresponding different credit rating.It should be noted that for each method above-mentioned
Embodiment, for simple description, therefore, it is stated as a series of action combinations, but those skilled in the art should know
It knows, the application is not limited by the described action sequence, because certain steps can be using other sequences according to the application
Or it carries out simultaneously.Secondly, those skilled in the art should also know that, embodiment described in this description belongs to preferred reality
Example is applied, necessary to related actions and modules not necessarily the application.
Through the above description of the embodiments, those skilled in the art can be understood that according to above-mentioned implementation
The method of example can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but it is very much
In the case of the former be more preferably embodiment.Based on this understanding, the technical solution of the application is substantially in other words to existing
The part that technology contributes can be embodied in the form of software products, which is stored in a storage
In medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, calculate
Machine, server or network equipment etc.) execute method described in each embodiment of the application.
According to the embodiment of the present application, additionally provide a kind of for implementing the video of the video-frequency compression method of above-described embodiment 1
The embodiment of compression set.
Fig. 6 is according to a kind of schematic diagram of video compress device of the embodiment of the present application, as shown in fig. 6, the device 600 can
To include: to obtain module 602, index map acquisition module 604 and compression module 606 and concordance list acquisition module 608.
Wherein, module 602 is obtained, for obtaining the color histogram of a frame and frame in video, and statistical color is straight
The quantity of the color component of square figure;Index map obtains module 604, for according to the acquisition of the color index table of frame and/or color rope
Draw figure, wherein color index figure includes the corresponding index value of color value of each location of pixels of frame;Compression module 606, is used for
Compressed encoding is carried out to color index table and/or color index figure, obtains the compressed bit stream of video;Concordance list obtains module 608,
For the color index table and color index figure according to the quantity getting frame of color, wherein color index table include color value and
Corresponding index value.
Embodiment provided by the application above-mentioned steps provides a kind of video compression scheme, first obtains in video image
One frame image, and obtain the color histogram of the frame image, that is, find percentage occupied by each color component, last basis
The characteristic of color histogram generates the color index table of present frame, and obtains the color index figure of present frame by color index table,
Further, the compressed bit stream that compressed encoding finally obtains screen video is carried out respectively to color index table and color index figure.
Herein it should be noted that being compressed since the present invention is directed to screen video image, due to needing big compression ratio to need to lead again
It sees and shows high-quality characteristic, therefore, a kind of screen video pressure based on color index provided using above scheme of the present invention
Contracting technology, it is ensured that entire screen video compressibility reaches preferable compression performance, and then it is full that compressed file may be implemented
Sufficient transmission bandwidth demand.
Preferably, above-mentioned compression module 606 may include: the first sub- compression module 6062, for color index table
When the color value of middle current location is compressed, using the corresponding index value of the color value of previous position as predicted value, with
The difference that the corresponding index value of the color value of current location subtracts each other carries out lossless compression;Second sub- compression module 6064, for pair
Color index figure directly carries out compressed encoding using image compression algorithm.
Preferably, above-mentioned acquisition module 602 may include: sub- sorting module 6022, be used for color histogram according to every
A color probability of occurrence is arranged from big to small;Sub- statistical module 6024 is within the scope of predetermined probability for statistical probability
Color component number N.
Preferably, it may include: sub- read module 6042 that above-mentioned concordance list, which obtains module 608, for reading N number of color
Color value;First sub- comparison module 6044, for by the color value of each color respectively with the face in the color index table of standard
Color value is compared;First sub-acquisition module 6048, color value and corresponding color in the color index table for obtaining standard
The smallest color value of the difference of color value obtains the corresponding color value of each color;First subprocessing module 6050 is used for basis
Each color value and corresponding index value obtain the color index table of frame.
Preferably, it may include: the second sub-acquisition module 6052 that above-mentioned index map, which obtains module 604, for getting frame
The color value of each location of pixels of color index table and frame;Second sub- comparison module 6054 is used for each location of pixels
Color value be compared with the color value in color index table;Third sub-acquisition module 6056, for obtaining color index table
In the smallest color value of difference with the color value of respective pixel position, obtain the color value of each location of pixels;At second son
Module 6058 is managed, obtains the color index figure of frame for the corresponding index value of color value according to each location of pixels.
Above-mentioned the embodiment of the present application serial number is for illustration only, does not represent the advantages or disadvantages of the embodiments.
In above-described embodiment of the application, all emphasizes particularly on different fields to the description of each embodiment, do not have in some embodiment
The part of detailed description, reference can be made to the related descriptions of other embodiments.
In several embodiments provided herein, it should be understood that disclosed technology contents can pass through others
Mode is realized.Wherein, the apparatus embodiments described above are merely exemplary, such as the division of the unit, Ke Yiwei
A kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or components can combine or
Person is desirably integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual
Between coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or communication link of unit or module
It connects, can be electrical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
On unit.It can some or all of the units may be selected to achieve the purpose of the solution of this embodiment according to the actual needs.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product
When, it can store in a computer readable storage medium.Based on this understanding, the technical solution of the application is substantially
The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words
It embodies, which is stored in a storage medium, including some instructions are used so that a computer
Equipment (can for personal computer, server or network equipment etc.) execute each embodiment the method for the application whole or
Part steps.And storage medium above-mentioned includes: that USB flash disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited
Reservoir (RAM, Random Access Memory), mobile hard disk, magnetic or disk etc. be various to can store program code
Medium.
The above is only the preferred embodiment of the application, it is noted that for the ordinary skill people of the art
For member, under the premise of not departing from the application principle, several improvements and modifications can also be made, these improvements and modifications are also answered
It is considered as the protection scope of the application.
Claims (8)
1. a kind of video-frequency compression method characterized by comprising
Obtain the frame in video;
The color histogram of the frame is obtained, and counts the quantity of the color of the color histogram;
The color index table of the frame is obtained according to the quantity of the color, wherein the color index table include color value and
Corresponding index value;
Color index figure is obtained according to the color index table of the frame, wherein the color index figure includes each of described frame
The corresponding index value of the color value of location of pixels;
Compressed encoding is carried out to the color index table and the color index figure, obtains the compressed bit stream of the video;
Wherein, compressed encoding is carried out to the color index table and the color index figure, obtains the compressed bit stream of the video,
Include:
It is corresponding using the color value of previous position when the color value of current location compresses in the color index table
Index value as predicted value, difference that index value corresponding with the color value of the current location subtracts each other carries out lossless compression;
Compressed encoding is directly carried out using image compression algorithm to the color index figure.
2. the method according to claim 1, wherein counting the quantity of the color of the color histogram, comprising:
The probability that the color histogram occurs according to each color is arranged from big to small;
Statistical probability is in the number N of the color within the scope of predetermined probability.
3. according to the method described in claim 2, it is characterized in that, obtaining the color rope of the frame according to the quantity of the color
Draw table, comprising:
Read the color value of N number of color;
The color value of each color is compared with the color value in the color index table of standard respectively;
It obtains in the color index table of the standard with the smallest color value of the difference of the color value of corresponding color, obtains described every
The color value of a color;
According to each color value and corresponding index value, the color index table of the frame is obtained.
4. according to the method described in claim 3, it is characterized in that, obtaining color index according to the color index table of the frame
Figure, comprising:
Obtain the color value of the color index table of the frame and each location of pixels of the frame;
The color value of each location of pixels is compared with the color value in the color index table;
The smallest color value of difference in the color index table with the color value of respective pixel position is obtained, is obtained described each
The color value of location of pixels;
The color index figure of the frame is obtained according to the corresponding index value of color value of each location of pixels.
5. a kind of video compress device characterized by comprising
Module is obtained, for obtaining the color histogram of a frame and the frame in video, and counts the color histogram
Color quantity;
Concordance list obtains module, for obtaining the color index table and color index figure of the frame according to the quantity of the color,
Wherein, the color index table includes color value and corresponding index value;
Index map obtains module, for obtaining color index figure according to the color index table of the frame, wherein the color index
Figure includes the corresponding index value of color value of each location of pixels of the frame;
Compression module obtains the video for carrying out compressed encoding to the color index table and the color index figure
Compressed bit stream;
Wherein, the compression module includes:
First sub- compression module, when the color value for the current location in the color index table compresses, before
The corresponding index value of the color value of one position subtracts each other as predicted value, index value corresponding with the color value of the current location
Difference carry out lossless compression;
Second sub- compression module, for directly carrying out compressed encoding using image compression algorithm to the color index figure.
6. device according to claim 5, which is characterized in that the acquisition module includes:
Sub- sorting module, for arranging the color histogram from big to small according to each color probability of occurrence;
Sub- statistical module is in the number N of the color component within the scope of predetermined probability for statistical probability.
7. device according to claim 6, which is characterized in that the concordance list obtains module and includes:
Sub- read module, for reading the color value of N number of color;
First sub- comparison module, for carrying out the color value of each color with the color value in the color index table of standard respectively
It compares;
First sub-acquisition module, it is minimum with the difference of the color value of corresponding color in the color index table for obtaining the standard
Color value, obtain the corresponding color value of each color;
First subprocessing module, for obtaining the color index table of the frame according to each color value and corresponding index value.
8. device according to claim 7, which is characterized in that the index map obtains module, comprising:
Second sub-acquisition module, for obtaining the color of the color index table of the frame and each location of pixels of the frame
Value;
Second sub- comparison module, for by the color value in the color value of each location of pixels and the color index table into
Row compares;
Third sub-acquisition module, it is the smallest with the difference of the color value of respective pixel position in the color index table for obtaining
Color value obtains the color value of each location of pixels;
Second subprocessing module, for obtaining the face of the frame according to the corresponding index value of color value of each location of pixels
Color index map.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610796104.7A CN106331716B (en) | 2016-08-31 | 2016-08-31 | Video-frequency compression method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610796104.7A CN106331716B (en) | 2016-08-31 | 2016-08-31 | Video-frequency compression method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106331716A CN106331716A (en) | 2017-01-11 |
CN106331716B true CN106331716B (en) | 2019-05-24 |
Family
ID=57786452
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610796104.7A Active CN106331716B (en) | 2016-08-31 | 2016-08-31 | Video-frequency compression method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106331716B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI691944B (en) * | 2019-01-23 | 2020-04-21 | 奇景光電股份有限公司 | Timing controller |
CN111510723B (en) * | 2019-01-30 | 2022-02-22 | 奇景光电股份有限公司 | Time sequence controller |
CN109819254B (en) * | 2019-01-31 | 2022-05-03 | 深圳市战音科技有限公司 | Lossy image compression transmission method and system |
CN111787386A (en) * | 2020-06-01 | 2020-10-16 | 深圳市战音科技有限公司 | Animation compression method, animation display method, animation compression device, animation processing system, and storage medium |
WO2022234575A1 (en) * | 2021-05-05 | 2022-11-10 | Mythrealio Ltd | System and method for dynamic video compression |
CN116074527A (en) * | 2023-01-30 | 2023-05-05 | 海宁奕斯伟集成电路设计有限公司 | Multimedia file encoding method, decoding method, device and electronic equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103813173A (en) * | 2014-03-14 | 2014-05-21 | 北方工业大学 | BCIM-based 3D-HEVC rapid intra-frame predication scheme |
CN103957412A (en) * | 2014-05-06 | 2014-07-30 | 北京大学 | Base color and index map algorithm for correcting inter-frame residual errors of screen video |
CN105075272A (en) * | 2013-04-05 | 2015-11-18 | 高通股份有限公司 | Determining palette indices in palette-based video coding |
CN105323583A (en) * | 2014-06-13 | 2016-02-10 | 财团法人工业技术研究院 | Encoding method, decoding method, encoding/decoding system, encoder and decoder |
CN105828081A (en) * | 2015-01-28 | 2016-08-03 | 财团法人工业技术研究院 | Encoding method and encoding device |
-
2016
- 2016-08-31 CN CN201610796104.7A patent/CN106331716B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105075272A (en) * | 2013-04-05 | 2015-11-18 | 高通股份有限公司 | Determining palette indices in palette-based video coding |
CN103813173A (en) * | 2014-03-14 | 2014-05-21 | 北方工业大学 | BCIM-based 3D-HEVC rapid intra-frame predication scheme |
CN103957412A (en) * | 2014-05-06 | 2014-07-30 | 北京大学 | Base color and index map algorithm for correcting inter-frame residual errors of screen video |
CN105323583A (en) * | 2014-06-13 | 2016-02-10 | 财团法人工业技术研究院 | Encoding method, decoding method, encoding/decoding system, encoder and decoder |
CN105828081A (en) * | 2015-01-28 | 2016-08-03 | 财团法人工业技术研究院 | Encoding method and encoding device |
Non-Patent Citations (1)
Title |
---|
A Low-Complexity Screen Compression Scheme for Interactive Screen Sharing;Zhaotai Pan等;《IEEE TRANSACTIONS ON CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY》;20130630;第4部分,图3 |
Also Published As
Publication number | Publication date |
---|---|
CN106331716A (en) | 2017-01-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106331716B (en) | Video-frequency compression method and device | |
CN106385592B (en) | Method for compressing image and device | |
EP4336829A1 (en) | Feature data encoding method and apparatus and feature data decoding method and apparatus | |
EP3652946B1 (en) | Coding video syntax elements using a context tree | |
US20210006766A1 (en) | Methods and systems for color smoothing for point cloud compression | |
CN115134602A (en) | Low latency two-pass video coding | |
CN108881913B (en) | Method and apparatus for image encoding | |
CN110996127B (en) | Image encoding and decoding method, device and system | |
CN107147913B (en) | The transmission method and device of character block | |
CN107302700A (en) | Adaptive direction loop filter | |
CN110692245A (en) | Image processing for compression | |
CN114222127A (en) | Video coding method, video decoding method and device | |
CN106663310B (en) | Frequency domain denoising | |
EP4300976A1 (en) | Audio/video or image layered compression method and apparatus | |
CN107172430B (en) | The coding method of character block and device | |
Kabir et al. | Edge-based transformation and entropy coding for lossless image compression | |
US12262065B2 (en) | Restoration for video coding with self-guided filtering and subspace projection | |
KR20200005748A (en) | Complex Motion-Compensation Prediction | |
CN111212288A (en) | Video data encoding and decoding method and device, computer equipment and storage medium | |
CN106791841B (en) | Method for compressing image and device | |
Venkataramanan et al. | Quality assessment in media and entertainment: Challenges and trends | |
CN107155111B (en) | Video compression method and device | |
CN106878728B (en) | The compression method and device of image | |
CN108632612B (en) | Method and apparatus for code compression | |
Kekre et al. | Image Reconstruction using Fast Inverse Half tone and Huffman Coding Technique |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20171114 Address after: 710075 D102 room, building 4, Maple new city, F District, Xi'an hi tech Zone, Shaanxi Applicant after: XI'AN WANXIANG ELECTRONIC TECHNOLOGY CO., LTD. Address before: 710075 Room 501, building B, 8 cool Industrial Park, Tang Yan Nan Road, Xi'an, Shaanxi Applicant before: Zhong Yanpei |
|
TA01 | Transfer of patent application right | ||
GR01 | Patent grant | ||
GR01 | Patent grant |