CN113038139A - Image compression method applied to machine patrol picture uploading - Google Patents

Image compression method applied to machine patrol picture uploading Download PDF

Info

Publication number
CN113038139A
CN113038139A CN202110322161.2A CN202110322161A CN113038139A CN 113038139 A CN113038139 A CN 113038139A CN 202110322161 A CN202110322161 A CN 202110322161A CN 113038139 A CN113038139 A CN 113038139A
Authority
CN
China
Prior art keywords
compression method
picture
target
image
compression
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
Application number
CN202110322161.2A
Other languages
Chinese (zh)
Other versions
CN113038139B (en
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.)
Guizhou Power Grid Co Ltd
Original Assignee
Guizhou Power Grid 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 Guizhou Power Grid Co Ltd filed Critical Guizhou Power Grid Co Ltd
Priority to CN202110322161.2A priority Critical patent/CN113038139B/en
Publication of CN113038139A publication Critical patent/CN113038139A/en
Application granted granted Critical
Publication of CN113038139B publication Critical patent/CN113038139B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention discloses an image compression method applied to machine patrol picture uploading, which comprises the following steps: step 1, obtaining a target picture; step 2, detecting whether the target picture needs to be compressed; step 3, judging whether the target picture can use a WebP compression method or not in the current application scene if compression is needed; if yes, selecting a WebP compression method and jumping to the step 5; step 4, judging whether a Guetzli compression method can be used in the current application scene; if so, selecting a Guetzli compression method; if not, selecting a Libjpg compression method; step 5, selecting compression parameters to perform image compression according to the size of the source image to obtain a target compressed image; the problem of accepting or rejecting the compatibility, the compression ratio, the picture quality and the compression performance of the picture compression method under the application scene of uploading the machine patrol pictures is solved.

Description

Image compression method applied to machine patrol picture uploading
Technical Field
The invention belongs to the picture compression technology, and particularly relates to an image compression method applied to machine patrol picture uploading.
Background
The images inevitably occupy a large amount of storage space and network bandwidth in the transmission and processing processes, the unmanned aerial vehicle shoots a large amount of inspection pictures in the inspection process, and tens of thousands of defective pictures generated in each inspection are necessarily compressed, so that the storage space, the transmission time, the signal frequency band, the network flow and the like are saved.
At present, in network transmission, three common image compression modes are Libjpeg, WebP and Guetzli.
Libjpeg is a free library written entirely in the C language that handles JPEG image data formats. It contains an algorithmic implementation of the JPEG codec, and various utilities for processing JPEG data. As the most commonly used image compression method at present, the distance from the release of the initial edition is nearly 30 years, the technical scheme is stable, and the compatibility is excellent. The problem is that compared with the newly proposed compression algorithm, the compression rate is high, and it is gradually difficult to meet the requirements of more and more picture compression and storage.
WebP is a picture file format that provides both lossy and lossless compression (reversible compression), derived from the video encoding format VP8, published by Google in 2010. According to the earlier test by Google, WebP's lossless compression ratio reduced file size by 45% less than PNG files found on the web, which could be reduced by 28% even though they were processed using pngcrush and PNGOUT. According to the test, the compression rate of WebP is superior to Libjeg and Guetzli under the same quality. The problem of the WebP compression method is that the compatibility is poor, and the early PC and mobile device cannot decode the pictures in the WebP format well.
Guetzli is a JPEG encoder whose goal is to achieve excellent compression density with high visual quality. Images produced by Guetzli are typically 20-30% smaller than images of equivalent quality produced by libjpeg. Guetzli only generates sequential (non-progressive) JPEG because they provide faster decompression speed. Since the output format of Guetzli is JPEG, the compatibility of this method is the same as libjpeg, while providing lower compression ratio and better visual effect at the same quality factor. However, the problem of Guetzli is that the compression delay is much higher than that of Libjpeg and WebP, and real-time compression cannot be performed.
To sum up: the compression method of tens of thousands of defective pictures generated by each inspection is difficult to accept and reject in compatibility, compression ratio, picture quality and compression performance.
Disclosure of Invention
The invention aims to solve the problems that: the image compression method applied to the machine patrol image uploading is provided, and the problem of accepting or rejecting compatibility, compression ratio, image quality and compression performance in the image compression method in the prior art is solved.
The technical scheme adopted by the invention is as follows:
an image compression method applied to machine patrol picture uploading comprises the following steps:
step 1, obtaining a target picture;
step 2, detecting whether the target picture needs to be compressed;
step 3, judging whether the target picture can use a WebP compression method or not in the current application scene if compression is needed; if yes, selecting a WebP compression method and jumping to the step 5;
step 4, judging whether a Guetzli compression method can be used in the current application scene;
if so, selecting a Guetzli compression method; if not, selecting a Libjpg compression method;
and 5, selecting compression parameters to perform image compression according to the size of the source image to obtain a target compressed image.
The implementation method of the step 5 is as follows: setting more than one expected target file size according to the size of a source image, and selecting compression parameters to perform image compression according to each compression mode which is tested and calculated in advance and the corresponding relation between the compression parameters and the target file size to obtain a target compressed image.
The way of obtaining the target picture in the step 1 is as follows: a series of images shot in the unmanned aerial vehicle inspection process are taken as target pictures.
Step 2, the method for detecting whether the target picture needs to be compressed comprises the following steps: judging whether the resolution of the target picture is greater than a set threshold value or not; if so, the picture needs to be compressed.
Step 3, the method for detecting whether the target picture can use the WebP compression method comprises the following steps: sending a picture request by an application end, checking an Accept field in a request header received by a server end, and checking whether an image/webp exists; if so, indicating that the target picture can use the WebP compression method in the current application scene, otherwise, indicating that the target picture cannot use the WebP compression method.
The method for judging whether the Guetzli compression method can be used or not in the step 4 is as follows: counting the average file size of the target picture, and calculating the total time for compressing the target picture according to the compression time corresponding to the file size of each stage under the predetermined 95 quality coefficient and the CPU core number under the application scene; judging whether the total time is greater than the set time threshold value, if so, indicating that the current application scene cannot use the Guetzli compression method; if not, it may be used.
Step 5, setting the size of the target file expected by more than one gear comprises the following steps: the target file sizes are expected to be 10KB, 100KB, 200KB, 500KB or 1MB, respectively.
Step 5, the size of the target file is 100 KB; the compression parameter is the mass factor 90.
The invention has the beneficial effects that:
according to the respective characteristics of three image compression algorithms which are widely used at present, reasonable image compression algorithms and selection bases of image compression parameters are designed; the problem of accepting or rejecting the compatibility, the compression ratio, the picture quality and the compression performance of the picture compression method under the application scene of uploading the machine patrol pictures is solved.
Drawings
FIG. 1 is a schematic flow chart of the method of the present invention.
Detailed Description
An image compression method is applied to machine patrol picture uploading, and comprises the following steps:
step 1, obtaining a target picture;
a series of images shot in the unmanned aerial vehicle inspection process are obtained and used as target pictures.
Step 2, detecting whether the target picture needs to be compressed;
specifically, in an implementation manner, detecting whether the target picture needs to be compressed may include:
and judging whether the resolution of the target picture is larger than a self-set threshold value or not. If yes, the picture needs to be compressed, and the step 3 is skipped.
Step 3, judging whether the target picture can use a WebP compression method or not in the current application scene;
specifically, in an implementation manner, determining whether the target picture can use the WebP compression method in the current application scenario includes:
the application end sends out a picture request, checks an Accept field in a request header received by the server end, and checks whether an image/webp exists. If yes, the target picture can use the WebP compression method in the current application scene, and if not, the step 4 cannot be carried out.
Step 4, judging whether a Guetzli compression method can be used in the current application scene;
specifically, the average file size of the target picture is statistically calculated, and the total time for compressing the target picture is estimated according to the compression time corresponding to the file size of each stage under the 95-quality coefficient tested in advance and the number of CPU cores (each core can run 1 Guetzli compression process) under the application scene. And judging whether the total time is greater than the set time threshold value, if so, indicating that the current application scene cannot use the Guetzli compression method. If not, it may be used.
And 5, setting several expected target file sizes according to the file size of the target image, and selecting proper compression parameters for image compression by using the compression method selected in the steps 3 and 4 according to each compression mode which is tested and calculated in advance and the corresponding relation between the compression parameters and the target file size. And obtaining a target compressed picture.
For example: the adopted compression method is Guetzli, the sizes of several expected target files are respectively set to be 10KB, 100KB, 200KB, 500KB and 1MB, the file size of the target image is 500KB, the size of the target file is 100KB, the required compression rate threshold is calculated to be 20%, and the quality coefficient 90 is set as the compression coefficient assuming that the compression rate of Guetzli under the 95 quality coefficient obtained by the previous test and calculation is 21.30% and the compression rate under the 90 quality coefficient is 14.50%.

Claims (8)

1. An image compression method applied to machine patrol picture uploading comprises the following steps:
step 1, obtaining a target picture;
step 2, detecting whether the target picture needs to be compressed;
step 3, judging whether the target picture can use a WebP compression method or not in the current application scene if compression is needed; if yes, selecting a WebP compression method and jumping to the step 5;
step 4, judging whether a Guetzli compression method can be used in the current application scene;
if so, selecting a Guetzli compression method; if not, selecting a Libjpg compression method;
and 5, selecting compression parameters to perform image compression according to the size of the source image to obtain a target compressed image.
2. The image compression method applied to the machine patrol picture uploading according to claim 1, wherein the image compression method comprises the following steps: the implementation method of the step 5 is as follows: setting more than one expected target file size according to the size of a source image, and selecting compression parameters to perform image compression according to each compression mode which is tested and calculated in advance and the corresponding relation between the compression parameters and the target file size to obtain a target compressed image.
3. The image compression method applied to the machine patrol picture uploading according to claim 1, wherein the image compression method comprises the following steps: the way of obtaining the target picture in the step 1 is as follows: a series of images shot in the unmanned aerial vehicle inspection process are taken as target pictures.
4. The image compression method applied to the machine patrol picture uploading according to claim 1, wherein the image compression method comprises the following steps: step 2, the method for detecting whether the target picture needs to be compressed comprises the following steps: judging whether the resolution of the target picture is greater than a set threshold value or not; if so, the picture needs to be compressed.
5. The image compression method applied to the machine patrol picture uploading according to claim 1, wherein the image compression method comprises the following steps: step 3, the method for detecting whether the target picture can use the WebP compression method comprises the following steps: sending a picture request by an application end, checking an Accept field in a request header received by a server end, and checking whether an image/webp exists; if so, indicating that the target picture can use the WebP compression method in the current application scene, otherwise, indicating that the target picture cannot use the WebP compression method.
6. The image compression method applied to the machine patrol picture uploading according to claim 1, wherein the image compression method comprises the following steps: the method for judging whether the Guetzli compression method can be used or not in the step 4 is as follows: counting the average file size of the target picture, and calculating the total time for compressing the target picture according to the compression time corresponding to the file size of each stage under the predetermined 95 quality coefficient and the CPU core number under the application scene; judging whether the total time is greater than the set time threshold value, if so, indicating that the current application scene cannot use the Guetzli compression method; if not, it may be used.
7. The image compression method applied to the machine patrol picture uploading according to claim 2, wherein the image compression method comprises the following steps: step 5, setting the size of the target file expected by more than one gear comprises the following steps: the target file sizes are expected to be 10KB, 100KB, 200KB, 500KB or 1MB, respectively.
8. The image compression method applied to the machine patrol picture uploading according to claim 2, wherein the image compression method comprises the following steps: step 5, the size of the target file is 100 KB; the compression parameter is the mass factor 90.
CN202110322161.2A 2021-03-25 2021-03-25 Image compression method applied to machine inspection picture uploading Active CN113038139B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110322161.2A CN113038139B (en) 2021-03-25 2021-03-25 Image compression method applied to machine inspection picture uploading

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110322161.2A CN113038139B (en) 2021-03-25 2021-03-25 Image compression method applied to machine inspection picture uploading

Publications (2)

Publication Number Publication Date
CN113038139A true CN113038139A (en) 2021-06-25
CN113038139B CN113038139B (en) 2023-05-12

Family

ID=76473973

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110322161.2A Active CN113038139B (en) 2021-03-25 2021-03-25 Image compression method applied to machine inspection picture uploading

Country Status (1)

Country Link
CN (1) CN113038139B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0705040A2 (en) * 1994-09-29 1996-04-03 Sony Corporation Video encoding with quantization step control
CN1314053A (en) * 1999-06-14 2001-09-19 株式会社尼康 Compression encoding method, recorded medium on which compression encoding program is recorded, and imaging device
JP2004295564A (en) * 2003-03-27 2004-10-21 Casio Comput Co Ltd File storage device, file storage method, and file storage program
CN1860792A (en) * 2003-09-02 2006-11-08 索尼株式会社 Video encoding device, video encoding control method, and computer readable storage medium storing video encoding control program
CN102684705A (en) * 2012-05-30 2012-09-19 奇智软件(北京)有限公司 Method and device for data compression
CN102957906A (en) * 2011-08-29 2013-03-06 广州九游信息技术有限公司 Method and system for image classifying compression
JP2014078860A (en) * 2012-10-11 2014-05-01 Samsung Display Co Ltd Compressor, driving device, display device, and compression method
CN105787868A (en) * 2016-02-18 2016-07-20 北京金山安全软件有限公司 Picture compression method and device and electronic equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0705040A2 (en) * 1994-09-29 1996-04-03 Sony Corporation Video encoding with quantization step control
CN1314053A (en) * 1999-06-14 2001-09-19 株式会社尼康 Compression encoding method, recorded medium on which compression encoding program is recorded, and imaging device
JP2004295564A (en) * 2003-03-27 2004-10-21 Casio Comput Co Ltd File storage device, file storage method, and file storage program
CN1860792A (en) * 2003-09-02 2006-11-08 索尼株式会社 Video encoding device, video encoding control method, and computer readable storage medium storing video encoding control program
CN102957906A (en) * 2011-08-29 2013-03-06 广州九游信息技术有限公司 Method and system for image classifying compression
CN102684705A (en) * 2012-05-30 2012-09-19 奇智软件(北京)有限公司 Method and device for data compression
JP2014078860A (en) * 2012-10-11 2014-05-01 Samsung Display Co Ltd Compressor, driving device, display device, and compression method
CN105787868A (en) * 2016-02-18 2016-07-20 北京金山安全软件有限公司 Picture compression method and device and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
何天宇: "端到端的图像视频压缩研究" *

Also Published As

Publication number Publication date
CN113038139B (en) 2023-05-12

Similar Documents

Publication Publication Date Title
KR101832418B1 (en) Method and system for optimization of image encode quality
WO2017190691A1 (en) Picture compression method and apparatus
WO2022205058A1 (en) Method and apparatus for determining image processing mode
US6934418B2 (en) Image data coding apparatus and image data server
JP2009530892A (en) Method and apparatus for adapting temporal frequency of video image sequences
CN101842812A (en) The system and method that is used for the parameter quality perception selection of transcoding of digital images
CN1825958A (en) Compressed video quality checking method for image quality evaluation
US20230342985A1 (en) Point cloud encoding and decoding method and point cloud decoder
CN110149515B (en) Data transmission method and device
US11910017B2 (en) Method for predicting point cloud attribute, encoder, decoder, and storage medium
WO2022067775A1 (en) Point cloud encoding and decoding method, encoder, decoder and codec system
WO2018196502A1 (en) Method and device for image transcoding
CN113038139B (en) Image compression method applied to machine inspection picture uploading
CN101296166B (en) Method for measuring multimedia data based on index
US20240070924A1 (en) Compression of temporal data by using geometry-based point cloud compression
WO2022067776A1 (en) Point cloud decoding and encoding method, and decoder, encoder and encoding and decoding system
TW202249488A (en) Point cloud attribute prediction method and apparatus, and codec
CN110290381B (en) Video quality evaluation method and device, electronic equipment and computer storage medium
WO2022140937A1 (en) Point cloud encoding method and system, point cloud decoding method and system, point cloud encoder, and point cloud decoder
CN118354087B (en) Lossless image compression method and system
WO2024007843A1 (en) Encoding method and apparatus, decoding method and apparatus, and computer device
WO2024164590A1 (en) Quantization method for encoder-decoder network model and related apparatus
WO2023240455A1 (en) Point cloud encoding method and apparatus, encoding device, and storage medium
CN110121074B (en) Satellite image large compression method with predicted performance
WO2023169303A1 (en) Encoding and decoding method and apparatus, device, storage medium, and computer program product

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