Image processing device and method
Granted 19 Jun 2012 · 2 office actions
Assignee: Silicon Motion Technology
Law firm: Law firm · Log in to unlock
Attorney: Attorney · Log in to unlock
Inventors: Yung-Te Wang, Yung-Wei Chen · Examiner: Sinh Tran · AU 2622 · TC 2600
Life of the application
10 dated eventsAbstract
An image processing device including a camera, a discrete signal processor (DSP) and an output device is disclosed. The camera provides image data for the DSP to process. The DSP samples sub-image data to generate a first image processing signal, discrete cosine transforms the first image processing signal to generate a second image processing signal, uses a quantization table to quantize the second image processing signal to generate a third image processing signal, zig-zag scans the third image processing signal to generate a fourth image processing signal, and Huffman codes the fourth image processing signal to generate an output image signal. The DSP adjusts a cut point of a next fourth image processing signal according to the size of the fourth image processing signal so as to control the size of a next output image signal. The output device outputs the output image signal.
Description
6 parts›CROSS REFERENCE TO RELATED APPLICATIONS
This application claims priority of Taiwan Patent Application No. 097135603, filed on Sep. 17, 2008, the entire contents of which are incorporated by reference herein.
›BACKGROUND OF THE INVENTION
1. Field of the Invention
The invention relates to a method for compressing image data and more particularly relates to a method for compressing image data by dynamically adjusting the size of image data.
2. Description of the Related Art
FIG. 1 is a flowchart illustrating a compression process for Joint Photographic Experts Group (JPEG) images according to the prior art. Image data D 10 is processed to generate image data P 1 via YUV sampling (step B 11 ), discrete cosine transform (DCT) (step B 12 ), quantization (step B 13 ), zig-zag scanning (step B 14 ), and Huffman coding (step B 15 ).
›BRIEF SUMMARY OF THE INVENTION
An image processing method is provided for processing at least one image data, comprising: sampling a sub-image data to generate a first image processing signal; discrete cosine transforming the first image processing signal to generate a second image processing signal; quantizing the second image processing signal according to a quantization table so as to generate a third image processing signal; zig-zag scanning the third image processing signal to generate a fourth image processing signal; Huffman coding the fourth image processing signal to generate an output image signal; and adjusting a cut point of the next fourth image processing signal according to the size of the fourth image processing signal so as to control the size of the output image signal.
According to another embodiment of the invention, an image processing device is provided. The image processing device comprises a camera, a digital signal processor (DSP) and an output device. The camera provides image data to the digital signal processor for processing. The digital signal processor samples sub-image data to generate a first image processing signal, discrete cosine transforms the first image processing signal to generate a second image processing signal, uses a quantization table to quantize the second image processing signal to generate a third image processing signal, zig-zag scans the third image processing signal to generate a fourth image processing signal, Huffman codes the fourth image processing signal to generate an output image signal, and adjusts a cut point of the next fourth image processing signal according to the size of the fourth image processing signal so as to control the size of the output image signal. The output device outputs the output image signal.
A detailed description is given in the following embodiments with reference to the accompanying drawings.
›BRIEF DESCRIPTION OF DRAWINGS
The invention can be more fully understood by reading the subsequent detailed description and examples with references made to the accompanying drawings, wherein:
FIG. 1 is a flowchart illustrating a compression process for Joint Photographic Experts Group (JPEG) images according to the prior art;
FIG. 2 is a flowchart illustrating processing of a JPEG image according to an embodiment of the invention;
FIG. 3 shows a block diagram of data structure according to another embodiment of the invention; and
FIG. 4 is a block diagram illustrating an image processing device according to still another embodiment of the invention.
›DETAILED DESCRIPTION OF THE INVENTION · 1 of 2
The following description is of the best-contemplated mode of carrying out the invention. This description is made for the purpose of illustrating the general principles of the invention and should not be taken in a limiting sense. The scope of the invention is best determined by reference to the appended claims.
FIG. 2 is a flowchart illustrating processing of a JPEG image according to an embodiment of the invention. A JPEG image data comprises at least two sub-image data D 20 being processed to generate a first image processing signal S 21 via YUV sampling (step B 21 ). The first image processing signal S 21 is used to generate a second image processing signal S 22 via discrete cosine transform (DCT) (step B 22 ). The second image processing signal S 22 is provided to generate a third image processing S 23 according to a quantization table Q 1 (step B 223 ). Next, the third image processing signal S 23 is operated to generate a fourth image processing signal S 24 via zig-zag scanning (step B 24 ). Note that the steps of signal quantization and zig-zag scanning can be interchanged without changing the results. Then, the fourth image processing signal S 24 is used to generate an output image signal P 2 via Huffman decoding (step B 25 ). A cut point value (Cp) of a next fourth image processing signal S 24 is adjusted according to the size of the output image signal P 2 so as to determine the size of the next fourth image signal S 24 . According to another embodiment of the invention, the cut point value (Cp) of the next fourth image processing signal S 24 is adjusted according to the size of previous two output image signals P 2 so as to determine the size of a next fourth image signal S 24 . The size is not limited to being determined from previous one or two output image signals P 2 .
According to one embodiment of the invention, the fourth image processing signal S 24 comprises 64 values A 0 ˜A 63 , wherein the value A 0 represents a DC value and other values A 1 ˜A 63 represent AC values. An n (from 1 to 63) represents a signal with different frequencies and a larger n represents a higher signal frequency, which affects the image quality less. As shown in FIG. 2 , when the cut point Cp is set as 30, the values A 30 ˜A 63 are set to be zero to control the size of the fourth image processing signal S 24 . A JPEG image data comprises at least two sub-image data D 20 , and each sub-image data D 20 is used to dynamically adjust the cut point Cp according to the size of the output image signal P 2 . Thus, different sub-image data D 20 comprises a respective cut point Cp.
FIG. 3 shows a block diagram of data structure according to another embodiment of the invention. A second image processing signal S 22 comprises N sub-image data MCU 0 ˜MCU(N−1), wherein each sub-image data MCU comprises an 8×8 data matrix. Referring to FIG. 2 , a quantization table Q 1 is an 8×8 data matrix. The sub-image data MCU and the quantization table Q 1 are not limited to being an 8×8 data matrix according to the invention. The sub-image data MCU and the quantization table Q 1 may also be different N×N data matrices, respectively. When the sub-image data MCU 0 is provided to be the output image signal P 2 , the size thereof is used to adjust the cut point Cp. Meanwhile, the sub-image data MCU 1 is output by zig-zag scanning B 24 to be the fourth image processing signal S 24 . Note that the cut point Cp is used to control the sub-image data MCU 1 or adjust the size of the fourth image processing signal S 24 . Similarly, when the sub-image data MCU 1 is provided to be the output image signal P 2 , the size thereof is used to adjust the cut point Cp and control the size of the sub-image data MCU 2 being processed by zig-zag scanning B 24 . In still another embodiment, the cut point Cp for controlling the sub-image data MCU 2 is also determined by a mean value of the size of the output image signal P 2 from the sub-image data MCU 0 and MCU 1 .
According to another embodiment of the invention, each JPEG image data comprises a plurality of sub-image data D 20 . When a digital signal processor (DSP) performs processing of one or more JPEG image data, the digital signal processor dynamically adjusts a corresponding quantization table Q 1 of a next image data by averaging all cut point values of the previous one or more image data. The adjustment is accomplished by adjusting a coefficient for multiplying a predetermined quantization table Q 2 to generate a new quantization table Q 1 . Thus, the digital signal processor may provide an image output data with a specific size by adjusting the quantization table Q 1 , the cut point Cp, or both accordingly, a desired balance between image size and image quality is achieved.
FIG. 4 is a block diagram illustrating an image processing device 30 according to still another embodiment of the invention. The image processing device 30 comprises a camera 40 , a digital signal processor (DSP) 20 and an output device 50 . The camera 40 may photograph one image at a time or continuously take a plurality of images, and transmit the image data D 20 to the digital signal processor 20 . The digital signal processor 20 receives the image data D 20 and generates an output image data with a fixed size P 2 to the output device 50 according to the aforementioned embodiments of the image processing method. When the size of the output image data P 2 exceeds a predetermined value, the digital signal processor 20 may decrease the cut point Cp to reduce the size of the output image data, thereby avoiding the problem wherein the output device is unable to process the output image data due to the significantly large amount of data. When the size of the output image data P 2 is smaller than a predetermined value, the digital signal processor 20 may increase the cut point Cp to gain more output image data P 2 to maintain image quality. The output device 50 may be a universal serial bus (USB) device or other output devices. The image processing device 30 may be a web camera or other JPEG image processing devices. The image processing device 30 is applicable in a notebook or personal digital products.
›DETAILED DESCRIPTION OF THE INVENTION · 2 of 2
While the invention has been described by way of example and in terms of preferred embodiment, it is to be understood that the invention is not limited thereto. Those who are skilled in this technology can still make various alterations and modifications without departing from the scope and spirit of this invention. Therefore, the scope of the present invention shall be defined and protected by the following claims and their equivalents.
Claims as granted
15 claimsLog in to read the claims of this application.
Log in to unlockClassifications
5 codes- G06K9/46
- G06K9/66
- H04N23/40
Claim changes
SoonSee which claims were amended, added or cancelled during examination, with every added and removed word marked.
The published claims of this application are not paired with the granted ones in what we hold.
File wrapper
See the full prosecution history — every USPTO and applicant action on this file, in order.
Log in to unlockDocuments
Log in to open the documents of this file: the application as filed, every office action and response, the notice of allowance.
Log in to unlockChain of title
See the full assignment history — every owner this patent has passed through, with recordation dates and reel/frame numbers.
Log in to unlock