CN102769752A - JPEG image compression method and system - Google Patents

JPEG image compression method and system Download PDF

Info

Publication number
CN102769752A
CN102769752A CN2012102608328A CN201210260832A CN102769752A CN 102769752 A CN102769752 A CN 102769752A CN 2012102608328 A CN2012102608328 A CN 2012102608328A CN 201210260832 A CN201210260832 A CN 201210260832A CN 102769752 A CN102769752 A CN 102769752A
Authority
CN
China
Prior art keywords
file
compressibility factor
compression
image
size
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
CN2012102608328A
Other languages
Chinese (zh)
Other versions
CN102769752B (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.)
BEIJING DIGITAL ZHITONG TECHNOLOGY CO., LTD.
Original Assignee
Beijing Hanwang Intelligent Traffic 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 Beijing Hanwang Intelligent Traffic Technology Co Ltd filed Critical Beijing Hanwang Intelligent Traffic Technology Co Ltd
Priority to CN201210260832.8A priority Critical patent/CN102769752B/en
Publication of CN102769752A publication Critical patent/CN102769752A/en
Application granted granted Critical
Publication of CN102769752B publication Critical patent/CN102769752B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a JPEG image compression method and a JPEG image compression system, relates to the technical field of electronic information and solves the problems in the prior art that the operation is complex as engineers need to repeatedly calculate to find out demarcation points of time ranges and each compression factor of each time range when different compression factors are designated to different time ranges in a day. The method comprises the following steps: obtaining a current original image; inquiring the compression factor corresponding to the current time range in a preset compression factor table corresponding to the current time period; compressing the current original image by the compression factor corresponding to the current time range to obtain a compressed current image file; and when the size of the current image file is within a preset range of the file size, determining the current image file to be a target file. The method and the system provided by the embodiment of the invention are mainly used in the process of image compression.

Description

A kind of jpeg image compression method and system
Technical field
The present invention relates to electronic information technical field, relate in particular to a kind of jpeg image compression method and system.
Background technology
In a large amount of pictures are captured, transmitted and storage etc. handled; Image Compression is a kind of crucial technological means; Wherein, the most frequently used compressed format is JPEG (Joint Photographic Experts Group, joint image expert group) and JPEG2000.JPEG2000 compares with JPEG, and its compression ratio is high more about about 30% than JPEG, and JPEG 2000 supports to diminish and lossless compress.JPEG2000 can realize progressive transmission, i.e. the profile of first images, images detail data progressively then, by dim to clear display image.In addition, JPEG 2000 also supports the compression quality of area-of-interest on the specify image arbitrarily.
In the prior art; In order to transmit and convenient storage, require image file size to satisfy certain condition, need compress image; In field of traffic usually according to night on daytime; Be divided into two to three time periods with one day,, and image compressed according to Joint Photographic Experts Group for each time period is provided with the different compression factor.
State in realization in the process of image compression, the inventor need in the prior art to find the engineering staff to calculate the separation of finding out the time period repeatedly, and the compressibility factor of each time period, complicated operation, and also the image size after the compression does not often meet the demands.
Summary of the invention
Embodiments of the invention provide a kind of jpeg image compression method and system, after image compresses under the prerequisite that meets the demands of image file size, realized simple to operate, compressed image fast and effeciently.
For achieving the above object, the present invention adopts following technical scheme:
A kind of jpeg image compression method comprises:
Obtain current original image;
In cycle current time corresponding preset compressibility factor table, the corresponding compressibility factor of inquiry current slot, wherein; A corresponding preset compressibility factor table of time cycle; Said preset compressibility factor table comprises each time period in time corresponding cycle respectively, the compressibility factor that original image is compressed that said each time period is corresponding, and said compressibility factor is big more; The size of the image file after original image compressed is big more, and the quality of the image after the compression is good more simultaneously;
Utilize the corresponding compressibility factor of said current slot, said current original image is compressed the present image file after obtaining compressing;
When the size of said present image file is in said file size preset range; Confirm that said present image file is a file destination; The size that said file size preset range is used to limit said present image file is more than or equal to the file size lower threshold, and smaller or equal to the file size upper limit threshold.
A kind of jpeg image compressibility comprises:
Acquiring unit is used to obtain current original image;
Query unit; Be used at cycle current time corresponding preset compressibility factor table, the corresponding compressibility factor of inquiry current slot, wherein; A corresponding preset compressibility factor table of time cycle; Said preset compressibility factor table comprises each time period in time corresponding cycle respectively, the compressibility factor that original image is compressed that said each time period is corresponding, and said compressibility factor is big more; The size of the image file after original image compressed is big more, and the quality of the image after the compression is good more simultaneously;
Compression unit is used to utilize the corresponding compressibility factor of said current slot, said current original image is compressed the present image file after obtaining compressing;
File destination is confirmed the unit; Be used for size when said present image file in said file size preset range the time; Confirm that said present image file is a file destination; The size that said file size preset range is used to limit said present image file is more than or equal to the file size lower threshold, and smaller or equal to the file size upper limit threshold.
A kind of jpeg image compression method and system that the embodiment of the invention provides; To the current original image that obtains; Utilize the corresponding compressibility factor of current slot in the preset compressibility factor table of setting up in advance; Said current original image is compressed, when the size of said present image file is in said file size preset range, confirm that said present image file is a file destination.The embodiment of the invention has solved the different time sections that is directed against in a day in the prior art and has specified different compressibility factors; Need the engineering staff to calculate the separation of finding out the time period repeatedly, and the compressibility factor of each time period, complicated operation; And the image size after the compression does not often meet the demands; The embodiment of the invention after image compresses under the prerequisite that meets the demands of image file size, realized simple to operate, compressed image fast and effeciently.
Description of drawings
In order to be illustrated more clearly in the technical scheme of the embodiment of the invention; To do to introduce simply to the accompanying drawing of required use in the embodiment of the invention below; Obviously, below described accompanying drawing only be some embodiments of the present invention, for those of ordinary skills; Under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
The flow chart of a kind of jpeg image compression method that Fig. 1 provides for the embodiment of the invention 1;
The flow chart of the another kind of jpeg image compression method that Fig. 2 provides for the embodiment of the invention 1;
The flow chart of the corresponding compressibility factor of the said current slot of the renewal that Fig. 3 provides for the embodiment of the invention 1;
The structure chart of a kind of jpeg image compressibility that Fig. 4 provides for the embodiment of the invention 2;
File destination is confirmed the structure chart of unit in the system that Fig. 5 provides for the embodiment of the invention 2;
The structure chart of the another kind of jpeg image compressibility that Fig. 6 provides for the embodiment of the invention 2;
The structure chart of counting unit in the system that Fig. 7 provides for the embodiment of the invention 2;
The structure chart of another jpeg image compressibility that Fig. 8 provides for the embodiment of the invention 2;
The structure chart of updating block in the system that Fig. 9 provides for the embodiment of the invention 2.
Embodiment
Below in conjunction with accompanying drawing a kind of jpeg image compression method of the embodiment of the invention and system are described in detail.
Embodiment 1
The embodiment of the invention provides a kind of jpeg image compression method, spatially adopts unified compressibility factor for entire image, in time; Set up different preset compressibility factor table to different time periods; Comprise each time period in the corresponding time cycle in each preset compressibility factor table, and each time period corresponding compressibility factor is all arranged, to satisfy of the influence of different time sections different light rays to image; The compressibility factor of feasible corresponding time period of foundation is to after the image compression; Image file the size with all meet the demands qualitatively, as shown in Figure 1, said method is following:
101, obtain current original image.
In field of traffic, can utilize camera or camera, the vehicle that passes through is captured immediately, get access to the current original image of vehicle.
102, in cycle current time corresponding preset compressibility factor table; The corresponding compressibility factor of inquiry current slot; Wherein, the corresponding different preset compressibility factor of different time periods table, said preset compressibility factor table comprises each time period in the time corresponding cycle; The compressibility factor that original image is compressed that said each time period is corresponding respectively; Said compressibility factor is big more, and the size of the image file after original image is compressed is big more, and the quality of the image after the compression is good more simultaneously.
Because the current original image that obtains receives the influence of light intensity easily; And the variation of Along with season; Light also can constantly change; So set up different preset compressibility factor table to different time periods, comprise the different time section in each time cycle, different time sections is provided with the different compression factor.For example; The said time cycle can be set to one day, and the time period is set to 1 hour, and the preset compressibility factor table to this time cycle just comprises and 24 24 corresponding compressibility factors of time period so; For 1 year 365 days, 365 preset compressibility factor tables are just arranged.Wherein, compressibility factor is big more, and the size of the image file after original image is compressed is big more; The quality of the image after the compression is also good more simultaneously; For example compressibility factor is 1 to 100, is 100 o'clock in compressibility factor, the image file after the expression compression is maximum, the image after the compression best in quality.
103, utilize the corresponding compressibility factor of said current slot, said current original image is compressed the present image file after obtaining compressing.
Utilizing the corresponding compressibility factor of current slot, current original image is carried out the JPEG compression, here all is lossy compression method.
104, when the size of said present image file is in said file size preset range; Confirm that said present image file is a file destination; The size that said file size preset range is used to limit said present image file is more than or equal to the file size lower threshold, and smaller or equal to the file size upper limit threshold.
Be convenient to transmission and storage for the image file after compressing, the size of image file must meet some requirements, and for example, said file size preset range is [50k, 300k], and the size that is exactly image file must be more than or equal to 50k, and smaller or equal to 300k.
A kind of jpeg image compression method that the embodiment of the invention provides; To the current original image that obtains; Utilize the corresponding compressibility factor of current slot in the preset compressibility factor table of setting up in advance; Said current original image is compressed, when the size of said present image file is in said file size preset range, confirm that said present image file is a file destination.The embodiment of the invention has solved the different time sections that is directed against in a day in the prior art and has specified different compressibility factors; Need the engineering staff to calculate the separation of finding out the time period repeatedly, and the compressibility factor of each time period, complicated operation; And the image size after the compression does not often meet the demands; The embodiment of the invention after image compresses under the prerequisite that meets the demands of image file size, realized simple to operate, compressed image fast and effeciently.
When concrete the application; In each time cycle corresponding preset compressibility factor table; The compressibility factor that each time period is corresponding can utilize engineering staff's experience to be provided with, in the time of also can being in idle condition in system; Arbitrary original image, preset compressibility factor set and said file size preset range according to the time corresponding section is obtained confirm that concrete steps are following:
A, a time period in office are obtained arbitrary original image.
For the corresponding compressibility factor of arbitrary time period in some preset compressibility factor tables; Can be through obtaining original image at random in the corresponding time period; Owing to be the original image that obtains in the time corresponding section; So said original image is representative, can represent all original images of said time period.
B, utilize the different compressibility factors in the said preset compressibility factor set, said original image is compressed, obtain the corresponding image file of said different compressibility factor.
Exist in the said preset compressibility factor set and be not both compressibility factor; A plurality of arbitrarily among the 1-100 for example; Utilize the said original image of different compression factor pair to carry out the JPEG compression; With obtaining the corresponding image file of said different compressibility factor, so that choose the compressibility factor of which compressibility factor as this time period according to the size decision of image file.
C, choose file size in the said image file within said file size preset range, and the corresponding maximum compressibility factor of compressibility factor of said image file, as the corresponding compressibility factor that original image is compressed of said time period.
For example; Utilizing after 20,50,60,80 pairs of said original images of compressibility factor compress, the image file size that obtains is 48 respectively, 180k, 200k, 280k, and said file size preset range is [50k; 300k]; So just selecting file size in the image file within said file size preset range, then is 180k, 200k, image file that 280k is corresponding, and the corresponding maximum compressibility factor of compressibility factor of said image file; Then for image file size is the corresponding compressibility factor 80 of 280k, as the corresponding compressibility factor that original image is compressed of said time period.The corresponding compressibility factor of other times section can obtain according to method recited above, and then sets up the preset compressibility factor table of difference in different time cycle.
Utilize engineering staff's experience or the above-mentioned method of setting up different time cycle corresponding preset compressibility factor table, the original image that obtains is compressed, as shown in Figure 2, concrete steps are following:
201, obtain current original image;
202, in cycle current time corresponding preset compressibility factor table; The corresponding compressibility factor of inquiry current slot; Wherein, the corresponding different preset compressibility factor of different time periods table, said preset compressibility factor table comprises each time period in the time corresponding cycle; The compressibility factor that original image is compressed that said each time period is corresponding respectively; Said compressibility factor is big more, and the size of the image file after original image is compressed is big more, and the quality of the image after the compression is good more simultaneously.
Optional; Said preset compressibility factor table also comprises the said corresponding number of times of compression again of each time period; When said current slot begins, compress the number of times zero clearing again with said, the said number of times that compresses again representes have several original images to compress again in the corresponding time period; For example said current slot has an original image to carry out compression again, and the then said number of times that compresses again is 1.
203, utilize the corresponding compressibility factor of said current slot, said current original image is compressed the present image file after obtaining compressing.
When the size of said present image file is in said file size preset range; Confirm that said present image file is a file destination; The size that said file size preset range is used to limit said present image file is more than or equal to the file size lower threshold; And smaller or equal to the file size upper limit threshold, concrete implementation method is shown in step 204-206.
Whether the size of 204, judging said present image file is in the file size preset range;
205, when the size of said present image file is in said file size preset range, confirm that said present image file is a file destination.
After utilizing the corresponding compressibility factor of said current slot that said current original image is compressed; The size of said present image file is in said file size preset range the time; Confirm that said present image file is a file destination; Said file destination can carry out next step ground to be handled, and for example qualification is not done in storage or transmission here.
In addition; When the size of said present image file is not in said file size preset range; The corresponding compressibility factor of said current slot is increased or reduce to be scheduled to the processing of step-length, utilize the compressibility factor after handling that said current original image is compressed again, the size of the present image file after said compression again is in said file size preset range; Confirm that the present image file after the said compression again is a file destination; Automatically compress again, can guarantee the validity of compressed image file, concrete like step 206.
206, when the size of said present image file is not in said file size preset range; The corresponding compressibility factor of said current slot is increased or reduces the processing of predetermined step-length; When utilizing the compressibility factor after handling said current original image is compressed again; The size of the present image file after said compression again is in said file size preset range; Confirm present image file after the said compression again when being file destination, the number of times of compression again that said current slot is corresponding adds one.
For example, the compressibility factor that said current slot is corresponding is 80, and the size of said present image file is 400k; Not in said file size preset range [50k, 300k], utilize predetermined step-length 5; The processing that said compressibility factor 80 is reduced obtains 75, utilizes the compressibility factor 75 after handling again, and said current original image is compressed again; If the size of the present image file after the compression is 380k, in the time of still not in said file size preset range, carry out reducing said compressibility factor according to predetermined step-length 5; Said current original image is compressed again; In said file size preset range, confirm that then the present image file after the said compression again is a file destination, and the number of times of compression again that said current slot is corresponding adds one up to the size of said present image file.
Optional, according to each original image is all defined the image compression threshold value, the qualification of the frequency threshold value of just each original image being compressed again, above-mentioned steps 206 is replaceable to be following two kinds of situation:
D, the compressibility factor after utilizing processing are compressed said current original image again; The size of the present image file after said compression again is in said file size preset range; And the compression number of times that said current original image is compressed again is during less than the image compression threshold value; Confirm that the present image file after the said compression again is a file destination; And the number of times of compression again that said current slot is corresponding adds one, and said image compression threshold value is represented the frequency threshold value that each original image compresses again.
For example; Said image compression threshold value is 3 o'clock; After said current original image compressed 2 times again, the size of present image file after the said compression again was in said file size preset range the time, and the compression number of times 2 that said current original image is compressed again is during less than image compression threshold value 3; Confirm that the present image file after the said compression again is a file destination, and the number of times of compression again that said current slot is corresponding adds one.
The compression number of times that e, the compressibility factor after utilize handling compress said current original image again abandons said current original image, and the number of times of compression again of said current slot correspondence is added one during more than or equal to the image compression threshold value.
For example; Said image compression threshold value is 3 o'clock; After said current original image compresses 3 times again; The size of present image file after the said compression again abandons said current original image, and the number of times of compression again of said current slot correspondence is added one still not in said file size preset range the time.
Optional, when said preset compressibility factor table also comprised the number of times of compression again of said each time period correspondence, said method also comprised the steps:
F, at interval the stipulated time is detected the corresponding number of times of compression again of said current slot whether more than or equal to compression threshold again in said current slot.
Wherein, said compression threshold again is the qualification of again compressing number of times corresponding to said current slot, for example, detects once in 20 minutes at interval.
G, when the corresponding number of times of compression again of said current slot during more than or equal to compression threshold again; Arbitrary original image, preset compressibility factor according to said current slot obtains are gathered and said file size preset range; Upgrade the corresponding compressibility factor of current slot described in the said preset compressibility factor table, and the number of times of the compression again zero clearing that said current slot is corresponding.
When at interval the stipulated time is inquired about the corresponding number of times of compression again of said current slot more than or equal to compression threshold again in said current slot; The compressibility factor that said current slot is corresponding is described; Not being suitable for the original image that said current slot is obtained compresses; Will upgrade the compressibility factor of said current slot, as shown in Figure 3, specifically carry out following steps:
301, obtain arbitrary original image at said current slot;
302, utilize different compressibility factors in the said preset compressibility factor set, said original image is compressed, obtain the corresponding image file of said different compressibility factor;
303, choose file size in the said image file within said file size preset range, and the corresponding maximum compressibility factor of compressibility factor of said image file, the corresponding compressibility factor of said current slot upgraded.
Above-mentioned steps 301-303 is concrete to be carried out identically with step a, b, c, here repeats no more.To the corresponding monitoring of compressing number of times again of time period, can upgrade corresponding compressibility factor of said time period automatically, after compressing the original image that obtains in the corresponding time period, the compressibility factor after assurance utilization is upgraded meets the demands more.
A kind of jpeg image compression method that the embodiment of the invention provides; Set up the preset compressibility factor table of corresponding time period in the time of can utilizing system idle, save system resource, when the size of the image file after the compression does not meet the demands; Automatically the adjustment compressibility factor is compressed again; Guarantee the validity of image file, simple to operate, quicker.
A kind of jpeg image compression method that the foregoing description provides can be applied in some supervisory control systems, for example Chinese king high-definition electronic police system.
Embodiment 2
The embodiment of the invention provides a kind of jpeg image compressibility, and is as shown in Figure 4, comprises acquiring unit 41, query unit 42, and compression unit 43 is confirmed unit 44 with file destination.
Acquiring unit 41 is used to obtain current original image;
Query unit 42; Be used at cycle current time corresponding preset compressibility factor table, the corresponding compressibility factor of inquiry current slot, wherein; A corresponding preset compressibility factor table of time cycle; Said preset compressibility factor table comprises each time period in the time corresponding cycle, the compressibility factor that original image is compressed that said each time period is corresponding respectively, and said compressibility factor is big more; The size of the image file after original image compressed is big more, and the quality of the image after the compression is good more simultaneously;
Compression unit 43 is used to utilize the corresponding compressibility factor of said current slot, said current original image is compressed the present image file after obtaining compressing;
File destination is confirmed unit 44; Be used for size when said present image file in said file size preset range the time; Confirm that said present image file is a file destination; The size that said file size preset range is used to limit said present image file is more than or equal to the file size lower threshold, and smaller or equal to the file size upper limit threshold.
A kind of jpeg image compressibility that the embodiment of the invention provides; To the current original image that obtains; Utilize the corresponding compressibility factor of current slot in the preset compressibility factor table of setting up in advance; Said current original image is compressed, when the size of said present image file is in said file size preset range, confirm that said present image file is a file destination.The embodiment of the invention has solved the different time sections that is directed against in a day in the prior art and has specified different compressibility factors; Need the engineering staff to calculate the separation of finding out the time period repeatedly, and the compressibility factor of each time period, complicated operation; And the image size after the compression does not often meet the demands; The embodiment of the invention after image compresses under the prerequisite that meets the demands of image file size, realized simple to operate, compressed image fast and effeciently.
Wherein, Optional; The corresponding respectively compressibility factor that original image is compressed of each time period in the said preset compressibility factor table of said query unit inquiry; Be to confirm that according to arbitrary original image, preset compressibility factor set and said file size preset range that the time corresponding section is obtained specifically comprise: a time period in office is obtained arbitrary original image; Utilize the different compressibility factors in the said preset compressibility factor set, said original image is compressed, obtain the corresponding image file of said different compressibility factor; Choose file size in the said image file within said file size preset range, and the corresponding maximum compressibility factor of compressibility factor of said image file, as the corresponding compressibility factor that original image is compressed of said time period.
Optional, as shown in Figure 5, said file destination confirms that unit 44 comprises:
Processing module 51, whether the size that is used to judge said present image file is in the file size preset range;
Determination module 52 is used for size when said present image file in said file size preset range the time, confirms that said present image file is a file destination;
Said determination module 52; Also be used for size when said present image file not in said file size preset range the time; The corresponding compressibility factor of said current slot is increased or reduces the processing of predetermined step-length; Utilize the compressibility factor after handling that said current original image is compressed again, the size of the present image file after said compression again confirms that the present image file after the said compression again is a file destination in said file size preset range.
Optional, as shown in Figure 6, said system also comprises:
Counting unit 61; Be used for when utilizing the compressibility factor after handling that said current original image is compressed again; The size of the present image file after said compression again is in said file size preset range; Confirm present image file after the said compression again when being file destination, the number of times of compression again that said current slot is corresponding adds one.
Optional, as shown in Figure 7, said counting unit 61 comprises:
First module 71; Be used for when utilizing the compressibility factor after handling that said current original image is compressed again; The size of the present image file after said compression again is in said file size preset range; And the compression number of times that said current original image is compressed again is during less than the image compression threshold value; Confirm that the present image file after the said compression again is a file destination, and the number of times of compression again of said current slot correspondence is added one, said image compression threshold value is represented the frequency threshold value that each original image compresses again;
Second module 72; When being used for compression number of times that the compressibility factor after utilize handling compresses said current original image again more than or equal to the image compression threshold value; Said current original image is abandoned, and the number of times of compression again that said current slot is corresponding adds one.
Optional, as shown in Figure 8, said system also comprises:
Detecting unit 81 is used in said current slot at interval the stipulated time to detect the corresponding number of times of compression again of said current slot whether more than or equal to compression threshold again;
Updating block 82; Be used for when the corresponding number of times of compression again of said current slot during more than or equal to compression threshold again; Arbitrary original image, preset compressibility factor according to said current slot obtains are gathered and said file size preset range; Upgrade the corresponding compressibility factor of current slot described in the said preset compressibility factor table, and the number of times of the compression again zero clearing that said current slot is corresponding.
As shown in Figure 9, said updating block 82 comprises:
Acquisition module 91 is used for obtaining arbitrary original image at said current slot;
Compression module 92 is used for utilizing the different compressibility factors of said preset compressibility factor set, and said original image is compressed, and obtains the corresponding image file of said different compressibility factor;
Update module 93, the file size that is used for choosing said image file are within said file size preset range, and the corresponding maximum compressibility factor of compressibility factor of said image file, upgrade the corresponding compressibility factor of said current slot.
The native system operating process is referring to the implementation procedure of jpeg image compression in the said method.
Above-mentioned jpeg image compressibility can be applied in some supervisory control systems, for example Chinese king high-definition electronic police system.
Through the description of above execution mode, the those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential common hardware, can certainly pass through hardware, but the former is better execution mode under a lot of situation.Based on such understanding; The part that technical scheme of the present invention contributes to prior art in essence in other words can be come out with the embodied of software product, and this computer software product is stored in the storage medium that can read, like the floppy disk of computer; Hard disk or CD etc.; Comprise some instructions with so that computer equipment (can be personal computer, server, the perhaps network equipment etc.) carry out the described method of each embodiment of the present invention.
The above; Be merely embodiment of the present invention, but protection scope of the present invention is not limited thereto, any technical staff who is familiar with the present technique field is in the technical scope that the present invention discloses; Can expect easily changing or replacement, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of said claim.

Claims (14)

1. a jpeg image compression method is characterized in that, comprising:
Obtain current original image;
In cycle current time corresponding preset compressibility factor table; The corresponding compressibility factor of inquiry current slot; Wherein, the corresponding different preset compressibility factor of different time periods table, said preset compressibility factor table comprises each time period in the time corresponding cycle; The compressibility factor that original image is compressed that said each time period is corresponding respectively; Said compressibility factor is big more, and the size of the image file after original image is compressed is big more, and the quality of the image after the compression is good more simultaneously;
Utilize the corresponding compressibility factor of said current slot, said current original image is compressed the present image file after obtaining compressing;
When the size of said present image file is in said file size preset range; Confirm that said present image file is a file destination; The size that said file size preset range is used to limit said present image file is more than or equal to the file size lower threshold, and smaller or equal to the file size upper limit threshold.
2. method according to claim 1; It is characterized in that; The corresponding respectively compressibility factor that original image is compressed of each time period in the said preset compressibility factor table; Be to confirm, specifically comprise according to arbitrary original image, preset compressibility factor set and said file size preset range that the time corresponding section is obtained:
A time period in office is obtained arbitrary original image;
Utilize the different compressibility factors in the said preset compressibility factor set, said original image is compressed, obtain the corresponding image file of said different compressibility factor;
Choose file size in the said image file within said file size preset range, and the corresponding maximum compressibility factor of compressibility factor of said image file, as the corresponding compressibility factor that original image is compressed of said time period.
3. method according to claim 1 is characterized in that, said size when said present image file confirms that said present image file is that file destination comprises in said file size preset range the time:
Whether the size of judging said present image file is in the file size preset range;
When the size of said present image file is in said file size preset range, confirm that said present image file is a file destination;
When the size of said present image file is not in said file size preset range; The corresponding compressibility factor of said current slot is increased or reduces the processing of predetermined step-length; Utilize the compressibility factor after handling that said current original image is compressed again; The size of the present image file after said compression again confirms that the present image file after the said compression again is a file destination in said file size preset range.
4. method according to claim 3; It is characterized in that; Said preset compressibility factor table also comprises the number of times of compression again that said each corresponding time period, when said current slot begins, compresses the number of times zero clearing again with said; The said number of times that compresses again representes have several original images to compress again in the corresponding time period, and said method also comprises:
When utilizing the compressibility factor after handling said current original image is compressed again; The size of the present image file after said compression again is in said file size preset range; Confirm present image file after the said compression again when being file destination, the number of times of compression again that said current slot is corresponding adds one.
5. method according to claim 4; It is characterized in that; Said when utilizing the compressibility factor after handling that said current original image is compressed again; The size of present image file after said compression again is in said file size preset range, and when confirming that present image file after the said compression again is file destination, the number of times of compression again that said current slot is corresponding adds one and comprises:
When utilizing the compressibility factor after handling said current original image is compressed again; The size of the present image file after said compression again is in said file size preset range; And the compression number of times that said current original image is compressed again is during less than the image compression threshold value; Confirm that the present image file after the said compression again is a file destination; And the number of times of compression again that said current slot is corresponding adds one, and said image compression threshold value is represented the frequency threshold value that each original image compresses again; Perhaps,
The compression number of times that compressibility factor after utilize handling is compressed said current original image again abandons said current original image, and the number of times of compression again of said current slot correspondence is added one during more than or equal to the image compression threshold value.
6. method according to claim 5 is characterized in that, said method also comprises:
At interval the stipulated time is inquired about the corresponding number of times of compression again of said current slot whether more than or equal to compression threshold again in said current slot;
When the corresponding number of times of compression again of said current slot during more than or equal to compression threshold again; Arbitrary original image, preset compressibility factor according to said current slot obtains are gathered and said file size preset range; Upgrade the corresponding compressibility factor of current slot described in the said preset compressibility factor table, and the number of times of the compression again zero clearing that said current slot is corresponding.
7. method according to claim 6; It is characterized in that; Said arbitrary original image, preset compressibility factor set and the image file size preset range of obtaining according to said current slot, upgrade the corresponding compressibility factor of current slot described in the said preset compressibility factor table and comprise:
Obtain arbitrary original image at said current slot;
Utilize the different compressibility factors in the said preset compressibility factor set, said original image is compressed, obtain the corresponding image file of said different compressibility factor;
Choose file size in the said image file within said file size preset range, and the corresponding maximum compressibility factor of compressibility factor of said image file, the corresponding compressibility factor of said current slot upgraded.
8. a jpeg image compressibility is characterized in that, comprising:
Acquiring unit is used to obtain current original image;
Query unit; Be used at cycle current time corresponding preset compressibility factor table, the corresponding compressibility factor of inquiry current slot, wherein; A corresponding preset compressibility factor table of time cycle; Said preset compressibility factor table comprises each time period in the time corresponding cycle, the compressibility factor that original image is compressed that said each time period is corresponding respectively, and said compressibility factor is big more; The size of the image file after original image compressed is big more, and the quality of the image after the compression is good more simultaneously;
Compression unit is used to utilize the corresponding compressibility factor of said current slot, said current original image is compressed the present image file after obtaining compressing;
File destination is confirmed the unit; Be used for size when said present image file in said file size preset range the time; Confirm that said present image file is a file destination; The size that said file size preset range is used to limit said present image file is more than or equal to the file size lower threshold, and smaller or equal to the file size upper limit threshold.
9. system according to claim 8; It is characterized in that; The corresponding respectively compressibility factor that original image is compressed of each time period in the said preset compressibility factor table of said query unit inquiry; Be to confirm that according to arbitrary original image, preset compressibility factor set and said file size preset range that the time corresponding section is obtained specifically comprise: a time period in office is obtained arbitrary original image; Utilize the different compressibility factors in the said preset compressibility factor set, said original image is compressed, obtain the corresponding image file of said different compressibility factor; Choose file size in the said image file within said file size preset range, and the corresponding maximum compressibility factor of compressibility factor of said image file, as the corresponding compressibility factor that original image is compressed of said time period.
10. system according to claim 8 is characterized in that, said file destination confirms that the unit comprises:
Processing module, whether the size that is used to judge said present image file is in the file size preset range;
Determination module is used for size when said present image file in said file size preset range the time, confirms that said present image file is a file destination;
Said determination module; Also be used for size when said present image file not in said file size preset range the time; The corresponding compressibility factor of said current slot is increased or reduces the processing of predetermined step-length; Utilize the compressibility factor after handling that said current original image is compressed again, the size of the present image file after said compression again confirms that the present image file after the said compression again is a file destination in said file size preset range.
11. system according to claim 10; It is characterized in that; Said preset compressibility factor table also comprises the number of times of compression again that said each corresponding time period, when said current slot begins, compresses the number of times zero clearing again with said; The said number of times that compresses again representes have several original images to compress again in the corresponding time period, and said system also comprises:
Counting unit; Be used for when utilizing the compressibility factor after handling that said current original image is compressed again; The size of the present image file after said compression again is in said file size preset range; Confirm present image file after the said compression again when being file destination, the number of times of compression again that said current slot is corresponding adds one.
12. system according to claim 11 is characterized in that, said counting unit comprises:
First module; Be used for when utilizing the compressibility factor after handling that said current original image is compressed again; The size of the present image file after said compression again is in said file size preset range; And the compression number of times that said current original image is compressed again is during less than the image compression threshold value; Confirm that the present image file after the said compression again is a file destination, and the number of times of compression again of said current slot correspondence is added one, said image compression threshold value is represented the frequency threshold value that each original image compresses again;
Second module; When being used for compression number of times that the compressibility factor after utilize handling compresses said current original image again more than or equal to the image compression threshold value; Said current original image is abandoned, and the number of times of compression again that said current slot is corresponding adds one.
13. system according to claim 12 is characterized in that, said system also comprises:
Detecting unit is used in said current slot at interval the stipulated time to detect the corresponding number of times of compression again of said current slot whether more than or equal to compression threshold again;
Updating block; Be used for when the corresponding number of times of compression again of said current slot during more than or equal to compression threshold again; Arbitrary original image, preset compressibility factor according to said current slot obtains are gathered and said file size preset range; Upgrade the corresponding compressibility factor of current slot described in the said preset compressibility factor table, and the number of times of the compression again zero clearing that said current slot is corresponding.
14. system according to claim 13 is characterized in that, said updating block comprises:
Acquisition module is used for obtaining arbitrary original image at said current slot;
Compression module is used for utilizing the different compressibility factors of said preset compressibility factor set, and said original image is compressed, and obtains the corresponding image file of said different compressibility factor;
Update module, the file size that is used for choosing said image file are within said file size preset range, and the corresponding maximum compressibility factor of compressibility factor of said image file, upgrade the corresponding compressibility factor of said current slot.
CN201210260832.8A 2012-07-25 2012-07-25 JPEG image compression method and system Active CN102769752B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210260832.8A CN102769752B (en) 2012-07-25 2012-07-25 JPEG image compression method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210260832.8A CN102769752B (en) 2012-07-25 2012-07-25 JPEG image compression method and system

Publications (2)

Publication Number Publication Date
CN102769752A true CN102769752A (en) 2012-11-07
CN102769752B CN102769752B (en) 2014-12-10

Family

ID=47096988

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210260832.8A Active CN102769752B (en) 2012-07-25 2012-07-25 JPEG image compression method and system

Country Status (1)

Country Link
CN (1) CN102769752B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016095806A1 (en) * 2014-12-16 2016-06-23 广州市动景计算机科技有限公司 Picture data transmission method and device
CN106326326A (en) * 2016-06-07 2017-01-11 武汉科技大学 Picture caching optimization method in Android system
CN108900929A (en) * 2018-08-08 2018-11-27 北京奇安信科技有限公司 A kind of image watermark signature processing method and processing device
CN109255752A (en) * 2017-07-14 2019-01-22 北京字节跳动网络技术有限公司 Image adaptive compression method, device, terminal and storage medium
CN109995962A (en) * 2017-12-29 2019-07-09 浙江宇视科技有限公司 The control method and system of coding of graphics upper dimension bound
CN110298895A (en) * 2019-05-08 2019-10-01 平安科技(深圳)有限公司 Picture compression method, apparatus, equipment and storage medium based on artificial intelligence
CN110399346A (en) * 2019-06-20 2019-11-01 平安科技(深圳)有限公司 Utilize store path setting method, device and the computer equipment of file counter
CN111311699A (en) * 2020-01-17 2020-06-19 北京达佳互联信息技术有限公司 Picture compression method and device
CN111859630A (en) * 2020-06-30 2020-10-30 山东云海国创云计算装备产业创新中心有限公司 Image compression simulation verification method, device, equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1527586A (en) * 2003-03-06 2004-09-08 三星电子株式会社 Method and equipment for compressing image data
CN1954611A (en) * 2004-04-09 2007-04-25 诺基亚公司 Compressed image data file creation method, image data compression device, and imaging device
US20100183233A1 (en) * 2004-05-10 2010-07-22 Seiko Epson Corporation Image data compression device, encoder, electronic equipment and method of compressing image data
CN102547086A (en) * 2010-11-25 2012-07-04 卡西欧计算机株式会社 Image capturing apparatus, image capturing control method, and storage medium storing program for image capturing
CN102571820A (en) * 2012-02-21 2012-07-11 华为技术有限公司 Method used for transmitting data, compression server and terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1527586A (en) * 2003-03-06 2004-09-08 三星电子株式会社 Method and equipment for compressing image data
CN1954611A (en) * 2004-04-09 2007-04-25 诺基亚公司 Compressed image data file creation method, image data compression device, and imaging device
US20100183233A1 (en) * 2004-05-10 2010-07-22 Seiko Epson Corporation Image data compression device, encoder, electronic equipment and method of compressing image data
CN102547086A (en) * 2010-11-25 2012-07-04 卡西欧计算机株式会社 Image capturing apparatus, image capturing control method, and storage medium storing program for image capturing
CN102571820A (en) * 2012-02-21 2012-07-11 华为技术有限公司 Method used for transmitting data, compression server and terminal

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10812679B2 (en) 2014-12-16 2020-10-20 Guangzhou Ucweb Computer Technology Co., Ltd. Picture data transmission method and device
WO2016095806A1 (en) * 2014-12-16 2016-06-23 广州市动景计算机科技有限公司 Picture data transmission method and device
CN106326326A (en) * 2016-06-07 2017-01-11 武汉科技大学 Picture caching optimization method in Android system
CN106326326B (en) * 2016-06-07 2019-08-16 武汉科技大学 A kind of image cache optimization method in android system
CN109255752A (en) * 2017-07-14 2019-01-22 北京字节跳动网络技术有限公司 Image adaptive compression method, device, terminal and storage medium
CN109255752B (en) * 2017-07-14 2023-06-23 北京字节跳动网络技术有限公司 Image self-adaptive compression method, device, terminal and storage medium
CN109995962A (en) * 2017-12-29 2019-07-09 浙江宇视科技有限公司 The control method and system of coding of graphics upper dimension bound
CN109995962B (en) * 2017-12-29 2020-09-01 浙江宇视科技有限公司 Method and system for controlling upper limit of picture coding size
CN108900929A (en) * 2018-08-08 2018-11-27 北京奇安信科技有限公司 A kind of image watermark signature processing method and processing device
CN110298895A (en) * 2019-05-08 2019-10-01 平安科技(深圳)有限公司 Picture compression method, apparatus, equipment and storage medium based on artificial intelligence
WO2020252929A1 (en) * 2019-06-20 2020-12-24 平安科技(深圳)有限公司 Method and apparatus for configuring storage path by using file counter, and computer device
CN110399346A (en) * 2019-06-20 2019-11-01 平安科技(深圳)有限公司 Utilize store path setting method, device and the computer equipment of file counter
CN110399346B (en) * 2019-06-20 2024-01-16 平安科技(深圳)有限公司 Storage path setting method and device using file counter and computer equipment
CN111311699A (en) * 2020-01-17 2020-06-19 北京达佳互联信息技术有限公司 Picture compression method and device
CN111859630A (en) * 2020-06-30 2020-10-30 山东云海国创云计算装备产业创新中心有限公司 Image compression simulation verification method, device, equipment and readable storage medium
CN111859630B (en) * 2020-06-30 2022-06-17 山东云海国创云计算装备产业创新中心有限公司 Image compression simulation verification method, device, equipment and readable storage medium

Also Published As

Publication number Publication date
CN102769752B (en) 2014-12-10

Similar Documents

Publication Publication Date Title
CN102769752A (en) JPEG image compression method and system
CA2824330A1 (en) An integrated intelligent server based system and method/systems adapted to facilitate fail-safe integration and/or optimized utilization of various sensory inputs
CN105553740A (en) Data interface monitoring method and device
CN104469395A (en) Image transmission method and device
CN105389568A (en) Method, device and system for acquiring location of vehicle
CN102708603A (en) GIS (Geographic Information System)-based vehicle-mounted recorder for monitoring vehicle
CN109600619A (en) A kind of time-sharing multiplexing method of decoding hardware
CN106331603A (en) Video monitoring method, apparatus, system and server
CN105141888A (en) Method for filtering out repeated content of monitor video
CN201278570Y (en) Apparatus for uploading detected black screen of wireless digital television
CN112182289B (en) Data deduplication method and device based on Flink frame
CN105509017A (en) Streetlamp cloud storage system and street lamp system
CN102780880A (en) Cloud computing terminal and encoding and decoding control method thereof
CN103036981A (en) Device and method for remote data transmitting
CN101035285A (en) Image decomposition and recovery method in the network transmission
CN1933599A (en) Video-frequency data processing method, video-frequency collecting equipment and video-frequency management equipment
CN105677450A (en) Remote operating method and device for terminal
CN109636950B (en) Driving track data storage method
CN1367613A (en) Image compression device and its method
CN102082726A (en) Method and device for processing data and transmission system
CN101834776A (en) Bandwidth control method, device and system
CN207835649U (en) A kind of device of the farmland monitor video defogging sharpening of UAV flight
CN101674493A (en) Monitoring method, monitoring terminal and monitoring system for digital television network images
CN103561230A (en) Camera information processing device and method
CN104902023A (en) Middleware system of vehicle-mounted internet-of-things operation platform and control method thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee
CP03 Change of name, title or address

Address after: 100193, Haidian District, Zhongguancun Software Park, building 9, international software building, block 3, block A, Beijing

Patentee after: BEIJING DIGITAL ZHITONG TECHNOLOGY CO., LTD.

Address before: Beijing City, Haidian District Hanvon building 100193 Zhongguancun Software Park Building No. 5

Patentee before: Beijing Hanwang Intelligent Traffic Technology Co., Ltd.