CN109376762A - Image processing method and device - Google Patents

Image processing method and device Download PDF

Info

Publication number
CN109376762A
CN109376762A CN201811067307.8A CN201811067307A CN109376762A CN 109376762 A CN109376762 A CN 109376762A CN 201811067307 A CN201811067307 A CN 201811067307A CN 109376762 A CN109376762 A CN 109376762A
Authority
CN
China
Prior art keywords
image
algorithm
compression
target
compression algorithm
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.)
Pending
Application number
CN201811067307.8A
Other languages
Chinese (zh)
Inventor
范志刚
杨文晋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian Wanxiang Electronics Technology Co Ltd
Original Assignee
Xian Wanxiang Electronics Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Xian Wanxiang Electronics Technology Co Ltd filed Critical Xian Wanxiang Electronics Technology Co Ltd
Priority to CN201811067307.8A priority Critical patent/CN109376762A/en
Publication of CN109376762A publication Critical patent/CN109376762A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The disclosure provides a kind of image processing method and device, is related to technical field of image processing, is able to solve the single image compression algorithm problem not good enough to different classes of image compression quality.The specific technical proposal is: obtaining target image;By neural network classification model, the image category of the target image is determined;Target algorithm is determined according to preset mapping data;The target image is compressed according to the target algorithm.The disclosure is used for image procossing.

Description

Image processing method and device
Technical field
This disclosure relates to technical field of image processing more particularly to image processing method and device.
Background technique
The usual color of natural image is uniformly excessive, is not in the image information of step change type.Therefore logical for natural image Compression of images is carried out frequently with the mode of prediction plus frequency-domain transform, preferable compression quality can be obtained.
Different from natural image, it is artificially generated the characteristics of image has oneself.It is that noise is controllable first, nothing can be generated and make an uproar Image;Secondly, including a large amount of high gradient signal, such as text, lines in image.Frequency domain is added to become according to traditional prediction The mode changed compresses these high gradient images, and relative to natural image, often compression effectiveness is not good enough.
As it can be seen that a kind of image compression algorithm good compression quality available for the image of a certain classification, but for Then compression quality cannot be guaranteed the image of another category.
Summary of the invention
The embodiment of the present disclosure provides a kind of image processing method and device, is able to solve single image compression algorithm to difference The problem that the image compression quality of classification is not good enough.The technical solution is as follows:
According to the first aspect of the embodiments of the present disclosure, a kind of image processing method is provided, this method comprises:
Obtain target image;
By neural network classification model, the image category of the target image is determined;
Target algorithm is determined according to preset mapping data;
Wherein, the mapping data are used to indicate K image category and L compression algorithm, 2≤L≤K, the K image An image category corresponds to a compression algorithm in the L compression algorithm in classification, i-th in the K image category Compression algorithm corresponding to image category is in the L compression algorithm to i-th of optimal compression of image category compression quality Algorithm, the target algorithm are compression algorithm corresponding to the image category of the target image, 1≤i≤K;
The target image is compressed according to the target algorithm.
Technical solution provided by the present disclosure determines the image category of target image by neural network classification model, according to Image category selects one as target algorithm from K compression algorithm, and target algorithm is in K compression algorithm to the image class The other optimal compression algorithm of compression quality, after determining target algorithm, compresses target image according to target algorithm.I.e. According to image category, the optimal compression algorithm of compression quality is selected from K compression algorithm, target image is compressed, solve The problem that single image compression algorithm of having determined is not good enough to different classes of image compression quality.
In one embodiment, further includes:
Training sample is obtained, determines canonical algorithm corresponding to each sample image in the training sample;Wherein, one Canonical algorithm corresponding to sample image is in the L compression algorithm to one optimal pressure of sample image compression quality Compression algorithm;
The training neural network classification model, the sample image that same canonical algorithm is corresponded in the training sample is returned For one kind.
The sample image of the same canonical algorithm of correspondence is classified as one kind, the quantity of image category can be reduced as far as possible, is improved The classification effectiveness to target image of neural network classification model.
In one embodiment, K=L, the K image category and the L compression algorithm correspond;
It is described to determine target algorithm according to preset mapping data, comprising:
According to the one-to-one K compression algorithm of the K image category, the determining image class with the target image Not corresponding compression algorithm.
Image category is identical as compression algorithm quantity, corresponds, the quantity of image category reaches minimum value at this time, into one Step improves the classification effectiveness to target image of neural network classification model.
In one embodiment, canonical algorithm corresponding to each sample image in the determination training sample, packet It includes:
Target sample image is compressed by each compression algorithm in the L compression algorithm respectively, is determined each The corresponding compression quality parameter of compression algorithm;
According to the corresponding compression quality parameter of each compression algorithm, determine that standard corresponding to the target sample image is calculated Method.
For a sample image, is compressed respectively using different compression algorithms, it is corresponding to compare algorithms of different Compression quality determines the optimal compression algorithm of compression quality.Before product export, it can pass through when training neural network classification model This mode determines the corresponding canonical algorithm of sample image.After product export during user's use, in this way Further training optimization can be done to neural network classification model.
In one embodiment, the corresponding compression quality parameter of each compression algorithm of the determination, comprising:
Determine the corresponding compression ratio of each compression algorithm and Y-PSNR it is therein at least one.
In one embodiment, the acquisition target image, comprising:
Image to be compressed is obtained, the image to be compressed is divided into image macro, by the image of the image to be compressed Macro block is as the target image.
Image to be compressed is divided into macro block, then selects suitable compression algorithm to be compressed for each macro block, can be mentioned Compression quality of the height to image entirety to be compressed.
According to the second aspect of an embodiment of the present disclosure, a kind of image processing apparatus is provided, comprising:
Input module, for obtaining target image;
Categorization module, for determining the image category of the target image by neural network classification model;
Chosen module, for determining target algorithm according to preset mapping data;
Wherein, the mapping data are used to indicate K image category and L compression algorithm, 2≤L≤K, the K image An image category corresponds to a compression algorithm in the L compression algorithm in classification, i-th in the K image category Compression algorithm corresponding to image category is in the L compression algorithm to i-th of optimal compression of image category compression quality Algorithm, the target algorithm are compression algorithm corresponding to the image category of the target image, K >=2,1≤i≤K;
Compression module, for being compressed according to the target algorithm to the target image.
In one embodiment, further includes:
Base modules determine standard corresponding to each sample image in the training sample for obtaining training sample Algorithm;Wherein, canonical algorithm corresponding to a sample image is in the L compression algorithm to one sample image pressure The optimal compression algorithm of contracting quality;
Training module will correspond to same standard and calculate for training the neural network classification model in the training sample The sample image of method is classified as one kind.
In one embodiment, K=L, the K image category and the L compression algorithm correspond, described selected Module includes:
Corresponding submodule, for according to and the one-to-one K compression algorithm of the K image category, determine with it is described The corresponding compression algorithm of the image category of target image.
In one embodiment, the base modules include:
Computational submodule, for respectively by each compression algorithm in the L compression algorithm to target sample image into Row compression, determines the corresponding compression quality parameter of each compression algorithm;
Submodule is screened, for determining the target sample figure according to the corresponding compression quality parameter of each compression algorithm As corresponding canonical algorithm.
In one embodiment, the computational submodule includes:
Parameters unit, for determine the corresponding compression ratio of each compression algorithm and Y-PSNR it is therein at least one.
In one embodiment, the input module includes:
Divide submodule, for obtaining image to be compressed, the image to be compressed be divided into image macro, will it is described to The image macro of image is compressed as the target image.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not The disclosure can be limited.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure Example, and together with specification for explaining the principles of this disclosure.
Fig. 1 is a kind of flow chart for image processing method that the embodiment of the present disclosure provides;
Fig. 2 is that the image category that the embodiment of the present disclosure provides and compression algorithm corresponding relationship illustrate schematic diagram;
Fig. 3 is a kind of flow chart for image processing method that the embodiment of the present disclosure provides;
Fig. 4 be the embodiment of the present disclosure provide schematic diagram is illustrated to neural network classification model training process;
Fig. 5 is that the image category that the embodiment of the present disclosure provides and compression algorithm corresponding relationship illustrate schematic diagram;
Fig. 6 be the embodiment of the present disclosure provide schematic diagram is illustrated to image macro treatment process;
Fig. 7 is a kind of structural schematic diagram for image processing apparatus that the embodiment of the present disclosure provides;
Fig. 8 is a kind of structural schematic diagram for image processing apparatus that the embodiment of the present disclosure provides;
Fig. 9 is a kind of structural schematic diagram for image processing apparatus that the embodiment of the present disclosure provides;
Figure 10 is a kind of structural schematic diagram for image processing apparatus that the embodiment of the present disclosure provides;
Figure 11 is a kind of structural schematic diagram for image processing apparatus that the embodiment of the present disclosure provides;
Figure 12 is a kind of structural schematic diagram for image processing apparatus that the embodiment of the present disclosure provides.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
It is different that the compression quality that same image obtains is handled using different compression algorithms.Embodiment of the disclosure provides one kind Image processing method, for an image to be compressed, the compression that can select compression quality optimal from several compression algorithm is calculated Method is compressed, and has solved the problems, such as that single image compression algorithm is not good enough to different classes of image compression quality.
Image processing method is applied to image processing apparatus, which can be applied in the equipment such as mobile phone, computer, TV. As shown in Figure 1, image processing method the following steps are included:
101, target image is obtained.
Target image is the image that need to be compressed by image compression algorithm.
102, by neural network classification model, the image category of target image is determined.
Neural network classification model is trained image classification model.Target image is neural network classification model Input, neural network classification model export the image category of target image.Input picture is divided into K by neural network classification model A image category, K >=2.
In one embodiment, neural network classification model is by L compression algorithm, and wherein a certain compression algorithm can for use The image for obtaining optimal compression quality incorporates one kind, 2≤L≤K into.
Wherein, compression algorithm includes but is not limited to that the compression calculation of compression of images is carried out by way of prediction plus frequency-domain transform Method, for compression algorithm of high gradient image etc..Compression quality can be measured by compression ratio or Y-PSNR.
Referring to shown in Fig. 2, with L=3, for the situation of K=4, compression algorithm includes algorithm A1, algorithm A2And algorithm A3, Image category includes classification C1, classification C2, classification C3With classification C4
Classification C1To use algorithm A1The image category of optimal compression quality can be obtained.
Classification C2To use algorithm A2The image category of optimal compression quality can be obtained.
Classification C3To use algorithm A3The image category of optimal compression quality can be obtained.
Classification C4To use algorithm A3The image category of optimal compression quality can be obtained.
103, target algorithm is determined according to preset mapping data.
Referring to shown in Fig. 2, mapping data are used to indicate K image category and L compression algorithm, one in K image category A image category corresponds to a compression algorithm in L compression algorithm, in K image category corresponding to i-th of image category Compression algorithm is in L compression algorithm to i-th of optimal compression algorithm of image category compression quality, 1≤i≤K.Shown in Fig. 2 For L=3, the situation of K=4.
Target algorithm is compression algorithm corresponding to the image category of target image.Referring to shown in Fig. 2, when target image Image category is classification C1When, target algorithm is algorithm A1
104, target image is compressed according to target algorithm.
Referring to shown in Fig. 2, determine that the image category of target image is C by neural network classification model1When, then according to calculation Method A1Target image is compressed.Relative to algorithm A2With algorithm A3, according to algorithm A1It is available that compression is carried out to target image Better compression quality.
The image processing method that the embodiment of the present disclosure provides, the image of target image is determined by neural network classification model Classification selects one as target algorithm according to image category from K compression algorithm, and target algorithm is in K compression algorithm A compression algorithm optimal to the image category compression quality, after determining target algorithm, according to target algorithm to target image It is compressed.I.e. according to image category, the optimal compression algorithm of compression quality is selected from K compression algorithm, to target image It is compressed, solves the problems, such as that single image compression algorithm is not good enough to different classes of image compression quality.
Based on the image processing method that the corresponding embodiment of above-mentioned Fig. 1 provides, another embodiment of the disclosure provides a kind of figure As processing method.The present embodiment is illustrated so that target image is the situation of image macro as an example, interior in part of step The step held in embodiment corresponding with Fig. 1 is same or like, only elaborates below to difference in step.
Referring to shown in Fig. 3, image processing method provided in this embodiment the following steps are included:
301, training sample is obtained, determines canonical algorithm corresponding to each sample image in training sample.
Training sample includes several sample images, is carried out so that sample image is the situation of image macro as an example in the present embodiment Illustrate, without limitation to the size of image macro.
Canonical algorithm corresponding to one sample image is optimal to the sample image compression quality in L compression algorithm Compression algorithm.L compression algorithm include but is not limited to H.264, H.265, JPEG, YUV etc..
For purposes of illustration only, a sample image in training sample is known as target sample image.
Target sample image is compressed by each compression algorithm in L compression algorithm respectively, determines each compression The corresponding compression quality parameter of algorithm.Further according to the corresponding compression quality parameter of each compression algorithm, target sample image is determined Corresponding canonical algorithm.
Referring to shown in Fig. 4, target sample image is passed through respectively after L compression algorithm compressed, each pressure is obtained The compression quality parameter of compression algorithm.Algorithm A1Corresponding compression quality parameter is with Q1It indicates, algorithm A2Corresponding compression quality Parameter is with Q2It indicates, and so on.The corresponding L compression quality parameter meter of L compression algorithm is { Q1, Q2, Q3... QL}
Compression quality parameter may include compression ratio and Y-PSNR it is therein at least one.Include with compression quality parameter For the situation of compression ratio or Y-PSNR, compression ratio is higher, and expression compression quality is higher, the higher expression pressure of Y-PSNR Contracting quality is higher.By { Q1, Q2, Q3... QLIn algorithm corresponding to maximum value be determined as standard corresponding to target sample image Algorithm.For example, working as Q2For { Q1, Q2, Q3... QLIn maximum value when, determine algorithm A2For mark corresponding to target sample image Quasi- algorithm.
When compression quality parameter includes compression ratio and Y-PSNR, compression quality parameter can be compression ratio and peak value The weighted sum of signal-to-noise ratio.Compression quality parameter is higher, and expression compression quality is higher, by { Q1, Q2, Q3... QLIn maximum value institute Corresponding algorithm is determined as canonical algorithm corresponding to target sample image.
302, training neural network classification model, is classified as one for the sample image for corresponding to same canonical algorithm in training sample Class.
Neural network classification model includes but is not limited to the models such as VGG16, VGG19.In training Holy Bible network class model When, the sample image of the same canonical algorithm of correspondence is classified as one kind, the quantity of image category can be reduced, as far as possible to improve nerve The classification effectiveness to target image of network class model.
Referring to shown in Fig. 4, the feature of neural network classification model extraction target sample image is classified according to feature, The image category for determining target sample image determines image referring to the corresponding relationship of image category shown in Fig. 2 and compression algorithm The corresponding target algorithm of classification.
When the target algorithm of target sample image and canonical algorithm are inconsistent, the ginseng of neural network classification model is corrected Number does further training optimization to neural network classification model.When the target algorithm of target sample image is consistent with canonical algorithm When, indicate that neural network classification model is correct to the classification of target sample image.
For example, the image category for the target sample image that neural network classification model determines is classification C3, it is determined that target Algorithm is algorithm A3.And the canonical algorithm of the target sample image determined in step 301 is algorithm A2.Target algorithm and standard are calculated Method is inconsistent, then neural network classification model does further training optimization.
When the image category for the target sample image that neural network classification model determines is classification C2When, determining target is calculated Method is algorithm A2.The canonical algorithm of the target sample image determined in step 301 is algorithm A2.Target algorithm and canonical algorithm one It causes, neural network classification model is correct to the classification of target sample image.
Input picture is divided into K image category, the smaller neural network classification mould of the value of K by neural network classification model Type is higher to the classification effectiveness of input picture.
The minimum value of K is L, i.e. K=L, and the quantity of image category and the quantity of compression algorithm are equal at this time, are K (L) A, K (L) a image category and K (L) a compression algorithm correspond.
Referring to Figure 5, by taking the situation of K=L=3 as an example, compression algorithm includes algorithm A1, algorithm A2And algorithm A3, figure As classification includes classification C1, classification C2With classification C3.3 image categories are corresponded with 3 compression algorithms.
Step 301- step 302 is the process being trained to neural network classification model.
For target sample image, is compressed respectively using different compression algorithms, it is corresponding to compare algorithms of different Compression quality determines the optimal compression algorithm of compression quality, i.e. canonical algorithm.
By canonical algorithm compared with the target algorithm according to determined by neural network classification model, the two unanimously then indicates mind Correct through network class category of model, the two is inconsistent, does further training optimization to neural network classification model.
Step 301- step 302 can be executed before factory, i.e., prefabricated before product export to have already passed through trained nerve net Network disaggregated model.When executing before factory, training sample is usually the image macro that developer selectes.
Step 301- step 302 can be executed before factory, can be executed in the use process of user after product export, i.e., Further training optimization is done to neural network classification model in user's use process.When being executed in user's use process, instruction Practicing sample is usually actual use process extracted image macro from image to be compressed.
303, image to be compressed is obtained, image to be compressed is divided into image macro.
Step 303 and subsequent step are the mistake for selecting compression algorithm based on neural network classification model and completing compression of images Journey.
According to scheduled macroblock size, image to be compressed is divided into several image macros, by subsequent step to each Macro block completes compression of images.
304, by neural network classification model, the image category of target image is determined.
Referring to shown in Fig. 6, using the image macro of image to be compressed as target image, i.e. mesh neural network classification model Input, the image category of image macro is determined by neural network classification model.
305, target algorithm is determined according to preset mapping data.
In one embodiment, K=L, i.e. K image category are corresponded with K compression algorithm.Determining image category Afterwards, according to image category, determine a compression algorithm corresponding with the image category as target algorithm.
For example, referring to shown in Fig. 5, neural network classification model determines that the image category of image macro is classification C1, then scheme As the corresponding target algorithm of macro block is algorithm A1
306, target image is compressed according to target algorithm.
By taking an image macro as an example, referring to Fig. 5, the image category of the image macro is classification C1, then corresponding target Algorithm is algorithm A1, according to algorithm A1The image macro is compressed.
Referring to shown in Fig. 6, each image macro respectively corresponds to a target algorithm, macro to each image according to target algorithm Block is compressed.
The image processing method that the embodiment of the present disclosure provides, the image of target image is determined by neural network classification model Classification selects the optimal compression algorithm of compression quality from K compression algorithm, presses target image according to image category Contracting, solves the problems, such as that single image compression algorithm is not good enough to different classes of image compression quality.
The compression algorithm for being suitable for image macro is determined by neural network classification model, without for each compression Algorithm goes to determine that its compression quality makes a choice again one by one.Huge, the compression algorithm that determines that compression quality will lead to calculation amount one by one Quantity increase (value of L is bigger) and will lead to calculation amount and increase suddenly.And it can be efficiently from a variety of by neural network classification model Optimal compression algorithm is selected in compression algorithm, greatlys save computing resource, when the quantity of compression algorithm increases, calculation amount increase It is relatively small, therefore the quantity of compression algorithm is more, the effect for saving computing resource is better.
Compression algorithm quantity is bigger, carry out compression of images when alternative compression algorithm it is more, compression of images effect is got over It is good.The image processing method favorable expandability that the disclosure provides only need to be to neural network classification when increasing more compression algorithms Re -training after model is finely tuned, product renewing upgrade cost are small, high-efficient.
In addition, can further train neural network point in user's use process using technical solution provided by the present disclosure Class model continues to optimize neural network classification model, improves the accuracy to image classification, so that the compression improved to image is imitated Fruit.
Further, provided training sample often has differences under different application scene, the skill that the disclosure provides In art scheme, neural network classification model can constantly training optimizes in specific application scenarios, obtains so that the disclosure provided Scheme can be widely applied to plurality of application scenes, obtain optimal compression quality for different crowd, different demands.
Image processing method described in based on the above embodiment, following is embodiment of the present disclosure, be can be used for Execute embodiments of the present disclosure.
The embodiment of the present disclosure provides a kind of image processing apparatus, as shown in fig. 7, the image processing apparatus includes:
Input module 71, for obtaining target image.
Categorization module 72, for determining the image category of target image by neural network classification model.
Chosen module 73, for determining target algorithm according to preset mapping data.
Wherein, mapping data are used to indicate K image category and L compression algorithm, 2≤L≤K, one in K image category A image category corresponds to a compression algorithm in L compression algorithm, in K image category corresponding to i-th of image category Compression algorithm is in L compression algorithm to i-th of optimal compression algorithm of image category compression quality, and target algorithm is target Compression algorithm corresponding to the image category of image, K >=2,1≤i≤K.
Compression module 74, for being compressed according to target algorithm to target image.
As shown in figure 8, in one embodiment, further includes:
Base modules 75 determine that standard corresponding to each sample image is calculated in training sample for obtaining training sample Method.Wherein, canonical algorithm corresponding to a sample image is best to a sample image compression quality in L compression algorithm Compression algorithm.
Training module 76 will correspond to the sample of same canonical algorithm for training neural network classification model in training sample This image is classified as one kind.
As shown in figure 9, in one embodiment, K=L, K image category is corresponded with L compression algorithm, mould is selected Block 73 includes:
Corresponding submodule 731, for basis and the one-to-one K compression algorithm of K image category, determining and target figure The corresponding compression algorithm of the image category of picture.
As shown in Figure 10, in one embodiment, base modules 75 include:
Computational submodule 751, for being carried out respectively by each compression algorithm in L compression algorithm to target sample image Compression, determines the corresponding compression quality parameter of each compression algorithm.
Submodule 752 is screened, for determining target sample image according to the corresponding compression quality parameter of each compression algorithm Corresponding canonical algorithm.
As shown in figure 11, in one embodiment, computational submodule 751 includes:
Parameters unit 753, for determining the corresponding compression ratio of each compression algorithm and Y-PSNR therein at least one It is a.
As shown in figure 12, in one embodiment, input module 71 includes:
It divides submodule 711 and image to be compressed is divided into image macro for obtaining image to be compressed, it will be to be compressed The image macro of image is as target image.
The image processing apparatus that the embodiment of the present disclosure provides, the image of target image is determined by neural network classification model Classification selects one as target algorithm according to image category from K compression algorithm, and target algorithm is in K compression algorithm A compression algorithm optimal to the image category compression quality, after determining target algorithm, according to target algorithm to target image It is compressed.I.e. according to image category, the optimal compression algorithm of compression quality is selected from K compression algorithm, to target image It is compressed, solves the problems, such as that single image compression algorithm is not good enough to different classes of image compression quality.
Based on image processing method described in the corresponding embodiment of above-mentioned Fig. 1-Fig. 6, the embodiment of the present disclosure is also provided A kind of computer readable storage medium.
The computer readable storage medium can be non-transitory computer-readable storage medium.For example, non-transitory calculates Machine readable storage medium storing program for executing can be read-only memory (English: Read Only Memory, ROM), random access memory (English Text: Random Access Memory, RAM), CD-ROM, tape, floppy disk and optical data storage devices etc..On the storage medium It is stored with computer instruction, when computer instruction is performed, it can be achieved that described in the corresponding embodiment of above-mentioned Fig. 1-Fig. 6 Data transmission method, details are not described herein again.
Those skilled in the art will readily occur to its of the disclosure after considering specification and practicing disclosure disclosed herein Its embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or Person's adaptive change follows the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following Claim is pointed out.

Claims (12)

1. a kind of image processing method characterized by comprising
Obtain target image;
By neural network classification model, the image category of the target image is determined;
Target algorithm is determined according to preset mapping data;
Wherein, the mapping data are used to indicate K image category and L compression algorithm, 2≤L≤K, the K image category In an image category correspond to a compression algorithm in the L compression algorithm, i-th of image in the K image category Compression algorithm corresponding to classification is to calculate in the L compression algorithm the optimal compression of i-th of image category compression quality Method, the target algorithm are compression algorithm corresponding to the image category of the target image, 1≤i≤K;
The target image is compressed according to the target algorithm.
2. the method according to claim 1, wherein further include:
Training sample is obtained, determines canonical algorithm corresponding to each sample image in the training sample;Wherein, a sample Canonical algorithm corresponding to image is to calculate in the L compression algorithm the optimal compression of one sample image compression quality Method;
The training neural network classification model, is classified as one for the sample image for corresponding to same canonical algorithm in the training sample Class.
3. according to the method described in claim 2, it is characterized in that, K=L, the K image category and the L compression are calculated Method corresponds;
It is described to determine target algorithm according to preset mapping data, comprising:
According to the one-to-one K compression algorithm of the K image category, the determining image category pair with the target image The compression algorithm answered.
4. according to the method described in claim 2, it is characterized in that, each sample image institute in the determination training sample Corresponding canonical algorithm, comprising:
Target sample image is compressed by each compression algorithm in the L compression algorithm respectively, determines each compression The corresponding compression quality parameter of algorithm;
According to the corresponding compression quality parameter of each compression algorithm, canonical algorithm corresponding to the target sample image is determined.
5. according to the method described in claim 4, it is characterized in that, the corresponding compression quality ginseng of each compression algorithm of the determination Number, comprising:
Determine the corresponding compression ratio of each compression algorithm and Y-PSNR it is therein at least one.
6. method according to claim 1-5, which is characterized in that the acquisition target image, comprising:
Image to be compressed is obtained, the image to be compressed is divided into image macro, by the image macro of the image to be compressed As the target image.
7. a kind of image processing apparatus characterized by comprising
Input module, for obtaining target image;
Categorization module, for determining the image category of the target image by neural network classification model;
Chosen module, for determining target algorithm according to preset mapping data;
Wherein, the mapping data are used to indicate K image category and L compression algorithm, 2≤L≤K, the K image category In an image category correspond to a compression algorithm in the L compression algorithm, i-th of image in the K image category Compression algorithm corresponding to classification is to calculate in the L compression algorithm the optimal compression of i-th of image category compression quality Method, the target algorithm are compression algorithm corresponding to the image category of the target image, K >=2,1≤i≤K;
Compression module, for being compressed according to the target algorithm to the target image.
8. device according to claim 7, which is characterized in that further include:
Base modules determine canonical algorithm corresponding to each sample image in the training sample for obtaining training sample; Wherein, canonical algorithm corresponding to a sample image is to compress matter to one sample image in the L compression algorithm Measure optimal compression algorithm;
Training module will correspond to same canonical algorithm for training the neural network classification model in the training sample Sample image is classified as one kind.
9. device according to claim 8, which is characterized in that K=L, the K image category and the L compression are calculated Method corresponds, and the chosen module includes:
Corresponding submodule, for basis and the one-to-one K compression algorithm of the K image category, the determining and target The corresponding compression algorithm of the image category of image.
10. device according to claim 8, which is characterized in that the base modules include:
Computational submodule, for being pressed respectively by each compression algorithm in the L compression algorithm target sample image Contracting, determines the corresponding compression quality parameter of each compression algorithm;
Submodule is screened, for determining the target sample image institute according to the corresponding compression quality parameter of each compression algorithm Corresponding canonical algorithm.
11. device according to claim 10, which is characterized in that the computational submodule includes:
Parameters unit, for determine the corresponding compression ratio of each compression algorithm and Y-PSNR it is therein at least one.
12. device according to claim 7, which is characterized in that the input module includes:
It divides submodule and the image to be compressed is divided into image macro for obtaining image to be compressed, it will be described to be compressed The image macro of image is as the target image.
CN201811067307.8A 2018-09-13 2018-09-13 Image processing method and device Pending CN109376762A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811067307.8A CN109376762A (en) 2018-09-13 2018-09-13 Image processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811067307.8A CN109376762A (en) 2018-09-13 2018-09-13 Image processing method and device

Publications (1)

Publication Number Publication Date
CN109376762A true CN109376762A (en) 2019-02-22

Family

ID=65405107

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811067307.8A Pending CN109376762A (en) 2018-09-13 2018-09-13 Image processing method and device

Country Status (1)

Country Link
CN (1) CN109376762A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110475117A (en) * 2019-09-26 2019-11-19 北京迈格威科技有限公司 Method, apparatus, electronic equipment and the computer storage medium of compression of images
CN110572652A (en) * 2019-09-04 2019-12-13 锐捷网络股份有限公司 Static image processing method and device
CN111009017A (en) * 2019-10-18 2020-04-14 珠海格力电器股份有限公司 Picture compression method and device, storage medium and computer equipment
CN115037937A (en) * 2022-06-02 2022-09-09 北京新唐思创教育科技有限公司 Image compression method, apparatus, device and medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101106709A (en) * 2006-07-10 2008-01-16 逐点半导体(上海)有限公司 Image compression method
CN102957906A (en) * 2011-08-29 2013-03-06 广州九游信息技术有限公司 Method and system for image classifying compression
CN105430394A (en) * 2015-11-23 2016-03-23 小米科技有限责任公司 Video data compression processing method, apparatus and equipment
CN106385592A (en) * 2016-08-31 2017-02-08 苏睿 Image compression method and device
CN107103632A (en) * 2017-05-03 2017-08-29 西安万像电子科技有限公司 Method for compressing image and device
US20170249536A1 (en) * 2016-02-29 2017-08-31 Christopher J. Hillar Self-Organizing Discrete Recurrent Network Digital Image Codec
CN107301668A (en) * 2017-06-14 2017-10-27 成都四方伟业软件股份有限公司 A kind of picture compression method based on sparse matrix, convolutional neural networks
CN108062780A (en) * 2017-12-29 2018-05-22 百度在线网络技术(北京)有限公司 Method for compressing image and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101106709A (en) * 2006-07-10 2008-01-16 逐点半导体(上海)有限公司 Image compression method
CN102957906A (en) * 2011-08-29 2013-03-06 广州九游信息技术有限公司 Method and system for image classifying compression
CN105430394A (en) * 2015-11-23 2016-03-23 小米科技有限责任公司 Video data compression processing method, apparatus and equipment
US20170249536A1 (en) * 2016-02-29 2017-08-31 Christopher J. Hillar Self-Organizing Discrete Recurrent Network Digital Image Codec
CN106385592A (en) * 2016-08-31 2017-02-08 苏睿 Image compression method and device
CN107103632A (en) * 2017-05-03 2017-08-29 西安万像电子科技有限公司 Method for compressing image and device
CN107301668A (en) * 2017-06-14 2017-10-27 成都四方伟业软件股份有限公司 A kind of picture compression method based on sparse matrix, convolutional neural networks
CN108062780A (en) * 2017-12-29 2018-05-22 百度在线网络技术(北京)有限公司 Method for compressing image and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
吴婧 等: "基于块分类的计算机桌面图像压缩算法", 《浙江大学学报(工学版)》 *
马锐: "基于分类的图像压缩算法研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110572652A (en) * 2019-09-04 2019-12-13 锐捷网络股份有限公司 Static image processing method and device
CN110572652B (en) * 2019-09-04 2021-07-16 锐捷网络股份有限公司 Static image processing method and device
CN110475117A (en) * 2019-09-26 2019-11-19 北京迈格威科技有限公司 Method, apparatus, electronic equipment and the computer storage medium of compression of images
CN110475117B (en) * 2019-09-26 2022-03-29 北京迈格威科技有限公司 Image compression method and device, electronic equipment and computer storage medium
CN111009017A (en) * 2019-10-18 2020-04-14 珠海格力电器股份有限公司 Picture compression method and device, storage medium and computer equipment
CN111009017B (en) * 2019-10-18 2021-08-17 珠海格力电器股份有限公司 Picture compression method and device, storage medium and computer equipment
CN115037937A (en) * 2022-06-02 2022-09-09 北京新唐思创教育科技有限公司 Image compression method, apparatus, device and medium

Similar Documents

Publication Publication Date Title
CN109376762A (en) Image processing method and device
JP7413400B2 (en) Skin quality measurement method, skin quality classification method, skin quality measurement device, electronic equipment and storage medium
US11095925B2 (en) Artificial intelligence based resolution improvement system
CN111131889B (en) Method and system for adaptively adjusting images and sounds in scene and readable storage medium
CN110637460B (en) Visual quality preserving quantitative parameter prediction using deep neural networks
JP2022519469A (en) Image quality evaluation method and equipment
CN109784153A (en) Emotion identification method, apparatus, computer equipment and storage medium
CN107680077A (en) A kind of non-reference picture quality appraisement method based on multistage Gradient Features
CN108830823B (en) Full-reference image quality evaluation method based on spatial domain combined frequency domain analysis
CN108564066A (en) A kind of person recognition model training method and character recognition method
US11259029B2 (en) Method, device, apparatus for predicting video coding complexity and storage medium
CN108198177A (en) Image acquiring method, device, terminal and storage medium
CN110517225B (en) AI image recognition method, apparatus, device and storage medium
CN109062715B (en) Method and device for determining memory clock frequency and terminal
WO2020181706A1 (en) Plant species identification method and apparatus
CN111047543A (en) Image enhancement method, device and storage medium
CN110120034B (en) Image quality evaluation method related to visual perception
CN110298405A (en) Classification recognition methods and device, storage medium and terminal
CN111630854A (en) System and method for image signal processor tuning
Morzelona Human visual system quality assessment in the images using the IQA model integrated with automated machine learning model
JP2014056442A (en) Image quality estimation device, image quality estimation method and image quality estimation program
CN112116102A (en) Method and system for expanding domain adaptive training set
CN110766631A (en) Face image modification method and device, electronic equipment and computer readable medium
JP7362924B2 (en) Data augmentation-based spatial analysis model learning device and method
CN115457015A (en) Image no-reference quality evaluation method and device based on visual interactive perception double-flow network

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190222