CN108399052A - Picture compression method, apparatus, computer equipment and storage medium - Google Patents
Picture compression method, apparatus, computer equipment and storage medium Download PDFInfo
- Publication number
- CN108399052A CN108399052A CN201810124554.0A CN201810124554A CN108399052A CN 108399052 A CN108399052 A CN 108399052A CN 201810124554 A CN201810124554 A CN 201810124554A CN 108399052 A CN108399052 A CN 108399052A
- Authority
- CN
- China
- Prior art keywords
- picture
- compressed
- format
- characteristic parameter
- dimension
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0608—Saving storage space on storage systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/0643—Management of files
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Human Computer Interaction (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Evolutionary Computation (AREA)
- Evolutionary Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Computational Biology (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
Abstract
This application involves a kind of picture compression method, the method includes:Obtain the characteristic parameter of picture to be compressed;Classified to the picture to be compressed according to the dimension of picture in the characteristic parameter, obtains picture/mb-type corresponding with the picture to be compressed;Corresponding with picture/mb-type reduced rule is obtained, according to the characteristic parameter and reduced rule determination is corresponding with the picture to be compressed is compressed with loss rate and compressed format;It obtains and is compressed with loss rate and the corresponding compression processing algorithm of the compressed format with described;Compression processing is carried out to the picture to be compressed according to the compression processing algorithm.The picture compression method improves compression ratio in the case where ensureing subjective quality, to save the occupancy of memory space.In addition, it is also proposed that a kind of picture compression device, computer equipment and storage medium.
Description
Technical field
This application involves field of computer technology, more particularly to a kind of picture compression method, apparatus, computer equipment and
Storage medium.
Background technology
App (Application, application program) size of itself is the emphasis that mobile Development persons optimize, and in App
Picture just accounts for a big chunk in resource, so how to control the size of picture occupancy becomes the key solved the problems, such as.
The compression of current image can only artificially select picture compression tool to compress picture according to picture format to reduce figure
The occupancy size of piece, not only efficiency is low, but also the picture compression tool selected is likely to nor optimal, so leading to have pressure
Shrinkage is low, wastes memory space.
Invention content
Based on this, it is necessary in view of the above technical problems, provide one kind and improve pressure under the premise of ensureing subjective quality
Shrinkage, picture compression method, apparatus, computer equipment and the storage medium for saving memory space.
A kind of picture compression method, the method includes:
Obtain the characteristic parameter of picture to be compressed;
Classified to the picture to be compressed according to the dimension of picture in the characteristic parameter, obtain with it is described to be compressed
The corresponding picture/mb-type of picture;
Obtain corresponding with picture/mb-type reduced rule, determined according to the characteristic parameter and the reduced rule and
The picture to be compressed is corresponding to be compressed with loss rate and compressed format;
It obtains and is compressed with loss rate and the corresponding compression processing algorithm of the compressed format with described;
Compression processing is carried out to the picture to be compressed according to the compression processing algorithm.
In one of the embodiments, the dimension of picture according in the characteristic parameter to the picture to be compressed into
Row classification, the step of obtaining picture/mb-type corresponding with the picture to be compressed include:When the dimension of picture is less than or equal to
When the first pre-set dimension, the picture to be compressed is determined as first kind picture;It is preset when the dimension of picture is more than first
Size and less than the second pre-set dimension when, the picture to be compressed is determined as Second Type picture;When the dimension of picture is big
When the second pre-set dimension, the picture to be compressed is determined as third type picture.
The characteristic parameter further includes picture size, number of colours and transparent attribute in one of the embodiments,;It is described to obtain
Take reduced rule corresponding with the picture/mb-type, according to the characteristic parameter and the reduced rule determine with it is described to be compressed
Picture corresponding the step of being compressed with loss rate and compressed format includes:Obtain reduced rule corresponding with the picture/mb-type, institute
Reduced rule is stated to be associated with the picture size, number of colours and transparent attribute;According to the picture size, number of colours and transparent category
Property and the reduced rule determine and corresponding with the picture to be compressed be compressed with loss rate and compressed format.
In one of the embodiments, the dimension of picture according in the characteristic parameter to the picture to be compressed into
Row classification, the step of obtaining picture/mb-type corresponding with the picture to be compressed include:Obtain the picture for including in characteristic parameter
Format classifies to the picture to be compressed according to the picture format and dimension of picture, obtains and the picture to be compressed
Corresponding picture/mb-type.
It is described in one of the embodiments, to obtain the picture format for including in characteristic parameter, according to the picture format
The step of classifying to the picture to be compressed with dimension of picture, obtaining picture/mb-type corresponding with the picture to be compressed wraps
It includes:Master map sheet type corresponding with the picture format, the master are determined according to the picture format for including in the characteristic parameter
Include multiple subgraph sheet types in picture/mb-type;The multiple sons for including from the master map sheet type according to the dimension of picture
Subgraph sheet type corresponding with the picture to be compressed is matched in picture/mb-type.
A kind of picture compression device, described device include:
Characteristic parameter acquisition module, the characteristic parameter for obtaining picture to be compressed;
Sort module is obtained for being classified to the picture to be compressed according to the dimension of picture in the characteristic parameter
To picture/mb-type corresponding with the picture to be compressed;
Determining module, for obtaining corresponding with picture/mb-type reduced rule, according to the characteristic parameter and described
Reduced rule determination is corresponding with the picture to be compressed to be compressed with loss rate and compressed format;
Algorithm acquisition module is compressed with loss rate and the compressed format corresponding compression processing calculation for obtaining with described
Method;
Compression module, for carrying out compression processing to the picture to be compressed according to the compression processing algorithm.
The sort module is additionally operable to preset when the dimension of picture is less than or equal to first in one of the embodiments,
When size, the picture to be compressed is determined as first kind picture;When the dimension of picture is more than the first pre-set dimension and small
When the second pre-set dimension, the picture to be compressed is determined as Second Type picture;When the dimension of picture is greater than or equal to
When the second pre-set dimension, the picture to be compressed is determined as third type picture.
The characteristic parameter further includes picture size, number of colours and transparent attribute in one of the embodiments,;It is described true
Cover half block is additionally operable to obtain reduced rule corresponding with the picture/mb-type, the reduced rule and the picture size, color
Number is associated with transparent attribute;It is determined according to the picture size, number of colours and transparent attribute and the reduced rule and is waited for described
Compressed picture is corresponding to be compressed with loss rate and compressed format.
The sort module is additionally operable to obtain the picture format for including in characteristic parameter, root in one of the embodiments,
Classify to the picture to be compressed according to the picture format and dimension of picture, obtains figure corresponding with the picture to be compressed
Sheet type.
The sort module is additionally operable to be determined according to the picture format for including in characteristic parameter in one of the embodiments,
Master map sheet type corresponding with the picture format includes multiple subgraph sheet types in the master map sheet type;According to described
Dimension of picture is matched to corresponding with the picture to be compressed from the multiple subgraph sheet types for including in the master map sheet type
Subgraph sheet type.
A kind of computer equipment, including memory, processor and storage can be run on a memory and on a processor
Computer program, the processor realize above-mentioned picture compression method when executing the computer program.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor
Above-mentioned picture compression method is realized when row.
Above-mentioned picture compression method, apparatus, computer equipment and storage medium, the feature by obtaining picture to be compressed are joined
Number, then treats compressed picture according to the dimension of picture in characteristic parameter and classifies, obtain figure corresponding with picture to be compressed
Then sheet type obtains reduced rule corresponding with picture/mb-type, determined and figure to be compressed according to characteristic parameter and reduced rule
Piece is corresponding to be compressed with loss rate and compressed format, then obtains and is compressed with loss rate and the corresponding compression processing of compressed format is calculated
Method carries out compression processing according to compression processing algorithm to picture.The picture compression method first classifies to picture, and is arranged
With the reduced rule of each picture/mb-type, it is matched to by characteristic parameter and reduced rule and best is compressed with loss rate and compression lattice
Formula.In this process automatically according to the characteristic parameter of picture determine it is best be compressed with loss rate and compressed format, realize
The compression ratio that picture is improved under the premise of guarantee subjective quality, saves the occupancy of memory space.
A kind of picture compression method, the method includes:
Obtain picture to be compressed, extract the characteristic parameter of the picture to be compressed, the characteristic parameter include picture format,
Dimension of picture, picture size, number of colours and transparent attribute;
The characteristic parameter is combined as feature vector, using described eigenvector as the picture classification model trained
Input, the picture to be compressed for obtaining output corresponding are compressed with loss rate and compressed format;
It obtains and is compressed with loss rate and the corresponding compression processing algorithm of the compressed format with described;
Compression processing is carried out to the picture to be compressed according to the compression processing algorithm.
The method further includes in one of the embodiments,:Training sample picture is obtained, the training sample figure is extracted
The training characteristics parameter of piece forms training feature vector;Acquisition is corresponding with the training sample picture to be compressed with loss rate and pressure
The mark of contracting format;Using the training feature vector as the input of the picture classification model, loss rate is compressed with by corresponding
The picture classification model is trained as the desired output of the picture classification model with the mark of compressed format, is obtained
To Target Photo disaggregated model.
A kind of picture compression device, described device include:
Extraction module extracts the characteristic parameter of the picture to be compressed, the characteristic parameter for obtaining picture to be compressed
Including picture format, dimension of picture, picture size, number of colours and transparent attribute;
Output module, for the characteristic parameter to be combined as feature vector, using described eigenvector as having trained
The input of picture classification model, the picture to be compressed for obtaining output corresponding are compressed with loss rate and compressed format;
Compression algorithm acquisition module is compressed with loss rate and the corresponding compression processing of the compressed format for obtaining with described
Algorithm;
Compressing processing module, for carrying out compression processing to the picture to be compressed according to the compression processing algorithm.
Above-mentioned picture compression device further includes in one of the embodiments,:Model building module 701, for obtaining instruction
Practice samples pictures, extract the training characteristics parameter of the training sample picture, forms training feature vector;It obtains and the training
The corresponding mark for being compressed with loss rate and compressed format of samples pictures;Using the training feature vector as the picture classification mould
The input of type, the desired output pair by the corresponding mark for being compressed with loss rate and compressed format as the picture classification model
The picture classification model is trained, and obtains Target Photo disaggregated model.
A kind of computer equipment, including memory, processor and storage can be run on a memory and on a processor
Computer program, the processor realize above-mentioned picture compression method when executing the computer program.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor
Above-mentioned picture compression method is realized when row.
Above-mentioned picture compression method, apparatus, computer equipment and storage medium, the feature by extracting picture to be compressed are joined
Number, characteristic parameter includes picture format, dimension of picture, picture size, number of colours and transparent attribute.Then characteristic parameter is combined
For feature vector the figure to be compressed of output is then obtained using this feature vector as the input for the picture classification model trained
Piece is corresponding to be compressed with loss rate and compressed format, then obtains and is compressed with loss rate and the corresponding compression processing of compressed format is calculated
Method carries out compression processing according to the compression processing algorithm to the picture to be compressed.In this process by that will have feature
Input of the feature vector as trained picture classification model of parameter composition, you can with obtain it is best be compressed with loss rate and
Compressed format realizes the compression ratio for improving picture under the premise of ensureing subjective quality, saves the occupancy of memory space.
Description of the drawings
Fig. 1 is the applied environment figure of picture compression method in one embodiment;
Fig. 2 is the flow chart of picture compression method in one embodiment;
Fig. 3 is that the method flow for being compressed with loss rate and compressed format corresponding with picture to be compressed is determined in one embodiment
Figure;
Fig. 4 is the flow chart of picture compression method in another embodiment;
Fig. 5 is the method flow diagram that picture classification model is established in one embodiment;
Fig. 6 is the structure diagram of picture compression device in one embodiment;
Fig. 7 is the structure diagram of picture compression device in another embodiment;
Fig. 8 is the structure diagram of picture compression device in another embodiment;
Fig. 9 is the internal structure chart of one embodiment Computer equipment.
Specific implementation mode
It is with reference to the accompanying drawings and embodiments, right in order to make the object, technical solution and advantage of the application be more clearly understood
The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not
For limiting the application.
Picture compression method provided by the present application, can be applied in application environment as shown in Figure 1.Wherein, terminal 102
It is communicated with server 104 by network.Wherein, terminal 102 can be, but not limited to be various personal computers, notebook electricity
Brain, smart mobile phone, tablet computer and portable wearable device, server 104 can be either multiple with independent server
The server cluster of server composition is realized.First, terminal 102 obtains picture to be compressed, and the picture to be compressed is uploaded
To server 104, server 104 obtains the characteristic parameter of picture to be compressed, according to the dimension of picture pair in the characteristic parameter
The picture to be compressed is classified, and is obtained picture/mb-type corresponding with the picture to be compressed, is obtained and the picture/mb-type
Corresponding reduced rule determines be compressed with corresponding with the picture to be compressed according to the characteristic parameter and the reduced rule
Loss rate and compressed format obtain and are compressed with loss rate and the corresponding compression processing algorithm of the compressed format with described, according to described
Compression processing algorithm carries out compression processing to the picture to be compressed.Wherein, characteristic parameter and compression are integrated in reduced rule
There are loss rate and the corresponding optimal compression relationship of compressed format.
In one embodiment, as shown in Fig. 2, providing a kind of picture compression method, it is applied in Fig. 1 in this way
It illustrates, includes the following steps for server 104:
Step 202, the characteristic parameter of picture to be compressed is obtained.
Wherein, characteristic parameter refers to the parameter for indicating picture feature.Characteristic parameter includes that dimension of picture, picture are big
One or more of small, number of colours, transparent attribute etc..Dimension of picture refers to the length of picture and wide product, dimension of picture
Length and width is as unit of pixel, is to be indicated with photo resolution, for example, the picture of 640X480.Picture size
Refer to the size of memory space occupied by picture, for example, 1KB.Number of colours refers to being had in all pixels point for including in picture
The quantity of some colors, each pixel are indicated by one group of numerical value, traverse all pixels point in the picture, should
Group numerical value is identical, then it represents that identical color is classified as a kind of color, if it is different, then indicating different colors, face
Color value increases one kind, has thus obtained the number of colours for including in picture.Transparent attribute refers in picture with the presence or absence of transparent
If pixel illustrates that picture is translucent picture, if there is no transparent picture there are transparent pixel in picture
Vegetarian refreshments then illustrates that picture is completely opaque.
Step 204, it treats compressed picture according to the dimension of picture in characteristic parameter to classify, obtain and picture to be compressed
Corresponding picture/mb-type.
Wherein, picture is classified according to dimension of picture in advance, for example, can be divided into picture according to dimension of picture small
Figure, middle figure, big figure.Small figure is the figure using icon as representative.Middle figure is the figure using screenshot capture as representative, and big figure is with high definition figure
Piece is the figure of representative.In one embodiment, it presets and is stored with dimension of picture and the correspondence of picture/mb-type, get and wait pressing
The dimension of picture of contract drawing piece determines picture/mb-type corresponding with the picture to be compressed according to dimension of picture.
Step 206, reduced rule corresponding with picture/mb-type is obtained, determined according to characteristic parameter and reduced rule and waits pressing
Contract drawing piece is corresponding to be compressed with loss rate and compressed format.
Wherein, it is compressed with the loss rate mass loss front and back for indicating compression.The matter being compressed with after loss rate=compression losses
Amount and the mass ratio before compression.For example, the lossy compression of selection 80%, that is, represent the quality of loss 20%.Be compressed with loss rate with
Compression ratio is inversely proportional, that is, is compressed with that loss rate is smaller, illustrates that the bigger of mass loss, corresponding compression ratio are higher.If it is lossless
Compression, then it is 100% to be compressed with loss rate accordingly, i.e. free of losses.Compressed format refers to the Format Type that compression uses, than
Such as, SVG formats, jpeg format etc..Different picture/mb-types corresponds to different reduced rules.Reduced rule refers to pre-set
With the relevant rule of characteristic parameter.By the variable being used as characteristic parameter in the reduced rule, it is calculated and characteristic parameter
It is corresponding to be compressed with loss rate and compressed format.
Step 208, it obtains and is compressed with loss rate and the corresponding compression processing algorithm of compressed format.
Wherein, different to be compressed with loss rate and compressed format corresponds to different compression processing algorithms.It pre-establishes and is compressed with
Correspondence between loss rate and compressed format and compression processing algorithm.Compression processing algorithm refers to preset compressed logic rule
It then, can be directly using the existing compression processing algorithm for being compressed with loss rate and compressed format for difference.Intelligently select
Using which kind of compression processing algorithm to carrying out compression processing to treat compressed picture.
Step 210, compressed picture is treated according to compression processing algorithm and carries out compression processing.
Wherein, compression processing algorithm refers to carrying out compression processing to picture according to be compressed with loss rate and the compressed format of setting
Algorithm.By be intelligently according to the characteristic parameter of picture picture selection it is best be compressed with loss rate and compressed format, so as to
The compression ratio that picture is improved under the premise of ensureing subjective quality, to reduce the occupied space of picture.
Above-mentioned picture compression method, by obtaining the characteristic parameter of picture to be compressed, then according to the figure in characteristic parameter
Chip size treats compressed picture and classifies, and obtains picture/mb-type corresponding with picture to be compressed, then acquisition and picture/mb-type
Corresponding reduced rule is compressed with loss rate and compression lattice according to characteristic parameter and reduced rule determination are corresponding with picture to be compressed
Then formula obtains and is compressed with loss rate and the corresponding compression processing algorithm of compressed format, according to compression processing algorithm to picture into
Row compression processing.The picture compression method first classifies to picture, and compression rule corresponding with each picture/mb-type are arranged
Then, it is matched to by characteristic parameter and reduced rule and best is compressed with loss rate and compressed format.Automatic root in this process
According to the characteristic parameter of picture determine it is best be compressed with loss rate and compressed format, realize and carried under the premise of ensureing subjective quality
The compression ratio of high picture, to save the memory space of picture.
In one embodiment, it treats compressed picture according to the dimension of picture in characteristic parameter to classify, obtains and wait for
The step of compressed picture corresponding picture/mb-type includes:It, will be to be compressed when dimension of picture is less than or equal to the first pre-set dimension
Picture is determined as first kind picture;When dimension of picture is more than the first pre-set dimension and is less than the second pre-set dimension, will wait pressing
Contract drawing piece is determined as Second Type picture;When dimension of picture is greater than or equal to the second pre-set dimension, picture to be compressed is determined
For third type picture.
Wherein, picture is divided into three types, respectively first kind picture, Second Type figure previously according to dimension of picture
Piece and third type picture.And the dimension of picture range corresponding to each type picture is set, wherein first kind picture corresponds to
Dimension of picture ranging from (0, a1], the corresponding dimension of picture of Second Type picture ranging from (a1, a2), third type picture pair
The dimension of picture answered ranging from [a2 ,+∞).Wherein, a2>a1.A1 indicates that the first pre-set dimension, a2 indicate the second pre-set dimension.
Specifically, after the dimension of picture for getting picture to be compressed, the dimension of picture model belonging to it is determined according to the size of dimension of picture
It encloses, then determines its corresponding picture/mb-type.
As shown in figure 3, in one embodiment, characteristic parameter further includes picture size, number of colours and transparent attribute;
Reduced rule corresponding with picture/mb-type is obtained, is determined and picture pair to be compressed according to characteristic parameter and reduced rule
Answer be compressed with loss rate and the step 206 of compressed format includes:
Step 206A, obtains corresponding with picture/mb-type reduced rule, reduced rule and picture size, number of colours and transparent
Attribute Association.
Wherein, reduced rule is associated with picture size, number of colours, transparent attribute.I.e. picture size, number of colours and thoroughly
Bright attribute is the variable in reduced rule.Reduced rule corresponding to different picture/mb-types is different, same reduced rule, still
Picture size, number of colours, transparent attribute are different, obtain be compressed with loss rate and compressed format is also different.For example, if
Two pictures belong to Second Type picture according to size, and the picture size of two pictures, number of colours belong to together
One grade, uniquely the difference is that, one of picture includes transparent pixels, another picture, which does not include, transparent pixels, that
Its is corresponding to be compressed with loss rate and compressed format is also different, for example, for the picture containing transparent pixels, corresponding compression
Have that loss rate is 70%, corresponding compressed format is jpeg format.For the picture without transparent pixels, corresponding compression damages
Rate is 70%, corresponding compressed format is WEBP formats.
Step 206B is determined corresponding with picture to be compressed according to picture size, number of colours and transparent attribute and reduced rule
Be compressed with loss rate and compressed format.
Wherein, reduced rule be predetermined with picture feature parameter association, for match be compressed with loss rate and pressure
The rule of contracting format.For the picture of each type, by by picture size, number of colours and transparent attribute be used as variable come
With being specifically compressed with loss rate and compressed format.Here be compressed with loss rate and compressed format refers to joining with the feature of picture
Number it is corresponding it is best be compressed with loss rate and compressed format, be rule of thumb to sum up the rule come.According to these reduced rules
When being compressed to picture, so that it may with according to the picture feature parameter extracted be automatically matched to it is best be compressed with loss rate and
Compressed format to not only increase the efficiency of picture compression, and can improve compression under the premise of ensureing subjective quality
Rate, to reduce the space hold of picture.Should be in embodiment, as shown in table 1, picture size, number of colours and transparent category
Property and the reduced rule being compressed between loss rate and compressed format.
Table 1
In one embodiment, it treats compressed picture according to the dimension of picture in characteristic parameter to classify, obtains and wait for
The step of compressed picture corresponding picture/mb-type includes:Obtain the picture format for including in characteristic parameter, according to picture format and
Dimension of picture treats compressed picture and classifies, and obtains picture/mb-type corresponding with picture to be compressed.
Wherein, further include having picture format in characteristic parameter, picture format refers to the format of computer storage picture, common
Storage format have jpeg format, JPG formats, PNG format etc..Reduced rule corresponding to different picture formats may not
Together, so in order to more accurately be compressed to picture, when classifying to picture, not only to consider dimension of picture, also need
Consider the unprocessed form of picture, for example, picture and unprocessed form that unprocessed form is PNG are the picture of JPG formats, even if two
Person's dimension of picture is identical, but the reduced rule corresponding to the two is also different.So when classifying to picture, need
Picture format and dimension of picture are obtained simultaneously, then compressed picture is treated according to the preset criteria for classifying and classifies, draw here
The classification got is finer, and the picture/mb-type divided is also more.In one embodiment, the type divided has 36
Kind.
In one embodiment, the picture format for including in characteristic parameter is obtained, according to picture format and dimension of picture pair
Picture to be compressed is classified, and the step of obtaining picture/mb-type corresponding with picture to be compressed includes:It is wrapped according in characteristic parameter
The picture format contained determines master map sheet type corresponding with picture format, includes multiple subgraph sheet types in master map sheet type;
According to dimension of picture subgraph corresponding with picture to be compressed is matched to from the multiple subgraph sheet types for including in master map sheet type
Sheet type.
Wherein, in order to more accurately be compressed with loss rate and compressed format to best for picture match to be compressed, first will
Picture carries out finer division.First, picture is divided by multiple master map sheet types according to picture format, i.e., be first divided into several
A major class.Then it is (i.e. small multiple subgraph sheet types to be further subdivided into according to the size of dimension of picture under each master map sheet type
Class).By be arranged corresponding with each subgraph sheet type reduced rule be conducive to more accurately for each picture match most
Good reduced rule is then matched to and best is compressed with loss rate and compressed format.
As shown in figure 4, in one embodiment it is proposed that a kind of picture compression method, this method include:
Step 402, obtain picture to be compressed, extract the characteristic parameter of picture to be compressed, characteristic parameter include picture format,
Dimension of picture, picture size, number of colours and transparent attribute.
Wherein, characteristic parameter refers to the parameter for indicating picture feature attribute, including picture format, dimension of picture, figure
Piece size, number of colours and transparent attribute.Dimension of picture refers to the length of picture and wide product, and the length and width of dimension of picture is
It is to be indicated with photo resolution, for example, the picture of 640X480 as unit of pixel.Picture size refers to shared by picture
With the size of memory space, for example, 1KB.Number of colours refers to the number of possessed color in all pixels point for including in picture
Amount, each pixel is indicated by one group of numerical value, traverses all pixels point in the picture, the complete phase of this group of numerical value
Together, then it represents that identical color is classified as a kind of color, if it is different, then indicating different colors, color value increases by one
Kind, thus obtain the number of colours for including in picture.Transparent attribute refer in picture whether there is transparent pixel, if
There are transparent pixels in picture, then illustrate that picture is that translucent picture then illustrates if there is no transparent pixel
Picture is completely opaque.
Step 404, characteristic parameter is combined as feature vector, using feature vector as the picture classification model trained
Input, the picture to be compressed for obtaining output corresponding are compressed with loss rate and compressed format.
Wherein, it is compressed with the loss rate mass loss front and back for indicating compression.The matter being compressed with after loss rate=compression losses
Amount and the mass ratio before compression.For example, the lossy compression of selection 80%, that is, represent the quality of loss 20%.Be compressed with loss rate with
Compression ratio is inversely proportional, that is, is compressed with that loss rate is smaller, illustrates that the bigger of mass loss, corresponding compression ratio are higher.If it is lossless
Compression, then it is 100% to be compressed with loss rate accordingly, i.e. free of losses.Compressed format refers to the Format Type that compression uses, than
Such as, SVG formats, jpeg format etc..Specifically, the feature for including in characteristic parameter and corresponding characteristic value combinations are formed into spy
Sign vector.For example, according to (picture format, dimension of picture, picture size, number of colours, whether transparent) such sequence combination shape
Cheng represents the feature vector of the picture feature to be compressed.Then using feature vector as the defeated of the picture classification model trained
Enter, then exports that picture to be compressed is corresponding to be compressed with loss rate and compressed format.By regarding characteristic parameter as picture classification mould
The object of type study, obtains the characteristic parameter of picture by Training and is compressed with the relationship of loss rate and compressed format, so
Afterwards using the relationship learnt it is corresponding to new picture to be compressed it is best be compressed with loss rate and compressed format is predicted, from
And compression ratio is improved under the premise of ensureing subjective quality, to save memory space.
Step 406, it obtains and is compressed with loss rate and the corresponding compression processing algorithm of compressed format.
Wherein, different to be compressed with loss rate and compressed format corresponds to different compression processing algorithms.It pre-establishes and is compressed with
Correspondence between loss rate and compressed format and compression processing algorithm.Compression processing algorithm refers to preset compressed logic rule
It then, can be directly using the existing compression processing algorithm for being compressed with loss rate and compressed format for difference.Intelligently select
Using which kind of compression processing algorithm to carrying out compression processing to treat compressed picture.
Step 408, compressed picture is treated according to compression processing algorithm and carries out compression processing.
Wherein, compression processing algorithm refers to carrying out compression processing to picture according to be compressed with loss rate and the compressed format of setting
Algorithm.By be intelligently according to the characteristic parameter of picture picture selection it is best be compressed with loss rate and compressed format, so as to
That picture is improved under the premise of ensureing subjective quality is compressed with loss rate, to reduce the occupied space of picture.
Above-mentioned picture compression method, by extracting the characteristic parameter of picture to be compressed, characteristic parameter includes picture format, figure
Chip size, picture size, number of colours and transparent attribute.Then characteristic parameter is combined as feature vector, this feature vector is made
For the input for the picture classification model trained, the picture to be compressed for then obtaining output corresponding is compressed with loss rate and compression lattice
Formula then obtains and is compressed with loss rate and the corresponding compression processing algorithm of compressed format, according to compression processing algorithm to be compressed
Picture carries out compression processing.In this process by regarding the feature vector being made of characteristic parameter as trained picture point
The input of class model, you can to obtain the best premise for being compressed with loss rate and compressed format, realizing in guarantee subjective quality
The lower compression ratio for improving picture, saves the occupancy of memory space.
As shown in figure 5, in one embodiment, above-mentioned picture compression method further includes:Picture classification model is established, is established
Picture classification model includes the following steps:
Step 502, training sample picture is obtained, the training characteristics parameter of training sample picture is extracted, forms training characteristics
Vector.
Wherein, as process when prediction, the training characteristics parameter of training sample picture, training characteristics are extracted first
Parameter includes picture format, dimension of picture, picture size, number of colours and transparent attribute.It is formed and is trained according to training characteristics parameter
Feature vector.
Step 504, the mark for being compressed with loss rate and compressed format corresponding with training sample picture is obtained.
Wherein, acquisition is corresponding with training sample picture is compressed with loss rate and compressed format, i.e., to training sample picture pair
The optimal compression answered has loss rate and compressed format as known label.Convenient for subsequently carrying out the study for having supervision.
Step 506, using training feature vector as the input of picture classification model, loss rate and compression are compressed with by corresponding
The mark of format is trained picture classification model as the desired output of picture classification model, obtains Target Photo classification
Model.
Wherein, by the way that the training feature vector for representing training sample picture feature to be used as to the input of picture classification model,
Using known corresponding with the training sample picture best loss rate and compressed format are compressed with as desired output, by having
The training of supervision determines each weight parameter for including in picture classification model, to obtain Target Photo disaggregated model.Picture
Linear regression model (LRM) may be used in the training of disaggregated model, can also change using decision-tree model, can certainly use other
Machine learning method is trained, for example, deep neural network model, Recognition with Recurrent Neural Network model etc..
It should be understood that although each step in the flow chart of Fig. 2 to 5 is shown successively according to the instruction of arrow,
Be these steps it is not that the inevitable sequence indicated according to arrow executes successively.Unless expressly stating otherwise herein, these steps
There is no stringent sequences to limit for rapid execution, these steps can execute in other order.Moreover, in Fig. 2 to 5 at least
A part of step may include that either these sub-steps of multiple stages or stage are not necessarily in same a period of time to multiple sub-steps
Quarter executes completion, but can execute at different times, the execution in these sub-steps or stage be sequentially also not necessarily according to
Secondary progress, but can either the sub-step of other steps or at least part in stage in turn or replace with other steps
Ground executes.
As shown in fig. 6, in one embodiment it is proposed that a kind of picture compression device, the device include:
Characteristic parameter acquisition module 602, the characteristic parameter for obtaining picture to be compressed.
Sort module 604, for being classified to the picture to be compressed according to the dimension of picture in the characteristic parameter,
Obtain picture/mb-type corresponding with the picture to be compressed.
Determining module 606, for obtaining reduced rule corresponding with the picture/mb-type, according to the characteristic parameter and institute
It states reduced rule and determines and corresponding with the picture to be compressed be compressed with loss rate and compressed format.
Algorithm acquisition module 608 is compressed with loss rate and the corresponding compression processing of the compressed format for obtaining with described
Algorithm.
Compression module 610, for carrying out compression processing to the picture to be compressed according to the compression processing algorithm.
In one embodiment, the sort module 604 is additionally operable to preset when the dimension of picture is less than or equal to first
When size, the picture to be compressed is determined as first kind picture;When the dimension of picture is more than the first pre-set dimension and small
When the second pre-set dimension, the picture to be compressed is determined as Second Type picture;When the dimension of picture is greater than or equal to
When the second pre-set dimension, the picture to be compressed is determined as third type picture.
In one embodiment, the characteristic parameter further includes picture size, number of colours and transparent attribute;The determining mould
Block 606 is additionally operable to obtain reduced rule corresponding with the picture/mb-type, the reduced rule and the picture size, number of colours
It is associated with transparent attribute;It is determined according to the picture size, number of colours and transparent attribute and the reduced rule and waits pressing with described
Contract drawing piece is corresponding to be compressed with loss rate and compressed format.
In one embodiment, the sort module 604 is additionally operable to obtain the picture format for including in characteristic parameter, according to
The picture format and dimension of picture classify to the picture to be compressed, obtain picture corresponding with the picture to be compressed
Type.
In one embodiment, the sort module 604 is additionally operable to be determined according to the picture format for including in characteristic parameter
Master map sheet type corresponding with the picture format includes multiple subgraph sheet types in the master map sheet type;According to described
Dimension of picture is matched to corresponding with the picture to be compressed from the multiple subgraph sheet types for including in the master map sheet type
Subgraph sheet type.
As shown in fig. 7, in one embodiment it is proposed that a kind of picture compression device, the device include:
Extraction module 702 extracts the characteristic parameter of the picture to be compressed, the feature for obtaining picture to be compressed
Parameter includes picture format, dimension of picture, picture size, number of colours and transparent attribute.
Output module 704, for the characteristic parameter to be combined as feature vector, using described eigenvector as having trained
Picture classification model input, the picture to be compressed for obtaining output corresponding is compressed with loss rate and compressed format.
Compression algorithm acquisition module 706 is compressed with loss rate and the corresponding compression of the compressed format for obtaining with described
Processing Algorithm.
Compressing processing module 708, for carrying out compression processing to the picture to be compressed according to the compression processing algorithm.
As shown in figure 8, in one embodiment, above-mentioned picture compression device further includes:
Model building module 701 extracts the training characteristics ginseng of the training sample picture for obtaining training sample picture
Number forms training feature vector;Obtain the mark for being compressed with loss rate and compressed format corresponding with the training sample picture;It will
Input of the training feature vector as the picture classification model, by the corresponding mark for being compressed with loss rate and compressed format
Desired output as the picture classification model is trained the picture classification model, obtains Target Photo classification mould
Type.
Specific about picture compression device limits the restriction that may refer to above for picture compression method, herein not
It repeats again.Modules in above-mentioned picture compression device can be realized fully or partially through software, hardware and combinations thereof.On
Stating each module can be embedded in or independently of in the processor in computer equipment, can also store in a software form in the form of hardware
In memory in computer equipment, the corresponding operation of the above modules is executed in order to which processor calls.
In one embodiment, a kind of computer equipment is provided, which can be terminal, can also be clothes
Business device, internal structure chart can be as shown in Figure 9.The computer equipment includes the processor connected by system bus, stores
Device and network interface.Wherein, the processor of the computer equipment is for providing calculating and control ability.The computer equipment is deposited
Reservoir includes non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system and computer journey
Sequence.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The calculating
The network interface of machine equipment is used to communicate by network connection with external terminal.When the computer program is executed by processor with
Realize a kind of picture compression method.
It will be understood by those skilled in the art that structure shown in Fig. 9, is only tied with the relevant part of application scheme
The block diagram of structure does not constitute the restriction for the computer equipment being applied thereon to application scheme, specific computer equipment
May include either combining certain components than more or fewer components as shown in the figure or being arranged with different components.
In one embodiment, a kind of computer equipment is provided, including memory, processor and storage are on a memory
And the computer program that can be run on a processor, processor realize following steps when executing computer program:It obtains to be compressed
The characteristic parameter of picture;Classified to the picture to be compressed according to the dimension of picture in the characteristic parameter, is obtained and institute
State the corresponding picture/mb-type of picture to be compressed;Reduced rule corresponding with the picture/mb-type is obtained, according to the characteristic parameter
It is determined with the reduced rule and corresponding with the picture to be compressed is compressed with loss rate and compressed format;Acquisition is compressed with described
Loss rate and the corresponding compression processing algorithm of the compressed format;The picture to be compressed is carried out according to the compression processing algorithm
Compression processing.
In one embodiment, the dimension of picture according in the characteristic parameter divides the picture to be compressed
Class, the step of obtaining picture/mb-type corresponding with the picture to be compressed include:When the dimension of picture is less than or equal to first
When pre-set dimension, the picture to be compressed is determined as first kind picture;When the dimension of picture is more than the first pre-set dimension
And when less than the second pre-set dimension, the picture to be compressed is determined as Second Type picture;Be more than when the dimension of picture or
When equal to the second pre-set dimension, the picture to be compressed is determined as third type picture.
In one embodiment, the characteristic parameter further includes picture size, number of colours and transparent attribute;It is described acquisition with
The corresponding reduced rule of the picture/mb-type, determines and the picture to be compressed according to the characteristic parameter and the reduced rule
Corresponding the step of being compressed with loss rate and compressed format includes:Obtain reduced rule corresponding with the picture/mb-type, the pressure
Contraction ga(u)ge is then associated with the picture size, number of colours and transparent attribute;According to the picture size, number of colours and transparent attribute and
The reduced rule determination is corresponding with the picture to be compressed to be compressed with loss rate and compressed format.
In one embodiment, the dimension of picture according in the characteristic parameter divides the picture to be compressed
Class, the step of obtaining picture/mb-type corresponding with the picture to be compressed include:The picture format for including in characteristic parameter is obtained,
Classified to the picture to be compressed according to the picture format and dimension of picture, is obtained corresponding with the picture to be compressed
Picture/mb-type.
In one embodiment, described to obtain the picture format for including in characteristic parameter, according to the picture format and figure
Chip size classifies to the picture to be compressed, and the step of obtaining picture/mb-type corresponding with the picture to be compressed includes:
Master map sheet type corresponding with the picture format, the main picture are determined according to the picture format for including in the characteristic parameter
Include multiple subgraph sheet types in type;The multiple sub-pictures for including from the master map sheet type according to the dimension of picture
Subgraph sheet type corresponding with the picture to be compressed is matched in type.
In one embodiment, a kind of computer equipment is provided, including memory, processor and storage are on a memory
And the computer program that can be run on a processor, processor realize following steps when executing computer program:It obtains to be compressed
Picture, extracts the characteristic parameter of the picture to be compressed, the characteristic parameter include picture format, dimension of picture, picture size,
Number of colours and transparent attribute;The characteristic parameter is combined as feature vector, using described eigenvector as the picture trained
The input of disaggregated model, the picture to be compressed for obtaining output corresponding are compressed with loss rate and compressed format;Obtain with it is described
It is compressed with loss rate and the corresponding compression processing algorithm of the compressed format;According to the compression processing algorithm to the figure to be compressed
Piece carries out compression processing.
In one embodiment, the processor is additionally operable to execute following steps:Training sample picture is obtained, described in extraction
The training characteristics parameter of training sample picture forms training feature vector;Obtain compression corresponding with the training sample picture
There is the mark of loss rate and compressed format;It, will be corresponding using the training feature vector as the input of the picture classification model
The desired output of the mark of loss rate and compressed format as the picture classification model is compressed with to the picture classification model
It is trained, obtains Target Photo disaggregated model.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated
Machine program realizes following steps when being executed by processor:Obtain the characteristic parameter of picture to be compressed;According in the characteristic parameter
Dimension of picture classify to the picture to be compressed, obtain picture/mb-type corresponding with the picture to be compressed;Obtain with
The corresponding reduced rule of the picture/mb-type, determines and the picture to be compressed according to the characteristic parameter and the reduced rule
It is corresponding to be compressed with loss rate and compressed format;It obtains and is compressed with loss rate and the compressed format corresponding compression processing calculation with described
Method;Compression processing is carried out to the picture to be compressed according to the compression processing algorithm.
In one embodiment, the dimension of picture according in the characteristic parameter divides the picture to be compressed
Class, the step of obtaining picture/mb-type corresponding with the picture to be compressed include:When the dimension of picture is less than or equal to first
When pre-set dimension, the picture to be compressed is determined as first kind picture;When the dimension of picture is more than the first pre-set dimension
And when less than the second pre-set dimension, the picture to be compressed is determined as Second Type picture;Be more than when the dimension of picture or
When equal to the second pre-set dimension, the picture to be compressed is determined as third type picture.
In one embodiment, the characteristic parameter further includes picture size, number of colours and transparent attribute;It is described acquisition with
The corresponding reduced rule of the picture/mb-type, determines and the picture to be compressed according to the characteristic parameter and the reduced rule
Corresponding the step of being compressed with loss rate and compressed format includes:Obtain reduced rule corresponding with the picture/mb-type, the pressure
Contraction ga(u)ge is then associated with the picture size, number of colours and transparent attribute;According to the picture size, number of colours and transparent attribute and
The reduced rule determination is corresponding with the picture to be compressed to be compressed with loss rate and compressed format.
In one embodiment, the dimension of picture according in the characteristic parameter divides the picture to be compressed
Class, the step of obtaining picture/mb-type corresponding with the picture to be compressed include:The picture format for including in characteristic parameter is obtained,
Classified to the picture to be compressed according to the picture format and dimension of picture, is obtained corresponding with the picture to be compressed
Picture/mb-type.
In one embodiment, described to obtain the picture format for including in characteristic parameter, according to the picture format and figure
Chip size classifies to the picture to be compressed, and the step of obtaining picture/mb-type corresponding with the picture to be compressed includes:
Master map sheet type corresponding with the picture format, the main picture are determined according to the picture format for including in the characteristic parameter
Include multiple subgraph sheet types in type;The multiple sub-pictures for including from the master map sheet type according to the dimension of picture
Subgraph sheet type corresponding with the picture to be compressed is matched in type.
In one embodiment, in one embodiment, a kind of computer readable storage medium is provided, is stored thereon with
Computer program realizes following steps when computer program is executed by processor:Picture to be compressed is obtained, extraction is described to be compressed
The characteristic parameter of picture, the characteristic parameter include picture format, dimension of picture, picture size, number of colours and transparent attribute;It will
The characteristic parameter is combined as feature vector, using described eigenvector as the input for the picture classification model trained, obtains
The picture to be compressed of output is corresponding to be compressed with loss rate and compressed format;It obtains and is compressed with loss rate and the compression with described
The corresponding compression processing algorithm of format;Compression processing is carried out to the picture to be compressed according to the compression processing algorithm.
In one embodiment, the processor is additionally operable to execute following steps:Training sample picture is obtained, described in extraction
The training characteristics parameter of training sample picture forms training feature vector;Obtain compression corresponding with the training sample picture
There is the mark of loss rate and compressed format;It, will be corresponding using the training feature vector as the input of the picture classification model
The desired output of the mark of loss rate and compressed format as the picture classification model is compressed with to the picture classification model
It is trained, obtains Target Photo disaggregated model.
One of ordinary skill in the art will appreciate that realizing all or part of flow in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer
In read/write memory medium, the computer program is when being executed, it may include such as the flow of the embodiment of above-mentioned each method.Wherein,
Any reference to memory, storage, database or other media used in each embodiment provided herein,
Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM
(PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include
Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms,
Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing
Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM
(RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above example can be combined arbitrarily, to keep description succinct, not to above-described embodiment
In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance
Shield is all considered to be the range of this specification record.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously
It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art
It says, under the premise of not departing from the application design, various modifications and improvements can be made, these belong to the protection of the application
Range.Therefore, the protection domain of the application patent should be determined by the appended claims.
Claims (10)
1. a kind of picture compression method, the method includes:
Obtain the characteristic parameter of picture to be compressed;
Classified to the picture to be compressed according to the dimension of picture in the characteristic parameter, is obtained and the picture to be compressed
Corresponding picture/mb-type;
Obtain corresponding with picture/mb-type reduced rule, according to the characteristic parameter and reduced rule determination with it is described
Picture to be compressed is corresponding to be compressed with loss rate and compressed format;
It obtains and is compressed with loss rate and the corresponding compression processing algorithm of the compressed format with described;
Compression processing is carried out to the picture to be compressed according to the compression processing algorithm.
2. according to the method described in claim 1, it is characterized in that, the dimension of picture according in the characteristic parameter is to institute
The step of stating picture to be compressed to classify, obtaining picture/mb-type corresponding with the picture to be compressed include:
When the dimension of picture is less than or equal to the first pre-set dimension, the picture to be compressed is determined as first kind figure
Piece;
When the dimension of picture is more than the first pre-set dimension and is less than the second pre-set dimension, the picture to be compressed is determined as
Second Type picture;
When the dimension of picture is greater than or equal to the second pre-set dimension, the picture to be compressed is determined as third type map
Piece.
3. according to the method described in claim 1, it is characterized in that, the characteristic parameter further include picture size, number of colours and
Transparent attribute;
It is described to obtain corresponding with picture/mb-type reduced rule, determined according to the characteristic parameter and the reduced rule and
The picture to be compressed corresponding the step of being compressed with loss rate and compressed format includes:
Obtain corresponding with picture/mb-type reduced rule, the reduced rule and the picture size, number of colours and transparent
Attribute Association;
It is determined according to the picture size, number of colours and transparent attribute and the reduced rule corresponding with the picture to be compressed
It is compressed with loss rate and compressed format.
4. according to the method described in claim 1, it is characterized in that, the dimension of picture according in the characteristic parameter is to institute
The step of stating picture to be compressed to classify, obtaining picture/mb-type corresponding with the picture to be compressed include:
Obtain the picture format for including in characteristic parameter, according to the picture format and dimension of picture to the picture to be compressed into
Row classification obtains picture/mb-type corresponding with the picture to be compressed.
5. according to the method described in claim 4, it is characterized in that, described obtain the picture format for including in characteristic parameter, root
Classify to the picture to be compressed according to the picture format and dimension of picture, obtains figure corresponding with the picture to be compressed
The step of sheet type includes:
Master map sheet type corresponding with the picture format, the master are determined according to the picture format for including in the characteristic parameter
Include multiple subgraph sheet types in picture/mb-type;
It is matched to from the multiple subgraph sheet types for including in the master map sheet type according to the dimension of picture and waits pressing with described
The corresponding subgraph sheet type of contract drawing piece.
6. a kind of picture compression method, the method includes:
Picture to be compressed is obtained, extracts the characteristic parameter of the picture to be compressed, the characteristic parameter includes picture format, picture
Size, picture size, number of colours and transparent attribute;
The characteristic parameter is combined as feature vector, using described eigenvector as the defeated of the picture classification model trained
Enter, the picture to be compressed for obtaining output corresponding is compressed with loss rate and compressed format;
It obtains and is compressed with loss rate and the corresponding compression processing algorithm of the compressed format with described;
Compression processing is carried out to the picture to be compressed according to the compression processing algorithm.
7. according to the method described in claim 1, it is characterized in that, the method further includes:
Training sample picture is obtained, the training characteristics parameter of the training sample picture is extracted, forms training feature vector;
Obtain the mark for being compressed with loss rate and compressed format corresponding with the training sample picture;
Using the training feature vector as the input of the picture classification model, loss rate and compressed format are compressed with by corresponding
Mark the picture classification model is trained as the desired output of the picture classification model, obtain Target Photo
Disaggregated model.
8. a kind of picture compression device, described device include:
Characteristic parameter acquisition module, the characteristic parameter for obtaining picture to be compressed;
Sort module, for being classified to the picture to be compressed according to the dimension of picture in the characteristic parameter, obtain with
The corresponding picture/mb-type of the picture to be compressed;
Determining module, for obtaining reduced rule corresponding with the picture/mb-type, according to the characteristic parameter and the compression
Rule determination is corresponding with the picture to be compressed to be compressed with loss rate and compressed format;
Algorithm acquisition module is compressed with loss rate and the corresponding compression processing algorithm of the compressed format for obtaining with described;
Compression module, for carrying out compression processing to the picture to be compressed according to the compression processing algorithm.
9. a kind of computer equipment, including memory, processor and storage are on a memory and the meter that can run on a processor
Calculation machine program, which is characterized in that the processor, which is realized when executing the computer program in claim 1 to 5 or 6 to 7, appoints
The step of one the method.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program
The step of method described in any one of claim 1 to 5 or 6 to 7 is realized when being executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810124554.0A CN108399052B (en) | 2018-02-07 | 2018-02-07 | Picture compression method and device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810124554.0A CN108399052B (en) | 2018-02-07 | 2018-02-07 | Picture compression method and device, computer equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108399052A true CN108399052A (en) | 2018-08-14 |
CN108399052B CN108399052B (en) | 2021-05-14 |
Family
ID=63096090
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810124554.0A Active CN108399052B (en) | 2018-02-07 | 2018-02-07 | Picture compression method and device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108399052B (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109167919A (en) * | 2018-10-11 | 2019-01-08 | 北京文香信息技术有限公司 | A kind of picture compression method and device |
CN109685861A (en) * | 2018-08-31 | 2019-04-26 | 深圳壹账通智能科技有限公司 | Picture compression method, apparatus, equipment and computer readable storage medium |
CN109685714A (en) * | 2018-08-31 | 2019-04-26 | 深圳壹账通智能科技有限公司 | Picture compression method, apparatus, equipment and computer readable storage medium |
CN109918427A (en) * | 2019-01-16 | 2019-06-21 | 平安普惠企业管理有限公司 | Picture uploads control method, device, computer equipment and storage medium |
CN110555120A (en) * | 2019-08-14 | 2019-12-10 | 平安普惠企业管理有限公司 | picture compression control method and device, computer equipment and storage medium |
CN110555816A (en) * | 2019-09-09 | 2019-12-10 | 珠海金山网络游戏科技有限公司 | Picture processing method and device, computing equipment and storage medium |
CN111009017A (en) * | 2019-10-18 | 2020-04-14 | 珠海格力电器股份有限公司 | Picture compression method and device, storage medium and computer equipment |
CN111047657A (en) * | 2019-11-26 | 2020-04-21 | 深圳壹账通智能科技有限公司 | Picture compression method, device, medium and electronic equipment |
CN111260739A (en) * | 2018-11-30 | 2020-06-09 | 中移(杭州)信息技术有限公司 | Picture processing method and device |
CN111558222A (en) * | 2020-04-08 | 2020-08-21 | 完美世界(北京)软件科技发展有限公司 | Illumination map compression method, device and equipment |
CN113486939A (en) * | 2021-06-30 | 2021-10-08 | 平安证券股份有限公司 | Method, device, terminal and storage medium for processing pictures |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2010023397A1 (en) * | 2008-08-28 | 2010-03-04 | Centre National D'etudes Spatiales (Cnes) | Compression of earth observation satellite images |
CN102957906A (en) * | 2011-08-29 | 2013-03-06 | 广州九游信息技术有限公司 | Method and system for image classifying compression |
CN103886623A (en) * | 2012-12-19 | 2014-06-25 | 华为技术有限公司 | Image compression method and equipment, and system |
CN105844588A (en) * | 2016-03-17 | 2016-08-10 | 广州筷子信息科技有限公司 | Method and system for intelligent scalable compression of creative images |
CN106717006A (en) * | 2014-07-24 | 2017-05-24 | 简·克劳德·科林 | Method for choosing a compression algorithm depending on the image type |
-
2018
- 2018-02-07 CN CN201810124554.0A patent/CN108399052B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2010023397A1 (en) * | 2008-08-28 | 2010-03-04 | Centre National D'etudes Spatiales (Cnes) | Compression of earth observation satellite images |
CN102957906A (en) * | 2011-08-29 | 2013-03-06 | 广州九游信息技术有限公司 | Method and system for image classifying compression |
CN103886623A (en) * | 2012-12-19 | 2014-06-25 | 华为技术有限公司 | Image compression method and equipment, and system |
CN106717006A (en) * | 2014-07-24 | 2017-05-24 | 简·克劳德·科林 | Method for choosing a compression algorithm depending on the image type |
CN105844588A (en) * | 2016-03-17 | 2016-08-10 | 广州筷子信息科技有限公司 | Method and system for intelligent scalable compression of creative images |
Cited By (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109685861A (en) * | 2018-08-31 | 2019-04-26 | 深圳壹账通智能科技有限公司 | Picture compression method, apparatus, equipment and computer readable storage medium |
CN109685714A (en) * | 2018-08-31 | 2019-04-26 | 深圳壹账通智能科技有限公司 | Picture compression method, apparatus, equipment and computer readable storage medium |
CN109685714B (en) * | 2018-08-31 | 2023-06-06 | 深圳壹账通智能科技有限公司 | Picture compression method, device, equipment and computer readable storage medium |
CN109685861B (en) * | 2018-08-31 | 2022-03-15 | 深圳壹账通智能科技有限公司 | Picture compression method, device and equipment and computer readable storage medium |
CN109167919A (en) * | 2018-10-11 | 2019-01-08 | 北京文香信息技术有限公司 | A kind of picture compression method and device |
CN109167919B (en) * | 2018-10-11 | 2020-05-15 | 北京文香信息技术有限公司 | Picture compression method and device |
CN111260739A (en) * | 2018-11-30 | 2020-06-09 | 中移(杭州)信息技术有限公司 | Picture processing method and device |
CN111260739B (en) * | 2018-11-30 | 2023-07-21 | 中移(杭州)信息技术有限公司 | Picture processing method and device |
CN109918427A (en) * | 2019-01-16 | 2019-06-21 | 平安普惠企业管理有限公司 | Picture uploads control method, device, computer equipment and storage medium |
CN110555120A (en) * | 2019-08-14 | 2019-12-10 | 平安普惠企业管理有限公司 | picture compression control method and device, computer equipment and storage medium |
CN110555120B (en) * | 2019-08-14 | 2023-09-08 | 项宇 | Picture compression control method, device, computer equipment and storage medium |
CN110555816B (en) * | 2019-09-09 | 2021-10-29 | 珠海金山网络游戏科技有限公司 | Picture processing method and device, computing equipment and storage medium |
CN110555816A (en) * | 2019-09-09 | 2019-12-10 | 珠海金山网络游戏科技有限公司 | Picture processing method and device, computing equipment and storage medium |
CN111009017B (en) * | 2019-10-18 | 2021-08-17 | 珠海格力电器股份有限公司 | Picture compression method and device, storage medium and computer equipment |
CN111009017A (en) * | 2019-10-18 | 2020-04-14 | 珠海格力电器股份有限公司 | Picture compression method and device, storage medium and computer equipment |
CN111047657A (en) * | 2019-11-26 | 2020-04-21 | 深圳壹账通智能科技有限公司 | Picture compression method, device, medium and electronic equipment |
CN111558222A (en) * | 2020-04-08 | 2020-08-21 | 完美世界(北京)软件科技发展有限公司 | Illumination map compression method, device and equipment |
CN111558222B (en) * | 2020-04-08 | 2023-11-24 | 完美世界(北京)软件科技发展有限公司 | Method, device and equipment for compressing illumination graph |
CN113486939A (en) * | 2021-06-30 | 2021-10-08 | 平安证券股份有限公司 | Method, device, terminal and storage medium for processing pictures |
Also Published As
Publication number | Publication date |
---|---|
CN108399052B (en) | 2021-05-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108399052A (en) | Picture compression method, apparatus, computer equipment and storage medium | |
CN108830855B (en) | Full convolution network semantic segmentation method based on multi-scale low-level feature fusion | |
CN110334585A (en) | Table recognition method, apparatus, computer equipment and storage medium | |
CN110163235A (en) | Training, image enchancing method, device and the storage medium of image enhancement model | |
CN108765425B (en) | Image segmentation method and device, computer equipment and storage medium | |
CN110163197A (en) | Object detection method, device, computer readable storage medium and computer equipment | |
CN103210401B (en) | In order to improve the system and method that the feature in process identification produces | |
CN111881913A (en) | Image recognition method and device, storage medium and processor | |
CN109063737A (en) | Image processing method, device, storage medium and mobile terminal | |
CN109299094A (en) | Tables of data processing method, device, computer equipment and storage medium | |
CN110188217A (en) | Image duplicate checking method, apparatus, equipment and computer-readable storage media | |
CN110852288A (en) | Cell image classification method based on two-stage convolutional neural network | |
CN103366178A (en) | Method and device for carrying out color classification on target image | |
CN108875797A (en) | A kind of method of determining image similarity, photograph album management method and relevant device | |
CN113762138A (en) | Method and device for identifying forged face picture, computer equipment and storage medium | |
Wang et al. | PalGAN: Image colorization with palette generative adversarial networks | |
CN112132279A (en) | Convolutional neural network model compression method, device, equipment and storage medium | |
CN110599554A (en) | Method and device for identifying face skin color, storage medium and electronic device | |
CN106886789A (en) | A kind of image recognition sorter and method | |
CN111784665A (en) | OCT image quality assessment method, system and device based on Fourier transform | |
CN115482529A (en) | Method, equipment, storage medium and device for recognizing fruit image in near scene | |
CN112085094A (en) | Document image reproduction detection method and device, computer equipment and storage medium | |
Zhang et al. | Shallow-and Deep-fake Image Manipulation Localization Using Deep Learning | |
CN112950453B (en) | Image processing method and image processing apparatus | |
Singh et al. | Performance analysis of ELA-CNN model for image forgery detection |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |