CN101030296A - Method for adjusting JPEG image resolution - Google Patents

Method for adjusting JPEG image resolution Download PDF

Info

Publication number
CN101030296A
CN101030296A CN 200710017311 CN200710017311A CN101030296A CN 101030296 A CN101030296 A CN 101030296A CN 200710017311 CN200710017311 CN 200710017311 CN 200710017311 A CN200710017311 A CN 200710017311A CN 101030296 A CN101030296 A CN 101030296A
Authority
CN
China
Prior art keywords
resolution
picture
output valve
adjusting
dct
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
CN 200710017311
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.)
Inventec Besta Xian Co Ltd
Original Assignee
Inventec Besta Xian 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 Inventec Besta Xian Co Ltd filed Critical Inventec Besta Xian Co Ltd
Priority to CN 200710017311 priority Critical patent/CN101030296A/en
Publication of CN101030296A publication Critical patent/CN101030296A/en
Pending legal-status Critical Current

Links

Images

Abstract

A method for regulating resolution of JPEG picture includes enabling to regulate picture with the first resolution to be the picture with the second resolution, using image block with n x n pixel points as unit to convert picture to be n x n DCT output value, obtaining regulation ratio based on the first and the second resolution and obtaining k value and k x k DCD output value as per said regulation ratio, using iDCT technique to use n x n pixel points image block as unit to counter-convert k x k DCT output value to be picture with the resolution.

Description

A kind of method for adjusting resolution of JPEG picture
Technical field
The present invention relates to a kind of digital picture method for adjusting resolution, particularly a kind of JPEG (JointPhotographic Experts Group; Joint image expert group) method for adjusting resolution of picture.
Background technology
Past is for picture, image, sound ... etc. the transmission and the playback system of information, because technical restriction only can be handled in a similar manner.In recent years, because the high development of digital technology, make that information processing is also developed and stride forward towards the digitizing direction.
Can play browsing pictures at any time easily in various electronic equipments is that everybody is desired; Yet, the image literary composition file of the various forms that from world-wide web or other image file database, obtain, wherein picture that is comprised such as background picture, the size of scenery picture and caricature picture is often bigger, usually only be adapted at having the display device of big display area, as playing in the graphoscope; Have when playing in the less electronic equipment of display area various if desired, usually can cause shown picture unintelligible even can't show that at all then must downgrade photo resolution this moment because dimension of picture is excessive.Yet, when downgrading resolution,, may cause the distortion of picture image quality very serious if lack suitable processing.
At present, adopt low-pass filter to reach resolution mostly for the adjustment mode of photo resolution and downgrade processing, yet the design that increases low-pass filter will certainly cause the integral operation amount to increase, and then increase the use of resource.Therefore, provide to reach effectively to downgrade photo resolution, and the digital picture method for adjusting resolution that can accelerate the picture decompression speed also is one of focus of paying close attention to of insider.
Summary of the invention
Defective or deficiency at above-mentioned prior art existence, the objective of the invention is to, a kind of method for adjusting resolution of JPEG picture is provided, this method can effectively downgrade photo resolution, and can accelerate the picture decompression speed, solve resolution and downgrade failure and cause the serious problem of picture image quality distortion.
To achieve these goals, the present invention adopts following technical solution:
A kind of method for adjusting resolution of JPEG picture is characterized in that, the picture that this method will have first resolution is adjusted to the picture with second resolution, specifically comprises the following steps:
Segment with n * n pixel is a unit, converts the picture of first resolution to n * n DCT output valve, promptly C (x, y), x, y=0,1,2 ..., (n-2), (n-1);
Obtain adjustment ratio according to first resolution and second resolution;
Adjustment ratio according to above-mentioned steps is obtained the k value, wherein adjusts ratio greater than k/n and smaller or equal to (k+1)/n; With
With x, (x y) is set at 0 to y, obtains k * k DCT output valve, and is last, again by the iDCT technology, is unit with the segment of n * n pixel, and k * k DCT output valve reversed changes the picture with second resolution into greater than the C of k.
Method increase of the present invention need not the treatment effect that low-pass filter can reach adopt to increase low-pass filter, and then reaches the simplification computing, and quickens to adjust the speed of photo resolution, and picture after the adjustment of good image quality still can be provided simultaneously.
Description of drawings
Fig. 1 is the process flow diagram of method for adjusting resolution of the JPEG picture of one embodiment of the present of invention;
Fig. 2 is the process flow diagram of method for adjusting resolution of the JPEG picture of another embodiment of the present invention;
Fig. 3 is in the method for adjusting resolution of JPEG picture of the present invention, is converted into the synoptic diagram of 8 * 8 DCT segment;
Fig. 4 A has shown according to the present invention the adjustment position of the first embodiment DCT output valve of the method for adjusting resolution of JPEG picture;
Fig. 4 B has shown according to the present invention the adjustment position of the second embodiment DCT output valve of the method for adjusting resolution of JPEG picture;
Fig. 4 C has shown according to the present invention the adjustment position of the 3rd embodiment DCT output valve of the method for adjusting resolution of JPEG picture;
Fig. 4 D has shown according to the present invention the adjustment position of the 4th embodiment DCT output valve of the method for adjusting resolution of JPEG picture;
Fig. 4 E has shown according to the present invention the adjustment position of the 5th embodiment DCT output valve of the method for adjusting resolution of JPEG picture;
Fig. 4 F has shown according to the present invention the adjustment position of the 6th embodiment DCT output valve of the method for adjusting resolution of JPEG picture.
Below in conjunction with accompanying drawing and embodiment of the present invention and that the inventor provides the present invention is described in further detail.
Embodiment
The present invention directly handles JPEG picture resulting DCT (DiscreteCosine Transform when decompressing; Discrete cosine transform) signal, be used to adjust the radio-frequency component value of the frequency domain of resulting picture, reaching the treatment effect of common employing low-pass filter, and then reach the simplification computing, and the speed of photo resolution is adjusted in acceleration, and the adjustment back picture of good image quality still can be provided simultaneously.
With reference to Fig. 1, Fig. 1 is the method for adjusting resolution according to embodiments of the invention JPEG picture, and the picture that is used for having first resolution is adjusted to the picture of one second resolution, comprising:
Segment with n * n pixel is that unit converts picture to n * n DCT output valve (step 110);
Obtain an adjustment ratio (step 120) according to first resolution and second resolution;
Obtain k value (step 130) according to adjusting ratio; And
With x, (x y) is set at 0 to y, obtains k * k DCT output valve (step 140) greater than the C of k.
Therefore, picture with the segment of n * n pixel be unit via the conversion of DCT technology after, can obtain n * n DCT output valve, promptly C (x, y), x=0 wherein, 1,2 ..., (n-2), (n-1), and y=0,1,2 ..., (n-2), (n-1).At this moment, adjusting ratio is greater than k/n and smaller or equal to (k+1)/n.
Wherein, this n * n DCT output valve can form the DCT segment of one n * n, and in the DCT of this n * n segment, and the frequency content of each DCT segment from left to right, from top to bottom increase.
At last, again by iDCT (inverse Discrete Cosine Transform; Inverse discrete cosine transformation) technology is a unit with the segment of n * n pixel, changes k * k DCT output valve counter-rotating into second resolution picture (step 150), as shown in Figure 2.
For instance, segment with 8 * 8 pixels is each compression and the base unit that decompresses, when compression, be to utilize the DCT technology segment of 8 * 8 pixels to be changed into the composition of height frequency by time and space position, then when decompressing, utilize the iDCT technology that the segment of 8 * 8 pixels is changed into time and space position by the composition of height frequency again.
With the boil down to example, the segment of 8 * 8 pixels can obtain 8 * 8 DCT output valves, i.e. C (x after changing via the DCT technology, y), x=0 wherein, 1,2,, 6,7, and y=0,1,2 ... 6,7, and these 8 * 8 DCT output valves can form 8 * 8 DCT segment, wherein the frequency content of transverse axis system frequency is higher more to the right, and the frequency content of longitudinal axis system is higher to lower frequency more, as shown in Figure 3.
By the original resolution (i.e. first resolution) of picture, the resolution of desiring to be adjusted to (i.e. second resolution) can obtain one and adjust ratio (R), and R can be smaller or equal to 1.
Adjust the DCT output valve according to adjusting ratio (R), promptly C (x, y), the adjustment mode is as follows:
When 7/8<R≤1, do not adjust;
When 6/8<R≤7/8, with C (x, y), x, the DCT output valve of y>6 is set at zero, is about to the oblique line position shown in Fig. 4 A and is made as zero;
When 5/8<R≤6/8, with C (x, y), x, the DCT output valve of y>5 is set at zero, is about to that the oblique line position is made as zero shown in Fig. 4 B;
When 4/8<R≤5/8, with C (x, y), x, the DCT output valve of y>4 is set at zero, is about to the oblique line position shown in Fig. 4 C and is made as zero;
When 3/8<R≤4/8, with C (x, y), x, the DCT output valve of y>3 is set at zero, is about to the oblique line position shown in Fig. 4 D and is made as zero;
When 2/8<R≤3/8, with C (x, y), x, the DCT output valve of y>2 is set at zero, is about to the oblique line position shown in Fig. 4 E and is made as zero;
When 0<R≤2/8, with C (x, y), x, the DCT output valve of y>1 is set at zero, is about to the oblique line position shown in Fig. 4 F and is made as zero.
Promptly be when k/n<R≤(k+1)/n, with C (x, y), x, the DCT output valve of y>k is set at zero.In the foregoing description, n=8.
After the adjustment, utilize the iDCT technology again with the remaining DCT output valve segment that reverses back, the picture that promptly obtains having second resolution.
So, can the reserve part low-frequency component, and suitably remove radio-frequency component, therefore can reduce the operand in the iDCT computing, and then reach the speed of quickening to adjust photo resolution, picture after the adjustment of good image quality still can be provided simultaneously.
Though the present invention has made detailed description with above-mentioned preferred embodiment to the present invention, be not to limit the present invention with the foregoing description.Those skilled in the art should recognize under the situation that does not break away from given technical characterictic of technical solution of the present invention and scope, and the increase that technical characterictic is done, with the replacement of some same contents of this area all should belong to protection scope of the present invention.

Claims (1)

1. the method for adjusting resolution of a JPEG picture is characterized in that, the picture that this method will have first resolution is adjusted to the picture with second resolution, specifically comprises the following steps:
Segment with n * n pixel is a unit, converts the picture of first resolution to n * n DCT output valve, promptly C (x, y), x, y=0,1,2 ..., (n-2), (n-1);
Obtain an adjustment ratio according to first resolution and second resolution, should;
Obtain the k value according to adjusting ratio, wherein adjust ratio greater than k/n and smaller or equal to (k+1)/n; And
With x, (x y) is set at 0 to y, obtains k * k DCT output valve, and is last, is iDCT by the inverse discrete cosine transformation technology again, is unit with the segment of n * n pixel, and k * k DCT output valve reversed changes the picture with second resolution into greater than the C of k.
CN 200710017311 2007-01-26 2007-01-26 Method for adjusting JPEG image resolution Pending CN101030296A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200710017311 CN101030296A (en) 2007-01-26 2007-01-26 Method for adjusting JPEG image resolution

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200710017311 CN101030296A (en) 2007-01-26 2007-01-26 Method for adjusting JPEG image resolution

Publications (1)

Publication Number Publication Date
CN101030296A true CN101030296A (en) 2007-09-05

Family

ID=38715621

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200710017311 Pending CN101030296A (en) 2007-01-26 2007-01-26 Method for adjusting JPEG image resolution

Country Status (1)

Country Link
CN (1) CN101030296A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102137390A (en) * 2010-12-13 2011-07-27 华为软件技术有限公司 Method, equipment and system for downloading mobile phone software
CN111241438A (en) * 2020-01-08 2020-06-05 腾讯科技(深圳)有限公司 Cartoon picture display method and device, computer readable storage medium and computer equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102137390A (en) * 2010-12-13 2011-07-27 华为软件技术有限公司 Method, equipment and system for downloading mobile phone software
CN111241438A (en) * 2020-01-08 2020-06-05 腾讯科技(深圳)有限公司 Cartoon picture display method and device, computer readable storage medium and computer equipment
CN111241438B (en) * 2020-01-08 2023-04-25 腾讯科技(深圳)有限公司 Cartoon picture display method, cartoon picture display device, cartoon picture display computer readable storage medium and cartoon picture display computer equipment

Similar Documents

Publication Publication Date Title
CN1130917C (en) Post-processing device for eliminating blocking artifact and method thereof
CN1094291C (en) Loop filter and loop filtering method
CN1078428C (en) Image coding method and apparatus therefor
CN1324890C (en) Adaptive alternation-removing method of dynamic image and its equipment
CN1170436C (en) Compressed picture bit stream transcoding method
CN1159660C (en) Transform region correction of actual region error
CN1592412A (en) Adaptive variable-length coding methods for image data
WO2016110031A1 (en) Data flow decoding method and device
US20100232721A1 (en) Image compression method and related apparatus
US20040022315A1 (en) Filtering method and apparatus for removing blocking artifacts and/or ringing noise
CN1968415A (en) Processing of compressed video signal
CN1222172C (en) Self adaptive DCT/IDCT appts. based on energy, and its control method
CN101030296A (en) Method for adjusting JPEG image resolution
CN1947146A (en) Method of down-sampling data values
CN100348053C (en) Error masking method using moving picture electronic watermark of video
CN1878308A (en) Orthogonal transformation method for image and video compression
CN1600033A (en) Embedding a watermark in an image signal
CN1420633A (en) Image coding device and method
CN101080026A (en) Method for removing color deviation in the image generated because of high and low brightness
CN1501688A (en) Method for resizing an image using the inverse discrete cosine transform
CN1878240A (en) Video image edge enhancing method
CN1201587C (en) Encoding block-organized data
CN1191717C (en) Method and device for reducing blocking artifact in the DCT domain
CN1812472A (en) Digital camera apparatus and method capable of realizing image display format conversion
CN1186940C (en) Improved cascaded compression method and system for digital video and images

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication